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