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.

243 lines
6.1 KiB

  1. /*
  2. File: CMScriptingPlugin.h
  3. Contains: ColorSync Scripting Plugin API
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1998-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 __FILES__
  11. #include <Files.h>
  12. #endif
  13. #ifndef __CMAPPLICATION__
  14. #include <CMApplication.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. enum {
  26. /* ColorSync Scripting AppleEvent Errors */
  27. cmspInvalidImageFile = -4220, /* Plugin cannot handle this image file type */
  28. cmspInvalidImageSpace = -4221, /* Plugin cannot create an image file of this colorspace */
  29. cmspInvalidProfileEmbed = -4222, /* Specific invalid profile errors */
  30. cmspInvalidProfileSource = -4223,
  31. cmspInvalidProfileDest = -4224,
  32. cmspInvalidProfileProof = -4225,
  33. cmspInvalidProfileLink = -4226
  34. };
  35. /**** embedFlags field ****/
  36. /* reserved for future use: currently 0 */
  37. /**** matchFlags field ****/
  38. enum {
  39. cmspFavorEmbeddedMask = 0x00000001 /* if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present*/
  40. };
  41. /**** scripting plugin entry points ****/
  42. typedef CALLBACK_API_C( CMError , ValidateImageProcPtr )(const FSSpec * spec);
  43. typedef CALLBACK_API_C( CMError , GetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
  44. typedef CALLBACK_API_C( CMError , ValidateSpaceProcPtr )(const FSSpec *spec, OSType *space);
  45. typedef CALLBACK_API_C( CMError , EmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, CMProfileRef embedProf, UInt32 embedFlags);
  46. typedef CALLBACK_API_C( CMError , UnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto);
  47. typedef CALLBACK_API_C( CMError , MatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual, UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf, CMProfileRef prfProf, UInt32 matchFlags);
  48. typedef CALLBACK_API_C( CMError , CountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
  49. typedef CALLBACK_API_C( CMError , GetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
  50. typedef CALLBACK_API_C( CMError , SetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 index, CMProfileRef prof, UInt32 embedFlags);
  51. /**** CSScriptingLib API ****/
  52. /*
  53. * CMValidImage()
  54. *
  55. * Availability:
  56. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  57. * CarbonLib: in CarbonLib 1.0 and later
  58. * Mac OS X: in 3.0 and later
  59. */
  60. EXTERN_API_C( CMError )
  61. CMValidImage(const FSSpec * spec);
  62. /*
  63. * CMGetImageSpace()
  64. *
  65. * Availability:
  66. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  67. * CarbonLib: in CarbonLib 1.0 and later
  68. * Mac OS X: in 3.0 and later
  69. */
  70. EXTERN_API_C( CMError )
  71. CMGetImageSpace(
  72. const FSSpec * spec,
  73. OSType * space);
  74. /*
  75. * CMEmbedImage()
  76. *
  77. * Availability:
  78. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  79. * CarbonLib: in CarbonLib 1.0 and later
  80. * Mac OS X: in 3.0 and later
  81. */
  82. EXTERN_API_C( CMError )
  83. CMEmbedImage(
  84. const FSSpec * specFrom,
  85. const FSSpec * specInto,
  86. Boolean repl,
  87. CMProfileRef embProf);
  88. /*
  89. * CMUnembedImage()
  90. *
  91. * Availability:
  92. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  93. * CarbonLib: in CarbonLib 1.0 and later
  94. * Mac OS X: in 3.0 and later
  95. */
  96. EXTERN_API_C( CMError )
  97. CMUnembedImage(
  98. const FSSpec * specFrom,
  99. const FSSpec * specInto,
  100. Boolean repl);
  101. /*
  102. * CMMatchImage()
  103. *
  104. * Availability:
  105. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  106. * CarbonLib: in CarbonLib 1.0 and later
  107. * Mac OS X: in 3.0 and later
  108. */
  109. EXTERN_API_C( CMError )
  110. CMMatchImage(
  111. const FSSpec * specFrom,
  112. const FSSpec * specInto,
  113. Boolean repl,
  114. UInt32 qual,
  115. CMProfileRef srcProf,
  116. UInt32 srcIntent,
  117. CMProfileRef dstProf);
  118. /*
  119. * CMProofImage()
  120. *
  121. * Availability:
  122. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  123. * CarbonLib: in CarbonLib 1.0 and later
  124. * Mac OS X: in 3.0 and later
  125. */
  126. EXTERN_API_C( CMError )
  127. CMProofImage(
  128. const FSSpec * specFrom,
  129. const FSSpec * specInto,
  130. Boolean repl,
  131. UInt32 qual,
  132. CMProfileRef srcProf,
  133. UInt32 srcIntent,
  134. CMProfileRef dstProf,
  135. CMProfileRef prfProf);
  136. /*
  137. * CMLinkImage()
  138. *
  139. * Availability:
  140. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  141. * CarbonLib: in CarbonLib 1.0 and later
  142. * Mac OS X: in 3.0 and later
  143. */
  144. EXTERN_API_C( CMError )
  145. CMLinkImage(
  146. const FSSpec * specFrom,
  147. const FSSpec * specInto,
  148. Boolean repl,
  149. UInt32 qual,
  150. CMProfileRef lnkProf,
  151. UInt32 lnkIntent);
  152. /*
  153. * CMCountImageProfiles()
  154. *
  155. * Availability:
  156. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  157. * CarbonLib: in CarbonLib 1.0 and later
  158. * Mac OS X: in 3.0 and later
  159. */
  160. EXTERN_API_C( CMError )
  161. CMCountImageProfiles(
  162. const FSSpec * spec,
  163. UInt32 * count);
  164. /*
  165. * CMGetIndImageProfile()
  166. *
  167. * Availability:
  168. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  169. * CarbonLib: in CarbonLib 1.0 and later
  170. * Mac OS X: in 3.0 and later
  171. */
  172. EXTERN_API_C( CMError )
  173. CMGetIndImageProfile(
  174. const FSSpec * spec,
  175. UInt32 index,
  176. CMProfileRef * prof);
  177. /*
  178. * CMSetIndImageProfile()
  179. *
  180. * Availability:
  181. * Non-Carbon CFM: in CSScriptingLib 2.6 and later
  182. * CarbonLib: in CarbonLib 1.0 and later
  183. * Mac OS X: in 3.0 and later
  184. */
  185. EXTERN_API_C( CMError )
  186. CMSetIndImageProfile(
  187. const FSSpec * specFrom,
  188. const FSSpec * specInto,
  189. Boolean repl,
  190. UInt32 index,
  191. CMProfileRef prof);
  192. #ifdef PRAGMA_IMPORT_OFF
  193. #pragma import off
  194. #elif PRAGMA_IMPORT
  195. #pragma import reset
  196. #endif
  197. #ifdef __cplusplus
  198. }
  199. #endif