1 { 2 File: PMPrintingDialogExtensions.h 3 4 Contains: Mac OS X Printing Manager Print Dialog Extensions' Interfaces. 5 6 Version: Technology: Mac OS X 7 Release: 1.0 8 9 Copyright (c) 1998-2008 by Apple Inc. All Rights Reserved. 10 11 Bugs?: For bug reports, consult the following page on 12 the World Wide Web: 13 14 http://bugs.freepascal.org 15 } 16 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 } 17 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 } 18 { 19 Modified for use with Free Pascal 20 Version 308 21 Please report any bugs to <gpc@microbizz.nl> 22 } 23 24 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE} 25 {$mode macpas} 26 {$modeswitch cblocks} 27 {$packenum 1} 28 {$macro on} 29 {$inline on} 30 {$calling mwpascal} 31 32 unit PMPrintingDialogExtensions; 33 interface 34 {$setc UNIVERSAL_INTERFACES_VERSION := $0400} 35 {$setc GAP_INTERFACES_VERSION := $0308} 36 37 {$ifc not defined USE_CFSTR_CONSTANT_MACROS} 38 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE} 39 {$endc} 40 41 {$ifc defined CPUPOWERPC and defined CPUI386} 42 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386} 43 {$endc} 44 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN} 45 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN} 46 {$endc} 47 48 {$ifc not defined __ppc__ and defined CPUPOWERPC32} 49 {$setc __ppc__ := 1} 50 {$elsec} 51 {$setc __ppc__ := 0} 52 {$endc} 53 {$ifc not defined __ppc64__ and defined CPUPOWERPC64} 54 {$setc __ppc64__ := 1} 55 {$elsec} 56 {$setc __ppc64__ := 0} 57 {$endc} 58 {$ifc not defined __i386__ and defined CPUI386} 59 {$setc __i386__ := 1} 60 {$elsec} 61 {$setc __i386__ := 0} 62 {$endc} 63 {$ifc not defined __x86_64__ and defined CPUX86_64} 64 {$setc __x86_64__ := 1} 65 {$elsec} 66 {$setc __x86_64__ := 0} 67 {$endc} 68 {$ifc not defined __arm__ and defined CPUARM} 69 {$setc __arm__ := 1} 70 {$elsec} 71 {$setc __arm__ := 0} 72 {$endc} 73 {$ifc not defined __arm64__ and defined CPUAARCH64} 74 {$setc __arm64__ := 1} 75 {$elsec} 76 {$setc __arm64__ := 0} 77 {$endc} 78 79 {$ifc defined cpu64} 80 {$setc __LP64__ := 1} 81 {$elsec} 82 {$setc __LP64__ := 0} 83 {$endc} 84 85 86 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__} 87 {$error Conflicting definitions for __ppc__ and __i386__} 88 {$endc} 89 90 {$ifc defined __ppc__ and __ppc__} 91 {$setc TARGET_CPU_PPC := TRUE} 92 {$setc TARGET_CPU_PPC64 := FALSE} 93 {$setc TARGET_CPU_X86 := FALSE} 94 {$setc TARGET_CPU_X86_64 := FALSE} 95 {$setc TARGET_CPU_ARM := FALSE} 96 {$setc TARGET_CPU_ARM64 := FALSE} 97 {$setc TARGET_OS_MAC := TRUE} 98 {$setc TARGET_OS_IPHONE := FALSE} 99 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 100 {$setc TARGET_OS_EMBEDDED := FALSE} 101 {$elifc defined __ppc64__ and __ppc64__} 102 {$setc TARGET_CPU_PPC := FALSE} 103 {$setc TARGET_CPU_PPC64 := TRUE} 104 {$setc TARGET_CPU_X86 := FALSE} 105 {$setc TARGET_CPU_X86_64 := FALSE} 106 {$setc TARGET_CPU_ARM := FALSE} 107 {$setc TARGET_CPU_ARM64 := FALSE} 108 {$setc TARGET_OS_MAC := TRUE} 109 {$setc TARGET_OS_IPHONE := FALSE} 110 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 111 {$setc TARGET_OS_EMBEDDED := FALSE} 112 {$elifc defined __i386__ and __i386__} 113 {$setc TARGET_CPU_PPC := FALSE} 114 {$setc TARGET_CPU_PPC64 := FALSE} 115 {$setc TARGET_CPU_X86 := TRUE} 116 {$setc TARGET_CPU_X86_64 := FALSE} 117 {$setc TARGET_CPU_ARM := FALSE} 118 {$setc TARGET_CPU_ARM64 := FALSE} 119 {$ifc defined iphonesim} 120 {$setc TARGET_OS_MAC := FALSE} 121 {$setc TARGET_OS_IPHONE := TRUE} 122 {$setc TARGET_IPHONE_SIMULATOR := TRUE} 123 {$elsec} 124 {$setc TARGET_OS_MAC := TRUE} 125 {$setc TARGET_OS_IPHONE := FALSE} 126 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 127 {$endc} 128 {$setc TARGET_OS_EMBEDDED := FALSE} 129 {$elifc defined __x86_64__ and __x86_64__} 130 {$setc TARGET_CPU_PPC := FALSE} 131 {$setc TARGET_CPU_PPC64 := FALSE} 132 {$setc TARGET_CPU_X86 := FALSE} 133 {$setc TARGET_CPU_X86_64 := TRUE} 134 {$setc TARGET_CPU_ARM := FALSE} 135 {$setc TARGET_CPU_ARM64 := FALSE} 136 {$ifc defined iphonesim} 137 {$setc TARGET_OS_MAC := FALSE} 138 {$setc TARGET_OS_IPHONE := TRUE} 139 {$setc TARGET_IPHONE_SIMULATOR := TRUE} 140 {$elsec} 141 {$setc TARGET_OS_MAC := TRUE} 142 {$setc TARGET_OS_IPHONE := FALSE} 143 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 144 {$endc} 145 {$setc TARGET_OS_EMBEDDED := FALSE} 146 {$elifc defined __arm__ and __arm__} 147 {$setc TARGET_CPU_PPC := FALSE} 148 {$setc TARGET_CPU_PPC64 := FALSE} 149 {$setc TARGET_CPU_X86 := FALSE} 150 {$setc TARGET_CPU_X86_64 := FALSE} 151 {$setc TARGET_CPU_ARM := TRUE} 152 {$setc TARGET_CPU_ARM64 := FALSE} 153 {$setc TARGET_OS_MAC := FALSE} 154 {$setc TARGET_OS_IPHONE := TRUE} 155 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 156 {$setc TARGET_OS_EMBEDDED := TRUE} 157 {$elifc defined __arm64__ and __arm64__} 158 {$setc TARGET_CPU_PPC := FALSE} 159 {$setc TARGET_CPU_PPC64 := FALSE} 160 {$setc TARGET_CPU_X86 := FALSE} 161 {$setc TARGET_CPU_X86_64 := FALSE} 162 {$setc TARGET_CPU_ARM := FALSE} 163 {$setc TARGET_CPU_ARM64 := TRUE} 164 {$ifc defined ios} 165 {$setc TARGET_OS_MAC := FALSE} 166 {$setc TARGET_OS_IPHONE := TRUE} 167 {$setc TARGET_OS_EMBEDDED := TRUE} 168 {$elsec} 169 {$setc TARGET_OS_MAC := TRUE} 170 {$setc TARGET_OS_IPHONE := FALSE} 171 {$setc TARGET_OS_EMBEDDED := FALSE} 172 {$endc} 173 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 174 {$elsec} 175 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.} 176 {$endc} 177 178 {$ifc defined __LP64__ and __LP64__ } 179 {$setc TARGET_CPU_64 := TRUE} 180 {$elsec} 181 {$setc TARGET_CPU_64 := FALSE} 182 {$endc} 183 184 {$ifc defined FPC_BIG_ENDIAN} 185 {$setc TARGET_RT_BIG_ENDIAN := TRUE} 186 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE} 187 {$elifc defined FPC_LITTLE_ENDIAN} 188 {$setc TARGET_RT_BIG_ENDIAN := FALSE} 189 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE} 190 {$elsec} 191 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.} 192 {$endc} 193 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE} 194 {$setc CALL_NOT_IN_CARBON := FALSE} 195 {$setc OLDROUTINENAMES := FALSE} 196 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE} 197 {$setc OPAQUE_UPP_TYPES := TRUE} 198 {$setc OTCARBONAPPLICATION := TRUE} 199 {$setc OTKERNEL := FALSE} 200 {$setc PM_USE_SESSION_APIS := TRUE} 201 {$setc TARGET_API_MAC_CARBON := TRUE} 202 {$setc TARGET_API_MAC_OS8 := FALSE} 203 {$setc TARGET_API_MAC_OSX := TRUE} 204 {$setc TARGET_CARBON := TRUE} 205 {$setc TARGET_CPU_68K := FALSE} 206 {$setc TARGET_CPU_MIPS := FALSE} 207 {$setc TARGET_CPU_SPARC := FALSE} 208 {$setc TARGET_OS_UNIX := FALSE} 209 {$setc TARGET_OS_WIN32 := FALSE} 210 {$setc TARGET_RT_MAC_68881 := FALSE} 211 {$setc TARGET_RT_MAC_CFM := FALSE} 212 {$setc TARGET_RT_MAC_MACHO := TRUE} 213 {$setc TYPED_FUNCTION_POINTERS := TRUE} 214 {$setc TYPE_BOOL := FALSE} 215 {$setc TYPE_EXTENDED := FALSE} 216 {$setc TYPE_LONGLONG := TRUE} 217 uses MacTypes; 218 {$endc} {not MACOSALLINCLUDE} 219 220 221 {$ifc TARGET_OS_MAC} 222 223 {$ALIGN POWER} 224 225 226 {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 227 Constants 228 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} 229 230 { 231 Define the Kind IDs for Universal and Standard Printing Dialog Extensions. 232 } 233 { Implemented Universal } 234 {$ifc USE_CFSTR_CONSTANT_MACROS} 235 {$definec kPMPageAttributesKindID CFSTRP('com.apple.print.pde.PageAttributesKind')} 236 {$endc} 237 {$ifc USE_CFSTR_CONSTANT_MACROS} 238 {$definec kPMCopiesAndPagesPDEKindID CFSTRP('com.apple.print.pde.CopiesAndPagesKind')} 239 {$endc} 240 {$ifc USE_CFSTR_CONSTANT_MACROS} 241 {$definec kPMLayoutPDEKindID CFSTRP('com.apple.print.pde.LayoutUserOptionKind')} 242 {$endc} 243 {$ifc USE_CFSTR_CONSTANT_MACROS} 244 {$definec kPMOutputOptionsPDEKindID CFSTRP('com.apple.print.pde.OutputOptionsKind')} 245 {$endc} 246 {$ifc USE_CFSTR_CONSTANT_MACROS} 247 {$definec kPMDuplexPDEKindID CFSTRP('com.apple.print.pde.DuplexKind')} 248 {$endc} 249 {$ifc USE_CFSTR_CONSTANT_MACROS} 250 {$definec kPMCustomPaperSizePDEKindID CFSTRP('com.apple.print.pde.CustomPaperSizeKind')} 251 {$endc} 252 {$ifc USE_CFSTR_CONSTANT_MACROS} 253 {$definec kPMCoverPagePDEKindID CFSTRP('com.apple.print.pde.CoverPageKind')} 254 {$endc} 255 {$ifc USE_CFSTR_CONSTANT_MACROS} 256 {$definec kPMColorMatchingPDEKindID CFSTRP('com.apple.print.pde.ColorMatchingKind')} 257 {$endc} 258 {$ifc USE_CFSTR_CONSTANT_MACROS} 259 {$definec kPMSchedulerPDEKindID CFSTRP('com.apple.print.pde.SchedulerKind')} 260 {$endc} 261 {$ifc USE_CFSTR_CONSTANT_MACROS} 262 {$definec kPMImagingOptionsPDEKindID CFSTRP('com.apple.print.pde.ImagingOptionsKind')} 263 {$endc} 264 {$ifc USE_CFSTR_CONSTANT_MACROS} 265 {$definec kPMFaxCoverPagePDEKindID CFSTRP('com.apple.print.pde.FaxCoverPageKind')} 266 {$endc} 267 {$ifc USE_CFSTR_CONSTANT_MACROS} 268 {$definec kPMFaxModemPDEKindID CFSTRP('com.apple.print.pde.FaxModemKind')} 269 {$endc} 270 {$ifc USE_CFSTR_CONSTANT_MACROS} 271 {$definec kPMFaxAddressesPDEKindID CFSTRP('com.apple.print.pde.FaxAddressesKind')} 272 {$endc} 273 {$ifc USE_CFSTR_CONSTANT_MACROS} 274 {$definec kPMPaperHandlingPDEKindID CFSTRP('com.apple.print.pde.PaperHandlingKind')} 275 {$endc} 276 {$ifc USE_CFSTR_CONSTANT_MACROS} 277 {$definec kPMPDFEffectsPDEKindID CFSTRP('com.apple.print.pde.PDFEffects')} 278 {$endc} 279 {$ifc USE_CFSTR_CONSTANT_MACROS} 280 {$definec kPMSummaryPanelKindID CFSTRP('com.apple.print.pde.SummaryKind')} 281 {$endc} 282 {$ifc USE_CFSTR_CONSTANT_MACROS} 283 {$definec kPMUniPrinterPDEKindID CFSTRP('com.apple.print.pde.UniPrinterKind')} 284 {$endc} 285 { Unimplemented Universal } 286 {$ifc USE_CFSTR_CONSTANT_MACROS} 287 {$definec kPMPaperSourcePDEKindID CFSTRP('com.apple.print.pde.PaperSourceKind')} 288 {$endc} 289 {$ifc USE_CFSTR_CONSTANT_MACROS} 290 {$definec kPMPriorityPDEKindID CFSTRP('com.apple.print.pde.PriorityKind')} 291 {$endc} 292 {$ifc USE_CFSTR_CONSTANT_MACROS} 293 {$definec kPMRotationScalingPDEKindID CFSTRP('com.apple.print.pde.RotationScalingKind')} 294 {$endc} 295 {$ifc USE_CFSTR_CONSTANT_MACROS} 296 {$definec kPMUnsupportedPDEKindID CFSTRP('com.apple.print.pde.UnsupportedPDEKind')} 297 {$endc} 298 { Implemented Standard } 299 {$ifc USE_CFSTR_CONSTANT_MACROS} 300 {$definec kPMErrorHandlingPDEKindID CFSTRP('com.apple.print.pde.ErrorHandlingKind')} 301 {$endc} 302 {$ifc USE_CFSTR_CONSTANT_MACROS} 303 {$definec kPMPaperFeedPDEKindID CFSTRP('com.apple.print.pde.PaperFeedKind')} 304 {$endc} 305 {$ifc USE_CFSTR_CONSTANT_MACROS} 306 {$definec kPMPrinterFeaturesPDEKindID CFSTRP('com.apple.print.pde.PrinterFeaturesKind')} 307 {$endc} 308 {$ifc USE_CFSTR_CONSTANT_MACROS} 309 {$definec kPMInkPDEKindID CFSTRP('com.apple.print.pde.InkKind')} 310 {$endc} 311 { Unimplemented Standard } 312 {$ifc USE_CFSTR_CONSTANT_MACROS} 313 {$definec kPMColorPDEKindID CFSTRP('com.apple.print.pde.ColorKind')} 314 {$endc} 315 {$ifc USE_CFSTR_CONSTANT_MACROS} 316 {$definec kPMQualityMediaPDEKindID CFSTRP('com.apple.print.pde.QualityMediaPDEKind')} 317 {$endc} 318 {$ifc USE_CFSTR_CONSTANT_MACROS} 319 {$definec kPMMediaQualityPDEKindID CFSTRP('com.apple.print.pde.MediaQualityPDEKind')} 320 {$endc} 321 322 { Key to represent information about display order for Cocoa summary info } 323 {$ifc USE_CFSTR_CONSTANT_MACROS} 324 {$definec SUMMARY_DISPLAY_ORDER CFSTRP('Summary Display Order')} 325 {$endc} 326 327 { Boolean key in the Bundle's Info.plist file that sepecifies whether the PDEPanels created by the Bundle are Sandbox compatible } 328 {$ifc USE_CFSTR_CONSTANT_MACROS} 329 {$definec kPMSandboxCompatiblePDEs CFSTRP('PMSandboxCompatiblePDEs')} 330 {$endc} 331 332 {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 333 Type Definitions 334 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} 335 { 336 Basic types... 337 } 338 339 { Type and Interface IDs. } 340 {$ifc USE_CFSTR_CONSTANT_MACROS} 341 {$definec kDialogExtensionIntfIDStr CFSTRP('A996FD7E-B738-11D3-8519-0050E4603277')} 342 {$endc} 343 {$ifc USE_CFSTR_CONSTANT_MACROS} 344 {$definec kGeneralPageSetupDialogTypeIDStr CFSTRP('6E6ED964-B738-11D3-952F-0050E4603277')} 345 {$endc} 346 {$ifc USE_CFSTR_CONSTANT_MACROS} 347 {$definec kGeneralPrintDialogTypeIDStr CFSTRP('C1BF838E-B72A-11D3-9644-0050E4603277')} 348 {$endc} 349 {$ifc USE_CFSTR_CONSTANT_MACROS} 350 {$definec kAppPageSetupDialogTypeIDStr CFSTRP('B9A0DA98-E57F-11D3-9E83-0050E4603277')} 351 {$endc} 352 {$ifc USE_CFSTR_CONSTANT_MACROS} 353 {$definec kAppPrintDialogTypeIDStr CFSTRP('BCB07250-E57F-11D3-8CA6-0050E4603277')} 354 {$endc} 355 {$ifc USE_CFSTR_CONSTANT_MACROS} 356 {$definec kAppPrintThumbnailTypeIDStr CFSTRP('9320FE03-B5D5-11D5-84D1-003065D6135E')} 357 {$endc} 358 {$ifc USE_CFSTR_CONSTANT_MACROS} 359 {$definec kPrinterModuleTypeIDStr CFSTRP('BDB091F4-E57F-11D3-B5CC-0050E4603277')} 360 {$endc} 361 362 363 {$endc} {TARGET_OS_MAC} 364 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE} 365 366 end. 367 {$endc} {not MACOSALLINCLUDE} 368