DrawSprocket.pas 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908
  1. {
  2. File: DrawSprocket.p
  3. Contains: Games Sprockets: DrawSprocket interfaces
  4. Version: Technology: Draw Sprocket 1.7
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1996-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 DrawSprocket;
  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,Video,Events,Quickdraw,QDOffscreen,Displays,MacErrors;
  92. {$ALIGN POWER}
  93. {
  94. ********************************************************************************
  95. ** constants
  96. ********************************************************************************
  97. }
  98. type
  99. DSpDepthMask = SInt32;
  100. const
  101. kDSpDepthMask_1 = $01;
  102. kDSpDepthMask_2 = $02;
  103. kDSpDepthMask_4 = $04;
  104. kDSpDepthMask_8 = $08;
  105. kDSpDepthMask_16 = $10;
  106. kDSpDepthMask_32 = $20;
  107. kDSpDepthMask_All = -1;
  108. type
  109. DSpColorNeeds = SInt32;
  110. const
  111. kDSpColorNeeds_DontCare = 0;
  112. kDSpColorNeeds_Request = 1;
  113. kDSpColorNeeds_Require = 2;
  114. type
  115. DSpContextState = SInt32;
  116. const
  117. kDSpContextState_Active = 0;
  118. kDSpContextState_Paused = 1;
  119. kDSpContextState_Inactive = 2;
  120. { kDSpContextOption_QD3DAccel not yet implemented }
  121. type
  122. DSpContextOption = SInt32;
  123. const
  124. { kDSpContextOption_QD3DAccel = 1<<0, }
  125. kDSpContextOption_PageFlip = $02;
  126. kDSpContextOption_DontSyncVBL = $04;
  127. kDSpContextOption_Stereoscopic = $08;
  128. type
  129. DSpAltBufferOption = SInt32;
  130. const
  131. kDSpAltBufferOption_RowBytesEqualsWidth = $01;
  132. type
  133. DSpBufferKind = SInt32;
  134. const
  135. kDSpBufferKind_Normal = 0;
  136. type
  137. DSpBlitMode = SInt32;
  138. const
  139. kDSpBlitMode_Plain = 0;
  140. kDSpBlitMode_SrcKey = $01;
  141. kDSpBlitMode_DstKey = $02;
  142. kDSpBlitMode_Interpolation = $04;
  143. {
  144. ********************************************************************************
  145. ** data types
  146. ********************************************************************************
  147. }
  148. type
  149. DSpAltBufferReference = ^SInt32; { an opaque 32-bit type }
  150. DSpAltBufferReferencePtr = ^DSpAltBufferReference; { when a var xx:DSpAltBufferReference parameter can be nil, it is changed to xx: DSpAltBufferReferencePtr }
  151. DSpContextReference = ^SInt32; { an opaque 32-bit type }
  152. DSpContextReferencePtr = ^DSpContextReference; { when a var xx:DSpContextReference parameter can be nil, it is changed to xx: DSpContextReferencePtr }
  153. DSpContextReferenceConst = ^SInt32; { an opaque 32-bit type }
  154. DSpContextReferenceConstPtr = ^DSpContextReferenceConst; { when a var xx:DSpContextReferenceConst parameter can be nil, it is changed to xx: DSpContextReferenceConstPtr }
  155. {$ifc TYPED_FUNCTION_POINTERS}
  156. DSpEventProcPtr = function(var inEvent: EventRecord): boolean;
  157. {$elsec}
  158. DSpEventProcPtr = ProcPtr;
  159. {$endc}
  160. {$ifc TYPED_FUNCTION_POINTERS}
  161. DSpCallbackProcPtr = function(inContext: DSpContextReference; inRefCon: UnivPtr): boolean;
  162. {$elsec}
  163. DSpCallbackProcPtr = ProcPtr;
  164. {$endc}
  165. {$ifc OPAQUE_UPP_TYPES}
  166. DSpEventUPP = ^SInt32; { an opaque UPP }
  167. {$elsec}
  168. DSpEventUPP = DSpEventProcPtr;
  169. {$endc}
  170. {$ifc OPAQUE_UPP_TYPES}
  171. DSpCallbackUPP = ^SInt32; { an opaque UPP }
  172. {$elsec}
  173. DSpCallbackUPP = DSpCallbackProcPtr;
  174. {$endc}
  175. const
  176. uppDSpEventProcInfo = $000000D1;
  177. uppDSpCallbackProcInfo = $000003D1;
  178. {$ifc CALL_NOT_IN_CARBON}
  179. {
  180. * NewDSpEventUPP()
  181. *
  182. * Availability:
  183. * Non-Carbon CFM: available as macro/inline
  184. * CarbonLib: not available
  185. * Mac OS X: not available
  186. }
  187. function NewDSpEventUPP(userRoutine: DSpEventProcPtr): DSpEventUPP; external name '_NewDSpEventUPP';
  188. {
  189. * NewDSpCallbackUPP()
  190. *
  191. * Availability:
  192. * Non-Carbon CFM: available as macro/inline
  193. * CarbonLib: not available
  194. * Mac OS X: not available
  195. }
  196. function NewDSpCallbackUPP(userRoutine: DSpCallbackProcPtr): DSpCallbackUPP; external name '_NewDSpCallbackUPP';
  197. {
  198. * DisposeDSpEventUPP()
  199. *
  200. * Availability:
  201. * Non-Carbon CFM: available as macro/inline
  202. * CarbonLib: not available
  203. * Mac OS X: not available
  204. }
  205. procedure DisposeDSpEventUPP(userUPP: DSpEventUPP); external name '_DisposeDSpEventUPP';
  206. {
  207. * DisposeDSpCallbackUPP()
  208. *
  209. * Availability:
  210. * Non-Carbon CFM: available as macro/inline
  211. * CarbonLib: not available
  212. * Mac OS X: not available
  213. }
  214. procedure DisposeDSpCallbackUPP(userUPP: DSpCallbackUPP); external name '_DisposeDSpCallbackUPP';
  215. {
  216. * InvokeDSpEventUPP()
  217. *
  218. * Availability:
  219. * Non-Carbon CFM: available as macro/inline
  220. * CarbonLib: not available
  221. * Mac OS X: not available
  222. }
  223. function InvokeDSpEventUPP(var inEvent: EventRecord; userRoutine: DSpEventUPP): boolean; external name '_InvokeDSpEventUPP';
  224. {
  225. * InvokeDSpCallbackUPP()
  226. *
  227. * Availability:
  228. * Non-Carbon CFM: available as macro/inline
  229. * CarbonLib: not available
  230. * Mac OS X: not available
  231. }
  232. function InvokeDSpCallbackUPP(inContext: DSpContextReference; inRefCon: UnivPtr; userRoutine: DSpCallbackUPP): boolean; external name '_InvokeDSpCallbackUPP';
  233. {$endc} {CALL_NOT_IN_CARBON}
  234. type
  235. DSpContextAttributesPtr = ^DSpContextAttributes;
  236. DSpContextAttributes = record
  237. frequency: Fixed;
  238. displayWidth: UInt32;
  239. displayHeight: UInt32;
  240. reserved1: UInt32;
  241. reserved2: UInt32;
  242. colorNeeds: UInt32;
  243. colorTable: CTabHandle;
  244. contextOptions: OptionBits;
  245. backBufferDepthMask: OptionBits;
  246. displayDepthMask: OptionBits;
  247. backBufferBestDepth: UInt32;
  248. displayBestDepth: UInt32;
  249. pageCount: UInt32;
  250. filler1,filler2,filler3: SInt8;
  251. gameMustConfirmSwitch: boolean;
  252. reserved3: array [0..3] of UInt32;
  253. end;
  254. DSpAltBufferAttributesPtr = ^DSpAltBufferAttributes;
  255. DSpAltBufferAttributes = record
  256. width: UInt32;
  257. height: UInt32;
  258. options: DSpAltBufferOption;
  259. reserved: array [0..3] of UInt32;
  260. end;
  261. DSpBlitInfoPtr = ^DSpBlitInfo;
  262. {$ifc TYPED_FUNCTION_POINTERS}
  263. DSpBlitDoneProc = procedure(info: DSpBlitInfoPtr);
  264. {$elsec}
  265. DSpBlitDoneProc = ProcPtr;
  266. {$endc}
  267. DSpBlitInfo = record
  268. completionFlag: boolean;
  269. filler1, filler2, filler3: SInt8;
  270. completionProc: DSpBlitDoneProc;
  271. srcContext: DSpContextReference;
  272. srcBuffer: CGrafPtr;
  273. srcRect: Rect;
  274. srcKey: UInt32;
  275. dstContext: DSpContextReference;
  276. dstBuffer: CGrafPtr;
  277. dstRect: Rect;
  278. dstKey: UInt32;
  279. mode: DSpBlitMode;
  280. reserved: array [0..3] of UInt32;
  281. end;
  282. {
  283. ********************************************************************************
  284. ** function prototypes
  285. ********************************************************************************
  286. }
  287. {
  288. ** global operations
  289. }
  290. {
  291. * DSpStartup()
  292. *
  293. * Availability:
  294. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  295. * CarbonLib: not available
  296. * Mac OS X: in version 10.0 and later
  297. }
  298. function DSpStartup: OSStatus; external name '_DSpStartup';
  299. {
  300. * DSpShutdown()
  301. *
  302. * Availability:
  303. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  304. * CarbonLib: not available
  305. * Mac OS X: in version 10.0 and later
  306. }
  307. function DSpShutdown: OSStatus; external name '_DSpShutdown';
  308. {
  309. * DSpGetVersion()
  310. *
  311. * Availability:
  312. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  313. * CarbonLib: not available
  314. * Mac OS X: in version 10.0 and later
  315. }
  316. function DSpGetVersion: NumVersion; external name '_DSpGetVersion';
  317. {
  318. * DSpGetFirstContext()
  319. *
  320. * Availability:
  321. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  322. * CarbonLib: not available
  323. * Mac OS X: in version 10.0 and later
  324. }
  325. function DSpGetFirstContext(inDisplayID: DisplayIDType; var outContext: DSpContextReference): OSStatus; external name '_DSpGetFirstContext';
  326. {
  327. * DSpGetNextContext()
  328. *
  329. * Availability:
  330. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  331. * CarbonLib: not available
  332. * Mac OS X: in version 10.0 and later
  333. }
  334. function DSpGetNextContext(inCurrentContext: DSpContextReference; var outContext: DSpContextReference): OSStatus; external name '_DSpGetNextContext';
  335. {
  336. * DSpGetCurrentContext()
  337. *
  338. * Availability:
  339. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  340. * CarbonLib: not available
  341. * Mac OS X: in version 10.0 and later
  342. }
  343. function DSpGetCurrentContext(inDisplayID: DisplayIDType; var outContext: DSpContextReference): OSStatus; external name '_DSpGetCurrentContext';
  344. {
  345. * DSpFindBestContext()
  346. *
  347. * Availability:
  348. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  349. * CarbonLib: not available
  350. * Mac OS X: in version 10.0 and later
  351. }
  352. function DSpFindBestContext(inDesiredAttributes: DSpContextAttributesPtr; var outContext: DSpContextReference): OSStatus; external name '_DSpFindBestContext';
  353. {
  354. * DSpFindBestContextOnDisplayID()
  355. *
  356. * Availability:
  357. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  358. * CarbonLib: not available
  359. * Mac OS X: in version 10.0 and later
  360. }
  361. function DSpFindBestContextOnDisplayID(inDesiredAttributes: DSpContextAttributesPtr; var outContext: DSpContextReference; inDisplayID: DisplayIDType): OSStatus; external name '_DSpFindBestContextOnDisplayID';
  362. {$ifc CALL_NOT_IN_CARBON}
  363. {
  364. * DSpCanUserSelectContext()
  365. *
  366. * Availability:
  367. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  368. * CarbonLib: not available
  369. * Mac OS X: not available
  370. }
  371. function DSpCanUserSelectContext(inDesiredAttributes: DSpContextAttributesPtr; var outUserCanSelectContext: boolean): OSStatus; external name '_DSpCanUserSelectContext';
  372. {
  373. * DSpUserSelectContext()
  374. *
  375. * Availability:
  376. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  377. * CarbonLib: not available
  378. * Mac OS X: not available
  379. }
  380. function DSpUserSelectContext(inDesiredAttributes: DSpContextAttributesPtr; inDialogDisplayLocation: DisplayIDType; inEventProc: DSpEventUPP; var outContext: DSpContextReference): OSStatus; external name '_DSpUserSelectContext';
  381. {$endc} {CALL_NOT_IN_CARBON}
  382. {
  383. * DSpProcessEvent()
  384. *
  385. * Availability:
  386. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  387. * CarbonLib: not available
  388. * Mac OS X: in version 10.0 and later
  389. }
  390. function DSpProcessEvent(var inEvent: EventRecord; var outEventWasProcessed: boolean): OSStatus; external name '_DSpProcessEvent';
  391. {
  392. * DSpSetBlankingColor()
  393. *
  394. * Availability:
  395. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  396. * CarbonLib: not available
  397. * Mac OS X: in version 10.0 and later
  398. }
  399. function DSpSetBlankingColor(const (*var*) inRGBColor: RGBColor): OSStatus; external name '_DSpSetBlankingColor';
  400. {
  401. * DSpSetDebugMode()
  402. *
  403. * Availability:
  404. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  405. * CarbonLib: not available
  406. * Mac OS X: in version 10.0 and later
  407. }
  408. function DSpSetDebugMode(inDebugMode: boolean): OSStatus; external name '_DSpSetDebugMode';
  409. {
  410. * DSpFindContextFromPoint()
  411. *
  412. * Availability:
  413. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  414. * CarbonLib: not available
  415. * Mac OS X: in version 10.0 and later
  416. }
  417. function DSpFindContextFromPoint(inGlobalPoint: Point; var outContext: DSpContextReference): OSStatus; external name '_DSpFindContextFromPoint';
  418. {
  419. * DSpGetMouse()
  420. *
  421. * Availability:
  422. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  423. * CarbonLib: not available
  424. * Mac OS X: in version 10.0 and later
  425. }
  426. function DSpGetMouse(var outGlobalPoint: Point): OSStatus; external name '_DSpGetMouse';
  427. {
  428. ** alternate buffer operations
  429. }
  430. {$ifc CALL_NOT_IN_CARBON}
  431. {
  432. * DSpAltBuffer_New()
  433. *
  434. * Availability:
  435. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  436. * CarbonLib: not available
  437. * Mac OS X: not available
  438. }
  439. function DSpAltBuffer_New(inContext: DSpContextReference; inVRAMBuffer: boolean; var inAttributes: DSpAltBufferAttributes; var outAltBuffer: DSpAltBufferReference): OSStatus; external name '_DSpAltBuffer_New';
  440. {
  441. * DSpAltBuffer_Dispose()
  442. *
  443. * Availability:
  444. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  445. * CarbonLib: not available
  446. * Mac OS X: not available
  447. }
  448. function DSpAltBuffer_Dispose(inAltBuffer: DSpAltBufferReference): OSStatus; external name '_DSpAltBuffer_Dispose';
  449. {
  450. * DSpAltBuffer_InvalRect()
  451. *
  452. * Availability:
  453. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  454. * CarbonLib: not available
  455. * Mac OS X: not available
  456. }
  457. function DSpAltBuffer_InvalRect(inAltBuffer: DSpAltBufferReference; const (*var*) inInvalidRect: Rect): OSStatus; external name '_DSpAltBuffer_InvalRect';
  458. {
  459. * DSpAltBuffer_GetCGrafPtr()
  460. *
  461. * Availability:
  462. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  463. * CarbonLib: not available
  464. * Mac OS X: not available
  465. }
  466. function DSpAltBuffer_GetCGrafPtr(inAltBuffer: DSpAltBufferReference; inBufferKind: DSpBufferKind; var outCGrafPtr: CGrafPtr; var outGDevice: GDHandle): OSStatus; external name '_DSpAltBuffer_GetCGrafPtr';
  467. {
  468. ** context operations
  469. }
  470. { general }
  471. {$endc} {CALL_NOT_IN_CARBON}
  472. {
  473. * DSpContext_GetAttributes()
  474. *
  475. * Availability:
  476. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  477. * CarbonLib: not available
  478. * Mac OS X: in version 10.0 and later
  479. }
  480. function DSpContext_GetAttributes(inContext: DSpContextReferenceConst; outAttributes: DSpContextAttributesPtr): OSStatus; external name '_DSpContext_GetAttributes';
  481. {
  482. * DSpContext_Reserve()
  483. *
  484. * Availability:
  485. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  486. * CarbonLib: not available
  487. * Mac OS X: in version 10.0 and later
  488. }
  489. function DSpContext_Reserve(inContext: DSpContextReference; inDesiredAttributes: DSpContextAttributesPtr): OSStatus; external name '_DSpContext_Reserve';
  490. {
  491. * DSpContext_Queue()
  492. *
  493. * Availability:
  494. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  495. * CarbonLib: not available
  496. * Mac OS X: in version 10.0 and later
  497. }
  498. function DSpContext_Queue(inParentContext: DSpContextReference; inChildContext: DSpContextReference; inDesiredAttributes: DSpContextAttributesPtr): OSStatus; external name '_DSpContext_Queue';
  499. {
  500. * DSpContext_Switch()
  501. *
  502. * Availability:
  503. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  504. * CarbonLib: not available
  505. * Mac OS X: in version 10.0 and later
  506. }
  507. function DSpContext_Switch(inOldContext: DSpContextReference; inNewContext: DSpContextReference): OSStatus; external name '_DSpContext_Switch';
  508. {
  509. * DSpContext_Release()
  510. *
  511. * Availability:
  512. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  513. * CarbonLib: not available
  514. * Mac OS X: in version 10.0 and later
  515. }
  516. function DSpContext_Release(inContext: DSpContextReference): OSStatus; external name '_DSpContext_Release';
  517. {
  518. * DSpContext_Dispose()
  519. *
  520. * Availability:
  521. * Non-Carbon CFM: not available
  522. * CarbonLib: not available
  523. * Mac OS X: in version 10.0 and later
  524. }
  525. function DSpContext_Dispose(inContext: DSpContextReference): OSStatus; external name '_DSpContext_Dispose';
  526. {
  527. * DSpContext_GetDisplayID()
  528. *
  529. * Availability:
  530. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  531. * CarbonLib: not available
  532. * Mac OS X: in version 10.0 and later
  533. }
  534. function DSpContext_GetDisplayID(inContext: DSpContextReferenceConst; var outDisplayID: DisplayIDType): OSStatus; external name '_DSpContext_GetDisplayID';
  535. {
  536. * DSpContext_GlobalToLocal()
  537. *
  538. * Availability:
  539. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  540. * CarbonLib: not available
  541. * Mac OS X: in version 10.0 and later
  542. }
  543. function DSpContext_GlobalToLocal(inContext: DSpContextReferenceConst; var ioPoint: Point): OSStatus; external name '_DSpContext_GlobalToLocal';
  544. {
  545. * DSpContext_LocalToGlobal()
  546. *
  547. * Availability:
  548. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  549. * CarbonLib: not available
  550. * Mac OS X: in version 10.0 and later
  551. }
  552. function DSpContext_LocalToGlobal(inContext: DSpContextReferenceConst; var ioPoint: Point): OSStatus; external name '_DSpContext_LocalToGlobal';
  553. {$ifc CALL_NOT_IN_CARBON}
  554. {
  555. * DSpContext_SetVBLProc()
  556. *
  557. * Availability:
  558. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  559. * CarbonLib: not available
  560. * Mac OS X: not available
  561. }
  562. function DSpContext_SetVBLProc(inContext: DSpContextReference; inProcPtr: DSpCallbackUPP; inRefCon: UnivPtr): OSStatus; external name '_DSpContext_SetVBLProc';
  563. {
  564. * DSpContext_GetFlattenedSize()
  565. *
  566. * Availability:
  567. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  568. * CarbonLib: not available
  569. * Mac OS X: not available
  570. }
  571. function DSpContext_GetFlattenedSize(inContext: DSpContextReference; var outFlatContextSize: UInt32): OSStatus; external name '_DSpContext_GetFlattenedSize';
  572. {
  573. * DSpContext_Flatten()
  574. *
  575. * Availability:
  576. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  577. * CarbonLib: not available
  578. * Mac OS X: not available
  579. }
  580. function DSpContext_Flatten(inContext: DSpContextReference; outFlatContext: UnivPtr): OSStatus; external name '_DSpContext_Flatten';
  581. {
  582. * DSpContext_Restore()
  583. *
  584. * Availability:
  585. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  586. * CarbonLib: not available
  587. * Mac OS X: not available
  588. }
  589. function DSpContext_Restore(inFlatContext: UnivPtr; var outRestoredContext: DSpContextReference): OSStatus; external name '_DSpContext_Restore';
  590. {$endc} {CALL_NOT_IN_CARBON}
  591. {
  592. * DSpContext_GetMonitorFrequency()
  593. *
  594. * Availability:
  595. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  596. * CarbonLib: not available
  597. * Mac OS X: in version 10.0 and later
  598. }
  599. function DSpContext_GetMonitorFrequency(inContext: DSpContextReferenceConst; var outFrequency: Fixed): OSStatus; external name '_DSpContext_GetMonitorFrequency';
  600. {$ifc CALL_NOT_IN_CARBON}
  601. {
  602. * DSpContext_SetMaxFrameRate()
  603. *
  604. * Availability:
  605. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  606. * CarbonLib: not available
  607. * Mac OS X: not available
  608. }
  609. function DSpContext_SetMaxFrameRate(inContext: DSpContextReference; inMaxFPS: UInt32): OSStatus; external name '_DSpContext_SetMaxFrameRate';
  610. {
  611. * DSpContext_GetMaxFrameRate()
  612. *
  613. * Availability:
  614. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  615. * CarbonLib: not available
  616. * Mac OS X: not available
  617. }
  618. function DSpContext_GetMaxFrameRate(inContext: DSpContextReferenceConst; var outMaxFPS: UInt32): OSStatus; external name '_DSpContext_GetMaxFrameRate';
  619. {$endc} {CALL_NOT_IN_CARBON}
  620. {
  621. * DSpContext_SetState()
  622. *
  623. * Availability:
  624. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  625. * CarbonLib: not available
  626. * Mac OS X: in version 10.0 and later
  627. }
  628. function DSpContext_SetState(inContext: DSpContextReference; inState: DSpContextState): OSStatus; external name '_DSpContext_SetState';
  629. {
  630. * DSpContext_GetState()
  631. *
  632. * Availability:
  633. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  634. * CarbonLib: not available
  635. * Mac OS X: in version 10.0 and later
  636. }
  637. function DSpContext_GetState(inContext: DSpContextReferenceConst; var outState: DSpContextState): OSStatus; external name '_DSpContext_GetState';
  638. {
  639. * DSpContext_IsBusy()
  640. *
  641. * Availability:
  642. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  643. * CarbonLib: not available
  644. * Mac OS X: in version 10.0 and later
  645. }
  646. function DSpContext_IsBusy(inContext: DSpContextReferenceConst; var outBusyFlag: boolean): OSStatus; external name '_DSpContext_IsBusy';
  647. { dirty rectangles }
  648. {$ifc CALL_NOT_IN_CARBON}
  649. {
  650. * DSpContext_SetDirtyRectGridSize()
  651. *
  652. * Availability:
  653. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  654. * CarbonLib: not available
  655. * Mac OS X: not available
  656. }
  657. function DSpContext_SetDirtyRectGridSize(inContext: DSpContextReference; inCellPixelWidth: UInt32; inCellPixelHeight: UInt32): OSStatus; external name '_DSpContext_SetDirtyRectGridSize';
  658. {
  659. * DSpContext_GetDirtyRectGridSize()
  660. *
  661. * Availability:
  662. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  663. * CarbonLib: not available
  664. * Mac OS X: not available
  665. }
  666. function DSpContext_GetDirtyRectGridSize(inContext: DSpContextReferenceConst; var outCellPixelWidth: UInt32; var outCellPixelHeight: UInt32): OSStatus; external name '_DSpContext_GetDirtyRectGridSize';
  667. {
  668. * DSpContext_GetDirtyRectGridUnits()
  669. *
  670. * Availability:
  671. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  672. * CarbonLib: not available
  673. * Mac OS X: not available
  674. }
  675. function DSpContext_GetDirtyRectGridUnits(inContext: DSpContextReferenceConst; var outCellPixelWidth: UInt32; var outCellPixelHeight: UInt32): OSStatus; external name '_DSpContext_GetDirtyRectGridUnits';
  676. {
  677. * DSpContext_InvalBackBufferRect()
  678. *
  679. * Availability:
  680. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  681. * CarbonLib: not available
  682. * Mac OS X: not available
  683. }
  684. function DSpContext_InvalBackBufferRect(inContext: DSpContextReference; const (*var*) inRect: Rect): OSStatus; external name '_DSpContext_InvalBackBufferRect';
  685. { underlays }
  686. {
  687. * DSpContext_SetUnderlayAltBuffer()
  688. *
  689. * Availability:
  690. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  691. * CarbonLib: not available
  692. * Mac OS X: not available
  693. }
  694. function DSpContext_SetUnderlayAltBuffer(inContext: DSpContextReference; inNewUnderlay: DSpAltBufferReference): OSStatus; external name '_DSpContext_SetUnderlayAltBuffer';
  695. {
  696. * DSpContext_GetUnderlayAltBuffer()
  697. *
  698. * Availability:
  699. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  700. * CarbonLib: not available
  701. * Mac OS X: not available
  702. }
  703. function DSpContext_GetUnderlayAltBuffer(inContext: DSpContextReferenceConst; var outUnderlay: DSpAltBufferReference): OSStatus; external name '_DSpContext_GetUnderlayAltBuffer';
  704. { gamma }
  705. {$endc} {CALL_NOT_IN_CARBON}
  706. {
  707. * DSpContext_FadeGammaOut()
  708. *
  709. * Availability:
  710. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  711. * CarbonLib: not available
  712. * Mac OS X: in version 10.0 and later
  713. }
  714. function DSpContext_FadeGammaOut(inContext: DSpContextReference; var inZeroIntensityColor: RGBColor): OSStatus; external name '_DSpContext_FadeGammaOut';
  715. {
  716. * DSpContext_FadeGammaIn()
  717. *
  718. * Availability:
  719. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  720. * CarbonLib: not available
  721. * Mac OS X: in version 10.0 and later
  722. }
  723. function DSpContext_FadeGammaIn(inContext: DSpContextReference; var inZeroIntensityColor: RGBColor): OSStatus; external name '_DSpContext_FadeGammaIn';
  724. {
  725. * DSpContext_FadeGamma()
  726. *
  727. * Availability:
  728. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  729. * CarbonLib: not available
  730. * Mac OS X: in version 10.0 and later
  731. }
  732. function DSpContext_FadeGamma(inContext: DSpContextReference; inPercentOfOriginalIntensity: SInt32; var inZeroIntensityColor: RGBColor): OSStatus; external name '_DSpContext_FadeGamma';
  733. { buffering }
  734. {
  735. * DSpContext_SwapBuffers()
  736. *
  737. * Availability:
  738. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  739. * CarbonLib: not available
  740. * Mac OS X: in version 10.0 and later
  741. }
  742. function DSpContext_SwapBuffers(inContext: DSpContextReference; inBusyProc: DSpCallbackUPP; inUserRefCon: UnivPtr): OSStatus; external name '_DSpContext_SwapBuffers';
  743. {
  744. * DSpContext_GetBackBuffer()
  745. *
  746. * Availability:
  747. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  748. * CarbonLib: not available
  749. * Mac OS X: in version 10.0 and later
  750. }
  751. function DSpContext_GetBackBuffer(inContext: DSpContextReference; inBufferKind: DSpBufferKind; var outBackBuffer: CGrafPtr): OSStatus; external name '_DSpContext_GetBackBuffer';
  752. {
  753. * DSpContext_GetFrontBuffer()
  754. *
  755. * Availability:
  756. * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
  757. * CarbonLib: not available
  758. * Mac OS X: in version 10.0 and later
  759. }
  760. function DSpContext_GetFrontBuffer(inContext: DSpContextReferenceConst; var outFrontBuffer: CGrafPtr): OSStatus; external name '_DSpContext_GetFrontBuffer';
  761. { clut operations }
  762. {
  763. * DSpContext_SetCLUTEntries()
  764. *
  765. * Availability:
  766. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  767. * CarbonLib: not available
  768. * Mac OS X: in version 10.0 and later
  769. }
  770. function DSpContext_SetCLUTEntries(inContext: DSpContextReference; const (*var*) inEntries: ColorSpec; inStartingEntry: UInt16; inLastEntry: UInt16): OSStatus; external name '_DSpContext_SetCLUTEntries';
  771. {
  772. * DSpContext_GetCLUTEntries()
  773. *
  774. * Availability:
  775. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  776. * CarbonLib: not available
  777. * Mac OS X: in version 10.0 and later
  778. }
  779. function DSpContext_GetCLUTEntries(inContext: DSpContextReferenceConst; var outEntries: ColorSpec; inStartingEntry: UInt16; inLastEntry: UInt16): OSStatus; external name '_DSpContext_GetCLUTEntries';
  780. { blit operations }
  781. {$ifc CALL_NOT_IN_CARBON}
  782. {
  783. * DSpBlit_Faster()
  784. *
  785. * Availability:
  786. * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
  787. * CarbonLib: not available
  788. * Mac OS X: not available
  789. }
  790. function DSpBlit_Faster(inBlitInfo: DSpBlitInfoPtr; inAsyncFlag: boolean): OSStatus; external name '_DSpBlit_Faster';
  791. {
  792. * DSpBlit_Fastest()
  793. *
  794. * Availability:
  795. * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
  796. * CarbonLib: not available
  797. * Mac OS X: not available
  798. }
  799. function DSpBlit_Fastest(inBlitInfo: DSpBlitInfoPtr; inAsyncFlag: boolean): OSStatus; external name '_DSpBlit_Fastest';
  800. {$endc} {CALL_NOT_IN_CARBON}
  801. {$ALIGN MAC68K}
  802. end.