]>
Commit | Line | Data |
---|---|---|
1c79356b A |
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 | /* | |
31 | ** Surface visible region in device coordinates. | |
32 | ** | |
33 | ** num_rects: The number of rectangles in the rect array. If num_rects | |
34 | ** is zero the bounds rectangle is used for the visible rectangle. | |
35 | ** If num_rects is zero the surface must be completely contained | |
36 | ** by the device. | |
37 | ** | |
38 | ** bounds: The unclipped surface rectangle in device coords. Extends | |
39 | ** beyond the device bounds if the surface is not totally on | |
40 | ** the device. | |
41 | ** | |
42 | ** rect[]: An array of visible rectangles in device coords. If num_rects | |
43 | ** is non-zero only the region described by these rectangles is | |
44 | ** copied to the frame buffer during a flush operation. | |
45 | */ | |
46 | typedef struct | |
47 | { | |
48 | UInt32 num_rects; | |
49 | IOAccelBounds bounds; | |
50 | IOAccelBounds rect[0]; | |
51 | } IOAccelDeviceRegion; | |
52 | ||
53 | ||
54 | /* | |
55 | ** Determine the size of a region. | |
56 | */ | |
57 | #define IOACCEL_SIZEOF_DEVICE_REGION(_rgn_) (sizeof(IOAccelDeviceRegion) + (_rgn_)->num_rects * sizeof(IOAccelBounds)) | |
58 | ||
59 | ||
60 | /* | |
61 | ** Surface client public memory types. Private memory types start with | |
62 | ** kIOAccelNumSurfaceMemoryTypes. | |
63 | */ | |
64 | enum eIOAccelSurfaceMemoryTypes { | |
65 | kIOAccelNumSurfaceMemoryTypes, | |
66 | }; | |
67 | ||
68 | ||
69 | /* | |
70 | ** Surface client public methods. Private methods start with | |
71 | ** kIOAccelNumSurfaceMethods. | |
72 | */ | |
73 | enum eIOAccelSurfaceMethods { | |
74 | kIOAccelSurfaceSetIDMode, | |
75 | kIOAccelSurfaceSetShape, | |
76 | kIOAccelSurfaceGetState, | |
77 | kIOAccelSurfaceLock, | |
78 | kIOAccelSurfaceUnlock, | |
79 | kIOAccelSurfaceRead, | |
80 | kIOAccelSurfaceFlush, | |
81 | kIOAccelNumSurfaceMethods, | |
82 | }; | |
83 | ||
84 | ||
85 | /* | |
86 | ** Option bits for IOAccelCreateSurface and the kIOAccelSurfaceSetIDMode method. | |
87 | ** The color depth field can take any value of the _CGSDepth enumeration. | |
88 | */ | |
89 | typedef enum { | |
90 | kIOAccelSurfaceModeColorDepthBits = 0x0000000F, | |
91 | } eIOAccelSurfaceModeBits; | |
92 | ||
93 | ||
94 | /* | |
95 | ** Options bits for IOAccelSetSurfaceShape and the kIOAccelSurfaceSetShape method. | |
96 | */ | |
97 | typedef enum { | |
98 | kIOAccelSurfaceShapeNone = 0x00000000, | |
99 | kIOAccelSurfaceShapeBlockingBit = 0x00000001, | |
100 | kIOAccelSurfaceShapeNonSimpleBit = 0x00000002, | |
101 | } eIOAccelSurfaceShapeBits; | |
102 | ||
103 | ||
104 | /* | |
105 | ** Return bits for the kIOAccelSurfaceGetState method. | |
106 | */ | |
107 | typedef enum { | |
108 | kIOAccelSurfaceStateNone = 0x00000000, | |
109 | kIOAccelSurfaceStateIdleBit = 0x00000001, | |
110 | } eIOAccelSurfaceStateBits; | |
111 | ||
112 | ||
113 | #endif /* _IOACCEL_SURFACE_CONNECT_H */ | |
114 |