Root/
Source at commit 1129 created 12 years 11 months ago. By meklort, Change options.o so that it reloads the system config as well. Also change it so that it uses that config for variables (NOTE: if the calue exists in chameleonConfig, it's used instead. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 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 _IOACCEL_SURFACE_CONNECT_H␊ |
24 | #define _IOACCEL_SURFACE_CONNECT_H␊ |
25 | ␊ |
26 | #include <IOKit/graphics/IOAccelTypes.h>␊ |
27 | #include <IOKit/graphics/IOAccelClientConnect.h>␊ |
28 | ␊ |
29 | /*␊ |
30 | ** Surface visible region in device coordinates.␊ |
31 | **␊ |
32 | ** num_rects: The number of rectangles in the rect array. If num_rects␊ |
33 | ** is zero the bounds rectangle is used for the visible rectangle.␊ |
34 | ** If num_rects is zero the surface must be completely contained␊ |
35 | ** by the device.␊ |
36 | **␊ |
37 | ** bounds: The unclipped surface rectangle in device coords. Extends␊ |
38 | ** beyond the device bounds if the surface is not totally on␊ |
39 | ** the device.␊ |
40 | **␊ |
41 | ** rect[]: An array of visible rectangles in device coords. If num_rects␊ |
42 | ** is non-zero only the region described by these rectangles is␊ |
43 | ** copied to the frame buffer during a flush operation.␊ |
44 | */␊ |
45 | typedef struct␊ |
46 | {␊ |
47 | UInt32 num_rects;␊ |
48 | IOAccelBounds bounds;␊ |
49 | IOAccelBounds rect[0];␊ |
50 | } IOAccelDeviceRegion;␊ |
51 | ␊ |
52 | ␊ |
53 | /*␊ |
54 | ** Determine the size of a region.␊ |
55 | */␊ |
56 | #define IOACCEL_SIZEOF_DEVICE_REGION(_rgn_) (sizeof(IOAccelDeviceRegion) + (_rgn_)->num_rects * sizeof(IOAccelBounds))␊ |
57 | ␊ |
58 | ␊ |
59 | /*␊ |
60 | ** Surface client public memory types. Private memory types start with␊ |
61 | ** kIOAccelNumSurfaceMemoryTypes.␊ |
62 | */␊ |
63 | enum eIOAccelSurfaceMemoryTypes {␊ |
64 | kIOAccelNumSurfaceMemoryTypes␊ |
65 | };␊ |
66 | ␊ |
67 | ␊ |
68 | /*␊ |
69 | ** Surface client public methods. Private methods start with␊ |
70 | ** kIOAccelNumSurfaceMethods.␊ |
71 | */␊ |
72 | enum eIOAccelSurfaceMethods {␊ |
73 | kIOAccelSurfaceReadLockOptions,␊ |
74 | kIOAccelSurfaceReadUnlockOptions,␊ |
75 | kIOAccelSurfaceGetState,␊ |
76 | kIOAccelSurfaceWriteLockOptions,␊ |
77 | kIOAccelSurfaceWriteUnlockOptions,␊ |
78 | kIOAccelSurfaceRead,␊ |
79 | kIOAccelSurfaceSetShapeBacking,␊ |
80 | ␊ |
81 | kIOAccelSurfaceSetIDMode,␊ |
82 | kIOAccelSurfaceSetScale,␊ |
83 | ␊ |
84 | kIOAccelSurfaceSetShape,␊ |
85 | kIOAccelSurfaceFlush,␊ |
86 | ␊ |
87 | kIOAccelSurfaceQueryLock,␊ |
88 | ␊ |
89 | kIOAccelSurfaceReadLock,␊ |
90 | kIOAccelSurfaceReadUnlock,␊ |
91 | kIOAccelSurfaceWriteLock,␊ |
92 | kIOAccelSurfaceWriteUnlock,␊ |
93 | ␊ |
94 | kIOAccelSurfaceControl,␊ |
95 | kIOAccelSurfaceSetShapeBackingAndLength,␊ |
96 | ␊ |
97 | kIOAccelNumSurfaceMethods␊ |
98 | };␊ |
99 | ␊ |
100 | ␊ |
101 | /*␊ |
102 | ** Option bits for IOAccelCreateSurface and the kIOAccelSurfaceSetIDMode method.␊ |
103 | ** The color depth field can take any value of the _CGSDepth enumeration.␊ |
104 | */␊ |
105 | typedef enum {␊ |
106 | kIOAccelSurfaceModeColorDepth1555 = 0x00000003, ␊ |
107 | kIOAccelSurfaceModeColorDepth8888 = 0x00000004, ␊ |
108 | // kIOAccelSurfaceModeColorDepthRGB565 = 0x00000005, ␊ |
109 | kIOAccelSurfaceModeColorDepthYUV = 0x00000006,␊ |
110 | kIOAccelSurfaceModeColorDepthYUV9 = 0x00000007,␊ |
111 | kIOAccelSurfaceModeColorDepthYUV12 = 0x00000008,␊ |
112 | kIOAccelSurfaceModeColorDepthYUV2 = 0x00000009,␊ |
113 | kIOAccelSurfaceModeColorDepthBGRA32 = 0x0000000A,␊ |
114 | ␊ |
115 | // kIOAccelSurfaceModeColorDepthRGBA64 = 0x0000000B,␊ |
116 | // kIOAccelSurfaceModeColorDepthRGBAFloat64 = 0x0000000C,␊ |
117 | // kIOAccelSurfaceModeColorDepthRGBAFloat128 = 0x0000000D,␊ |
118 | ␊ |
119 | // kIOAccelSurfaceModeColorDepthYUV420 = 0x0000000E,␊ |
120 | kIOAccelSurfaceModeColorDepth2101010 = 0x0000000F,␊ |
121 | ␊ |
122 | kIOAccelSurfaceModeColorDepthBits = 0x0000000F,␊ |
123 | ␊ |
124 | kIOAccelSurfaceModeStereoBit = 0x00000010,␊ |
125 | kIOAccelSurfaceModeWindowedBit = 0x00000020,␊ |
126 | ␊ |
127 | kIOAccelSurfaceModeBeamSync = 0x00008000␊ |
128 | } eIOAccelSurfaceModeBits;␊ |
129 | ␊ |
130 | ␊ |
131 | /*␊ |
132 | ** Options bits for IOAccelSetSurfaceShape and the kIOAccelSurfaceSetShape method.␊ |
133 | */␊ |
134 | typedef enum {␊ |
135 | kIOAccelSurfaceShapeNone = 0x00000000,␊ |
136 | kIOAccelSurfaceShapeNonBlockingBit = 0x00000001,␊ |
137 | kIOAccelSurfaceShapeNonSimpleBit = 0x00000002,␊ |
138 | kIOAccelSurfaceShapeIdentityScaleBit = 0x00000004,␊ |
139 | kIOAccelSurfaceShapeFrameSyncBit = 0x00000008,␊ |
140 | kIOAccelSurfaceShapeBeamSyncBit = 0x00000010,␊ |
141 | kIOAccelSurfaceShapeStaleBackingBit = 0x00000020,␊ |
142 | kIOAccelSurfaceShapeAssemblyBit = 0x00000040,␊ |
143 | kIOAccelSurfaceShapeWaitEnabledBit = 0x00000080,␊ |
144 | ␊ |
145 | /* wrong name, use kIOAccelSurfaceShapeNonBlockingBit */␊ |
146 | kIOAccelSurfaceShapeBlockingBit = kIOAccelSurfaceShapeNonBlockingBit␊ |
147 | } eIOAccelSurfaceShapeBits;␊ |
148 | ␊ |
149 | /*␊ |
150 | ** Return bits for the kIOAccelSurfaceGetState method.␊ |
151 | */␊ |
152 | typedef enum {␊ |
153 | kIOAccelSurfaceStateNone = 0x00000000,␊ |
154 | kIOAccelSurfaceStateIdleBit = 0x00000001␊ |
155 | } eIOAccelSurfaceStateBits;␊ |
156 | ␊ |
157 | /*␊ |
158 | ** Option bits for the kIOAccelSurfaceSetScale method.␊ |
159 | */␊ |
160 | typedef enum {␊ |
161 | kIOAccelSurfaceBeamSyncSwaps = 0x00000001,␊ |
162 | kIOAccelSurfaceFixedSource = 0x00000002,␊ |
163 | ␊ |
164 | kIOAccelSurfaceFiltering = 0x000000f0,␊ |
165 | kIOAccelSurfaceFilterDefault = 0x00000000,␊ |
166 | kIOAccelSurfaceFilterNone = 0x00000010,␊ |
167 | kIOAccelSurfaceFilterLinear = 0x00000020␊ |
168 | ␊ |
169 | } eIOAccelSurfaceScaleBits;␊ |
170 | ␊ |
171 | /*␊ |
172 | ** Option bits for the kIOAccelSurfaceLock methods.␊ |
173 | */␊ |
174 | typedef enum {␊ |
175 | kIOAccelSurfaceLockInBacking = 0,␊ |
176 | kIOAccelSurfaceLockInAccel = 1,␊ |
177 | kIOAccelSurfaceLockInDontCare = 2,␊ |
178 | kIOAccelSurfaceLockInMask = 0x00000003␊ |
179 | } eIOAccelSurfaceLockBits;␊ |
180 | ␊ |
181 | #endif /* _IOACCEL_SURFACE_CONNECT_H */␊ |
182 | ␊ |
183 |