1 {
2    File:       PrintCore/PMCore.h
3 
4    Contains:   Carbon Printing Manager Interfaces.
5 
6    Copyright (c) 1998-2006,2008 Apple Inc. All Rights Reserved.
7 
8    Bugs?:      For bug reports, consult the following page on
9 			   the World Wide Web:
10 
11 				   http://developer.apple.com/bugreporter/
12 
13 }
14 {  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
15 {  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
16 {
17     Modified for use with Free Pascal
18     Version 308
19     Please report any bugs to <gpc@microbizz.nl>
20 }
21 
22 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
23 {$mode macpas}
24 {$modeswitch cblocks}
25 {$packenum 1}
26 {$macro on}
27 {$inline on}
28 {$calling mwpascal}
29 
30 unit PMCore;
31 interface
32 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
33 {$setc GAP_INTERFACES_VERSION := $0308}
34 
35 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
36     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
37 {$endc}
38 
39 {$ifc defined CPUPOWERPC and defined CPUI386}
40 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
41 {$endc}
42 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
43 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
44 {$endc}
45 
46 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
47 	{$setc __ppc__ := 1}
48 {$elsec}
49 	{$setc __ppc__ := 0}
50 {$endc}
51 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
52 	{$setc __ppc64__ := 1}
53 {$elsec}
54 	{$setc __ppc64__ := 0}
55 {$endc}
56 {$ifc not defined __i386__ and defined CPUI386}
57 	{$setc __i386__ := 1}
58 {$elsec}
59 	{$setc __i386__ := 0}
60 {$endc}
61 {$ifc not defined __x86_64__ and defined CPUX86_64}
62 	{$setc __x86_64__ := 1}
63 {$elsec}
64 	{$setc __x86_64__ := 0}
65 {$endc}
66 {$ifc not defined __arm__ and defined CPUARM}
67 	{$setc __arm__ := 1}
68 {$elsec}
69 	{$setc __arm__ := 0}
70 {$endc}
71 {$ifc not defined __arm64__ and defined CPUAARCH64}
72   {$setc __arm64__ := 1}
73 {$elsec}
74   {$setc __arm64__ := 0}
75 {$endc}
76 
77 {$ifc defined cpu64}
78   {$setc __LP64__ := 1}
79 {$elsec}
80   {$setc __LP64__ := 0}
81 {$endc}
82 
83 
84 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
85 	{$error Conflicting definitions for __ppc__ and __i386__}
86 {$endc}
87 
88 {$ifc defined __ppc__ and __ppc__}
89 	{$setc TARGET_CPU_PPC := TRUE}
90 	{$setc TARGET_CPU_PPC64 := FALSE}
91 	{$setc TARGET_CPU_X86 := FALSE}
92 	{$setc TARGET_CPU_X86_64 := FALSE}
93 	{$setc TARGET_CPU_ARM := FALSE}
94 	{$setc TARGET_CPU_ARM64 := FALSE}
95 	{$setc TARGET_OS_MAC := TRUE}
96 	{$setc TARGET_OS_IPHONE := FALSE}
97 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
98 	{$setc TARGET_OS_EMBEDDED := FALSE}
99 {$elifc defined __ppc64__ and __ppc64__}
100 	{$setc TARGET_CPU_PPC := FALSE}
101 	{$setc TARGET_CPU_PPC64 := TRUE}
102 	{$setc TARGET_CPU_X86 := FALSE}
103 	{$setc TARGET_CPU_X86_64 := FALSE}
104 	{$setc TARGET_CPU_ARM := FALSE}
105 	{$setc TARGET_CPU_ARM64 := FALSE}
106 	{$setc TARGET_OS_MAC := TRUE}
107 	{$setc TARGET_OS_IPHONE := FALSE}
108 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
109 	{$setc TARGET_OS_EMBEDDED := FALSE}
110 {$elifc defined __i386__ and __i386__}
111 	{$setc TARGET_CPU_PPC := FALSE}
112 	{$setc TARGET_CPU_PPC64 := FALSE}
113 	{$setc TARGET_CPU_X86 := TRUE}
114 	{$setc TARGET_CPU_X86_64 := FALSE}
115 	{$setc TARGET_CPU_ARM := FALSE}
116 	{$setc TARGET_CPU_ARM64 := FALSE}
117 {$ifc defined iphonesim}
118  	{$setc TARGET_OS_MAC := FALSE}
119 	{$setc TARGET_OS_IPHONE := TRUE}
120 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
121 {$elsec}
122 	{$setc TARGET_OS_MAC := TRUE}
123 	{$setc TARGET_OS_IPHONE := FALSE}
124 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
125 {$endc}
126 	{$setc TARGET_OS_EMBEDDED := FALSE}
127 {$elifc defined __x86_64__ and __x86_64__}
128 	{$setc TARGET_CPU_PPC := FALSE}
129 	{$setc TARGET_CPU_PPC64 := FALSE}
130 	{$setc TARGET_CPU_X86 := FALSE}
131 	{$setc TARGET_CPU_X86_64 := TRUE}
132 	{$setc TARGET_CPU_ARM := FALSE}
133 	{$setc TARGET_CPU_ARM64 := FALSE}
134 {$ifc defined iphonesim}
135  	{$setc TARGET_OS_MAC := FALSE}
136 	{$setc TARGET_OS_IPHONE := TRUE}
137 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
138 {$elsec}
139 	{$setc TARGET_OS_MAC := TRUE}
140 	{$setc TARGET_OS_IPHONE := FALSE}
141 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
142 {$endc}
143 	{$setc TARGET_OS_EMBEDDED := FALSE}
144 {$elifc defined __arm__ and __arm__}
145 	{$setc TARGET_CPU_PPC := FALSE}
146 	{$setc TARGET_CPU_PPC64 := FALSE}
147 	{$setc TARGET_CPU_X86 := FALSE}
148 	{$setc TARGET_CPU_X86_64 := FALSE}
149 	{$setc TARGET_CPU_ARM := TRUE}
150 	{$setc TARGET_CPU_ARM64 := FALSE}
151 	{$setc TARGET_OS_MAC := FALSE}
152 	{$setc TARGET_OS_IPHONE := TRUE}
153 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
154 	{$setc TARGET_OS_EMBEDDED := TRUE}
155 {$elifc defined __arm64__ and __arm64__}
156 	{$setc TARGET_CPU_PPC := FALSE}
157 	{$setc TARGET_CPU_PPC64 := FALSE}
158 	{$setc TARGET_CPU_X86 := FALSE}
159 	{$setc TARGET_CPU_X86_64 := FALSE}
160 	{$setc TARGET_CPU_ARM := FALSE}
161 	{$setc TARGET_CPU_ARM64 := TRUE}
162 {$ifc defined ios}
163 	{$setc TARGET_OS_MAC := FALSE}
164 	{$setc TARGET_OS_IPHONE := TRUE}
165 	{$setc TARGET_OS_EMBEDDED := TRUE}
166 {$elsec}
167 	{$setc TARGET_OS_MAC := TRUE}
168 	{$setc TARGET_OS_IPHONE := FALSE}
169 	{$setc TARGET_OS_EMBEDDED := FALSE}
170 {$endc}
171 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
172 {$elsec}
173 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
174 {$endc}
175 
176 {$ifc defined __LP64__ and __LP64__ }
177   {$setc TARGET_CPU_64 := TRUE}
178 {$elsec}
179   {$setc TARGET_CPU_64 := FALSE}
180 {$endc}
181 
182 {$ifc defined FPC_BIG_ENDIAN}
183 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
184 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
185 {$elifc defined FPC_LITTLE_ENDIAN}
186 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
187 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
188 {$elsec}
189 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
190 {$endc}
191 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
192 {$setc CALL_NOT_IN_CARBON := FALSE}
193 {$setc OLDROUTINENAMES := FALSE}
194 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
195 {$setc OPAQUE_UPP_TYPES := TRUE}
196 {$setc OTCARBONAPPLICATION := TRUE}
197 {$setc OTKERNEL := FALSE}
198 {$setc PM_USE_SESSION_APIS := TRUE}
199 {$setc TARGET_API_MAC_CARBON := TRUE}
200 {$setc TARGET_API_MAC_OS8 := FALSE}
201 {$setc TARGET_API_MAC_OSX := TRUE}
202 {$setc TARGET_CARBON := TRUE}
203 {$setc TARGET_CPU_68K := FALSE}
204 {$setc TARGET_CPU_MIPS := FALSE}
205 {$setc TARGET_CPU_SPARC := FALSE}
206 {$setc TARGET_OS_UNIX := FALSE}
207 {$setc TARGET_OS_WIN32 := FALSE}
208 {$setc TARGET_RT_MAC_68881 := FALSE}
209 {$setc TARGET_RT_MAC_CFM := FALSE}
210 {$setc TARGET_RT_MAC_MACHO := TRUE}
211 {$setc TYPED_FUNCTION_POINTERS := TRUE}
212 {$setc TYPE_BOOL := FALSE}
213 {$setc TYPE_EXTENDED := FALSE}
214 {$setc TYPE_LONGLONG := TRUE}
215 uses MacTypes,CFBase,CFArray,MacErrors,Files,QuickdrawTypes,PMDefinitions,CFData,CFDictionary,CFString,CFURL,CGContext,CGDataProvider,CGImage;
216 {$endc} {not MACOSALLINCLUDE}
217 
218 
219 
220 {$ifc TARGET_OS_MAC}
221 
222 {$ALIGN POWER}
223 
224 {$ifc PM_USE_SESSION_APIS}
225 (*
226 //#pragma /mark
227 //#pragma /mark Retain/Release
228 //#pragma /mark
229 *)
230 
231 {
232 *  PMRetain()
233 *
234 *  Summary:
235 *    Increases a printing objects refcount by 1.
236 *
237 *  Discussion:
238 *    You should retain a printing object when you receive it from
239 *    elsewhere (that is, you did not create or copy it) and you want
240 *    it to persist. If you retain a printing object you are
241 *    responsible for releasing it.
242 *
243 *  Parameters:
244 *
245 *    object:
246 *      A Carbon Printing Manager object, such as a PMPrintSession
247 *      object, a PMPageFormat object, a PMPrintSettings object, or
248 *      PMPrinter object.
249 *
250 *  Availability:
251 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
252 *    CarbonLib:        in CarbonLib 1.1 and later
253 *    Non-Carbon CFM:   not available
254 *
255 *  Compatibility:
256 *  	Not appropriate for CUPS filters, drivers, and backends.
257 *
258 }
PMRetainnull259 function PMRetain( objct: PMObject ): OSStatus; external name '_PMRetain';
260 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
261 
262 {
263 *  PMRelease()
264 *
265 *  Summary:
266 *    Decreases a printing objects refcount by 1.
267 *
268 *  Discussion:
269 *    Your application should use the PMRelease function to release any
270 *    printing objects it creates or retains. When an object�s
271 *    reference count reaches 0, the object is deallocated. To
272 *    terminate a printing session created with the function
273 *    PMCreateSession, pass the associated PMPrintSession object to
274 *    PMRelease. To release printing objects created with the functions
275 *    PMCreatePageFormat and PMCreatePrintSettings, pass the associated
276 *    PMPageFormat and PMPrintSettings objects to PMRelease. You can
277 *    pass a NULL object but be aware a kPMInvalidParameter error will
278 *    be returned.
279 *
280 *  Parameters:
281 *
282 *    object:
283 *      A Carbon Printing Manager object, such as a PMPrintSession
284 *      object, a PMPageFormat object, a PMPrintSettings object, or
285 *      PMPrinter object.
286 *
287 *  Availability:
288 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
289 *    CarbonLib:        in CarbonLib 1.1 and later
290 *    Non-Carbon CFM:   not available
291 *
292 *  Compatibility:
293 *  	Not appropriate for CUPS filters, drivers, and backends.
294 *
295 }
PMReleasenull296 function PMRelease( objct: PMObject ): OSStatus; external name '_PMRelease';
297 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
298 
299 (*
300 //#pragma /mark
301 //#pragma /mark Session
302 //#pragma /mark
303 *)
304 
305 {
306 *  PMCreateSession()
307 *
308 *  Summary:
309 *    Creates and initializes a printing session object and creates a
310 *    context for printing operations.
311 *
312 *  Discussion:
313 *    A session is created with a refcount of 1.
314 *
315 *  Availability:
316 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
317 *    CarbonLib:        in CarbonLib 1.1 and later
318 *    Non-Carbon CFM:   not available
319 *
320 *  Compatibility:
321 *  	Not appropriate for CUPS filters, drivers, and backends.
322 *
323 }
PMCreateSessionnull324 function PMCreateSession( var printSession: PMPrintSession ): OSStatus; external name '_PMCreateSession';
325 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
326 
327 
328 {
329 *  PMSessionError()
330 *
331 *  Availability:
332 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
333 *    CarbonLib:        in CarbonLib 1.1 and later
334 *    Non-Carbon CFM:   not available
335 *
336 *  Compatibility:
337 *  	Not appropriate for CUPS filters, drivers, and backends.
338 *
339 }
PMSessionErrornull340 function PMSessionError( printSession: PMPrintSession ): OSStatus; external name '_PMSessionError';
341 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
342 
343 
344 {
345 *  PMSessionSetError()
346 *
347 *  Availability:
348 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
349 *    CarbonLib:        in CarbonLib 1.1 and later
350 *    Non-Carbon CFM:   not available
351 *
352 *  Compatibility:
353 *  	Not appropriate for CUPS filters, drivers, and backends.
354 *
355 }
PMSessionSetErrornull356 function PMSessionSetError( printSession: PMPrintSession; printError: OSStatus ): OSStatus; external name '_PMSessionSetError';
357 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
358 
359 (*
360 //#pragma /mark
361 //#pragma /mark Session: Printing Loop
362 //#pragma /mark
363 *)
364 
365 {
366 *  PMSessionBeginCGDocumentNoDialog()
367 *
368 *  Summary:
369 *    Begin a new print job for client drawing to a CoreGraphics context.
370 *
371 *  Discussion:
372 *    This is an updated version of the function
373 *    PMSessionBeginDocumentNoDialog. The functionality is identical to
374 *    PMSessionBeginDocumentNoDialog except that during a print job,
375 *    the caller cannot obtain a Quickdraw grafPort for the printing
376 *    context but can only obtain a Quartz graphics context
377 *    (CGContextRef). This function should be used in conjunction with
378 *    PMSessionGetCGGraphicsContext instead of
379 *    PMSessionGetGraphicsContext.
380 *
381 *  Availability:
382 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
383 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
384 *    Non-Carbon CFM:   not available
385 *
386 *  Compatibility:
387 *  	Not appropriate for CUPS filters, drivers, and backends.
388 *
389 }
PMSessionBeginCGDocumentNoDialognull390 function PMSessionBeginCGDocumentNoDialog( printSession: PMPrintSession; printSettings: PMPrintSettings; pageFormat: PMPageFormat ): OSStatus; external name '_PMSessionBeginCGDocumentNoDialog';
391 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
392 
393 
394 {
395 *  PMSessionEndDocumentNoDialog()
396 *
397 *  Availability:
398 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
399 *    CarbonLib:        in CarbonLib 1.6 and later
400 *    Non-Carbon CFM:   not available
401 *
402 *  Compatibility:
403 *  	Not appropriate for CUPS filters, drivers, and backends.
404 *
405 }
PMSessionEndDocumentNoDialognull406 function PMSessionEndDocumentNoDialog( printSession: PMPrintSession ): OSStatus; external name '_PMSessionEndDocumentNoDialog';
407 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
408 
409 
410 {
411 * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
412 * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
413 * starting with Mac OS X version 10.2 and later.
414 *
415 * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
416 }
417 {
418 *  PMSessionBeginPageNoDialog()
419 *
420 *  Availability:
421 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
422 *    CarbonLib:        in CarbonLib 1.6 and later
423 *    Non-Carbon CFM:   not available
424 *
425 *  Compatibility:
426 *  	Not appropriate for CUPS filters, drivers, and backends.
427 *
428 }
PMSessionBeginPageNoDialognull429 function PMSessionBeginPageNoDialog( printSession: PMPrintSession; pageFormat: PMPageFormat; pageFrame: PMRectPtr ): OSStatus; external name '_PMSessionBeginPageNoDialog';
430 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
431 
432 
433 {
434 * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
435 * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
436 * starting with Mac OS X version 10.2 and later.
437 *
438 * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
439 }
440 {
441 *  PMSessionEndPageNoDialog()
442 *
443 *  Availability:
444 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
445 *    CarbonLib:        in CarbonLib 1.6 and later
446 *    Non-Carbon CFM:   not available
447 *
448 *  Compatibility:
449 *  	Not appropriate for CUPS filters, drivers, and backends.
450 *
451 }
PMSessionEndPageNoDialognull452 function PMSessionEndPageNoDialog( printSession: PMPrintSession ): OSStatus; external name '_PMSessionEndPageNoDialog';
453 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
454 
455 
456 {
457 *  PMSessionGetCGGraphicsContext()
458 *
459 *  Summary:
460 *    Return the CGContextRef for the current page in the printing
461 *    session.
462 *
463 *  Discussion:
464 *    This function returns the CGContextRef for the printing session.
465 *    This function must be called for each page. To use
466 *    PMSessionGetCGGraphicsContext you MUST call
467 *    PMSessionBeginCGDocument or PMSessionBeginCGDocumentNoDialog
468 *    instead of PMSessionBeginDocument or
469 *    PMSessionBeginDocumentNoDialog.
470 *
471 *  Parameters:
472 *
473 *    printSession:
474 *      The session for the print job.
475 *
476 *    context:
477 *      A pointer to a caller supplied CGContextRef variable. If this
478 *      function succeeds then *context will be filled in with the
479 *      printing CGContextRef.
480 *
481 *  Availability:
482 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
483 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
484 *    Non-Carbon CFM:   not available
485 *
486 *  Compatibility:
487 *  	Not appropriate for CUPS filters, drivers, and backends.
488 *
489 }
PMSessionGetCGGraphicsContextnull490 function PMSessionGetCGGraphicsContext( printSession: PMPrintSession; var context: CGContextRef ): OSStatus; external name '_PMSessionGetCGGraphicsContext';
491 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
492 
493 (*
494 //#pragma /mark
495 //#pragma /mark Session: Other routines
496 //#pragma /mark -
497 *)
498 
499 {
500 *  PMSessionGetDestinationType()
501 *
502 *  Summary:
503 *    Hand back the destination type that will be used for a print job
504 *    with the specified print settings and print session.
505 *
506 *  Discussion:
507 *    Currently there are five destination types:
508 *    kPMDestinationPrinter, kPMDestinationFile, kPMDestinationFax and
509 *    kPMDestinationPreview, and kPMDestinationProcessPDF.
510 *
511 *  Parameters:
512 *
513 *    printSession:
514 *      The session to be used for a print job. The session holds the
515 *      preview setting which can override the destination type in the
516 *      print settings.
517 *
518 *    printSettings:
519 *      The print settings to be used for a print job. The print
520 *      settings specify whether a job will be directed toward a
521 *      printer or to file.
522 *
523 *    destTypeP:
524 *      A pointer to a caller supplied PMDestinationType variable. If
525 *      this function succeeds then *'destTypeP' will be filled in with
526 *      the destination type for a print job that used the specified
527 *      session and print settings. If this function fails, then
528 *      *'destType' will be set to kPMDestinationInvalid.
529 *
530 *    SPECIAL_AVAILABILITY_NOTE:
531 *      This routine is available in ApplicationsServices.framework in
532 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
533 *      CFM applications through CarbonLib starting with Mac OS X
534 *      version 10.2 and later.
535 *
536 *  Availability:
537 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
538 *    CarbonLib:        in CarbonLib 1.5 and later
539 *    Non-Carbon CFM:   not available
540 *
541 *  Compatibility:
542 *  	Not appropriate for CUPS filters, drivers, and backends.
543 *
544 }
PMSessionGetDestinationTypenull545 function PMSessionGetDestinationType( printSession: PMPrintSession; printSettings: PMPrintSettings; var destTypeP: PMDestinationType ): OSStatus; external name '_PMSessionGetDestinationType';
546 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
547 
548 {
549 *  PMSessionCopyDestinationFormat()
550 *
551 *  Summary:
552 *    Hand back the destination output MIME type associated with the
553 *    provided print session and print settings.
554 *
555 *  Parameters:
556 *
557 *    printSession:
558 *      A currently open print session.
559 *
560 *    printSettings:
561 *      The print settings that are to be searched.
562 *
563 *    destFormatP:
564 *      A pointer to a caller allocated CFStringRef variable. If this
565 *      routine returns noErr then *'destFormatP' will either be a copy
566 *      of a CFStringRef specifying the output format for the print
567 *      job, or NULL indicating that the default output format will be
568 *      used. If this function return an error, then *'destFormatP'
569 *      will be set to NULL.
570 *
571 *    SPECIAL_AVAILABILITY_NOTE:
572 *      This routine is available in ApplicationsServices.framework in
573 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
574 *      CFM applications through CarbonLib starting with Mac OS X
575 *      version 10.2 and later.
576 *
577 *  Availability:
578 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
579 *    CarbonLib:        in CarbonLib 1.5 and later
580 *    Non-Carbon CFM:   not available
581 *
582 *  Compatibility:
583 *  	Not appropriate for CUPS filters, drivers, and backends.
584 *
585 }
PMSessionCopyDestinationFormatnull586 function PMSessionCopyDestinationFormat( printSession: PMPrintSession; printSettings: PMPrintSettings; var destFormatP: CFStringRef ): OSStatus; external name '_PMSessionCopyDestinationFormat';
587 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
588 
589 
590 {
591 *  PMSessionCopyDestinationLocation()
592 *
593 *  Summary:
594 *    Hand back the URL destination location given a print session and
595 *    print settings.
596 *
597 *  Discussion:
598 *    Some destination type support a destination location which
599 *    further defines where the output from a pritn job should be sent.
600 *    The kPMDestinationFile destiation type, for example, will use a
601 *    file URL to determine where a new file should be created.
602 *
603 *  Parameters:
604 *
605 *    printSession:
606 *      A currently open print session.
607 *
608 *    printSettings:
609 *      The print settings that are to be searched.
610 *
611 *    destLocationP:
612 *      A pointer to a caller allocated CFURLRef variable. If this
613 *      routine returns noErr then *'outputFileP' will either be NULL
614 *      indicating that the job is using the default destination
615 *      location for the current destination type or a copy of a
616 *      CFURLRef will be placed in *'destLocationP'. If this function
617 *      returns an error then 'destLocationP' will be set to NULL.
618 *
619 *    SPECIAL_AVAILABILITY_NOTE:
620 *      This routine is available in ApplicationsServices.framework in
621 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
622 *      CFM applications through CarbonLib starting with Mac OS X
623 *      version 10.2 and later.
624 *
625 *  Availability:
626 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
627 *    CarbonLib:        in CarbonLib 1.5 and later
628 *    Non-Carbon CFM:   not available
629 *
630 *  Compatibility:
631 *  	Not appropriate for CUPS filters, drivers, and backends.
632 *
633 }
PMSessionCopyDestinationLocationnull634 function PMSessionCopyDestinationLocation( printSession: PMPrintSession; printSettings: PMPrintSettings; var destLocationP: CFURLRef ): OSStatus; external name '_PMSessionCopyDestinationLocation';
635 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
636 
637 
638 {
639 *  PMSessionSetDestination()
640 *
641 *  Summary:
642 *    Alter a print session and print settings so that an associated
643 *    print job is sent to the provided destination type in the,
644 *    optional, MIME document format.
645 *
646 *  Discussion:
647 *    This function is most useful when an application would like to
648 *    write its print output to disk without requiring user
649 *    interaction. The list of MIME types that can be sent to the
650 *    provided destination can be obtained from
651 *    PMSessionCopyOutputFormatList and one of these passed to this
652 *    function.
653 *
654 *  Parameters:
655 *
656 *    printSession:
657 *      The session to be used for a print job. The session holds the
658 *      preview setting which can override the destination type in the
659 *      print settings.
660 *
661 *    printSettings:
662 *      The print settings to be used for a print job. The print
663 *      settings specify whether a job will be directed toward a
664 *      printer or to file. It also holds the requested MIME output
665 *      type.
666 *
667 *    destType:
668 *      The destiation type for a print job associated with the
669 *      provided print session and print settings. Fax is currently not
670 *      supported, but kPMDestinationPrinter, kPMDestinationFile, and
671 *      kPMDestinationPreview can be set.
672 *
673 *    destFormat:
674 *      The MIME type to be generated for the provided destination
675 *      type. This parameter can be NULL in which the default format
676 *      for the requested destination type is used. To obtain a list of
677 *      valid formats for a given destiation type, use the function
678 *      PMSessionCopyOutputFormatList.
679 *
680 *    destLocation:
681 *      Some destination types support a destination location. The
682 *      clearest example is the kPMDestinationFile destination type
683 *      which allows a caller to also supply a file URL specifying
684 *      where the output file is to be created.
685 *
686 *    SPECIAL_AVAILABILITY_NOTE:
687 *      This routine is available in ApplicationsServices.framework in
688 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
689 *      CFM applications through CarbonLib starting with Mac OS X
690 *      version 10.2 and later.
691 *
692 *  Availability:
693 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
694 *    CarbonLib:        in CarbonLib 1.5 and later
695 *    Non-Carbon CFM:   not available
696 *
697 *  Compatibility:
698 *  	Not appropriate for CUPS filters, drivers, and backends.
699 *
700 }
PMSessionSetDestinationnull701 function PMSessionSetDestination( printSession: PMPrintSession; printSettings: PMPrintSettings; destType: PMDestinationType; destFormat: CFStringRef; destLocation: CFURLRef ): OSStatus; external name '_PMSessionSetDestination';
702 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
703 
704 {
705 *  PMSessionCopyOutputFormatList()
706 *
707 *  Summary:
708 *    Hands back an an array of MIME types describing the possible
709 *    output formats for the printer module associated with the current
710 *    printer.
711 *
712 *  Parameters:
713 *
714 *    printSession:
715 *      This session's current printer's printer module will be queried
716 *      for its supported output MIME types.
717 *
718 *    destType:
719 *      A print job can have one of several possible destination types.
720 *      The list of valid output formats is dependent upon the
721 *      destination type. This parameter specifies destination type of
722 *      interest when retrieving the output formats list.
723 *
724 *    documentFormatP:
725 *      A pointer to a caller's CFArrayRef variable. If this routine
726 *      completes successfully, then *'documentFormatP' will be set to
727 *      a CFArrayRef containing CFStringRefs. Each CFStringRef in the
728 *      array is a MIME type specifying a type of output that can be
729 *      generated by the printer module associated with the current
730 *      printer.
731 *
732 *    SPECIAL_AVAILABILITY_NOTE:
733 *      This routine is available in ApplicationsServices.framework in
734 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
735 *      CFM applications through CarbonLib starting with Mac OS X
736 *      version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
737 *      routine returns kPMNotImplemented
738 *
739 *  Availability:
740 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
741 *    CarbonLib:        in CarbonLib 1.6 and later
742 *    Non-Carbon CFM:   not available
743 *
744 *  Compatibility:
745 *  	Not appropriate for CUPS filters, drivers, and backends.
746 *
747 }
PMSessionCopyOutputFormatListnull748 function PMSessionCopyOutputFormatList( printSession: PMPrintSession; destType: PMDestinationType; var documentFormatP: CFArrayRef ): OSStatus; external name '_PMSessionCopyOutputFormatList';
749 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
750 
751 
752 {
753 *  PMSessionCreatePageFormatList()
754 *
755 *  Summary:
756 *    Hand back a list of page format instances. Each page format
757 *    instance describes a paper size available on the specified
758 *    printer.
759 *
760 *  Parameters:
761 *
762 *    printSession:
763 *      A currently valid print session.
764 *
765 *    printer:
766 *      The printer whose page size list should be enumerated.
767 *
768 *    pageFormatList:
769 *      If this function is successful then noErr will be returned and
770 *      *'pageFormatList' will be set to a newly created CFArray. Each
771 *      element in the array will be a PMPageFormat describing an
772 *      available paper size for the specified printer. If this
773 *      function fails then a non-zero error code will be returned and
774 *      *'pageFormatList' will be set to NULL.
775 *
776 *  Discussion:
777 *	If you want to create the page format list for the session's current printer,
778 *      pass the PMPrinter object returned by PMSessionGetCurrentPrinter() as the
779 *	printer parameter.
780 *
781 *    SPECIAL_AVAILABILITY_NOTE:
782 *      This routine is available in ApplicationsServices.framework in
783 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
784 *      CFM applications through CarbonLib starting with Mac OS X
785 *      version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
786 *      routine returns kPMNotImplemented
787 *
788 *  Availability:
789 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
790 *    CarbonLib:        in CarbonLib 1.6 and later
791 *    Non-Carbon CFM:   not available
792 *
793 *  Compatibility:
794 *  	Not appropriate for CUPS filters, drivers, and backends.
795 *
796 }
PMSessionCreatePageFormatListnull797 function PMSessionCreatePageFormatList( printSession: PMPrintSession; printer: PMPrinter; var pageFormatList: CFArrayRef ): OSStatus; external name '_PMSessionCreatePageFormatList';
798 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
799 
800 
801 {
802 *  PMSessionCreatePrinterList()
803 *
804 *  See also: PMServerCreatePrinterList.
805 *
806 *  Availability:
807 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
808 *    CarbonLib:        in CarbonLib 1.4 and later
809 *    Non-Carbon CFM:   not available
810 *
811 *  Compatibility:
812 *  	Not appropriate for CUPS filters, drivers, and backends.
813 *
814 }
PMSessionCreatePrinterListnull815 function PMSessionCreatePrinterList( printSession: PMPrintSession; var printerList: CFArrayRef; var currentIndex: CFIndex; var currentPrinter: PMPrinter ): OSStatus; external name '_PMSessionCreatePrinterList';
816 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
817 
818 {
819 *  PMSessionGetCurrentPrinter()
820 *
821 *  Summary:
822 *    Hand back the session's current printer.
823 *
824 *  Availability:
825 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
826 *    CarbonLib:        in CarbonLib 1.1 and later
827 *    Non-Carbon CFM:   not available
828 *
829 *  Compatibility:
830 *  	Not appropriate for CUPS filters, drivers, and backends.
831 *
832 }
PMSessionGetCurrentPrinternull833 function PMSessionGetCurrentPrinter( printSession: PMPrintSession; var currentPrinter: PMPrinter ): OSStatus; external name '_PMSessionGetCurrentPrinter';
834 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
835 
836 {
837 *  PMSessionSetCurrentPMPrinter()
838 *
839 *  Summary:
840 *    Set the session's current printer to a specified PMPrinter.
841 *
842 *  Availability:
843 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
844 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
845 *    Non-Carbon CFM:   not available
846 *
847 *  Compatibility:
848 *  	Not appropriate for CUPS filters, drivers, and backends.
849 *
850 }
PMSessionSetCurrentPMPrinternull851 function PMSessionSetCurrentPMPrinter( session: PMPrintSession; printer: PMPrinter ): OSStatus; external name '_PMSessionSetCurrentPMPrinter';
852 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
853 
854 {
855 *  PMSessionGetDataFromSession()
856 *
857 *  Availability:
858 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
859 *    CarbonLib:        in CarbonLib 1.1 and later
860 *    Non-Carbon CFM:   not available
861 *
862 *  Compatibility:
863 *  	Not appropriate for CUPS filters, drivers, and backends.
864 *
865 }
PMSessionGetDataFromSessionnull866 function PMSessionGetDataFromSession( printSession: PMPrintSession; key: CFStringRef; var data: CFTypeRef ): OSStatus; external name '_PMSessionGetDataFromSession';
867 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
868 
869 {
870 *  PMSessionSetDataInSession()
871 *
872 *  Availability:
873 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
874 *    CarbonLib:        in CarbonLib 1.1 and later
875 *    Non-Carbon CFM:   not available
876 *
877 *  Compatibility:
878 *  	Not appropriate for CUPS filters, drivers, and backends.
879 *
880 }
PMSessionSetDataInSessionnull881 function PMSessionSetDataInSession( printSession: PMPrintSession; key: CFStringRef; data: CFTypeRef ): OSStatus; external name '_PMSessionSetDataInSession';
882 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
883 
884 (*
885 //#pragma /mark -
886 //#pragma /mark PageFormat
887 //#pragma /mark
888 *)
889 
890 {
891 *  PMCreatePageFormat()
892 *
893 *  Summary:
894 *    Allocates memory for a new PMPageFormat object in your
895 *    application�s memory space.
896 *
897 *  Discussion:
898 *    A pageformat is created with a refcount of 1.
899 *
900 *  Availability:
901 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
902 *    CarbonLib:        in CarbonLib 1.1 and later
903 *    Non-Carbon CFM:   not available
904 *
905 *  Compatibility:
906 *  	Not appropriate for CUPS filters, drivers, and backends.
907 *
908 }
PMCreatePageFormatnull909 function PMCreatePageFormat( var pageFormat: PMPageFormat ): OSStatus; external name '_PMCreatePageFormat';
910 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
911 
912 {
913 *  PMSessionDefaultPageFormat()
914 *
915 *  Availability:
916 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
917 *    CarbonLib:        in CarbonLib 1.1 and later
918 *    Non-Carbon CFM:   not available
919 *
920 *  Compatibility:
921 *  	Not appropriate for CUPS filters, drivers, and backends.
922 *
923 }
PMSessionDefaultPageFormatnull924 function PMSessionDefaultPageFormat( printSession: PMPrintSession; pageFormat: PMPageFormat ): OSStatus; external name '_PMSessionDefaultPageFormat';
925 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
926 
927 {
928 *  PMSessionValidatePageFormat()
929 *
930 *  Availability:
931 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
932 *    CarbonLib:        in CarbonLib 1.1 and later
933 *    Non-Carbon CFM:   not available
934 *
935 *  Compatibility:
936 *  	Not appropriate for CUPS filters, drivers, and backends.
937 *
938 }
PMSessionValidatePageFormatnull939 function PMSessionValidatePageFormat( printSession: PMPrintSession; pageFormat: PMPageFormat; result: BooleanPtr ): OSStatus; external name '_PMSessionValidatePageFormat';
940 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
941 
942 {$endc} {PM_USE_SESSION_APIS}
943 
944 {
945 *  PMCopyPageFormat()
946 *
947 *  Availability:
948 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
949 *    CarbonLib:        in CarbonLib 1.0 and later
950 *    Non-Carbon CFM:   not available
951 *
952 *  Compatibility:
953 *  	Not appropriate for CUPS filters, drivers, and backends.
954 *
955 }
PMCopyPageFormatnull956 function PMCopyPageFormat( formatSrc: PMPageFormat; formatDest: PMPageFormat ): OSStatus; external name '_PMCopyPageFormat';
957 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
958 
959 
960 {
961 *  PMCreatePageFormatWithPMPaper()
962 *
963 *  Summary:
964 *    Create a pageformat with a specific paper.
965 *
966 *  Parameters:
967 *
968 *    pageFormat:
969 *      On return, will contain the pageformat which was created
970 *
971 *    paper:
972 *      The paper that will be associate with the pageformat
973 *
974 *  Availability:
975 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
976 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
977 *    Non-Carbon CFM:   not available
978 *
979 *  Compatibility:
980 *  	Not appropriate for CUPS filters, drivers, and backends.
981 *
982 }
PMCreatePageFormatWithPMPapernull983 function PMCreatePageFormatWithPMPaper( var pageFormat: PMPageFormat; paper: PMPaper ): OSStatus; external name '_PMCreatePageFormatWithPMPaper';
984 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
985 
986 {
987 *  PMPageFormatCreateDataRepresentation()
988 *
989 *  Summary:
990 *    Returns a data representation of a PMPageFormat object as a CFDataRef.
991 *    The caller is responsible for releasing the CFData object returned.
992 *
993 *  Discussion:
994 *    This function is similar to PMFlattenPageFormatToCFData but allows you
995 *    to specify the format of the data that is returned. Use
996 *    PMPageFormatCreateWithDataRepresentation to create a PMPageFormat from
997 *    a CFDataRef created by this call.
998 *
999 *    See PMDataFormat for information about the available data formats.
1000 *
1001 *  Availability:
1002 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1003 *    CarbonLib:        not available
1004 *    Non-Carbon CFM:   not available
1005 *
1006 *  Compatibility:
1007 *  	Not appropriate for CUPS filters, drivers, and backends.
1008 *
1009 }
PMPageFormatCreateDataRepresentationnull1010 function PMPageFormatCreateDataRepresentation( pageFormat: PMPageFormat; var data: CFDataRef; format: PMDataFormat ): OSStatus; external name '_PMPageFormatCreateDataRepresentation';
1011 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1012 
1013 
1014 {
1015 *  PMPageFormatCreateWithDataRepresentation()
1016 *
1017 *  Summary:
1018 *    Creates a PMPageFormat object from a data representation created with
1019 *	  PMPageFormatCreateDataRepresentation. The caller is responsible
1020 *    for releasing the PMPrintSettings object returned with PMRelease.
1021 *
1022 *  Availability:
1023 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1024 *    CarbonLib:        not available
1025 *    Non-Carbon CFM:   not available
1026 *
1027 *  Compatibility:
1028 *  	Not appropriate for CUPS filters, drivers, and backends.
1029 *
1030 }
PMPageFormatCreateWithDataRepresentationnull1031 function PMPageFormatCreateWithDataRepresentation( data: CFDataRef; var pageFormat: PMPageFormat ): OSStatus; external name '_PMPageFormatCreateWithDataRepresentation';
1032 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1033 
1034 
1035 
1036 {
1037 *  PMGetAdjustedPageRect()
1038 *
1039 *  Availability:
1040 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1041 *    CarbonLib:        in CarbonLib 1.0 and later
1042 *    Non-Carbon CFM:   not available
1043 *
1044 *  Compatibility:
1045 *  	Not appropriate for CUPS filters, drivers, and backends.
1046 *
1047 }
PMGetAdjustedPageRectnull1048 function PMGetAdjustedPageRect( pageFormat: PMPageFormat; var pageRect: PMRect ): OSStatus; external name '_PMGetAdjustedPageRect';
1049 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1050 
1051 
1052 {
1053 *  PMGetAdjustedPaperRect()
1054 *
1055 *  Availability:
1056 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1057 *    CarbonLib:        in CarbonLib 1.0 and later
1058 *    Non-Carbon CFM:   not available
1059 *
1060 *  Compatibility:
1061 *  	Not appropriate for CUPS filters, drivers, and backends.
1062 *
1063 }
PMGetAdjustedPaperRectnull1064 function PMGetAdjustedPaperRect( pageFormat: PMPageFormat; var paperRect: PMRect ): OSStatus; external name '_PMGetAdjustedPaperRect';
1065 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1066 
1067 
1068 {
1069 *  PMGetOrientation()
1070 *
1071 *  Availability:
1072 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1073 *    CarbonLib:        in CarbonLib 1.0 and later
1074 *    Non-Carbon CFM:   not available
1075 *
1076 *  Compatibility:
1077 *  	Not appropriate for CUPS filters, drivers, and backends.
1078 *
1079 }
PMGetOrientationnull1080 function PMGetOrientation( pageFormat: PMPageFormat; var orientation: PMOrientation ): OSStatus; external name '_PMGetOrientation';
1081 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1082 
1083 
1084 {
1085 *  PMGetPageFormatExtendedData()
1086 *
1087 *  Availability:
1088 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1089 *    CarbonLib:        in CarbonLib 1.0 and later
1090 *    Non-Carbon CFM:   not available
1091 *
1092 *  Compatibility:
1093 *  	Not appropriate for CUPS filters, drivers, and backends.
1094 *
1095 }
PMGetPageFormatExtendedDatanull1096 function PMGetPageFormatExtendedData( pageFormat: PMPageFormat; dataID: OSType; var size: UInt32; extendedData: UnivPtr ): OSStatus; external name '_PMGetPageFormatExtendedData';
1097 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1098 
1099 {
1100 *  PMPageFormatGetPrinterID()
1101 *
1102 *  Summary:
1103 *		Obtains the formatting printer for the pageformat.
1104 *
1105 *  Discussion:
1106 *		Will either return the formatting printer for the pageformat
1107 *		or will return NULL if the pageformat doesn't have that information.
1108 *
1109 *  Parameters:
1110 *
1111 *    pageFormat:
1112 *      The pageformat to obtain the information from.
1113 *
1114 *	  printerID:
1115 *		Where to store the name of the printer
1116 *
1117 *  Availability:
1118 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1119 *    CarbonLib:        not available
1120 *    Non-Carbon CFM:   not available
1121 *
1122 *  Compatibility:
1123 *  	Not appropriate for CUPS filters, drivers, and backends.
1124 *
1125 }
PMPageFormatGetPrinterIDnull1126 function PMPageFormatGetPrinterID( pageFormat: PMPageFormat; var printerID: CFStringRef ): OSStatus; external name '_PMPageFormatGetPrinterID';
1127 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1128 
1129 
1130 {
1131 *  PMGetScale()
1132 *
1133 *  Summary:
1134 *    Obtains the scaling factor currently applied to the page and
1135 *    paper rectangles.
1136 *
1137 *  Discussion:
1138 *    A value of 100.0 means 100% (no scaling). 50.0 means 50% scaling
1139 *
1140 *  Availability:
1141 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1142 *    CarbonLib:        in CarbonLib 1.0 and later
1143 *    Non-Carbon CFM:   not available
1144 *
1145 *  Compatibility:
1146 *  	Not appropriate for CUPS filters, drivers, and backends.
1147 *
1148 }
PMGetScalenull1149 function PMGetScale( pageFormat: PMPageFormat; var scale: Float64 ): OSStatus; external name '_PMGetScale';
1150 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1151 
1152 
1153 {
1154 *  PMGetUnadjustedPageRect()
1155 *
1156 *  Summary:
1157 *    Obtains the size of the imageable area in points, unaffected by
1158 *    orientation, resolution, or scaling.
1159 *
1160 *  Discussion:
1161 *    This is the imageable area of the page without regard to
1162 *    resolution, orientation or scaling. Dimensions are returned as a 72dpi
1163 *    values.
1164 *
1165 *  Availability:
1166 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1167 *    CarbonLib:        in CarbonLib 1.1 and later
1168 *    Non-Carbon CFM:   not available
1169 *
1170 *  Compatibility:
1171 *  	Not appropriate for CUPS filters, drivers, and backends.
1172 *
1173 }
PMGetUnadjustedPageRectnull1174 function PMGetUnadjustedPageRect( pageFormat: PMPageFormat; var pageRect: PMRect ): OSStatus; external name '_PMGetUnadjustedPageRect';
1175 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1176 
1177 
1178 {
1179 *  PMGetUnadjustedPaperRect()
1180 *
1181 *  Summary:
1182 *    Obtains a rectangle that specifies the size of the paper in
1183 *    points, unaffected by rotation, resolution, or scaling.
1184 *
1185 *  Discussion:
1186 *    This is the physical size of the paper without regard to
1187 *    resolution, orientation or scaling. Dimensions are returned as a 72dpi
1188 *    values.
1189 *
1190 *  Availability:
1191 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1192 *    CarbonLib:        in CarbonLib 1.1 and later
1193 *    Non-Carbon CFM:   not available
1194 *
1195 *  Compatibility:
1196 *  	Not appropriate for CUPS filters, drivers, and backends.
1197 *
1198 }
PMGetUnadjustedPaperRectnull1199 function PMGetUnadjustedPaperRect( pageFormat: PMPageFormat; var paperRect: PMRect ): OSStatus; external name '_PMGetUnadjustedPaperRect';
1200 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1201 
1202 
1203 
1204 {**********************}
1205 { PMSetxxx calls only save the value inside the printing object. They make no assumption on the }
1206 { validity of the value. This should be done using PMValidatePageFormat/PMSessionValidatePageFormat }
1207 { Any dependent settings are also updated during a validate call. }
1208 { For example: }
1209 { PMGetAdjustedPaperRect - returns a rect of a certain size }
1210 { PMSetScale( aPageFormat, 500.0 )  }
1211 { PMGetAdjustedPaperRect - returns the SAME rect as the first call  }
1212 { PMGetAdjustedPaperRect - returns a rect of a certain size }
1213 { PMSetScale( aPageFormat, 500.0 ) }
1214 { PMValidatePageFormat or PMSessionValidatePageFormat }
1215 { PMGetAdjustedPaperRect - returns a rect thats scaled 500% from the first call }
1216 {**********************}
1217 
1218 {
1219 *  PMSetOrientation()
1220 *
1221 *  Availability:
1222 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1223 *    CarbonLib:        in CarbonLib 1.0 and later
1224 *    Non-Carbon CFM:   not available
1225 *
1226 *  Compatibility:
1227 *  	Not appropriate for CUPS filters, drivers, and backends.
1228 *
1229 }
PMSetOrientationnull1230 function PMSetOrientation( pageFormat: PMPageFormat; orientation: PMOrientation; lock: Boolean ): OSStatus; external name '_PMSetOrientation';
1231 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1232 
1233 
1234 {
1235 *  PMSetPageFormatExtendedData()
1236 *
1237 *  Availability:
1238 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1239 *    CarbonLib:        in CarbonLib 1.0 and later
1240 *    Non-Carbon CFM:   not available
1241 *
1242 *  Compatibility:
1243 *  	Not appropriate for CUPS filters, drivers, and backends.
1244 *
1245 }
PMSetPageFormatExtendedDatanull1246 function PMSetPageFormatExtendedData( pageFormat: PMPageFormat; dataID: OSType; size: UInt32; extendedData: UnivPtr ): OSStatus; external name '_PMSetPageFormatExtendedData';
1247 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1248 
1249 
1250 {
1251 *  PMSetScale()
1252 *
1253 *  Availability:
1254 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1255 *    CarbonLib:        in CarbonLib 1.0 and later
1256 *    Non-Carbon CFM:   not available
1257 *
1258 *  Compatibility:
1259 *  	Not appropriate for CUPS filters, drivers, and backends.
1260 *
1261 }
PMSetScalenull1262 function PMSetScale( pageFormat: PMPageFormat; scale: Float64 ): OSStatus; external name '_PMSetScale';
1263 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1264 
1265 (*
1266 //#pragma /mark -
1267 //#pragma /mark PrintSettings
1268 //#pragma /mark
1269 *)
1270 
1271 {$ifc PM_USE_SESSION_APIS}
1272 {
1273 *  PMCreatePrintSettings()
1274 *
1275 *  Summary:
1276 *    Allocates memory for a new PMPrintSettings object in your
1277 *    application�s memory space.
1278 *
1279 *  Discussion:
1280 *    A printSettings is created with a refcount of 1.
1281 *
1282 *  Availability:
1283 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1284 *    CarbonLib:        in CarbonLib 1.1 and later
1285 *    Non-Carbon CFM:   not available
1286 *
1287 *  Compatibility:
1288 *  	Not appropriate for CUPS filters, drivers, and backends.
1289 *
1290 }
PMCreatePrintSettingsnull1291 function PMCreatePrintSettings( var printSettings: PMPrintSettings ): OSStatus; external name '_PMCreatePrintSettings';
1292 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1293 
1294 {
1295 *  PMSessionDefaultPrintSettings()
1296 *
1297 *  Availability:
1298 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1299 *    CarbonLib:        in CarbonLib 1.1 and later
1300 *    Non-Carbon CFM:   not available
1301 *
1302 *  Compatibility:
1303 *  	Not appropriate for CUPS filters, drivers, and backends.
1304 *
1305 }
PMSessionDefaultPrintSettingsnull1306 function PMSessionDefaultPrintSettings( printSession: PMPrintSession; printSettings: PMPrintSettings ): OSStatus; external name '_PMSessionDefaultPrintSettings';
1307 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1308 
1309 {
1310 *  PMSessionValidatePrintSettings()
1311 *
1312 *  Availability:
1313 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1314 *    CarbonLib:        in CarbonLib 1.1 and later
1315 *    Non-Carbon CFM:   not available
1316 *
1317 *  Compatibility:
1318 *  	Not appropriate for CUPS filters, drivers, and backends.
1319 *
1320 }
PMSessionValidatePrintSettingsnull1321 function PMSessionValidatePrintSettings( printSession: PMPrintSession; printSettings: PMPrintSettings; result: BooleanPtr ): OSStatus; external name '_PMSessionValidatePrintSettings';
1322 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1323 
1324 {$endc} {PM_USE_SESSION_APIS}
1325 
1326 {
1327 *  PMCopyPrintSettings()
1328 *
1329 *  Availability:
1330 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1331 *    CarbonLib:        in CarbonLib 1.0 and later
1332 *    Non-Carbon CFM:   not available
1333 *
1334 *  Compatibility:
1335 *  	Not appropriate for CUPS filters, drivers, and backends.
1336 *
1337 }
PMCopyPrintSettingsnull1338 function PMCopyPrintSettings( settingSrc: PMPrintSettings; settingDest: PMPrintSettings ): OSStatus; external name '_PMCopyPrintSettings';
1339 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1340 
1341 
1342 {
1343 *  PMPrintSettingsCreateDataRepresentation()
1344 *
1345 *  Summary:
1346 *    Returns a data representation of a PMPrintSettings object as a CFDataRef.
1347 *    The caller is responsible for releasing the CFData object returned.
1348 *
1349 *  Discussion:
1350 *    This function is similar to PMFlattenPrintSettingsToCFData but allows you
1351 *    to specify the format of the data that is returned. Use
1352 *    PMPrintSettingsCreateWithDataRepresentation to create a PMPrintSettings from
1353 *    a CFDataRef created by this call.
1354 *
1355 *    See PMDataFormat for information about the available data formats.
1356 *
1357 *  Availability:
1358 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1359 *    CarbonLib:        not available
1360 *    Non-Carbon CFM:   not available
1361 *
1362 *  Compatibility:
1363 *  	Not appropriate for CUPS filters, drivers, and backends.
1364 *
1365 }
PMPrintSettingsCreateDataRepresentationnull1366 function PMPrintSettingsCreateDataRepresentation( printSettings: PMPrintSettings; var data: CFDataRef; format: PMDataFormat ): OSStatus; external name '_PMPrintSettingsCreateDataRepresentation';
1367 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1368 
1369 
1370 {
1371 *  PMPrintSettingsCreateWithDataRepresentation()
1372 *
1373 *  Summary:
1374 *    Creates a PMPrintSettings object from a data representation created with
1375 *	  PMPrintSettingsCreateDataRepresentation. The caller is responsible
1376 *    for releasing the PMPrintSettings object returned with PMRelease.
1377 *
1378 *
1379 *  Availability:
1380 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1381 *    CarbonLib:        not available
1382 *    Non-Carbon CFM:   not available
1383 *
1384 *  Compatibility:
1385 *  	Not appropriate for CUPS filters, drivers, and backends.
1386 *
1387 }
PMPrintSettingsCreateWithDataRepresentationnull1388 function PMPrintSettingsCreateWithDataRepresentation( data: CFDataRef; var printSettings: PMPrintSettings ): OSStatus; external name '_PMPrintSettingsCreateWithDataRepresentation';
1389 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1390 
1391 
1392 
1393 {
1394 *  PMGetCollate()
1395 *
1396 *  Availability:
1397 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1398 *    CarbonLib:        in CarbonLib 1.6 and later
1399 *    Non-Carbon CFM:   not available
1400 *
1401 *  Compatibility:
1402 *  	Not appropriate for CUPS filters, drivers, and backends.
1403 *
1404 }
PMGetCollatenull1405 function PMGetCollate( printSettings: PMPrintSettings; var collate: Boolean ): OSStatus; external name '_PMGetCollate';
1406 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1407 
1408 
1409 {
1410 *  PMGetCopies()
1411 *
1412 *  Availability:
1413 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1414 *    CarbonLib:        in CarbonLib 1.0 and later
1415 *    Non-Carbon CFM:   not available
1416 *
1417 *  Compatibility:
1418 *  	Not appropriate for CUPS filters, drivers, and backends.
1419 *
1420 }
PMGetCopiesnull1421 function PMGetCopies( printSettings: PMPrintSettings; var copies: UInt32 ): OSStatus; external name '_PMGetCopies';
1422 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1423 
1424 
1425 {
1426 *  PMGetDuplex()
1427 *
1428 *  Availability:
1429 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1430 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1431 *    Non-Carbon CFM:   not available
1432 *
1433 *  Compatibility:
1434 *  	Not appropriate for CUPS filters, drivers, and backends.
1435 *
1436 }
PMGetDuplexnull1437 function PMGetDuplex( printSettings: PMPrintSettings; var duplexSetting: PMDuplexMode ): OSStatus; external name '_PMGetDuplex';
1438 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1439 
1440 
1441 {
1442 *  PMGetFirstPage()
1443 *
1444 *  Availability:
1445 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1446 *    CarbonLib:        in CarbonLib 1.0 and later
1447 *    Non-Carbon CFM:   not available
1448 *
1449 *  Compatibility:
1450 *  	Not appropriate for CUPS filters, drivers, and backends.
1451 *
1452 }
PMGetFirstPagenull1453 function PMGetFirstPage( printSettings: PMPrintSettings; var first: UInt32 ): OSStatus; external name '_PMGetFirstPage';
1454 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1455 
1456 
1457 {
1458 *  PMGetLastPage()
1459 *
1460 *  Availability:
1461 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1462 *    CarbonLib:        in CarbonLib 1.0 and later
1463 *    Non-Carbon CFM:   not available
1464 *
1465 *  Compatibility:
1466 *  	Not appropriate for CUPS filters, drivers, and backends.
1467 *
1468 }
PMGetLastPagenull1469 function PMGetLastPage( printSettings: PMPrintSettings; var last: UInt32 ): OSStatus; external name '_PMGetLastPage';
1470 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1471 
1472 
1473 {
1474 *  PMGetPageRange()
1475 *
1476 *  Summary:
1477 *    Obtains the valid range of pages that can be printed.
1478 *
1479 *  Discussion:
1480 *    The default page range is 1 - (all pages). The page range is
1481 *    something that is set by the application. It is NOT the first and
1482 *    last page to print. It serves as limits for setting the first and
1483 *    last page.
1484 *
1485 *  Availability:
1486 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1487 *    CarbonLib:        in CarbonLib 1.0 and later
1488 *    Non-Carbon CFM:   not available
1489 *
1490 *  Compatibility:
1491 *  	Not appropriate for CUPS filters, drivers, and backends.
1492 *
1493 }
PMGetPageRangenull1494 function PMGetPageRange( printSettings: PMPrintSettings; var minPage: UInt32; var maxPage: UInt32 ): OSStatus; external name '_PMGetPageRange';
1495 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1496 
1497 {
1498 *  PMPrintSettingsGetJobName()
1499 *
1500 *  Availability:
1501 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1502 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1503 *    Non-Carbon CFM:   not available
1504 *
1505 *  Compatibility:
1506 *  	Not appropriate for CUPS filters, drivers, and backends.
1507 *
1508 }
PMPrintSettingsGetJobNamenull1509 function PMPrintSettingsGetJobName( printSettings: PMPrintSettings; var name: CFStringRef ): OSStatus; external name '_PMPrintSettingsGetJobName';
1510 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1511 
1512 {
1513 *  PMPrintSettingsGetValue()
1514 *
1515 *  Parameters:
1516 *
1517 *    printSettings:
1518 *      The printsettings to retrieve the value from
1519 *
1520 *    key:
1521 *      The key to look for
1522 *
1523 *    value:
1524 *      The return value. Its either the value for the key or NULL
1525 *
1526 *  Availability:
1527 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1528 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1529 *    Non-Carbon CFM:   not available
1530 *
1531 *  Compatibility:
1532 *  	Not appropriate for CUPS filters, drivers, and backends.
1533 *
1534 }
PMPrintSettingsGetValuenull1535 function PMPrintSettingsGetValue( printSettings: PMPrintSettings; key: CFStringRef; var value: CFTypeRef ): OSStatus; external name '_PMPrintSettingsGetValue';
1536 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1537 
1538 
1539 
1540 {
1541 *  PMSetCollate()
1542 *
1543 *  Availability:
1544 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1545 *    CarbonLib:        in CarbonLib 1.6 and later
1546 *    Non-Carbon CFM:   not available
1547 *
1548 *  Compatibility:
1549 *  	Not appropriate for CUPS filters, drivers, and backends.
1550 *
1551 }
PMSetCollatenull1552 function PMSetCollate( printSettings: PMPrintSettings; collate: Boolean ): OSStatus; external name '_PMSetCollate';
1553 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1554 
1555 
1556 {
1557 *  PMSetCopies()
1558 *
1559 *  Availability:
1560 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1561 *    CarbonLib:        in CarbonLib 1.0 and later
1562 *    Non-Carbon CFM:   not available
1563 *
1564 *  Compatibility:
1565 *  	Not appropriate for CUPS filters, drivers, and backends.
1566 *
1567 }
PMSetCopiesnull1568 function PMSetCopies( printSettings: PMPrintSettings; copies: UInt32; lock: Boolean ): OSStatus; external name '_PMSetCopies';
1569 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1570 
1571 
1572 {
1573 *  PMSetDuplex()
1574 *
1575 *  Availability:
1576 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1577 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1578 *    Non-Carbon CFM:   not available
1579 *
1580 *  Compatibility:
1581 *  	Not appropriate for CUPS filters, drivers, and backends.
1582 *
1583 }
PMSetDuplexnull1584 function PMSetDuplex( printSettings: PMPrintSettings; duplexSetting: PMDuplexMode ): OSStatus; external name '_PMSetDuplex';
1585 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1586 
1587 
1588 {
1589 *  PMSetFirstPage()
1590 *
1591 *  Availability:
1592 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1593 *    CarbonLib:        in CarbonLib 1.0 and later
1594 *    Non-Carbon CFM:   not available
1595 *
1596 *  Compatibility:
1597 *  	Not appropriate for CUPS filters, drivers, and backends.
1598 *
1599 }
PMSetFirstPagenull1600 function PMSetFirstPage( printSettings: PMPrintSettings; first: UInt32; lock: Boolean ): OSStatus; external name '_PMSetFirstPage';
1601 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1602 
1603 
1604 {
1605 *  PMSetLastPage()
1606 *
1607 *  Availability:
1608 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1609 *    CarbonLib:        in CarbonLib 1.0 and later
1610 *    Non-Carbon CFM:   not available
1611 *
1612 *  Compatibility:
1613 *  	Not appropriate for CUPS filters, drivers, and backends.
1614 *
1615 }
PMSetLastPagenull1616 function PMSetLastPage( printSettings: PMPrintSettings; last: UInt32; lock: Boolean ): OSStatus; external name '_PMSetLastPage';
1617 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1618 
1619 
1620 {
1621 *  PMSetPageRange()
1622 *
1623 *  Summary:
1624 *    Sets the valid range of pages that can be printed.
1625 *
1626 *  Discussion:
1627 *    The first and last page are immediately clipped to the new range.
1628 *    You may pass kPMPrintAllPages for the maxPage value to specified
1629 *    that all pages are available for printing.
1630 *
1631 *  Availability:
1632 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1633 *    CarbonLib:        in CarbonLib 1.0 and later
1634 *    Non-Carbon CFM:   not available
1635 *
1636 *  Compatibility:
1637 *  	Not appropriate for CUPS filters, drivers, and backends.
1638 *
1639 }
PMSetPageRangenull1640 function PMSetPageRange( printSettings: PMPrintSettings; minPage: UInt32; maxPage: UInt32 ): OSStatus; external name '_PMSetPageRange';
1641 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1642 
1643 
1644 {
1645 *  PMPrintSettingsSetJobName()
1646 *
1647 *  Availability:
1648 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1649 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1650 *    Non-Carbon CFM:   not available
1651 *
1652 *  Compatibility:
1653 *  	Not appropriate for CUPS filters, drivers, and backends.
1654 *
1655 }
PMPrintSettingsSetJobNamenull1656 function PMPrintSettingsSetJobName( printSettings: PMPrintSettings; name: CFStringRef ): OSStatus; external name '_PMPrintSettingsSetJobName';
1657 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1658 
1659 
1660 {
1661 *  PMPrintSettingsSetValue()
1662 *
1663 *  Parameters:
1664 *
1665 *    printSettings:
1666 *      The printsettings in which to set the value
1667 *
1668 *    key:
1669 *      The key to store the value in
1670 *
1671 *    value:
1672 *      The value to store in the key. If NULL, any existing setting item with
1673 *      the specified key is removed.
1674 *
1675 *    locked:
1676 *      A boolean value indicating whether the item being set should be
1677 *      locked. It is strongly recommended to pass false.
1678 *
1679 *  Availability:
1680 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1681 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1682 *    Non-Carbon CFM:   not available
1683 *
1684 *  Compatibility:
1685 *  	Not appropriate for CUPS filters, drivers, and backends.
1686 *
1687 }
PMPrintSettingsSetValuenull1688 function PMPrintSettingsSetValue( printSettings: PMPrintSettings; key: CFStringRef; value: CFTypeRef; locked: Boolean ): OSStatus; external name '_PMPrintSettingsSetValue';
1689 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1690 
1691 
1692 {
1693 *  PMPrintSettingsCopyAsDictionary()
1694 *
1695 *  Parameters:
1696 *
1697 *    printSettings:
1698 *      Represent these print settings as a dictionary.
1699 *
1700 *    settingsDictionary:
1701 *      On exit, if successful *'settingsDictionary' will contain a reference to
1702 *      a CFDictionary describing the print settings. The caller is
1703 *      responsible for releasing this reference. If this call returns
1704 *      an error, then *'settingsDictionary' will be set to NULL.
1705 *
1706 *  Availability:
1707 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1708 *    CarbonLib:        not available
1709 *    Non-Carbon CFM:   not available
1710 *
1711 *  Compatibility:
1712 *  	Not appropriate for CUPS filters, drivers, and backends.
1713 *
1714 }
PMPrintSettingsCopyAsDictionarynull1715 function PMPrintSettingsCopyAsDictionary( printSettings: PMPrintSettings; var settingsDictionary: CFDictionaryRef ): OSStatus; external name '_PMPrintSettingsCopyAsDictionary';
1716 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1717 
1718 {
1719 *  PMPrintSettingsCopyKeys()
1720 *
1721 *  Parameters:
1722 *
1723 *    printSettings:
1724 *      Return the keys for items in this print settings.
1725 *
1726 *    settingsKeys:
1727 *      On exit, if successful *'settingsKeys' will contain a reference to
1728 *      a CFArray describing the item keys in the print settings. Each of these
1729 *		keys may be passed to PMPrintSettingsGetValue() to obtain a value.
1730 *		The caller is responsible for releasing this reference. If this call returns
1731 *      an error, then *'settingsKeys' will be set to NULL.
1732 *
1733 *  Availability:
1734 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1735 *    CarbonLib:        not available
1736 *    Non-Carbon CFM:   not available
1737 *
1738 *  Compatibility:
1739 *  	Not appropriate for CUPS filters, drivers, and backends.
1740 *
1741 }
PMPrintSettingsCopyKeysnull1742 function PMPrintSettingsCopyKeys( printSettings: PMPrintSettings; var settingsKeys: CFArrayRef ): OSStatus; external name '_PMPrintSettingsCopyKeys';
1743 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1744 
1745 (*
1746 //#pragma /mark -
1747 //#pragma /mark Printer
1748 //#pragma /mark
1749 *)
1750 
1751 {!
1752 *
1753 * PMCreateGenericPrinter
1754 *  Summary:
1755 *	Creates a generic PMPrinter
1756 *
1757 *  Parameters:
1758 *		printer:
1759 *		On return *printer contains the generic priner
1760 *
1761 *  Availability:
1762 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1763 *    CarbonLib:        not available
1764 *    Non-Carbon CFM:   not available
1765 *
1766 *  Compatibility:
1767 *  	Not appropriate for CUPS filters, drivers, and backends.
1768 *
1769 }
PMCreateGenericPrinternull1770 function PMCreateGenericPrinter( var printer: PMPrinter ): OSStatus; external name '_PMCreateGenericPrinter';
1771 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1772 
1773 {
1774 *  PMServerCreatePrinterList()
1775 *
1776 *  Summary:
1777 *    Hand back an array of PMPrinter objects that represents the list of printers
1778 *    known to the specified print server.
1779 *
1780 *  Parameters:
1781 *
1782 *    server:
1783 *      The print server for which you want to obtain the list of printers.
1784 *      Use kPMServerLocal for the local print server.
1785 *
1786 *    printerList:
1787 *      On return, *printerList contains the array of PMPrinter objects returned. The
1788 *	caller is responsible for releasing this array. On error, *printerList is NULL.
1789 *
1790 *  Availability:
1791 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1792 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1793 *    Non-Carbon CFM:   not available
1794 *
1795 *  Compatibility:
1796 *  	Not appropriate for CUPS filters, drivers, and backends.
1797 *
1798 }
PMServerCreatePrinterListnull1799 function PMServerCreatePrinterList( server: PMServer; var printerList: CFArrayRef ): OSStatus; external name '_PMServerCreatePrinterList';
1800 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1801 
1802 
1803 {
1804 *  PMServerLaunchPrinterBrowser()
1805 *
1806 *  Summary:
1807 *    Launch the printer browser, browsing the printers available for
1808 *    the specified print server.
1809 *
1810 *  Parameters:
1811 *
1812 *    server:
1813 *      The print server whose available printers the browser should browse.
1814 *      Pass kPMServerLocal for the local print server.
1815 *
1816 *    options:
1817 *      A CFDictionaryRef specifying how the browser should be presented.
1818 *      Passing NULL presents the browser in the default fashion.
1819 *
1820 *  Discussion:	The local print server allows its printers to be browsed but
1821 *		not all print servers do. Passing in a server whose printers cannot be
1822 *      browsed returns the error code kPMInvalidParameter.
1823 *
1824 *  Availability:
1825 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1826 *    CarbonLib:        not available
1827 *    Non-Carbon CFM:   not available
1828 *
1829 *  Compatibility:
1830 *  	Not appropriate for CUPS filters, drivers, and backends.
1831 *
1832 }
PMServerLaunchPrinterBrowsernull1833 function PMServerLaunchPrinterBrowser( server: PMServer; options: CFDictionaryRef ): OSStatus; external name '_PMServerLaunchPrinterBrowser';
1834 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1835 
1836 {
1837 *  PMPrinterCreateFromPrinterID()
1838 *
1839 *  Summary:
1840 *    Create a PMPrinter instance from the supplied printerID.
1841 *
1842 *  Discussion:
1843 *    Returns a PMPrinter instance for the printer whose ID is
1844 *    printerID. The caller is responsible for releasing this instance
1845 *    with PMRelease. The PMPrinter instance returned will be NULL if
1846 *    there is no printer available which corresponds to the supplied
1847 *    printerID.
1848 *
1849 *  Parameters:
1850 *
1851 *    printerID:
1852 *      The printerID for the printer for which you want the PMPrinter.
1853 *
1854 *  Availability:
1855 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1856 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1857 *    Non-Carbon CFM:   not available
1858 *
1859 *  Compatibility:
1860 *  	Not appropriate for CUPS filters, drivers, and backends.
1861 *
1862 }
PMPrinterCreateFromPrinterIDnull1863 function PMPrinterCreateFromPrinterID( printerID: CFStringRef ): PMPrinter; external name '_PMPrinterCreateFromPrinterID';
1864 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1865 
1866 
1867 {
1868 *  PMPrinterCopyDescriptionURL()
1869 *
1870 *  Summary:
1871 *    Hand back a URL to the printer's PostScript Printer Description (PPD) file in fileURL.
1872 *
1873 *  Parameters:
1874 *
1875 *    printer:
1876 *      The printer whose PPD will be returned.
1877 *
1878 *    descriptionType:
1879 *      The type of description desired. Only kPMPPDDescriptionType is currently supported.
1880 *
1881 *    fileURL:
1882 *      A pointer to storage for a CFURL reference that will be returned. The caller is responsible
1883 *      for releasing the reference returned. If this call returns an error, then *fileURL will
1884 *      be set to NULL.
1885 *
1886 *  Discussion:
1887 *    Only descriptionType of kPMPPDDescriptionType is supported, otherwise kPMInvalidParameter
1888 *    is returned.
1889 *
1890 *  Availability:
1891 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1892 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1893 *    Non-Carbon CFM:   not available
1894 *
1895 *  Compatibility:
1896 *  	Not appropriate for CUPS filters, drivers, and backends.
1897 *
1898 }
PMPrinterCopyDescriptionURLnull1899 function PMPrinterCopyDescriptionURL( printer: PMPrinter; descriptionType: CFStringRef; var fileURL: CFURLRef ): OSStatus; external name '_PMPrinterCopyDescriptionURL';
1900 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1901 
1902 
1903 {
1904 *  PMPrinterCopyDeviceURI()
1905 *
1906 *  Summary:
1907 *    Hand back the URI of the printer's device.
1908 *
1909 *  Parameters:
1910 *
1911 *    printer:
1912 *      The printer whose device URI is to be retrieved.
1913 *
1914 *    deviceURI:
1915 *      On exit, if successful *'deviceURI' will contain a reference to
1916 *      a CFURL describing the printer's device. The caller is
1917 *      responsible for releasing this reference. If this call returns
1918 *      an error, then *'deviceURI' will be set to NULL.
1919 *
1920 *  Availability:
1921 *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
1922 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1923 *    Non-Carbon CFM:   not available
1924 *
1925 *  Compatibility:
1926 *  	Not appropriate for CUPS filters, drivers, and backends.
1927 *
1928 }
PMPrinterCopyDeviceURInull1929 function PMPrinterCopyDeviceURI( printer: PMPrinter; var deviceURI: CFURLRef ): OSStatus; external name '_PMPrinterCopyDeviceURI';
1930 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1931 
1932 
1933 {
1934 *  PMPrinterCopyHostName()
1935 *
1936 *  Summary:
1937 *    Hand back the host name of the print server hosting the printer's print queue.
1938 *
1939 *  Availability:
1940 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
1941 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
1942 *    Non-Carbon CFM:   not available
1943 *
1944 *  Compatibility:
1945 *  	Not appropriate for CUPS filters, drivers, and backends.
1946 *
1947 }
PMPrinterCopyHostNamenull1948 function PMPrinterCopyHostName( printer: PMPrinter; var hostNameP: CFStringRef ): OSStatus; external name '_PMPrinterCopyHostName';
1949 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
1950 
1951 
1952 {
1953 *  PMPrinterCopyPresets()
1954 *
1955 *  Summary:
1956 *    Provides a list of print settings presets for the specified
1957 *    printer.
1958 *
1959 *  Discussion:
1960 *    A printer may have associated with it a list of preset settings.
1961 *    Each setting is optimized for a particular printing situation.
1962 *    This function returns all of the presets for a given printer. To
1963 *    obtain more information about a particular preset see
1964 *    PMPresetGetAttributes().
1965 *
1966 *  Parameters:
1967 *
1968 *    printer:
1969 *      Obtain the presets for this printer.
1970 *
1971 *    presetList:
1972 *      On exit, *'presetList' is set to reference an array of presets.
1973 *      The caller must call CFRelease when it no longer needs the
1974 *      array. Each element of the array is a PMPreset. If this
1975 *      function fails, returning a non-zero error code, then
1976 *      *'presetList' will be set to NULL.
1977 *
1978 *  Availability:
1979 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
1980 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
1981 *    Non-Carbon CFM:   not available
1982 *
1983 *  Compatibility:
1984 *  	Not appropriate for CUPS filters, drivers, and backends.
1985 *
1986 }
PMPrinterCopyPresetsnull1987 function PMPrinterCopyPresets( printer: PMPrinter; var presetList: CFArrayRef ): OSStatus; external name '_PMPrinterCopyPresets';
1988 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
1989 
1990 
1991 {
1992 *  PMPrinterGetCommInfo()
1993 *
1994 *  Summary:
1995 *    Provides information about the comm channel characteristics for
1996 *    the printer.
1997 *
1998 *  Discussion:
1999 *    This function is typically relevant only to PostScript capable
2000 *    printers. All PostScript printers, regardless of what
2001 *    communications channel is used to send data to them, support data
2002 *    in the range 0x20 - 0x7F. Many comm channels can support data
2003 *    outside this range. The Boolean returned in *supportsTransparentP
2004 *    indicates whether the comm channel to this printer supports bytes
2005 *    in the range 0x0 to 0x1F. The Boolean returned in
2006 *    *supportsEightBitP indicates whether the comm channel to this
2007 *    printer supports bytes with the high bit set, i.e. bytes in the
2008 *    range 0x80 - 0xFF.
2009 *
2010 *  Parameters:
2011 *
2012 *    printer:
2013 *      Obtain the comm information for this printer.
2014 *
2015 *    supportsControlCharRangeP:
2016 *      Storage for the returned Boolean indicating whether the comm
2017 *      channel to this printer can accept data bytes in the range
2018 *      0x0 - 0x1F
2019 *
2020 *    supportsEightBitP:
2021 *      Storage for the returned Boolean indicating whether the comm
2022 *      channel to this printer can accept data bytes in the range
2023 *      0x80 - 0xFF
2024 *
2025 *  Availability:
2026 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2027 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2028 *    Non-Carbon CFM:   not available
2029 *
2030 *  Compatibility:
2031 *  	Not appropriate for CUPS filters, drivers, and backends.
2032 *
2033 }
PMPrinterGetCommInfonull2034 function PMPrinterGetCommInfo( printer: PMPrinter; var supportsControlCharRangeP: Boolean; var supportsEightBitP: Boolean ): OSStatus; external name '_PMPrinterGetCommInfo';
2035 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2036 
2037 
2038 {
2039 *  PMPrinterGetID()
2040 *
2041 *  Availability:
2042 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2043 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2044 *    Non-Carbon CFM:   not available
2045 *
2046 *  Compatibility:
2047 *  	Not appropriate for CUPS filters, drivers, and backends.
2048 *
2049 }
PMPrinterGetIDnull2050 function PMPrinterGetID( printer: PMPrinter ): CFStringRef; external name '_PMPrinterGetID';
2051 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2052 
2053 
2054 {
2055 *  PMPrinterGetLocation()
2056 *
2057 *  Availability:
2058 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2059 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2060 *    Non-Carbon CFM:   not available
2061 *
2062 *  Compatibility:
2063 *  	Not appropriate for CUPS filters, drivers, and backends.
2064 *
2065 }
PMPrinterGetLocationnull2066 function PMPrinterGetLocation( printer: PMPrinter ): CFStringRef; external name '_PMPrinterGetLocation';
2067 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2068 
2069 
2070 {
2071 *  PMPrinterGetDriverCreator()
2072 *
2073 *  Availability:
2074 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
2075 *    CarbonLib:        in CarbonLib 1.1 and later
2076 *    Non-Carbon CFM:   not available
2077 *
2078 *  Compatibility:
2079 *  	Not appropriate for CUPS filters, drivers, and backends.
2080 *
2081 }
PMPrinterGetDriverCreatornull2082 function PMPrinterGetDriverCreator( printer: PMPrinter; var creator: OSType ): OSStatus; external name '_PMPrinterGetDriverCreator';
2083 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2084 
2085 
2086 {
2087 *  PMPrinterGetDriverReleaseInfo()
2088 *
2089 *  Availability:
2090 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
2091 *    CarbonLib:        in CarbonLib 1.1 and later
2092 *    Non-Carbon CFM:   not available
2093 *
2094 *  Compatibility:
2095 *  	Not appropriate for CUPS filters, drivers, and backends.
2096 *
2097 }
PMPrinterGetDriverReleaseInfonull2098 function PMPrinterGetDriverReleaseInfo( printer: PMPrinter; var release: VersRec ): OSStatus; external name '_PMPrinterGetDriverReleaseInfo';
2099 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2100 
2101 
2102 {
2103 *  PMPrinterGetPrinterResolutionCount()
2104 *
2105 *  Summary:
2106 *    Provides the number of available hardware resolution settings a printer supports.
2107 *
2108 *  Parameters:
2109 *
2110 *    printer:
2111 *      Obtain the resolution count for this printer.
2112 *
2113 *    countP:
2114 *      Storage for the returned count indicating the number of available hardware
2115 *      resolution settings for the specified printer.
2116 *
2117 *  Availability:
2118 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
2119 *    CarbonLib:        in CarbonLib 1.1 and later
2120 *    Non-Carbon CFM:   not available
2121 *
2122 *  Compatibility:
2123 *  	Not appropriate for CUPS filters, drivers, and backends.
2124 *
2125 }
PMPrinterGetPrinterResolutionCountnull2126 function PMPrinterGetPrinterResolutionCount( printer: PMPrinter; var countP: UInt32 ): OSStatus; external name '_PMPrinterGetPrinterResolutionCount';
2127 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2128 
2129 {
2130 *  PMPrinterGetIndexedPrinterResolution()
2131 *
2132 *  Summary:
2133 *    Together with PMPrinterGetPrinterResolutionCount, allows iterating over the
2134 *    hardware resolution settings a printer supports.
2135 *
2136 *  Parameters:
2137 *
2138 *    printer:
2139 *      The printer of interest.
2140 *
2141 *    index:
2142 *      The index of the resolution to return. The minimum value for index is 1 and
2143 *      the maximum value of index is the count returned by PMPrinterGetPrinterResolutionCount.
2144 *
2145 *    resolutionP:
2146 *      Storage for the returned PMResolution data.
2147 *
2148 *  Availability:
2149 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
2150 *    CarbonLib:        in CarbonLib 1.1 and later
2151 *    Non-Carbon CFM:   not available
2152 *
2153 *  Compatibility:
2154 *  	Not appropriate for CUPS filters, drivers, and backends.
2155 *
2156 }
PMPrinterGetIndexedPrinterResolutionnull2157 function PMPrinterGetIndexedPrinterResolution( printer: PMPrinter; index: UInt32; var resolutionP: PMResolution ): OSStatus; external name '_PMPrinterGetIndexedPrinterResolution';
2158 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2159 
2160 
2161 {
2162 *  PMPrinterGetOutputResolution()
2163 *
2164 *  Summary:
2165 *    Obtain the printer hardware output resolution for the supplied
2166 *    printer and print settings.
2167 *
2168 *  Discussion:
2169 *    Some printers allow programmatic control of their hardware output
2170 *    resolution on a print job basis. The hardware resolution is determined
2171 *    by the combination of printer and print settings used for the print job.
2172 *    PMPrinterGetOutputResolution returns the best guess as to what printer
2173 *    resolution setting will be used for the destination print job. If the
2174 *    resolution setting cannot be reliably determined this function returns
2175 *    kPMKeyNotFound.
2176 *
2177 *    Most applications do not need to use this function since they draw the same
2178 *    content regardless of the destination device. For those few applications that
2179 *    do adjust their drawing based on the output device, they should only do so
2180 *    when the print job destination is kPMDestinationPrinter or kPMDestinationFax.
2181 *
2182 *    This call should be used after displaying the print dialog to the user so
2183 *    that it correctly reflects settings changes performed prior to printing.
2184 *
2185 *  Parameters:
2186 *
2187 *    printer:
2188 *      The destination printer.
2189 *
2190 *    printSettings:
2191 *      The print settings from which to obtain the printer hardware output resolution.
2192 *
2193 *    resolutionP:
2194 *      Storage for the returned PMResolution data.
2195 *
2196 *  Availability:
2197 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2198 *    CarbonLib:        not available
2199 *    Non-Carbon CFM:   not available
2200 *
2201 *  Compatibility:
2202 *  	Not appropriate for CUPS filters, drivers, and backends.
2203 *
2204 }
PMPrinterGetOutputResolutionnull2205 function PMPrinterGetOutputResolution( printer: PMPrinter; printSettings: PMPrintSettings; var resolutionP: PMResolution ): OSStatus; external name '_PMPrinterGetOutputResolution';
2206 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2207 
2208 {
2209 *  PMPrinterSetOutputResolution()
2210 *
2211 *  Summary:
2212 *    Set the printer hardware output resolution in the print settings
2213 *    for the supplied printer.
2214 *
2215 *  Discussion:
2216 *    Some printers allow programmatic control of their hardware output
2217 *    resolution on a print job basis. The hardware resolution is determined
2218 *    by the combination of printer and print settings used for the print job.
2219 *    PMPrinterSetOutputResolution configures the print settings to the closest
2220 *    resolution setting that can be used for the destination print job. Note
2221 *    that not all printers allow control of their resolution setting.
2222 *
2223 *    This function is rarely used since most applications do not set the output
2224 *    resolution but instead use the setting supplied by the user in the print dialog.
2225 *
2226 *  Parameters:
2227 *
2228 *    printer:
2229 *      The destination printer.
2230 *
2231 *    printSettings:
2232 *      The print settings in which to set the hardware resolution.
2233 *
2234 *    resolutionP:
2235 *      A pointer to the PMResolution to use to set the hardware output resolution.
2236 *
2237 *  Availability:
2238 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2239 *    CarbonLib:        not available
2240 *    Non-Carbon CFM:   not available
2241 *
2242 *  Compatibility:
2243 *  	Not appropriate for CUPS filters, drivers, and backends.
2244 *
2245 }
PMPrinterSetOutputResolutionnull2246 function PMPrinterSetOutputResolution( printer: PMPrinter; printSettings: PMPrintSettings; const (*var*) resolutionP: PMResolution ): OSStatus; external name '_PMPrinterSetOutputResolution';
2247 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2248 
2249 
2250 {
2251 *  PMPrinterGetLanguageInfo()
2252 *
2253 *  Availability:
2254 *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
2255 *    CarbonLib:        in CarbonLib 1.1 and later
2256 *    Non-Carbon CFM:   not available
2257 *
2258 *  Compatibility:
2259 *  	Not appropriate for CUPS filters, drivers, and backends.
2260 *
2261 }
PMPrinterGetLanguageInfonull2262 function PMPrinterGetLanguageInfo( printer: PMPrinter; var info: PMLanguageInfo ): OSStatus; external name '_PMPrinterGetLanguageInfo';
2263 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2264 
2265 
2266 {
2267 *  PMPrinterGetMakeAndModelName()
2268 *
2269 *  Availability:
2270 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2271 *    CarbonLib:        in CarbonLib 1.6 and later
2272 *    Non-Carbon CFM:   not available
2273 *
2274 *  Compatibility:
2275 *  	Not appropriate for CUPS filters, drivers, and backends.
2276 *
2277 }
PMPrinterGetMakeAndModelNamenull2278 function PMPrinterGetMakeAndModelName( printer: PMPrinter; var makeAndModel: CFStringRef ): OSStatus; external name '_PMPrinterGetMakeAndModelName';
2279 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2280 
2281 
2282 {
2283 *  PMPrinterGetMimeTypes()
2284 *
2285 *  Summary:
2286 *    Return the array of mime type supported by the printer for a
2287 *    given set of print settings.
2288 *
2289 *  Parameters:
2290 *
2291 *    printer:
2292 *      The printer.
2293 *
2294 *    settings:
2295 *      The print settings for the print job. The part of the print
2296 *      settings that effects the available mime type is the
2297 *      destination. This parameter can be NULL.
2298 *
2299 *    mimeTypes:
2300 *      If this function returns without error then *'mimeTypes' is
2301 *      filled in with a reference to an array of CFStrings. Each
2302 *      CFString names a mime type supported by the printer with the
2303 *      specified print settings. The caller must not release this
2304 *      reference without first doing a retain. If this function
2305 *      returns an error then 'mimeTypes' will be set to NULL.
2306 *
2307 *  Availability:
2308 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2309 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2310 *    Non-Carbon CFM:   not available
2311 *
2312 *  Compatibility:
2313 *  	Not appropriate for CUPS filters, drivers, and backends.
2314 *
2315 }
PMPrinterGetMimeTypesnull2316 function PMPrinterGetMimeTypes( printer: PMPrinter; settings: PMPrintSettings; var mimeTypes: CFArrayRef ): OSStatus; external name '_PMPrinterGetMimeTypes';
2317 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2318 
2319 
2320 {
2321 *  PMPrinterGetName()
2322 *
2323 *  Availability:
2324 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2325 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2326 *    Non-Carbon CFM:   not available
2327 *
2328 *  Compatibility:
2329 *  	Not appropriate for CUPS filters, drivers, and backends.
2330 *
2331 }
PMPrinterGetNamenull2332 function PMPrinterGetName( printer: PMPrinter ): CFStringRef; external name '_PMPrinterGetName';
2333 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2334 
2335 
2336 {
2337 *  PMPrinterGetPaperList()
2338 *
2339 *  Summary:
2340 *    Returns the list of papers available for a given printer.
2341 *
2342 *  Parameters:
2343 *
2344 *    printer:
2345 *      Obtain the paper list for this printer.
2346 *
2347 *    paperList:
2348 *      If successful noErr is returned and *paperList is a CFArray of
2349 *      PMPapers representing the list of papers available for the
2350 *      printer.
2351 *
2352 *  Availability:
2353 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2354 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2355 *    Non-Carbon CFM:   not available
2356 *
2357 *  Compatibility:
2358 *  	Not appropriate for CUPS filters, drivers, and backends.
2359 *
2360 }
PMPrinterGetPaperListnull2361 function PMPrinterGetPaperList( printer: PMPrinter; var paperList: CFArrayRef ): OSStatus; external name '_PMPrinterGetPaperList';
2362 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2363 
2364 
2365 {
2366 *  PMPrinterGetState()
2367 *
2368 *  Availability:
2369 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2370 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2371 *    Non-Carbon CFM:   not available
2372 *
2373 *  Compatibility:
2374 *  	Not appropriate for CUPS filters, drivers, and backends.
2375 *
2376 }
PMPrinterGetStatenull2377 function PMPrinterGetState( printer: PMPrinter; var state: PMPrinterState ): OSStatus; external name '_PMPrinterGetState';
2378 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2379 
2380 
2381 {
2382 *  PMPrinterIsDefault()
2383 *
2384 *  Availability:
2385 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2386 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2387 *    Non-Carbon CFM:   not available
2388 *
2389 *  Compatibility:
2390 *  	Not appropriate for CUPS filters, drivers, and backends.
2391 *
2392 }
PMPrinterIsDefaultnull2393 function PMPrinterIsDefault( printer: PMPrinter ): Boolean; external name '_PMPrinterIsDefault';
2394 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2395 
2396 
2397 {
2398 *  PMPrinterIsFavorite()
2399 *
2400 *  Summary:
2401 *    Return true if the printer is in the user's favorite printer list.
2402 *
2403 *  Availability:
2404 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2405 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2406 *    Non-Carbon CFM:   not available
2407 *
2408 *  Compatibility:
2409 *  	Not appropriate for CUPS filters, drivers, and backends.
2410 *
2411 }
PMPrinterIsFavoritenull2412 function PMPrinterIsFavorite( printer: PMPrinter ): Boolean; external name '_PMPrinterIsFavorite';
2413 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2414 
2415 
2416 {
2417 *  PMPrinterIsPostScriptCapable()
2418 *
2419 *  Availability:
2420 *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
2421 *    CarbonLib:        in CarbonLib 1.6 and later
2422 *    Non-Carbon CFM:   not available
2423 *
2424 *  Compatibility:
2425 *  	Not appropriate for CUPS filters, drivers, and backends.
2426 *
2427 }
PMPrinterIsPostScriptCapablenull2428 function PMPrinterIsPostScriptCapable( printer: PMPrinter ): Boolean; external name '_PMPrinterIsPostScriptCapable';
2429 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2430 
2431 {!
2432 * @function	PMPrinterIsPostScriptPrinter
2433 * @abstract	Set *isPSPrinter true if the printer is a PostScript printer.
2434 *
2435 * @discussion	A PostScript printer is one whose driver takes PostScript directly.
2436 *
2437 *  Availability:
2438 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2439 *    CarbonLib:        not available
2440 *    Non-Carbon CFM:   not available
2441 *
2442 *  Compatibility:
2443 *  	Not appropriate for CUPS filters, drivers, and backends.
2444 *
2445 }
PMPrinterIsPostScriptPrinternull2446 function PMPrinterIsPostScriptPrinter( printer: PMPrinter; var isPSPrinter: Boolean ): OSStatus; external name '_PMPrinterIsPostScriptPrinter';
2447 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2448 
2449 
2450 {
2451 *  PMPrinterIsRemote()
2452 *
2453 *  Summary:
2454 *    Hand back a boolean indicating whether the printer is hosted by remote print server.
2455 *
2456 *  Discussion:
2457 *    If on return *isRemoteP is true, the print queue represents a printer hosted and
2458 *    managed by a remote print server.
2459 *
2460 *    If on return *isRemoteP is false, the print queue represents a directly connected
2461 *    printer, a network printer, or a remote printer that is locally managed. Consult
2462 *    the queue's device URI to determine the type of connection that is used to communicate
2463 *    with the printer.
2464 *
2465 *    Whether a printer is remote is derived from the CUPS printer-type attribute for the print queue.
2466 *
2467 *  Availability:
2468 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2469 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2470 *    Non-Carbon CFM:   not available
2471 *
2472 *  Compatibility:
2473 *  	Not appropriate for CUPS filters, drivers, and backends.
2474 *
2475 }
PMPrinterIsRemotenull2476 function PMPrinterIsRemote( printer: PMPrinter; var isRemoteP: Boolean ): OSStatus; external name '_PMPrinterIsRemote';
2477 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2478 
2479 
2480 {
2481 *  PMPrinterSetDefault()
2482 *
2483 *  Summary:
2484 *    Set the default printer for the current user.
2485 *
2486 *  Parameters:
2487 *
2488 *    printer:
2489 *      The printer to set as the default printer.
2490 *
2491 *  Special considerations:
2492 *      It is not typical for an application to set the current default printer
2493 *      for the user; the printing system itself takes care of managing the default printer.
2494 *      This function should be used only in rare circumstances.
2495 *
2496 *  Availability:
2497 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2498 *    CarbonLib:        not available
2499 *    Non-Carbon CFM:   not available
2500 *
2501 *  Compatibility:
2502 *  	Not appropriate for CUPS filters, drivers, and backends.
2503 *
2504 }
PMPrinterSetDefaultnull2505 function PMPrinterSetDefault( printer: PMPrinter ): OSStatus; external name '_PMPrinterSetDefault';
2506 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2507 
2508 (*
2509 //#pragma /mark
2510 //#pragma /mark Preset
2511 //#pragma /mark
2512 *)
2513 {
2514 *  PMPresetCopyName()
2515 *
2516 *  Summary:
2517 *    Hand back a copy of the localized name for the specified preset.
2518 *
2519 *  Parameters:
2520 *
2521 *    preset:
2522 *      The preset whose name is needed.
2523 *
2524 *    name:
2525 *      On exit, if this routine succeeds, *'name' is filled in with a
2526 *      reference to a localized string with the preset's name. If this
2527 *      routine fails, then *'name' is set to NULL.
2528 *
2529 *  Availability:
2530 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2531 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2532 *    Non-Carbon CFM:   not available
2533 *
2534 *  Compatibility:
2535 *  	Not appropriate for CUPS filters, drivers, and backends.
2536 *
2537 }
PMPresetCopyNamenull2538 function PMPresetCopyName( preset: PMPreset; var name: CFStringRef ): OSStatus; external name '_PMPresetCopyName';
2539 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2540 
2541 
2542 {
2543 *  PMPresetCreatePrintSettings()
2544 *
2545 *  Summary:
2546 *    Create a print settings conforming to the specified print
2547 *    settings preset.
2548 *
2549 *  Parameters:
2550 *
2551 *    preset:
2552 *      A preset specifying a set of initial print settings.
2553 *
2554 *    session:
2555 *      A valid print session.
2556 *
2557 *    printSettings:
2558 *      On exit, *'printSettings' is set to a newly created print
2559 *      settings that contains the settings specified by 'preset'. The
2560 *      caller is responsible for calling PMRelease when the print
2561 *      settings are no longer needed.
2562 *
2563 *  Availability:
2564 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2565 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2566 *    Non-Carbon CFM:   not available
2567 *
2568 *  Compatibility:
2569 *  	Not appropriate for CUPS filters, drivers, and backends.
2570 *
2571 }
PMPresetCreatePrintSettingsnull2572 function PMPresetCreatePrintSettings( preset: PMPreset; session: PMPrintSession; var printSettings: PMPrintSettings ): OSStatus; external name '_PMPresetCreatePrintSettings';
2573 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2574 
2575 
2576 {
2577 *  PMPresetGetAttributes()
2578 *
2579 *  Summary:
2580 *    Hand back the meta-data describing a given preset.
2581 *
2582 *  Discussion:
2583 *    Each preset has associated with it a dictionary containing
2584 *    meta-data. The meta-data provides the preset's id, the preset's
2585 *    localized names, and descriptions of the environment for which
2586 *    the preset it intended.
2587 *
2588 *  Parameters:
2589 *
2590 *    preset:
2591 *      A print settings preset as obtained from PMPrinterCopyPresets().
2592 *
2593 *    attributes:
2594 *      On exit, *'attributes' is set to reference a dictionary
2595 *      containing the preset's meta-data. The caller is responsible
2596 *      for retaining this reference if it is to be used beyond the
2597 *      lifetime of 'preset'. If this function fails, returning a
2598 *      non-zero error code, then *'attributes' is set to NULL.
2599 *
2600 *  Availability:
2601 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2602 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2603 *    Non-Carbon CFM:   not available
2604 *
2605 *  Compatibility:
2606 *  	Not appropriate for CUPS filters, drivers, and backends.
2607 *
2608 }
PMPresetGetAttributesnull2609 function PMPresetGetAttributes( preset: PMPreset; var attributes: CFDictionaryRef ): OSStatus; external name '_PMPresetGetAttributes';
2610 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2611 
2612 (*
2613 //#pragma /mark
2614 //#pragma /mark Paper
2615 //#pragma /mark
2616 *)
2617 {
2618 *  PMGetPageFormatPaper()
2619 *
2620 *  Summary:
2621 *    Returns the paper associated with a pageformat.
2622 *
2623 *  Parameters:
2624 *
2625 *    format:
2626 *      Obtain the paper for this pageformat.
2627 *
2628 *    paper:
2629 *      If successful noErr is returned and *paper will contain a
2630 *      PMPaper object describing the current paper associated with the
2631 *      pageformat.
2632 *
2633 *  Availability:
2634 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2635 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2636 *    Non-Carbon CFM:   not available
2637 *
2638 *  Compatibility:
2639 *  	Not appropriate for CUPS filters, drivers, and backends.
2640 *
2641 }
PMGetPageFormatPapernull2642 function PMGetPageFormatPaper( format: PMPageFormat; var paper: PMPaper ): OSStatus; external name '_PMGetPageFormatPaper';
2643 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2644 
2645 
2646 {
2647 *  PMPaperCreateCustom()
2648 *
2649 *  Summary:
2650 *    Create a new custom paper instance.
2651 *
2652 *  Parameters:
2653 *
2654 *    printer:
2655 *      The new paper size is appropriate for this printer.
2656 *
2657 *    id:
2658 *      A unique identifier for this paper type.
2659 *
2660 *    name:
2661 *      The name to display to the user for this paper type.
2662 *
2663 *    width:
2664 *      The width, in points, of the paper.
2665 *
2666 *    height:
2667 *      The height, in points, of the paper.
2668 *
2669 *    margins:
2670 *      The unprintable margins on the paper.
2671 *
2672 *    paperP:
2673 *      if this function is successful, returning noErr, then *'paperP'
2674 *      is set to be a reference to a newly created PMPaper instance.
2675 *      The caller is responsible for calling PMRelease when the
2676 *      instance is no longer needed. If this functions fails, it will
2677 *      return a non-zero error and set *'paperP' to NULL.
2678 *
2679 *  Discussion:
2680 *		This function creates a new custom paper instance. To obtain one of the available
2681 *		built-in paper sizes for a given printer, use PMPrinterGetPaperList.
2682 *
2683 *  Availability:
2684 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2685 *    CarbonLib:        not available
2686 *    Non-Carbon CFM:   not available
2687 *
2688 *  Compatibility:
2689 *  	Not appropriate for CUPS filters, drivers, and backends.
2690 *
2691 }
PMPaperCreateCustomnull2692 function PMPaperCreateCustom( printer: PMPrinter; id: CFStringRef; name: CFStringRef; width: Float64; height: Float64; const (*var*) margins: PMPaperMargins; var paperP: PMPaper ): OSStatus; external name '_PMPaperCreateCustom';
2693 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2694 
2695 {
2696 *  PMPaperGetWidth()
2697 *
2698 *  Summary:
2699 *    Returns the width for a given paper.
2700 *
2701 *  Parameters:
2702 *
2703 *    paper:
2704 *      Obtain the width for this paper.
2705 *
2706 *    paperWidth:
2707 *      If successful noErr is returned and *paperWidth is set to the
2708 *      width of the paper.
2709 *
2710 *  Availability:
2711 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2712 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2713 *    Non-Carbon CFM:   not available
2714 *
2715 *  Compatibility:
2716 *  	Not appropriate for CUPS filters, drivers, and backends.
2717 *
2718 }
PMPaperGetWidthnull2719 function PMPaperGetWidth( paper: PMPaper; var paperWidth: Float64 ): OSStatus; external name '_PMPaperGetWidth';
2720 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2721 
2722 {
2723 *  PMPaperGetHeight()
2724 *
2725 *  Summary:
2726 *    Returns the height for a given paper.
2727 *
2728 *  Parameters:
2729 *
2730 *    paper:
2731 *      Obtain the height for this paper.
2732 *
2733 *    paperHeight:
2734 *      If successful noErr is returned and *paperHeight is set to the
2735 *      height of the paper.
2736 *
2737 *  Availability:
2738 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2739 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2740 *    Non-Carbon CFM:   not available
2741 *
2742 *  Compatibility:
2743 *  	Not appropriate for CUPS filters, drivers, and backends.
2744 *
2745 }
PMPaperGetHeightnull2746 function PMPaperGetHeight( paper: PMPaper; var paperHeight: Float64 ): OSStatus; external name '_PMPaperGetHeight';
2747 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2748 
2749 {
2750 *  PMPaperGetMargins()
2751 *
2752 *  Summary:
2753 *    Returns the margins for a given paper.
2754 *
2755 *  Parameters:
2756 *
2757 *    paper:
2758 *      Obtain the margin information for this paper.
2759 *
2760 *    paperMargins:
2761 *      If successful noErr is returned and *paperMargins is set to the
2762 *      margins of the paper.
2763 *
2764 *  Availability:
2765 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2766 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2767 *    Non-Carbon CFM:   not available
2768 *
2769 *  Compatibility:
2770 *  	Not appropriate for CUPS filters, drivers, and backends.
2771 *
2772 }
PMPaperGetMarginsnull2773 function PMPaperGetMargins( paper: PMPaper; var paperMargins: PMPaperMargins ): OSStatus; external name '_PMPaperGetMargins';
2774 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2775 
2776 
2777 {
2778 *  PMPaperGetID()
2779 *
2780 *  Summary:
2781 *    Returns the id for a given paper.
2782 *
2783 *  Parameters:
2784 *
2785 *    paper:
2786 *      Obtain the id for this paper.
2787 *
2788 *    paperID:
2789 *      If successful noErr is returned and *paperID is set to the id
2790 *      of the paper.
2791 *
2792 *  Availability:
2793 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2794 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2795 *    Non-Carbon CFM:   not available
2796 *
2797 *  Compatibility:
2798 *  	Not appropriate for CUPS filters, drivers, and backends.
2799 *
2800 }
PMPaperGetIDnull2801 function PMPaperGetID( paper: PMPaper; var paperID: CFStringRef ): OSStatus; external name '_PMPaperGetID';
2802 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2803 
2804 {
2805 *  PMPaperGetPPDPaperName()
2806 *
2807 *  Summary:
2808 *    Returns the PPD name for a given paper.
2809 *
2810 *  Parameters:
2811 *
2812 *    paper:
2813 *      Obtain the PPD name for this paper.
2814 *
2815 *    paperName:
2816 *      If successful, noErr is returned and *paperName is set to the
2817 *      PPD name of the paper. The returned result may be NULL.
2818 *
2819 *  Discussion:
2820 *      The Mac OS X printing system uses a PostScript Printer Description (PPD)
2821 *      file to describe a given printer and print queue for that printer. The
2822 *      PPD name is the name that uniquely identifies a given paper
2823 *      to the printer to which the paper corresponds.
2824 *
2825 *  Availability:
2826 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2827 *    CarbonLib:        not available
2828 *    Non-Carbon CFM:   not available
2829 *
2830 *  Compatibility:
2831 *  	Not appropriate for CUPS filters, drivers, and backends.
2832 *
2833 }
PMPaperGetPPDPaperNamenull2834 function PMPaperGetPPDPaperName( paper: PMPaper; var paperName: CFStringRef ): OSStatus; external name '_PMPaperGetPPDPaperName';
2835 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2836 
2837 
2838 {
2839 *  PMPaperCreateLocalizedName()
2840 *
2841 *  Summary:
2842 *    Returns the localized name for a given paper.
2843 *    Use of PMPaperCreateLocalizedName
2844 *    is recommended instead of PMPaperGetName.
2845 *
2846 *  Parameters:
2847 *
2848 *    paper:
2849 *      Obtain the localized name for this paper.
2850 *
2851 *    printer:
2852 *      The printer for which the localization should be performed.
2853 *
2854 *    paperName:
2855 *      If successful, noErr is returned and *paperName is set to the
2856 *      localized name of the paper. The returned paper name is that appropriate
2857 *      to display to a user. The returned result may be NULL.
2858 *      If non-NULL, the caller is responsible for releasing the name returned.
2859 *
2860 *  Availability:
2861 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2862 *    CarbonLib:        not available
2863 *    Non-Carbon CFM:   not available
2864 *
2865 *  Compatibility:
2866 *  	Not appropriate for CUPS filters, drivers, and backends.
2867 *
2868 }
PMPaperCreateLocalizedNamenull2869 function PMPaperCreateLocalizedName( paper: PMPaper; printer: PMPrinter; var paperName: CFStringRef ): OSStatus; external name '_PMPaperCreateLocalizedName';
2870 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2871 
2872 {
2873 *  PMPaperGetPrinterID()
2874 *
2875 *  Summary:
2876 *    Returns the printerID of the printer for which the paper corresponds.
2877 *
2878 *  Parameters:
2879 *
2880 *    paper:
2881 *      Obtain the printer ID for this paper.
2882 *
2883 *    printerID:
2884 *      If successful, noErr is returned and *printerID is set to the
2885 *      ID of the printer for which the paper corresponds. The returned
2886 *      result may be NULL.
2887 *
2888 *  Availability:
2889 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2890 *    CarbonLib:        not available
2891 *    Non-Carbon CFM:   not available
2892 *
2893 *  Compatibility:
2894 *  	Not appropriate for CUPS filters, drivers, and backends.
2895 *
2896 }
PMPaperGetPrinterIDnull2897 function PMPaperGetPrinterID( paper: PMPaper; var printerID: CFStringRef ): OSStatus; external name '_PMPaperGetPrinterID';
2898 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2899 
2900 {
2901 *  PMPaperIsCustom()
2902 *
2903 *  Summary:
2904 *    Returns true if the paper is a custom paper.
2905 *
2906 *  Parameters:
2907 *
2908 *    paper:
2909 *      Determines if this is a custom paper.
2910 *
2911 *  Availability:
2912 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
2913 *    CarbonLib:        not available
2914 *    Non-Carbon CFM:   not available
2915 *
2916 *  Compatibility:
2917 *  	Not appropriate for CUPS filters, drivers, and backends.
2918 *
2919 }
PMPaperIsCustomnull2920 function PMPaperIsCustom( paper: PMPaper ): Boolean; external name '_PMPaperIsCustom';
2921 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2922 
2923 (*
2924 //#pragma /mark
2925 //#pragma /mark PDF Workflow
2926 //#pragma /mark
2927 *)
2928 {
2929 *  PMWorkflowCopyItems()
2930 *
2931 *  Summary:
2932 *    Hand back an array of dictionaries describing the PDF Workflow
2933 *    items installed on the system
2934 *
2935 *  Parameters:
2936 *
2937 *    workflowItems:
2938 *      If this function returns without error then *'workflowItems'
2939 *      will be filled in with a reference to an array. It is the
2940 *      caller's responsability to release the array when done with it.
2941 *      Each element in the array describes a PDF Workflow item or a
2942 *      folder holding workflow items. A dictionary describing a
2943 *      workflow item has, at least, the following keys and values:
2944 *      displayName - The user's diaplayable name for the workflow item
2945 *      itemURL - A CFURLRef pointing to the workflow item. A
2946 *      dictionary describing a workflow folder has at least the
2947 *      following keys: displayName - The user's diaplayable name for
2948 *      the workflow item folderURL - A CFURLRef pointing to the
2949 *      folder. items - A CFArrayRef describing the workflow items in
2950 *      the folder. If this function returns a non-zero error code then
2951 *      *'workflowItems' will be set to NULL.
2952 *
2953 *  Availability:
2954 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
2955 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2956 *    Non-Carbon CFM:   not available
2957 *
2958 *  Compatibility:
2959 *  	Not appropriate for CUPS filters, drivers, and backends.
2960 *
2961 }
PMWorkflowCopyItemsnull2962 function PMWorkflowCopyItems( var workflowItems: CFArrayRef ): OSStatus; external name '_PMWorkflowCopyItems';
2963 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2964 
2965 
2966 {
2967 *  PMWorkflowSubmitPDFWithOptions()
2968 *
2969 *  Summary:
2970 *    Submit a PDF file for workflow processing.
2971 *
2972 *  Discussion:
2973 *    The print dialog uses this function is conjunction with
2974 *    PMWorkflowGetItems to implement the PDF workflow button. Caller's
2975 *    can use PMWorkflowGetItems to obtain a CFURLRef that can be
2976 *    passed to PMWorkflowPDF or they can create a CFURLRef to another
2977 *    file system item.
2978 *
2979 *  Parameters:
2980 *
2981 *    workflowItem:
2982 *      A file system URL pointing to the workflow item that will
2983 *      handle the PDF file. Here are the different types of workflow
2984 *      items currently supported: Folder alias:   The PDF is moved to
2985 *      the resolved folder. Application or application alias: The
2986 *      application is sent an open event along with a reference to the
2987 *      PDF file. Compiled data fork AppleScript: The applescript is
2988 *      run with an open event along with a reference to the PDF file.
2989 *      executable tool: The tool is run with the following parameters:
2990 *      title options pdfFile
2991 *
2992 *    title:
2993 *      The user displayable name of the document.
2994 *
2995 *    options:
2996 *      A string of CUPS style key-value pairs that may be passed to
2997 *      the PDF Workflow item. This parameter can be NULL in which case
2998 *      an empty string of options is used.
2999 *
3000 *    pdfFile:
3001 *      A file system URL pointing to the file to be processed by the
3002 *      workflow item.
3003 *
3004 *  Availability:
3005 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3006 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3007 *    Non-Carbon CFM:   not available
3008 *
3009 *  Compatibility:
3010 *  	Not appropriate for CUPS filters, drivers, and backends.
3011 *
3012 }
PMWorkflowSubmitPDFWithOptionsnull3013 function PMWorkflowSubmitPDFWithOptions( workflowItem: CFURLRef; title: CFStringRef; options: ConstCStringPtr; pdfFile: CFURLRef ): OSStatus; external name '_PMWorkflowSubmitPDFWithOptions';
3014 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3015 
3016 
3017 {
3018 *  PMWorkflowSubmitPDFWithSettings()
3019 *
3020 *  Summary:
3021 *    Submit a PDF file for workflow processing.
3022 *
3023 *  Discussion:
3024 *    The print dialog uses this function is conjunction with
3025 *    PMWorkflowGetItems to implement the PDF workflow button. Caller's
3026 *    can use PMWorkflowGetItems to obtain a CFURLRef that can be
3027 *    passed to PMWorkflowPDF or they can create a CFURLRef to another
3028 *    file system item.
3029 *
3030 *  Parameters:
3031 *
3032 *    workflowItem:
3033 *      A file system URL pointing to the workflow item that will
3034 *      handle the PDF file. Here are the different types of workflow
3035 *      items currently supported: Folder alias:   The PDF is moved to
3036 *      the resolved folder. Application or application alias: The
3037 *      application is sent an open event along with a reference to the
3038 *      PDF file. Compiled data fork AppleScript: The applescript is
3039 *      run with an open event along with a reference to the PDF file.
3040 *      executable tool: The tool is run with the following parameters:
3041 *      title options pdfFile
3042 *
3043 *    settings:
3044 *      The prints settings to apply to the PDF.
3045 *
3046 *    pdfFile:
3047 *      A file system URL pointing to the file to be processed by the
3048 *      workflow item.
3049 *
3050 *  Availability:
3051 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3052 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3053 *    Non-Carbon CFM:   not available
3054 *
3055 *  Compatibility:
3056 *  	Not appropriate for CUPS filters, drivers, and backends.
3057 *
3058 }
PMWorkflowSubmitPDFWithSettingsnull3059 function PMWorkflowSubmitPDFWithSettings( workflowItem: CFURLRef; settings: PMPrintSettings; pdfFile: CFURLRef ): OSStatus; external name '_PMWorkflowSubmitPDFWithSettings';
3060 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3061 
3062 (*
3063 //#pragma /mark
3064 //#pragma /mark Job Submission
3065 //#pragma /mark
3066 *)
3067 {
3068 *  PMPrinterPrintWithProvider()
3069 *
3070 *  Summary:
3071 *    Submit print data to a specified printer.
3072 *
3073 *  Discussion:
3074 *    For using EPS data together with other application drawing
3075 *    using Quartz, see PMCGImageCreateWithEPSDataProvider.
3076 *
3077 *  Parameters:
3078 *
3079 *    printer:
3080 *      The printer.
3081 *
3082 *    settings:
3083 *      The print settings for the print job.
3084 *
3085 *    format:
3086 *      The page format specifying the physical page size and orientation on which the document
3087 *      should be printed. This parameter can be NULL.
3088 *
3089 *    mimeType:
3090 *      The mime type of the file to be printed. This parameter can not
3091 *      be NULL. Use PMPrinterPrintWithFile() if auto-typing is desired.
3092 *
3093 *    provider:
3094 *      The data provider that supplies the print data.
3095 *
3096 *  Availability:
3097 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3098 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3099 *    Non-Carbon CFM:   not available
3100 *
3101 *  Compatibility:
3102 *  	Not appropriate for CUPS filters, drivers, and backends.
3103 *
3104 }
PMPrinterPrintWithProvidernull3105 function PMPrinterPrintWithProvider( printer: PMPrinter; settings: PMPrintSettings; format: PMPageFormat; mimeType: CFStringRef; provider: CGDataProviderRef ): OSStatus; external name '_PMPrinterPrintWithProvider';
3106 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3107 
3108 
3109 {
3110 *  PMPrinterPrintWithFile()
3111 *
3112 *  Summary:
3113 *    Submit a file for printing to a specified printer.
3114 *
3115 *  Discussion:
3116 *
3117 *    One reason this function may fail is if the specified printer can
3118 *    not handle the file's mime type. Use PMPrinterGetMimeTypes() to
3119 *    check whether a mime type is supported.
3120 *
3121 *    For using EPS data together with other application drawing
3122 *    using Quartz, see PMCGImageCreateWithEPSDataProvider.
3123 *
3124 *  Parameters:
3125 *
3126 *    printer:
3127 *      The printer.
3128 *
3129 *    settings:
3130 *      The print settings for the print job.
3131 *
3132 *    format:
3133 *      The page format specifying the physical page size and orientation on which the document
3134 *      should be printed. This parameter can be NULL.
3135 *
3136 *    mimeType:
3137 *      The mime type of the file to be printed. If this parameter is
3138 *      NULL then the supplied file will be auto-typed.
3139 *
3140 *    fileURL:
3141 *      A file URL specifying the file to be printed.
3142 *
3143 *  Availability:
3144 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3145 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3146 *    Non-Carbon CFM:   not available
3147 *
3148 *  Compatibility:
3149 *  	Not appropriate for CUPS filters, drivers, and backends.
3150 *
3151 }
PMPrinterPrintWithFilenull3152 function PMPrinterPrintWithFile( printer: PMPrinter; settings: PMPrintSettings; format: PMPageFormat; mimeType: CFStringRef; fileURL: CFURLRef ): OSStatus; external name '_PMPrinterPrintWithFile';
3153 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3154 
3155 {
3156 *  PMPrinterWritePostScriptToURL()
3157 *
3158 *  Summary:
3159 *    Convert an input file of the specified mimeType to printer ready PostScript for the destination printer.
3160 *
3161 *  Discussion:
3162 *
3163 *    The conversion of the input file to PostScript is performed before this function returns. This can take a significant
3164 *    amount of time for longer documents. The caller of PMPrinterWritePostScriptToURL may want to perform this operation
3165 *    on a thread other than the main application thread or fork a separate process for this purpose.
3166 *
3167 *    One reason this function may fail is if conversion from the input mimeType to PostScript cannot be performed.
3168 *
3169 *
3170 *  Parameters:
3171 *
3172 *    printer:
3173 *      The printer for which the printer ready PostScript will be generated.
3174 *
3175 *    settings:
3176 *      The print settings for the print job.
3177 *
3178 *    format:
3179 *      The page format specifying the physical page size and orientation on which the document
3180 *      should be printed.
3181 *
3182 *    mimeType:
3183 *      The mime type of the file to be printed. If NULL, the file is auto-typed.
3184 *
3185 *    sourceFileURL:
3186 *      A file URL specifying the input file to be converted to printer ready PostScript data. Only file based URLs
3187 *      are supported. This file is deleted when the conversion is completed.
3188 *
3189 *    destinationFileURL:
3190 *      A file URL specifying the destination file to be created. If the file already exists it will be overwritten. Only
3191 *      file based URLs are supported.
3192 *
3193 *  Availability:
3194 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
3195 *    CarbonLib:        not available
3196 *    Non-Carbon CFM:   not available
3197 *
3198 *  Compatibility:
3199 *  	Not appropriate for CUPS filters, drivers, and backends.
3200 *
3201 }
PMPrinterWritePostScriptToURLnull3202 function PMPrinterWritePostScriptToURL( printer: PMPrinter; settings: PMPrintSettings; format: PMPageFormat; mimeType: CFStringRef; sourceFileURL: CFURLRef; destinationFileURL: CFURLRef ): OSStatus; external name '_PMPrinterWritePostScriptToURL';
3203 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
3204 
3205 
3206 {
3207 *  PMPrintSettingsToOptions()
3208 *
3209 *  Summary:
3210 *    Convert print settings to a CUPS style options string.
3211 *
3212 *  Parameters:
3213 *
3214 *    settings:
3215 *      The print settings that should be converted to a CUPS style
3216 *      options string.
3217 *
3218 *    options:
3219 *      On exit *'options' will be filled in with a malloc'ed C string
3220 *      describing the passed in print settings. It is the caller's
3221 *      responsibility to free this memory when done with it. If this
3222 *      function fails returning a non-zero error code then *'options'
3223 *      will be set to NULL.
3224 *
3225 *  Availability:
3226 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3227 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3228 *    Non-Carbon CFM:   not available
3229 *
3230 *  Compatibility:
3231 *  	Not appropriate for CUPS filters, drivers, and backends.
3232 *
3233 }
PMPrintSettingsToOptionsnull3234 function PMPrintSettingsToOptions( settings: PMPrintSettings; var options: CStringPtr ): OSStatus; external name '_PMPrintSettingsToOptions';
3235 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3236 
3237 
3238 {
3239 *  PMPrintSettingsToOptionsWithPrinterAndPageFormat()
3240 *
3241 *  Summary:
3242 *    Convert a print settings and page format to a CUPS style options string.
3243 *
3244 *  Parameters:
3245 *
3246 *    settings:
3247 *      The print settings that should be converted to a CUPS style
3248 *      options string. Must not be NULL.
3249 *
3250 *    printer:
3251 *      The printer to use for converting the print settings. Must not be NULL.
3252 *
3253 *    format:
3254 *      The page format for use in creating the cups options. Can be NULL.
3255 *
3256 *    options:
3257 *      On exit *'options' will be filled in with a malloc'd C string
3258 *      describing the passed in print settings and format. It is the caller's
3259 *      responsibility to free this memory when done with it. If this
3260 *      function fails returning a non-zero error code then *'options'
3261 *      will be set to NULL.
3262 *
3263 *  Availability:
3264 *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
3265 *    CarbonLib:        not available
3266 *    Non-Carbon CFM:   not available
3267 *
3268 *  Compatibility:
3269 *  	Not appropriate for CUPS filters, drivers, and backends.
3270 *
3271 }
PMPrintSettingsToOptionsWithPrinterAndPageFormatnull3272 function PMPrintSettingsToOptionsWithPrinterAndPageFormat( settings: PMPrintSettings; printer: PMPrinter; pageFormat: PMPageFormat; var options: CStringPtr ): OSStatus; external name '_PMPrintSettingsToOptionsWithPrinterAndPageFormat';
3273 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
3274 
3275 (*
3276 //#pragma /mark
3277 //#pragma /mark PrinterCommandSupport
3278 //#pragma /mark
3279 *)
3280 
3281 {
3282 *  PMPrinterSendCommand()
3283 *
3284 *  Summary:
3285 *    Submit a command file containing the specified string data to a print queue.
3286 *
3287 *  Parameters:
3288 *
3289 *    printer:
3290 *      The destination print queue.
3291 *
3292 *    commandString:
3293 *      The contents of the command file as a CFStringRef.
3294 *
3295 *    jobTitle:
3296 *      The title of the job associated with the command file. If NULL,
3297 *      a job title will be automatically generated but it may not be
3298 *      meaningful to a user.
3299 *
3300 *    options:
3301 *      A dictionary containing options that apply to the job.
3302 *      This parameter should be NULL; it is reserved for future expansion.
3303 *
3304 *  Availability:
3305 *    Mac OS X:         in version 10.6 and later in ApplicationServices.framework
3306 *    CarbonLib:        not available
3307 *
3308 *  Compatibility:
3309 *  	Not appropriate for CUPS filters, drivers, and backends.
3310 *
3311 }
PMPrinterSendCommandnull3312 function PMPrinterSendCommand( printer: PMPrinter; commandString: CFStringRef; jobTitle: CFStringRef; options: CFDictionaryRef ): OSStatus; external name '_PMPrinterSendCommand';
3313 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
3314 
3315 {
3316 *  PMPrinterCopyState()
3317 *
3318 *  Summary:
3319 *    Copies the current "marker-change-time", "marker-colors",
3320 *    "marker-high-levels", "marker-levels", "marker-low-levels",
3321 *    "marker-message", "marker-names", "marker-types", "printer-state",
3322 *    "printer-state-change-time", "printer-state-message", and
3323 *    "printer-state-reasons" values for a print queue.  These attributes are
3324 *    defined in the "CUPS Implementation of IPP" specification at:
3325 *
3326 *        http://www.cups.org/documentation.php/spec-ipp.html
3327 *        http://localhost:631/help/spec-ipp.html
3328 *
3329 *    Each attribute is returned using the corresponding CoreFoundation
3330 *    data type:
3331 *
3332 *        Attribute                    Type
3333 *        ---------------------------  ------------------------
3334 *        "marker-change-time"         CFDateRef
3335 *        "marker-colors"              CFArrayRef + CFStringRef
3336 *        "marker-high-levels"         CFArrayRef + CFNumberRef
3337 *        "marker-levels"              CFArrayRef + CFNumberRef
3338 *        "marker-low-levels"          CFArrayRef + CFNumberRef
3339 *        "marker-message"             CFStringRef
3340 *        "marker-names"               CFArrayRef + CFStringRef
3341 *        "marker-types"               CFArrayRef + CFStringRef
3342 *        "printer-state"              CFNumberRef
3343 *        "printer-state-change-time"  CFDateRef
3344 *        "printer-state-message"      CFStringRef
3345 *        "printer-state-reasons"      CFArrayRef + CFStringRef
3346 *
3347 *  Localization Considerations:
3348 *
3349 *    The "marker-message" and "printer-state-message" attributes may be
3350 *    localized by the printer driver using the language of the last processed
3351 *    print job.
3352 *
3353 *    The "marker-names" and "printer-state-reasons" attributes are typically
3354 *    English-language keywords that may be localized using the printer's PPD
3355 *    file and CUPS ppdLocalizeMarkerName and ppdLocalizeIPPReason APIs,
3356 *    respectively.
3357 *
3358 *    All other attributes are predefined keywords or values that are not
3359 *    localized.
3360 *
3361 *  Parameters:
3362 *
3363 *    printer:
3364 *      The destination print queue.
3365 *
3366 *    stateDict:
3367 *      A pointer to a CFDictionaryRef variable to hold the values.
3368 *      You must release the dictionary when you are done using it.
3369 *      The dictionary returned is not mutable.
3370 *
3371 *  Availability:
3372 *    Mac OS X:         in version 10.6 and later in ApplicationServices.framework
3373 *    CarbonLib:        not available
3374 *
3375 *  Compatibility:
3376 *  	Not appropriate for CUPS filters, drivers, and backends.
3377 *
3378 }
3379 
PMPrinterCopyStatenull3380 function PMPrinterCopyState( printer: PMPrinter; var stateDict: CFDictionaryRef ): OSStatus; external name '_PMPrinterCopyState';
3381 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
3382 
3383 (*
3384 //#pragma /mark
3385 //#pragma /mark PPD related
3386 //#pragma /mark
3387 *)
3388 {
3389 *  PMCopyAvailablePPDs()
3390 *
3391 *  Summary:
3392 *    Hand back the list of PPDs in the specified PPD domain.
3393 *
3394 *  Parameters:
3395 *
3396 *    domain:
3397 *      The domain to search for PPDs.
3398 *
3399 *    ppds:
3400 *      If this function completes without error, *'ppds' is set to an
3401 *      array of CFURLs. Each CFURL specifies the location of a PPD
3402 *      file or a compressed PPD file. The caller is responsible for
3403 *      releasing the array. If this function returns a non-zero error
3404 *      code then *'ppds' is set to NULL.
3405 *
3406 *  Availability:
3407 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3408 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3409 *    Non-Carbon CFM:   not available
3410 *
3411 *  Compatibility:
3412 *  	Not appropriate for CUPS filters, drivers, and backends.
3413 *
3414 }
PMCopyAvailablePPDsnull3415 function PMCopyAvailablePPDs( domain: PMPPDDomain; var ppds: CFArrayRef ): OSStatus; external name '_PMCopyAvailablePPDs';
3416 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3417 
3418 
3419 {
3420 *  PMCopyLocalizedPPD()
3421 *
3422 *  Summary:
3423 *    Hand back a reference to a localized PPD.
3424 *
3425 *  Parameters:
3426 *
3427 *    ppd:
3428 *      A PPD reference. Typically this is a CFURLRef returned from
3429 *      PMCopyAvailablePPDs().
3430 *
3431 *    localizedPPD:
3432 *      If this function completes without error, *'localizedPPD' will
3433 *      be set to a CFURLRef referencing the PPD that should be used
3434 *      given the current user's language preferences. If this function
3435 *      returns an error then *'localizedPPD' will be set to to NULL.
3436 *
3437 *  Availability:
3438 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3439 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3440 *    Non-Carbon CFM:   not available
3441 *
3442 *  Compatibility:
3443 *  	Not appropriate for CUPS filters, drivers, and backends.
3444 *
3445 }
PMCopyLocalizedPPDnull3446 function PMCopyLocalizedPPD( ppd: CFURLRef; var localizedPPD: CFURLRef ): OSStatus; external name '_PMCopyLocalizedPPD';
3447 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3448 
3449 
3450 {
3451 *  PMCopyPPDData()
3452 *
3453 *  Summary:
3454 *    Hand back the uncompressed PPD data for a PPD or compressed PPD
3455 *    file.
3456 *
3457 *  Parameters:
3458 *
3459 *    ppd:
3460 *      A reference to a PPD or compressed PPD file. This reference is
3461 *      usually obtained from PMCopyAvailablePPDs() or from
3462 *      PMCopyLocalizedPPD().
3463 *
3464 *    data:
3465 *      If this function completes without error then *'data' is set to
3466 *      reference the uncompressed PPD data from the PPD file. If this
3467 *      function returns a non-zero error then *'data is set to NULL.
3468 *
3469 *  Availability:
3470 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
3471 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3472 *    Non-Carbon CFM:   not available
3473 *
3474 *  Compatibility:
3475 *  	Not appropriate for CUPS filters, drivers, and backends.
3476 *
3477 }
PMCopyPPDDatanull3478 function PMCopyPPDData( ppd: CFURLRef; var data: CFDataRef ): OSStatus; external name '_PMCopyPPDData';
3479 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3480 
3481 (*
3482 //#pragma /mark
3483 //#pragma /mark EPS related
3484 //#pragma /mark
3485 *)
3486 {
3487 *  PMCGImageCreateWithEPSDataProvider()
3488 *
3489 *  Summary:
3490 *    Create an image reference that references both the PostScript
3491 *    contents of an EPS file and a preview (proxy) image for that EPS
3492 *    file.
3493 *
3494 *  Discussion:
3495 *    For OS X 10.1.0, this function ignores the passed in data
3496 *    provider. The passed in image reference is retained and then
3497 *    returned. For 10.1.1 and later, then the data provider is used
3498 *    and the returned image reference is different than the passed in
3499 *    image reference, so please be careful with your use of these
3500 *    references. It is likely that the data will not be read from the
3501 *    EPS data provider until well after this function returns. The
3502 *    caller should be careful not to free the underlying EPS data
3503 *    until the provider's release routine is invoked. Similarly the
3504 *    preview image's data may be needed long after you think it should
3505 *    be. Do not free the image data until the image data provider's
3506 *    release data function has been called. To make sure these data
3507 *    providers are properly reference counted, release your reference
3508 *    the EPS data provider and on the EPS image preview when they are
3509 *    no longer needed by your application. For Mac OS X 10.2 and
3510 *    later, the contents of the EPS provider at the time of this call
3511 *    can be dumped to a file if you first do the following, BEFORE
3512 *    running your application.
3513 *
3514 *	  From the command line in terminal:
3515 *		defaults write NSGlobalDomain com.apple.print.eps.testProvider /tmp/dump.eps
3516 *
3517 *	  causes a dump of the EPS data into a file /tmp/dump.eps.
3518 *
3519 *  Parameters:
3520 *
3521 *    epsDataProvider:
3522 *      A Core Graphics data provider that can supply the PostScript
3523 *      contents of the EPS file. Post OS X 10.1, there will be some
3524 *      checking done on the EPS data provided to the
3525 *      PMCGImageCreateWithEPSDataProvider() call. It is important that
3526 *      the EPS data begin with the EPSF required header and bounding
3527 *      box DSC comments.
3528 *
3529 *    epsPreview:
3530 *      A Core Graphics image reference to the proxy image for the EPS
3531 *      file. When the image reference result of this function is
3532 *      rendered on screen or printed to a printer that can not render
3533 *      PostScript this proxy image is drawn instead.
3534 *
3535 *  Result:
3536 *    an image reference capable of rendering either the EPS content or
3537 *    the proxy image depending upon the capabilities of the targeted
3538 *    context.
3539 *
3540 *  Availability:
3541 *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework
3542 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
3543 *    Non-Carbon CFM:   not available
3544 *
3545 *  Compatibility:
3546 *  	Not appropriate for CUPS filters, drivers, and backends.
3547 *
3548 }
PMCGImageCreateWithEPSDataProvidernull3549 function PMCGImageCreateWithEPSDataProvider( epsDataProvider: CGDataProviderRef; epsPreview: CGImageRef ): CGImageRef; external name '_PMCGImageCreateWithEPSDataProvider';
3550 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
3551 
3552 {$endc} {TARGET_OS_MAC}
3553 
3554 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
3555 
3556 end.
3557 {$endc} {not MACOSALLINCLUDE}
3558