Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1146 lines
28 KiB

  1. /*
  2. File: DrawSprocket.h
  3. Contains: Games Sprockets: DrawSprocket interfaces
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __DRAWSPROCKET__
  11. #define __DRAWSPROCKET__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #ifndef __EVENTS__
  16. #include <Events.h>
  17. #endif
  18. #ifndef __QUICKDRAW__
  19. #include <Quickdraw.h>
  20. #endif
  21. #ifndef __QDOFFSCREEN__
  22. #include <QDOffscreen.h>
  23. #endif
  24. #ifndef __DISPLAYS__
  25. #include <Displays.h>
  26. #endif
  27. #ifndef __MACERRORS__
  28. #include <MacErrors.h>
  29. #endif
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. #if PRAGMA_IMPORT
  37. #pragma import on
  38. #endif
  39. #if PRAGMA_STRUCT_ALIGN
  40. #pragma options align=power
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42. #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44. #pragma pack(2)
  45. #endif
  46. #if PRAGMA_ENUM_ALWAYSINT
  47. #if defined(__fourbyteints__) && !__fourbyteints__
  48. #define __DRAWSPROCKET__RESTORE_TWOBYTEINTS
  49. #pragma fourbyteints on
  50. #endif
  51. #pragma enumsalwaysint on
  52. #elif PRAGMA_ENUM_OPTIONS
  53. #pragma option enum=int
  54. #elif PRAGMA_ENUM_PACK
  55. #if __option(pack_enums)
  56. #define __DRAWSPROCKET__RESTORE_PACKED_ENUMS
  57. #pragma options(!pack_enums)
  58. #endif
  59. #endif
  60. /*
  61. ********************************************************************************
  62. ** constants
  63. ********************************************************************************
  64. */
  65. enum DSpDepthMask {
  66. kDSpDepthMask_1 = 1 << 0,
  67. kDSpDepthMask_2 = 1 << 1,
  68. kDSpDepthMask_4 = 1 << 2,
  69. kDSpDepthMask_8 = 1 << 3,
  70. kDSpDepthMask_16 = 1 << 4,
  71. kDSpDepthMask_32 = 1 << 5,
  72. kDSpDepthMask_All = -1L
  73. };
  74. typedef enum DSpDepthMask DSpDepthMask;
  75. enum DSpColorNeeds {
  76. kDSpColorNeeds_DontCare = 0L,
  77. kDSpColorNeeds_Request = 1L,
  78. kDSpColorNeeds_Require = 2L
  79. };
  80. typedef enum DSpColorNeeds DSpColorNeeds;
  81. enum DSpContextState {
  82. kDSpContextState_Active = 0L,
  83. kDSpContextState_Paused = 1L,
  84. kDSpContextState_Inactive = 2L
  85. };
  86. typedef enum DSpContextState DSpContextState;
  87. /* kDSpContextOption_QD3DAccel not yet implemented */
  88. enum DSpContextOption {
  89. /* kDSpContextOption_QD3DAccel = 1<<0,*/
  90. kDSpContextOption_PageFlip = 1 << 1,
  91. kDSpContextOption_DontSyncVBL = 1 << 2,
  92. kDSpContextOption_Stereoscopic = 1 << 3
  93. };
  94. typedef enum DSpContextOption DSpContextOption;
  95. enum DSpAltBufferOption {
  96. kDSpAltBufferOption_RowBytesEqualsWidth = 1 << 0
  97. };
  98. typedef enum DSpAltBufferOption DSpAltBufferOption;
  99. enum DSpBufferKind {
  100. kDSpBufferKind_Normal = 0
  101. };
  102. typedef enum DSpBufferKind DSpBufferKind;
  103. enum DSpBlitMode {
  104. kDSpBlitMode_Plain = 0,
  105. kDSpBlitMode_SrcKey = 1 << 0,
  106. kDSpBlitMode_DstKey = 1 << 1,
  107. kDSpBlitMode_Interpolation = 1 << 2
  108. };
  109. typedef enum DSpBlitMode DSpBlitMode;
  110. /*
  111. ********************************************************************************
  112. ** data types
  113. ********************************************************************************
  114. */
  115. typedef struct OpaqueDSpAltBufferReference* DSpAltBufferReference;
  116. typedef struct OpaqueDSpContextReference* DSpContextReference;
  117. typedef const struct OpaqueDSpContextReference* DSpContextReferenceConst;
  118. #define kDSpEveryContext ((DSpContextReference)NULL)
  119. typedef CALLBACK_API_C( Boolean , DSpEventProcPtr )(EventRecord * inEvent);
  120. typedef CALLBACK_API_C( Boolean , DSpCallbackProcPtr )(DSpContextReference inContext, void *inRefCon);
  121. typedef TVECTOR_UPP_TYPE(DSpEventProcPtr) DSpEventUPP;
  122. typedef TVECTOR_UPP_TYPE(DSpCallbackProcPtr) DSpCallbackUPP;
  123. #if CALL_NOT_IN_CARBON
  124. /*
  125. * NewDSpEventUPP()
  126. *
  127. * Availability:
  128. * Non-Carbon CFM: available as macro/inline
  129. * CarbonLib: not available
  130. * Mac OS X: not available
  131. */
  132. EXTERN_API_C( DSpEventUPP )
  133. NewDSpEventUPP(DSpEventProcPtr userRoutine);
  134. #if !OPAQUE_UPP_TYPES
  135. enum { uppDSpEventProcInfo = 0x000000D1 }; /* 1_byte Func(4_bytes) */
  136. #ifdef __cplusplus
  137. inline DEFINE_API_C(DSpEventUPP) NewDSpEventUPP(DSpEventProcPtr userRoutine) { return userRoutine; }
  138. #else
  139. #define NewDSpEventUPP(userRoutine) (userRoutine)
  140. #endif
  141. #endif
  142. /*
  143. * NewDSpCallbackUPP()
  144. *
  145. * Availability:
  146. * Non-Carbon CFM: available as macro/inline
  147. * CarbonLib: not available
  148. * Mac OS X: not available
  149. */
  150. EXTERN_API_C( DSpCallbackUPP )
  151. NewDSpCallbackUPP(DSpCallbackProcPtr userRoutine);
  152. #if !OPAQUE_UPP_TYPES
  153. enum { uppDSpCallbackProcInfo = 0x000003D1 }; /* 1_byte Func(4_bytes, 4_bytes) */
  154. #ifdef __cplusplus
  155. inline DEFINE_API_C(DSpCallbackUPP) NewDSpCallbackUPP(DSpCallbackProcPtr userRoutine) { return userRoutine; }
  156. #else
  157. #define NewDSpCallbackUPP(userRoutine) (userRoutine)
  158. #endif
  159. #endif
  160. /*
  161. * DisposeDSpEventUPP()
  162. *
  163. * Availability:
  164. * Non-Carbon CFM: available as macro/inline
  165. * CarbonLib: not available
  166. * Mac OS X: not available
  167. */
  168. EXTERN_API_C( void )
  169. DisposeDSpEventUPP(DSpEventUPP userUPP);
  170. #if !OPAQUE_UPP_TYPES
  171. #ifdef __cplusplus
  172. inline DEFINE_API_C(void) DisposeDSpEventUPP(DSpEventUPP) {}
  173. #else
  174. #define DisposeDSpEventUPP(userUPP)
  175. #endif
  176. #endif
  177. /*
  178. * DisposeDSpCallbackUPP()
  179. *
  180. * Availability:
  181. * Non-Carbon CFM: available as macro/inline
  182. * CarbonLib: not available
  183. * Mac OS X: not available
  184. */
  185. EXTERN_API_C( void )
  186. DisposeDSpCallbackUPP(DSpCallbackUPP userUPP);
  187. #if !OPAQUE_UPP_TYPES
  188. #ifdef __cplusplus
  189. inline DEFINE_API_C(void) DisposeDSpCallbackUPP(DSpCallbackUPP) {}
  190. #else
  191. #define DisposeDSpCallbackUPP(userUPP)
  192. #endif
  193. #endif
  194. /*
  195. * InvokeDSpEventUPP()
  196. *
  197. * Availability:
  198. * Non-Carbon CFM: available as macro/inline
  199. * CarbonLib: not available
  200. * Mac OS X: not available
  201. */
  202. EXTERN_API_C( Boolean )
  203. InvokeDSpEventUPP(
  204. EventRecord * inEvent,
  205. DSpEventUPP userUPP);
  206. #if !OPAQUE_UPP_TYPES
  207. #ifdef __cplusplus
  208. inline DEFINE_API_C(Boolean) InvokeDSpEventUPP(EventRecord * inEvent, DSpEventUPP userUPP) { return (*userUPP)(inEvent); }
  209. #else
  210. #define InvokeDSpEventUPP(inEvent, userUPP) (*userUPP)(inEvent)
  211. #endif
  212. #endif
  213. /*
  214. * InvokeDSpCallbackUPP()
  215. *
  216. * Availability:
  217. * Non-Carbon CFM: available as macro/inline
  218. * CarbonLib: not available
  219. * Mac OS X: not available
  220. */
  221. EXTERN_API_C( Boolean )
  222. InvokeDSpCallbackUPP(
  223. DSpContextReference inContext,
  224. void * inRefCon,
  225. DSpCallbackUPP userUPP);
  226. #if !OPAQUE_UPP_TYPES
  227. #ifdef __cplusplus
  228. inline DEFINE_API_C(Boolean) InvokeDSpCallbackUPP(DSpContextReference inContext, void * inRefCon, DSpCallbackUPP userUPP) { return (*userUPP)(inContext, inRefCon); }
  229. #else
  230. #define InvokeDSpCallbackUPP(inContext, inRefCon, userUPP) (*userUPP)(inContext, inRefCon)
  231. #endif
  232. #endif
  233. #endif /* CALL_NOT_IN_CARBON */
  234. struct DSpContextAttributes {
  235. Fixed frequency;
  236. UInt32 displayWidth;
  237. UInt32 displayHeight;
  238. UInt32 reserved1;
  239. UInt32 reserved2;
  240. UInt32 colorNeeds;
  241. CTabHandle colorTable;
  242. OptionBits contextOptions;
  243. OptionBits backBufferDepthMask;
  244. OptionBits displayDepthMask;
  245. UInt32 backBufferBestDepth;
  246. UInt32 displayBestDepth;
  247. UInt32 pageCount;
  248. char filler[3];
  249. Boolean gameMustConfirmSwitch;
  250. UInt32 reserved3[4];
  251. };
  252. typedef struct DSpContextAttributes DSpContextAttributes;
  253. typedef DSpContextAttributes * DSpContextAttributesPtr;
  254. struct DSpAltBufferAttributes {
  255. UInt32 width;
  256. UInt32 height;
  257. DSpAltBufferOption options;
  258. UInt32 reserved[4];
  259. };
  260. typedef struct DSpAltBufferAttributes DSpAltBufferAttributes;
  261. typedef struct DSpBlitInfo DSpBlitInfo;
  262. typedef CALLBACK_API_C( void , DSpBlitDoneProc )(DSpBlitInfo * info);
  263. struct DSpBlitInfo {
  264. Boolean completionFlag;
  265. char filler[3];
  266. DSpBlitDoneProc completionProc;
  267. DSpContextReference srcContext;
  268. CGrafPtr srcBuffer;
  269. Rect srcRect;
  270. UInt32 srcKey;
  271. DSpContextReference dstContext;
  272. CGrafPtr dstBuffer;
  273. Rect dstRect;
  274. UInt32 dstKey;
  275. DSpBlitMode mode;
  276. UInt32 reserved[4];
  277. };
  278. typedef DSpBlitInfo * DSpBlitInfoPtr;
  279. /*
  280. ********************************************************************************
  281. ** function prototypes
  282. ********************************************************************************
  283. */
  284. /*
  285. ** global operations
  286. */
  287. /*
  288. * DSpStartup()
  289. *
  290. * Availability:
  291. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  292. * CarbonLib: not available
  293. * Mac OS X: in version 10.0 and later
  294. */
  295. EXTERN_API_C( OSStatus )
  296. DSpStartup(void);
  297. /*
  298. * DSpShutdown()
  299. *
  300. * Availability:
  301. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  302. * CarbonLib: not available
  303. * Mac OS X: in version 10.0 and later
  304. */
  305. EXTERN_API_C( OSStatus )
  306. DSpShutdown(void);
  307. /*
  308. * DSpGetVersion()
  309. *
  310. * Availability:
  311. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  312. * CarbonLib: not available
  313. * Mac OS X: in version 10.0 and later
  314. */
  315. EXTERN_API_C( NumVersion )
  316. DSpGetVersion(void);
  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. EXTERN_API_C( OSStatus )
  326. DSpGetFirstContext(
  327. DisplayIDType inDisplayID,
  328. DSpContextReference * outContext);
  329. /*
  330. * DSpGetNextContext()
  331. *
  332. * Availability:
  333. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  334. * CarbonLib: not available
  335. * Mac OS X: in version 10.0 and later
  336. */
  337. EXTERN_API_C( OSStatus )
  338. DSpGetNextContext(
  339. DSpContextReference inCurrentContext,
  340. DSpContextReference * outContext);
  341. /*
  342. * DSpGetCurrentContext()
  343. *
  344. * Availability:
  345. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  346. * CarbonLib: not available
  347. * Mac OS X: in version 10.0 and later
  348. */
  349. EXTERN_API_C( OSStatus )
  350. DSpGetCurrentContext(
  351. DisplayIDType inDisplayID,
  352. DSpContextReference * outContext);
  353. /*
  354. * DSpFindBestContext()
  355. *
  356. * Availability:
  357. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  358. * CarbonLib: not available
  359. * Mac OS X: in version 10.0 and later
  360. */
  361. EXTERN_API_C( OSStatus )
  362. DSpFindBestContext(
  363. DSpContextAttributesPtr inDesiredAttributes,
  364. DSpContextReference * outContext);
  365. /*
  366. * DSpFindBestContextOnDisplayID()
  367. *
  368. * Availability:
  369. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  370. * CarbonLib: not available
  371. * Mac OS X: in version 10.0 and later
  372. */
  373. EXTERN_API_C( OSStatus )
  374. DSpFindBestContextOnDisplayID(
  375. DSpContextAttributesPtr inDesiredAttributes,
  376. DSpContextReference * outContext,
  377. DisplayIDType inDisplayID);
  378. #if CALL_NOT_IN_CARBON
  379. /*
  380. * DSpCanUserSelectContext()
  381. *
  382. * Availability:
  383. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  384. * CarbonLib: not available
  385. * Mac OS X: not available
  386. */
  387. EXTERN_API_C( OSStatus )
  388. DSpCanUserSelectContext(
  389. DSpContextAttributesPtr inDesiredAttributes,
  390. Boolean * outUserCanSelectContext);
  391. /*
  392. * DSpUserSelectContext()
  393. *
  394. * Availability:
  395. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  396. * CarbonLib: not available
  397. * Mac OS X: not available
  398. */
  399. EXTERN_API_C( OSStatus )
  400. DSpUserSelectContext(
  401. DSpContextAttributesPtr inDesiredAttributes,
  402. DisplayIDType inDialogDisplayLocation,
  403. DSpEventUPP inEventProc,
  404. DSpContextReference * outContext);
  405. #endif /* CALL_NOT_IN_CARBON */
  406. /*
  407. * DSpProcessEvent()
  408. *
  409. * Availability:
  410. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  411. * CarbonLib: not available
  412. * Mac OS X: in version 10.0 and later
  413. */
  414. EXTERN_API_C( OSStatus )
  415. DSpProcessEvent(
  416. EventRecord * inEvent,
  417. Boolean * outEventWasProcessed);
  418. /*
  419. * DSpSetBlankingColor()
  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. EXTERN_API_C( OSStatus )
  427. DSpSetBlankingColor(const RGBColor * inRGBColor);
  428. /*
  429. * DSpSetDebugMode()
  430. *
  431. * Availability:
  432. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  433. * CarbonLib: not available
  434. * Mac OS X: in version 10.0 and later
  435. */
  436. EXTERN_API_C( OSStatus )
  437. DSpSetDebugMode(Boolean inDebugMode);
  438. /*
  439. * DSpFindContextFromPoint()
  440. *
  441. * Availability:
  442. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  443. * CarbonLib: not available
  444. * Mac OS X: in version 10.0 and later
  445. */
  446. EXTERN_API_C( OSStatus )
  447. DSpFindContextFromPoint(
  448. Point inGlobalPoint,
  449. DSpContextReference * outContext);
  450. /*
  451. * DSpGetMouse()
  452. *
  453. * Availability:
  454. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  455. * CarbonLib: not available
  456. * Mac OS X: in version 10.0 and later
  457. */
  458. EXTERN_API_C( OSStatus )
  459. DSpGetMouse(Point * outGlobalPoint);
  460. /*
  461. ** alternate buffer operations
  462. */
  463. #if CALL_NOT_IN_CARBON
  464. /*
  465. * DSpAltBuffer_New()
  466. *
  467. * Availability:
  468. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  469. * CarbonLib: not available
  470. * Mac OS X: not available
  471. */
  472. EXTERN_API_C( OSStatus )
  473. DSpAltBuffer_New(
  474. DSpContextReference inContext,
  475. Boolean inVRAMBuffer,
  476. DSpAltBufferAttributes * inAttributes,
  477. DSpAltBufferReference * outAltBuffer);
  478. /*
  479. * DSpAltBuffer_Dispose()
  480. *
  481. * Availability:
  482. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  483. * CarbonLib: not available
  484. * Mac OS X: not available
  485. */
  486. EXTERN_API_C( OSStatus )
  487. DSpAltBuffer_Dispose(DSpAltBufferReference inAltBuffer);
  488. /*
  489. * DSpAltBuffer_InvalRect()
  490. *
  491. * Availability:
  492. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  493. * CarbonLib: not available
  494. * Mac OS X: not available
  495. */
  496. EXTERN_API_C( OSStatus )
  497. DSpAltBuffer_InvalRect(
  498. DSpAltBufferReference inAltBuffer,
  499. const Rect * inInvalidRect);
  500. /*
  501. * DSpAltBuffer_GetCGrafPtr()
  502. *
  503. * Availability:
  504. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  505. * CarbonLib: not available
  506. * Mac OS X: not available
  507. */
  508. EXTERN_API_C( OSStatus )
  509. DSpAltBuffer_GetCGrafPtr(
  510. DSpAltBufferReference inAltBuffer,
  511. DSpBufferKind inBufferKind,
  512. CGrafPtr * outCGrafPtr,
  513. GDHandle * outGDevice);
  514. /*
  515. ** context operations
  516. */
  517. /* general */
  518. #endif /* CALL_NOT_IN_CARBON */
  519. /*
  520. * DSpContext_GetAttributes()
  521. *
  522. * Availability:
  523. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  524. * CarbonLib: not available
  525. * Mac OS X: in version 10.0 and later
  526. */
  527. EXTERN_API_C( OSStatus )
  528. DSpContext_GetAttributes(
  529. DSpContextReferenceConst inContext,
  530. DSpContextAttributesPtr outAttributes);
  531. /*
  532. * DSpContext_Reserve()
  533. *
  534. * Availability:
  535. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  536. * CarbonLib: not available
  537. * Mac OS X: in version 10.0 and later
  538. */
  539. EXTERN_API_C( OSStatus )
  540. DSpContext_Reserve(
  541. DSpContextReference inContext,
  542. DSpContextAttributesPtr inDesiredAttributes);
  543. /*
  544. * DSpContext_Queue()
  545. *
  546. * Availability:
  547. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  548. * CarbonLib: not available
  549. * Mac OS X: in version 10.0 and later
  550. */
  551. EXTERN_API_C( OSStatus )
  552. DSpContext_Queue(
  553. DSpContextReference inParentContext,
  554. DSpContextReference inChildContext,
  555. DSpContextAttributesPtr inDesiredAttributes);
  556. /*
  557. * DSpContext_Switch()
  558. *
  559. * Availability:
  560. * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
  561. * CarbonLib: not available
  562. * Mac OS X: in version 10.0 and later
  563. */
  564. EXTERN_API_C( OSStatus )
  565. DSpContext_Switch(
  566. DSpContextReference inOldContext,
  567. DSpContextReference inNewContext);
  568. /*
  569. * DSpContext_Release()
  570. *
  571. * Availability:
  572. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  573. * CarbonLib: not available
  574. * Mac OS X: in version 10.0 and later
  575. */
  576. EXTERN_API_C( OSStatus )
  577. DSpContext_Release(DSpContextReference inContext);
  578. /*
  579. * DSpContext_Dispose()
  580. *
  581. * Availability:
  582. * Non-Carbon CFM: not available
  583. * CarbonLib: not available
  584. * Mac OS X: in version 10.0 and later
  585. */
  586. EXTERN_API_C( OSStatus )
  587. DSpContext_Dispose(DSpContextReference inContext);
  588. /*
  589. * DSpContext_GetDisplayID()
  590. *
  591. * Availability:
  592. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  593. * CarbonLib: not available
  594. * Mac OS X: in version 10.0 and later
  595. */
  596. EXTERN_API_C( OSStatus )
  597. DSpContext_GetDisplayID(
  598. DSpContextReferenceConst inContext,
  599. DisplayIDType * outDisplayID);
  600. /*
  601. * DSpContext_GlobalToLocal()
  602. *
  603. * Availability:
  604. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  605. * CarbonLib: not available
  606. * Mac OS X: in version 10.0 and later
  607. */
  608. EXTERN_API_C( OSStatus )
  609. DSpContext_GlobalToLocal(
  610. DSpContextReferenceConst inContext,
  611. Point * ioPoint);
  612. /*
  613. * DSpContext_LocalToGlobal()
  614. *
  615. * Availability:
  616. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  617. * CarbonLib: not available
  618. * Mac OS X: in version 10.0 and later
  619. */
  620. EXTERN_API_C( OSStatus )
  621. DSpContext_LocalToGlobal(
  622. DSpContextReferenceConst inContext,
  623. Point * ioPoint);
  624. #if CALL_NOT_IN_CARBON
  625. /*
  626. * DSpContext_SetVBLProc()
  627. *
  628. * Availability:
  629. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  630. * CarbonLib: not available
  631. * Mac OS X: not available
  632. */
  633. EXTERN_API_C( OSStatus )
  634. DSpContext_SetVBLProc(
  635. DSpContextReference inContext,
  636. DSpCallbackUPP inProcPtr,
  637. void * inRefCon);
  638. /*
  639. * DSpContext_GetFlattenedSize()
  640. *
  641. * Availability:
  642. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  643. * CarbonLib: not available
  644. * Mac OS X: not available
  645. */
  646. EXTERN_API_C( OSStatus )
  647. DSpContext_GetFlattenedSize(
  648. DSpContextReference inContext,
  649. UInt32 * outFlatContextSize);
  650. /*
  651. * DSpContext_Flatten()
  652. *
  653. * Availability:
  654. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  655. * CarbonLib: not available
  656. * Mac OS X: not available
  657. */
  658. EXTERN_API_C( OSStatus )
  659. DSpContext_Flatten(
  660. DSpContextReference inContext,
  661. void * outFlatContext);
  662. /*
  663. * DSpContext_Restore()
  664. *
  665. * Availability:
  666. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  667. * CarbonLib: not available
  668. * Mac OS X: not available
  669. */
  670. EXTERN_API_C( OSStatus )
  671. DSpContext_Restore(
  672. void * inFlatContext,
  673. DSpContextReference * outRestoredContext);
  674. #endif /* CALL_NOT_IN_CARBON */
  675. /*
  676. * DSpContext_GetMonitorFrequency()
  677. *
  678. * Availability:
  679. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  680. * CarbonLib: not available
  681. * Mac OS X: in version 10.0 and later
  682. */
  683. EXTERN_API_C( OSStatus )
  684. DSpContext_GetMonitorFrequency(
  685. DSpContextReferenceConst inContext,
  686. Fixed * outFrequency);
  687. #if CALL_NOT_IN_CARBON
  688. /*
  689. * DSpContext_SetMaxFrameRate()
  690. *
  691. * Availability:
  692. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  693. * CarbonLib: not available
  694. * Mac OS X: not available
  695. */
  696. EXTERN_API_C( OSStatus )
  697. DSpContext_SetMaxFrameRate(
  698. DSpContextReference inContext,
  699. UInt32 inMaxFPS);
  700. /*
  701. * DSpContext_GetMaxFrameRate()
  702. *
  703. * Availability:
  704. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  705. * CarbonLib: not available
  706. * Mac OS X: not available
  707. */
  708. EXTERN_API_C( OSStatus )
  709. DSpContext_GetMaxFrameRate(
  710. DSpContextReferenceConst inContext,
  711. UInt32 * outMaxFPS);
  712. #endif /* CALL_NOT_IN_CARBON */
  713. /*
  714. * DSpContext_SetState()
  715. *
  716. * Availability:
  717. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  718. * CarbonLib: not available
  719. * Mac OS X: in version 10.0 and later
  720. */
  721. EXTERN_API_C( OSStatus )
  722. DSpContext_SetState(
  723. DSpContextReference inContext,
  724. DSpContextState inState);
  725. /*
  726. * DSpContext_GetState()
  727. *
  728. * Availability:
  729. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  730. * CarbonLib: not available
  731. * Mac OS X: in version 10.0 and later
  732. */
  733. EXTERN_API_C( OSStatus )
  734. DSpContext_GetState(
  735. DSpContextReferenceConst inContext,
  736. DSpContextState * outState);
  737. /*
  738. * DSpContext_IsBusy()
  739. *
  740. * Availability:
  741. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  742. * CarbonLib: not available
  743. * Mac OS X: in version 10.0 and later
  744. */
  745. EXTERN_API_C( OSStatus )
  746. DSpContext_IsBusy(
  747. DSpContextReferenceConst inContext,
  748. Boolean * outBusyFlag);
  749. /* dirty rectangles */
  750. #if CALL_NOT_IN_CARBON
  751. /*
  752. * DSpContext_SetDirtyRectGridSize()
  753. *
  754. * Availability:
  755. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  756. * CarbonLib: not available
  757. * Mac OS X: not available
  758. */
  759. EXTERN_API_C( OSStatus )
  760. DSpContext_SetDirtyRectGridSize(
  761. DSpContextReference inContext,
  762. UInt32 inCellPixelWidth,
  763. UInt32 inCellPixelHeight);
  764. /*
  765. * DSpContext_GetDirtyRectGridSize()
  766. *
  767. * Availability:
  768. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  769. * CarbonLib: not available
  770. * Mac OS X: not available
  771. */
  772. EXTERN_API_C( OSStatus )
  773. DSpContext_GetDirtyRectGridSize(
  774. DSpContextReferenceConst inContext,
  775. UInt32 * outCellPixelWidth,
  776. UInt32 * outCellPixelHeight);
  777. /*
  778. * DSpContext_GetDirtyRectGridUnits()
  779. *
  780. * Availability:
  781. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  782. * CarbonLib: not available
  783. * Mac OS X: not available
  784. */
  785. EXTERN_API_C( OSStatus )
  786. DSpContext_GetDirtyRectGridUnits(
  787. DSpContextReferenceConst inContext,
  788. UInt32 * outCellPixelWidth,
  789. UInt32 * outCellPixelHeight);
  790. /*
  791. * DSpContext_InvalBackBufferRect()
  792. *
  793. * Availability:
  794. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  795. * CarbonLib: not available
  796. * Mac OS X: not available
  797. */
  798. EXTERN_API_C( OSStatus )
  799. DSpContext_InvalBackBufferRect(
  800. DSpContextReference inContext,
  801. const Rect * inRect);
  802. /* underlays */
  803. /*
  804. * DSpContext_SetUnderlayAltBuffer()
  805. *
  806. * Availability:
  807. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  808. * CarbonLib: not available
  809. * Mac OS X: not available
  810. */
  811. EXTERN_API_C( OSStatus )
  812. DSpContext_SetUnderlayAltBuffer(
  813. DSpContextReference inContext,
  814. DSpAltBufferReference inNewUnderlay);
  815. /*
  816. * DSpContext_GetUnderlayAltBuffer()
  817. *
  818. * Availability:
  819. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  820. * CarbonLib: not available
  821. * Mac OS X: not available
  822. */
  823. EXTERN_API_C( OSStatus )
  824. DSpContext_GetUnderlayAltBuffer(
  825. DSpContextReferenceConst inContext,
  826. DSpAltBufferReference * outUnderlay);
  827. /* gamma */
  828. #endif /* CALL_NOT_IN_CARBON */
  829. /*
  830. * DSpContext_FadeGammaOut()
  831. *
  832. * Availability:
  833. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  834. * CarbonLib: not available
  835. * Mac OS X: in version 10.0 and later
  836. */
  837. EXTERN_API_C( OSStatus )
  838. DSpContext_FadeGammaOut(
  839. DSpContextReference inContext,
  840. RGBColor * inZeroIntensityColor);
  841. /*
  842. * DSpContext_FadeGammaIn()
  843. *
  844. * Availability:
  845. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  846. * CarbonLib: not available
  847. * Mac OS X: in version 10.0 and later
  848. */
  849. EXTERN_API_C( OSStatus )
  850. DSpContext_FadeGammaIn(
  851. DSpContextReference inContext,
  852. RGBColor * inZeroIntensityColor);
  853. /*
  854. * DSpContext_FadeGamma()
  855. *
  856. * Availability:
  857. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  858. * CarbonLib: not available
  859. * Mac OS X: in version 10.0 and later
  860. */
  861. EXTERN_API_C( OSStatus )
  862. DSpContext_FadeGamma(
  863. DSpContextReference inContext,
  864. SInt32 inPercentOfOriginalIntensity,
  865. RGBColor * inZeroIntensityColor);
  866. /* buffering */
  867. /*
  868. * DSpContext_SwapBuffers()
  869. *
  870. * Availability:
  871. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  872. * CarbonLib: not available
  873. * Mac OS X: in version 10.0 and later
  874. */
  875. EXTERN_API_C( OSStatus )
  876. DSpContext_SwapBuffers(
  877. DSpContextReference inContext,
  878. DSpCallbackUPP inBusyProc,
  879. void * inUserRefCon);
  880. /*
  881. * DSpContext_GetBackBuffer()
  882. *
  883. * Availability:
  884. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  885. * CarbonLib: not available
  886. * Mac OS X: in version 10.0 and later
  887. */
  888. EXTERN_API_C( OSStatus )
  889. DSpContext_GetBackBuffer(
  890. DSpContextReference inContext,
  891. DSpBufferKind inBufferKind,
  892. CGrafPtr * outBackBuffer);
  893. /*
  894. * DSpContext_GetFrontBuffer()
  895. *
  896. * Availability:
  897. * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
  898. * CarbonLib: not available
  899. * Mac OS X: in version 10.0 and later
  900. */
  901. EXTERN_API_C( OSStatus )
  902. DSpContext_GetFrontBuffer(
  903. DSpContextReferenceConst inContext,
  904. CGrafPtr * outFrontBuffer);
  905. /* clut operations */
  906. /*
  907. * DSpContext_SetCLUTEntries()
  908. *
  909. * Availability:
  910. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  911. * CarbonLib: not available
  912. * Mac OS X: in version 10.0 and later
  913. */
  914. EXTERN_API_C( OSStatus )
  915. DSpContext_SetCLUTEntries(
  916. DSpContextReference inContext,
  917. const ColorSpec * inEntries,
  918. UInt16 inStartingEntry,
  919. UInt16 inLastEntry);
  920. /*
  921. * DSpContext_GetCLUTEntries()
  922. *
  923. * Availability:
  924. * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
  925. * CarbonLib: not available
  926. * Mac OS X: in version 10.0 and later
  927. */
  928. EXTERN_API_C( OSStatus )
  929. DSpContext_GetCLUTEntries(
  930. DSpContextReferenceConst inContext,
  931. ColorSpec * outEntries,
  932. UInt16 inStartingEntry,
  933. UInt16 inLastEntry);
  934. /* blit operations */
  935. #if CALL_NOT_IN_CARBON
  936. /*
  937. * DSpBlit_Faster()
  938. *
  939. * Availability:
  940. * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
  941. * CarbonLib: not available
  942. * Mac OS X: not available
  943. */
  944. EXTERN_API_C( OSStatus )
  945. DSpBlit_Faster(
  946. DSpBlitInfoPtr inBlitInfo,
  947. Boolean inAsyncFlag);
  948. /*
  949. * DSpBlit_Fastest()
  950. *
  951. * Availability:
  952. * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
  953. * CarbonLib: not available
  954. * Mac OS X: not available
  955. */
  956. EXTERN_API_C( OSStatus )
  957. DSpBlit_Fastest(
  958. DSpBlitInfoPtr inBlitInfo,
  959. Boolean inAsyncFlag);
  960. #endif /* CALL_NOT_IN_CARBON */
  961. #if PRAGMA_ENUM_ALWAYSINT
  962. #pragma enumsalwaysint reset
  963. #ifdef __DRAWSPROCKET__RESTORE_TWOBYTEINTS
  964. #pragma fourbyteints off
  965. #endif
  966. #elif PRAGMA_ENUM_OPTIONS
  967. #pragma option enum=reset
  968. #elif defined(__DRAWSPROCKET__RESTORE_PACKED_ENUMS)
  969. #pragma options(pack_enums)
  970. #endif
  971. #if PRAGMA_STRUCT_ALIGN
  972. #pragma options align=reset
  973. #elif PRAGMA_STRUCT_PACKPUSH
  974. #pragma pack(pop)
  975. #elif PRAGMA_STRUCT_PACK
  976. #pragma pack()
  977. #endif
  978. #ifdef PRAGMA_IMPORT_OFF
  979. #pragma import off
  980. #elif PRAGMA_IMPORT
  981. #pragma import reset
  982. #endif
  983. #ifdef __cplusplus
  984. }
  985. #endif
  986. #endif /* __DRAWSPROCKET__ */