]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
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. | |
11 | * | |
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 | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
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. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* Copyright (c) 1992, 1993 NeXT Computer, Inc. All rights reserved. | |
23 | * | |
24 | * IOFrameBufferShared.h - Definitions of objects and types shared between | |
25 | * kernel level IOFrameBufferDisplay driver and PostScript level driver. | |
26 | * | |
27 | * HISTORY | |
28 | * 03 Sep 92 Joe Pasqua | |
29 | * Created. | |
30 | * 24 Jun 93 Derek B Clegg | |
31 | * Moved to driverkit. | |
32 | */ | |
33 | ||
34 | #ifndef _IOKIT_IOFRAMEBUFFERSHARED_H | |
35 | #define _IOKIT_IOFRAMEBUFFERSHARED_H | |
36 | ||
37 | #include <IOKit/hidsystem/IOHIDTypes.h> | |
38 | #include <IOKit/graphics/IOGraphicsTypes.h> | |
39 | ||
40 | #ifdef __cplusplus | |
41 | extern "C" { | |
42 | #endif | |
43 | ||
44 | #ifdef KERNEL | |
45 | // CGS use optional | |
46 | #define IOFB_ARBITRARY_SIZE_CURSOR | |
47 | #endif | |
48 | ||
49 | #define IOFB_SUPPORTS_XOR_CURSOR | |
50 | ||
51 | // | |
52 | // Cursor and Window Server state data, occupying a slice of shared memory | |
53 | // between the kernel and WindowServer. | |
54 | // | |
55 | ||
56 | enum { | |
57 | kIOFBNumCursorFrames = 4, | |
58 | kIOFBNumCursorFramesShift = 2, | |
59 | kIOFBMaxCursorDepth = 32 | |
60 | }; | |
61 | ||
62 | #ifndef IOFB_ARBITRARY_SIZE_CURSOR | |
63 | ||
64 | #define CURSORWIDTH 16 /* width in pixels */ | |
65 | #define CURSORHEIGHT 16 /* height in pixels */ | |
66 | ||
67 | struct bm12Cursor { | |
68 | unsigned int image[4][16]; | |
69 | unsigned int mask[4][16]; | |
70 | unsigned int save[16]; | |
71 | }; | |
72 | ||
73 | struct bm18Cursor { | |
74 | unsigned char image[4][256]; | |
75 | unsigned char mask[4][256]; | |
76 | unsigned char save[256]; | |
77 | }; | |
78 | ||
79 | struct bm34Cursor { | |
80 | unsigned short image[4][256]; | |
81 | unsigned short save[256]; | |
82 | }; | |
83 | ||
84 | struct bm38Cursor { | |
85 | unsigned int image[4][256]; | |
86 | unsigned int save[256]; | |
87 | }; | |
88 | ||
89 | #endif /* IOFB_ARBITRARY_SIZE_CURSOR */ | |
90 | ||
91 | struct StdFBShmem_t { | |
92 | ev_lock_data_t cursorSema; | |
93 | int frame; | |
94 | char cursorShow; | |
95 | char cursorObscured; | |
96 | char shieldFlag; | |
97 | char shielded; | |
98 | IOGBounds saveRect; | |
99 | IOGBounds shieldRect; | |
100 | IOGPoint cursorLoc; | |
101 | IOGBounds cursorRect; | |
102 | IOGBounds oldCursorRect; | |
103 | IOGBounds screenBounds; | |
104 | int version; | |
105 | int structSize; | |
106 | AbsoluteTime vblTime; | |
107 | AbsoluteTime vblDelta; | |
108 | unsigned int reservedC[30]; | |
109 | unsigned char hardwareCursorCapable; | |
110 | unsigned char hardwareCursorActive; | |
111 | unsigned char reservedB[2]; | |
112 | IOGSize cursorSize[kIOFBNumCursorFrames]; | |
113 | IOGPoint hotSpot[kIOFBNumCursorFrames]; | |
114 | #ifndef IOFB_ARBITRARY_SIZE_CURSOR | |
115 | union { | |
116 | struct bm12Cursor bw; | |
117 | struct bm18Cursor bw8; | |
118 | struct bm34Cursor rgb; | |
119 | struct bm38Cursor rgb24; | |
120 | } cursor; | |
121 | #else /* IOFB_ARBITRARY_SIZE_CURSOR */ | |
122 | unsigned char cursor[0]; | |
123 | #endif /* IOFB_ARBITRARY_SIZE_CURSOR */ | |
124 | }; | |
125 | #ifndef __cplusplus | |
126 | typedef volatile struct StdFBShmem_t StdFBShmem_t; | |
127 | #endif | |
128 | ||
129 | ||
130 | enum { | |
131 | // version for IOFBCreateSharedCursor | |
132 | kIOFBCurrentShmemVersion = 2, | |
133 | // memory types for IOConnectMapMemory. | |
134 | // 0..n are apertures | |
135 | kIOFBCursorMemory = 100, | |
136 | kIOFBVRAMMemory = 110 | |
137 | }; | |
138 | ||
139 | #define IOFRAMEBUFFER_CONFORMSTO "IOFramebuffer" | |
140 | ||
141 | #ifdef __cplusplus | |
142 | } | |
143 | #endif | |
144 | ||
145 | #endif /* ! _IOKIT_IOFRAMEBUFFERSHARED_H */ |