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.

197 lines
3.9 KiB

  1. /*
  2. File: SegLoad.h
  3. Contains: Segment Loader Interfaces.
  4. Version: Technology: Mac OS 8
  5. Release: QuickTime 7.3
  6. Copyright: (c) 2007 (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://developer.apple.com/bugreporter/
  10. */
  11. #ifndef __SEGLOAD__
  12. #define __SEGLOAD__
  13. #ifndef __MACTYPES__
  14. #include <MacTypes.h>
  15. #endif
  16. #if PRAGMA_ONCE
  17. #pragma once
  18. #endif
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #if PRAGMA_IMPORT
  23. #pragma import on
  24. #endif
  25. #if PRAGMA_STRUCT_ALIGN
  26. #pragma options align=mac68k
  27. #elif PRAGMA_STRUCT_PACKPUSH
  28. #pragma pack(push, 2)
  29. #elif PRAGMA_STRUCT_PACK
  30. #pragma pack(2)
  31. #endif
  32. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM || !TARGET_OS_MAC
  33. /*
  34. CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms,
  35. and the AppFile data structure and enums are obsolete.
  36. They are still supported for writing old style 68K apps,
  37. but they are not supported for CFM-based apps.
  38. Use AppleEvents to determine which files are to be
  39. opened or printed from the Finder.
  40. */
  41. enum {
  42. appOpen = 0, /*Open the Document (s)*/
  43. appPrint = 1 /*Print the Document (s)*/
  44. };
  45. struct AppFile {
  46. short vRefNum;
  47. OSType fType;
  48. short versNum; /*versNum in high byte*/
  49. Str255 fName;
  50. };
  51. typedef struct AppFile AppFile;
  52. #if CALL_NOT_IN_CARBON
  53. /*
  54. * CountAppFiles()
  55. *
  56. * Availability:
  57. * Non-Carbon CFM: not available
  58. * CarbonLib: not available
  59. * Mac OS X: not available
  60. */
  61. EXTERN_API( void )
  62. CountAppFiles(
  63. short * message,
  64. short * count);
  65. /*
  66. * GetAppFiles()
  67. *
  68. * Availability:
  69. * Non-Carbon CFM: not available
  70. * CarbonLib: not available
  71. * Mac OS X: not available
  72. */
  73. EXTERN_API( void )
  74. GetAppFiles(
  75. short index,
  76. AppFile * theFile);
  77. /*
  78. * ClrAppFiles()
  79. *
  80. * Availability:
  81. * Non-Carbon CFM: not available
  82. * CarbonLib: not available
  83. * Mac OS X: not available
  84. */
  85. EXTERN_API( void )
  86. ClrAppFiles(short index);
  87. /*
  88. * GetAppParms()
  89. *
  90. * Availability:
  91. * Non-Carbon CFM: not available
  92. * CarbonLib: not available
  93. * Mac OS X: not available
  94. */
  95. EXTERN_API( void )
  96. GetAppParms(
  97. Str255 apName,
  98. short * apRefNum,
  99. Handle * apParam) ONEWORDINLINE(0xA9F5);
  100. #endif /* CALL_NOT_IN_CARBON */
  101. #if CALL_NOT_IN_CARBON
  102. /*
  103. * getappparms()
  104. *
  105. * Availability:
  106. * Non-Carbon CFM: not available
  107. * CarbonLib: not available
  108. * Mac OS X: not available
  109. */
  110. EXTERN_API_C( void )
  111. getappparms(
  112. char * apName,
  113. short * apRefNum,
  114. Handle * apParam);
  115. #endif /* CALL_NOT_IN_CARBON */
  116. #endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM || !TARGET_OS_MAC */
  117. /*
  118. Because PowerPC applications don't have segments.
  119. But, in order to allow applications to not have conditionalized
  120. source code, UnloadSeg is macro'ed away for PowerPC.
  121. */
  122. #if TARGET_CPU_68K
  123. #if CALL_NOT_IN_CARBON
  124. /*
  125. * UnloadSeg()
  126. *
  127. * Availability:
  128. * Non-Carbon CFM: not available
  129. * CarbonLib: not available
  130. * Mac OS X: not available
  131. */
  132. EXTERN_API( void )
  133. UnloadSeg(void * routineAddr) ONEWORDINLINE(0xA9F1);
  134. #endif /* CALL_NOT_IN_CARBON */
  135. #else
  136. #define UnloadSeg(x)
  137. #endif /* TARGET_CPU_68K */
  138. /* ExitToShell() has moved to Process.h*/
  139. #if PRAGMA_STRUCT_ALIGN
  140. #pragma options align=reset
  141. #elif PRAGMA_STRUCT_PACKPUSH
  142. #pragma pack(pop)
  143. #elif PRAGMA_STRUCT_PACK
  144. #pragma pack()
  145. #endif
  146. #ifdef PRAGMA_IMPORT_OFF
  147. #pragma import off
  148. #elif PRAGMA_IMPORT
  149. #pragma import reset
  150. #endif
  151. #ifdef __cplusplus
  152. }
  153. #endif
  154. #endif /* __SEGLOAD__ */