|
|
1.1 root 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: #if EVENT_SYSTEM_VERSION > 1
108: unsigned int reservedC[32];
109: #endif
110: unsigned char hardwareCursorCapable;
111: unsigned char hardwareCursorActive;
112: unsigned char reservedB[2];
113: IOGSize cursorSize[kIOFBNumCursorFrames];
114: IOGPoint hotSpot[kIOFBNumCursorFrames];
115: #ifndef IOFB_ARBITRARY_SIZE_CURSOR
116: union {
117: struct bm12Cursor bw;
118: struct bm18Cursor bw8;
119: struct bm34Cursor rgb;
120: struct bm38Cursor rgb24;
121: } cursor;
122: #else /* IOFB_ARBITRARY_SIZE_CURSOR */
123: unsigned char cursor[0];
124: #endif /* IOFB_ARBITRARY_SIZE_CURSOR */
125: };
126: #ifndef __cplusplus
127: typedef volatile struct StdFBShmem_t StdFBShmem_t;
128: #endif
129:
130:
131: enum {
132: // version for IOFBCreateSharedCursor
133: kIOFBCurrentShmemVersion = 2,
134: // memory types for IOConnectMapMemory.
135: // 0..n are apertures
136: kIOFBCursorMemory = 100,
137: kIOFBVRAMMemory = 110
138: };
139:
140: #define IOFRAMEBUFFER_CONFORMSTO "IOFramebuffer"
141:
142: #ifdef __cplusplus
143: }
144: #endif
145:
146: #ifndef KERNEL
147: #ifndef _IOKIT_IOGRAPHICSLIB_H
148: #include <IOKit/graphics/IOGraphicsLib.h>
149: #endif
150: #endif
151:
152: #endif /* ! _IOKIT_IOFRAMEBUFFERSHARED_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.