Mac OS 9
QTML.h
Go to the documentation of this file.
1 
19 #ifndef __QTML__
20 #define __QTML__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MACMEMORY__
27 #include <MacMemory.h>
28 #endif
29 
30 #ifndef __MACWINDOWS__
31 #include <MacWindows.h>
32 #endif
33 
34 #ifndef __OSUTILS__
35 #include <OSUtils.h>
36 #endif
37 
38 #ifndef __FILES__
39 #include <Files.h>
40 #endif
41 
42 #if PRAGMA_ONCE
43 #pragma once
44 #endif
45 
46 #ifdef __cplusplus
47 extern "C"
48 {
49 #endif
50 
51 #if PRAGMA_IMPORT
52 #pragma import on
53 #endif
54 
55 #if PRAGMA_STRUCT_ALIGN
56 #pragma options align = mac68k
57 #elif PRAGMA_STRUCT_PACKPUSH
58 #pragma pack(push, 2)
59 #elif PRAGMA_STRUCT_PACK
60 #pragma pack(2)
61 #endif
62 
63 #if CALL_NOT_IN_CARBON
73  void
74  QTMLYieldCPU(void);
75 
85  void
86  QTMLYieldCPUTime(long milliSeconds, unsigned long flags);
87 
88 #endif /* CALL_NOT_IN_CARBON */
89 
90  typedef struct OpaqueQTMLMutex *QTMLMutex;
91 #if !(TARGET_OS_MAC && TARGET_API_MAC_OS8)
92  typedef struct OpaqueQTMLSyncVar *QTMLSyncVar;
93  typedef QTMLSyncVar *QTMLSyncVarPtr;
94  enum
95  {
96  kInitializeQTMLNoSoundFlag =
97  (1L << 0), /* flag for requesting no sound when calling InitializeQTML*/
98  kInitializeQTMLUseGDIFlag =
99  (1L << 1), /* flag for requesting GDI when calling InitializeQTML*/
100  kInitializeQTMLDisableDirectSound =
101  (1L << 2), /* disables QTML's use of DirectSound*/
102  kInitializeQTMLUseExclusiveFullScreenModeFlag =
103  (1L << 3), /* later than QTML 3.0: qtml starts up in exclusive full screen
104  mode*/
105  kInitializeQTMLDisableDDClippers =
106  (1L << 4) /* flag for requesting QTML not to use DirectDraw clipper
107  objects; QTML 5.0 and later*/
108  };
109 
110  enum
111  {
112  kQTMLHandlePortEvents =
113  (1L << 0), /* flag for requesting requesting QTML to handle events*/
114  kQTMLNoIdleEvents =
115  (1L << 1) /* flag for requesting requesting QTML not to send Idle Events*/
116  };
117 
118 #if CALL_NOT_IN_CARBON
128  OSErr
129  InitializeQTML(long flag);
130 
140  void
142 
152  GrafPtr
153  CreatePortAssociation(void *theWnd, Ptr storage, long flags);
154 
164  void
166 
176  void
177  QTMLGrabMutex(QTMLMutex mu);
178 
188  Boolean
189  QTMLTryGrabMutex(QTMLMutex mu);
190 
200  void
201  QTMLReturnMutex(QTMLMutex mu);
202 
212  QTMLMutex
214 
224  void
225  QTMLDestroyMutex(QTMLMutex mu);
226 
236  QTMLSyncVarPtr
238 
248  void
249  QTMLDestroySyncVar(QTMLSyncVarPtr p);
250 
260  long
261  QTMLTestAndSetSyncVar(QTMLSyncVarPtr sync);
262 
272  void
273  QTMLWaitAndSetSyncVar(QTMLSyncVarPtr sync);
274 
284  void
285  QTMLResetSyncVar(QTMLSyncVarPtr sync);
286 
296  void
298 
308  void
310 
320  void
322 
332  void
334 
349  long
350  QTMLRegisterInterruptSafeThread(unsigned long threadID, void *threadInfo);
351 
361  long
362  QTMLUnregisterInterruptSafeThread(unsigned long threadID);
363 
373  long
374  NativeEventToMacEvent(void *nativeEvent, EventRecord *macEvent);
375 
376 #endif /* CALL_NOT_IN_CARBON */
377 
378 #if TARGET_OS_WIN32
379 #if CALL_NOT_IN_CARBON
389  long
390  WinEventToMacEvent(void *winMsg, EventRecord *macEvent);
391 
392 #define WinEventToMacEvent NativeEventToMacEvent
402  Boolean
403  IsTaskBarVisible(void);
404 
414  void
415  ShowHideTaskBar(Boolean showIt);
416 
417 #endif /* CALL_NOT_IN_CARBON */
418 
419  enum
420  {
421  kDDSurfaceLocked = (1L << 0),
422  kDDSurfaceStatic = (1L << 1)
423  };
424 
425 #if CALL_NOT_IN_CARBON
435  OSErr
436  QTGetDDObject(void **lpDDObject);
437 
447  OSErr
448  QTSetDDObject(void *lpNewDDObject);
449 
459  OSErr
460  QTSetDDPrimarySurface(void *lpNewDDSurface, unsigned long flags);
461 
471  OSErr
472  QTMLGetVolumeRootPath(char *fullPath, char *volumeRootPath,
473  unsigned long volumeRootLen);
474 
484  void
485  QTMLSetWindowWndProc(WindowRef theWindow, void *windowProc);
486 
496  void *
497  QTMLGetWindowWndProc(WindowRef theWindow);
498 
499 #endif /* CALL_NOT_IN_CARBON */
500 
501 #endif /* TARGET_OS_WIN32 */
502 
503 #if CALL_NOT_IN_CARBON
513  OSErr
514  QTMLGetCanonicalPathName(char *inName, char *outName, unsigned long outLen);
515 
516 #endif /* CALL_NOT_IN_CARBON */
517 
518  enum
519  {
520  kFullNativePath = 0,
521  kFileNameOnly = (1 << 0),
522  kDirectoryPathOnly = (1 << 1),
523  kUFSFullPathName = (1 << 2),
524  kTryVDIMask = (1 << 3), /* Used in NativePathNameToFSSpec to specify to
525  search VDI mountpoints*/
526  kFullPathSpecifiedMask =
527  (1 << 4) /* the passed in name is a fully qualified full path*/
528  };
529 
530 #if CALL_NOT_IN_CARBON
540  OSErr
541  FSSpecToNativePathName(const FSSpec *inFile, char *outName,
542  unsigned long outLen, long flags);
543 
544 #endif /* CALL_NOT_IN_CARBON */
545 
546  enum
547  {
548  kErrorIfFileNotFound = 1L << 31
549  };
550 
551 #if CALL_NOT_IN_CARBON
561  OSErr
562  NativePathNameToFSSpec(char *inName, FSSpec *outFile, long flags);
563 
573  OSErr
574  QTGetAliasInfo(AliasHandle alias, AliasInfoType index, char *outBuf,
575  long bufLen, long *outLen, unsigned long flags);
576 
577 #endif /* CALL_NOT_IN_CARBON */
578 
579 #endif /* !(TARGET_OS_MAC && TARGET_API_MAC_OS8) */
580 
581 #if PRAGMA_STRUCT_ALIGN
582 #pragma options align = reset
583 #elif PRAGMA_STRUCT_PACKPUSH
584 #pragma pack(pop)
585 #elif PRAGMA_STRUCT_PACK
586 #pragma pack()
587 #endif
588 
589 #ifdef PRAGMA_IMPORT_OFF
590 #pragma import off
591 #elif PRAGMA_IMPORT
592 #pragma import reset
593 #endif
594 
595 #ifdef __cplusplus
596 }
597 #endif
598 
599 #endif /* __QTML__ */
short AliasInfoType
Definition: Aliases.h:95
File Manager (MFS, HFS, and HFS+) Interfaces.
Memory Manager Interfaces.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
Window Manager Interfaces.
OS Utilities Interfaces.
void QTMLDestroyMutex(QTMLMutex mu)
OSErr InitializeQTML(long flag)
void QTMLYieldCPUTime(long milliSeconds, unsigned long flags)
QTMLSyncVarPtr QTMLCreateSyncVar(void)
void QTMLYieldCPU(void)
void QTMLGrabMutex(QTMLMutex mu)
OSErr QTMLGetCanonicalPathName(char *inName, char *outName, unsigned long outLen)
void QTMLDestroySyncVar(QTMLSyncVarPtr p)
QTMLMutex QTMLCreateMutex(void)
void QTMLReleaseWindowList(void)
void QTMLResetSyncVar(QTMLSyncVarPtr sync)
void InitializeQHdr(QHdr *qhdr)
void DestroyPortAssociation(CGrafPtr cgp)
long QTMLRegisterInterruptSafeThread(unsigned long threadID, void *threadInfo)
long NativeEventToMacEvent(void *nativeEvent, EventRecord *macEvent)
long QTMLTestAndSetSyncVar(QTMLSyncVarPtr sync)
void QTMLReturnMutex(QTMLMutex mu)
GrafPtr CreatePortAssociation(void *theWnd, Ptr storage, long flags)
OSErr QTGetAliasInfo(AliasHandle alias, AliasInfoType index, char *outBuf, long bufLen, long *outLen, unsigned long flags)
OSErr FSSpecToNativePathName(const FSSpec *inFile, char *outName, unsigned long outLen, long flags)
void QTMLWaitAndSetSyncVar(QTMLSyncVarPtr sync)
void TerminateQHdr(QHdr *qhdr)
void QTMLAcquireWindowList(void)
Boolean QTMLTryGrabMutex(QTMLMutex mu)
OSErr NativePathNameToFSSpec(char *inName, FSSpec *outFile, long flags)
void TerminateQTML(void)
long QTMLUnregisterInterruptSafeThread(unsigned long threadID)
Definition: Aliases.h:87
Definition: Quickdraw.h:2261
Definition: Events.h:224
Definition: Quickdraw.h:1648
Definition: OSUtils.h:154