Chameleon

Chameleon Svn Source Tree

Root/branches/Chimera/i386/include/IOKit/graphics/IOGraphicsInterfaceTypes.h

1/*
2 * Copyright (c) 1999-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
23#ifndef _IOKIT_IOGRAPHICSINTERFACETYPES_H
24#define _IOKIT_IOGRAPHICSINTERFACETYPES_H
25
26#include <IOKit/graphics/IOAccelSurfaceConnect.h>
27
28#define IO_FOUR_CHAR_CODE(x) (x)
29
30typedef UInt32 IOFourCharCode;
31
32/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
33
34#define kCurrentGraphicsInterfaceVersion 1
35#define kCurrentGraphicsInterfaceRevision 2
36
37
38#ifdef IOGA_COMPAT
39typedef SInt32 IOBlitCompletionToken;
40#endif
41
42typedef UInt32 IOBlitType;
43enum {
44 kIOBlitTypeVerbMask = 0x000000ff,
45 kIOBlitTypeRects = 0,
46 kIOBlitTypeCopyRects,
47 kIOBlitTypeLines,
48 kIOBlitTypeScanlines,
49 kIOBlitTypeCopyRegion,
50
51 kIOBlitTypeMoveCursor,
52 kIOBlitTypeShowCursor,
53 kIOBlitTypeHideCursor,
54
55 kIOBlitTypeMonoExpand = 0x00000100,
56 kIOBlitTypeColorSpaceConvert = 0x00000200,
57 kIOBlitTypeScale = 0x00000400,
58
59 kIOBlitTypeSourceKeyColorModeMask = 0x00003000,
60 kIOBlitTypeDestKeyColorModeMask = 0x0000c000,
61 kIOBlitTypeSourceKeyColorEqual = 0x00001000,
62 kIOBlitTypeSourceKeyColorNotEqual = 0x00002000,
63 kIOBlitTypeDestKeyColorEqual = 0x00004000,
64 kIOBlitTypeDestKeyColorNotEqual = 0x00008000,
65
66 kIOBlitTypeOperationMask = 0x0fff0000,
67 kIOBlitTypeOperationShift = 16,
68 kIOBlitTypeOperationTypeMask = 0x0f000000,
69
70 kIOBlitTypeOperationType0 = 0x00000000,
71 kIOBlitCopyOperation = 0x00000000 | kIOBlitTypeOperationType0,
72 kIOBlitOrOperation = 0x00010000 | kIOBlitTypeOperationType0,
73 kIOBlitXorOperation = 0x00020000 | kIOBlitTypeOperationType0,
74 kIOBlitBlendOperation = 0x00030000 | kIOBlitTypeOperationType0,
75 kIOBlitHighlightOperation = 0x00040000 | kIOBlitTypeOperationType0
76};
77
78typedef UInt32 IOBlitSourceType;
79enum {
80 kIOBlitSourceDefault = 0x00000000,
81 kIOBlitSourceFramebuffer = 0x00001000,
82 kIOBlitSourceMemory = 0x00002000,
83 kIOBlitSourceOOLMemory = 0x00003000,
84 kIOBlitSourcePattern = 0x00004000,
85 kIOBlitSourceOOLPattern = 0x00005000,
86 kIOBlitSourceSolid = 0x00006000,
87 kIOBlitSourceCGSSurface = 0x00007000,
88 kIOBlitSourceIsSame = 0x80000000
89};
90
91#ifdef IOGA_COMPAT
92typedef IOBlitSourceType IOBlitSourceDestType;
93enum {
94 kIOBlitDestFramebuffer = 0x00000001
95};
96#endif
97
98typedef struct IOBlitOperationStruct {
99 UInt32 color0;
100 UInt32 color1;
101 SInt32 offsetX;
102 SInt32 offsetY;
103 UInt32 sourceKeyColor;
104 UInt32 destKeyColor;
105 UInt32 specific[16];
106} IOBlitOperation;
107
108typedef struct IOBlitRectangleStruct {
109 SInt32 x;
110 SInt32 y;
111 SInt32 width;
112 SInt32 height;
113} IOBlitRectangle;
114
115typedef struct IOBlitRectanglesStruct {
116 IOBlitOperation operation;
117 IOItemCount count;
118 IOBlitRectangle rects[1];
119} IOBlitRectangles;
120
121typedef struct IOBlitCopyRectangleStruct {
122 SInt32 sourceX;
123 SInt32 sourceY;
124 SInt32 x;
125 SInt32 y;
126 SInt32 width;
127 SInt32 height;
128} IOBlitCopyRectangle;
129
130typedef struct IOBlitCopyRectanglesStruct {
131 IOBlitOperation operation;
132 IOItemCount count;
133 IOBlitCopyRectangle rects[1];
134} IOBlitCopyRectangles;
135
136
137typedef struct IOBlitCopyRegionStruct {
138 IOBlitOperation operation;
139 SInt32 deltaX;
140 SInt32 deltaY;
141 IOAccelDeviceRegion * region;
142} IOBlitCopyRegion;
143
144
145typedef struct IOBlitVertexStruct {
146 SInt32 x;
147 SInt32 y;
148} IOBlitVertex;
149
150typedef struct IOBlitVerticesStruct {
151 IOBlitOperation operation;
152 IOItemCount count;
153 IOBlitVertex vertices[2];
154} IOBlitVertices;
155
156typedef struct IOBlitScanlinesStruct {
157 IOBlitOperation operation;
158 IOItemCount count;
159 SInt32 y;
160 SInt32 height;
161 SInt32 x[2];
162} IOBlitScanlines;
163
164
165typedef struct IOBlitCursorStruct {
166 IOBlitOperation operation;
167 IOBlitRectangle rect;
168} IOBlitCursor;
169
170typedef struct _IOBlitMemory * IOBlitMemoryRef;
171
172
173/* Quickdraw.h pixel formats*/
174
175enum {
176 kIO1MonochromePixelFormat = 0x00000001, /* 1 bit indexed*/
177 kIO2IndexedPixelFormat = 0x00000002, /* 2 bit indexed*/
178 kIO4IndexedPixelFormat = 0x00000004, /* 4 bit indexed*/
179 kIO8IndexedPixelFormat = 0x00000008, /* 8 bit indexed*/
180 kIO16BE555PixelFormat = 0x00000010, /* 16 bit BE rgb 555 (Mac)*/
181 kIO24RGBPixelFormat = 0x00000018, /* 24 bit rgb */
182 kIO32ARGBPixelFormat = 0x00000020, /* 32 bit argb (Mac)*/
183 kIO1IndexedGrayPixelFormat = 0x00000021, /* 1 bit indexed gray*/
184 kIO2IndexedGrayPixelFormat = 0x00000022, /* 2 bit indexed gray*/
185 kIO4IndexedGrayPixelFormat = 0x00000024, /* 4 bit indexed gray*/
186 kIO8IndexedGrayPixelFormat = 0x00000028 /* 8 bit indexed gray*/
187};
188
189enum {
190 kIO16LE555PixelFormat = IO_FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/
191 kIO16LE5551PixelFormat = IO_FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/
192 kIO16BE565PixelFormat = IO_FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/
193 kIO16LE565PixelFormat = IO_FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/
194 kIO24BGRPixelFormat = IO_FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */
195 kIO32BGRAPixelFormat = IO_FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/
196 kIO32ABGRPixelFormat = IO_FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */
197 kIO32RGBAPixelFormat = IO_FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */
198 kIOYUVSPixelFormat = IO_FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
199 kIOYUVUPixelFormat = IO_FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/
200 kIOYVU9PixelFormat = IO_FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/
201 kIOYUV411PixelFormat = IO_FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/
202 kIOYVYU422PixelFormat = IO_FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/
203 kIOUYVY422PixelFormat = IO_FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/
204 kIOYUV211PixelFormat = IO_FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/
205 kIO2vuyPixelFormat = IO_FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/
206};
207
208/* Non Quickdraw.h pixel formats*/
209enum {
210 kIO16LE4444PixelFormat = IO_FOUR_CHAR_CODE('L444'), /* 16 bit LE argb 4444*/
211 kIO16BE4444PixelFormat = IO_FOUR_CHAR_CODE('B444'), /* 16 bit BE argb 4444*/
212 kIO64BGRAPixelFormat = IO_FOUR_CHAR_CODE('B16I'), /* 64 bit bgra */
213 kIO64RGBAFloatPixelFormat = IO_FOUR_CHAR_CODE('B16F'), /* 64 bit rgba */
214 kIO128RGBAFloatPixelFormat = IO_FOUR_CHAR_CODE('B32F') /* 128 bit rgba float */
215};
216
217enum {
218 kIOBlitMemoryRequiresHostFlush = 0x00000001
219};
220
221typedef struct IOBlitSurfaceStruct {
222 union {
223 UInt8 * bytes;
224 IOBlitMemoryRef ref;
225 } memory;
226 IOFourCharCode pixelFormat;
227 IOBlitRectangle size;
228 UInt32 rowBytes;
229 UInt32 byteOffset;
230 UInt32 * palette;
231 IOOptionBits accessFlags;
232 IOBlitMemoryRef interfaceRef;
233 UInt32 more[14];
234} IOBlitSurface;
235
236typedef IOBlitSurface IOBlitMemory;
237
238
239/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
240
241enum {
242 // options for Synchronize
243 kIOBlitSynchronizeWaitBeamExit = 0x00000001,
244 kIOBlitSynchronizeFlushHostWrites = 0x00000002
245};
246
247enum {
248 // options for WaitComplete & Flush
249 kIOBlitWaitContext = 0x00000000,
250 kIOBlitWaitAll2D = 0x00000001,
251 kIOBlitWaitGlobal = 0x00000001,
252 kIOBlitWaitAll = 0x00000002,
253 kIOBlitWaitCheck = 0x00000080,
254 kIOBlitFlushWithSwap = 0x00010000
255};
256
257enum {
258 // options for AllocateSurface
259 kIOBlitHasCGSSurface = 0x00000001,
260 kIOBlitFixedSource = 0x00000002,
261 kIOBlitBeamSyncSwaps = 0x00000004,
262 kIOBlitReferenceSource = 0x00000008
263};
264
265enum {
266 // options for UnlockSurface
267 kIOBlitUnlockWithSwap = 0x80000000
268};
269
270enum {
271 // options for SetDestination
272 kIOBlitFramebufferDestination = 0x00000000,
273 kIOBlitSurfaceDestination = 0x00000001
274};
275
276
277
278enum {
279 // options for blit procs
280 kIOBlitBeamSync = 0x00000001,
281 kIOBlitBeamSyncAlways = 0x00000002,
282 kIOBlitBeamSyncSpin = 0x00000004,
283
284 kIOBlitAllOptions = 0xffffffff
285};
286
287enum {
288 // capabilities
289 kIOBlitColorSpaceTypes = IO_FOUR_CHAR_CODE('cspc')
290};
291
292
293// keys for IOAccelFindAccelerator()
294#define kIOAccelTypesKey "IOAccelTypes"
295#define kIOAccelIndexKey "IOAccelIndex"
296
297#define kIOAccelRevisionKey "IOAccelRevision"
298
299/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
300
301#endif /* !_IOKIT_IOGRAPHICSINTERFACETYPES_H */
302

Archive Download this file

Revision: 2225