PMDefinitions.pas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. {
  2. File: PrintCore/PMDefinitions.h
  3. Contains: Carbon Printing Manager Interfaces.
  4. Copyright (c) 1998-2006,2008 by Apple Inc. All Rights Reserved.
  5. Bugs?: For bug reports, consult the following page on
  6. the World Wide Web:
  7. http://www.freepascal.org/bugs.html
  8. }
  9. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit PMDefinitions;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc defined cpu64}
  61. {$setc __LP64__ := 1}
  62. {$elsec}
  63. {$setc __LP64__ := 0}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  66. {$error Conflicting definitions for __ppc__ and __i386__}
  67. {$endc}
  68. {$ifc defined __ppc__ and __ppc__}
  69. {$setc TARGET_CPU_PPC := TRUE}
  70. {$setc TARGET_CPU_PPC64 := FALSE}
  71. {$setc TARGET_CPU_X86 := FALSE}
  72. {$setc TARGET_CPU_X86_64 := FALSE}
  73. {$setc TARGET_CPU_ARM := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$setc TARGET_OS_EMBEDDED := FALSE}
  78. {$elifc defined __ppc64__ and __ppc64__}
  79. {$setc TARGET_CPU_PPC := FALSE}
  80. {$setc TARGET_CPU_PPC64 := TRUE}
  81. {$setc TARGET_CPU_X86 := FALSE}
  82. {$setc TARGET_CPU_X86_64 := FALSE}
  83. {$setc TARGET_CPU_ARM := FALSE}
  84. {$setc TARGET_OS_MAC := TRUE}
  85. {$setc TARGET_OS_IPHONE := FALSE}
  86. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  87. {$setc TARGET_OS_EMBEDDED := FALSE}
  88. {$elifc defined __i386__ and __i386__}
  89. {$setc TARGET_CPU_PPC := FALSE}
  90. {$setc TARGET_CPU_PPC64 := FALSE}
  91. {$setc TARGET_CPU_X86 := TRUE}
  92. {$setc TARGET_CPU_X86_64 := FALSE}
  93. {$setc TARGET_CPU_ARM := FALSE}
  94. {$ifc defined(iphonesim)}
  95. {$setc TARGET_OS_MAC := FALSE}
  96. {$setc TARGET_OS_IPHONE := TRUE}
  97. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  98. {$elsec}
  99. {$setc TARGET_OS_MAC := TRUE}
  100. {$setc TARGET_OS_IPHONE := FALSE}
  101. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  102. {$endc}
  103. {$setc TARGET_OS_EMBEDDED := FALSE}
  104. {$elifc defined __x86_64__ and __x86_64__}
  105. {$setc TARGET_CPU_PPC := FALSE}
  106. {$setc TARGET_CPU_PPC64 := FALSE}
  107. {$setc TARGET_CPU_X86 := FALSE}
  108. {$setc TARGET_CPU_X86_64 := TRUE}
  109. {$setc TARGET_CPU_ARM := FALSE}
  110. {$setc TARGET_OS_MAC := TRUE}
  111. {$setc TARGET_OS_IPHONE := FALSE}
  112. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  113. {$setc TARGET_OS_EMBEDDED := FALSE}
  114. {$elifc defined __arm__ and __arm__}
  115. {$setc TARGET_CPU_PPC := FALSE}
  116. {$setc TARGET_CPU_PPC64 := FALSE}
  117. {$setc TARGET_CPU_X86 := FALSE}
  118. {$setc TARGET_CPU_X86_64 := FALSE}
  119. {$setc TARGET_CPU_ARM := TRUE}
  120. { will require compiler define when/if other Apple devices with ARM cpus ship }
  121. {$setc TARGET_OS_MAC := FALSE}
  122. {$setc TARGET_OS_IPHONE := TRUE}
  123. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  124. {$setc TARGET_OS_EMBEDDED := TRUE}
  125. {$elsec}
  126. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  127. {$endc}
  128. {$ifc defined __LP64__ and __LP64__ }
  129. {$setc TARGET_CPU_64 := TRUE}
  130. {$elsec}
  131. {$setc TARGET_CPU_64 := FALSE}
  132. {$endc}
  133. {$ifc defined FPC_BIG_ENDIAN}
  134. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  135. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  136. {$elifc defined FPC_LITTLE_ENDIAN}
  137. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  138. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  139. {$elsec}
  140. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  141. {$endc}
  142. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  143. {$setc CALL_NOT_IN_CARBON := FALSE}
  144. {$setc OLDROUTINENAMES := FALSE}
  145. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  146. {$setc OPAQUE_UPP_TYPES := TRUE}
  147. {$setc OTCARBONAPPLICATION := TRUE}
  148. {$setc OTKERNEL := FALSE}
  149. {$setc PM_USE_SESSION_APIS := TRUE}
  150. {$setc TARGET_API_MAC_CARBON := TRUE}
  151. {$setc TARGET_API_MAC_OS8 := FALSE}
  152. {$setc TARGET_API_MAC_OSX := TRUE}
  153. {$setc TARGET_CARBON := TRUE}
  154. {$setc TARGET_CPU_68K := FALSE}
  155. {$setc TARGET_CPU_MIPS := FALSE}
  156. {$setc TARGET_CPU_SPARC := FALSE}
  157. {$setc TARGET_OS_UNIX := FALSE}
  158. {$setc TARGET_OS_WIN32 := FALSE}
  159. {$setc TARGET_RT_MAC_68881 := FALSE}
  160. {$setc TARGET_RT_MAC_CFM := FALSE}
  161. {$setc TARGET_RT_MAC_MACHO := TRUE}
  162. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  163. {$setc TYPE_BOOL := FALSE}
  164. {$setc TYPE_EXTENDED := FALSE}
  165. {$setc TYPE_LONGLONG := TRUE}
  166. uses MacTypes,MacErrors,CFString;
  167. {$endc} {not MACOSALLINCLUDE}
  168. {$ifc TARGET_OS_MAC}
  169. {$ifc not TARGET_CPU_64}
  170. {$ALIGN MAC68K}
  171. {$elsec}
  172. {$packrecords c}
  173. {$endc} {not TARGET_CPU_64}
  174. { Printing objects }
  175. type
  176. PMObject = UnivPtr;
  177. PMPrintSettings = ^OpaquePMPrintSettings; { an opaque type }
  178. OpaquePMPrintSettings = record end;
  179. PMPrintSettingsPtr = ^PMPrintSettings; { when a var xx:PMPrintSettings parameter can be nil, it is changed to xx: PMPrintSettingsPtr }
  180. PMPageFormat = ^OpaquePMPageFormat; { an opaque type }
  181. OpaquePMPageFormat = record end;
  182. PMPageFormatPtr = ^PMPageFormat; { when a var xx:PMPageFormat parameter can be nil, it is changed to xx: PMPageFormatPtr }
  183. PMPrintSession = ^OpaquePMPrintSession; { an opaque type }
  184. OpaquePMPrintSession = record end;
  185. PMPrintSessionPtr = ^PMPrintSession; { when a var xx:PMPrintSession parameter can be nil, it is changed to xx: PMPrintSessionPtr }
  186. PMPrinter = ^OpaquePMPrinter; { an opaque type }
  187. OpaquePMPrinter = record end;
  188. PMPrinterPtr = ^PMPrinter; { when a var xx:PMPrinter parameter can be nil, it is changed to xx: PMPrinterPtr }
  189. PMServer = ^OpaquePMServer; { an opaque type }
  190. OpaquePMServer = record end;
  191. PMServerPtr = ^PMServer; { when a var xx:PMPrinter parameter can be nil, it is changed to xx: PMServerPtr }
  192. PMPreset = ^OpaquePMPreset; { an opaque type }
  193. OpaquePMPreset = record end;
  194. PMPresetPtr = ^PMPreset; { when a var xx:PMPrinter parameter can be nil, it is changed to xx: PMPresetPtr }
  195. PMPaper = ^OpaquePMPaper; { an opaque type }
  196. OpaquePMPaper = record end;
  197. PMPaperPtr = ^PMPaper; { when a var xx:PMPrinter parameter can be nil, it is changed to xx: PMPaperPtr }
  198. const
  199. kPMCancel = $0080; { user hit cancel button in dialog }
  200. kPMNoData = nil; { for general use }
  201. kPMDontWantSize = nil; { for parameters which return size information }
  202. kPMDontWantData = nil; { for parameters which return data }
  203. kPMDontWantBoolean = nil; { for parameters which take a boolean reference }
  204. kPMNoReference = nil; { for parameters which take an address pointer }
  205. { kPMDuplexDefault = kPMDuplexNone; -- moved below, after declaration of kPMDuplexNone }
  206. { for parameters which take a PrintSettings reference }
  207. kPMNoPrintSettings = nil;
  208. { for parameters which take a PageFormat reference }
  209. kPMNoPageFormat = nil;
  210. { for parameters which take a Server reference }
  211. kPMServerLocal = nil;
  212. type
  213. PMDestinationType = UInt16;
  214. const
  215. kPMDestinationInvalid = 0;
  216. kPMDestinationPrinter = 1;
  217. kPMDestinationFile = 2;
  218. kPMDestinationFax = 3;
  219. kPMDestinationPreview = 4;
  220. kPMDestinationProcessPDF = 5;
  221. kPMDestinationTypeDefault = kPMDestinationPrinter;
  222. type
  223. PMOrientation = UInt16;
  224. const
  225. kPMPortrait = 1;
  226. kPMLandscape = 2;
  227. kPMReversePortrait = 3; { will revert to kPortrait for current drivers }
  228. kPMReverseLandscape = 4; { will revert to kLandscape for current drivers }
  229. { Printer states }
  230. type
  231. PMPrinterState = UInt16;
  232. const
  233. kPMPrinterIdle = 3;
  234. kPMPrinterProcessing = 4;
  235. kPMPrinterStopped = 5;
  236. type
  237. PMColorSpaceModel = UInt32;
  238. const
  239. kPMUnknownColorSpaceModel = 0;
  240. kPMGrayColorSpaceModel = 1;
  241. kPMRGBColorSpaceModel = 2;
  242. kPMCMYKColorSpaceModel = 3;
  243. kPMDevNColorSpaceModel = 4;
  244. kPMColorSpaceModelCount = 4; { total number of color space models supported }
  245. { Print quality modes "standard options" }
  246. type
  247. PMQualityMode = UInt32;
  248. const
  249. kPMQualityLowest = $0000; { Absolute lowest print quality }
  250. kPMQualityInkSaver = $0001; { Saves ink but may be slower }
  251. kPMQualityDraft = $0004; { Print at highest speed, ink used is secondary consideration }
  252. kPMQualityNormal = $0008; { Print in printers "general usage" mode for good balance between quality and speed }
  253. kPMQualityPhoto = $000B; { Optimize quality of photos on the page. Speed is not a concern }
  254. kPMQualityBest = $000D; { Get best quality output for all objects and photos. }
  255. kPMQualityHighest = $000F; { Absolute highest quality attained from a printers }
  256. { Constants for our "standard" paper types }
  257. type
  258. PMPaperType = UInt32;
  259. const
  260. kPMPaperTypeUnknown = $0000; { Not sure yet what paper type we have. }
  261. kPMPaperTypePlain = $0001; { Plain paper }
  262. kPMPaperTypeCoated = $0002; { Has a special coating for sharper images and text }
  263. kPMPaperTypePremium = $0003; { Special premium coated paper }
  264. kPMPaperTypeGlossy = $0004; { High gloss special coating }
  265. kPMPaperTypeTransparency = $0005; { Used for overheads }
  266. kPMPaperTypeTShirt = $0006; { Used to iron on t-shirts }
  267. { Scaling alignment: }
  268. type
  269. PMScalingAlignment = UInt16;
  270. const
  271. kPMScalingPinTopLeft = 1;
  272. kPMScalingPinTopRight = 2;
  273. kPMScalingPinBottomLeft = 3;
  274. kPMScalingPinBottomRight = 4;
  275. kPMScalingCenterOnPaper = 5;
  276. kPMScalingCenterOnImgArea = 6;
  277. { Duplex Mode: }
  278. type
  279. PMDuplexMode = UInt32;
  280. const
  281. kPMDuplexNone = $0001; { Print only on one side of sheet of paper }
  282. kPMDuplexNoTumble = $0002; { Print on both sides of the paper, with no tumbling. }
  283. kPMDuplexTumble = $0003; { Print on both sides of the paper, tumbling on. }
  284. kPMSimplexTumble = $0004; { Print on only one side of the paper, but tumble the images while printing. }
  285. kPMDuplexDefault = kPMDuplexNone;
  286. { Layout directions: }
  287. type
  288. PMLayoutDirection = UInt16;
  289. const
  290. { Horizontal-major directions: }
  291. kPMLayoutLeftRightTopBottom = 1; { English reading direction. }
  292. kPMLayoutLeftRightBottomTop = 2;
  293. kPMLayoutRightLeftTopBottom = 3;
  294. kPMLayoutRightLeftBottomTop = 4; { Vertical-major directions: }
  295. kPMLayoutTopBottomLeftRight = 5;
  296. kPMLayoutTopBottomRightLeft = 6;
  297. kPMLayoutBottomTopLeftRight = 7;
  298. kPMLayoutBottomTopRightLeft = 8;
  299. { Page borders: }
  300. type
  301. PMBorderType = UInt16;
  302. const
  303. kPMBorderSingleHairline = 1;
  304. kPMBorderDoubleHairline = 2;
  305. kPMBorderSingleThickline = 3;
  306. kPMBorderDoubleThickline = 4;
  307. {
  308. Options for which items to show inline in the print dialog
  309. This is only meant to be used in Carbon environment
  310. }
  311. type
  312. PMPrintDialogOptionFlags = OptionBits;
  313. const
  314. kPMHideInlineItems = 0 shl 0; { show nothing in the inline portion of print dialog }
  315. kPMShowDefaultInlineItems = 1 shl 15; { show the default set of items (copies & pages) in the inline portion of print dialog }
  316. kPMShowInlineCopies = 1 shl 0; { show Copies edit text, Collate check box and Two Sided check box (if printer supports it) in top portion of print dialog }
  317. kPMShowInlinePageRange = 1 shl 1; { show Paper Range buttons and From & To Page edit text items in top portion of print dialog }
  318. kPMShowInlinePageRangeWithSelection = 1 shl 6; { show Paper Range buttons with the addition of a Selection button and the From & To Page edit text items in top portion of print dialog }
  319. kPMShowInlinePaperSize = 1 shl 2; { show Paper Size popup menu in top portion of print dialog }
  320. kPMShowInlineOrientation = 1 shl 3; { show Orientation buttons in top portion of print dialog }
  321. kPMShowInlineScale = 1 shl 7; { show Scaling edit text in top portion of print dialog }
  322. kPMShowPageAttributesPDE = 1 shl 8; { add a PDE to the print dialog that contains the Page Setup information (paper size, orientation and scale) }
  323. type
  324. PMPPDDomain = UInt16;
  325. const
  326. kAllPPDDomains = 1;
  327. kSystemPPDDomain = 2;
  328. kLocalPPDDomain = 3;
  329. kNetworkPPDDomain = 4;
  330. kUserPPDDomain = 5;
  331. kCUPSPPDDomain = 6;
  332. { Description types }
  333. {$ifc USE_CFSTR_CONSTANT_MACROS}
  334. {$definec kPMPPDDescriptionType CFSTRP('PMPPDDescriptionType')}
  335. {$endc}
  336. { Document format strings }
  337. {$ifc USE_CFSTR_CONSTANT_MACROS}
  338. {$definec kPMDocumentFormatDefault CFSTRP('com.apple.documentformat.default')}
  339. {$endc}
  340. {$ifc USE_CFSTR_CONSTANT_MACROS}
  341. {$definec kPMDocumentFormatPDF CFSTRP('application/pdf')}
  342. {$endc}
  343. {$ifc USE_CFSTR_CONSTANT_MACROS}
  344. {$definec kPMDocumentFormatPostScript CFSTRP('application/postscript')}
  345. {$endc}
  346. { Graphic context strings }
  347. {$ifc USE_CFSTR_CONSTANT_MACROS}
  348. {$definec kPMGraphicsContextDefault CFSTRP('com.apple.graphicscontext.default')}
  349. {$endc}
  350. {$ifc USE_CFSTR_CONSTANT_MACROS}
  351. {$definec kPMGraphicsContextCoreGraphics CFSTRP('com.apple.graphicscontext.coregraphics')}
  352. {$endc}
  353. { PDF Workflow Keys }
  354. {$ifc USE_CFSTR_CONSTANT_MACROS}
  355. {$definec kPDFWorkFlowItemURLKey CFSTRP('itemURL')}
  356. {$endc}
  357. {$ifc USE_CFSTR_CONSTANT_MACROS}
  358. {$definec kPDFWorkflowFolderURLKey CFSTRP('folderURL')}
  359. {$endc}
  360. {$ifc USE_CFSTR_CONSTANT_MACROS}
  361. {$definec kPDFWorkflowDisplayNameKey CFSTRP('displayName')}
  362. {$endc}
  363. {$ifc USE_CFSTR_CONSTANT_MACROS}
  364. {$definec kPDFWorkflowItemsKey CFSTRP('items')}
  365. {$endc}
  366. { OSStatus return codes }
  367. const
  368. kPMNoError = noErr;
  369. kPMGeneralError = -30870;
  370. kPMOutOfScope = -30871; { an API call is out of scope }
  371. kPMInvalidParameter = paramErr; { a required parameter is missing or invalid }
  372. kPMNoDefaultPrinter = -30872; { no default printer selected }
  373. kPMNotImplemented = -30873; { this API call is not supported }
  374. kPMNoSuchEntry = -30874; { no such entry }
  375. kPMInvalidPrintSettings = -30875; { the printsettings reference is invalid }
  376. kPMInvalidPageFormat = -30876; { the pageformat reference is invalid }
  377. kPMValueOutOfRange = -30877; { a value passed in is out of range }
  378. kPMLockIgnored = -30878; { the lock value was ignored }
  379. const
  380. kPMInvalidPrintSession = -30879; { the print session is invalid }
  381. kPMInvalidPrinter = -30880; { the printer reference is invalid }
  382. kPMObjectInUse = -30881; { the object is in use }
  383. kPMInvalidPreset = -30899;{ the preset is invalid }
  384. const
  385. kPMPrintAllPages = -1;
  386. const
  387. kPMUnlocked = false;
  388. type
  389. PMRectPtr = ^PMRect;
  390. PMRect = record
  391. top: Float64;
  392. left: Float64;
  393. bottom: Float64;
  394. right: Float64;
  395. end;
  396. type
  397. PMResolutionPtr = ^PMResolution;
  398. PMResolution = record
  399. hRes: Float64;
  400. vRes: Float64;
  401. end;
  402. PMLanguageInfoPtr = ^PMLanguageInfo;
  403. {$ifc TARGET_CPU_64}
  404. PMLanguageInfo = packed record
  405. level: Str32;
  406. version: Str32;
  407. release: Str32;
  408. pad: SInt8
  409. end;
  410. {$elsec}
  411. PMLanguageInfo = record
  412. level: Str32;
  413. version: Str32;
  414. release: Str32;
  415. pad: SInt8
  416. end;
  417. {$endc} {TARGET_CPU_64}
  418. type
  419. PMPaperMargins = PMRect;
  420. {
  421. PMDataFormat is used with PMPrintSettingsCreateWithDataRepresentation and
  422. PMPageFormatCreateDataRepresentation to specify the format of the data representation created.
  423. kPMDataFormatXMLDefault specifies a data format that is compatible with all Mac OS X versions. Data in
  424. this format can be used with the PMUnflattenXXX routines present in all versions of Mac OS X prior to 10.5.
  425. However, this data representation is much larger than the more modern data representations described below.
  426. kPMDataFormatXMLMinimal is only compatible and usable with Mac OS X version 10.5 and later.
  427. Data in this format can be only be reconsistuted into the equivalent printing manager object with
  428. the appropriate PMXXXCreateWithDataRepresentation function. The data representation produced when
  429. using kPMDataFormatXMLMinimal is approximately 3-5 times smaller than kPMDataFormatXMLDefault. This
  430. format is a good choice when execution on versions of Mac OS X prior to 10.5 is not necessary and
  431. an uncompressed XML representation of the data is needed.
  432. kPMDataFormatXMLCompressed is only compatible and usable with Mac OS X version 10.5 and later.
  433. Data in this format can be only be reconsistuted into the equivalent printing manager object with the
  434. appropriate PMXXXCreateWithDataRepresentation function. The data representation produced when
  435. using kPMDataFormatXMLCompressed is approximately 20 times smaller than kPMDataFormatXMLDefault.
  436. This format is a good choice when execution on versions of Mac OS X prior to 10.5 is not necessary and
  437. the minimum data size is important.
  438. }
  439. type
  440. PMDataFormat = SInt32;
  441. const
  442. kPMDataFormatXMLDefault = 0;
  443. kPMDataFormatXMLMinimal = 1;
  444. kPMDataFormatXMLCompressed = 2;
  445. { PMPreset related }
  446. {
  447. kPMPresetGraphicsTypeKey is a PMPreset attribute that specifies the graphics type of a given preset
  448. }
  449. {$ifc USE_CFSTR_CONSTANT_MACROS}
  450. {$definec kPMPresetGraphicsTypeKey CFSTRP('com.apple.print.preset.graphicsType')}
  451. {$endc}
  452. {
  453. kPMPresetGraphicsTypePhoto is the graphics type of presets appropriate for printing photos.
  454. }
  455. {$ifc USE_CFSTR_CONSTANT_MACROS}
  456. {$definec kPMPresetGraphicsTypePhoto CFSTRP('Photo')}
  457. {$endc}
  458. {
  459. kPMPresetGraphicsTypeAll includes all graphics types.
  460. }
  461. {$ifc USE_CFSTR_CONSTANT_MACROS}
  462. {$definec kPMPresetGraphicsTypeAll CFSTRP('All')}
  463. {$endc}
  464. {
  465. kPMPresetGraphicsTypeGeneral is a graphics type that is not specific to any type of document printing.
  466. }
  467. {$ifc USE_CFSTR_CONSTANT_MACROS}
  468. {$definec kPMPresetGraphicsTypeGeneral CFSTRP('General')}
  469. {$endc}
  470. {
  471. kPMPresetGraphicsTypeNone excludes all graphics types.
  472. }
  473. {$ifc USE_CFSTR_CONSTANT_MACROS}
  474. {$definec kPMPresetGraphicsTypeNone CFSTRP('None')}
  475. {$endc}
  476. {$endc} {TARGET_OS_MAC}
  477. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  478. end.
  479. {$endc} {not MACOSALLINCLUDE}