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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Displays.h
  3.  
  4.      Contains:   Display Manager Interfaces.
  5.  
  6.      Version:    Technology: Mac OS 8
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1993-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 __DISPLAYS__
  18. #define __DISPLAYS__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __COMPONENTS__
  23. #include "Components.h"
  24. #endif
  25. #ifndef __VIDEO__
  26. #include "Video.h"
  27. #endif
  28. #ifndef __APPLEEVENTS__
  29. #include "AppleEvents.h"
  30. #endif
  31. #ifndef __EVENTS__
  32. #include "Events.h"
  33. #endif
  34. #ifndef __PROCESSES__
  35. #include "Processes.h"
  36. #endif
  37. #ifndef __DIALOGS__
  38. #include "Dialogs.h"
  39. #endif
  40. #if PRAGMA_ONCE
  41. #pragma once
  42. #endif
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. #if PRAGMA_IMPORT
  47. #pragma import on
  48. #endif
  49. #if PRAGMA_STRUCT_ALIGN
  50.     #pragma options align=mac68k
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52.     #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54.     #pragma pack(2)
  55. #endif
  56. enum {
  57.                                                                 /* AppleEvents Core Suite */
  58.     kAESystemConfigNotice       = FOUR_CHAR_CODE('cnfg'),       /* Core Suite types */
  59.     kAEDisplayNotice            = FOUR_CHAR_CODE('dspl'),
  60.     kAEDisplaySummary           = FOUR_CHAR_CODE('dsum'),
  61.     keyDMConfigVersion          = FOUR_CHAR_CODE('dmcv'),
  62.     keyDMConfigFlags            = FOUR_CHAR_CODE('dmcf'),
  63.     keyDMConfigReserved         = FOUR_CHAR_CODE('dmcr'),
  64.     keyDisplayID                = FOUR_CHAR_CODE('dmid'),
  65.     keyDisplayComponent         = FOUR_CHAR_CODE('dmdc'),
  66.     keyDisplayDevice            = FOUR_CHAR_CODE('dmdd'),
  67.     keyDisplayFlags             = FOUR_CHAR_CODE('dmdf'),
  68.     keyDisplayMode              = FOUR_CHAR_CODE('dmdm'),
  69.     keyDisplayModeReserved      = FOUR_CHAR_CODE('dmmr'),
  70.     keyDisplayReserved          = FOUR_CHAR_CODE('dmdr'),
  71.     keyDisplayMirroredId        = FOUR_CHAR_CODE('dmmi'),
  72.     keyDeviceFlags              = FOUR_CHAR_CODE('dddf'),
  73.     keyDeviceDepthMode          = FOUR_CHAR_CODE('dddm'),
  74.     keyDeviceRect               = FOUR_CHAR_CODE('dddr'),
  75.     keyPixMapRect               = FOUR_CHAR_CODE('dpdr'),
  76.     keyPixMapHResolution        = FOUR_CHAR_CODE('dphr'),
  77.     keyPixMapVResolution        = FOUR_CHAR_CODE('dpvr'),
  78.     keyPixMapPixelType          = FOUR_CHAR_CODE('dppt'),
  79.     keyPixMapPixelSize          = FOUR_CHAR_CODE('dpps'),
  80.     keyPixMapCmpCount           = FOUR_CHAR_CODE('dpcc'),
  81.     keyPixMapCmpSize            = FOUR_CHAR_CODE('dpcs'),
  82.     keyPixMapAlignment          = FOUR_CHAR_CODE('dppa'),
  83.     keyPixMapResReserved        = FOUR_CHAR_CODE('dprr'),
  84.     keyPixMapReserved           = FOUR_CHAR_CODE('dppr'),
  85.     keyPixMapColorTableSeed     = FOUR_CHAR_CODE('dpct'),
  86.     keySummaryMenubar           = FOUR_CHAR_CODE('dsmb'),
  87.     keySummaryChanges           = FOUR_CHAR_CODE('dsch'),
  88.     keyDisplayOldConfig         = FOUR_CHAR_CODE('dold'),
  89.     keyDisplayNewConfig         = FOUR_CHAR_CODE('dnew')
  90. };
  91. enum {
  92.     dmOnlyActiveDisplays        = true,
  93.     dmAllDisplays               = false
  94. };
  95. enum {
  96.                                                                 /* DMSendDependentNotification notifyClass */
  97.     kDependentNotifyClassShowCursor = FOUR_CHAR_CODE('shcr'),   /* When display mgr shows a hidden cursor during an unmirror */
  98.     kDependentNotifyClassDriverOverride = FOUR_CHAR_CODE('ndrv'), /* When a driver is overridden */
  99.     kDependentNotifyClassDisplayMgrOverride = FOUR_CHAR_CODE('dmgr'), /* When display manager is upgraded */
  100.     kDependentNotifyClassProfileChanged = FOUR_CHAR_CODE('prof') /* When DMSetProfileByAVID is called */
  101. };
  102. enum {
  103.                                                                 /* Switch Flags */
  104.     kNoSwitchConfirmBit         = 0,                            /* Flag indicating that there is no need to confirm a switch to this mode */
  105.     kDepthNotAvailableBit       = 1,                            /* Current depth not available in new mode */
  106.     kShowModeBit                = 3,                            /* Show this mode even though it requires a confirm. */
  107.     kModeNotResizeBit           = 4,                            /* Do not use this mode to resize display (for cards that mode drives a different connector). */
  108.     kNeverShowModeBit           = 5                             /* This mode should not be shown in the user interface. */
  109. };
  110. /*    Summary Change Flags (sticky bits indicating an operation was performed)
  111.     For example, moving a display then moving it back will still set the kMovedDisplayBit.
  112. */
  113. enum {
  114.     kBeginEndConfigureBit       = 0,
  115.     kMovedDisplayBit            = 1,
  116.     kSetMainDisplayBit          = 2,
  117.     kSetDisplayModeBit          = 3,
  118.     kAddDisplayBit              = 4,
  119.     kRemoveDisplayBit           = 5,
  120.     kNewDisplayBit              = 6,
  121.     kDisposeDisplayBit          = 7,
  122.     kEnabledDisplayBit          = 8,
  123.     kDisabledDisplayBit         = 9,
  124.     kMirrorDisplayBit           = 10,
  125.     kUnMirrorDisplayBit         = 11
  126. };
  127. enum {
  128.                                                                 /* Notification Messages for extended call back routines */
  129.     kDMNotifyRequestConnectionProbe = 0,                        /* Like kDMNotifyRequestDisplayProbe only not for smart displays (used in wake before all busses are awake) */
  130.     kDMNotifyInstalled          = 1,                            /* At install time */
  131.     kDMNotifyEvent              = 2,                            /* Post change time */
  132.     kDMNotifyRemoved            = 3,                            /* At remove time */
  133.     kDMNotifyPrep               = 4,                            /* Pre change time */
  134.     kDMNotifyExtendEvent        = 5,                            /* Allow registrees to extend apple event before it is sent */
  135.     kDMNotifyDependents         = 6,                            /* Minor notification check without full update */
  136.     kDMNotifySuspendConfigure   = 7,                            /* Temporary end of configuration */
  137.     kDMNotifyResumeConfigure    = 8,                            /* Resume configuration */
  138.     kDMNotifyRequestDisplayProbe = 9,                           /* Request smart displays re-probe (used in sleep and hot plugging) */
  139.                                                                 /* Notification Flags */
  140.     kExtendedNotificationProc   = (1L << 16)
  141. };
  142. /* types for notifyType */
  143. enum {
  144.     kFullNotify                 = 0,                            /* This is the appleevent whole nine yards notify */
  145.     kFullDependencyNotify       = 1                             /* Only sends to those who want to know about interrelated functionality (used for updating UI) */
  146. };
  147. /* DisplayID/DeviceID constants */
  148. enum {
  149.     kDummyDeviceID              = 0x00FF,                       /* This is the ID of the dummy display, used when the last "real" display is disabled.*/
  150.     kInvalidDisplayID           = 0x0000,                       /* This is the invalid ID*/
  151.     kFirstDisplayID             = 0x0100
  152. };
  153. enum {
  154.                                                                 /* bits for panelListFlags */
  155.     kAllowDuplicatesBit         = 0
  156. };
  157. enum {
  158.                                                                 /* bits for nameFlags */
  159.     kSuppressNumberBit          = 0,
  160.     kSuppressNumberMask         = 1,
  161.     kForceNumberBit             = 1,
  162.     kForceNumberMask            = 2,
  163.     kSuppressNameBit            = 2,
  164.     kSuppressNameMask           = 4
  165. };
  166. /* Constants for fidelity checks */
  167. enum {
  168.     kNoFidelity                 = 0,
  169.     kMinimumFidelity            = 1,
  170.     kDefaultFidelity            = 500,                          /* I'm just picking a number for Apple default panels and engines*/
  171.     kDefaultManufacturerFidelity = 1000                         /* I'm just picking a number for Manufacturer's panels and engines (overrides apple defaults)*/
  172. };
  173. enum {
  174.     kAnyPanelType               = 0,                            /* Pass to DMNewEngineList for list of all panels (as opposed to specific types)*/
  175.     kAnyEngineType              = 0,                            /* Pass to DMNewEngineList for list of all engines*/
  176.     kAnyDeviceType              = 0,                            /* Pass to DMNewDeviceList for list of all devices*/
  177.     kAnyPortType                = 0                             /* Pass to DMNewDevicePortList for list of all devices*/
  178. };
  179. /* portListFlags for DM_NewDevicePortList */
  180. enum {
  181.                                                                 /* Should offline devices be put into the port list (such as dummy display) */
  182.     kPLIncludeOfflineDevicesBit = 0
  183. };
  184. /* confirmFlags for DMConfirmConfiguration */
  185. enum {
  186.     kForceConfirmBit            = 0,                            /* Force a confirm dialog */
  187.     kForceConfirmMask           = (1 << kForceConfirmBit)
  188. };
  189. /* Flags for displayModeFlags */
  190. enum {
  191.     kDisplayModeListNotPreferredBit = 0,
  192.     kDisplayModeListNotPreferredMask = (1 << kDisplayModeListNotPreferredBit)
  193. };
  194. /* Flags for itemFlags */
  195. enum {
  196.     kComponentListNotPreferredBit = 0,
  197.     kComponentListNotPreferredMask = (1 << kComponentListNotPreferredBit)
  198. };
  199. enum {
  200.     kDisplayTimingInfoVersionZero = 1,
  201.     kDisplayTimingInfoReservedCountVersionZero = 16,
  202.     kDisplayModeEntryVersionZero = 0,                           /* displayModeVersion - original version*/
  203.     kDisplayModeEntryVersionOne = 1                             /* displayModeVersion - added displayModeOverrideInfo*/
  204. };
  205. enum {
  206.     kMakeAndModelReservedCount  = 4                             /* Number of reserved fields*/
  207. };
  208. typedef unsigned long                   DMFidelityType;
  209. /*
  210.    AVID is an ID for ports and devices the old DisplayID type
  211.     is carried on for compatibility
  212. */
  213. typedef unsigned long                   AVIDType;
  214. typedef AVIDType                        DisplayIDType;
  215. typedef void *                          DMListType;
  216. typedef unsigned long                   DMListIndexType;
  217. typedef VDPowerStateRec                 AVPowerStateRec;
  218. typedef VDPowerStateRec *               AVPowerStatePtr;
  219. struct DMDisplayTimingInfoRec {
  220.     UInt32                          timingInfoVersion;
  221.     UInt32                          timingInfoAttributes;       /* Flags */
  222.     SInt32                          timingInfoRelativeQuality;  /* quality of the timing */
  223.     SInt32                          timingInfoRelativeDefault;  /* relative default of the timing */
  224.     UInt32                          timingInfoReserved[16];     /* Reserved */
  225. };
  226. typedef struct DMDisplayTimingInfoRec   DMDisplayTimingInfoRec;
  227. typedef DMDisplayTimingInfoRec *        DMDisplayTimingInfoPtr;
  228. struct DMComponentListEntryRec {
  229.     DisplayIDType                   itemID;                     /* DisplayID Manager*/
  230.     Component                       itemComponent;              /* Component Manager*/
  231.     ComponentDescription            itemDescription;            /* We can always construct this if we use something beyond the compontent mgr.*/
  232.     ResType                         itemClass;                  /* Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices)*/
  233.     DMFidelityType                  itemFidelity;               /* How good is this item for the specified search?*/
  234.     ResType                         itemSubClass;               /* Subclass of group to put this panel.  Can use to do sub-grouping (eg volume for volume panel and mute panel)*/
  235.     Point                           itemSort;                   /* Set to 0 - future to sort the items in a sub group.*/
  236.     unsigned long                   itemFlags;                  /* Set to 0 (future expansion)*/
  237.     ResType                         itemReserved;               /* What kind of code does the itemReference point to  (right now - kPanelEntryTypeComponentMgr only)*/
  238.     unsigned long                   itemFuture1;                /* Set to 0 (future expansion - probably an alternate code style)*/
  239.     unsigned long                   itemFuture2;                /* Set to 0 (future expansion - probably an alternate code style)*/
  240.     unsigned long                   itemFuture3;                /* Set to 0 (future expansion - probably an alternate code style)*/
  241.     unsigned long                   itemFuture4;                /* Set to 0 (future expansion - probably an alternate code style)*/
  242. };
  243. typedef struct DMComponentListEntryRec  DMComponentListEntryRec;
  244. typedef DMComponentListEntryRec *       DMComponentListEntryPtr;
  245. /* ooo Move AVLocationRec to AVComponents.i AFTER AVComponents.i is created*/
  246. struct AVLocationRec {
  247.     unsigned long                   locationConstant;           /* Set to 0 (future expansion - probably an alternate code style)*/
  248. };
  249. typedef struct AVLocationRec            AVLocationRec;
  250. typedef AVLocationRec *                 AVLocationPtr;
  251. struct DMDepthInfoRec {
  252.     VDSwitchInfoPtr                 depthSwitchInfo;            /* This is the switch mode to choose this timing/depth */
  253.     VPBlockPtr                      depthVPBlock;               /* VPBlock (including size, depth and format) */
  254.     UInt32                          depthFlags;                 /* VDVideoParametersInfoRec.csDepthFlags  */
  255.     UInt32                          depthReserved1;             /* Reserved */
  256.     UInt32                          depthReserved2;             /* Reserved */
  257. };
  258. typedef struct DMDepthInfoRec           DMDepthInfoRec;
  259. typedef DMDepthInfoRec *                DMDepthInfoPtr;
  260. struct DMDepthInfoBlockRec {
  261.     unsigned long                   depthBlockCount;            /* How many depths are there? */
  262.     DMDepthInfoPtr                  depthVPBlock;               /* Array of DMDepthInfoRec */
  263.     unsigned long                   depthBlockFlags;            /* Reserved */
  264.     unsigned long                   depthBlockReserved1;        /* Reserved */
  265.     unsigned long                   depthBlockReserved2;        /* Reserved */
  266. };
  267. typedef struct DMDepthInfoBlockRec      DMDepthInfoBlockRec;
  268. typedef DMDepthInfoBlockRec *           DMDepthInfoBlockPtr;
  269. struct DMDisplayModeListEntryRec {
  270.     UInt32                          displayModeFlags;
  271.     VDSwitchInfoPtr                 displayModeSwitchInfo;
  272.     VDResolutionInfoPtr             displayModeResolutionInfo;
  273.     VDTimingInfoPtr                 displayModeTimingInfo;
  274.     DMDepthInfoBlockPtr             displayModeDepthBlockInfo;  /* Information about all the depths*/
  275.     UInt32                          displayModeVersion;         /* What version is this record (now kDisplayModeEntryVersionOne)*/
  276.     StringPtr                       displayModeName;            /* Name of the timing mode*/
  277.     DMDisplayTimingInfoPtr          displayModeDisplayInfo;     /* Information from the display.*/
  278. };
  279. typedef struct DMDisplayModeListEntryRec DMDisplayModeListEntryRec;
  280. typedef DMDisplayModeListEntryRec *     DMDisplayModeListEntryPtr;
  281. struct DependentNotifyRec {
  282.     ResType                         notifyType;                 /* What type was the engine that made the change (may be zero)*/
  283.     ResType                         notifyClass;                /* What class was the change (eg geometry, color etc)*/
  284.     DisplayIDType                   notifyPortID;               /* Which device was touched (kInvalidDisplayID -> all or none)*/
  285.     ComponentInstance               notifyComponent;            /* What engine did it (may be 0)?*/
  286.     unsigned long                   notifyVersion;              /* Set to 0 (future expansion)*/
  287.     unsigned long                   notifyFlags;                /* Set to 0 (future expansion)*/
  288.     unsigned long                   notifyReserved;             /* Set to 0 (future expansion)*/
  289.     unsigned long                   notifyFuture;               /* Set to 0 (future expansion)*/
  290. };
  291. typedef struct DependentNotifyRec       DependentNotifyRec;
  292. typedef DependentNotifyRec *            DependentNotifyPtr;
  293. struct DMMakeAndModelRec {
  294.     ResType                         manufacturer;
  295.     UInt32                          model;
  296.     UInt32                          serialNumber;
  297.     UInt32                          manufactureDate;
  298.     UInt32                          makeReserved[4];
  299. };
  300. typedef struct DMMakeAndModelRec        DMMakeAndModelRec;
  301. typedef DMMakeAndModelRec *             DMMakeAndModelPtr;
  302. typedef CALLBACK_API( void , DMNotificationProcPtr )(AppleEvent *theEvent);
  303. typedef CALLBACK_API( void , DMExtendedNotificationProcPtr )(void *userData, short theMessage, void *notifyData);
  304. typedef CALLBACK_API( void , DMComponentListIteratorProcPtr )(void *userData, DMListIndexType itemIndex, DMComponentListEntryPtr componentInfo);
  305. typedef CALLBACK_API( void , DMDisplayModeListIteratorProcPtr )(void *userData, DMListIndexType itemIndex, DMDisplayModeListEntryPtr displaymodeInfo);
  306. typedef STACK_UPP_TYPE(DMNotificationProcPtr)                   DMNotificationUPP;
  307. typedef STACK_UPP_TYPE(DMExtendedNotificationProcPtr)           DMExtendedNotificationUPP;
  308. typedef STACK_UPP_TYPE(DMComponentListIteratorProcPtr)          DMComponentListIteratorUPP;
  309. typedef STACK_UPP_TYPE(DMDisplayModeListIteratorProcPtr)        DMDisplayModeListIteratorUPP;
  310. #if OPAQUE_UPP_TYPES
  311.     EXTERN_API(DMNotificationUPP)
  312.     NewDMNotificationUPP           (DMNotificationProcPtr   userRoutine);
  313.     EXTERN_API(DMExtendedNotificationUPP)
  314.     NewDMExtendedNotificationUPP    (DMExtendedNotificationProcPtr userRoutine);
  315.     EXTERN_API(DMComponentListIteratorUPP)
  316.     NewDMComponentListIteratorUPP    (DMComponentListIteratorProcPtr userRoutine);
  317.     EXTERN_API(DMDisplayModeListIteratorUPP)
  318.     NewDMDisplayModeListIteratorUPP    (DMDisplayModeListIteratorProcPtr userRoutine);
  319.     EXTERN_API(void)
  320.     DisposeDMNotificationUPP       (DMNotificationUPP       userUPP);
  321.     EXTERN_API(void)
  322.     DisposeDMExtendedNotificationUPP    (DMExtendedNotificationUPP userUPP);
  323.     EXTERN_API(void)
  324.     DisposeDMComponentListIteratorUPP    (DMComponentListIteratorUPP userUPP);
  325.     EXTERN_API(void)
  326.     DisposeDMDisplayModeListIteratorUPP    (DMDisplayModeListIteratorUPP userUPP);
  327.     EXTERN_API(void)
  328.     InvokeDMNotificationUPP        (AppleEvent *            theEvent,
  329.                                     DMNotificationUPP       userUPP);
  330.     EXTERN_API(void)
  331.     InvokeDMExtendedNotificationUPP    (void *              userData,
  332.                                     short                   theMessage,
  333.                                     void *                  notifyData,
  334.                                     DMExtendedNotificationUPP userUPP);
  335.     EXTERN_API(void)
  336.     InvokeDMComponentListIteratorUPP    (void *             userData,
  337.                                     DMListIndexType         itemIndex,
  338.                                     DMComponentListEntryPtr componentInfo,
  339.                                     DMComponentListIteratorUPP userUPP);
  340.     EXTERN_API(void)
  341.     InvokeDMDisplayModeListIteratorUPP    (void *           userData,
  342.                                     DMListIndexType         itemIndex,
  343.                                     DMDisplayModeListEntryPtr displaymodeInfo,
  344.                                     DMDisplayModeListIteratorUPP userUPP);
  345. #else
  346.     enum { uppDMNotificationProcInfo = 0x000000C0 };                /* pascal no_return_value Func(4_bytes) */
  347.     enum { uppDMExtendedNotificationProcInfo = 0x00000EC0 };        /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
  348.     enum { uppDMComponentListIteratorProcInfo = 0x00000FC0 };       /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  349.     enum { uppDMDisplayModeListIteratorProcInfo = 0x00000FC0 };     /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  350.     #define NewDMNotificationUPP(userRoutine)                       (DMNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMNotificationProcInfo, GetCurrentArchitecture())
  351.     #define NewDMExtendedNotificationUPP(userRoutine)               (DMExtendedNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMExtendedNotificationProcInfo, GetCurrentArchitecture())
  352.     #define NewDMComponentListIteratorUPP(userRoutine)              (DMComponentListIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMComponentListIteratorProcInfo, GetCurrentArchitecture())
  353.     #define NewDMDisplayModeListIteratorUPP(userRoutine)            (DMDisplayModeListIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMDisplayModeListIteratorProcInfo, GetCurrentArchitecture())
  354.     #define DisposeDMNotificationUPP(userUPP)                       DisposeRoutineDescriptor(userUPP)
  355.     #define DisposeDMExtendedNotificationUPP(userUPP)               DisposeRoutineDescriptor(userUPP)
  356.     #define DisposeDMComponentListIteratorUPP(userUPP)              DisposeRoutineDescriptor(userUPP)
  357.     #define DisposeDMDisplayModeListIteratorUPP(userUPP)            DisposeRoutineDescriptor(userUPP)
  358.     #define InvokeDMNotificationUPP(theEvent, userUPP)              CALL_ONE_PARAMETER_UPP((userUPP), uppDMNotificationProcInfo, (theEvent))
  359.     #define InvokeDMExtendedNotificationUPP(userData, theMessage, notifyData, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppDMExtendedNotificationProcInfo, (userData), (theMessage), (notifyData))
  360.     #define InvokeDMComponentListIteratorUPP(userData, itemIndex, componentInfo, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppDMComponentListIteratorProcInfo, (userData), (itemIndex), (componentInfo))
  361.     #define InvokeDMDisplayModeListIteratorUPP(userData, itemIndex, displaymodeInfo, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppDMDisplayModeListIteratorProcInfo, (userData), (itemIndex), (displaymodeInfo))
  362. #endif
  363. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  364. #define NewDMNotificationProc(userRoutine)                      NewDMNotificationUPP(userRoutine)
  365. #define NewDMExtendedNotificationProc(userRoutine)              NewDMExtendedNotificationUPP(userRoutine)
  366. #define NewDMComponentListIteratorProc(userRoutine)             NewDMComponentListIteratorUPP(userRoutine)
  367. #define NewDMDisplayModeListIteratorProc(userRoutine)           NewDMDisplayModeListIteratorUPP(userRoutine)
  368. #define CallDMNotificationProc(userRoutine, theEvent)           InvokeDMNotificationUPP(theEvent, userRoutine)
  369. #define CallDMExtendedNotificationProc(userRoutine, userData, theMessage, notifyData) InvokeDMExtendedNotificationUPP(userData, theMessage, notifyData, userRoutine)
  370. #define CallDMComponentListIteratorProc(userRoutine, userData, itemIndex, componentInfo) InvokeDMComponentListIteratorUPP(userData, itemIndex, componentInfo, userRoutine)
  371. #define CallDMDisplayModeListIteratorProc(userRoutine, userData, itemIndex, displaymodeInfo) InvokeDMDisplayModeListIteratorUPP(userData, itemIndex, displaymodeInfo, userRoutine)
  372. EXTERN_API( GDHandle )
  373. DMGetFirstScreenDevice          (Boolean                activeOnly)                         TWOWORDINLINE(0x7000, 0xABEB);
  374. EXTERN_API( GDHandle )
  375. DMGetNextScreenDevice           (GDHandle               theDevice,
  376.                                  Boolean                activeOnly)                         TWOWORDINLINE(0x7001, 0xABEB);
  377. EXTERN_API( void )
  378. DMDrawDesktopRect               (Rect *                 globalRect)                         TWOWORDINLINE(0x7002, 0xABEB);
  379. EXTERN_API( void )
  380. DMDrawDesktopRegion             (RgnHandle              globalRgn)                          TWOWORDINLINE(0x7003, 0xABEB);
  381. EXTERN_API( OSErr )
  382. DMBeginConfigureDisplays        (Handle *               displayState)                       THREEWORDINLINE(0x303C, 0x0206, 0xABEB);
  383. EXTERN_API( OSErr )
  384. DMEndConfigureDisplays          (Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0207, 0xABEB);
  385. EXTERN_API( OSErr )
  386. DMAddDisplay                    (GDHandle               newDevice,
  387.                                  short                  driver,
  388.                                  unsigned long          mode,
  389.                                  unsigned long          reserved,
  390.                                  unsigned long          displayID,
  391.                                  Component              displayComponent,
  392.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0D08, 0xABEB);
  393. EXTERN_API( OSErr )
  394. DMMoveDisplay                   (GDHandle               moveDevice,
  395.                                  short                  x,
  396.                                  short                  y,
  397.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0609, 0xABEB);
  398. EXTERN_API( OSErr )
  399. DMDisableDisplay                (GDHandle               disableDevice,
  400.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x040A, 0xABEB);
  401. EXTERN_API( OSErr )
  402. DMEnableDisplay                 (GDHandle               enableDevice,
  403.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x040B, 0xABEB);
  404. EXTERN_API( OSErr )
  405. DMRemoveDisplay                 (GDHandle               removeDevice,
  406.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x040C, 0xABEB);
  407. EXTERN_API( OSErr )
  408. DMSetMainDisplay                (GDHandle               newMainDevice,
  409.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0410, 0xABEB);
  410. EXTERN_API( OSErr )
  411. DMSetDisplayMode                (GDHandle               theDevice,
  412.                                  unsigned long          mode,
  413.                                  unsigned long *        depthMode,
  414.                                  unsigned long          reserved,
  415.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0A11, 0xABEB);
  416. EXTERN_API( OSErr )
  417. DMCheckDisplayMode              (GDHandle               theDevice,
  418.                                  unsigned long          mode,
  419.                                  unsigned long          depthMode,
  420.                                  unsigned long *        switchFlags,
  421.                                  unsigned long          reserved,
  422.                                  Boolean *              modeOk)                             THREEWORDINLINE(0x303C, 0x0C12, 0xABEB);
  423. EXTERN_API( OSErr )
  424. DMGetDeskRegion                 (RgnHandle *            desktopRegion)                      THREEWORDINLINE(0x303C, 0x0213, 0xABEB);
  425. EXTERN_API( OSErr )
  426. DMRegisterNotifyProc            (DMNotificationUPP      notificationProc,
  427.                                  ProcessSerialNumberPtr  whichPSN)                          THREEWORDINLINE(0x303C, 0x0414, 0xABEB);
  428. EXTERN_API( OSErr )
  429. DMRemoveNotifyProc              (DMNotificationUPP      notificationProc,
  430.                                  ProcessSerialNumberPtr  whichPSN)                          THREEWORDINLINE(0x303C, 0x0415, 0xABEB);
  431. EXTERN_API( OSErr )
  432. DMQDIsMirroringCapable          (Boolean *              qdIsMirroringCapable)               THREEWORDINLINE(0x303C, 0x0216, 0xABEB);
  433. EXTERN_API( OSErr )
  434. DMCanMirrorNow                  (Boolean *              canMirrorNow)                       THREEWORDINLINE(0x303C, 0x0217, 0xABEB);
  435. EXTERN_API( OSErr )
  436. DMIsMirroringOn                 (Boolean *              isMirroringOn)                      THREEWORDINLINE(0x303C, 0x0218, 0xABEB);
  437. EXTERN_API( OSErr )
  438. DMMirrorDevices                 (GDHandle               gD1,
  439.                                  GDHandle               gD2,
  440.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0619, 0xABEB);
  441. EXTERN_API( OSErr )
  442. DMUnmirrorDevice                (GDHandle               gDevice,
  443.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x041A, 0xABEB);
  444. EXTERN_API( OSErr )
  445. DMGetNextMirroredDevice         (GDHandle               gDevice,
  446.                                  GDHandle *             mirroredDevice)                     THREEWORDINLINE(0x303C, 0x041B, 0xABEB);
  447. EXTERN_API( OSErr )
  448. DMBlockMirroring                (void)                                                      TWOWORDINLINE(0x701C, 0xABEB);
  449. EXTERN_API( OSErr )
  450. DMUnblockMirroring              (void)                                                      TWOWORDINLINE(0x701D, 0xABEB);
  451. #if CALL_NOT_IN_CARBON
  452. EXTERN_API( OSErr )
  453. DMGetDisplayMgrA5World          (Ptr *                  dmA5)                               THREEWORDINLINE(0x303C, 0x021E, 0xABEB);
  454. #endif  /* CALL_NOT_IN_CARBON */
  455. EXTERN_API( OSErr )
  456. DMGetDisplayIDByGDevice         (GDHandle               displayDevice,
  457.                                  DisplayIDType *        displayID,
  458.                                  Boolean                failToMain)                         THREEWORDINLINE(0x303C, 0x051F, 0xABEB);
  459. EXTERN_API( OSErr )
  460. DMGetGDeviceByDisplayID         (DisplayIDType          displayID,
  461.                                  GDHandle *             displayDevice,
  462.                                  Boolean                failToMain)                         THREEWORDINLINE(0x303C, 0x0520, 0xABEB);
  463. EXTERN_API( OSErr )
  464. DMSetDisplayComponent           (GDHandle               theDevice,
  465.                                  Component              displayComponent)                   THREEWORDINLINE(0x303C, 0x0421, 0xABEB);
  466. EXTERN_API( OSErr )
  467. DMGetDisplayComponent           (GDHandle               theDevice,
  468.                                  Component *            displayComponent)                   THREEWORDINLINE(0x303C, 0x0422, 0xABEB);
  469. EXTERN_API( OSErr )
  470. DMNewDisplay                    (GDHandle *             newDevice,
  471.                                  short                  driverRefNum,
  472.                                  unsigned long          mode,
  473.                                  unsigned long          reserved,
  474.                                  DisplayIDType          displayID,
  475.                                  Component              displayComponent,
  476.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0D23, 0xABEB);
  477. EXTERN_API( OSErr )
  478. DMDisposeDisplay                (GDHandle               disposeDevice,
  479.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x0424, 0xABEB);
  480. EXTERN_API( OSErr )
  481. DMResolveDisplayComponents      (void)                                                      TWOWORDINLINE(0x7025, 0xABEB);
  482. EXTERN_API( OSErr )
  483. DMRegisterExtendedNotifyProc    (DMExtendedNotificationUPP  notifyProc,
  484.                                  void *                 notifyUserData,
  485.                                  unsigned short         nofifyOnFlags,
  486.                                  ProcessSerialNumberPtr  whichPSN)                          THREEWORDINLINE(0x303C, 0x07EF, 0xABEB);
  487. EXTERN_API( OSErr )
  488. DMRemoveExtendedNotifyProc      (DMExtendedNotificationUPP  notifyProc,
  489.                                  void *                 notifyUserData,
  490.                                  ProcessSerialNumberPtr  whichPSN,
  491.                                  unsigned short         removeFlags)                        THREEWORDINLINE(0x303C, 0x0726, 0xABEB);
  492. EXTERN_API( OSErr )
  493. DMNewAVPanelList                (DisplayIDType          displayID,
  494.                                  ResType                panelType,
  495.                                  DMFidelityType         minimumFidelity,
  496.                                  unsigned long          panelListFlags,
  497.                                  unsigned long          reserved,
  498.                                  DMListIndexType *      thePanelCount,
  499.                                  DMListType *           thePanelList)                       THREEWORDINLINE(0x303C, 0x0C27, 0xABEB);
  500. EXTERN_API( OSErr )
  501. DMNewAVEngineList               (DisplayIDType          displayID,
  502.                                  ResType                engineType,
  503.                                  DMFidelityType         minimumFidelity,
  504.                                  unsigned long          engineListFlags,
  505.                                  unsigned long          reserved,
  506.                                  DMListIndexType *      engineCount,
  507.                                  DMListType *           engineList)                         THREEWORDINLINE(0x303C, 0x0C28, 0xABEB);
  508. EXTERN_API( OSErr )
  509. DMNewAVDeviceList               (ResType                deviceType,
  510.                                  unsigned long          deviceListFlags,
  511.                                  unsigned long          reserved,
  512.                                  DMListIndexType *      deviceCount,
  513.                                  DMListType *           deviceList)                         THREEWORDINLINE(0x303C, 0x0A29, 0xABEB);
  514. EXTERN_API( OSErr )
  515. DMNewAVPortListByPortType       (ResType                subType,
  516.                                  unsigned long          portListFlags,
  517.                                  unsigned long          reserved,
  518.                                  DMListIndexType *      devicePortCount,
  519.                                  DMListType *           theDevicePortList)                  THREEWORDINLINE(0x303C, 0x0A2A, 0xABEB);
  520. EXTERN_API( OSErr )
  521. DMGetIndexedComponentFromList   (DMListType             panelList,
  522.                                  DMListIndexType        itemIndex,
  523.                                  unsigned long          reserved,
  524.                                  DMComponentListIteratorUPP  listIterator,
  525.                                  void *                 userData)                           THREEWORDINLINE(0x303C, 0x0A2B, 0xABEB);
  526. EXTERN_API( OSErr )
  527. DMDisposeList                   (DMListType             panelList)                          THREEWORDINLINE(0x303C, 0x022C, 0xABEB);
  528. EXTERN_API( OSErr )
  529. DMGetNameByAVID                 (AVIDType               theID,
  530.                                  unsigned long          nameFlags,
  531.                                  Str255                 name)                               THREEWORDINLINE(0x303C, 0x062D, 0xABEB);
  532. EXTERN_API( OSErr )
  533. DMNewAVIDByPortComponent        (Component              thePortComponent,
  534.                                  ResType                portKind,
  535.                                  unsigned long          reserved,
  536.                                  AVIDType *             newID)                              THREEWORDINLINE(0x303C, 0x082E, 0xABEB);
  537. EXTERN_API( OSErr )
  538. DMGetPortComponentByAVID        (DisplayIDType          thePortID,
  539.                                  Component *            thePortComponent,
  540.                                  ComponentDescription * theDesciption,
  541.                                  ResType *              thePortKind)                        THREEWORDINLINE(0x303C, 0x082F, 0xABEB);
  542. EXTERN_API( OSErr )
  543. DMSendDependentNotification     (ResType                notifyType,
  544.                                  ResType                notifyClass,
  545.                                  AVIDType               displayID,
  546.                                  ComponentInstance      notifyComponent)                    THREEWORDINLINE(0x303C, 0x0830, 0xABEB);
  547. EXTERN_API( OSErr )
  548. DMDisposeAVComponent            (Component              theAVComponent)                     THREEWORDINLINE(0x303C, 0x0231, 0xABEB);
  549. EXTERN_API( OSErr )
  550. DMSaveScreenPrefs               (unsigned long          reserved1,
  551.                                  unsigned long          saveFlags,
  552.                                  unsigned long          reserved2)                          THREEWORDINLINE(0x303C, 0x0632, 0xABEB);
  553. EXTERN_API( OSErr )
  554. DMNewAVIDByDeviceComponent      (Component              theDeviceComponent,
  555.                                  ResType                portKind,
  556.                                  unsigned long          reserved,
  557.                                  DisplayIDType *        newID)                              THREEWORDINLINE(0x303C, 0x0833, 0xABEB);
  558. EXTERN_API( OSErr )
  559. DMNewAVPortListByDeviceAVID     (AVIDType               theID,
  560.                                  DMFidelityType         minimumFidelity,
  561.                                  unsigned long          portListFlags,
  562.                                  unsigned long          reserved,
  563.                                  DMListIndexType *      devicePortCount,
  564.                                  DMListType *           theDevicePortList)                  THREEWORDINLINE(0x303C, 0x0C34, 0xABEB);
  565. EXTERN_API( OSErr )
  566. DMGetDeviceComponentByAVID      (AVIDType               theDeviceID,
  567.                                  Component *            theDeviceComponent,
  568.                                  ComponentDescription * theDesciption,
  569.                                  ResType *              theDeviceKind)                      THREEWORDINLINE(0x303C, 0x0835, 0xABEB);
  570. EXTERN_API( OSErr )
  571. DMNewDisplayModeList            (DisplayIDType          displayID,
  572.                                  unsigned long          modeListFlags,
  573.                                  unsigned long          reserved,
  574.                                  DMListIndexType *      thePanelCount,
  575.                                  DMListType *           thePanelList)                       THREEWORDINLINE(0x303C, 0x0A36, 0xABEB);
  576. EXTERN_API( OSErr )
  577. DMGetIndexedDisplayModeFromList (DMListType             panelList,
  578.                                  DMListIndexType        itemIndex,
  579.                                  unsigned long          reserved,
  580.                                  DMDisplayModeListIteratorUPP  listIterator,
  581.                                  void *                 userData)                           THREEWORDINLINE(0x303C, 0x0A37, 0xABEB);
  582. EXTERN_API( OSErr )
  583. DMGetGraphicInfoByAVID          (AVIDType               theID,
  584.                                  PicHandle *            theAVPcit,
  585.                                  Handle *               theAVIconSuite,
  586.                                  AVLocationRec *        theAVLocation)                      THREEWORDINLINE(0x303C, 0x0838, 0xABEB);
  587. EXTERN_API( OSErr )
  588. DMGetAVPowerState               (AVIDType               theID,
  589.                                  AVPowerStatePtr        getPowerState,
  590.                                  unsigned long          reserved1)                          THREEWORDINLINE(0x303C, 0x0839, 0xABEB);
  591. EXTERN_API( OSErr )
  592. DMSetAVPowerState               (AVIDType               theID,
  593.                                  AVPowerStatePtr        setPowerState,
  594.                                  unsigned long          powerFlags,
  595.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x083A, 0xABEB);
  596. EXTERN_API( OSErr )
  597. DMGetDeviceAVIDByPortAVID       (AVIDType               portAVID,
  598.                                  AVIDType *             deviceAVID)                         THREEWORDINLINE(0x303C, 0x043B, 0xABEB);
  599. EXTERN_API( OSErr )
  600. DMGetEnableByAVID               (AVIDType               theAVID,
  601.                                  Boolean *              isAVIDEnabledNow,
  602.                                  Boolean *              canChangeEnableNow)                 THREEWORDINLINE(0x303C, 0x063C, 0xABEB);
  603. EXTERN_API( OSErr )
  604. DMSetEnableByAVID               (AVIDType               theAVID,
  605.                                  Boolean                doEnable,
  606.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x053D, 0xABEB);
  607. EXTERN_API( OSErr )
  608. DMGetDisplayMode                (GDHandle               theDevice,
  609.                                  VDSwitchInfoPtr        switchInfo)                         THREEWORDINLINE(0x303C, 0x043E, 0xABEB);
  610. EXTERN_API( OSErr )
  611. DMConfirmConfiguration          (ModalFilterUPP         filterProc,
  612.                                  UInt32                 confirmFlags,
  613.                                  UInt32                 reserved,
  614.                                  Handle                 displayState)                       THREEWORDINLINE(0x303C, 0x083F, 0xABEB);
  615. #if PRAGMA_STRUCT_ALIGN
  616.     #pragma options align=reset
  617. #elif PRAGMA_STRUCT_PACKPUSH
  618.     #pragma pack(pop)
  619. #elif PRAGMA_STRUCT_PACK
  620.     #pragma pack()
  621. #endif
  622. #ifdef PRAGMA_IMPORT_OFF
  623. #pragma import off
  624. #elif PRAGMA_IMPORT
  625. #pragma import reset
  626. #endif
  627. #ifdef __cplusplus
  628. }
  629. #endif
  630. #endif /* __DISPLAYS__ */