home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / PInterfaces / Displays.p < prev    next >
Encoding:
Text File  |  1994-11-11  |  20.0 KB  |  542 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Displays.p
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. }
  16.  
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Displays;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __DISPLAYS__}
  27. {$SETC __DISPLAYS__ := 1}
  28.  
  29. {$I+}
  30. {$SETC DisplaysIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED __COMPONENTS__}
  39. {$I Components.p}
  40. {$ENDC}
  41. {    Types.p                                                        }
  42. {    MixedMode.p                                                    }
  43. {$IFC UNDEFINED __SKIP_DISPLAY_INCLUDES__ }
  44.  
  45. {$IFC UNDEFINED __APPLEEVENTS__}
  46. {$I AppleEvents.p}
  47. {$ENDC}
  48. {    Errors.p                                                    }
  49. {    Memory.p                                                    }
  50. {    OSUtils.p                                                    }
  51. {    Events.p                                                    }
  52. {        Quickdraw.p                                                }
  53. {            QuickdrawText.p                                        }
  54. {    EPPC.p                                                        }
  55. {        PPCToolbox.p                                            }
  56. {            AppleTalk.p                                            }
  57. {        Processes.p                                                }
  58. {            Files.p                                                }
  59. {    Notification.p                                                }
  60.  
  61. {$IFC UNDEFINED __WINDOWS__}
  62. {$I Windows.p}
  63. {$ENDC}
  64. {    Controls.p                                                    }
  65. {        Menus.p                                                    }
  66. {$ENDC}
  67.  
  68. {$PUSH}
  69. {$ALIGN MAC68K}
  70. {$LibExport+}
  71.  
  72. CONST
  73. { AppleEvents Core Suite }
  74.     kAESystemConfigNotice        = 'cnfg';
  75. { Core Suite types }
  76.     kAEDisplayNotice            = 'dspl';
  77.     kAEDisplaySummary            = 'dsum';
  78.     keyDMConfigVersion            = 'dmcv';
  79.     keyDMConfigFlags            = 'dmcf';
  80.     keyDMConfigReserved            = 'dmcr';
  81.     keyDisplayID                = 'dmid';
  82.     keyDisplayComponent            = 'dmdc';
  83.     keyDisplayDevice            = 'dmdd';
  84.     keyDisplayFlags                = 'dmdf';
  85.     keyDisplayMode                = 'dmdm';
  86.     keyDisplayModeReserved        = 'dmmr';
  87.     keyDisplayReserved            = 'dmdr';
  88.     keyDisplayMirroredId        = 'dmmi';
  89.     keyDeviceFlags                = 'dddf';
  90.     keyDeviceDepthMode            = 'dddm';
  91.     keyDeviceRect                = 'dddr';
  92.     keyPixMapRect                = 'dpdr';
  93.     keyPixMapHResolution        = 'dphr';
  94.     keyPixMapVResolution        = 'dpvr';
  95.     keyPixMapPixelType            = 'dppt';
  96.     keyPixMapPixelSize            = 'dpps';
  97.     keyPixMapCmpCount            = 'dpcc';
  98.     keyPixMapCmpSize            = 'dpcs';
  99.     keyPixMapAlignment            = 'dppa';
  100.     keyPixMapResReserved        = 'dprr';
  101.     keyPixMapReserved            = 'dppr';
  102.     keyPixMapColorTableSeed        = 'dpct';
  103.     keySummaryMenubar            = 'dsmb';
  104.     keySummaryChanges            = 'dsch';
  105.     keyDisplayOldConfig            = 'dold';
  106.     keyDisplayNewConfig            = 'dnew';
  107.  
  108.     dmOnlyActiveDisplays        = true;
  109.     dmAllDisplays                = false;
  110.  
  111. { Switch Flags }
  112.     kNoSwitchConfirmBit            = 0;                            { Flag indicating that there is no need to confirm a switch to this mode }
  113.     kDepthNotAvailableBit        = 1;                            { Current depth not available in new mode }
  114.     kShowModeBit                = 3;                            { Show this mode even though it requires a confirm. }
  115.     kModeNotResizeBit            = 4;                            { Do not use this mode to resize display (for cards that mode drives a different connector). }
  116.  
  117. {    Summary Change Flags (sticky bits indicating an operation was performed)
  118.     For example, moving a display then moving it back will still set the kMovedDisplayBit.
  119. }
  120.     kBeginEndConfigureBit        = 0;
  121.     kMovedDisplayBit            = 1;
  122.     kSetMainDisplayBit            = 2;
  123.     kSetDisplayModeBit            = 3;
  124.     kAddDisplayBit                = 4;
  125.     kRemoveDisplayBit            = 5;
  126.     kNewDisplayBit                = 6;
  127.     kDisposeDisplayBit            = 7;
  128.     kEnabledDisplayBit            = 8;
  129.     kDisabledDisplayBit            = 9;
  130.     kMirrorDisplayBit            = 10;
  131.     kUnMirrorDisplayBit            = 11;
  132.  
  133. { Notification Messages for extended call back routines }
  134.     kDMNotifyInstalled            = 1;                            { At install time }
  135.     kDMNotifyEvent                = 2;                            { Post change time }
  136.     kDMNotifyRemoved            = 3;                            { At remove time }
  137.     kDMNotifyPrep                = 4;                            { Pre change time }
  138.     kDMNotifyExtendEvent        = 5;                            { Allow registrees to extend apple event before it is sent }
  139.     kDMNotifyDependents            = 6;                            { Minor notification check without full update }
  140. { Notification Flags }
  141.     kExtendedNotificationProc    = 0+(1 * (2**(16)));
  142.  
  143. { Selectors for tablecloths }
  144.     kTableclothInit                = 0;
  145.     kTableclothDraw                = 1;
  146.     kTableclothAnimate            = 2;
  147.     kTableclothAnimateContinue    = 3;
  148.     kTableclothClose            = 4;
  149.  
  150.     
  151. TYPE
  152.     TableclothMessagesType = INTEGER;
  153.  
  154. { types for notifyType }
  155.  
  156. CONST
  157.     kFullNotify                    = 0;                            { This is the appleevent whole nine yards notify }
  158.     kFullDependencyNotify        = 1;                            { Only sends to those who want to know about interrelated functionality (used for updating UI) }
  159.  
  160. { DisplayID/DeviceID constants }
  161.     kDummyDeviceID                = $0FF;                            { This is the ID of the dummy display, used when the last “real” display is disabled.}
  162.     kInvalidDisplayID            = $000;                            { This is the invalid ID}
  163.     kFirstDisplayID                = $100;
  164.  
  165. { bits for panelListFlags }
  166.     kAllowDuplicatesBit            = 0;
  167.  
  168. { Constants for fidelity checks }
  169.     kNoFidelity                    = 0;
  170.     kMinimumFidelity            = 1;
  171.     kDefaultFidelity            = 500;                            { I'm just picking a number for Apple default panels and engines}
  172.     kDefaultManufacturorFidelity = 1000;                        { I'm just picking a number for Manufacturor's panels and engines (overrides apple defaults)}
  173.  
  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. { Should offline devices be put into the port list (such as dummy display) }
  181.     kPLIncludeOfflineDevicesBit    = 0;
  182.  
  183.     
  184. TYPE
  185.     DMFidelityType = LONGINT;
  186.  
  187.     DisplayIDType = LONGINT;
  188.  
  189.     DMListType = Ptr;
  190.  
  191.     DMListIndexType = LONGINT;
  192.  
  193.     DMListEntryRec = RECORD
  194.         itemID:                    DisplayIDType;                            { DisplayID Manager}
  195.         itemComponent:            Component;                                { Component Manager}
  196.         itemDescription:        ComponentDescription;                    { We can always construct this if we use something beyond the compontent mgr.}
  197.         itemClass:                ResType;                                { Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices)}
  198.         itemFidelity:            DMFidelityType;                            { How good is this item for the specified search?}
  199.         itemFlags:                LONGINT;                                { Set to 0 (future expansion)}
  200.         itemReserved:            ResType;                                { What kind of code does the itemReference point to  (right now - kPanelEntryTypeComponentMgr only)}
  201.         itemFuture:                LONGINT;                                { Set to 0 (future expansion - probably an alternate code style)}
  202.     END;
  203.     DMListEntryPtr = ^DMListEntryRec;
  204.  
  205.     DependentNotifyRec = RECORD
  206.         notifyType:                ResType;                                { What type was the engine that made the change (may be zero)}
  207.         notifyClass:            ResType;                                { What class was the change (eg geometry, color etc)}
  208.         displayID:                DisplayIDType;                            { Which device was touched (kInvalidDisplayID -> all or none)}
  209.         notifyComponent:        ComponentInstance;                        { What engine did it (may be 0)?}
  210.         notifyVersion:            LONGINT;                                { Set to 0 (future expansion)}
  211.         notifyFlags:            LONGINT;                                { Set to 0 (future expansion)}
  212.         notifyReserved:            LONGINT;                                { Set to 0 (future expansion)}
  213.         notifyFuture:            LONGINT;                                { Set to 0 (future expansion)}
  214.     END;
  215.     DependentNotifyPtr = ^DependentNotifyRec;
  216.  
  217.     DMNotificationProcPtr = ProcPtr;  { PROCEDURE DMNotification(VAR theEvent: AppleEvent); }
  218.     DMExtendedNotificationProcPtr = ProcPtr;  { PROCEDURE DMExtendedNotification(userData: UNIV Ptr; theMessage: INTEGER; notifyData: UNIV Ptr); }
  219.     DMTableclothProcPtr = ProcPtr;  { FUNCTION DMTablecloth(refCon: UNIV Ptr; theMsg: TableclothMessagesType; theData: UNIV Ptr): OSErr; }
  220.     DMListIteratorProcPtr = ProcPtr;  { PROCEDURE DMListIterator(userData: UNIV Ptr; itemIndex: DMListIndexType; listInfo: DMListEntryPtr); }
  221.     DMNotificationUPP = UniversalProcPtr;
  222.     DMExtendedNotificationUPP = UniversalProcPtr;
  223.     DMTableclothUPP = UniversalProcPtr;
  224.     DMListIteratorUPP = UniversalProcPtr;
  225.  
  226. CONST
  227.     uppDMNotificationProcInfo = $000000C0; { PROCEDURE (4 byte param); }
  228.     uppDMExtendedNotificationProcInfo = $00000EC0; { PROCEDURE (4 byte param, 2 byte param, 4 byte param); }
  229.     uppDMTableclothProcInfo = $00000EE0; { FUNCTION (4 byte param, 2 byte param, 4 byte param): 2 byte result; }
  230.     uppDMListIteratorProcInfo = $00000FC0; { PROCEDURE (4 byte param, 4 byte param, 4 byte param); }
  231.  
  232. FUNCTION NewDMNotificationProc(userRoutine: DMNotificationProcPtr): DMNotificationUPP;
  233.     {$IFC NOT GENERATINGCFM }
  234.     INLINE $2E9F;
  235.     {$ENDC}
  236.  
  237. FUNCTION NewDMExtendedNotificationProc(userRoutine: DMExtendedNotificationProcPtr): DMExtendedNotificationUPP;
  238.     {$IFC NOT GENERATINGCFM }
  239.     INLINE $2E9F;
  240.     {$ENDC}
  241.  
  242. FUNCTION NewDMTableclothProc(userRoutine: DMTableclothProcPtr): DMTableclothUPP;
  243.     {$IFC NOT GENERATINGCFM }
  244.     INLINE $2E9F;
  245.     {$ENDC}
  246.  
  247. FUNCTION NewDMListIteratorProc(userRoutine: DMListIteratorProcPtr): DMListIteratorUPP;
  248.     {$IFC NOT GENERATINGCFM }
  249.     INLINE $2E9F;
  250.     {$ENDC}
  251.  
  252. PROCEDURE CallDMNotificationProc(VAR theEvent: AppleEvent; userRoutine: DMNotificationUPP);
  253.     {$IFC NOT GENERATINGCFM}
  254.     INLINE $205F, $4E90;
  255.     {$ENDC}
  256.  
  257. PROCEDURE CallDMExtendedNotificationProc(userData: UNIV Ptr; theMessage: INTEGER; notifyData: UNIV Ptr; userRoutine: DMExtendedNotificationUPP);
  258.     {$IFC NOT GENERATINGCFM}
  259.     INLINE $205F, $4E90;
  260.     {$ENDC}
  261.  
  262. FUNCTION CallDMTableclothProc(refCon: UNIV Ptr; theMsg: TableclothMessagesType; theData: UNIV Ptr; userRoutine: DMTableclothUPP): OSErr;
  263.     {$IFC NOT GENERATINGCFM}
  264.     INLINE $205F, $4E90;
  265.     {$ENDC}
  266.  
  267. PROCEDURE CallDMListIteratorProc(userData: UNIV Ptr; itemIndex: DMListIndexType; listInfo: DMListEntryPtr; userRoutine: DMListIteratorUPP);
  268.     {$IFC NOT GENERATINGCFM}
  269.     INLINE $205F, $4E90;
  270.     {$ENDC}
  271.  
  272. TYPE
  273.     TableclothInfoRec = RECORD
  274.         tableclothInstance:        DMTableclothUPP;
  275.         nextAnimateTick:        LONGINT;
  276.         refCon:                    Ptr;
  277.         allDisplays:            BOOLEAN;
  278.         filler:                    ARRAY [0..2] OF BOOLEAN;
  279.     END;
  280.     TableclothInfoPtr = ^TableclothInfoRec;
  281.  
  282. { Trap interfaces }
  283.  
  284. FUNCTION DMGetFirstScreenDevice(activeOnly: BOOLEAN): GDHandle;
  285.     {$IFC NOT GENERATINGCFM}
  286.     INLINE $7000, $ABEB;
  287.     {$ENDC}
  288. FUNCTION DMGetNextScreenDevice(theDevice: GDHandle; activeOnly: BOOLEAN): GDHandle;
  289.     {$IFC NOT GENERATINGCFM}
  290.     INLINE $7001, $ABEB;
  291.     {$ENDC}
  292. PROCEDURE DMDrawDesktopRect(VAR globalRect: Rect);
  293.     {$IFC NOT GENERATINGCFM}
  294.     INLINE $7002, $ABEB;
  295.     {$ENDC}
  296. PROCEDURE DMDrawDesktopRegion(globalRgn: RgnHandle);
  297.     {$IFC NOT GENERATINGCFM}
  298.     INLINE $7003, $ABEB;
  299.     {$ENDC}
  300. FUNCTION DMGetGDeviceTablecloth(displayID: DisplayIDType; tableclothInstance: TableclothInfoPtr): OSErr;
  301.     {$IFC NOT GENERATINGCFM}
  302.     INLINE $303C, $0404, $ABEB;
  303.     {$ENDC}
  304. FUNCTION DMSetGDeviceTablecloth(displayID: DisplayIDType; tableclothInstance: TableclothInfoPtr): OSErr;
  305.     {$IFC NOT GENERATINGCFM}
  306.     INLINE $303C, $0405, $ABEB;
  307.     {$ENDC}
  308. FUNCTION DMBeginConfigureDisplays(VAR displayState: Handle): OSErr;
  309.     {$IFC NOT GENERATINGCFM}
  310.     INLINE $303C, $0206, $ABEB;
  311.     {$ENDC}
  312. FUNCTION DMEndConfigureDisplays(displayState: Handle): OSErr;
  313.     {$IFC NOT GENERATINGCFM}
  314.     INLINE $303C, $0207, $ABEB;
  315.     {$ENDC}
  316. FUNCTION DMAddDisplay(newDevice: GDHandle; driver: INTEGER; mode: LONGINT; reserved: LONGINT; displayID: LONGINT; displayComponent: ComponentInstance; displayState: Handle): OSErr;
  317.     {$IFC NOT GENERATINGCFM}
  318.     INLINE $303C, $0D08, $ABEB;
  319.     {$ENDC}
  320. FUNCTION DMMoveDisplay(moveDevice: GDHandle; x: INTEGER; y: INTEGER; displayState: Handle): OSErr;
  321.     {$IFC NOT GENERATINGCFM}
  322.     INLINE $303C, $0609, $ABEB;
  323.     {$ENDC}
  324. FUNCTION DMDisableDisplay(disableDevice: GDHandle; displayState: Handle): OSErr;
  325.     {$IFC NOT GENERATINGCFM}
  326.     INLINE $303C, $040A, $ABEB;
  327.     {$ENDC}
  328. FUNCTION DMEnableDisplay(enableDevice: GDHandle; displayState: Handle): OSErr;
  329.     {$IFC NOT GENERATINGCFM}
  330.     INLINE $303C, $040B, $ABEB;
  331.     {$ENDC}
  332. FUNCTION DMRemoveDisplay(removeDevice: GDHandle; displayState: Handle): OSErr;
  333.     {$IFC NOT GENERATINGCFM}
  334.     INLINE $303C, $040C, $ABEB;
  335.     {$ENDC}
  336. { OBSOLETE ******************
  337. pascal OSErr DMGetComponentAnimateTicks(DMTableclothUPP animationComponent,unsigned long *goodDelay,unsigned long *maxDelay)
  338.     = (0x303C,0x060D,0xABEB)        ( ; fix pascal headers
  339.  
  340. pascal OSErr DMSetComponentAnimateTicks(DMTableclothUPP animationComponent,unsigned long goodDelay,unsigned long maxDelay)
  341.     = (0x303C,0x060E,0xABEB)        ( ; fix pascal headers
  342.  
  343. pascal OSErr DMGetNextAnimateTime(unsigned long *nextAnimateTime)
  344.     = (0x303C,0x020F,0xABEB)        ( ; fix pascal headers
  345. ************************** }
  346. FUNCTION DMSetMainDisplay(newMainDevice: GDHandle; displayState: Handle): OSErr;
  347.     {$IFC NOT GENERATINGCFM}
  348.     INLINE $303C, $0410, $ABEB;
  349.     {$ENDC}
  350. FUNCTION DMSetDisplayMode(theDevice: GDHandle; mode: LONGINT; VAR depthMode: LONGINT; reserved: LONGINT; displayState: Handle): OSErr;
  351.     {$IFC NOT GENERATINGCFM}
  352.     INLINE $303C, $0A11, $ABEB;
  353.     {$ENDC}
  354. FUNCTION DMCheckDisplayMode(theDevice: GDHandle; mode: LONGINT; depthMode: LONGINT; VAR switchFlags: LONGINT; reserved: LONGINT; VAR modeOk: BOOLEAN): OSErr;
  355.     {$IFC NOT GENERATINGCFM}
  356.     INLINE $303C, $0C12, $ABEB;
  357.     {$ENDC}
  358. FUNCTION DMGetDeskRegion(VAR desktopRegion: RgnHandle): OSErr;
  359.     {$IFC NOT GENERATINGCFM}
  360.     INLINE $303C, $0213, $ABEB;
  361.     {$ENDC}
  362. FUNCTION DMRegisterNotifyProc(notificationProc: DMNotificationUPP; whichPSN: ProcessSerialNumberPtr): OSErr;
  363.     {$IFC NOT GENERATINGCFM}
  364.     INLINE $303C, $0414, $ABEB;
  365.     {$ENDC}
  366. FUNCTION DMRemoveNotifyProc(notificationProc: DMNotificationUPP; whichPSN: ProcessSerialNumberPtr): OSErr;
  367.     {$IFC NOT GENERATINGCFM}
  368.     INLINE $303C, $0415, $ABEB;
  369.     {$ENDC}
  370. FUNCTION DMQDIsMirroringCapable(VAR qdIsMirroringCapable: BOOLEAN): OSErr;
  371.     {$IFC NOT GENERATINGCFM}
  372.     INLINE $303C, $0216, $ABEB;
  373.     {$ENDC}
  374. FUNCTION DMCanMirrorNow(VAR canMirrorNow: BOOLEAN): OSErr;
  375.     {$IFC NOT GENERATINGCFM}
  376.     INLINE $303C, $0217, $ABEB;
  377.     {$ENDC}
  378. FUNCTION DMIsMirroringOn(VAR isMirroringOn: BOOLEAN): OSErr;
  379.     {$IFC NOT GENERATINGCFM}
  380.     INLINE $303C, $0218, $ABEB;
  381.     {$ENDC}
  382. FUNCTION DMMirrorDevices(gD1: GDHandle; gD2: GDHandle; displayState: Handle): OSErr;
  383.     {$IFC NOT GENERATINGCFM}
  384.     INLINE $303C, $0619, $ABEB;
  385.     {$ENDC}
  386. FUNCTION DMUnmirrorDevice(gDevice: GDHandle; displayState: Handle): OSErr;
  387.     {$IFC NOT GENERATINGCFM}
  388.     INLINE $303C, $041A, $ABEB;
  389.     {$ENDC}
  390. FUNCTION DMGetNextMirroredDevice(gDevice: GDHandle; VAR mirroredDevice: GDHandle): OSErr;
  391.     {$IFC NOT GENERATINGCFM}
  392.     INLINE $303C, $041B, $ABEB;
  393.     {$ENDC}
  394. FUNCTION DMBlockMirroring: OSErr;
  395.     {$IFC NOT GENERATINGCFM}
  396.     INLINE $701C, $ABEB;
  397.     {$ENDC}
  398. FUNCTION DMUnblockMirroring: OSErr;
  399.     {$IFC NOT GENERATINGCFM}
  400.     INLINE $701D, $ABEB;
  401.     {$ENDC}
  402. FUNCTION DMGetDisplayMgrA5World(VAR dmA5: LONGINT): OSErr;
  403.     {$IFC NOT GENERATINGCFM}
  404.     INLINE $303C, $021E, $ABEB;
  405.     {$ENDC}
  406. FUNCTION DMGetDisplayIDByGDevice(displayDevice: GDHandle; VAR displayID: DisplayIDType; failToMain: BOOLEAN): OSErr;
  407.     {$IFC NOT GENERATINGCFM}
  408.     INLINE $303C, $051F, $ABEB;
  409.     {$ENDC}
  410. FUNCTION DMGetGDeviceByDisplayID(displayID: DisplayIDType; VAR displayDevice: GDHandle; failToMain: BOOLEAN): OSErr;
  411.     {$IFC NOT GENERATINGCFM}
  412.     INLINE $303C, $0520, $ABEB;
  413.     {$ENDC}
  414. FUNCTION DMSetDisplayComponent(theDevice: GDHandle; displayComponent: ComponentInstance): OSErr;
  415.     {$IFC NOT GENERATINGCFM}
  416.     INLINE $303C, $0421, $ABEB;
  417.     {$ENDC}
  418. FUNCTION DMGetDisplayComponent(theDevice: GDHandle; VAR displayComponent: ComponentInstance): OSErr;
  419.     {$IFC NOT GENERATINGCFM}
  420.     INLINE $303C, $0422, $ABEB;
  421.     {$ENDC}
  422. FUNCTION DMNewDisplay(VAR newDevice: GDHandle; driverRefNum: INTEGER; mode: LONGINT; reserved: LONGINT; displayID: DisplayIDType; displayComponent: ComponentInstance; displayState: Handle): OSErr;
  423.     {$IFC NOT GENERATINGCFM}
  424.     INLINE $303C, $0D23, $ABEB;
  425.     {$ENDC}
  426. FUNCTION DMDisposeDisplay(disposeDevice: GDHandle; displayState: Handle): OSErr;
  427.     {$IFC NOT GENERATINGCFM}
  428.     INLINE $303C, $0424, $ABEB;
  429.     {$ENDC}
  430. FUNCTION DMResolveDisplayComponents: OSErr;
  431.     {$IFC NOT GENERATINGCFM}
  432.     INLINE $7025, $ABEB;
  433.     {$ENDC}
  434. FUNCTION DMRegisterExtendedNotifyProc(notifyProc: DMExtendedNotificationUPP; notifyUserData: UNIV Ptr; nofifyOnFlags: INTEGER; whichPSN: ProcessSerialNumberPtr): OSErr;
  435.     {$IFC NOT GENERATINGCFM}
  436.     INLINE $303C, $07EF, $ABEB;
  437.     {$ENDC}
  438. FUNCTION DMRemoveExtendedNotifyProc(notifyProc: DMExtendedNotificationUPP; notifyUserData: UNIV Ptr; whichPSN: ProcessSerialNumberPtr; removeFlags: INTEGER): OSErr;
  439.     {$IFC NOT GENERATINGCFM}
  440.     INLINE $303C, $0026, $ABEB;
  441.     {$ENDC}
  442. FUNCTION DMNewPanelList(displayID: DisplayIDType; panelType: ResType; minimumFidelity: DMFidelityType; panelListFlags: LONGINT; reserved: LONGINT; VAR thePanelCount: DMListIndexType; VAR thePanelList: DMListType): OSErr;
  443.     {$IFC NOT GENERATINGCFM}
  444.     INLINE $303C, $0027, $ABEB;
  445.     {$ENDC}
  446. FUNCTION DMNewEngineList(displayID: DisplayIDType; engineType: ResType; minimumFidelity: DMFidelityType; engineListFlags: LONGINT; reserved: LONGINT; VAR engineCount: DMListIndexType; VAR engineList: DMListType): OSErr;
  447.     {$IFC NOT GENERATINGCFM}
  448.     INLINE $303C, $0028, $ABEB;
  449.     {$ENDC}
  450. FUNCTION DMNewDeviceList(deviceType: ResType; deviceListFlags: LONGINT; reserved: LONGINT; VAR deviceCount: DMListIndexType; VAR deviceList: DMListType): OSErr;
  451.     {$IFC NOT GENERATINGCFM}
  452.     INLINE $303C, $0029, $ABEB;
  453.     {$ENDC}
  454. FUNCTION DMNewDevicePortList(subType: ResType; portListFlags: LONGINT; reserved: LONGINT; VAR devicePortCount: DMListIndexType; VAR theDevicePortList: DMListType): OSErr;
  455.     {$IFC NOT GENERATINGCFM}
  456.     INLINE $303C, $002A, $ABEB;
  457.     {$ENDC}
  458. FUNCTION DMGetIndexedItemFromList(panelList: DMListType; itemIndex: DMListIndexType; reserved: LONGINT; listIterator: DMListIteratorUPP; userData: UNIV Ptr): OSErr;
  459.     {$IFC NOT GENERATINGCFM}
  460.     INLINE $303C, $002B, $ABEB;
  461.     {$ENDC}
  462. FUNCTION DMDisposeList(panelList: DMListType): OSErr;
  463.     {$IFC NOT GENERATINGCFM}
  464.     INLINE $303C, $002C, $ABEB;
  465.     {$ENDC}
  466. FUNCTION DMGetNameByDisplayID(displayID: DisplayIDType; VAR name: Str255): OSErr;
  467.     {$IFC NOT GENERATINGCFM}
  468.     INLINE $303C, $042D, $ABEB;
  469.     {$ENDC}
  470. FUNCTION DMNewDisplayIDByPortComponent(thePortComponent: Component; portKind: ResType; reserved: LONGINT; VAR newID: DisplayIDType): OSErr;
  471.     {$IFC NOT GENERATINGCFM}
  472.     INLINE $303C, $082E, $ABEB;
  473.     {$ENDC}
  474. FUNCTION DMGetPortComponentByPortID(thePortID: DisplayIDType; VAR thePortComponent: Component; VAR theDesciption: ComponentDescription; VAR thePortKind: ResType): OSErr;
  475.     {$IFC NOT GENERATINGCFM}
  476.     INLINE $303C, $082F, $ABEB;
  477.     {$ENDC}
  478. FUNCTION DMSendDependentNotification(notifyType: ResType; notifyClass: ResType; displayID: DisplayIDType; portID: LONGINT; notifyComponent: ComponentInstance): OSErr;
  479.     {$IFC NOT GENERATINGCFM}
  480.     INLINE $303C, $002D, $ABEB;
  481.     {$ENDC}
  482. FUNCTION DMDisposePortComponent(thePortComponent: Component): OSErr;
  483.     {$IFC NOT GENERATINGCFM}
  484.     INLINE $303C, $0231, $ABEB;
  485.     {$ENDC}
  486. {pascal OSErr DMGetPortIDByDeviceComponent(Component deviceComponent, DisplayIDType* displayID)}
  487. {    = (0x303C,0x0032,0xABEB);}
  488. FUNCTION DMGetDisplayIDByDeviceComponent(deviceComponent: Component; VAR displayID: DisplayIDType): OSErr;
  489.     {$IFC NOT GENERATINGCFM}
  490.     INLINE $303C, $002E, $ABEB;
  491.     {$ENDC}
  492. {
  493.     Required calls in components:
  494.     
  495.  
  496.     GeneralDeviceCalls
  497.         Return information specific to all devices
  498.  
  499.     OSErr        CountDevicePorts(unsigned long portCount, ResType deviceType);
  500.     OSErr        GetPortInfo(unsigned long portNumber,PortInfoRec* portInfo);
  501.                     PortInfo gives information for multiported devices (such as Telecaster).
  502.     OSErr        CountPortEngineComponents(unsigned long portNumber,unsigned long* engineCount);
  503.     OSErr        GetPortEngineComponentInfo(unsigned long portNumber,unsigned long engineCount, DevicePortInfoRec* componentInfo);
  504.  
  505.  
  506.     Video Engine Components
  507.         Return information specific to video devices
  508.  
  509.     OSErr        CheckTiming
  510.                     Give the device a chance to okay or modify device settings
  511.                     especially useful for overridding the "needsConfirm" bit.
  512.     OSErr        GetVideoInfo
  513.                     It would be nice to be able to get direct info about screen size
  514.                     dot pitch etc.  This obviously needs to be fleshed out.
  515.     OSErr        SetWiggleDevice(Boolean wiggleDevice);
  516.     OSErr        GetWiggleDevice(Boolean* isWiggling);
  517.                     Returns an error if device is not capable of wiggling
  518.  
  519.     Sound Engine Components
  520.     
  521.     OSErr        SetWiggleDevice(Boolean wiggleDevice);
  522.     OSErr        GetWiggleDevice(Boolean* isWiggling);
  523.                     Returns an error if device is not capable of wiggling
  524.  
  525.     HI Component Calls
  526.     
  527.     OSErr        TargetDevice(DisplayID displayID);
  528.     We could also define a standard notify message and call that when we had an update issue (saving on components having to register for notifies)
  529.             That would by us not having to handle an extended remove notification that handles "you data" specific removes.
  530. }
  531.  
  532. {$ALIGN RESET}
  533. {$POP}
  534.  
  535. {$SETC UsingIncludes := DisplaysIncludes}
  536.  
  537. {$ENDC} {__DISPLAYS__}
  538.  
  539. {$IFC NOT UsingIncludes}
  540.  END.
  541. {$ENDC}
  542.