Video.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:58k
源码类别:

多媒体编程

开发平台:

Visual C++

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