Mac OS 9
Video.h
Go to the documentation of this file.
1 
19 #ifndef __VIDEO__
20 #define __VIDEO__
21 
22 #ifndef __NAMEREGISTRY__
23 #include <NameRegistry.h>
24 #endif
25 
26 #ifndef __QUICKDRAW__
27 #include <Quickdraw.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #if PRAGMA_IMPORT
39 #pragma import on
40 #endif
41 
42 #if PRAGMA_STRUCT_ALIGN
43 #pragma options align = mac68k
44 #elif PRAGMA_STRUCT_PACKPUSH
45 #pragma pack(push, 2)
46 #elif PRAGMA_STRUCT_PACK
47 #pragma pack(2)
48 #endif
49 
50 enum {
51  mBaseOffset = 1, /*Id of mBaseOffset.*/
52  mRowBytes = 2, /*Video sResource parameter Id's */
53  mBounds = 3, /*Video sResource parameter Id's */
54  mVersion = 4, /*Video sResource parameter Id's */
55  mHRes = 5, /*Video sResource parameter Id's */
56  mVRes = 6, /*Video sResource parameter Id's */
57  mPixelType = 7, /*Video sResource parameter Id's */
58  mPixelSize = 8, /*Video sResource parameter Id's */
59  mCmpCount = 9, /*Video sResource parameter Id's */
60  mCmpSize = 10, /*Video sResource parameter Id's */
61  mPlaneBytes = 11, /*Video sResource parameter Id's */
62  mVertRefRate = 14, /*Video sResource parameter Id's */
63  mVidParams = 1, /*Video parameter block id.*/
64  mTable = 2, /*Offset to the table.*/
65  mPageCnt = 3, /*Number of pages*/
66  mDevType = 4, /*Device Type*/
67  oneBitMode = 128, /*Id of OneBitMode Parameter list.*/
68  twoBitMode = 129, /*Id of TwoBitMode Parameter list.*/
69  fourBitMode = 130, /*Id of FourBitMode Parameter list.*/
70  eightBitMode = 131 /*Id of EightBitMode Parameter list.*/
71 };
72 
73 enum {
74  sixteenBitMode = 132, /*Id of SixteenBitMode Parameter list.*/
75  thirtyTwoBitMode = 133, /*Id of ThirtyTwoBitMode Parameter list.*/
76  firstVidMode = 128, /*The new, better way to do the above. */
77  secondVidMode = 129, /* QuickDraw only supports six video */
78  thirdVidMode = 130, /* at this time. */
79  fourthVidMode = 131,
80  fifthVidMode = 132,
81  sixthVidMode = 133,
82  spGammaDir = 64,
83  spVidNamesDir = 65
84 };
85 
86 /* csTimingFormat values in VDTimingInfo */
87 /* look in the declaration rom for timing info */
88 enum {
89  kDeclROMtables = FOUR_CHAR_CODE('decl'),
90  kDetailedTimingFormat =
91  FOUR_CHAR_CODE('arba') /* Timing is a detailed timing*/
92 };
93 
94 /* Size of a block of EDID (Extended Display Identification Data) */
95 enum { kDDCBlockSize = 128 };
96 
97 /* ddcBlockType constants*/
98 enum {
99  kDDCBlockTypeEDID = 0 /* EDID block type. */
100 };
101 
102 /* ddcFlags constants*/
103 enum {
104  kDDCForceReadBit = 0, /* Force a new read of the EDID. */
105  kDDCForceReadMask = (1 << kDDCForceReadBit) /* Mask for kddcForceReadBit. */
106 };
107 
108 /* Timing mode constants for Display Manager MultiMode support
109  Corresponding .h equates are in Video.h
110  .a equates are in Video.a
111  .r equates are in DepVideoEqu.r
112 
113  The second enum is the old names (for compatibility).
114  The first enum is the new names.
115 */
116 enum {
117  timingInvalid = 0, /* Unknown timing� force user to confirm. */
118  timingInvalid_SM_T24 = 8, /* Work around bug in SM Thunder24 card.*/
119  timingApple_FixedRateLCD =
120  42, /* Lump all fixed-rate LCDs into one category.*/
121  timingApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */
122  timingApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */
123  timingApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */
124  timingApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */
125  timingVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */
126  timingVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */
127  timingVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */
128  timingVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */
129  timingGTF_640x480_120hz =
130  159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */
131  timingApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/
132  timingApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/
133  timingApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/
134  timingVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */
135  timingVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */
136  timingVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */
137  timingVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */
138  timingVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */
139  timingVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */
140  timingVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */
141  timingVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very
142  similar to timingApple_1024x768_75hz). */
143  timingVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */
144  timingApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */
145  timingApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */
146  timingAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */
147  timingAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */
148  timingAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */
149  timingAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */
150  timingApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */
151  timingApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */
152  timingApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */
153  timingApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */
154  timingVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */
155  timingVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */
156  timingVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */
157  timingVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */
158  timingVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */
159  timingVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */
160  timingVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */
161  timingVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */
162  timingVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */
163  timingVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock
164  is 189.2 Mhz dot clock). */
165  timingVESA_1600x1200_80hz =
166  288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock)
167  - proposed only. */
168  timingVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock
169  is 229.5 Mhz dot clock). */
170  timingVESA_1792x1344_60hz =
171  296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */
172  timingVESA_1792x1344_75hz =
173  298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */
174  timingVESA_1856x1392_60hz =
175  300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */
176  timingVESA_1856x1392_75hz =
177  302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */
178  timingVESA_1920x1440_60hz =
179  304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */
180  timingVESA_1920x1440_75hz =
181  306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */
182  timingSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9
183  aspect, typical resolution of 1920x1035. */
184  timingFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing,
185  typical resolution of 640x480. */
186  timingSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock
187  is 170.447 Mhz dot clock). */
188  timingSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock
189  is 159.84 Mhz dot clock). */
190  timingSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock
191  is 216.023 Mhz dot clock). */
192  timingSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock
193  is 243.20 Mhz dot clock). */
194  timingApple_0x0_0hz_Offline =
195  550 /* Indicates that this timing will take the display off-line and
196  remove it from the system. */
197 };
198 
199 /* Deprecated timing names.*/
200 enum {
201  timingApple12 = timingApple_512x384_60hz,
202  timingApple12x = timingApple_560x384_60hz,
203  timingApple13 = timingApple_640x480_67hz,
204  timingApple13x = timingApple_640x400_67hz,
205  timingAppleVGA = timingVESA_640x480_60hz,
206  timingApple15 = timingApple_640x870_75hz,
207  timingApple15x = timingApple_640x818_75hz,
208  timingApple16 = timingApple_832x624_75hz,
209  timingAppleSVGA = timingVESA_800x600_56hz,
210  timingApple1Ka = timingVESA_1024x768_60hz,
211  timingApple1Kb = timingVESA_1024x768_70hz,
212  timingApple19 = timingApple_1024x768_75hz,
213  timingApple21 = timingApple_1152x870_75hz,
214  timingSony_1900x1200_74hz = 530, /* 1900x1200 (74 Hz) Sony timing (pixel clock
215  is 236.25 Mhz dot clock). */
216  timingSony_1900x1200_76hz =
217  timingSony_1920x1200_76hz /* 1900x1200 (76 Hz) Sony timing (pixel clock is
218  245.48 Mhz dot clock). */
219 };
220 
221 /* csConnectFlags values in VDDisplayConnectInfo */
222 enum {
223  kAllModesValid = 0, /* All modes not trimmed by primary init are good close
224  enough to try */
225  kAllModesSafe =
226  1, /* All modes not trimmed by primary init are know to be safe */
227  kReportsTagging =
228  2, /* Can detect tagged displays (to identify smart monitors) */
229  kHasDirectConnection = 3, /* True implies that driver can talk directly to
230  device (e.g. serial data link via sense lines) */
231  kIsMonoDev =
232  4, /* Says whether there�s an RGB (0) or Monochrome (1) connection. */
233  kUncertainConnection = 5, /* There may not be a display (no sense lines?). */
234  kTaggingInfoNonStandard =
235  6, /* Set when csConnectTaggedType/csConnectTaggedData are non-standard
236  (i.e., not the Apple CRT sense codes). */
237  kReportsDDCConnection =
238  7, /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you
239  actually found a ddc display). */
240  kHasDDCConnection = 8, /* Card has ddc connect now. */
241  kConnectionInactive =
242  9, /* Set when the connection is NOT currently active (generally used in a
243  multiconnection environment). */
244  kDependentConnection =
245  10, /* Set when some ascpect of THIS connection depends on another (will
246  generally be set in a kModeSimulscan environment). */
247  kBuiltInConnection = 11, /* Set when connection is KNOWN to be built-in (this
248  is not the same as kHasDirectConnection). */
249  kOverrideConnection =
250  12, /* Set when the reported connection is not the true one, but is one
251  that has been forced through a SetConnection call */
252  kFastCheckForDDC =
253  13, /* Set when all 3 are true: 1) sense codes indicate DDC display could
254  be attached 2) attempted fast check 3) DDC failed */
255  kReportsHotPlugging =
256  14 /* Detects and reports hot pluggging on connector (via VSL also implies
257  DDC will be up to date w/o force read) */
258 };
259 
260 /* csDisplayType values in VDDisplayConnectInfo */
261 enum {
262  kUnknownConnect =
263  1, /* Not sure how we�ll use this, but seems like a good idea. */
264  kPanelConnect = 2, /* For use with fixed-in-place LCD panels. */
265  kPanelTFTConnect = 2, /* Alias for kPanelConnect */
266  kFixedModeCRTConnect =
267  3, /* For use with fixed-mode (i.e., very limited range) displays. */
268  kMultiModeCRT1Connect = 4, /* 320x200 maybe, 12" maybe, 13" (default), 16"
269  certain, 19" maybe, 21" maybe */
270  kMultiModeCRT2Connect = 5, /* 320x200 maybe, 12" maybe, 13" certain, 16"
271  (default), 19" certain, 21" maybe */
272  kMultiModeCRT3Connect = 6, /* 320x200 maybe, 12" maybe, 13" certain, 16"
273  certain, 19" default, 21" certain */
274  kMultiModeCRT4Connect = 7, /* Expansion to large multi mode (not yet used) */
275  kModelessConnect = 8, /* Expansion to modeless model (not yet used) */
276  kFullPageConnect =
277  9, /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */
278  kVGAConnect = 10, /* 640x480 VGA default -- question everything else */
279  kNTSCConnect = 11, /* NTSC ST (default), FF, STconv, FFconv */
280  kPALConnect = 12, /* PAL ST (default), FF, STconv, FFconv */
281  kHRConnect = 13, /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in
282  256K case) (these two only) */
283  kPanelFSTNConnect =
284  14, /* For use with fixed-in-place LCD FSTN (aka �Supertwist�) panels */
285  kMonoTwoPageConnect = 15, /* 1152x870 Apple color two-page display */
286  kColorTwoPageConnect = 16, /* 1152x870 Apple B&W two-page display */
287  kColor16Connect = 17, /* 832x624 Apple B&W two-page display */
288  kColor19Connect = 18, /* 1024x768 Apple B&W two-page display */
289  kGenericCRT =
290  19, /* Indicates nothing except that connection is CRT in nature. */
291  kGenericLCD =
292  20, /* Indicates nothing except that connection is LCD in nature. */
293  kDDCConnect = 21, /* DDC connection, always set kHasDDCConnection */
294  kNoConnect =
295  22 /* No display is connected - load sensing or similar level of hardware
296  detection is assumed (used by resident drivers that support hot
297  plugging when nothing is currently connected) */
298 };
299 
300 /* csTimingFlags values in VDTimingInfoRec */
301 enum {
302  kModeValid = 0, /* Says that this mode should NOT be trimmed. */
303  kModeSafe = 1, /* This mode does not need confirmation */
304  kModeDefault = 2, /* This is the default mode for this type of connection */
305  kModeShowNow = 3, /* This mode should always be shown (even though it may
306  require a confirm) */
307  kModeNotResize = 4, /* This mode should not be used to resize the display (eg.
308  mode selects a different connector on card) */
309  kModeRequiresPan =
310  5, /* This mode has more pixels than are actually displayed */
311  kModeInterlaced =
312  6, /* This mode is interlaced (single pixel lines look bad). */
313  kModeShowNever = 7, /* This mode should not be shown in the user interface. */
314  kModeSimulscan = 8, /* Indicates that more than one display connection can be
315  driven from a single framebuffer controller. */
316  kModeNotPreset = 9, /* Indicates that the timing is not a factory preset for
317  the current display (geometry may need correction) */
318  kModeBuiltIn = 10, /* Indicates that the display mode is for the built-in
319  connect only (on multiconnect devices like the PB 3400)
320  Only the driver is quieried */
321  kModeStretched =
322  11, /* Indicates that the display mode will be stretched/distorted to
323  match the display aspect ratio */
324  kModeNotGraphicsQuality =
325  12 /* Indicates that the display mode is not the highest quality (eg.
326  stretching artifacts). Intended as a hint */
327 };
328 
329 /* csDepthFlags in VDVideoParametersInfoRec */
330 enum {
331  kDepthDependent = 0 /* Says that this depth mode may cause dependent changes
332  in other framebuffers (and . */
333 };
334 
335 /* csResolutionFlags bit flags for VDResolutionInfoRec */
336 enum {
337  kResolutionHasMultipleDepthSizes =
338  0 /* Says that this mode has different csHorizontalPixels, csVerticalLines
339  at different depths (usually slightly larger at lower depths) */
340 };
341 
342 enum {
343  /* Power Mode constants for VDPowerStateRec.powerState. Note the numeric
344  order does not match the power state order */
345  kAVPowerOff = 0,
346  kAVPowerStandby = 1,
347  kAVPowerSuspend = 2,
348  kAVPowerOn = 3,
349  kHardwareSleep = 128,
350  kHardwareWake = 129,
351  kHardwareWakeFromSuspend = 130,
352  kHardwareWakeToDoze = 131,
353  kHardwareWakeToDozeFromSuspend = 132,
354  kHardwarePark = 133,
355  kHardwareDrive = 134
356 };
357 
358 enum {
359  /* Power Mode masks and bits for VDPowerStateRec.powerFlags. */
360  kPowerStateNeedsRefresh =
361  0, /* When leaving this power mode, a display will need refreshing */
362  kPowerStateSleepAwareBit =
363  1, /* if gestaltPCCardDockingSelectorFix, Docking mgr checks this bit
364  before checking kPowerStateSleepAllowedBit */
365  kPowerStateSleepForbiddenBit = 2, /* if kPowerStateSleepAwareBit, Docking mgr
366  checks this bit before sleeping */
367  kPowerStateSleepCanPowerOffBit =
368  3, /* supports power down sleep (ie PCI power off)*/
369  kPowerStateSleepNoDPMSBit =
370  4, /* Bug #2425210. Do not use DPMS with this display.*/
371  kPowerStateSleepWaketoDozeBit = 5, /* Supports Wake to Doze */
372  kPowerStateNeedsRefreshMask = (1L << kPowerStateNeedsRefresh),
373  kPowerStateSleepAwareMask = (1L << kPowerStateSleepAwareBit),
374  kPowerStateSleepForbiddenMask = (1L << kPowerStateSleepForbiddenBit),
375  kPowerStateSleepCanPowerOffMask = (1L << kPowerStateSleepCanPowerOffBit),
376  kPowerStateSleepNoDPMSMask = (1L << kPowerStateSleepNoDPMSBit),
377  kPowerStateSleepWaketoDozeMask = (1L << kPowerStateSleepWaketoDozeBit)
378 };
379 
380 enum {
381  /* Control Codes */
382  cscReset = 0,
383  cscKillIO = 1,
384  cscSetMode = 2,
385  cscSetEntries = 3,
386  cscSetGamma = 4,
387  cscGrayPage = 5,
388  cscGrayScreen = 5,
389  cscSetGray = 6,
390  cscSetInterrupt = 7,
391  cscDirectSetEntries = 8,
392  cscSetDefaultMode = 9,
393  cscSwitchMode = 10, /* Takes a VDSwitchInfoPtr */
394  cscSetSync = 11, /* Takes a VDSyncInfoPtr */
395  cscSavePreferredConfiguration = 16, /* Takes a VDSwitchInfoPtr */
396  cscSetHardwareCursor = 22, /* Takes a VDSetHardwareCursorPtr */
397  cscDrawHardwareCursor = 23, /* Takes a VDDrawHardwareCursorPtr */
398  cscSetConvolution = 24, /* Takes a VDConvolutionInfoPtr */
399  cscSetPowerState = 25, /* Takes a VDPowerStatePtr */
400  cscPrivateControlCall = 26, /* Takes a VDPrivateSelectorDataPtr */
401  cscSetMultiConnect = 28, /* Takes a VDMultiConnectInfoPtr */
402  cscSetClutBehavior = 29, /* Takes a VDClutBehavior */
403  cscSetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */
404  cscDoCommunication = 33, /* Takes a VDCommunicationPtr */
405  cscProbeConnection =
406  34, /* Takes nil pointer (may generate a kFBConnectInterruptServiceType
407  service interrupt)*/
408  cscSetScaler = 36, /* Takes a VDScalerPtr*/
409  cscSetMirror = 37, /* Takes a VDMirrorPtr*/
410  cscUnusedCall = 127 /* This call used to expend the scrn resource. Its
411  imbedded data contains more control info */
412 };
413 
414 enum {
415  /* Status Codes */
416  cscGetMode = 2,
417  cscGetEntries = 3,
418  cscGetPageCnt = 4,
419  cscGetPages = 4, /* This is what C&D 2 calls it. */
420  cscGetPageBase = 5,
421  cscGetBaseAddr = 5, /* This is what C&D 2 calls it. */
422  cscGetGray = 6,
423  cscGetInterrupt = 7,
424  cscGetGamma = 8,
425  cscGetDefaultMode = 9,
426  cscGetCurMode = 10, /* Takes a VDSwitchInfoPtr */
427  cscGetSync = 11, /* Takes a VDSyncInfoPtr */
428  cscGetConnection =
429  12, /* Return information about the connection to the display */
430  cscGetModeTiming = 13, /* Return timing info for a mode */
431  cscGetModeBaseAddress =
432  14, /* Return base address information about a particular mode */
433  cscGetScanProc = 15, /* QuickTime scan chasing routine */
434  cscGetPreferredConfiguration = 16, /* Takes a VDSwitchInfoPtr */
435  cscGetNextResolution = 17, /* Takes a VDResolutionInfoPtr */
436  cscGetVideoParameters = 18, /* Takes a VDVideoParametersInfoPtr */
437  cscGetGammaInfoList = 20, /* Takes a VDGetGammaListPtr */
438  cscRetrieveGammaTable = 21, /* Takes a VDRetrieveGammaPtr */
439  cscSupportsHardwareCursor = 22, /* Takes a VDSupportsHardwareCursorPtr */
440  cscGetHardwareCursorDrawState = 23, /* Takes a VDHardwareCursorDrawStatePtr */
441  cscGetConvolution = 24, /* Takes a VDConvolutionInfoPtr */
442  cscGetPowerState = 25, /* Takes a VDPowerStatePtr */
443  cscPrivateStatusCall = 26, /* Takes a VDPrivateSelectorDataPtr */
444  cscGetDDCBlock = 27, /* Takes a VDDDCBlockPtr */
445  cscGetMultiConnect = 28, /* Takes a VDMultiConnectInfoPtr */
446  cscGetClutBehavior = 29, /* Takes a VDClutBehaviorPtr */
447  cscGetTimingRanges = 30, /* Takes a VDDisplayTimingRangePtr */
448  cscGetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */
449  cscGetCommunicationInfo = 32, /* Takes a VDCommunicationInfoPtr */
450  cscGetScalerInfo = 35, /* Takes a VDScalerInfoPtr */
451  cscGetScaler = 36, /* Takes a VDScalerPtr*/
452  cscGetMirror = 37 /* Takes a VDMirrorPtr*/
453 };
454 
455 /* Bit definitions for the Get/Set Sync call*/
456 enum {
457  kDisableHorizontalSyncBit = 0,
458  kDisableVerticalSyncBit = 1,
459  kDisableCompositeSyncBit = 2,
460  kEnableSyncOnBlue = 3,
461  kEnableSyncOnGreen = 4,
462  kEnableSyncOnRed = 5,
463  kNoSeparateSyncControlBit = 6,
464  kTriStateSyncBit = 7,
465  kHorizontalSyncMask = 0x01,
466  kVerticalSyncMask = 0x02,
467  kCompositeSyncMask = 0x04,
468  kDPMSSyncMask = 0x07,
469  kTriStateSyncMask = 0x80,
470  kSyncOnBlueMask = 0x08,
471  kSyncOnGreenMask = 0x10,
472  kSyncOnRedMask = 0x20,
473  kSyncOnMask = 0x38
474 };
475 
476 enum {
477  /* Power Mode constants for translating DPMS modes to Get/SetSync calls. */
478  kDPMSSyncOn = 0,
479  kDPMSSyncStandby = 1,
480  kDPMSSyncSuspend = 2,
481  kDPMSSyncOff = 7
482 };
483 
484 /* Bit definitions for the Get/Set Convolution call*/
485 enum {
486  kConvolved = 0,
487  kLiveVideoPassThru = 1,
488  kConvolvedMask = 0x01,
489  kLiveVideoPassThruMask = 0x02
490 };
491 
492 struct VPBlock {
493  long vpBaseOffset; /*Offset to page zero of video RAM (From minorBaseOS).*/
494  short vpRowBytes; /*Width of each row of video memory.*/
495  Rect vpBounds; /*BoundsRect for the video display (gives dimensions).*/
496  short vpVersion; /*PixelMap version number.*/
497  short vpPackType;
498  long vpPackSize;
499  long vpHRes; /*Horizontal resolution of the device (pixels per inch).*/
500  long vpVRes; /*Vertical resolution of the device (pixels per inch).*/
501  short vpPixelType; /*Defines the pixel type.*/
502  short vpPixelSize; /*Number of bits in pixel.*/
503  short vpCmpCount; /*Number of components in pixel.*/
504  short vpCmpSize; /*Number of bits per component*/
505  long vpPlaneBytes; /*Offset from one plane to the next.*/
506 };
507 typedef struct VPBlock VPBlock;
508 typedef VPBlock *VPBlockPtr;
510  Ptr csTable; /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
511 };
512 typedef struct VDEntryRecord VDEntryRecord;
513 typedef VDEntryRecord *VDEntRecPtr;
514 /* Parm block for SetGray control call */
515 struct VDGrayRecord {
516  Boolean csMode; /*Same as GDDevType value (0=color, 1=mono)*/
517  SInt8 filler;
518 };
519 typedef struct VDGrayRecord VDGrayRecord;
520 typedef VDGrayRecord *VDGrayPtr;
521 /* Parm block for SetInterrupt call */
522 struct VDFlagRecord {
523  SInt8 csMode;
524  SInt8 filler;
525 };
526 typedef struct VDFlagRecord VDFlagRecord;
527 typedef VDFlagRecord *VDFlagRecPtr;
528 /* Parm block for SetEntries control call */
530  ColorSpec *csTable; /*Pointer to an array of color specs*/
531  short csStart; /*Which spec in array to start with, or -1*/
532  short csCount; /*Number of color spec entries to set*/
533 };
534 typedef struct VDSetEntryRecord VDSetEntryRecord;
536 /* Parm block for SetGamma control call */
538  Ptr csGTable; /*pointer to gamma table*/
539 };
540 typedef struct VDGammaRecord VDGammaRecord;
541 typedef VDGammaRecord *VDGamRecPtr;
543  long csDevData; /* LONGINT - (long) timing mode */
544  long csDevBase; /* LONGINT - (long) base address of the mode */
545  short csModeReserved; /* INTEGER - (short) will some day be the depth */
546  long csModeBase; /* LONGINT - (long) reserved */
547 };
551  unsigned short csMode; /*(word) mode depth*/
552  unsigned long csData; /*(long) functional sResource of mode*/
553  unsigned short csPage; /*(word) page to switch in*/
554  Ptr csBaseAddr; /*(long) base address of page (return value)*/
555  unsigned long csReserved; /*(long) Reserved (set to 0) */
556 };
557 typedef struct VDSwitchInfoRec VDSwitchInfoRec;
560  unsigned long
561  csTimingMode; /* LONGINT - (long) timing mode (a la InitGDevice) */
562  unsigned long csTimingReserved; /* LONGINT - (long) reserved */
563  unsigned long
564  csTimingFormat; /* LONGINT - (long) what format is the timing info */
565  unsigned long csTimingData; /* LONGINT - (long) data supplied by driver */
566  unsigned long csTimingFlags; /* LONGINT - (long) mode within device */
567 };
568 typedef struct VDTimingInfoRec VDTimingInfoRec;
571  unsigned short csDisplayType; /* INTEGER - (word) Type of display connected */
572  unsigned char csConnectTaggedType; /* BYTE - type of tagging */
573  unsigned char csConnectTaggedData; /* BYTE - tagging data */
574  unsigned long
575  csConnectFlags; /* LONGINT - (long) tell us about the connection */
576  unsigned long csDisplayComponent; /* LONGINT - (long) if the card has a direct
577  connection to the display, it returns the
578  display component here (FUTURE) */
579  unsigned long csConnectReserved; /* LONGINT - (long) reserved */
580 };
584  unsigned long csDisplayCountOrNumber; /* For GetMultiConnect, returns count n
585  of 1..n connections; otherwise,
586  indicates the ith connection.*/
588  csConnectInfo; /* Standard VDDisplayConnectionInfo for connection i.*/
589 };
592 /* RawSenseCode
593  This abstract data type is not exactly abstract. Rather, it is merely
594  enumerated constants for the possible raw sense code values when 'standard'
595  sense code hardware is implemented.
596 
597  For 'standard' sense code hardware, the raw sense is obtained as follows:
598  � Instruct the frame buffer controller NOT to actively drive any of the
599  monitor sense lines � Read the state of the monitor sense lines 2, 1, and 0.
600  (2 is the MSB, 0 the LSB)
601 
602  IMPORTANT Note:
603  When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then
604  these constants are valid 'csConnectTaggedType' values in
605  'VDDisplayConnectInfo'
606 
607 */
608 typedef unsigned char RawSenseCode;
609 enum {
610  kRSCZero = 0,
611  kRSCOne = 1,
612  kRSCTwo = 2,
613  kRSCThree = 3,
614  kRSCFour = 4,
615  kRSCFive = 5,
616  kRSCSix = 6,
617  kRSCSeven = 7
618 };
619 
620 /* ExtendedSenseCode
621  This abstract data type is not exactly abstract. Rather, it is merely
622  enumerated constants for the values which are possible when the extended
623  sense algorithm is applied to hardware which implements 'standard' sense code
624  hardware.
625 
626  For 'standard' sense code hardware, the extended sense code algorithm is as
627  follows: (Note: as described here, sense line 'A' corresponds to '2', 'B' to
628  '1', and 'C' to '0') � Drive sense line 'A' low and read the values of 'B'
629  and 'C'. � Drive sense line 'B' low and read the values of 'A' and 'C'. �
630  Drive sense line 'C' low and read the values of 'A' and 'B'.
631 
632  In this way, a six-bit number of the form BC/AC/AB is generated.
633 
634  IMPORTANT Note:
635  When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then
636  these constants are valid 'csConnectTaggedData' values in
637  'VDDisplayConnectInfo'
638 
639 */
640 typedef unsigned char ExtendedSenseCode;
641 enum {
642  kESCZero21Inch = 0x00, /* 21" RGB */
643  kESCOnePortraitMono = 0x14, /* Portrait Monochrome */
644  kESCTwo12Inch = 0x21, /* 12" RGB */
645  kESCThree21InchRadius = 0x31, /* 21" RGB (Radius) */
646  kESCThree21InchMonoRadius = 0x34, /* 21" Monochrome (Radius) */
647  kESCThree21InchMono = 0x35, /* 21" Monochrome */
648  kESCFourNTSC = 0x0A, /* NTSC */
649  kESCFivePortrait = 0x1E, /* Portrait RGB */
650  kESCSixMSB1 = 0x03, /* MultiScan Band-1 (12" thru 1Six") */
651  kESCSixMSB2 = 0x0B, /* MultiScan Band-2 (13" thru 19") */
652  kESCSixMSB3 = 0x23, /* MultiScan Band-3 (13" thru 21") */
653  kESCSixStandard = 0x2B, /* 13"/14" RGB or 12" Monochrome */
654  kESCSevenPAL = 0x00, /* PAL */
655  kESCSevenNTSC = 0x14, /* NTSC */
656  kESCSevenVGA = 0x17, /* VGA */
657  kESCSeven16Inch = 0x2D, /* 16" RGB (GoldFish) */
658  kESCSevenPALAlternate = 0x30, /* PAL (Alternate) */
659  kESCSeven19Inch = 0x3A, /* Third-Party 19� */
660  kESCSevenDDC = 0x3E, /* DDC display */
661  kESCSevenNoDisplay = 0x3F /* No display connected */
662 };
663 
664 /* DepthMode
665  This abstract data type is used to to reference RELATIVE pixel depths.
666  Its definition is largely derived from its past usage, analogous to
667  'xxxVidMode'
668 
669  Bits per pixel DOES NOT directly map to 'DepthMode' For example, on some
670  graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
671  hardware, 'kDepthMode1' may represent 8BPP.
672 
673  DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==,
674  etc. behave as expected. The values of the constants which comprise the set
675  are such that 'kDepthMode4 < kDepthMode6' behaves as expected.
676 */
677 typedef unsigned short DepthMode;
678 enum {
679  kDepthMode1 = 128,
680  kDepthMode2 = 129,
681  kDepthMode3 = 130,
682  kDepthMode4 = 131,
683  kDepthMode5 = 132,
684  kDepthMode6 = 133
685 };
686 
687 enum {
688  kFirstDepthMode = 128, /* These constants are obsolete, and just included */
689  kSecondDepthMode = 129, /* for clients that have converted to the above */
690  kThirdDepthMode = 130, /* kDepthModeXXX constants. */
691  kFourthDepthMode = 131,
692  kFifthDepthMode = 132,
693  kSixthDepthMode = 133
694 };
695 
696 struct VDPageInfo {
697  short csMode; /*(word) mode within device*/
698  long csData; /*(long) data supplied by driver*/
699  short csPage; /*(word) page to switch in*/
700  Ptr csBaseAddr; /*(long) base address of page*/
701 };
702 typedef struct VDPageInfo VDPageInfo;
703 typedef VDPageInfo *VDPgInfoPtr;
704 struct VDSizeInfo {
705  short csHSize; /*(word) desired/returned h size*/
706  short csHPos; /*(word) desired/returned h position*/
707  short csVSize; /*(word) desired/returned v size*/
708  short csVPos; /*(word) desired/returned v position*/
709 };
710 typedef struct VDSizeInfo VDSizeInfo;
711 typedef VDSizeInfo *VDSzInfoPtr;
712 struct VDSettings {
713  short csParamCnt; /*(word) number of params*/
714  short csBrightMax; /*(word) max brightness*/
715  short csBrightDef; /*(word) default brightness*/
716  short csBrightVal; /*(word) current brightness*/
717  short csCntrstMax; /*(word) max contrast*/
718  short csCntrstDef; /*(word) default contrast*/
719  short csCntrstVal; /*(word) current contrast*/
720  short csTintMax; /*(word) max tint*/
721  short csTintDef; /*(word) default tint*/
722  short csTintVal; /*(word) current tint*/
723  short csHueMax; /*(word) max hue*/
724  short csHueDef; /*(word) default hue*/
725  short csHueVal; /*(word) current hue*/
726  short csHorizDef; /*(word) default horizontal*/
727  short csHorizVal; /*(word) current horizontal*/
728  short csHorizMax; /*(word) max horizontal*/
729  short csVertDef; /*(word) default vertical*/
730  short csVertVal; /*(word) current vertical*/
731  short csVertMax; /*(word) max vertical*/
732 };
733 typedef struct VDSettings VDSettings;
734 typedef VDSettings *VDSettingsPtr;
735 struct VDDefMode {
736  UInt8 csID;
737  SInt8 filler;
738 };
739 typedef struct VDDefMode VDDefMode;
740 typedef VDDefMode *VDDefModePtr;
742  UInt8 csMode;
743  UInt8 csFlags;
744 };
745 typedef struct VDSyncInfoRec VDSyncInfoRec;
747 typedef UInt32 AVIDType;
748 typedef AVIDType DisplayIDType;
749 typedef UInt32 DisplayModeID;
750 typedef UInt32 VideoDeviceType;
751 typedef UInt32 GammaTableID;
756 /* Constants for the cscGetNextResolution call */
757 enum {
758  kDisplayModeIDCurrent = 0x00, /* Reference the Current DisplayModeID */
759  kDisplayModeIDInvalid =
760  (long)0xFFFFFFFF, /* A bogus DisplayModeID in all cases */
761  kDisplayModeIDFindFirstResolution =
762  (long)0xFFFFFFFE, /* Used in cscGetNextResolution to reset iterator */
763  kDisplayModeIDNoMoreResolutions =
764  (long)0xFFFFFFFD, /* Used in cscGetNextResolution to indicate End Of List
765  */
766  kDisplayModeIDFindFirstProgrammable =
767  (long)0xFFFFFFFC, /* Used in cscGetNextResolution to find unused
768  programmable timing */
769  kDisplayModeIDBootProgrammable =
770  (long)0xFFFFFFFB, /* This is the ID given at boot time by the OF driver to
771  a programmable timing */
772  kDisplayModeIDReservedBase =
773  (long)0x80000000 /* Lowest (unsigned) DisplayModeID reserved by Apple */
774 };
775 
776 /* Constants for the GetGammaInfoList call */
777 enum {
778  kGammaTableIDFindFirst = (long)0xFFFFFFFE, /* Get the first gamma table ID */
779  kGammaTableIDNoMoreTables =
780  (long)0xFFFFFFFD, /* Used to indicate end of list */
781  kGammaTableIDSpecific = 0x00 /* Return the info for the given table id */
782 };
783 
784 /* Constants for GetMultiConnect call*/
785 enum {
786  kGetConnectionCount =
787  (long)0xFFFFFFFF, /* Used to get the number of possible connections in a
788  �multi-headed� framebuffer environment.*/
789  kActivateConnection =
790  (0 << kConnectionInactive), /* Used for activating a connection
791  (csConnectFlags value).*/
792  kDeactivateConnection =
793  (1 << kConnectionInactive) /* Used for deactivating a connection
794  (csConnectFlags value.)*/
795 };
796 
797 /* VDCommunicationRec.csBusID values*/
798 enum { kVideoDefaultBus = 0 };
799 
800 /* VDCommunicationInfoRec.csBusType values*/
801 enum { kVideoBusTypeInvalid = 0, kVideoBusTypeI2C = 1 };
802 
803 /* VDCommunicationRec.csSendType and VDCommunicationRec.csReplyType values and
804  * bits in VDCommunicationInfoRec.csSupportedTypes.*/
805 enum {
806  kVideoNoTransactionType = 0, /* No transaction*/
807  kVideoSimpleI2CType = 1, /* Simple I2C message*/
808  kVideoDDCciReplyType = 2 /* DDC/ci message (with imbedded length)*/
809 };
810 
811 /* VDCommunicationRec.csCommFlags and
812  * VDCommunicationInfoRec.csSupportedCommFlags*/
813 enum {
814  kVideoReplyMicroSecDelayMask =
815  (1 << 0) /* If set, the driver should delay csMinReplyDelay micro seconds
816  between send and recieve*/
817 };
818 
820  DisplayModeID
821  csPreviousDisplayModeID; /* ID of the previous resolution in a chain */
822  DisplayModeID csDisplayModeID; /* ID of the next resolution */
823  unsigned long csHorizontalPixels; /* # of pixels in a horizontal line at the
824  max depth */
825  unsigned long csVerticalLines; /* # of lines in a screen at the max depth */
826  Fixed csRefreshRate; /* Vertical Refresh Rate in Hz */
827  DepthMode csMaxDepthMode; /* 0x80-based number representing max bit depth */
828  unsigned long csResolutionFlags; /* Reserved - flag bits */
829  unsigned long csReserved; /* Reserved */
830 };
834  DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */
835  DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */
836  VPBlockPtr csVPBlockPtr; /* Pointer to a video parameter block */
837  unsigned long csPageCount; /* Number of pages supported by the resolution */
838  VideoDeviceType csDeviceType; /* Device Type: Direct, Fixed or CLUT; */
839  UInt32 csDepthFlags; /* Flags */
840 };
844  GammaTableID csLastGammaID; /* the ID of the previous gamma table */
845  GammaTableID csNextGammaID; /* the ID of the next gamma table */
846  Ptr csGammaPtr; /* Ptr to a gamma table data */
847  unsigned long csReserved; /* Reserved */
848 };
849 typedef struct VDGammaInfoRec VDGammaInfoRec;
852  GammaTableID csPreviousGammaTableID; /* ID of the previous gamma table */
853  GammaTableID csGammaTableID; /* ID of the gamma table following
854  csPreviousDisplayModeID */
855  unsigned long csGammaTableSize; /* Size of the gamma table in bytes */
856  char *csGammaTableName; /* Gamma table name (c-string) */
857 };
858 typedef struct VDGetGammaListRec VDGetGammaListRec;
861  GammaTableID csGammaTableID; /* ID of gamma table to retrieve */
862  GammaTbl *csGammaTablePtr; /* Location to copy desired gamma to */
863 };
867  void *csCursorRef; /* reference to cursor data */
868  UInt32 csReserved1; /* reserved for future use */
869  UInt32 csReserved2; /* should be ignored */
870 };
874  SInt32 csCursorX; /* x coordinate */
875  SInt32 csCursorY; /* y coordinate */
876  UInt32 csCursorVisible; /* true if cursor is must be visible */
877  UInt32 csReserved1; /* reserved for future use */
878  UInt32 csReserved2; /* should be ignored */
879 };
883  UInt32 csSupportsHardwareCursor;
884  /* true if hardware cursor is supported */
885  UInt32 csReserved1; /* reserved for future use */
886  UInt32 csReserved2; /* must be zero */
887 };
891  SInt32 csCursorX; /* x coordinate */
892  SInt32 csCursorY; /* y coordinate */
893  UInt32 csCursorVisible; /* true if cursor is visible */
894  UInt32 csCursorSet; /* true if cursor successfully set by last set control
895  call */
896  UInt32 csReserved1; /* reserved for future use */
897  UInt32 csReserved2; /* must be zero */
898 };
902  DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */
903  DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */
904  unsigned long csPage;
905  UInt32 csFlags;
906  UInt32 csReserved;
907 };
911  unsigned long powerState;
912  unsigned long powerFlags;
913 
914  unsigned long powerReserved1;
915  unsigned long powerReserved2;
916 };
917 typedef struct VDPowerStateRec VDPowerStateRec;
931  LogicalAddress privateParameters; /* Caller's parameters*/
932  ByteCount privateParametersSize; /* Size of data sent from caller to driver*/
933  LogicalAddress privateResults; /* Caller's return area. Can be nil, or same as
934  privateParameters.*/
935  ByteCount privateResultsSize; /* Size of data driver returns to caller. Can be
936  nil, or same as privateParametersSize.*/
937 };
939 
941  UInt32 reserved; /* Reserved (set to 0). */
942  VDPrivateSelectorDataRec data[1];
943 };
946  UInt32 ddcBlockNumber; /* Input -- DDC EDID (Extended Display Identification
947  Data) number (1-based) */
948  ResType ddcBlockType; /* Input -- DDC block type (EDID/VDIF) */
949  UInt32 ddcFlags; /* Input -- DDC Flags*/
950  UInt32 ddcReserved; /* Reserved */
951  Byte ddcBlockData[128]; /* Output -- DDC EDID/VDIF data (kDDCBlockSize) */
952 };
953 typedef struct VDDDCBlockRec VDDDCBlockRec;
955 
956 enum {
957  /* timingSyncConfiguration*/
958  kSyncInterlaceMask = (1 << 7),
959  kSyncAnalogCompositeMask = 0,
960  kSyncAnalogCompositeSerrateMask = (1 << 2),
961  kSyncAnalogCompositeRGBSyncMask = (1 << 1),
962  kSyncAnalogBipolarMask = (1 << 3),
963  kSyncAnalogBipolarSerrateMask = (1 << 2),
964  kSyncAnalogBipolarSRGBSyncMask = (1 << 1),
965  kSyncDigitalCompositeMask = (1 << 4),
966  kSyncDigitalCompositeSerrateMask = (1 << 2),
967  kSyncDigitalCompositeMatchHSyncMask = (1 << 2),
968  kSyncDigitalSeperateMask = (1 << 4) + (1 << 3),
969  kSyncDigitalVSyncPositiveMask = (1 << 2),
970  kSyncDigitalHSyncPositiveMask = (1 << 1)
971 };
972 
974  UInt32 csRangeSize; /* Init to sizeof(VDDisplayTimingRangeRec) */
975  UInt32 csRangeType; /* Init to 0 */
976  UInt32 csRangeVersion; /* Init to 0 */
977  UInt32 csRangeReserved; /* Init to 0 */
978 
979  UInt32 csRangeBlockIndex; /* Requested block (first index is 0)*/
980  UInt32 csRangeGroup; /* set to 0 */
981  UInt32 csRangeBlockCount; /* # blocks */
982  UInt32 csRangeFlags; /* dependent video */
983 
984  UInt64 csMinPixelClock; /* Min dot clock in Hz */
985  UInt64 csMaxPixelClock; /* Max dot clock in Hz */
986 
987  UInt32 csMaxPixelError; /* Max dot clock error */
988  UInt32 csTimingRangeSyncFlags;
989  UInt32 csTimingRangeSignalLevels;
990  UInt32 csReserved0;
991 
992  UInt32 csMinFrameRate; /* Hz */
993  UInt32 csMaxFrameRate; /* Hz */
994  UInt32 csMinLineRate; /* Hz */
995  UInt32 csMaxLineRate; /* Hz */
996 
997  UInt32 csMaxHorizontalTotal; /* Clocks - Maximum total (active + blanking) */
998  UInt32 csMaxVerticalTotal; /* Clocks - Maximum total (active + blanking) */
999  UInt32 csMaxTotalReserved1; /* Reserved */
1000  UInt32 csMaxTotalReserved2; /* Reserved */
1001 
1002  /* Some cards require that some timing elements*/
1003  /* be multiples of a "character size" (often 8*/
1004  /* clocks). The "xxxxCharSize" fields document*/
1005  /* those requirements.*/
1006 
1007  UInt8 csCharSizeHorizontalActive; /* Character size */
1008  UInt8 csCharSizeHorizontalBlanking; /* Character size */
1009  UInt8 csCharSizeHorizontalSyncOffset; /* Character size */
1010  UInt8 csCharSizeHorizontalSyncPulse; /* Character size */
1011 
1012  UInt8 csCharSizeVerticalActive; /* Character size */
1013  UInt8 csCharSizeVerticalBlanking; /* Character size */
1014  UInt8 csCharSizeVerticalSyncOffset; /* Character size */
1015  UInt8 csCharSizeVerticalSyncPulse; /* Character size */
1016 
1017  UInt8 csCharSizeHorizontalBorderLeft; /* Character size */
1018  UInt8 csCharSizeHorizontalBorderRight; /* Character size */
1019  UInt8 csCharSizeVerticalBorderTop; /* Character size */
1020  UInt8 csCharSizeVerticalBorderBottom; /* Character size */
1021 
1022  UInt8 csCharSizeHorizontalTotal; /* Character size for active + blanking */
1023  UInt8 csCharSizeVerticalTotal; /* Character size for active + blanking */
1024  UInt16 csCharSizeReserved1; /* Reserved (Init to 0) */
1025 
1026  UInt32 csMinHorizontalActiveClocks;
1027  UInt32 csMaxHorizontalActiveClocks;
1028  UInt32 csMinHorizontalBlankingClocks;
1029  UInt32 csMaxHorizontalBlankingClocks;
1030 
1031  UInt32 csMinHorizontalSyncOffsetClocks;
1032  UInt32 csMaxHorizontalSyncOffsetClocks;
1033  UInt32 csMinHorizontalPulseWidthClocks;
1034  UInt32 csMaxHorizontalPulseWidthClocks;
1035 
1036  UInt32 csMinVerticalActiveClocks;
1037  UInt32 csMaxVerticalActiveClocks;
1038  UInt32 csMinVerticalBlankingClocks;
1039  UInt32 csMaxVerticalBlankingClocks;
1040 
1041  UInt32 csMinVerticalSyncOffsetClocks;
1042  UInt32 csMaxVerticalSyncOffsetClocks;
1043  UInt32 csMinVerticalPulseWidthClocks;
1044  UInt32 csMaxVerticalPulseWidthClocks;
1045 
1046  UInt32 csMinHorizontalBorderLeft;
1047  UInt32 csMaxHorizontalBorderLeft;
1048  UInt32 csMinHorizontalBorderRight;
1049  UInt32 csMaxHorizontalBorderRight;
1050 
1051  UInt32 csMinVerticalBorderTop;
1052  UInt32 csMaxVerticalBorderTop;
1053  UInt32 csMinVerticalBorderBottom;
1054  UInt32 csMaxVerticalBorderBottom;
1055 
1056  UInt32 csReserved1; /* Reserved (Init to 0)*/
1057  UInt32 csReserved2; /* Reserved (Init to 0)*/
1058  UInt32 csReserved3; /* Reserved (Init to 0)*/
1059  UInt32 csReserved4; /* Reserved (Init to 0)*/
1060 
1061  UInt32 csReserved5; /* Reserved (Init to 0)*/
1062  UInt32 csReserved6; /* Reserved (Init to 0)*/
1063  UInt32 csReserved7; /* Reserved (Init to 0)*/
1064  UInt32 csReserved8; /* Reserved (Init to 0)*/
1065 };
1068 
1069 enum {
1070  /* csDisplayModeState*/
1071  kDMSModeReady = 0, /* Display Mode ID is configured and ready*/
1072  kDMSModeNotReady = 1, /* Display Mode ID is is being programmed*/
1073  kDMSModeFree = 2 /* Display Mode ID is not associated with a timing*/
1074 };
1075 
1076 /* Video driver Errors -10930 to -10959 */
1077 enum {
1078  kTimingChangeRestrictedErr = -10930,
1079  kVideoI2CReplyPendingErr = -10931,
1080  kVideoI2CTransactionErr = -10932,
1081  kVideoI2CBusyErr = -10933,
1082  kVideoI2CTransactionTypeErr = -10934,
1083  kVideoBufferSizeErr = -10935,
1084  kVideoCannotMirrorErr = -10936
1085 };
1086 
1087 enum {
1088  /* csTimingRangeSignalLevels*/
1089  kRangeSupportsSignal_0700_0300_Bit = 0,
1090  kRangeSupportsSignal_0714_0286_Bit = 1,
1091  kRangeSupportsSignal_1000_0400_Bit = 2,
1092  kRangeSupportsSignal_0700_0000_Bit = 3,
1093  kRangeSupportsSignal_0700_0300_Mask =
1094  (1 << kRangeSupportsSignal_0700_0300_Bit),
1095  kRangeSupportsSignal_0714_0286_Mask =
1096  (1 << kRangeSupportsSignal_0714_0286_Bit),
1097  kRangeSupportsSignal_1000_0400_Mask =
1098  (1 << kRangeSupportsSignal_1000_0400_Bit),
1099  kRangeSupportsSignal_0700_0000_Mask =
1100  (1 << kRangeSupportsSignal_0700_0000_Bit)
1101 };
1102 
1103 enum {
1104  /* csSignalConfig*/
1105  kDigitalSignalBit = 0, /* Do not set. Mac OS does not currently support
1106  arbitrary digital timings*/
1107  kAnalogSetupExpectedBit =
1108  1, /* Analog displays - display expects a blank-to-black setup or
1109  pedestal. See VESA signal standards.*/
1110  kDigitalSignalMask = (1 << kDigitalSignalBit),
1111  kAnalogSetupExpectedMask = (1 << kAnalogSetupExpectedBit)
1112 };
1113 
1114 enum {
1115  /* csSignalLevels for analog*/
1116  kAnalogSignalLevel_0700_0300 = 0,
1117  kAnalogSignalLevel_0714_0286 = 1,
1118  kAnalogSignalLevel_1000_0400 = 2,
1119  kAnalogSignalLevel_0700_0000 = 3
1120 };
1121 
1122 enum {
1123  /* csTimingRangeSyncFlags*/
1124  kRangeSupportsSeperateSyncsBit = 0,
1125  kRangeSupportsSyncOnGreenBit = 1,
1126  kRangeSupportsCompositeSyncBit = 2,
1127  kRangeSupportsVSyncSerrationBit = 3,
1128  kRangeSupportsSeperateSyncsMask = (1 << kRangeSupportsSeperateSyncsBit),
1129  kRangeSupportsSyncOnGreenMask = (1 << kRangeSupportsSyncOnGreenBit),
1130  kRangeSupportsCompositeSyncMask = (1 << kRangeSupportsCompositeSyncBit),
1131  kRangeSupportsVSyncSerrationMask = (1 << kRangeSupportsVSyncSerrationBit)
1132 };
1133 
1134 enum {
1135  /* csHorizontalSyncConfig and csVerticalSyncConfig*/
1136  kSyncPositivePolarityBit = 0, /* Digital separate sync polarity for analog
1137  interfaces (0 => negative polarity)*/
1138  kSyncPositivePolarityMask = (1 << kSyncPositivePolarityBit)
1139 };
1140 
1141 /* For timings with kDetailedTimingFormat.*/
1143  UInt32 csTimingSize; /* Init to sizeof(VDDetailedTimingRec)*/
1144  UInt32 csTimingType; /* Init to 0*/
1145  UInt32 csTimingVersion; /* Init to 0*/
1146  UInt32 csTimingReserved; /* Init to 0*/
1147 
1148  DisplayModeID csDisplayModeID; /* Init to 0*/
1149  UInt32 csDisplayModeSeed; /* */
1150  UInt32 csDisplayModeState; /* Display Mode state*/
1151  UInt32 csDisplayModeAlias; /* Mode to use when programmed.*/
1152 
1153  UInt32 csSignalConfig;
1154  UInt32 csSignalLevels;
1155 
1156  UInt64 csPixelClock; /* Hz*/
1157 
1158  UInt64 csMinPixelClock; /* Hz - With error what is slowest actual clock */
1159  UInt64 csMaxPixelClock; /* Hz - With error what is fasted actual clock */
1160 
1161  UInt32 csHorizontalActive; /* Pixels*/
1162  UInt32 csHorizontalBlanking; /* Pixels*/
1163  UInt32 csHorizontalSyncOffset; /* Pixels*/
1164  UInt32 csHorizontalSyncPulseWidth; /* Pixels*/
1165 
1166  UInt32 csVerticalActive; /* Lines*/
1167  UInt32 csVerticalBlanking; /* Lines*/
1168  UInt32 csVerticalSyncOffset; /* Lines*/
1169  UInt32 csVerticalSyncPulseWidth; /* Lines*/
1170 
1171  UInt32 csHorizontalBorderLeft; /* Pixels*/
1172  UInt32 csHorizontalBorderRight; /* Pixels*/
1173  UInt32 csVerticalBorderTop; /* Lines*/
1174  UInt32 csVerticalBorderBottom; /* Lines*/
1175 
1176  UInt32 csHorizontalSyncConfig;
1177  UInt32 csHorizontalSyncLevel; /* Future use (init to 0)*/
1178  UInt32 csVerticalSyncConfig;
1179  UInt32 csVerticalSyncLevel; /* Future use (init to 0)*/
1180 
1181  UInt32 csReserved1; /* Init to 0*/
1182  UInt32 csReserved2; /* Init to 0*/
1183  UInt32 csReserved3; /* Init to 0*/
1184  UInt32 csReserved4; /* Init to 0*/
1185 
1186  UInt32 csReserved5; /* Init to 0*/
1187  UInt32 csReserved6; /* Init to 0*/
1188  UInt32 csReserved7; /* Init to 0*/
1189  UInt32 csReserved8; /* Init to 0*/
1190 };
1193 
1194 enum {
1195  /* csScalerFeatures*/
1196  kScaleStretchOnlyMask = (1 << 0), /* True means the driver cannot add borders
1197  to avoid non-square pixels*/
1198  kScaleCanUpSamplePixelsMask =
1199  (1 << 1), /* True means timings with more active clocks than pixels (ie
1200  640x480 pixels on a 1600x1200 timing)*/
1201  kScaleCanDownSamplePixelsMask =
1202  (1 << 2) /* True means timings with fewer active clocks than pixels (ie
1203  1600x1200 pixels on a 640x480 timing)*/
1204 };
1205 
1206 enum {
1207  /* csScalerFlags*/
1208  kScaleStretchToFitMask = (1 << 0) /* True means the driver should avoid
1209  borders and allow non-square pixels*/
1210 };
1211 
1212 typedef UInt32 VDClutBehavior;
1213 typedef VDClutBehavior *VDClutBehaviorPtr;
1214 enum {
1215  kSetClutAtSetEntries =
1216  0, /* SetEntries behavior is to update clut during SetEntries call*/
1217  kSetClutAtVBL = 1 /* SetEntries behavior is to upate clut at next vbl*/
1218 };
1219 
1221  SInt32 csBusID; /* kVideoDefaultBus for single headed cards.*/
1222  UInt32 csCommFlags; /* Always zero*/
1223  UInt32 csMinReplyDelay; /* Minimum delay between send and reply transactions
1224  (units depend on csCommFlags)*/
1225  UInt32 csReserved2; /* Always zero*/
1226 
1227  UInt32 csSendAddress; /* Usually I2C address (eg 0x6E)*/
1228  UInt32 csSendType; /* See kVideoSimpleI2CType etc.*/
1229  LogicalAddress csSendBuffer; /* Pointer to the send buffer*/
1230  ByteCount csSendSize; /* Number of bytes to send*/
1231 
1232  UInt32 csReplyAddress; /* Address from which to read (eg 0x6F for
1233  kVideoDDCciReplyType I2C address)*/
1234  UInt32 csReplyType; /* See kVideoDDCciReplyType etc.*/
1235  LogicalAddress csReplyBuffer; /* Pointer to the reply buffer*/
1236  ByteCount csReplySize; /* Max bytes to reply (size of csReplyBuffer)*/
1237 
1238  UInt32 csReserved3;
1239  UInt32 csReserved4;
1240  UInt32 csReserved5; /* Always zero*/
1241  UInt32 csReserved6; /* Always zero*/
1242 };
1243 typedef struct VDCommunicationRec VDCommunicationRec;
1246  SInt32 csBusID; /* kVideoDefaultBus for single headed cards. */
1247  UInt32 csBusType; /* See kVideoBusI2C etc.*/
1248  SInt32 csMinBus; /* Minimum bus (usually kVideoDefaultBus). Used to probe
1249  additional busses*/
1250  SInt32 csMaxBus; /* Max bus (usually kVideoDefaultBus). Used to probe
1251  additional busses*/
1252 
1253  UInt32
1254  csSupportedTypes; /* Bit field for first 32 supported transaction types.
1255  Eg. 0x07 => support for kVideoNoTransactionType,
1256  kVideoSimpleI2CType and kVideoDDCciReplyType.*/
1257  UInt32 csSupportedCommFlags; /* Return the flags csCommFlags understood by
1258  this driver.*/
1259  UInt32 csReserved2; /* Always zero*/
1260  UInt32 csReserved3; /* Always zero*/
1261 
1262  UInt32 csReserved4; /* Always zero*/
1263  UInt32 csReserved5; /* Always zero*/
1264  UInt32 csReserved6; /* Always zero*/
1265  UInt32 csReserved7; /* Always zero*/
1266 };
1269 struct VDScalerRec {
1270  UInt32 csScalerSize; /* Init to sizeof(VDScalerRec)*/
1271  UInt32 csScalerVersion; /* Init to 0*/
1272  UInt32 csReserved1; /* Init to 0*/
1273  UInt32 csReserved2; /* Init to 0*/
1274 
1275  DisplayModeID csDisplayModeID; /* Display Mode ID modified by this call.*/
1276  UInt32 csDisplayModeSeed; /* */
1277  UInt32 csDisplayModeState; /* Display Mode state*/
1278  UInt32 csReserved3; /* Init to 0*/
1279 
1280  UInt32 csScalerFlags; /* Init to 0*/
1281  UInt32 csHorizontalPixels; /* Graphics system addressable pixels*/
1282  UInt32 csVerticalPixels; /* Graphics system addressable lines*/
1283  UInt32 csReserved4; /* Init to 0*/
1284 
1285  UInt32 csReserved5; /* Init to 0*/
1286  UInt32 csReserved6; /* Init to 0*/
1287  UInt32 csReserved7; /* Init to 0*/
1288  UInt32 csReserved8; /* Init to 0*/
1289 };
1290 typedef struct VDScalerRec VDScalerRec;
1291 typedef VDScalerRec *VDScalerPtr;
1293  UInt32 csScalerInfoSize; /* Init to sizeof(VDScalerInfoRec)*/
1294  UInt32 csScalerInfoVersion; /* Init to 0*/
1295  UInt32 csReserved1; /* Init to 0*/
1296  UInt32 csReserved2; /* Init to 0*/
1297 
1298  UInt32 csScalerFeatures; /* Feature flags*/
1299  UInt32 csMaxHorizontalPixels; /* limit to horizontal scaled pixels*/
1300  UInt32 csMaxVerticalPixels; /* limit to vertical scaled pixels*/
1301  UInt32 csReserved3; /* Init to 0*/
1302 
1303  UInt32 csReserved4; /* Init to 0*/
1304  UInt32 csReserved5; /* Init to 0*/
1305  UInt32 csReserved6; /* Init to 0*/
1306  UInt32 csReserved7; /* Init to 0*/
1307 };
1308 typedef struct VDScalerInfoRec VDScalerInfoRec;
1310 enum {
1311  /* csMirrorFeatures*/
1312  kMirrorSameDepthOnlyMirrorMask =
1313  (1 << 0), /* Commonly true - Mirroring can only be done if the displays
1314  are the same bitdepth*/
1315  kMirrorSameSizeOnlyMirrorMask =
1316  (1 << 1), /* Commonly false - Mirroring can only be done if the displays
1317  are the same size*/
1318  kMirrorSameTimingOnlyMirrorMask =
1319  (1 << 2), /* Sometimes true - Mirroring can only be done if the displays
1320  are the same timing*/
1321  kMirrorCommonGammaMask =
1322  (1 << 3) /* Sometimes true - Only one gamma correction LUT.*/
1323 };
1324 
1325 enum {
1326  /* csMirrorSupportedFlags and csMirrorFlags*/
1327  kMirrorCanMirrorMask =
1328  (1
1329  << 0), /* Set means we can HW mirrored right now (uses csMirrorEntryID)*/
1330  kMirrorAreMirroredMask =
1331  (1
1332  << 1), /* Set means we are HW mirrored right now (uses csMirrorEntryID)*/
1333  kMirrorUnclippedMirrorMask = (1 << 2), /* Set means mirrored displays are not
1334  clipped to their intersection*/
1335  kMirrorHAlignCenterMirrorMask =
1336  (1 << 3), /* Set means mirrored displays can/should be centered
1337  horizontally*/
1338  kMirrorVAlignCenterMirrorMask =
1339  (1
1340  << 4), /* Set means mirrored displays can/should be centered vertically*/
1341  kMirrorCanChangePixelFormatMask =
1342  (1 << 5), /* Set means mirrored the device should change the pixel format
1343  of mirrored displays to allow mirroring.*/
1344  kMirrorCanChangeTimingMask =
1345  (1 << 6) /* Set means mirrored the device should change the timing of
1346  mirrored displays to allow mirroring.*/
1347 };
1348 
1349 struct VDMirrorRec {
1350  UInt32 csMirrorSize; /* Init to sizeof(VDMirrorRec)*/
1351  UInt32 csMirrorVersion; /* Init to 0*/
1352 
1353  RegEntryID csMirrorRequestID; /* Input RegEntryID to check for mirroring
1354  support and state*/
1355  RegEntryID
1356  csMirrorResultID; /* Output RegEntryID of the next mirrored device*/
1357 
1358  UInt32 csMirrorFeatures; /* Output summary features of the driver*/
1359  UInt32 csMirrorSupportedFlags; /* Output configuration options supported by
1360  the driver*/
1361  UInt32 csMirrorFlags; /* Output configuration options active now*/
1362  UInt32 csReserved1; /* Init to 0*/
1363 
1364  UInt32 csReserved2; /* Init to 0*/
1365  UInt32 csReserved3; /* Init to 0*/
1366  UInt32 csReserved4; /* Init to 0*/
1367  UInt32 csReserved5; /* Init to 0*/
1368 };
1369 typedef struct VDMirrorRec VDMirrorRec;
1370 typedef VDMirrorRec *VDMirrorPtr;
1371 
1372 #if PRAGMA_STRUCT_ALIGN
1373 #pragma options align = reset
1374 #elif PRAGMA_STRUCT_PACKPUSH
1375 #pragma pack(pop)
1376 #elif PRAGMA_STRUCT_PACK
1377 #pragma pack()
1378 #endif
1379 
1380 #ifdef PRAGMA_IMPORT_OFF
1381 #pragma import off
1382 #elif PRAGMA_IMPORT
1383 #pragma import reset
1384 #endif
1385 
1386 #ifdef __cplusplus
1387 }
1388 #endif
1389 
1390 #endif /* __VIDEO__ */
long Fixed
Definition: MacTypes.h:153
unsigned char Boolean
Definition: MacTypes.h:318
NameRegistry Interfaces.
Interface to Quickdraw Graphics.
Definition: Quickdraw.h:1960
Definition: Quickdraw.h:2121
Definition: MacTypes.h:527
Definition: NameRegistry.h:62
Definition: MacTypes.h:110
Definition: Video.h:542
Definition: Video.h:1245
Definition: Video.h:1220
Definition: Video.h:901
Definition: Video.h:945
Definition: Video.h:735
Definition: Video.h:1142
Definition: Video.h:570
Definition: Video.h:973
Definition: Video.h:873
Definition: Video.h:509
Definition: Video.h:522
Definition: Video.h:843
Definition: Video.h:537
Definition: Video.h:851
Definition: Video.h:515
Definition: Video.h:890
Definition: Video.h:1349
Definition: Video.h:583
Definition: Video.h:696
Definition: Video.h:910
Definition: Video.h:930
Definition: Video.h:940
Definition: Video.h:819
Definition: Video.h:860
Definition: Video.h:1292
Definition: Video.h:1269
Definition: Video.h:529
Definition: Video.h:866
Definition: Video.h:712
Definition: Video.h:704
Definition: Video.h:882
Definition: Video.h:550
Definition: Video.h:741
Definition: Video.h:559
Definition: Video.h:833
Definition: Video.h:492