2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
22 /* Copyright (c) 1992, 1993 NeXT Computer, Inc. All rights reserved.
24 * IOFrameBufferShared.h - Definitions of objects and types shared between
25 * kernel level IOFrameBufferDisplay driver and PostScript level driver.
28 * 03 Sep 92 Joe Pasqua
30 * 24 Jun 93 Derek B Clegg
34 #ifndef _IOKIT_IOFRAMEBUFFERSHARED_H
35 #define _IOKIT_IOFRAMEBUFFERSHARED_H
37 #include <IOKit/hidsystem/IOHIDTypes.h>
38 #include <IOKit/graphics/IOGraphicsTypes.h>
46 #define IOFB_ARBITRARY_SIZE_CURSOR
49 #define IOFB_SUPPORTS_XOR_CURSOR
52 // Cursor and Window Server state data, occupying a slice of shared memory
53 // between the kernel and WindowServer.
57 kIOFBNumCursorFrames
= 4,
58 kIOFBNumCursorFramesShift
= 2,
59 kIOFBMaxCursorDepth
= 32
62 #ifndef IOFB_ARBITRARY_SIZE_CURSOR
64 #define CURSORWIDTH 16 /* width in pixels */
65 #define CURSORHEIGHT 16 /* height in pixels */
68 unsigned int image
[4][16];
69 unsigned int mask
[4][16];
70 unsigned int save
[16];
74 unsigned char image
[4][256];
75 unsigned char mask
[4][256];
76 unsigned char save
[256];
80 unsigned short image
[4][256];
81 unsigned short save
[256];
85 unsigned int image
[4][256];
86 unsigned int save
[256];
89 #endif /* IOFB_ARBITRARY_SIZE_CURSOR */
92 ev_lock_data_t cursorSema
;
101 IOGBounds cursorRect
;
102 IOGBounds oldCursorRect
;
103 IOGBounds screenBounds
;
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
116 struct bm12Cursor bw
;
117 struct bm18Cursor bw8
;
118 struct bm34Cursor rgb
;
119 struct bm38Cursor rgb24
;
121 #else /* IOFB_ARBITRARY_SIZE_CURSOR */
122 unsigned char cursor
[0];
123 #endif /* IOFB_ARBITRARY_SIZE_CURSOR */
126 typedef volatile struct StdFBShmem_t StdFBShmem_t
;
131 // version for IOFBCreateSharedCursor
132 kIOFBCurrentShmemVersion
= 2,
133 // memory types for IOConnectMapMemory.
134 // 0..n are apertures
135 kIOFBCursorMemory
= 100,
136 kIOFBVRAMMemory
= 110
139 #define IOFRAMEBUFFER_CONFORMSTO "IOFramebuffer"
145 #endif /* ! _IOKIT_IOFRAMEBUFFERSHARED_H */