Displays.pas 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314
  1. {
  2. File: Displays.p
  3. Contains: Display Manager Interfaces.
  4. Version: Technology: Mac OS 8
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit Displays;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,Quickdraw,CMTypes,AEDataModel,ConditionalMacros,Components,Video,CMApplication,AppleEvents,Events,Processes,Dialogs;
  92. {$ALIGN MAC68K}
  93. type
  94. DMProcessInfoPtr = ProcessSerialNumberPtr;
  95. DMModalFilterUPP = ModalFilterUPP;
  96. const
  97. { AppleEvents Core Suite }
  98. kAESystemConfigNotice = $636E6667 (* 'cnfg' *); { Core Suite types }
  99. kAEDisplayNotice = $6473706C (* 'dspl' *);
  100. kAEDisplaySummary = $6473756D (* 'dsum' *);
  101. keyDMConfigVersion = $646D6376 (* 'dmcv' *);
  102. keyDMConfigFlags = $646D6366 (* 'dmcf' *);
  103. keyDMConfigReserved = $646D6372 (* 'dmcr' *);
  104. keyDisplayID = $646D6964 (* 'dmid' *);
  105. keyDisplayComponent = $646D6463 (* 'dmdc' *);
  106. keyDisplayDevice = $646D6464 (* 'dmdd' *);
  107. keyDisplayFlags = $646D6466 (* 'dmdf' *);
  108. keyDisplayMode = $646D646D (* 'dmdm' *);
  109. keyDisplayModeReserved = $646D6D72 (* 'dmmr' *);
  110. keyDisplayReserved = $646D6472 (* 'dmdr' *);
  111. keyDisplayMirroredId = $646D6D69 (* 'dmmi' *);
  112. keyDeviceFlags = $64646466 (* 'dddf' *);
  113. keyDeviceDepthMode = $6464646D (* 'dddm' *);
  114. keyDeviceRect = $64646472 (* 'dddr' *);
  115. keyPixMapRect = $64706472 (* 'dpdr' *);
  116. keyPixMapHResolution = $64706872 (* 'dphr' *);
  117. keyPixMapVResolution = $64707672 (* 'dpvr' *);
  118. keyPixMapPixelType = $64707074 (* 'dppt' *);
  119. keyPixMapPixelSize = $64707073 (* 'dpps' *);
  120. keyPixMapCmpCount = $64706363 (* 'dpcc' *);
  121. keyPixMapCmpSize = $64706373 (* 'dpcs' *);
  122. keyPixMapAlignment = $64707061 (* 'dppa' *);
  123. keyPixMapResReserved = $64707272 (* 'dprr' *);
  124. keyPixMapReserved = $64707072 (* 'dppr' *);
  125. keyPixMapColorTableSeed = $64706374 (* 'dpct' *);
  126. keySummaryMenubar = $64736D62 (* 'dsmb' *);
  127. keySummaryChanges = $64736368 (* 'dsch' *);
  128. keyDisplayOldConfig = $646F6C64 (* 'dold' *);
  129. keyDisplayNewConfig = $646E6577 (* 'dnew' *);
  130. dmOnlyActiveDisplays = true;
  131. dmAllDisplays = false;
  132. { DMSendDependentNotification notifyClass }
  133. kDependentNotifyClassShowCursor = $73686372 (* 'shcr' *); { When display mgr shows a hidden cursor during an unmirror }
  134. kDependentNotifyClassDriverOverride = $6E647276 (* 'ndrv' *); { When a driver is overridden }
  135. kDependentNotifyClassDisplayMgrOverride = $646D6772 (* 'dmgr' *); { When display manager is upgraded }
  136. kDependentNotifyClassProfileChanged = $70726F66 (* 'prof' *); { When DMSetProfileByAVID is called }
  137. { Switch Flags }
  138. kNoSwitchConfirmBit = 0; { Flag indicating that there is no need to confirm a switch to this mode }
  139. kDepthNotAvailableBit = 1; { Current depth not available in new mode }
  140. kShowModeBit = 3; { Show this mode even though it requires a confirm. }
  141. kModeNotResizeBit = 4; { Do not use this mode to resize display (for cards that mode drives a different connector). }
  142. kNeverShowModeBit = 5; { This mode should not be shown in the user interface. }
  143. { Summary Change Flags (sticky bits indicating an operation was performed)
  144. For example, moving a display then moving it back will still set the kMovedDisplayBit.
  145. }
  146. kBeginEndConfigureBit = 0;
  147. kMovedDisplayBit = 1;
  148. kSetMainDisplayBit = 2;
  149. kSetDisplayModeBit = 3;
  150. kAddDisplayBit = 4;
  151. kRemoveDisplayBit = 5;
  152. kNewDisplayBit = 6;
  153. kDisposeDisplayBit = 7;
  154. kEnabledDisplayBit = 8;
  155. kDisabledDisplayBit = 9;
  156. kMirrorDisplayBit = 10;
  157. kUnMirrorDisplayBit = 11;
  158. { Notification Messages for extended call back routines }
  159. kDMNotifyRequestConnectionProbe = 0; { Like kDMNotifyRequestDisplayProbe only not for smart displays (used in wake before all busses are awake) }
  160. kDMNotifyInstalled = 1; { At install time }
  161. kDMNotifyEvent = 2; { Post change time }
  162. kDMNotifyRemoved = 3; { At remove time }
  163. kDMNotifyPrep = 4; { Pre change time }
  164. kDMNotifyExtendEvent = 5; { Allow registrees to extend apple event before it is sent }
  165. kDMNotifyDependents = 6; { Minor notification check without full update }
  166. kDMNotifySuspendConfigure = 7; { Temporary end of configuration }
  167. kDMNotifyResumeConfigure = 8; { Resume configuration }
  168. kDMNotifyRequestDisplayProbe = 9; { Request smart displays re-probe (used in sleep and hot plugging) }
  169. { Notification Flags }
  170. kExtendedNotificationProc = $00010000;
  171. { types for notifyType }
  172. kFullNotify = 0; { This is the appleevent whole nine yards notify }
  173. kFullDependencyNotify = 1; { Only sends to those who want to know about interrelated functionality (used for updating UI) }
  174. { DisplayID/DeviceID constants }
  175. kDummyDeviceID = $00FF; { This is the ID of the dummy display, used when the last ÒrealÓ display is disabled. }
  176. kInvalidDisplayID = $0000; { This is the invalid ID }
  177. kFirstDisplayID = $0100;
  178. { bits for panelListFlags }
  179. kAllowDuplicatesBit = 0;
  180. { bits for nameFlags }
  181. kSuppressNumberBit = 0;
  182. kSuppressNumberMask = 1;
  183. kForceNumberBit = 1;
  184. kForceNumberMask = 2;
  185. kSuppressNameBit = 2;
  186. kSuppressNameMask = 4;
  187. { DMGetNameByAVID masks }
  188. kDMSupressNumbersMask = $01; { Supress the numbers and return only names }
  189. kDMForceNumbersMask = $02; { Force numbers to always be shown (even on single display configs) }
  190. kDMSupressNameMask = $04; { Supress the names and return only numbers. }
  191. { Constants for fidelity checks }
  192. kNoFidelity = 0;
  193. kMinimumFidelity = 1;
  194. kDefaultFidelity = 500; { I'm just picking a number for Apple default panels and engines }
  195. kDefaultManufacturerFidelity = 1000; { I'm just picking a number for Manufacturer's panels and engines (overrides apple defaults) }
  196. kAnyPanelType = 0; { Pass to DMNewEngineList for list of all panels (as opposed to specific types) }
  197. kAnyEngineType = 0; { Pass to DMNewEngineList for list of all engines }
  198. kAnyDeviceType = 0; { Pass to DMNewDeviceList for list of all devices }
  199. kAnyPortType = 0; { Pass to DMNewDevicePortList for list of all devices }
  200. { portListFlags for DM_NewDevicePortList }
  201. { Should offline devices be put into the port list (such as dummy display) }
  202. kPLIncludeOfflineDevicesBit = 0;
  203. { confirmFlags for DMConfirmConfiguration }
  204. kForceConfirmBit = 0; { Force a confirm dialog }
  205. kForceConfirmMask = $01;
  206. { Flags for displayModeFlags }
  207. kDisplayModeListNotPreferredBit = 0;
  208. kDisplayModeListNotPreferredMask = $01;
  209. { Flags for itemFlags }
  210. kComponentListNotPreferredBit = 0;
  211. kComponentListNotPreferredMask = $01;
  212. kDisplayTimingInfoVersionZero = 1;
  213. kDisplayTimingInfoReservedCountVersionZero = 16;
  214. kDisplayModeEntryVersionZero = 0; { displayModeVersion - original version }
  215. kDisplayModeEntryVersionOne = 1; { displayModeVersion - added displayModeOverrideInfo }
  216. kMakeAndModelReservedCount = 4; { Number of reserved fields }
  217. { Display Gestalt for DMDisplayGestalt }
  218. kDisplayGestaltDisplayCommunicationAttr = $636F6D6D (* 'comm' *);
  219. kDisplayGestaltForbidI2CMask = $01; { Some displays have firmware problems if they get I2C communication. If this bit is set, then I2C communication is forbidden }
  220. kDisplayGestaltUseI2CPowerMask = $02; { Some displays require I2C power settings (most use DPMS). }
  221. kDisplayGestaltCalibratorAttr = $63616C69 (* 'cali' *);
  222. kDisplayGestaltBrightnessAffectsGammaMask = $01; { Used by default calibrator (should we show brightness panel) }
  223. kDisplayGestaltViewAngleAffectsGammaMask = $02; { Currently not used by color sync }
  224. type
  225. DMFidelityType = UInt32;
  226. {
  227. AVID is an ID for ports and devices the old DisplayID type
  228. is carried on for compatibility
  229. }
  230. DMListType = Ptr;
  231. DMListIndexType = UInt32;
  232. AVPowerStateRec = VDPowerStateRec;
  233. AVPowerStateRecPtr = ^AVPowerStateRec;
  234. AVPowerStatePtr = ^VDPowerStateRec;
  235. DMDisplayTimingInfoRecPtr = ^DMDisplayTimingInfoRec;
  236. DMDisplayTimingInfoRec = record
  237. timingInfoVersion: UInt32;
  238. timingInfoAttributes: UInt32; { Flags }
  239. timingInfoRelativeQuality: SInt32; { quality of the timing }
  240. timingInfoRelativeDefault: SInt32; { relative default of the timing }
  241. timingInfoReserved: array [0..15] of UInt32; { Reserved }
  242. end;
  243. DMDisplayTimingInfoPtr = ^DMDisplayTimingInfoRec;
  244. DMComponentListEntryRecPtr = ^DMComponentListEntryRec;
  245. DMComponentListEntryRec = record
  246. itemID: DisplayIDType; { DisplayID Manager }
  247. itemComponent: Component; { Component Manager }
  248. itemDescription: ComponentDescription; { We can always construct this if we use something beyond the compontent mgr. }
  249. 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) }
  250. itemFidelity: DMFidelityType; { How good is this item for the specified search? }
  251. itemSubClass: ResType; { Subclass of group to put this panel. Can use to do sub-grouping (eg volume for volume panel and mute panel) }
  252. itemSort: Point; { Set to 0 - future to sort the items in a sub group. }
  253. itemFlags: UInt32; { Set to 0 (future expansion) }
  254. itemReserved: ResType; { What kind of code does the itemReference point to (right now - kPanelEntryTypeComponentMgr only) }
  255. itemFuture1: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
  256. itemFuture2: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
  257. itemFuture3: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
  258. itemFuture4: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
  259. end;
  260. DMComponentListEntryPtr = ^DMComponentListEntryRec;
  261. { ¥¥¥ Move AVLocationRec to AVComponents.i AFTER AVComponents.i is created }
  262. AVLocationRecPtr = ^AVLocationRec;
  263. AVLocationRec = record
  264. locationConstant: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
  265. end;
  266. AVLocationPtr = ^AVLocationRec;
  267. DMDepthInfoRecPtr = ^DMDepthInfoRec;
  268. DMDepthInfoRec = record
  269. depthSwitchInfo: VDSwitchInfoPtr; { This is the switch mode to choose this timing/depth }
  270. depthVPBlock: VPBlockPtr; { VPBlock (including size, depth and format) }
  271. depthFlags: UInt32; { VDVideoParametersInfoRec.csDepthFlags }
  272. depthReserved1: UInt32; { Reserved }
  273. depthReserved2: UInt32; { Reserved }
  274. end;
  275. DMDepthInfoPtr = ^DMDepthInfoRec;
  276. DMDepthInfoBlockRecPtr = ^DMDepthInfoBlockRec;
  277. DMDepthInfoBlockRec = record
  278. depthBlockCount: UInt32; { How many depths are there? }
  279. depthVPBlock: DMDepthInfoPtr; { Array of DMDepthInfoRec }
  280. depthBlockFlags: UInt32; { Reserved }
  281. depthBlockReserved1: UInt32; { Reserved }
  282. depthBlockReserved2: UInt32; { Reserved }
  283. end;
  284. DMDepthInfoBlockPtr = ^DMDepthInfoBlockRec;
  285. DMDisplayModeListEntryRecPtr = ^DMDisplayModeListEntryRec;
  286. DMDisplayModeListEntryRec = record
  287. displayModeFlags: UInt32;
  288. displayModeSwitchInfo: VDSwitchInfoPtr;
  289. displayModeResolutionInfo: VDResolutionInfoPtr;
  290. displayModeTimingInfo: VDTimingInfoPtr;
  291. displayModeDepthBlockInfo: DMDepthInfoBlockPtr; { Information about all the depths }
  292. displayModeVersion: UInt32; { What version is this record (now kDisplayModeEntryVersionOne) }
  293. displayModeName: StringPtr; { Name of the timing mode }
  294. displayModeDisplayInfo: DMDisplayTimingInfoPtr; { Information from the display. }
  295. end;
  296. DMDisplayModeListEntryPtr = ^DMDisplayModeListEntryRec;
  297. DependentNotifyRecPtr = ^DependentNotifyRec;
  298. DependentNotifyRec = record
  299. notifyType: ResType; { What type was the engine that made the change (may be zero) }
  300. notifyClass: ResType; { What class was the change (eg geometry, color etc) }
  301. notifyPortID: DisplayIDType; { Which device was touched (kInvalidDisplayID -> all or none) }
  302. notifyComponent: ComponentInstance; { What engine did it (may be 0)? }
  303. notifyVersion: UInt32; { Set to 0 (future expansion) }
  304. notifyFlags: UInt32; { Set to 0 (future expansion) }
  305. notifyReserved: UInt32; { Set to 0 (future expansion) }
  306. notifyFuture: UInt32; { Set to 0 (future expansion) }
  307. end;
  308. DependentNotifyPtr = ^DependentNotifyRec;
  309. DMMakeAndModelRecPtr = ^DMMakeAndModelRec;
  310. DMMakeAndModelRec = record
  311. manufacturer: ResType;
  312. model: UInt32;
  313. serialNumber: UInt32;
  314. manufactureDate: UInt32;
  315. makeReserved: array [0..3] of UInt32;
  316. end;
  317. DMMakeAndModelPtr = ^DMMakeAndModelRec;
  318. { DMNewDisplayList displayListIncludeFlags }
  319. const
  320. kIncludeOnlineActiveDisplaysMask = $01;
  321. kIncludeOnlineDisabledDisplaysMask = $02;
  322. kIncludeOfflineDisplaysMask = $04;
  323. kIncludeOfflineDummyDisplaysMask = $08;
  324. kIncludeHardwareMirroredDisplaysMask = $10;
  325. { modeListFlags for DMNewDisplayModeList }
  326. kDMModeListIncludeAllModesMask = $01; { Include all timing modes not _explicitly_ excluded (see other bits) }
  327. kDMModeListIncludeOfflineModesMask = $02;
  328. kDMModeListExcludeDriverModesMask = $04; { Exclude old-style timing modes (cscGetNextResolution/kDisplayModeIDFindFirstResolution modes) }
  329. kDMModeListExcludeDisplayModesMask = $08; { Exclude timing modes that come from the display (always arbritrary timing modes) }
  330. kDMModeListExcludeCustomModesMask = $10; { Exclude custom modes that came neither from the driver or display (need a better name) }
  331. kDMModeListPreferStretchedModesMask = $20; { Prefer modes that are stretched over modes that are letterboxed when setting kDisplayModeListNotPreferredBit }
  332. kDMModeListPreferSafeModesMask = $40; { Prefer modes that are safe over modes that are not when setting kDisplayModeListNotPreferredBit }
  333. kDMModeListExcludeDriverScaledModesMask = $80; { Exclude modes that are scaled by the driver (usually on fixed resolution displays) }
  334. { DMNewDisplayList displayListFlags }
  335. type
  336. DisplayListEntryRecPtr = ^DisplayListEntryRec;
  337. DisplayListEntryRec = record
  338. displayListEntryGDevice: GDHandle;
  339. displayListEntryDisplayID: DisplayIDType;
  340. displayListEntryIncludeFlags: UInt32; { Reason this entry was included }
  341. displayListEntryReserved1: UInt32;
  342. displayListEntryReserved2: UInt32; { Zero }
  343. displayListEntryReserved3: UInt32; { Zero }
  344. displayListEntryReserved4: UInt32; { Zero }
  345. displayListEntryReserved5: UInt32; { Zero }
  346. end;
  347. DisplayListEntryPtr = ^DisplayListEntryRec;
  348. DMProfileListEntryRecPtr = ^DMProfileListEntryRec;
  349. DMProfileListEntryRec = record
  350. profileRef: CMProfileRef;
  351. profileReserved1: Ptr; { Reserved }
  352. profileReserved2: Ptr; { Reserved }
  353. profileReserved3: Ptr; { Reserved }
  354. end;
  355. DMProfileListEntryPtr = ^DMProfileListEntryRec;
  356. {$ifc TYPED_FUNCTION_POINTERS}
  357. DMNotificationProcPtr = procedure(var theEvent: AppleEvent);
  358. {$elsec}
  359. DMNotificationProcPtr = ProcPtr;
  360. {$endc}
  361. {$ifc TYPED_FUNCTION_POINTERS}
  362. DMExtendedNotificationProcPtr = procedure(userData: UnivPtr; theMessage: SInt16; notifyData: UnivPtr);
  363. {$elsec}
  364. DMExtendedNotificationProcPtr = ProcPtr;
  365. {$endc}
  366. {$ifc TYPED_FUNCTION_POINTERS}
  367. DMComponentListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; componentInfo: DMComponentListEntryPtr);
  368. {$elsec}
  369. DMComponentListIteratorProcPtr = ProcPtr;
  370. {$endc}
  371. {$ifc TYPED_FUNCTION_POINTERS}
  372. DMDisplayModeListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DMDisplayModeListEntryPtr);
  373. {$elsec}
  374. DMDisplayModeListIteratorProcPtr = ProcPtr;
  375. {$endc}
  376. {$ifc TYPED_FUNCTION_POINTERS}
  377. DMProfileListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; profileInfo: DMProfileListEntryPtr);
  378. {$elsec}
  379. DMProfileListIteratorProcPtr = ProcPtr;
  380. {$endc}
  381. {$ifc TYPED_FUNCTION_POINTERS}
  382. DMDisplayListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DisplayListEntryPtr);
  383. {$elsec}
  384. DMDisplayListIteratorProcPtr = ProcPtr;
  385. {$endc}
  386. {$ifc OPAQUE_UPP_TYPES}
  387. DMNotificationUPP = ^SInt32; { an opaque UPP }
  388. {$elsec}
  389. DMNotificationUPP = UniversalProcPtr;
  390. {$endc}
  391. {$ifc OPAQUE_UPP_TYPES}
  392. DMExtendedNotificationUPP = ^SInt32; { an opaque UPP }
  393. {$elsec}
  394. DMExtendedNotificationUPP = UniversalProcPtr;
  395. {$endc}
  396. {$ifc OPAQUE_UPP_TYPES}
  397. DMComponentListIteratorUPP = ^SInt32; { an opaque UPP }
  398. {$elsec}
  399. DMComponentListIteratorUPP = UniversalProcPtr;
  400. {$endc}
  401. {$ifc OPAQUE_UPP_TYPES}
  402. DMDisplayModeListIteratorUPP = ^SInt32; { an opaque UPP }
  403. {$elsec}
  404. DMDisplayModeListIteratorUPP = UniversalProcPtr;
  405. {$endc}
  406. {$ifc OPAQUE_UPP_TYPES}
  407. DMProfileListIteratorUPP = ^SInt32; { an opaque UPP }
  408. {$elsec}
  409. DMProfileListIteratorUPP = UniversalProcPtr;
  410. {$endc}
  411. {$ifc OPAQUE_UPP_TYPES}
  412. DMDisplayListIteratorUPP = ^SInt32; { an opaque UPP }
  413. {$elsec}
  414. DMDisplayListIteratorUPP = UniversalProcPtr;
  415. {$endc}
  416. const
  417. uppDMNotificationProcInfo = $000000C0;
  418. uppDMExtendedNotificationProcInfo = $00000EC0;
  419. uppDMComponentListIteratorProcInfo = $00000FC0;
  420. uppDMDisplayModeListIteratorProcInfo = $00000FC0;
  421. uppDMProfileListIteratorProcInfo = $00000FC0;
  422. uppDMDisplayListIteratorProcInfo = $00000FC0;
  423. {
  424. * NewDMNotificationUPP()
  425. *
  426. * Availability:
  427. * Non-Carbon CFM: available as macro/inline
  428. * CarbonLib: in CarbonLib 1.0 and later
  429. * Mac OS X: in version 10.0 and later
  430. }
  431. function NewDMNotificationUPP(userRoutine: DMNotificationProcPtr): DMNotificationUPP; external name '_NewDMNotificationUPP'; { old name was NewDMNotificationProc }
  432. {
  433. * NewDMExtendedNotificationUPP()
  434. *
  435. * Availability:
  436. * Non-Carbon CFM: available as macro/inline
  437. * CarbonLib: in CarbonLib 1.0 and later
  438. * Mac OS X: in version 10.0 and later
  439. }
  440. function NewDMExtendedNotificationUPP(userRoutine: DMExtendedNotificationProcPtr): DMExtendedNotificationUPP; external name '_NewDMExtendedNotificationUPP'; { old name was NewDMExtendedNotificationProc }
  441. {
  442. * NewDMComponentListIteratorUPP()
  443. *
  444. * Availability:
  445. * Non-Carbon CFM: available as macro/inline
  446. * CarbonLib: in CarbonLib 1.0 and later
  447. * Mac OS X: in version 10.0 and later
  448. }
  449. function NewDMComponentListIteratorUPP(userRoutine: DMComponentListIteratorProcPtr): DMComponentListIteratorUPP; external name '_NewDMComponentListIteratorUPP'; { old name was NewDMComponentListIteratorProc }
  450. {
  451. * NewDMDisplayModeListIteratorUPP()
  452. *
  453. * Availability:
  454. * Non-Carbon CFM: available as macro/inline
  455. * CarbonLib: in CarbonLib 1.0 and later
  456. * Mac OS X: in version 10.0 and later
  457. }
  458. function NewDMDisplayModeListIteratorUPP(userRoutine: DMDisplayModeListIteratorProcPtr): DMDisplayModeListIteratorUPP; external name '_NewDMDisplayModeListIteratorUPP'; { old name was NewDMDisplayModeListIteratorProc }
  459. {
  460. * NewDMProfileListIteratorUPP()
  461. *
  462. * Availability:
  463. * Non-Carbon CFM: available as macro/inline
  464. * CarbonLib: in CarbonLib 1.0 and later
  465. * Mac OS X: in version 10.0 and later
  466. }
  467. function NewDMProfileListIteratorUPP(userRoutine: DMProfileListIteratorProcPtr): DMProfileListIteratorUPP; external name '_NewDMProfileListIteratorUPP'; { old name was NewDMProfileListIteratorProc }
  468. {
  469. * NewDMDisplayListIteratorUPP()
  470. *
  471. * Availability:
  472. * Non-Carbon CFM: available as macro/inline
  473. * CarbonLib: in CarbonLib 1.0 and later
  474. * Mac OS X: in version 10.0 and later
  475. }
  476. function NewDMDisplayListIteratorUPP(userRoutine: DMDisplayListIteratorProcPtr): DMDisplayListIteratorUPP; external name '_NewDMDisplayListIteratorUPP'; { old name was NewDMDisplayListIteratorProc }
  477. {
  478. * DisposeDMNotificationUPP()
  479. *
  480. * Availability:
  481. * Non-Carbon CFM: available as macro/inline
  482. * CarbonLib: in CarbonLib 1.0 and later
  483. * Mac OS X: in version 10.0 and later
  484. }
  485. procedure DisposeDMNotificationUPP(userUPP: DMNotificationUPP); external name '_DisposeDMNotificationUPP';
  486. {
  487. * DisposeDMExtendedNotificationUPP()
  488. *
  489. * Availability:
  490. * Non-Carbon CFM: available as macro/inline
  491. * CarbonLib: in CarbonLib 1.0 and later
  492. * Mac OS X: in version 10.0 and later
  493. }
  494. procedure DisposeDMExtendedNotificationUPP(userUPP: DMExtendedNotificationUPP); external name '_DisposeDMExtendedNotificationUPP';
  495. {
  496. * DisposeDMComponentListIteratorUPP()
  497. *
  498. * Availability:
  499. * Non-Carbon CFM: available as macro/inline
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Mac OS X: in version 10.0 and later
  502. }
  503. procedure DisposeDMComponentListIteratorUPP(userUPP: DMComponentListIteratorUPP); external name '_DisposeDMComponentListIteratorUPP';
  504. {
  505. * DisposeDMDisplayModeListIteratorUPP()
  506. *
  507. * Availability:
  508. * Non-Carbon CFM: available as macro/inline
  509. * CarbonLib: in CarbonLib 1.0 and later
  510. * Mac OS X: in version 10.0 and later
  511. }
  512. procedure DisposeDMDisplayModeListIteratorUPP(userUPP: DMDisplayModeListIteratorUPP); external name '_DisposeDMDisplayModeListIteratorUPP';
  513. {
  514. * DisposeDMProfileListIteratorUPP()
  515. *
  516. * Availability:
  517. * Non-Carbon CFM: available as macro/inline
  518. * CarbonLib: in CarbonLib 1.0 and later
  519. * Mac OS X: in version 10.0 and later
  520. }
  521. procedure DisposeDMProfileListIteratorUPP(userUPP: DMProfileListIteratorUPP); external name '_DisposeDMProfileListIteratorUPP';
  522. {
  523. * DisposeDMDisplayListIteratorUPP()
  524. *
  525. * Availability:
  526. * Non-Carbon CFM: available as macro/inline
  527. * CarbonLib: in CarbonLib 1.0 and later
  528. * Mac OS X: in version 10.0 and later
  529. }
  530. procedure DisposeDMDisplayListIteratorUPP(userUPP: DMDisplayListIteratorUPP); external name '_DisposeDMDisplayListIteratorUPP';
  531. {
  532. * InvokeDMNotificationUPP()
  533. *
  534. * Availability:
  535. * Non-Carbon CFM: available as macro/inline
  536. * CarbonLib: in CarbonLib 1.0 and later
  537. * Mac OS X: in version 10.0 and later
  538. }
  539. procedure InvokeDMNotificationUPP(var theEvent: AppleEvent; userRoutine: DMNotificationUPP); external name '_InvokeDMNotificationUPP'; { old name was CallDMNotificationProc }
  540. {
  541. * InvokeDMExtendedNotificationUPP()
  542. *
  543. * Availability:
  544. * Non-Carbon CFM: available as macro/inline
  545. * CarbonLib: in CarbonLib 1.0 and later
  546. * Mac OS X: in version 10.0 and later
  547. }
  548. procedure InvokeDMExtendedNotificationUPP(userData: UnivPtr; theMessage: SInt16; notifyData: UnivPtr; userRoutine: DMExtendedNotificationUPP); external name '_InvokeDMExtendedNotificationUPP'; { old name was CallDMExtendedNotificationProc }
  549. {
  550. * InvokeDMComponentListIteratorUPP()
  551. *
  552. * Availability:
  553. * Non-Carbon CFM: available as macro/inline
  554. * CarbonLib: in CarbonLib 1.0 and later
  555. * Mac OS X: in version 10.0 and later
  556. }
  557. procedure InvokeDMComponentListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; componentInfo: DMComponentListEntryPtr; userRoutine: DMComponentListIteratorUPP); external name '_InvokeDMComponentListIteratorUPP'; { old name was CallDMComponentListIteratorProc }
  558. {
  559. * InvokeDMDisplayModeListIteratorUPP()
  560. *
  561. * Availability:
  562. * Non-Carbon CFM: available as macro/inline
  563. * CarbonLib: in CarbonLib 1.0 and later
  564. * Mac OS X: in version 10.0 and later
  565. }
  566. procedure InvokeDMDisplayModeListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DMDisplayModeListEntryPtr; userRoutine: DMDisplayModeListIteratorUPP); external name '_InvokeDMDisplayModeListIteratorUPP'; { old name was CallDMDisplayModeListIteratorProc }
  567. {
  568. * InvokeDMProfileListIteratorUPP()
  569. *
  570. * Availability:
  571. * Non-Carbon CFM: available as macro/inline
  572. * CarbonLib: in CarbonLib 1.0 and later
  573. * Mac OS X: in version 10.0 and later
  574. }
  575. procedure InvokeDMProfileListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; profileInfo: DMProfileListEntryPtr; userRoutine: DMProfileListIteratorUPP); external name '_InvokeDMProfileListIteratorUPP'; { old name was CallDMProfileListIteratorProc }
  576. {
  577. * InvokeDMDisplayListIteratorUPP()
  578. *
  579. * Availability:
  580. * Non-Carbon CFM: available as macro/inline
  581. * CarbonLib: in CarbonLib 1.0 and later
  582. * Mac OS X: in version 10.0 and later
  583. }
  584. procedure InvokeDMDisplayListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DisplayListEntryPtr; userRoutine: DMDisplayListIteratorUPP); external name '_InvokeDMDisplayListIteratorUPP'; { old name was CallDMDisplayListIteratorProc }
  585. {$ifc CALL_NOT_IN_CARBON}
  586. {
  587. * DMDisplayGestalt()
  588. *
  589. * Availability:
  590. * Non-Carbon CFM: in DisplayLib 2.1 and later
  591. * CarbonLib: not available
  592. * Mac OS X: not available
  593. }
  594. function DMDisplayGestalt(theDisplayID: DisplayIDType; displayGestaltSelector: ResType; var displayGestaltResponse: UInt32): OSErr; external name '_DMDisplayGestalt';
  595. {
  596. * DMUseScreenPrefs()
  597. *
  598. * Availability:
  599. * Non-Carbon CFM: in DisplayLib 2.1 and later
  600. * CarbonLib: not available
  601. * Mac OS X: not available
  602. }
  603. function DMUseScreenPrefs(usePrefs: boolean; displayState: Handle): OSErr; external name '_DMUseScreenPrefs';
  604. {
  605. * DMSuspendConfigure()
  606. *
  607. * Availability:
  608. * Non-Carbon CFM: in DisplayLib 2.1 and later
  609. * CarbonLib: not available
  610. * Mac OS X: not available
  611. }
  612. function DMSuspendConfigure(displayState: Handle; reserved1: UInt32): OSErr; external name '_DMSuspendConfigure';
  613. {
  614. * DMResumeConfigure()
  615. *
  616. * Availability:
  617. * Non-Carbon CFM: in DisplayLib 2.1 and later
  618. * CarbonLib: not available
  619. * Mac OS X: not available
  620. }
  621. function DMResumeConfigure(displayState: Handle; reserved1: UInt32): OSErr; external name '_DMResumeConfigure';
  622. {
  623. * DMSetGammaByAVID()
  624. *
  625. * Availability:
  626. * Non-Carbon CFM: in DisplayLib 2.1 and later
  627. * CarbonLib: not available
  628. * Mac OS X: not available
  629. }
  630. function DMSetGammaByAVID(gammaAVID: AVIDType; setGammaFlags: UInt32; theGamma: GammaTblHandle): OSErr; external name '_DMSetGammaByAVID';
  631. {
  632. * DMGetGammaByAVID()
  633. *
  634. * Availability:
  635. * Non-Carbon CFM: in DisplayLib 2.1 and later
  636. * CarbonLib: not available
  637. * Mac OS X: not available
  638. }
  639. function DMGetGammaByAVID(gammaAVID: AVIDType; getGammaFlags: UInt32; var theGamma: GammaTblHandle): OSErr; external name '_DMGetGammaByAVID';
  640. {
  641. * DMGetMakeAndModelByAVID()
  642. *
  643. * Availability:
  644. * Non-Carbon CFM: in DisplayLib 2.1 and later
  645. * CarbonLib: not available
  646. * Mac OS X: not available
  647. }
  648. function DMGetMakeAndModelByAVID(theAVID: AVIDType; theMakeAndModel: DMMakeAndModelPtr): OSErr; external name '_DMGetMakeAndModelByAVID';
  649. {
  650. * DMNewDisplayList()
  651. *
  652. * Availability:
  653. * Non-Carbon CFM: in DisplayLib 2.1 and later
  654. * CarbonLib: not available
  655. * Mac OS X: not available
  656. }
  657. function DMNewDisplayList(displayListIncludeFlags: UInt32; reserved1: UInt32; reserved2: UInt32; var theCount: DMListIndexType; var theDisplayList: DMListType): OSErr; external name '_DMNewDisplayList';
  658. {
  659. * DMGetIndexedDisplayFromList()
  660. *
  661. * Availability:
  662. * Non-Carbon CFM: in DisplayLib 2.1 and later
  663. * CarbonLib: not available
  664. * Mac OS X: not available
  665. }
  666. function DMGetIndexedDisplayFromList(theDisplayList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMDisplayListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedDisplayFromList';
  667. {
  668. * DMNewProfileListByAVID()
  669. *
  670. * Availability:
  671. * Non-Carbon CFM: in DisplayLib 2.1 and later
  672. * CarbonLib: not available
  673. * Mac OS X: not available
  674. }
  675. function DMNewProfileListByAVID(theAVID: AVIDType; reserved: UInt32; var profileCount: DMListIndexType; var profileList: DMListType): OSErr; external name '_DMNewProfileListByAVID';
  676. {
  677. * DMGetIndexedProfileFromList()
  678. *
  679. * Availability:
  680. * Non-Carbon CFM: in DisplayLib 2.1 and later
  681. * CarbonLib: not available
  682. * Mac OS X: not available
  683. }
  684. function DMGetIndexedProfileFromList(profileList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMProfileListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedProfileFromList';
  685. {$endc} {CALL_NOT_IN_CARBON}
  686. {
  687. * DMGetFirstScreenDevice()
  688. *
  689. * Availability:
  690. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  691. * CarbonLib: in CarbonLib 1.0 and later
  692. * Mac OS X: in version 10.0 and later
  693. }
  694. function DMGetFirstScreenDevice(activeOnly: boolean): GDHandle; external name '_DMGetFirstScreenDevice';
  695. {
  696. * DMGetNextScreenDevice()
  697. *
  698. * Availability:
  699. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  700. * CarbonLib: in CarbonLib 1.0 and later
  701. * Mac OS X: in version 10.0 and later
  702. }
  703. function DMGetNextScreenDevice(theDevice: GDHandle; activeOnly: boolean): GDHandle; external name '_DMGetNextScreenDevice';
  704. {
  705. * DMDrawDesktopRect()
  706. *
  707. * Availability:
  708. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  709. * CarbonLib: in CarbonLib 1.0 and later
  710. * Mac OS X: in version 10.0 and later
  711. }
  712. procedure DMDrawDesktopRect(var globalRect: Rect); external name '_DMDrawDesktopRect';
  713. {
  714. * DMDrawDesktopRegion()
  715. *
  716. * Availability:
  717. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  718. * CarbonLib: in CarbonLib 1.0 and later
  719. * Mac OS X: in version 10.0 and later
  720. }
  721. procedure DMDrawDesktopRegion(globalRgn: RgnHandle); external name '_DMDrawDesktopRegion';
  722. {
  723. * DMBeginConfigureDisplays()
  724. *
  725. * Availability:
  726. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  727. * CarbonLib: in CarbonLib 1.0 and later
  728. * Mac OS X: in version 10.0 and later
  729. }
  730. function DMBeginConfigureDisplays(var displayState: Handle): OSErr; external name '_DMBeginConfigureDisplays';
  731. {
  732. * DMEndConfigureDisplays()
  733. *
  734. * Availability:
  735. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  736. * CarbonLib: in CarbonLib 1.0 and later
  737. * Mac OS X: in version 10.0 and later
  738. }
  739. function DMEndConfigureDisplays(displayState: Handle): OSErr; external name '_DMEndConfigureDisplays';
  740. {
  741. * DMAddDisplay()
  742. *
  743. * Availability:
  744. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  745. * CarbonLib: in CarbonLib 1.0 and later
  746. * Mac OS X: in version 10.0 and later
  747. }
  748. function DMAddDisplay(newDevice: GDHandle; driver: SInt16; mode: UInt32; reserved: UInt32; displayID: UInt32; displayComponent: Component; displayState: Handle): OSErr; external name '_DMAddDisplay';
  749. {
  750. * DMMoveDisplay()
  751. *
  752. * Availability:
  753. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  754. * CarbonLib: in CarbonLib 1.0 and later
  755. * Mac OS X: in version 10.0 and later
  756. }
  757. function DMMoveDisplay(moveDevice: GDHandle; x: SInt16; y: SInt16; displayState: Handle): OSErr; external name '_DMMoveDisplay';
  758. {
  759. * DMDisableDisplay()
  760. *
  761. * Availability:
  762. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  763. * CarbonLib: in CarbonLib 1.0 and later
  764. * Mac OS X: in version 10.0 and later
  765. }
  766. function DMDisableDisplay(disableDevice: GDHandle; displayState: Handle): OSErr; external name '_DMDisableDisplay';
  767. {
  768. * DMEnableDisplay()
  769. *
  770. * Availability:
  771. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  772. * CarbonLib: in CarbonLib 1.0 and later
  773. * Mac OS X: in version 10.0 and later
  774. }
  775. function DMEnableDisplay(enableDevice: GDHandle; displayState: Handle): OSErr; external name '_DMEnableDisplay';
  776. {
  777. * DMRemoveDisplay()
  778. *
  779. * Availability:
  780. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  781. * CarbonLib: in CarbonLib 1.0 and later
  782. * Mac OS X: in version 10.0 and later
  783. }
  784. function DMRemoveDisplay(removeDevice: GDHandle; displayState: Handle): OSErr; external name '_DMRemoveDisplay';
  785. {
  786. * DMSetMainDisplay()
  787. *
  788. * Availability:
  789. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  790. * CarbonLib: in CarbonLib 1.0 and later
  791. * Mac OS X: in version 10.0 and later
  792. }
  793. function DMSetMainDisplay(newMainDevice: GDHandle; displayState: Handle): OSErr; external name '_DMSetMainDisplay';
  794. {
  795. * DMSetDisplayMode()
  796. *
  797. * Availability:
  798. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  799. * CarbonLib: in CarbonLib 1.0 and later
  800. * Mac OS X: in version 10.0 and later
  801. }
  802. function DMSetDisplayMode(theDevice: GDHandle; mode: UInt32; var depthMode: UInt32; reserved: UInt32; displayState: Handle): OSErr; external name '_DMSetDisplayMode';
  803. {
  804. * DMCheckDisplayMode()
  805. *
  806. * Availability:
  807. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  808. * CarbonLib: in CarbonLib 1.0 and later
  809. * Mac OS X: in version 10.0 and later
  810. }
  811. function DMCheckDisplayMode(theDevice: GDHandle; mode: UInt32; depthMode: UInt32; var switchFlags: UInt32; reserved: UInt32; var modeOk: boolean): OSErr; external name '_DMCheckDisplayMode';
  812. {
  813. * DMGetDeskRegion()
  814. *
  815. * Availability:
  816. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  817. * CarbonLib: in CarbonLib 1.0 and later
  818. * Mac OS X: in version 10.0 and later
  819. }
  820. function DMGetDeskRegion(var desktopRegion: RgnHandle): OSErr; external name '_DMGetDeskRegion';
  821. {
  822. * DMRegisterNotifyProc()
  823. *
  824. * Availability:
  825. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  826. * CarbonLib: in CarbonLib 1.0 and later
  827. * Mac OS X: in version 10.0 and later
  828. }
  829. function DMRegisterNotifyProc(notificationProc: DMNotificationUPP; whichPSN: DMProcessInfoPtr): OSErr; external name '_DMRegisterNotifyProc';
  830. {
  831. * DMRemoveNotifyProc()
  832. *
  833. * Availability:
  834. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  835. * CarbonLib: in CarbonLib 1.0 and later
  836. * Mac OS X: in version 10.0 and later
  837. }
  838. function DMRemoveNotifyProc(notificationProc: DMNotificationUPP; whichPSN: DMProcessInfoPtr): OSErr; external name '_DMRemoveNotifyProc';
  839. {
  840. * DMQDIsMirroringCapable()
  841. *
  842. * Availability:
  843. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  844. * CarbonLib: in CarbonLib 1.0 and later
  845. * Mac OS X: in version 10.0 and later
  846. }
  847. function DMQDIsMirroringCapable(var qdIsMirroringCapable: boolean): OSErr; external name '_DMQDIsMirroringCapable';
  848. {
  849. * DMCanMirrorNow()
  850. *
  851. * Availability:
  852. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  853. * CarbonLib: in CarbonLib 1.0 and later
  854. * Mac OS X: in version 10.0 and later
  855. }
  856. function DMCanMirrorNow(var canMirrorNow: boolean): OSErr; external name '_DMCanMirrorNow';
  857. {
  858. * DMIsMirroringOn()
  859. *
  860. * Availability:
  861. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  862. * CarbonLib: in CarbonLib 1.0 and later
  863. * Mac OS X: in version 10.0 and later
  864. }
  865. function DMIsMirroringOn(var isMirroringOn: boolean): OSErr; external name '_DMIsMirroringOn';
  866. {
  867. * DMMirrorDevices()
  868. *
  869. * Availability:
  870. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  871. * CarbonLib: in CarbonLib 1.0 and later
  872. * Mac OS X: in version 10.0 and later
  873. }
  874. function DMMirrorDevices(gD1: GDHandle; gD2: GDHandle; displayState: Handle): OSErr; external name '_DMMirrorDevices';
  875. {
  876. * DMUnmirrorDevice()
  877. *
  878. * Availability:
  879. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  880. * CarbonLib: in CarbonLib 1.0 and later
  881. * Mac OS X: in version 10.0 and later
  882. }
  883. function DMUnmirrorDevice(gDevice: GDHandle; displayState: Handle): OSErr; external name '_DMUnmirrorDevice';
  884. {
  885. * DMGetNextMirroredDevice()
  886. *
  887. * Availability:
  888. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  889. * CarbonLib: in CarbonLib 1.0 and later
  890. * Mac OS X: in version 10.0 and later
  891. }
  892. function DMGetNextMirroredDevice(gDevice: GDHandle; var mirroredDevice: GDHandle): OSErr; external name '_DMGetNextMirroredDevice';
  893. {
  894. * DMBlockMirroring()
  895. *
  896. * Availability:
  897. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  898. * CarbonLib: in CarbonLib 1.0 and later
  899. * Mac OS X: in version 10.0 and later
  900. }
  901. function DMBlockMirroring: OSErr; external name '_DMBlockMirroring';
  902. {
  903. * DMUnblockMirroring()
  904. *
  905. * Availability:
  906. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  907. * CarbonLib: in CarbonLib 1.0 and later
  908. * Mac OS X: in version 10.0 and later
  909. }
  910. function DMUnblockMirroring: OSErr; external name '_DMUnblockMirroring';
  911. {$ifc CALL_NOT_IN_CARBON}
  912. {
  913. * DMGetDisplayMgrA5World()
  914. *
  915. * Availability:
  916. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  917. * CarbonLib: not available
  918. * Mac OS X: not available
  919. }
  920. function DMGetDisplayMgrA5World(var dmA5: Ptr): OSErr; external name '_DMGetDisplayMgrA5World';
  921. {$endc} {CALL_NOT_IN_CARBON}
  922. {
  923. * DMGetDisplayIDByGDevice()
  924. *
  925. * Availability:
  926. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  927. * CarbonLib: in CarbonLib 1.0 and later
  928. * Mac OS X: in version 10.0 and later
  929. }
  930. function DMGetDisplayIDByGDevice(displayDevice: GDHandle; var displayID: DisplayIDType; failToMain: boolean): OSErr; external name '_DMGetDisplayIDByGDevice';
  931. {
  932. * DMGetGDeviceByDisplayID()
  933. *
  934. * Availability:
  935. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  936. * CarbonLib: in CarbonLib 1.0 and later
  937. * Mac OS X: in version 10.0 and later
  938. }
  939. function DMGetGDeviceByDisplayID(displayID: DisplayIDType; var displayDevice: GDHandle; failToMain: boolean): OSErr; external name '_DMGetGDeviceByDisplayID';
  940. {
  941. * DMSetDisplayComponent()
  942. *
  943. * Availability:
  944. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  945. * CarbonLib: in CarbonLib 1.0 and later
  946. * Mac OS X: in version 10.0 and later
  947. }
  948. function DMSetDisplayComponent(theDevice: GDHandle; displayComponent: Component): OSErr; external name '_DMSetDisplayComponent';
  949. {
  950. * DMGetDisplayComponent()
  951. *
  952. * Availability:
  953. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  954. * CarbonLib: in CarbonLib 1.0 and later
  955. * Mac OS X: in version 10.0 and later
  956. }
  957. function DMGetDisplayComponent(theDevice: GDHandle; var displayComponent: Component): OSErr; external name '_DMGetDisplayComponent';
  958. {
  959. * DMNewDisplay()
  960. *
  961. * Availability:
  962. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  963. * CarbonLib: in CarbonLib 1.0 and later
  964. * Mac OS X: in version 10.0 and later
  965. }
  966. function DMNewDisplay(var newDevice: GDHandle; driverRefNum: SInt16; mode: UInt32; reserved: UInt32; displayID: DisplayIDType; displayComponent: Component; displayState: Handle): OSErr; external name '_DMNewDisplay';
  967. {
  968. * DMDisposeDisplay()
  969. *
  970. * Availability:
  971. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  972. * CarbonLib: in CarbonLib 1.0 and later
  973. * Mac OS X: in version 10.0 and later
  974. }
  975. function DMDisposeDisplay(disposeDevice: GDHandle; displayState: Handle): OSErr; external name '_DMDisposeDisplay';
  976. {
  977. * DMResolveDisplayComponents()
  978. *
  979. * Availability:
  980. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  981. * CarbonLib: in CarbonLib 1.0 and later
  982. * Mac OS X: in version 10.0 and later
  983. }
  984. function DMResolveDisplayComponents: OSErr; external name '_DMResolveDisplayComponents';
  985. {
  986. * DMRegisterExtendedNotifyProc()
  987. *
  988. * Availability:
  989. * Non-Carbon CFM: in DisplayLib 2.0 and later
  990. * CarbonLib: in CarbonLib 1.0 and later
  991. * Mac OS X: in version 10.0 and later
  992. }
  993. function DMRegisterExtendedNotifyProc(notifyProc: DMExtendedNotificationUPP; notifyUserData: UnivPtr; nofifyOnFlags: UInt16; whichPSN: DMProcessInfoPtr): OSErr; external name '_DMRegisterExtendedNotifyProc';
  994. {
  995. * DMRemoveExtendedNotifyProc()
  996. *
  997. * Availability:
  998. * Non-Carbon CFM: in DisplayLib 2.0 and later
  999. * CarbonLib: in CarbonLib 1.0 and later
  1000. * Mac OS X: in version 10.0 and later
  1001. }
  1002. function DMRemoveExtendedNotifyProc(notifyProc: DMExtendedNotificationUPP; notifyUserData: UnivPtr; whichPSN: DMProcessInfoPtr; removeFlags: UInt16): OSErr; external name '_DMRemoveExtendedNotifyProc';
  1003. {
  1004. * DMNewAVPanelList()
  1005. *
  1006. * Availability:
  1007. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1008. * CarbonLib: in CarbonLib 1.0 and later
  1009. * Mac OS X: in version 10.0 and later
  1010. }
  1011. function DMNewAVPanelList(displayID: DisplayIDType; panelType: ResType; minimumFidelity: DMFidelityType; panelListFlags: UInt32; reserved: UInt32; var thePanelCount: DMListIndexType; var thePanelList: DMListType): OSErr; external name '_DMNewAVPanelList';
  1012. {
  1013. * DMNewAVEngineList()
  1014. *
  1015. * Availability:
  1016. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1017. * CarbonLib: in CarbonLib 1.0 and later
  1018. * Mac OS X: in version 10.0 and later
  1019. }
  1020. function DMNewAVEngineList(displayID: DisplayIDType; engineType: ResType; minimumFidelity: DMFidelityType; engineListFlags: UInt32; reserved: UInt32; var engineCount: DMListIndexType; var engineList: DMListType): OSErr; external name '_DMNewAVEngineList';
  1021. {
  1022. * DMNewAVDeviceList()
  1023. *
  1024. * Availability:
  1025. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1026. * CarbonLib: in CarbonLib 1.0 and later
  1027. * Mac OS X: in version 10.0 and later
  1028. }
  1029. function DMNewAVDeviceList(deviceType: ResType; deviceListFlags: UInt32; reserved: UInt32; var deviceCount: DMListIndexType; var deviceList: DMListType): OSErr; external name '_DMNewAVDeviceList';
  1030. {
  1031. * DMNewAVPortListByPortType()
  1032. *
  1033. * Availability:
  1034. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1035. * CarbonLib: in CarbonLib 1.0 and later
  1036. * Mac OS X: in version 10.0 and later
  1037. }
  1038. function DMNewAVPortListByPortType(subType: ResType; portListFlags: UInt32; reserved: UInt32; var devicePortCount: DMListIndexType; var theDevicePortList: DMListType): OSErr; external name '_DMNewAVPortListByPortType';
  1039. {
  1040. * DMGetIndexedComponentFromList()
  1041. *
  1042. * Availability:
  1043. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1044. * CarbonLib: in CarbonLib 1.0 and later
  1045. * Mac OS X: in version 10.0 and later
  1046. }
  1047. function DMGetIndexedComponentFromList(panelList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMComponentListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedComponentFromList';
  1048. {
  1049. * DMDisposeList()
  1050. *
  1051. * Availability:
  1052. * Non-Carbon CFM: in DisplayLib 2.0 and later
  1053. * CarbonLib: in CarbonLib 1.0 and later
  1054. * Mac OS X: in version 10.0 and later
  1055. }
  1056. function DMDisposeList(panelList: DMListType): OSErr; external name '_DMDisposeList';
  1057. {
  1058. * DMGetNameByAVID()
  1059. *
  1060. * Availability:
  1061. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1062. * CarbonLib: in CarbonLib 1.0 and later
  1063. * Mac OS X: in version 10.0 and later
  1064. }
  1065. function DMGetNameByAVID(theID: AVIDType; nameFlags: UInt32; var name: Str255): OSErr; external name '_DMGetNameByAVID';
  1066. {
  1067. * DMNewAVIDByPortComponent()
  1068. *
  1069. * Availability:
  1070. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1071. * CarbonLib: in CarbonLib 1.0 and later
  1072. * Mac OS X: in version 10.0 and later
  1073. }
  1074. function DMNewAVIDByPortComponent(thePortComponent: Component; portKind: ResType; reserved: UInt32; var newID: AVIDType): OSErr; external name '_DMNewAVIDByPortComponent';
  1075. {
  1076. * DMGetPortComponentByAVID()
  1077. *
  1078. * Availability:
  1079. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1080. * CarbonLib: in CarbonLib 1.0 and later
  1081. * Mac OS X: in version 10.0 and later
  1082. }
  1083. function DMGetPortComponentByAVID(thePortID: DisplayIDType; var thePortComponent: Component; var theDesciption: ComponentDescription; var thePortKind: ResType): OSErr; external name '_DMGetPortComponentByAVID';
  1084. {
  1085. * DMSendDependentNotification()
  1086. *
  1087. * Availability:
  1088. * Non-Carbon CFM: in DisplayLib 2.0 and later
  1089. * CarbonLib: in CarbonLib 1.0 and later
  1090. * Mac OS X: in version 10.0 and later
  1091. }
  1092. function DMSendDependentNotification(notifyType: ResType; notifyClass: ResType; displayID: AVIDType; notifyComponent: ComponentInstance): OSErr; external name '_DMSendDependentNotification';
  1093. {
  1094. * DMDisposeAVComponent()
  1095. *
  1096. * Availability:
  1097. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1098. * CarbonLib: in CarbonLib 1.0 and later
  1099. * Mac OS X: in version 10.0 and later
  1100. }
  1101. function DMDisposeAVComponent(theAVComponent: Component): OSErr; external name '_DMDisposeAVComponent';
  1102. {
  1103. * DMSaveScreenPrefs()
  1104. *
  1105. * Availability:
  1106. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1107. * CarbonLib: in CarbonLib 1.0 and later
  1108. * Mac OS X: in version 10.0 and later
  1109. }
  1110. function DMSaveScreenPrefs(reserved1: UInt32; saveFlags: UInt32; reserved2: UInt32): OSErr; external name '_DMSaveScreenPrefs';
  1111. {
  1112. * DMNewAVIDByDeviceComponent()
  1113. *
  1114. * Availability:
  1115. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1116. * CarbonLib: in CarbonLib 1.0 and later
  1117. * Mac OS X: in version 10.0 and later
  1118. }
  1119. function DMNewAVIDByDeviceComponent(theDeviceComponent: Component; portKind: ResType; reserved: UInt32; var newID: DisplayIDType): OSErr; external name '_DMNewAVIDByDeviceComponent';
  1120. {
  1121. * DMNewAVPortListByDeviceAVID()
  1122. *
  1123. * Availability:
  1124. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1125. * CarbonLib: in CarbonLib 1.0 and later
  1126. * Mac OS X: in version 10.0 and later
  1127. }
  1128. function DMNewAVPortListByDeviceAVID(theID: AVIDType; minimumFidelity: DMFidelityType; portListFlags: UInt32; reserved: UInt32; var devicePortCount: DMListIndexType; var theDevicePortList: DMListType): OSErr; external name '_DMNewAVPortListByDeviceAVID';
  1129. {
  1130. * DMGetDeviceComponentByAVID()
  1131. *
  1132. * Availability:
  1133. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1134. * CarbonLib: in CarbonLib 1.0 and later
  1135. * Mac OS X: in version 10.0 and later
  1136. }
  1137. function DMGetDeviceComponentByAVID(theDeviceID: AVIDType; var theDeviceComponent: Component; var theDesciption: ComponentDescription; var theDeviceKind: ResType): OSErr; external name '_DMGetDeviceComponentByAVID';
  1138. {
  1139. * DMNewDisplayModeList()
  1140. *
  1141. * Availability:
  1142. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1143. * CarbonLib: in CarbonLib 1.0 and later
  1144. * Mac OS X: in version 10.0 and later
  1145. }
  1146. function DMNewDisplayModeList(displayID: DisplayIDType; modeListFlags: UInt32; reserved: UInt32; var thePanelCount: DMListIndexType; var thePanelList: DMListType): OSErr; external name '_DMNewDisplayModeList';
  1147. {
  1148. * DMGetIndexedDisplayModeFromList()
  1149. *
  1150. * Availability:
  1151. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1152. * CarbonLib: in CarbonLib 1.0 and later
  1153. * Mac OS X: in version 10.0 and later
  1154. }
  1155. function DMGetIndexedDisplayModeFromList(panelList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMDisplayModeListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedDisplayModeFromList';
  1156. {
  1157. * DMGetGraphicInfoByAVID()
  1158. *
  1159. * Availability:
  1160. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1161. * CarbonLib: in CarbonLib 1.0 and later
  1162. * Mac OS X: in version 10.0 and later
  1163. }
  1164. function DMGetGraphicInfoByAVID(theID: AVIDType; var theAVPcit: PicHandle; var theAVIconSuite: Handle; var theAVLocation: AVLocationRec): OSErr; external name '_DMGetGraphicInfoByAVID';
  1165. {
  1166. * DMGetAVPowerState()
  1167. *
  1168. * Availability:
  1169. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1170. * CarbonLib: in CarbonLib 1.0 and later
  1171. * Mac OS X: in version 10.0 and later
  1172. }
  1173. function DMGetAVPowerState(theID: AVIDType; getPowerState: AVPowerStatePtr; reserved1: UInt32): OSErr; external name '_DMGetAVPowerState';
  1174. {
  1175. * DMSetAVPowerState()
  1176. *
  1177. * Availability:
  1178. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1179. * CarbonLib: in CarbonLib 1.0 and later
  1180. * Mac OS X: in version 10.0 and later
  1181. }
  1182. function DMSetAVPowerState(theID: AVIDType; setPowerState: AVPowerStatePtr; powerFlags: UInt32; displayState: Handle): OSErr; external name '_DMSetAVPowerState';
  1183. {
  1184. * DMGetDeviceAVIDByPortAVID()
  1185. *
  1186. * Availability:
  1187. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1188. * CarbonLib: in CarbonLib 1.0 and later
  1189. * Mac OS X: in version 10.0 and later
  1190. }
  1191. function DMGetDeviceAVIDByPortAVID(portAVID: AVIDType; var deviceAVID: AVIDType): OSErr; external name '_DMGetDeviceAVIDByPortAVID';
  1192. {
  1193. * DMGetEnableByAVID()
  1194. *
  1195. * Availability:
  1196. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1197. * CarbonLib: in CarbonLib 1.0 and later
  1198. * Mac OS X: in version 10.0 and later
  1199. }
  1200. function DMGetEnableByAVID(theAVID: AVIDType; var isAVIDEnabledNow: boolean; var canChangeEnableNow: boolean): OSErr; external name '_DMGetEnableByAVID';
  1201. {
  1202. * DMSetEnableByAVID()
  1203. *
  1204. * Availability:
  1205. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1206. * CarbonLib: in CarbonLib 1.0 and later
  1207. * Mac OS X: in version 10.0 and later
  1208. }
  1209. function DMSetEnableByAVID(theAVID: AVIDType; doEnable: boolean; displayState: Handle): OSErr; external name '_DMSetEnableByAVID';
  1210. {
  1211. * DMGetDisplayMode()
  1212. *
  1213. * Availability:
  1214. * Non-Carbon CFM: in DisplayLib68k 2.0 and later
  1215. * CarbonLib: in CarbonLib 1.0 and later
  1216. * Mac OS X: in version 10.0 and later
  1217. }
  1218. function DMGetDisplayMode(theDevice: GDHandle; switchInfo: VDSwitchInfoPtr): OSErr; external name '_DMGetDisplayMode';
  1219. {
  1220. * DMConfirmConfiguration()
  1221. *
  1222. * Availability:
  1223. * Non-Carbon CFM: in DisplayLib 2.1 and later
  1224. * CarbonLib: in CarbonLib 1.0 and later
  1225. * Mac OS X: in version 10.0 and later
  1226. }
  1227. function DMConfirmConfiguration(filterProc: DMModalFilterUPP; confirmFlags: UInt32; reserved: UInt32; displayState: Handle): OSErr; external name '_DMConfirmConfiguration';
  1228. {$ALIGN MAC68K}
  1229. end.