SegLoad.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:4k
源码类别:

多媒体编程

开发平台:

Visual C++

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