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.

222 lines
4.8 KiB

  1. /*
  2. File: CGPDFDocument.h
  3. Contains: CoreGraphics PDF document
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 2000-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 CGPDFDOCUMENT_H_
  11. #define CGPDFDOCUMENT_H_
  12. #ifndef __CGBASE__
  13. #include <CGBase.h>
  14. #endif
  15. #ifndef __CGDATAPROVIDER__
  16. #include <CGDataProvider.h>
  17. #endif
  18. #ifndef __CGGEOMETRY__
  19. #include <CGGeometry.h>
  20. #endif
  21. #ifndef __CFURL__
  22. #include <CFURL.h>
  23. #endif
  24. #if PRAGMA_ONCE
  25. #pragma once
  26. #endif
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. #if PRAGMA_IMPORT
  31. #pragma import on
  32. #endif
  33. typedef struct CGPDFDocument* CGPDFDocumentRef;
  34. /* Create a PDF document, using `provider' to obtain the document's
  35. * data. */
  36. /*
  37. * CGPDFDocumentCreateWithProvider()
  38. *
  39. * Availability:
  40. * Non-Carbon CFM: not available
  41. * CarbonLib: not available
  42. * Mac OS X: in version 10.0 and later
  43. */
  44. EXTERN_API_C( CGPDFDocumentRef )
  45. CGPDFDocumentCreateWithProvider(CGDataProviderRef provider);
  46. /* Create a PDF document from `url'. */
  47. /*
  48. * CGPDFDocumentCreateWithURL()
  49. *
  50. * Availability:
  51. * Non-Carbon CFM: not available
  52. * CarbonLib: not available
  53. * Mac OS X: in version 10.0 and later
  54. */
  55. EXTERN_API_C( CGPDFDocumentRef )
  56. CGPDFDocumentCreateWithURL(CFURLRef url);
  57. /* Increment the retain count of `document' and return it. All PDF
  58. * documents are created with an initial retain count of 1. */
  59. /*
  60. * CGPDFDocumentRetain()
  61. *
  62. * Availability:
  63. * Non-Carbon CFM: not available
  64. * CarbonLib: not available
  65. * Mac OS X: in version 10.0 and later
  66. */
  67. EXTERN_API_C( CGPDFDocumentRef )
  68. CGPDFDocumentRetain(CGPDFDocumentRef document);
  69. /* Decrement the retain count of `document'. If the retain count reaches 0,
  70. * then free it and any associated resources. */
  71. /*
  72. * CGPDFDocumentRelease()
  73. *
  74. * Availability:
  75. * Non-Carbon CFM: not available
  76. * CarbonLib: not available
  77. * Mac OS X: in version 10.0 and later
  78. */
  79. EXTERN_API_C( void )
  80. CGPDFDocumentRelease(CGPDFDocumentRef document);
  81. /* Return the number of pages in `document'. */
  82. /*
  83. * CGPDFDocumentGetNumberOfPages()
  84. *
  85. * Availability:
  86. * Non-Carbon CFM: not available
  87. * CarbonLib: not available
  88. * Mac OS X: in version 10.0 and later
  89. */
  90. EXTERN_API_C( int )
  91. CGPDFDocumentGetNumberOfPages(CGPDFDocumentRef document);
  92. /* Return the media box of page number `page' in `document'. */
  93. /*
  94. * CGPDFDocumentGetMediaBox()
  95. *
  96. * Availability:
  97. * Non-Carbon CFM: not available
  98. * CarbonLib: not available
  99. * Mac OS X: in version 10.0 and later
  100. */
  101. EXTERN_API_C( CGRect )
  102. CGPDFDocumentGetMediaBox(
  103. CGPDFDocumentRef document,
  104. int page);
  105. /* Return the crop box of page number `page' in `document'. */
  106. /*
  107. * CGPDFDocumentGetCropBox()
  108. *
  109. * Availability:
  110. * Non-Carbon CFM: not available
  111. * CarbonLib: not available
  112. * Mac OS X: in version 10.0 and later
  113. */
  114. EXTERN_API_C( CGRect )
  115. CGPDFDocumentGetCropBox(
  116. CGPDFDocumentRef document,
  117. int page);
  118. /* Return the bleed box of page number `page' in `document'. */
  119. /*
  120. * CGPDFDocumentGetBleedBox()
  121. *
  122. * Availability:
  123. * Non-Carbon CFM: not available
  124. * CarbonLib: not available
  125. * Mac OS X: in version 10.0 and later
  126. */
  127. EXTERN_API_C( CGRect )
  128. CGPDFDocumentGetBleedBox(
  129. CGPDFDocumentRef document,
  130. int page);
  131. /* Return the trim box of page number `page' in `document'. */
  132. /*
  133. * CGPDFDocumentGetTrimBox()
  134. *
  135. * Availability:
  136. * Non-Carbon CFM: not available
  137. * CarbonLib: not available
  138. * Mac OS X: in version 10.0 and later
  139. */
  140. EXTERN_API_C( CGRect )
  141. CGPDFDocumentGetTrimBox(
  142. CGPDFDocumentRef document,
  143. int page);
  144. /* Return the art box of page number `page' in `document'. */
  145. /*
  146. * CGPDFDocumentGetArtBox()
  147. *
  148. * Availability:
  149. * Non-Carbon CFM: not available
  150. * CarbonLib: not available
  151. * Mac OS X: in version 10.0 and later
  152. */
  153. EXTERN_API_C( CGRect )
  154. CGPDFDocumentGetArtBox(
  155. CGPDFDocumentRef document,
  156. int page);
  157. /* Return the rotation angle (in degrees) of page number `page' in
  158. * `document'. */
  159. /*
  160. * CGPDFDocumentGetRotationAngle()
  161. *
  162. * Availability:
  163. * Non-Carbon CFM: not available
  164. * CarbonLib: not available
  165. * Mac OS X: in version 10.0 and later
  166. */
  167. EXTERN_API_C( int )
  168. CGPDFDocumentGetRotationAngle(
  169. CGPDFDocumentRef document,
  170. int page);
  171. #ifdef PRAGMA_IMPORT_OFF
  172. #pragma import off
  173. #elif PRAGMA_IMPORT
  174. #pragma import reset
  175. #endif
  176. #ifdef __cplusplus
  177. }
  178. #endif
  179. #endif /* CGPDFDOCUMENT_H_ */