2 * Copyright (c) 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@
23 #ifndef _IOACCEL_SURFACE_CONNECT_H
24 #define _IOACCEL_SURFACE_CONNECT_H
26 #include <IOKit/graphics/IOAccelTypes.h>
27 #include <IOKit/graphics/IOAccelClientConnect.h>
31 ** Surface visible region in device coordinates.
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
38 ** bounds: The unclipped surface rectangle in device coords. Extends
39 ** beyond the device bounds if the surface is not totally on
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.
50 IOAccelBounds rect
[0];
51 } IOAccelDeviceRegion
;
55 ** Determine the size of a region.
57 #define IOACCEL_SIZEOF_DEVICE_REGION(_rgn_) (sizeof(IOAccelDeviceRegion) + (_rgn_)->num_rects * sizeof(IOAccelBounds))
61 ** Surface client public memory types. Private memory types start with
62 ** kIOAccelNumSurfaceMemoryTypes.
64 enum eIOAccelSurfaceMemoryTypes
{
65 kIOAccelNumSurfaceMemoryTypes
,
70 ** Surface client public methods. Private methods start with
71 ** kIOAccelNumSurfaceMethods.
73 enum eIOAccelSurfaceMethods
{
74 kIOAccelSurfaceSetIDMode
,
75 kIOAccelSurfaceSetShape
,
76 kIOAccelSurfaceGetState
,
78 kIOAccelSurfaceUnlock
,
81 kIOAccelNumSurfaceMethods
,
86 ** Option bits for IOAccelCreateSurface and the kIOAccelSurfaceSetIDMode method.
87 ** The color depth field can take any value of the _CGSDepth enumeration.
90 kIOAccelSurfaceModeColorDepthBits
= 0x0000000F,
91 } eIOAccelSurfaceModeBits
;
95 ** Options bits for IOAccelSetSurfaceShape and the kIOAccelSurfaceSetShape method.
98 kIOAccelSurfaceShapeNone
= 0x00000000,
99 kIOAccelSurfaceShapeBlockingBit
= 0x00000001,
100 kIOAccelSurfaceShapeNonSimpleBit
= 0x00000002,
101 } eIOAccelSurfaceShapeBits
;
105 ** Return bits for the kIOAccelSurfaceGetState method.
108 kIOAccelSurfaceStateNone
= 0x00000000,
109 kIOAccelSurfaceStateIdleBit
= 0x00000001,
110 } eIOAccelSurfaceStateBits
;
113 #endif /* _IOACCEL_SURFACE_CONNECT_H */