|
|
1.1 root 1: /*
2: * Copyright (c) 1998-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: * Copyright (c) 1997 Apple Computer, Inc.
24: *
25: *
26: * HISTORY
27: *
28: * Simon Douglas 22 Oct 97
29: * - first checked in.
30: */
31:
32:
33: /*
34: File: Video.h
35:
36: Contains: Video Driver Interfaces.
37:
38: Version: System 7.5
39:
40: DRI: Fernando Urbina
41:
42: Copyright: � 1984-1996 by Apple Computer, Inc.
43: All rights reserved.
44:
45: Warning: *** APPLE INTERNAL USE ONLY ***
46: This file may contain unreleased API's
47:
48: BuildInfo: Built by: Simon Douglas
49: With Interfacer: 2.0d13 (PowerPC native)
50: From: Video.i
51: Revision: 53
52: Dated: 12/13/96
53: Last change by: IH
54: Last comment: Define a bit for built-in display modes.
55:
56: Bugs: Report bugs to Radar component �System Interfaces�, �Latest�
57: List the version information (from above) in the Problem Description.
58:
59: */
60: #ifndef _IOKIT_IOMACOSVIDEO_H
61: #define _IOKIT_IOMACOSVIDEO_H
62:
63: #include <IOKit/ndrvsupport/IOMacOSTypes.h>
64:
65: #ifdef __cplusplus
66: extern "C" {
67: #endif
68:
69: #pragma options align=mac68k
70:
71:
72: enum {
73: mBaseOffset = 1, /*Id of mBaseOffset.*/
74: mRowBytes = 2, /*Video sResource parameter Id's */
75: mBounds = 3, /*Video sResource parameter Id's */
76: mVersion = 4, /*Video sResource parameter Id's */
77: mHRes = 5, /*Video sResource parameter Id's */
78: mVRes = 6, /*Video sResource parameter Id's */
79: mPixelType = 7, /*Video sResource parameter Id's */
80: mPixelSize = 8, /*Video sResource parameter Id's */
81: mCmpCount = 9, /*Video sResource parameter Id's */
82: mCmpSize = 10, /*Video sResource parameter Id's */
83: mPlaneBytes = 11, /*Video sResource parameter Id's */
84: mVertRefRate = 14, /*Video sResource parameter Id's */
85: mVidParams = 1, /*Video parameter block id.*/
86: mTable = 2, /*Offset to the table.*/
87: mPageCnt = 3, /*Number of pages*/
88: mDevType = 4, /*Device Type*/
89: oneBitMode = 128, /*Id of OneBitMode Parameter list.*/
90: twoBitMode = 129, /*Id of TwoBitMode Parameter list.*/
91: fourBitMode = 130, /*Id of FourBitMode Parameter list.*/
92: eightBitMode = 131 /*Id of EightBitMode Parameter list.*/
93: };
94:
95:
96: enum {
97: sixteenBitMode = 132, /*Id of SixteenBitMode Parameter list.*/
98: thirtyTwoBitMode = 133, /*Id of ThirtyTwoBitMode Parameter list.*/
99: firstVidMode = 128, /*The new, better way to do the above. */
100: secondVidMode = 129, /* QuickDraw only supports six video */
101: thirdVidMode = 130, /* at this time. */
102: fourthVidMode = 131,
103: fifthVidMode = 132,
104: sixthVidMode = 133,
105: spGammaDir = 64,
106: spVidNamesDir = 65
107: };
108:
109: /* csTimingFormat values in VDTimingInfo */
110: /* look in the declaration rom for timing info */
111:
112: enum {
113: kDeclROMtables = 0x6465636c //'decl'
114: };
115:
116: /* Size of a block of EDID (Extended Display Identification Data) */
117:
118: enum {
119: kDDCBlockSize = 128
120: };
121:
122: /* ddcBlockType constants*/
123:
124: enum {
125: kDDCBlockTypeEDID = 0 /* EDID block type. */
126: };
127:
128: /* ddcFlags constants*/
129:
130: enum {
131: kDDCForceReadBit = 0, /* Force a new read of the EDID. */
132: kDDCForceReadMask = (1 << kDDCForceReadBit) /* Mask for kddcForceReadBit. */
133: };
134:
135: /*
136: Timing mode constants for Display Manager MultiMode support
137: Corresponding .h equates are in Video.h
138: .a equates are in Video.a
139: .r equates are in DepVideoEqu.r
140:
141: The second enum is the old names (for compatibility).
142: The first enum is the new names.
143: */
144:
145: enum {
146: timingInvalid = 0, /* Unknown timing� force user to confirm. */
147: timingInvalid_SM_T24 = 8, /* Work around bug in SM Thunder24 card.*/
148: timingApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/
149: timingApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */
150: timingApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */
151: timingApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */
152: timingApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */
153: timingVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */
154: timingVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */
155: timingVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */
156: timingVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */
157: timingGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */
158: timingApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/
159: timingApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/
160: timingApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/
161: timingVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */
162: timingVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */
163: timingVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */
164: timingVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */
165: timingVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */
166: timingVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */
167: timingVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */
168: timingVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to timingApple_1024x768_75hz). */
169: timingVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */
170: timingApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */
171: timingApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */
172: timingAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */
173: timingAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */
174: timingAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */
175: timingAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */
176: timingApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */
177: timingApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */
178: timingApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */
179: timingApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */
180: timingVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */
181: timingVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */
182: timingVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */
183: timingVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */
184: timingVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */
185: timingVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */
186: timingVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */
187: timingVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */
188: timingVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */
189: timingVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */
190: timingVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */
191: timingVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */
192: timingVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */
193: timingVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */
194: timingVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */
195: timingVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */
196: timingVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */
197: timingVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */
198: timingSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */
199: timingFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */
200: timingSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */
201: timingSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */
202: timingSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */
203: timingSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */
204: timingApple_0x0_0hz_Offline = 550 /* Indicates that this timing will take the display off-line and remove it from the system. */
205: };
206:
207:
208: enum {
209: timingApple12 = timingApple_512x384_60hz,
210: timingApple12x = timingApple_560x384_60hz,
211: timingApple13 = timingApple_640x480_67hz,
212: timingApple13x = timingApple_640x400_67hz,
213: timingAppleVGA = timingVESA_640x480_60hz,
214: timingApple15 = timingApple_640x870_75hz,
215: timingApple15x = timingApple_640x818_75hz,
216: timingApple16 = timingApple_832x624_75hz,
217: timingAppleSVGA = timingVESA_800x600_56hz,
218: timingApple1Ka = timingVESA_1024x768_60hz,
219: timingApple1Kb = timingVESA_1024x768_70hz,
220: timingApple19 = timingApple_1024x768_75hz,
221: timingApple21 = timingApple_1152x870_75hz
222: };
223:
224: /* csConnectFlags values in VDDisplayConnectInfo */
225:
226: enum {
227: kAllModesValid = 0, /* All modes not trimmed by primary init are good close enough to try */
228: kAllModesSafe = 1, /* All modes not trimmed by primary init are know to be safe */
229: kReportsTagging = 2, /* Can detect tagged displays (to identify smart monitors) */
230: kHasDirectConnection = 3, /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */
231: kIsMonoDev = 4, /* Says whether there�s an RGB (0) or Monochrome (1) connection. */
232: kUncertainConnection = 5, /* There may not be a display (no sense lines?). */
233: kTaggingInfoNonStandard = 6, /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */
234: kReportsDDCConnection = 7, /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */
235: kHasDDCConnection = 8, /* Card has ddc connect now. */
236: kConnectionInactive = 9, /* Set when the connection is NOT currently active (generally used in a multiconnection environment). */
237: kDependentConnection = 10, /* Set when some ascpect of THIS connection depends on another (will generally be set in a kModeSimulscan environment). */
238: kBuiltInConnection = 11 /* Set when connection is KNOWN to be built-in (this is not the same as kHasDirectConnection). */
239: };
240:
241: /* csDisplayType values in VDDisplayConnectInfo */
242:
243: enum {
244: kUnknownConnect = 1, /* Not sure how we�ll use this, but seems like a good idea. */
245: kPanelConnect = 2, /* For use with fixed-in-place LCD panels. */
246: kPanelTFTConnect = 2, /* Alias for kPanelConnect */
247: kFixedModeCRTConnect = 3, /* For use with fixed-mode (i.e., very limited range) displays. */
248: kMultiModeCRT1Connect = 4, /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */
249: kMultiModeCRT2Connect = 5, /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */
250: kMultiModeCRT3Connect = 6, /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */
251: kMultiModeCRT4Connect = 7, /* Expansion to large multi mode (not yet used) */
252: kModelessConnect = 8, /* Expansion to modeless model (not yet used) */
253: kFullPageConnect = 9, /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */
254: kVGAConnect = 10, /* 640x480 VGA default -- question everything else */
255: kNTSCConnect = 11, /* NTSC ST (default), FF, STconv, FFconv */
256: kPALConnect = 12, /* PAL ST (default), FF, STconv, FFconv */
257: kHRConnect = 13, /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) */
258: kPanelFSTNConnect = 14, /* For use with fixed-in-place LCD FSTN (aka �Supertwist�) panels */
259: kMonoTwoPageConnect = 15, /* 1152x870 Apple color two-page display */
260: kColorTwoPageConnect = 16, /* 1152x870 Apple B&W two-page display */
261: kColor16Connect = 17, /* 832x624 Apple B&W two-page display */
262: kColor19Connect = 18, /* 1024x768 Apple B&W two-page display */
263: kGenericCRT = 19, /* Indicates nothing except that connection is CRT in nature. */
264: kGenericLCD = 20, /* Indicates nothing except that connection is LCD in nature. */
265: kDDCConnect = 21 /* DDC connection, always set kHasDDCConnection */
266: };
267:
268: /* csTimingFlags values in VDTimingInfoRec */
269:
270: enum {
271: kModeValid = 0, /* Says that this mode should NOT be trimmed. */
272: kModeSafe = 1, /* This mode does not need confirmation */
273: kModeDefault = 2, /* This is the default mode for this type of connection */
274: kModeShowNow = 3, /* This mode should always be shown (even though it may require a confirm) */
275: kModeNotResize = 4, /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */
276: kModeRequiresPan = 5, /* This mode has more pixels than are actually displayed */
277: kModeInterlaced = 6, /* This mode is interlaced (single pixel lines look bad). */
278: kModeShowNever = 7, /* This mode should not be shown in the user interface. */
279: kModeSimulscan = 8, /* Indicates that more than one display connection can be driven from a single framebuffer controller. */
280: kModeNotPreset = 9, /* Indicates that the timing is not a factory preset for the current display (geometry may need correction) */
281: kModeBuiltIn = 10 /* Indicates that the display mode is for the built-in connect only (on multiconnect devices like the PB 3400) Only the driver is quieried */
282: };
283:
284: /* csDepthFlags in VDVideoParametersInfoRec */
285:
286: enum {
287: kDepthDependent = 0 /* Says that this depth mode may cause dependent changes in other framebuffers (and . */
288: };
289:
290: /* csResolutionFlags bit flags for VDResolutionInfoRec */
291:
292: enum {
293: kResolutionHasMultipleDepthSizes = 0 /* Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) */
294: };
295:
296:
297: enum {
298: /* Power Mode constants for VDPowerStateRec.powerState. */
299: kAVPowerOff = 0,
300: kAVPowerStandby = 1,
301: kAVPowerSuspend = 2,
302: kAVPowerOn = 3
303: };
304:
305:
306: enum {
307: /* Power Mode masks and bits for VDPowerStateRec.powerFlags. */
308: kPowerStateNeedsRefresh = 0,
309: kPowerStateNeedsRefreshMask = (1L << 0)
310: };
311:
312:
313: enum {
314: /* Control Codes */
315: cscReset = 0,
316: cscKillIO = 1,
317: cscSetMode = 2,
318: cscSetEntries = 3,
319: cscSetGamma = 4,
320: cscGrayPage = 5,
321: cscGrayScreen = 5,
322: cscSetGray = 6,
323: cscSetInterrupt = 7,
324: cscDirectSetEntries = 8,
325: cscSetDefaultMode = 9,
326: cscSwitchMode = 10,
327: cscSetSync = 11,
328: cscSavePreferredConfiguration = 16,
329: cscSetHardwareCursor = 22,
330: cscDrawHardwareCursor = 23,
331: cscSetConvolution = 24,
332: cscSetPowerState = 25,
333: cscPrivateControlCall = 26, /* Takes a VDPrivateSelectorDataRec*/
334: cscSetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
335: cscSetClutBehavior = 29, /* Takes a VDClutBehavior */
336: cscUnusedCall = 127 /* This call used to expend the scrn resource. Its imbedded data contains more control info */
337: };
338:
339:
340: enum {
341: /* Status Codes */
342: cscGetMode = 2,
343: cscGetEntries = 3,
344: cscGetPageCnt = 4,
345: cscGetPages = 4, /* This is what C&D 2 calls it. */
346: cscGetPageBase = 5,
347: cscGetBaseAddr = 5, /* This is what C&D 2 calls it. */
348: cscGetGray = 6,
349: cscGetInterrupt = 7,
350: cscGetGamma = 8,
351: cscGetDefaultMode = 9,
352: cscGetCurMode = 10,
353: cscGetSync = 11,
354: cscGetConnection = 12, /* Return information about the connection to the display */
355: cscGetModeTiming = 13, /* Return timing info for a mode */
356: cscGetModeBaseAddress = 14, /* Return base address information about a particular mode */
357: cscGetScanProc = 15, /* QuickTime scan chasing routine */
358: cscGetPreferredConfiguration = 16,
359: cscGetNextResolution = 17,
360: cscGetVideoParameters = 18,
361: cscGetGammaInfoList = 20,
362: cscRetrieveGammaTable = 21,
363: cscSupportsHardwareCursor = 22,
364: cscGetHardwareCursorDrawState = 23,
365: cscGetConvolution = 24,
366: cscGetPowerState = 25,
367: cscPrivateStatusCall = 26, /* Takes a VDPrivateSelectorDataRec*/
368: cscGetDDCBlock = 27, /* Takes a VDDDCBlockRec */
369: cscGetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
370: cscGetClutBehavior = 29 /* Takes a VDClutBehavior */
371: };
372:
373: /* Bit definitions for the Get/Set Sync call*/
374:
375: enum {
376: kDisableHorizontalSyncBit = 0,
377: kDisableVerticalSyncBit = 1,
378: kDisableCompositeSyncBit = 2,
379: kEnableSyncOnBlue = 3,
380: kEnableSyncOnGreen = 4,
381: kEnableSyncOnRed = 5,
382: kNoSeparateSyncControlBit = 6,
383: kTriStateSyncBit = 7,
384: kHorizontalSyncMask = 0x01,
385: kVerticalSyncMask = 0x02,
386: kCompositeSyncMask = 0x04,
387: kDPMSSyncMask = 0x07,
388: kTriStateSyncMask = 0x80,
389: kSyncOnBlueMask = 0x08,
390: kSyncOnGreenMask = 0x10,
391: kSyncOnRedMask = 0x20,
392: kSyncOnMask = 0x38
393: };
394:
395:
396: enum {
397: /* Power Mode constants for translating DPMS modes to Get/SetSync calls. */
398: kDPMSSyncOn = 0,
399: kDPMSSyncStandby = 1,
400: kDPMSSyncSuspend = 2,
401: kDPMSSyncOff = 7
402: };
403:
404: /* Bit definitions for the Get/Set Convolution call*/
405:
406: enum {
407: kConvolved = 0,
408: kLiveVideoPassThru = 1,
409: kConvolvedMask = 0x01,
410: kLiveVideoPassThruMask = 0x02
411: };
412:
413: struct VPBlock {
414: long vpBaseOffset; /*Offset to page zero of video RAM (From minorBaseOS).*/
415: short vpRowBytes; /*Width of each row of video memory.*/
416: Rect vpBounds; /*BoundsRect for the video display (gives dimensions).*/
417: short vpVersion; /*PixelMap version number.*/
418: short vpPackType;
419: long vpPackSize;
420: long vpHRes; /*Horizontal resolution of the device (pixels per inch).*/
421: long vpVRes; /*Vertical resolution of the device (pixels per inch).*/
422: short vpPixelType; /*Defines the pixel type.*/
423: short vpPixelSize; /*Number of bits in pixel.*/
424: short vpCmpCount; /*Number of components in pixel.*/
425: short vpCmpSize; /*Number of bits per component*/
426: long vpPlaneBytes; /*Offset from one plane to the next.*/
427: };
428: typedef struct VPBlock VPBlock;
429:
430: typedef VPBlock *VPBlockPtr;
431: struct VDEntryRecord {
432: Ptr csTable; /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
433: };
434: typedef struct VDEntryRecord VDEntryRecord;
435:
436: typedef VDEntryRecord *VDEntRecPtr;
437: /* Parm block for SetGray control call */
438: struct VDGrayRecord {
439: Boolean csMode; /*Same as GDDevType value (0=color, 1=mono)*/
440: SInt8 filler;
441: };
442: typedef struct VDGrayRecord VDGrayRecord;
443:
444: typedef VDGrayRecord *VDGrayPtr;
445: /* Parm block for SetInterrupt call */
446: struct VDFlagRecord {
447: SInt8 csMode;
448: SInt8 filler;
449: };
450: typedef struct VDFlagRecord VDFlagRecord;
451:
452: typedef VDFlagRecord *VDFlagRecPtr;
453: /* Parm block for SetEntries control call */
454: struct VDSetEntryRecord {
455: ColorSpec * csTable; /*Pointer to an array of color specs*/
456: short csStart; /*Which spec in array to start with, or -1*/
457: short csCount; /*Number of color spec entries to set*/
458: };
459: typedef struct VDSetEntryRecord VDSetEntryRecord;
460:
461: typedef VDSetEntryRecord *VDSetEntryPtr;
462: /* Parm block for SetGamma control call */
463: struct VDGammaRecord {
464: Ptr csGTable; /*pointer to gamma table*/
465: };
466: typedef struct VDGammaRecord VDGammaRecord;
467:
468: typedef VDGammaRecord *VDGamRecPtr;
469: struct VDBaseAddressInfoRec {
470: long csDevData; /* LONGINT - (long) timing mode */
471: long csDevBase; /* LONGINT - (long) base address of the mode */
472: short csModeReserved; /* INTEGER - (short) will some day be the depth */
473: long csModeBase; /* LONGINT - (long) reserved */
474: };
475: typedef struct VDBaseAddressInfoRec VDBaseAddressInfoRec;
476:
477: typedef VDBaseAddressInfoRec *VDBaseAddressInfoPtr;
478: struct VDSwitchInfoRec {
479: unsigned short csMode; /*(word) mode depth*/
480: unsigned long csData; /*(long) functional sResource of mode*/
481: unsigned short csPage; /*(word) page to switch in*/
482: Ptr csBaseAddr; /*(long) base address of page (return value)*/
483: unsigned long csReserved; /*(long) Reserved (set to 0) */
484: };
485: typedef struct VDSwitchInfoRec VDSwitchInfoRec;
486:
487: typedef VDSwitchInfoRec *VDSwitchInfoPtr;
488: struct VDTimingInfoRec {
489: unsigned long csTimingMode; /* LONGINT - (long) timing mode (a la InitGDevice) */
490: unsigned long csTimingReserved; /* LONGINT - (long) reserved */
491: unsigned long csTimingFormat; /* LONGINT - (long) what format is the timing info */
492: unsigned long csTimingData; /* LONGINT - (long) data supplied by driver */
493: unsigned long csTimingFlags; /* LONGINT - (long) mode within device */
494: };
495: typedef struct VDTimingInfoRec VDTimingInfoRec;
496:
497: typedef VDTimingInfoRec *VDTimingInfoPtr;
498: struct VDDisplayConnectInfoRec {
499: unsigned short csDisplayType; /* INTEGER - (word) Type of display connected */
500: unsigned char csConnectTaggedType; /* BYTE - type of tagging */
501: unsigned char csConnectTaggedData; /* BYTE - tagging data */
502: unsigned long csConnectFlags; /* LONGINT - (long) tell us about the connection */
503: unsigned long csDisplayComponent; /* LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) */
504: unsigned long csConnectReserved; /* LONGINT - (long) reserved */
505: };
506: typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec;
507:
508: typedef VDDisplayConnectInfoRec *VDDisplayConnectInfoPtr;
509: struct VDMultiConnectInfoRec {
510: unsigned long csDisplayCountOrNumber; /* For GetMultiConnect, returns count n of 1..n connections; otherwise, indicates the ith connection.*/
511: VDDisplayConnectInfoRec csConnectInfo; /* Standard VDDisplayConnectionInfo for connection i.*/
512: };
513: typedef struct VDMultiConnectInfoRec VDMultiConnectInfoRec;
514:
515: typedef VDMultiConnectInfoRec *VDMultiConnectInfoPtr;
516: /*
517: RawSenseCode
518: This abstract data type is not exactly abstract. Rather, it is merely enumerated constants
519: for the possible raw sense code values when 'standard' sense code hardware is implemented.
520:
521: For 'standard' sense code hardware, the raw sense is obtained as follows:
522: � Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
523: � Read the state of the monitor sense lines 2, 1, and 0. (2 is the MSB, 0 the LSB)
524:
525: IMPORTANT Note:
526: When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants
527: are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo'
528:
529: */
530: typedef unsigned char RawSenseCode;
531:
532: enum {
533: kRSCZero = 0,
534: kRSCOne = 1,
535: kRSCTwo = 2,
536: kRSCThree = 3,
537: kRSCFour = 4,
538: kRSCFive = 5,
539: kRSCSix = 6,
540: kRSCSeven = 7
541: };
542:
543: /*
544: ExtendedSenseCode
545: This abstract data type is not exactly abstract. Rather, it is merely enumerated constants
546: for the values which are possible when the extended sense algorithm is applied to hardware
547: which implements 'standard' sense code hardware.
548:
549: For 'standard' sense code hardware, the extended sense code algorithm is as follows:
550: (Note: as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
551: � Drive sense line 'A' low and read the values of 'B' and 'C'.
552: � Drive sense line 'B' low and read the values of 'A' and 'C'.
553: � Drive sense line 'C' low and read the values of 'A' and 'B'.
554:
555: In this way, a six-bit number of the form BC/AC/AB is generated.
556:
557: IMPORTANT Note:
558: When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants
559: are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo'
560:
561: */
562: typedef unsigned char ExtendedSenseCode;
563:
564: enum {
565: kESCZero21Inch = 0x00, /* 21" RGB */
566: kESCOnePortraitMono = 0x14, /* Portrait Monochrome */
567: kESCTwo12Inch = 0x21, /* 12" RGB */
568: kESCThree21InchRadius = 0x31, /* 21" RGB (Radius) */
569: kESCThree21InchMonoRadius = 0x34, /* 21" Monochrome (Radius) */
570: kESCThree21InchMono = 0x35, /* 21" Monochrome */
571: kESCFourNTSC = 0x0A, /* NTSC */
572: kESCFivePortrait = 0x1E, /* Portrait RGB */
573: kESCSixMSB1 = 0x03, /* MultiScan Band-1 (12" thru 1Six") */
574: kESCSixMSB2 = 0x0B, /* MultiScan Band-2 (13" thru 19") */
575: kESCSixMSB3 = 0x23, /* MultiScan Band-3 (13" thru 21") */
576: kESCSixStandard = 0x2B, /* 13"/14" RGB or 12" Monochrome */
577: kESCSevenPAL = 0x00, /* PAL */
578: kESCSevenNTSC = 0x14, /* NTSC */
579: kESCSevenVGA = 0x17, /* VGA */
580: kESCSeven16Inch = 0x2D, /* 16" RGB (GoldFish) */
581: kESCSevenPALAlternate = 0x30, /* PAL (Alternate) */
582: kESCSeven19Inch = 0x3A, /* Third-Party 19� */
583: kESCSevenNoDisplay = 0x3F /* No display connected */
584: };
585:
586: /*
587: DepthMode
588: This abstract data type is used to to reference RELATIVE pixel depths.
589: Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
590:
591: Bits per pixel DOES NOT directly map to 'DepthMode' For example, on some
592: graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
593: hardware, 'kDepthMode1' may represent 8BPP.
594:
595: DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
596: behave as expected. The values of the constants which comprise the set are such
597: that 'kDepthMode4 < kDepthMode6' behaves as expected.
598: */
599: typedef unsigned short DepthMode;
600:
601: enum {
602: kDepthMode1 = 128,
603: kDepthMode2 = 129,
604: kDepthMode3 = 130,
605: kDepthMode4 = 131,
606: kDepthMode5 = 132,
607: kDepthMode6 = 133
608: };
609:
610:
611: enum {
612: kFirstDepthMode = 128, /* These constants are obsolete, and just included */
613: kSecondDepthMode = 129, /* for clients that have converted to the above */
614: kThirdDepthMode = 130, /* kDepthModeXXX constants. */
615: kFourthDepthMode = 131,
616: kFifthDepthMode = 132,
617: kSixthDepthMode = 133
618: };
619:
620: struct VDPageInfo {
621: short csMode; /*(word) mode within device*/
622: long csData; /*(long) data supplied by driver*/
623: short csPage; /*(word) page to switch in*/
624: Ptr csBaseAddr; /*(long) base address of page*/
625: };
626: typedef struct VDPageInfo VDPageInfo;
627:
628: typedef VDPageInfo *VDPgInfoPtr;
629: struct VDSizeInfo {
630: short csHSize; /*(word) desired/returned h size*/
631: short csHPos; /*(word) desired/returned h position*/
632: short csVSize; /*(word) desired/returned v size*/
633: short csVPos; /*(word) desired/returned v position*/
634: };
635: typedef struct VDSizeInfo VDSizeInfo;
636:
637: typedef VDSizeInfo *VDSzInfoPtr;
638: struct VDSettings {
639: short csParamCnt; /*(word) number of params*/
640: short csBrightMax; /*(word) max brightness*/
641: short csBrightDef; /*(word) default brightness*/
642: short csBrightVal; /*(word) current brightness*/
643: short csCntrstMax; /*(word) max contrast*/
644: short csCntrstDef; /*(word) default contrast*/
645: short csCntrstVal; /*(word) current contrast*/
646: short csTintMax; /*(word) max tint*/
647: short csTintDef; /*(word) default tint*/
648: short csTintVal; /*(word) current tint*/
649: short csHueMax; /*(word) max hue*/
650: short csHueDef; /*(word) default hue*/
651: short csHueVal; /*(word) current hue*/
652: short csHorizDef; /*(word) default horizontal*/
653: short csHorizVal; /*(word) current horizontal*/
654: short csHorizMax; /*(word) max horizontal*/
655: short csVertDef; /*(word) default vertical*/
656: short csVertVal; /*(word) current vertical*/
657: short csVertMax; /*(word) max vertical*/
658: };
659: typedef struct VDSettings VDSettings;
660:
661: typedef VDSettings *VDSettingsPtr;
662: struct VDDefMode {
663: UInt8 csID;
664: SInt8 filler;
665: };
666: typedef struct VDDefMode VDDefMode;
667:
668: typedef VDDefMode *VDDefModePtr;
669: struct VDSyncInfoRec {
670: UInt8 csMode;
671: UInt8 csFlags;
672: };
673: typedef struct VDSyncInfoRec VDSyncInfoRec;
674:
675: typedef VDSyncInfoRec *VDSyncInfoPtr;
676: typedef unsigned long DisplayModeID;
677: typedef unsigned long VideoDeviceType;
678: typedef unsigned long GammaTableID;
679: /* Constants for the GetNextResolution call */
680:
681: enum {
682: kDisplayModeIDCurrent = 0x00, /* Reference the Current DisplayModeID */
683: kDisplayModeIDInvalid = 0xFFFFFFFF, /* A bogus DisplayModeID in all cases */
684: kDisplayModeIDFindFirstResolution = 0xFFFFFFFE, /* Used in cscGetNextResolution to reset iterator */
685: kDisplayModeIDNoMoreResolutions = 0xFFFFFFFD /* Used in cscGetNextResolution to indicate End Of List */
686: };
687:
688: /* Constants for the GetGammaInfoList call */
689:
690: enum {
691: kGammaTableIDFindFirst = 0xFFFFFFFE, /* Get the first gamma table ID */
692: kGammaTableIDNoMoreTables = 0xFFFFFFFD, /* Used to indicate end of list */
693: kGammaTableIDSpecific = 0x00 /* Return the info for the given table id */
694: };
695:
696: /* Constants for GetMultiConnect call*/
697:
698: enum {
699: kGetConnectionCount = 0xFFFFFFFF, /* Used to get the number of possible connections in a �multi-headed� framebuffer environment.*/
700: kActivateConnection = (0 << kConnectionInactive), /* Used for activating a connection (csConnectFlags value).*/
701: kDeactivateConnection = (1 << kConnectionInactive) /* Used for deactivating a connection (csConnectFlags value.)*/
702: };
703:
704: struct VDResolutionInfoRec {
705: DisplayModeID csPreviousDisplayModeID; /* ID of the previous resolution in a chain */
706: DisplayModeID csDisplayModeID; /* ID of the next resolution */
707: unsigned long csHorizontalPixels; /* # of pixels in a horizontal line at the max depth */
708: unsigned long csVerticalLines; /* # of lines in a screen at the max depth */
709: Fixed csRefreshRate; /* Vertical Refresh Rate in Hz */
710: DepthMode csMaxDepthMode; /* 0x80-based number representing max bit depth */
711: unsigned long csResolutionFlags; /* Reserved - flag bits */
712: unsigned long csReserved; /* Reserved */
713: };
714: typedef struct VDResolutionInfoRec VDResolutionInfoRec;
715:
716: typedef VDResolutionInfoRec *VDResolutionInfoPtr;
717: struct VDVideoParametersInfoRec {
718: DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */
719: DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */
720: VPBlockPtr csVPBlockPtr; /* Pointer to a video parameter block */
721: unsigned long csPageCount; /* Number of pages supported by the resolution */
722: VideoDeviceType csDeviceType; /* Device Type: Direct, Fixed or CLUT; */
723: UInt32 csDepthFlags; /* Flags */
724: };
725: typedef struct VDVideoParametersInfoRec VDVideoParametersInfoRec;
726:
727: typedef VDVideoParametersInfoRec *VDVideoParametersInfoPtr;
728: struct VDGammaInfoRec {
729: GammaTableID csLastGammaID; /* the ID of the previous gamma table */
730: GammaTableID csNextGammaID; /* the ID of the next gamma table */
731: Ptr csGammaPtr; /* Ptr to a gamma table data */
732: unsigned long csReserved; /* Reserved */
733: };
734: typedef struct VDGammaInfoRec VDGammaInfoRec;
735:
736: typedef VDGammaInfoRec *VDGammaInfoPtr;
737: struct VDGetGammaListRec {
738: GammaTableID csPreviousGammaTableID; /* ID of the previous gamma table */
739: GammaTableID csGammaTableID; /* ID of the gamma table following csPreviousDisplayModeID */
740: unsigned long csGammaTableSize; /* Size of the gamma table in bytes */
741: char * csGammaTableName; /* Gamma table name (c-string) */
742: };
743: typedef struct VDGetGammaListRec VDGetGammaListRec;
744:
745: typedef VDGetGammaListRec *VDGetGammaListPtr;
746: struct VDRetrieveGammaRec {
747: GammaTableID csGammaTableID; /* ID of gamma table to retrieve */
748: GammaTbl * csGammaTablePtr; /* Location to copy desired gamma to */
749: };
750: typedef struct VDRetrieveGammaRec VDRetrieveGammaRec;
751:
752: typedef VDRetrieveGammaRec *VDRetrieveGammaPtr;
753: struct VDSetHardwareCursorRec {
754: void * csCursorRef; /* reference to cursor data */
755: UInt32 csReserved1; /* reserved for future use */
756: UInt32 csReserved2; /* should be ignored */
757: };
758: typedef struct VDSetHardwareCursorRec VDSetHardwareCursorRec;
759:
760: typedef VDSetHardwareCursorRec *VDSetHardwareCursorPtr;
761: struct VDDrawHardwareCursorRec {
762: SInt32 csCursorX; /* x coordinate */
763: SInt32 csCursorY; /* y coordinate */
764: UInt32 csCursorVisible; /* true if cursor is must be visible */
765: UInt32 csReserved1; /* reserved for future use */
766: UInt32 csReserved2; /* should be ignored */
767: };
768: typedef struct VDDrawHardwareCursorRec VDDrawHardwareCursorRec;
769:
770: typedef VDDrawHardwareCursorRec *VDDrawHardwareCursorPtr;
771: struct VDSupportsHardwareCursorRec {
772: UInt32 csSupportsHardwareCursor;
773: /* true if hardware cursor is supported */
774: UInt32 csReserved1; /* reserved for future use */
775: UInt32 csReserved2; /* must be zero */
776: };
777: typedef struct VDSupportsHardwareCursorRec VDSupportsHardwareCursorRec;
778:
779: typedef VDSupportsHardwareCursorRec *VDSupportsHardwareCursorPtr;
780: struct VDHardwareCursorDrawStateRec {
781: SInt32 csCursorX; /* x coordinate */
782: SInt32 csCursorY; /* y coordinate */
783: UInt32 csCursorVisible; /* true if cursor is visible */
784: UInt32 csCursorSet; /* true if cursor successfully set by last set control call */
785: UInt32 csReserved1; /* reserved for future use */
786: UInt32 csReserved2; /* must be zero */
787: };
788: typedef struct VDHardwareCursorDrawStateRec VDHardwareCursorDrawStateRec;
789:
790: typedef VDHardwareCursorDrawStateRec *VDHardwareCursorDrawStatePtr;
791: struct VDConvolutionInfoRec {
792: DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */
793: DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */
794: unsigned long csPage;
795: UInt32 csFlags;
796: UInt32 csReserved;
797: };
798: typedef struct VDConvolutionInfoRec VDConvolutionInfoRec;
799:
800: typedef VDConvolutionInfoRec *VDConvolutionInfoPtr;
801: struct VDPowerStateRec {
802: unsigned long powerState;
803: unsigned long powerFlags;
804:
805: unsigned long powerReserved1;
806: unsigned long powerReserved2;
807: };
808: typedef struct VDPowerStateRec VDPowerStateRec;
809:
810: typedef VDPowerStateRec *VDPowerStatePtr;
811: /*
812: Private Data to video drivers.
813:
814: In versions of MacOS with multiple address spaces (System 8), the OS
815: must know the extent of parameters in order to move them between the caller
816: and driver. The old private-selector model for video drivers does not have
817: this information so:
818:
819: For post-7.x Systems private calls should be implemented using the cscPrivateCall
820: */
821: struct VDPrivateSelectorDataRec {
822: LogicalAddress privateParameters; /* Caller's parameters*/
823: ByteCount privateParametersSize; /* Size of data sent from caller to driver*/
824: LogicalAddress privateResults; /* Caller's return area. Can be nil, or same as privateParameters.*/
825: ByteCount privateResultsSize; /* Size of data driver returns to caller. Can be nil, or same as privateParametersSize.*/
826: };
827: typedef struct VDPrivateSelectorDataRec VDPrivateSelectorDataRec;
828:
829: struct VDPrivateSelectorRec {
830: UInt32 reserved; /* Reserved (set to 0). */
831: VDPrivateSelectorDataRec data[1];
832: };
833: typedef struct VDPrivateSelectorRec VDPrivateSelectorRec;
834:
835: struct VDDDCBlockRec {
836: UInt32 ddcBlockNumber; /* Input -- DDC EDID (Extended Display Identification Data) number (1-based) */
837: ResType ddcBlockType; /* Input -- DDC block type (EDID/VDIF) */
838: UInt32 ddcFlags; /* Input -- DDC Flags*/
839: UInt32 ddcReserved; /* Reserved */
840: Byte ddcBlockData[128]; /* Output -- DDC EDID/VDIF data (kDDCBlockSize) */
841: };
842: typedef struct VDDDCBlockRec VDDDCBlockRec;
843:
844: typedef VDDDCBlockRec *VDDDCBlockPtr;
845: typedef UInt32 VDClutBehavior;
846: typedef VDClutBehavior *VDClutBehaviorPtr;
847:
848: enum {
849: kSetClutAtSetEntries = 0, /* SetEntries behavior is to update clut during SetEntries call*/
850: kSetClutAtVBL = 1 /* SetEntries behavior is to upate clut at next vbl*/
851: };
852:
853:
854: #pragma options align=reset
855:
856: #ifdef __cplusplus
857: }
858: #endif
859:
860: #endif /* ! _IOKIT_IOMACOSVIDEO_H */
861:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.