Mac OS 9
VideoServices.h
Go to the documentation of this file.
1 
19 #ifndef __VIDEOSERVICES__
20 #define __VIDEOSERVICES__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __NAMEREGISTRY__
27 #include <NameRegistry.h>
28 #endif
29 
30 #ifndef __QUICKDRAW__
31 #include <Quickdraw.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
55  enum
56  {
57  kTransparentEncoding = 0,
58  kInvertingEncoding = 1
59  };
60 
61  enum
62  {
63  kTransparentEncodingShift = (kTransparentEncoding << 1),
64  kTransparentEncodedPixel = (0x01 << kTransparentEncodingShift),
65  kInvertingEncodingShift = (kInvertingEncoding << 1),
66  kInvertingEncodedPixel = (0x01 << kInvertingEncodingShift)
67  };
68 
69  enum
70  {
71  kHardwareCursorDescriptorMajorVersion = 0x0001,
72  kHardwareCursorDescriptorMinorVersion = 0x0000
73  };
74 
75  typedef UInt32 *UInt32Ptr;
77  {
78  UInt16 majorVersion;
79  UInt16 minorVersion;
80  UInt32 height;
81  UInt32 width;
82  UInt32 bitDepth;
83  UInt32 maskBitDepth;
84  UInt32 numColors;
85  UInt32Ptr colorEncodings;
86  UInt32 flags;
87  UInt32 supportedSpecialEncodings;
88  UInt32 specialEncodings[16];
89  };
92  enum
93  {
94  kHardwareCursorInfoMajorVersion = 0x0001,
95  kHardwareCursorInfoMinorVersion = 0x0000
96  };
97 
99  {
100  UInt16 majorVersion; /* Test tool should check for
101  kHardwareCursorInfoMajorVersion1*/
102  UInt16 minorVersion; /* Test tool should check for
103  kHardwareCursorInfoMinorVersion1*/
104  UInt32 cursorHeight;
105  UInt32 cursorWidth;
106  CTabPtr colorMap; /* nil or big enough for hardware's max colors*/
107  Ptr hardwareCursor;
108  UInt32 reserved[6]; /* Test tool should check for 0s*/
109  };
112 
113  enum
114  {
115  kVBLInterruptServiceType = FOUR_CHAR_CODE('vbl '),
116  kHBLInterruptServiceType = FOUR_CHAR_CODE('hbl '),
117  kFrameInterruptServiceType = FOUR_CHAR_CODE('fram'),
118  kConnectInterruptServiceType =
119  FOUR_CHAR_CODE('dci '), /* Renamed -- Use kFBCheckInterruptServiceType*/
120  kFBConnectInterruptServiceType =
121  kConnectInterruptServiceType, /* Demand to check configuration (Hardware
122  unchanged)*/
123  kFBChangedInterruptServiceType =
124  FOUR_CHAR_CODE('chng'), /* Demand to rebuild (Hardware has reinitialized
125  on dependent change)*/
126  kFBOfflineInterruptServiceType = FOUR_CHAR_CODE(
127  'remv'), /* Demand to remove framebuffer (Hardware not available on
128  dependent change -- but must not buserror)*/
129  kFBOnlineInterruptServiceType = FOUR_CHAR_CODE(
130  'add ') /* Notice that hardware is available (after being removed)*/
131  };
132 
133  enum
134  {
135  kMaxDisplayConfigDataSize =
136  64 /* Max data size for VSLSetDisplayConfiguration*/
137  };
138 
139  typedef ResType InterruptServiceType;
140  typedef UInt32 InterruptServiceIDType;
141  typedef InterruptServiceIDType *InterruptServiceIDPtr;
142 #if CALL_NOT_IN_CARBON
151  OSErr
153  InterruptServiceType serviceType,
154  InterruptServiceIDPtr serviceID);
155 
164  OSErr
165  VSLWaitOnInterruptService(InterruptServiceIDType serviceID, Duration timeout);
166 
175  OSErr
176  VSLDisposeInterruptService(InterruptServiceIDType serviceID);
177 
186  OSErr
187  VSLDoInterruptService(InterruptServiceIDType serviceID);
188 
197  Boolean
199  void *cursorRef, HardwareCursorDescriptorPtr hardwareDescriptor,
200  HardwareCursorInfoPtr hwCursorInfo);
201 
210  OSErr
211  VSLSetDisplayConfiguration(RegEntryID *device, RegPropertyName *propertyName,
212  void *configData, long configDataSize);
213 
214 #endif /* CALL_NOT_IN_CARBON */
215 
216 #if PRAGMA_STRUCT_ALIGN
217 #pragma options align = reset
218 #elif PRAGMA_STRUCT_PACKPUSH
219 #pragma pack(pop)
220 #elif PRAGMA_STRUCT_PACK
221 #pragma pack()
222 #endif
223 
224 #ifdef PRAGMA_IMPORT_OFF
225 #pragma import off
226 #elif PRAGMA_IMPORT
227 #pragma import reset
228 #endif
229 
230 #ifdef __cplusplus
231 }
232 #endif
233 
234 #endif /* __VIDEOSERVICES__ */
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
NameRegistry Interfaces.
Interface to Quickdraw Graphics.
OSErr VSLWaitOnInterruptService(InterruptServiceIDType serviceID, Duration timeout)
OSErr VSLDoInterruptService(InterruptServiceIDType serviceID)
OSErr VSLNewInterruptService(RegEntryID *serviceDevice, InterruptServiceType serviceType, InterruptServiceIDPtr serviceID)
OSErr VSLSetDisplayConfiguration(RegEntryID *device, RegPropertyName *propertyName, void *configData, long configDataSize)
Boolean VSLPrepareCursorForHardwareCursor(void *cursorRef, HardwareCursorDescriptorPtr hardwareDescriptor, HardwareCursorInfoPtr hwCursorInfo)
OSErr VSLDisposeInterruptService(InterruptServiceIDType serviceID)
Definition: Quickdraw.h:1968
Definition: VideoServices.h:77
Definition: VideoServices.h:99
Definition: NameRegistry.h:62