]> git.saurik.com Git - apple/xnu.git/blob - bsd/dev/kmreg_com.h
xnu-792.13.8.tar.gz
[apple/xnu.git] / bsd / dev / kmreg_com.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
14 * agreement.
15 *
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
18 * file.
19 *
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
27 *
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
29 */
30 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
31 *
32 * kmreg_com.h - machine independent km ioctl interface.
33 *
34 * HISTORY
35 * 16-Jan-92 Doug Mitchell at NeXT
36 * Created.
37 */
38
39 #ifdef KERNEL_PRIVATE
40
41 #ifndef _BSD_DEV_KMREG_COM_
42 #define _BSD_DEV_KMREG_COM_
43
44 #include <sys/types.h>
45 #include <sys/ioctl.h>
46
47 /*
48 * Colors for fg, bg in struct km_drawrect
49 */
50 #define KM_COLOR_WHITE 0
51 #define KM_COLOR_LTGRAY 1
52 #define KM_COLOR_DKGRAY 2
53 #define KM_COLOR_BLACK 3
54
55 /*
56 * The data to be rendered is treated as a pixmap of 2 bit pixels.
57 * The most significant bits of each byte is the leftmost pixel in that
58 * byte. Pixel values are assigned as described above.
59 *
60 * Each scanline should start on a 4 pixel boundry within the bitmap,
61 * and should be a multiple of 4 pixels in length.
62 *
63 * For the KMIOCERASERECT call, 'data' should be an integer set to the
64 * color to be used for the clear operation (data.fill).
65 * A rect at (x,y) measuring 'width' by 'height' will be cleared to
66 * the specified value.
67 */
68 struct km_drawrect {
69 unsigned short x; /* Upper left corner of rect to be imaged. */
70 unsigned short y;
71 unsigned short width; /* Width and height of rect to be imaged,
72 * in pixels */
73 unsigned short height;
74 union {
75 void *bits; /* Pointer to 2 bit per pixel raster data. */
76 int fill; /* Const color for erase operation. */
77 } data;
78 };
79
80 /*
81 * Argument to KMIOCANIMCTL.
82 */
83 typedef enum {
84 KM_ANIM_STOP, /* stop permanently */
85 KM_ANIM_SUSPEND, /* suspend */
86 KM_ANIM_RESUME /* resume */
87 } km_anim_ctl_t;
88
89 #define KMIOCPOPUP _IO('k', 1) /* popup new window */
90 #define KMIOCRESTORE _IO('k', 2) /* restore background */
91 #define KMIOCDUMPLOG _IO('k', 3) /* dump message log */
92 #define KMIOCDRAWRECT _IOW('k', 5, struct km_drawrect) /* Draw rect from
93 * bits */
94 #define KMIOCERASERECT _IOW('k', 6, struct km_drawrect) /* Erase a rect */
95
96 #ifdef KERNEL_PRIVATE
97 #define KMIOCDISABLCONS _IO('k', 8) /* disable console messages */
98 #endif /* KERNEL_PRIVATE */
99
100 #define KMIOCANIMCTL _IOW('k',9, km_anim_ctl_t)
101 /* stop animation */
102 #define KMIOCSTATUS _IOR('k',10, int) /* get status bits */
103 #define KMIOCSIZE _IOR('k',11, struct winsize) /* get screen size */
104
105 /*
106 * Status bits returned via KMIOCSTATUS.
107 */
108 #define KMS_SEE_MSGS 0x00000001
109
110 #endif /* _BSD_DEV_KMREG_COM_ */
111
112 #endif /* KERNEL_PRIVATE */