~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/univint/PMCore.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
     File:       PMCore.p
 
3
 
 
4
     Contains:   Carbon Printing Manager Interfaces.
 
5
 
 
6
     Version:    Technology: Mac OS X
 
7
                 Release:    Universal Interfaces 3.4.2
 
8
 
 
9
     Copyright:  � 1998-2002 by Apple Computer, Inc., all rights reserved
 
10
 
 
11
     Bugs?:      For bug reports, consult the following page on
 
12
                 the World Wide Web:
 
13
 
 
14
                     http://www.freepascal.org/bugs.html
 
15
 
 
16
}
 
17
 
 
18
 
 
19
{
 
20
    Modified for use with Free Pascal
 
21
    Version 200
 
22
    Please report any bugs to <gpc@microbizz.nl>
 
23
}
 
24
 
 
25
{$mode macpas}
 
26
{$packenum 1}
 
27
{$macro on}
 
28
{$inline on}
 
29
{$CALLING MWPASCAL}
 
30
 
 
31
unit PMCore;
 
32
interface
 
33
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
34
{$setc GAP_INTERFACES_VERSION := $0200}
 
35
 
 
36
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
37
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
38
{$endc}
 
39
 
 
40
{$ifc defined CPUPOWERPC and defined CPUI386}
 
41
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
42
{$endc}
 
43
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
44
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
45
{$endc}
 
46
 
 
47
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
48
        {$setc __ppc__ := 1}
 
49
{$elsec}
 
50
        {$setc __ppc__ := 0}
 
51
{$endc}
 
52
{$ifc not defined __i386__ and defined CPUI386}
 
53
        {$setc __i386__ := 1}
 
54
{$elsec}
 
55
        {$setc __i386__ := 0}
 
56
{$endc}
 
57
 
 
58
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
59
        {$error Conflicting definitions for __ppc__ and __i386__}
 
60
{$endc}
 
61
 
 
62
{$ifc defined __ppc__ and __ppc__}
 
63
        {$setc TARGET_CPU_PPC := TRUE}
 
64
        {$setc TARGET_CPU_X86 := FALSE}
 
65
{$elifc defined __i386__ and __i386__}
 
66
        {$setc TARGET_CPU_PPC := FALSE}
 
67
        {$setc TARGET_CPU_X86 := TRUE}
 
68
{$elsec}
 
69
        {$error Neither __ppc__ nor __i386__ is defined.}
 
70
{$endc}
 
71
{$setc TARGET_CPU_PPC_64 := FALSE}
 
72
 
 
73
{$ifc defined FPC_BIG_ENDIAN}
 
74
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
75
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
76
{$elifc defined FPC_LITTLE_ENDIAN}
 
77
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
78
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
79
{$elsec}
 
80
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
81
{$endc}
 
82
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
83
{$setc CALL_NOT_IN_CARBON := FALSE}
 
84
{$setc OLDROUTINENAMES := FALSE}
 
85
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
86
{$setc OPAQUE_UPP_TYPES := TRUE}
 
87
{$setc OTCARBONAPPLICATION := TRUE}
 
88
{$setc OTKERNEL := FALSE}
 
89
{$setc PM_USE_SESSION_APIS := TRUE}
 
90
{$setc TARGET_API_MAC_CARBON := TRUE}
 
91
{$setc TARGET_API_MAC_OS8 := FALSE}
 
92
{$setc TARGET_API_MAC_OSX := TRUE}
 
93
{$setc TARGET_CARBON := TRUE}
 
94
{$setc TARGET_CPU_68K := FALSE}
 
95
{$setc TARGET_CPU_MIPS := FALSE}
 
96
{$setc TARGET_CPU_SPARC := FALSE}
 
97
{$setc TARGET_OS_MAC := TRUE}
 
98
{$setc TARGET_OS_UNIX := FALSE}
 
99
{$setc TARGET_OS_WIN32 := FALSE}
 
100
{$setc TARGET_RT_MAC_68881 := FALSE}
 
101
{$setc TARGET_RT_MAC_CFM := FALSE}
 
102
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
103
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
104
{$setc TYPE_BOOL := FALSE}
 
105
{$setc TYPE_EXTENDED := FALSE}
 
106
{$setc TYPE_LONGLONG := TRUE}
 
107
uses MacTypes,CFBase,CFArray,MacErrors,Files,CFString,CFURL,Quickdraw,CMApplication,PMDefinitions;
 
108
 
 
109
 
 
110
{$ALIGN MAC68K}
 
111
 
 
112
{$ifc undefined PM_USE_SESSION_APIS}
 
113
{$setc PM_USE_SESSION_APIS := 1}
 
114
{$endc}
 
115
 
 
116
{ Callbacks }
 
117
 
 
118
type
 
119
{$ifc TYPED_FUNCTION_POINTERS}
 
120
        PMIdleProcPtr = procedure;
 
121
{$elsec}
 
122
        PMIdleProcPtr = ProcPtr;
 
123
{$endc}
 
124
 
 
125
{$ifc OPAQUE_UPP_TYPES}
 
126
        PMIdleUPP = ^SInt32; { an opaque UPP }
 
127
{$elsec}
 
128
        PMIdleUPP = UniversalProcPtr;
 
129
{$endc} 
 
130
 
 
131
const
 
132
        uppPMIdleProcInfo = $00000000;
 
133
        {
 
134
         *  NewPMIdleUPP()
 
135
         *  
 
136
         *  Availability:
 
137
         *    Non-Carbon CFM:   not available
 
138
         *    CarbonLib:        in CarbonLib 1.0 and later
 
139
         *    Mac OS X:         in version 10.0 and later
 
140
                }
 
141
function NewPMIdleUPP(userRoutine: PMIdleProcPtr): PMIdleUPP; external name '_NewPMIdleUPP';
 
142
{
 
143
 *  DisposePMIdleUPP()
 
144
 *  
 
145
 *  Availability:
 
146
 *    Non-Carbon CFM:   not available
 
147
 *    CarbonLib:        in CarbonLib 1.0 and later
 
148
 *    Mac OS X:         in version 10.0 and later
 
149
 }
 
150
procedure DisposePMIdleUPP(userUPP: PMIdleUPP); external name '_DisposePMIdleUPP';
 
151
{
 
152
 *  InvokePMIdleUPP()
 
153
 *  
 
154
 *  Availability:
 
155
 *    Non-Carbon CFM:   not available
 
156
 *    CarbonLib:        in CarbonLib 1.0 and later
 
157
 *    Mac OS X:         in version 10.0 and later
 
158
 }
 
159
procedure InvokePMIdleUPP(userRoutine: PMIdleUPP); external name '_InvokePMIdleUPP';
 
160
{$ifc PM_USE_SESSION_APIS}
 
161
{ Session routines }
 
162
{ Session support }
 
163
{
 
164
 *  PMRetain()
 
165
 *  
 
166
 *  Availability:
 
167
 *    Non-Carbon CFM:   not available
 
168
 *    CarbonLib:        in CarbonLib 1.1 and later
 
169
 *    Mac OS X:         in version 10.0 and later
 
170
 }
 
171
function PMRetain(objct: PMObject): OSStatus; external name '_PMRetain';
 
172
 
 
173
{
 
174
 *  PMRelease()
 
175
 *  
 
176
 *  Availability:
 
177
 *    Non-Carbon CFM:   not available
 
178
 *    CarbonLib:        in CarbonLib 1.1 and later
 
179
 *    Mac OS X:         in version 10.0 and later
 
180
 }
 
181
function PMRelease(objct: PMObject): OSStatus; external name '_PMRelease';
 
182
 
 
183
{ Session Print loop }
 
184
{**********************}
 
185
{ A session is created with a refcount of 1. }
 
186
{**********************}
 
187
{
 
188
 *  PMCreateSession()
 
189
 *  
 
190
 *  Availability:
 
191
 *    Non-Carbon CFM:   not available
 
192
 *    CarbonLib:        in CarbonLib 1.1 and later
 
193
 *    Mac OS X:         in version 10.0 and later
 
194
 }
 
195
function PMCreateSession(var printSession: PMPrintSession): OSStatus; external name '_PMCreateSession';
 
196
 
 
197
{ Session PMPageFormat }
 
198
{**********************}
 
199
{ A pageformat is created with a refcount of 1. }
 
200
{**********************}
 
201
{
 
202
 *  PMCreatePageFormat()
 
203
 *  
 
204
 *  Availability:
 
205
 *    Non-Carbon CFM:   not available
 
206
 *    CarbonLib:        in CarbonLib 1.1 and later
 
207
 *    Mac OS X:         in version 10.0 and later
 
208
 }
 
209
function PMCreatePageFormat(var pageFormat: PMPageFormat): OSStatus; external name '_PMCreatePageFormat';
 
210
 
 
211
{
 
212
 *  PMSessionDefaultPageFormat()
 
213
 *  
 
214
 *  Availability:
 
215
 *    Non-Carbon CFM:   not available
 
216
 *    CarbonLib:        in CarbonLib 1.1 and later
 
217
 *    Mac OS X:         in version 10.0 and later
 
218
 }
 
219
function PMSessionDefaultPageFormat(printSession: PMPrintSession; pageFormat: PMPageFormat): OSStatus; external name '_PMSessionDefaultPageFormat';
 
220
 
 
221
{
 
222
 *  PMSessionValidatePageFormat()
 
223
 *  
 
224
 *  Availability:
 
225
 *    Non-Carbon CFM:   not available
 
226
 *    CarbonLib:        in CarbonLib 1.1 and later
 
227
 *    Mac OS X:         in version 10.0 and later
 
228
 }
 
229
function PMSessionValidatePageFormat(printSession: PMPrintSession; pageFormat: PMPageFormat; result: BooleanPtr): OSStatus; external name '_PMSessionValidatePageFormat';
 
230
 
 
231
{ Session PMPrintSettings }
 
232
{**********************}
 
233
{ A printSettings is created with a refcount of 1. }
 
234
{**********************}
 
235
{
 
236
 *  PMCreatePrintSettings()
 
237
 *  
 
238
 *  Availability:
 
239
 *    Non-Carbon CFM:   not available
 
240
 *    CarbonLib:        in CarbonLib 1.1 and later
 
241
 *    Mac OS X:         in version 10.0 and later
 
242
 }
 
243
function PMCreatePrintSettings(var printSettings: PMPrintSettings): OSStatus; external name '_PMCreatePrintSettings';
 
244
 
 
245
{
 
246
 *  PMSessionDefaultPrintSettings()
 
247
 *  
 
248
 *  Availability:
 
249
 *    Non-Carbon CFM:   not available
 
250
 *    CarbonLib:        in CarbonLib 1.1 and later
 
251
 *    Mac OS X:         in version 10.0 and later
 
252
 }
 
253
function PMSessionDefaultPrintSettings(printSession: PMPrintSession; printSettings: PMPrintSettings): OSStatus; external name '_PMSessionDefaultPrintSettings';
 
254
 
 
255
{
 
256
 *  PMSessionValidatePrintSettings()
 
257
 *  
 
258
 *  Availability:
 
259
 *    Non-Carbon CFM:   not available
 
260
 *    CarbonLib:        in CarbonLib 1.1 and later
 
261
 *    Mac OS X:         in version 10.0 and later
 
262
 }
 
263
function PMSessionValidatePrintSettings(printSession: PMPrintSession; printSettings: PMPrintSettings; result: BooleanPtr): OSStatus; external name '_PMSessionValidatePrintSettings';
 
264
 
 
265
{ Session Classic support }
 
266
{
 
267
 *  PMSessionGeneral()
 
268
 *  
 
269
 *  Availability:
 
270
 *    Non-Carbon CFM:   not available
 
271
 *    CarbonLib:        in CarbonLib 1.1 and later
 
272
 *    Mac OS X:         in version 10.0 and later
 
273
 }
 
274
function PMSessionGeneral(printSession: PMPrintSession; pData: Ptr): OSStatus; external name '_PMSessionGeneral';
 
275
 
 
276
{
 
277
 *  PMSessionConvertOldPrintRecord()
 
278
 *  
 
279
 *  Availability:
 
280
 *    Non-Carbon CFM:   not available
 
281
 *    CarbonLib:        in CarbonLib 1.1 and later
 
282
 *    Mac OS X:         in version 10.0 and later
 
283
 }
 
284
function PMSessionConvertOldPrintRecord(printSession: PMPrintSession; printRecordHandle: Handle; var printSettings: PMPrintSettings; var pageFormat: PMPageFormat): OSStatus; external name '_PMSessionConvertOldPrintRecord';
 
285
 
 
286
{
 
287
 *  PMSessionMakeOldPrintRecord()
 
288
 *  
 
289
 *  Availability:
 
290
 *    Non-Carbon CFM:   not available
 
291
 *    CarbonLib:        in CarbonLib 1.1 and later
 
292
 *    Mac OS X:         in version 10.0 and later
 
293
 }
 
294
function PMSessionMakeOldPrintRecord(printSession: PMPrintSession; printSettings: PMPrintSettings; pageFormat: PMPageFormat; var printRecordHandle: Handle): OSStatus; external name '_PMSessionMakeOldPrintRecord';
 
295
 
 
296
{ Session Driver Information }
 
297
{
 
298
 *  PMPrinterGetDescriptionURL()
 
299
 *  
 
300
 *  Availability:
 
301
 *    Non-Carbon CFM:   not available
 
302
 *    CarbonLib:        in CarbonLib 1.1 and later
 
303
 *    Mac OS X:         in version 10.0 and later
 
304
 }
 
305
function PMPrinterGetDescriptionURL(printer: PMPrinter; descriptionType: CFStringRef; var fileURL: CFURLRef): OSStatus; external name '_PMPrinterGetDescriptionURL';
 
306
 
 
307
{
 
308
 *  PMSessionGetCurrentPrinter()
 
309
 *  
 
310
 *  Availability:
 
311
 *    Non-Carbon CFM:   not available
 
312
 *    CarbonLib:        in CarbonLib 1.1 and later
 
313
 *    Mac OS X:         in version 10.0 and later
 
314
 }
 
315
function PMSessionGetCurrentPrinter(printSession: PMPrintSession; var currentPrinter: PMPrinter): OSStatus; external name '_PMSessionGetCurrentPrinter';
 
316
 
 
317
{
 
318
 *  PMPrinterGetLanguageInfo()
 
319
 *  
 
320
 *  Availability:
 
321
 *    Non-Carbon CFM:   not available
 
322
 *    CarbonLib:        in CarbonLib 1.1 and later
 
323
 *    Mac OS X:         in version 10.0 and later
 
324
 }
 
325
function PMPrinterGetLanguageInfo(printer: PMPrinter; var info: PMLanguageInfo): OSStatus; external name '_PMPrinterGetLanguageInfo';
 
326
 
 
327
{
 
328
 *  PMPrinterGetDriverCreator()
 
329
 *  
 
330
 *  Availability:
 
331
 *    Non-Carbon CFM:   not available
 
332
 *    CarbonLib:        in CarbonLib 1.1 and later
 
333
 *    Mac OS X:         in version 10.0 and later
 
334
 }
 
335
function PMPrinterGetDriverCreator(printer: PMPrinter; var creator: OSType): OSStatus; external name '_PMPrinterGetDriverCreator';
 
336
 
 
337
{
 
338
 *  PMPrinterGetDriverReleaseInfo()
 
339
 *  
 
340
 *  Availability:
 
341
 *    Non-Carbon CFM:   not available
 
342
 *    CarbonLib:        in CarbonLib 1.1 and later
 
343
 *    Mac OS X:         in version 10.0 and later
 
344
 }
 
345
function PMPrinterGetDriverReleaseInfo(printer: PMPrinter; var release: VersRec): OSStatus; external name '_PMPrinterGetDriverReleaseInfo';
 
346
 
 
347
{
 
348
 *  PMPrinterGetPrinterResolutionCount()
 
349
 *  
 
350
 *  Availability:
 
351
 *    Non-Carbon CFM:   not available
 
352
 *    CarbonLib:        in CarbonLib 1.1 and later
 
353
 *    Mac OS X:         in version 10.0 and later
 
354
 }
 
355
function PMPrinterGetPrinterResolutionCount(printer: PMPrinter; var count: UInt32): OSStatus; external name '_PMPrinterGetPrinterResolutionCount';
 
356
 
 
357
{
 
358
 *  PMPrinterGetPrinterResolution()
 
359
 *  
 
360
 *  Availability:
 
361
 *    Non-Carbon CFM:   not available
 
362
 *    CarbonLib:        in CarbonLib 1.1 and later
 
363
 *    Mac OS X:         in version 10.0 and later
 
364
 }
 
365
function PMPrinterGetPrinterResolution(printer: PMPrinter; tag: PMTag; var res: PMResolution): OSStatus; external name '_PMPrinterGetPrinterResolution';
 
366
 
 
367
{
 
368
 *  PMPrinterGetIndexedPrinterResolution()
 
369
 *  
 
370
 *  Availability:
 
371
 *    Non-Carbon CFM:   not available
 
372
 *    CarbonLib:        in CarbonLib 1.1 and later
 
373
 *    Mac OS X:         in version 10.0 and later
 
374
 }
 
375
function PMPrinterGetIndexedPrinterResolution(printer: PMPrinter; index: UInt32; var res: PMResolution): OSStatus; external name '_PMPrinterGetIndexedPrinterResolution';
 
376
 
 
377
{
 
378
 *  PMPrinterIsPostScriptCapable()
 
379
 *  
 
380
 *  Availability:
 
381
 *    Non-Carbon CFM:   not available
 
382
 *    CarbonLib:        in CarbonLib 1.6 and later
 
383
 *    Mac OS X:         in version 10.2 and later
 
384
 }
 
385
function PMPrinterIsPostScriptCapable(printer: PMPrinter): boolean; external name '_PMPrinterIsPostScriptCapable';
 
386
 
 
387
{
 
388
 *  PMPrinterGetMakeAndModelName()
 
389
 *  
 
390
 *  Availability:
 
391
 *    Non-Carbon CFM:   not available
 
392
 *    CarbonLib:        in CarbonLib 1.6 and later
 
393
 *    Mac OS X:         in version 10.2 and later
 
394
 }
 
395
function PMPrinterGetMakeAndModelName(printer: PMPrinter; var makeAndModel: CFStringRef): OSStatus; external name '_PMPrinterGetMakeAndModelName';
 
396
 
 
397
{ Session ColorSync & PostScript Support }
 
398
{
 
399
 *  PMSessionEnableColorSync()
 
400
 *  
 
401
 *  Availability:
 
402
 *    Non-Carbon CFM:   not available
 
403
 *    CarbonLib:        in CarbonLib 1.1 and later
 
404
 *    Mac OS X:         in version 10.0 and later
 
405
 }
 
406
function PMSessionEnableColorSync(printSession: PMPrintSession): OSStatus; external name '_PMSessionEnableColorSync';
 
407
 
 
408
{
 
409
 *  PMSessionDisableColorSync()
 
410
 *  
 
411
 *  Availability:
 
412
 *    Non-Carbon CFM:   not available
 
413
 *    CarbonLib:        in CarbonLib 1.1 and later
 
414
 *    Mac OS X:         in version 10.0 and later
 
415
 }
 
416
function PMSessionDisableColorSync(printSession: PMPrintSession): OSStatus; external name '_PMSessionDisableColorSync';
 
417
 
 
418
{
 
419
 *  PMSessionPostScriptBegin()
 
420
 *  
 
421
 *  Availability:
 
422
 *    Non-Carbon CFM:   not available
 
423
 *    CarbonLib:        in CarbonLib 1.1 and later
 
424
 *    Mac OS X:         in version 10.0 and later
 
425
 }
 
426
function PMSessionPostScriptBegin(printSession: PMPrintSession): OSStatus; external name '_PMSessionPostScriptBegin';
 
427
 
 
428
{
 
429
 *  PMSessionPostScriptEnd()
 
430
 *  
 
431
 *  Availability:
 
432
 *    Non-Carbon CFM:   not available
 
433
 *    CarbonLib:        in CarbonLib 1.1 and later
 
434
 *    Mac OS X:         in version 10.0 and later
 
435
 }
 
436
function PMSessionPostScriptEnd(printSession: PMPrintSession): OSStatus; external name '_PMSessionPostScriptEnd';
 
437
 
 
438
{
 
439
 *  PMSessionPostScriptHandle()
 
440
 *  
 
441
 *  Availability:
 
442
 *    Non-Carbon CFM:   not available
 
443
 *    CarbonLib:        in CarbonLib 1.1 and later
 
444
 *    Mac OS X:         in version 10.0 and later
 
445
 }
 
446
function PMSessionPostScriptHandle(printSession: PMPrintSession; psHandle: Handle): OSStatus; external name '_PMSessionPostScriptHandle';
 
447
 
 
448
{
 
449
 *  PMSessionPostScriptData()
 
450
 *  
 
451
 *  Availability:
 
452
 *    Non-Carbon CFM:   not available
 
453
 *    CarbonLib:        in CarbonLib 1.1 and later
 
454
 *    Mac OS X:         in version 10.0 and later
 
455
 }
 
456
function PMSessionPostScriptData(printSession: PMPrintSession; psPtr: Ptr; len: Size): OSStatus; external name '_PMSessionPostScriptData';
 
457
 
 
458
{
 
459
 *  PMSessionPostScriptFile()
 
460
 *  
 
461
 *  Availability:
 
462
 *    Non-Carbon CFM:   not available
 
463
 *    CarbonLib:        in CarbonLib 1.1 and later
 
464
 *    Mac OS X:         in version 10.0 and later
 
465
 }
 
466
function PMSessionPostScriptFile(printSession: PMPrintSession; var psFile: FSSpec): OSStatus; external name '_PMSessionPostScriptFile';
 
467
 
 
468
{
 
469
 *  PMSessionSetPSInjectionData()
 
470
 *  
 
471
 *  Availability:
 
472
 *    Non-Carbon CFM:   not available
 
473
 *    CarbonLib:        in CarbonLib 1.1 and later
 
474
 *    Mac OS X:         in version 10.0 and later
 
475
 }
 
476
function PMSessionSetPSInjectionData(printSession: PMPrintSession; printSettings: PMPrintSettings; injectionDictArray: CFArrayRef): OSStatus; external name '_PMSessionSetPSInjectionData';
 
477
 
 
478
{ Session Error }
 
479
{
 
480
 *  PMSessionError()
 
481
 *  
 
482
 *  Availability:
 
483
 *    Non-Carbon CFM:   not available
 
484
 *    CarbonLib:        in CarbonLib 1.1 and later
 
485
 *    Mac OS X:         in version 10.0 and later
 
486
 }
 
487
function PMSessionError(printSession: PMPrintSession): OSStatus; external name '_PMSessionError';
 
488
 
 
489
{
 
490
 *  PMSessionSetError()
 
491
 *  
 
492
 *  Availability:
 
493
 *    Non-Carbon CFM:   not available
 
494
 *    CarbonLib:        in CarbonLib 1.1 and later
 
495
 *    Mac OS X:         in version 10.0 and later
 
496
 }
 
497
function PMSessionSetError(printSession: PMPrintSession; printError: OSStatus): OSStatus; external name '_PMSessionSetError';
 
498
 
 
499
{ Other Session routines }
 
500
{
 
501
 *  PMSessionGetDocumentFormatGeneration()
 
502
 *  
 
503
 *  Availability:
 
504
 *    Non-Carbon CFM:   not available
 
505
 *    CarbonLib:        in CarbonLib 1.1 and later
 
506
 *    Mac OS X:         in version 10.0 and later
 
507
 }
 
508
function PMSessionGetDocumentFormatGeneration(printSession: PMPrintSession; var docFormats: CFArrayRef): OSStatus; external name '_PMSessionGetDocumentFormatGeneration';
 
509
 
 
510
{
 
511
 *  PMSessionSetDocumentFormatGeneration()
 
512
 *  
 
513
 *  Availability:
 
514
 *    Non-Carbon CFM:   not available
 
515
 *    CarbonLib:        in CarbonLib 1.1 and later
 
516
 *    Mac OS X:         in version 10.0 and later
 
517
 }
 
518
function PMSessionSetDocumentFormatGeneration(printSession: PMPrintSession; docFormat: CFStringRef; graphicsContextTypes: CFArrayRef; options: CFTypeRef): OSStatus; external name '_PMSessionSetDocumentFormatGeneration';
 
519
 
 
520
{
 
521
 *  PMSessionGetDocumentFormatSupported()
 
522
 *  
 
523
 *  Availability:
 
524
 *    Non-Carbon CFM:   not available
 
525
 *    CarbonLib:        in CarbonLib 1.1 and later
 
526
 *    Mac OS X:         in version 10.0 and later
 
527
 }
 
528
function PMSessionGetDocumentFormatSupported(printSession: PMPrintSession; var docFormats: CFArrayRef; limit: UInt32): OSStatus; external name '_PMSessionGetDocumentFormatSupported';
 
529
 
 
530
{
 
531
 *  PMSessionIsDocumentFormatSupported()
 
532
 *  
 
533
 *  Availability:
 
534
 *    Non-Carbon CFM:   not available
 
535
 *    CarbonLib:        in CarbonLib 1.1 and later
 
536
 *    Mac OS X:         in version 10.0 and later
 
537
 }
 
538
function PMSessionIsDocumentFormatSupported(printSession: PMPrintSession; docFormat: CFStringRef; var supported: boolean): OSStatus; external name '_PMSessionIsDocumentFormatSupported';
 
539
 
 
540
{
 
541
 *  PMSessionGetGraphicsContext()
 
542
 *  
 
543
 *  Parameters:
 
544
 *    
 
545
 *    printSession:
 
546
 *      the session
 
547
 *    
 
548
 *    graphicsContextType:
 
549
 *      either kPMGraphicsContextQuickdraw or
 
550
 *      kPMGraphicsContextCoreGraphics
 
551
 *    
 
552
 *    graphicsContext:
 
553
 *      returns a GrafPtr or a CGContextRef
 
554
 *  
 
555
 *  Availability:
 
556
 *    Non-Carbon CFM:   not available
 
557
 *    CarbonLib:        in CarbonLib 1.1 and later
 
558
 *    Mac OS X:         in version 10.0 and later
 
559
 }
 
560
function PMSessionGetGraphicsContext(printSession: PMPrintSession; graphicsContextType: CFStringRef; var graphicsContext: UnivPtr): OSStatus; external name '_PMSessionGetGraphicsContext';
 
561
 
 
562
{
 
563
 *  PMSessionSetIdleProc()
 
564
 *  
 
565
 *  Availability:
 
566
 *    Non-Carbon CFM:   not available
 
567
 *    CarbonLib:        in CarbonLib 1.1 and later
 
568
 *    Mac OS X:         in version 10.0 and later
 
569
 }
 
570
function PMSessionSetIdleProc(printSession: PMPrintSession; idleProc: PMIdleUPP): OSStatus; external name '_PMSessionSetIdleProc';
 
571
 
 
572
{
 
573
 *  PMSessionSetDataInSession()
 
574
 *  
 
575
 *  Availability:
 
576
 *    Non-Carbon CFM:   not available
 
577
 *    CarbonLib:        in CarbonLib 1.1 and later
 
578
 *    Mac OS X:         in version 10.0 and later
 
579
 }
 
580
function PMSessionSetDataInSession(printSession: PMPrintSession; key: CFStringRef; data: CFTypeRef): OSStatus; external name '_PMSessionSetDataInSession';
 
581
 
 
582
{
 
583
 *  PMSessionGetDataFromSession()
 
584
 *  
 
585
 *  Availability:
 
586
 *    Non-Carbon CFM:   not available
 
587
 *    CarbonLib:        in CarbonLib 1.1 and later
 
588
 *    Mac OS X:         in version 10.0 and later
 
589
 }
 
590
function PMSessionGetDataFromSession(printSession: PMPrintSession; key: CFStringRef; var data: CFTypeRef): OSStatus; external name '_PMSessionGetDataFromSession';
 
591
 
 
592
{
 
593
 *  PMSessionCreatePrinterList()
 
594
 *  
 
595
 *  Availability:
 
596
 *    Non-Carbon CFM:   not available
 
597
 *    CarbonLib:        in CarbonLib 1.4 and later
 
598
 *    Mac OS X:         in version 10.1 and later
 
599
 }
 
600
function PMSessionCreatePrinterList(printSession: PMPrintSession; var printerList: CFArrayRef; var currentIndex: CFIndex; var currentPrinter: PMPrinter): OSStatus; external name '_PMSessionCreatePrinterList';
 
601
 
 
602
{
 
603
 *  PMSessionSetCurrentPrinter()
 
604
 *  
 
605
 *  Availability:
 
606
 *    Non-Carbon CFM:   not available
 
607
 *    CarbonLib:        in CarbonLib 1.4 and later
 
608
 *    Mac OS X:         in version 10.1 and later
 
609
 }
 
610
function PMSessionSetCurrentPrinter(session: PMPrintSession; printerName: CFStringRef): OSStatus; external name '_PMSessionSetCurrentPrinter';
 
611
 
 
612
{
 
613
 *  PMSessionSetDestination()
 
614
 *  
 
615
 *  Summary:
 
616
 *    Alter a print session and print settings so that an associated
 
617
 *    print job is sent to the provided destination type in the,
 
618
 *    optional, MIME document format.
 
619
 *  
 
620
 *  Discussion:
 
621
 *    This function is most useful when an application would like to
 
622
 *    write its print output to disk without requiring user
 
623
 *    interaction. The list of MIME types that can be sent to the
 
624
 *    provided destination can be obtained from
 
625
 *    PMSessionCopyOutputFormatList and one of these passed to this
 
626
 *    function.
 
627
 *  
 
628
 *  Parameters:
 
629
 *    
 
630
 *    printSession:
 
631
 *      The session to be used for a print job. The session holds the
 
632
 *      preview setting which can override the destination type in the
 
633
 *      print settings.
 
634
 *    
 
635
 *    printSettings:
 
636
 *      The print settings to be used for a print job. The print
 
637
 *      settings specify whether a job will be directed toward a
 
638
 *      printer or to file. It also holds the requested MIME output
 
639
 *      type.
 
640
 *    
 
641
 *    destType:
 
642
 *      The destiation type for a print job associated with the
 
643
 *      provided print session and print settings. Fax is currently not
 
644
 *      supported, but kPMDestinationPrinter, kPMDestinationFile, and
 
645
 *      kPMDestinationPreview can be set.
 
646
 *    
 
647
 *    destFormat:
 
648
 *      The MIME type to be generated for the provided destination
 
649
 *      type. This parameter can be NULL in which the default format
 
650
 *      for the requested destination type is used. To obtain a list of
 
651
 *      valid formats for a given destiation type, use the function
 
652
 *      PMSessionCopyOutputFormatList.
 
653
 *    
 
654
 *    destLocation:
 
655
 *      Some destination types support a destination location. The
 
656
 *      clearest example is the kPMDestinationFile destination type
 
657
 *      which allows a caller to also supply a file URL specifying
 
658
 *      where the output file is to be created.
 
659
 *    
 
660
 *    SPECIAL_AVAILABILITY_NOTE:
 
661
 *      This routine is available in ApplicationsServices.framework in
 
662
 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
 
663
 *      CFM applications through CarbonLib starting with Mac OS X
 
664
 *      version 10.2 and later.
 
665
 *  
 
666
 *  Availability:
 
667
 *    Non-Carbon CFM:   not available
 
668
 *    CarbonLib:        in CarbonLib 1.5 and later
 
669
 *    Mac OS X:         in version 10.1 and later
 
670
 }
 
671
function PMSessionSetDestination(printSession: PMPrintSession; printSettings: PMPrintSettings; destType: PMDestinationType; destFormat: CFStringRef; destLocation: CFURLRef): OSStatus; external name '_PMSessionSetDestination';
 
672
 
 
673
{
 
674
 *  PMSessionGetDestinationType()
 
675
 *  
 
676
 *  Summary:
 
677
 *    Hand back the destination type that will be used for a print job
 
678
 *    with the specified print settings and print session.
 
679
 *  
 
680
 *  Discussion:
 
681
 *    Currently there are four destination types:
 
682
 *    kPMDestinationPrinter, kPMDestinationFile, kPMDestinationFax and
 
683
 *    kPMDestinationPreview. The first three destination types are
 
684
 *    stored in the print settings. The switch for preview is stored in
 
685
 *    the print session and, if enabled, overrides the destination in
 
686
 *    the print setting. This function is preferred over
 
687
 *    PMGetDestination as the latter does not take a print session
 
688
 *    parameter and therefore can not indicate whether preview has been
 
689
 *    selected as the destination.
 
690
 *  
 
691
 *  Parameters:
 
692
 *    
 
693
 *    printSession:
 
694
 *      The session to be used for a print job. The session holds the
 
695
 *      preview setting which can override the destination type in the
 
696
 *      print settings.
 
697
 *    
 
698
 *    printSettings:
 
699
 *      The print settings to be used for a print job. The print
 
700
 *      settings specify whether a job will be directed toward a
 
701
 *      printer or to file.
 
702
 *    
 
703
 *    destTypeP:
 
704
 *      A pointer to a caller supplied PMDestinationType variable. If
 
705
 *      this function succeeds then *'destTypeP' will be filled in with
 
706
 *      the destination type for a print job that used the specified
 
707
 *      session and print settings. If this function fails, then
 
708
 *      *'destType' will be set to kPMDestinationInvalid.
 
709
 *    
 
710
 *    SPECIAL_AVAILABILITY_NOTE:
 
711
 *      This routine is available in ApplicationsServices.framework in
 
712
 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
 
713
 *      CFM applications through CarbonLib starting with Mac OS X
 
714
 *      version 10.2 and later.
 
715
 *  
 
716
 *  Availability:
 
717
 *    Non-Carbon CFM:   not available
 
718
 *    CarbonLib:        in CarbonLib 1.5 and later
 
719
 *    Mac OS X:         in version 10.1 and later
 
720
 }
 
721
function PMSessionGetDestinationType(printSession: PMPrintSession; printSettings: PMPrintSettings; var destTypeP: PMDestinationType): OSStatus; external name '_PMSessionGetDestinationType';
 
722
 
 
723
{
 
724
 *  PMSessionCopyDestinationFormat()
 
725
 *  
 
726
 *  Summary:
 
727
 *    Hand back the destination output MIME type associated with the
 
728
 *    provided print session and print settings.
 
729
 *  
 
730
 *  Parameters:
 
731
 *    
 
732
 *    printSession:
 
733
 *      A currently open print session.
 
734
 *    
 
735
 *    printSettings:
 
736
 *      The print settings that are to be searched.
 
737
 *    
 
738
 *    destFormatP:
 
739
 *      A pointer to a caller allocated CFStringRef variable. If this
 
740
 *      routine returns noErr then *'destFormatP' will either be a copy
 
741
 *      of a CFStringRef specifying the output format for the print
 
742
 *      job, or NULL indicating that the default output format will be
 
743
 *      used. If this function return an error, then *'destFormatP'
 
744
 *      will be set to NULL.
 
745
 *    
 
746
 *    SPECIAL_AVAILABILITY_NOTE:
 
747
 *      This routine is available in ApplicationsServices.framework in
 
748
 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
 
749
 *      CFM applications through CarbonLib starting with Mac OS X
 
750
 *      version 10.2 and later.
 
751
 *  
 
752
 *  Availability:
 
753
 *    Non-Carbon CFM:   not available
 
754
 *    CarbonLib:        in CarbonLib 1.5 and later
 
755
 *    Mac OS X:         in version 10.1 and later
 
756
 }
 
757
function PMSessionCopyDestinationFormat(printSession: PMPrintSession; printSettings: PMPrintSettings; var destFormatP: CFStringRef): OSStatus; external name '_PMSessionCopyDestinationFormat';
 
758
 
 
759
{
 
760
 *  PMSessionCopyDestinationLocation()
 
761
 *  
 
762
 *  Summary:
 
763
 *    Hand back the URL destination location given a print session and
 
764
 *    print settings.
 
765
 *  
 
766
 *  Discussion:
 
767
 *    Some destination type support a destination location which
 
768
 *    further defines where the output from a pritn job should be sent.
 
769
 *    The kPMDestinationFile destiation type, for example, will use a
 
770
 *    file URL to determine where a new file should be created.
 
771
 *  
 
772
 *  Parameters:
 
773
 *    
 
774
 *    printSession:
 
775
 *      A currently open print session.
 
776
 *    
 
777
 *    printSettings:
 
778
 *      The print settings that are to be searched.
 
779
 *    
 
780
 *    destLocationP:
 
781
 *      A pointer to a caller allocated CFURLRef variable. If this
 
782
 *      routine returns noErr then *'outputFileP' will either be NULL
 
783
 *      indicating that the job is using the default destination
 
784
 *      location for the current destination type or a copy of a
 
785
 *      CFURLRef will be placed in *'destLocationP'. If this function
 
786
 *      returns an error then 'destLocationP' will be set to NULL.
 
787
 *    
 
788
 *    SPECIAL_AVAILABILITY_NOTE:
 
789
 *      This routine is available in ApplicationsServices.framework in
 
790
 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
 
791
 *      CFM applications through CarbonLib starting with Mac OS X
 
792
 *      version 10.2 and later.
 
793
 *  
 
794
 *  Availability:
 
795
 *    Non-Carbon CFM:   not available
 
796
 *    CarbonLib:        in CarbonLib 1.5 and later
 
797
 *    Mac OS X:         in version 10.1 and later
 
798
 }
 
799
function PMSessionCopyDestinationLocation(printSession: PMPrintSession; printSettings: PMPrintSettings; var destLocationP: CFURLRef): OSStatus; external name '_PMSessionCopyDestinationLocation';
 
800
 
 
801
{
 
802
 *  PMSessionCopyOutputFormatList()
 
803
 *  
 
804
 *  Summary:
 
805
 *    Hands back an an array of MIME types describing the possible
 
806
 *    output formats for the printer module associated with the current
 
807
 *    printer.
 
808
 *  
 
809
 *  Parameters:
 
810
 *    
 
811
 *    printSession:
 
812
 *      This session's current printer's printer module will be queried
 
813
 *      for its supported output MIME types.
 
814
 *    
 
815
 *    destType:
 
816
 *      A print job can have one of several possible destination types.
 
817
 *      The list of valid output formats is dependent upon the
 
818
 *      destination type. This parameter specifies destination type of
 
819
 *      interest when retrieving the output formats list.
 
820
 *    
 
821
 *    documentFormatP:
 
822
 *      A pointer to a caller's CFArrayRef variable. If this routine
 
823
 *      completes successfully, then *'documentFormatP' will be set to
 
824
 *      a CFArrayRef containing CFStringRefs. Each CFStringRef in the
 
825
 *      array is a MIME type specifying a type of output that can be
 
826
 *      generated by the printer module associated with the current
 
827
 *      printer.
 
828
 *    
 
829
 *    SPECIAL_AVAILABILITY_NOTE:
 
830
 *      This routine is available in ApplicationsServices.framework in
 
831
 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
 
832
 *      CFM applications through CarbonLib starting with Mac OS X
 
833
 *      version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
 
834
 *      routine returns kPMNotImplemented
 
835
 *  
 
836
 *  Availability:
 
837
 *    Non-Carbon CFM:   not available
 
838
 *    CarbonLib:        in CarbonLib 1.6 and later
 
839
 *    Mac OS X:         in version 10.1 and later
 
840
 }
 
841
function PMSessionCopyOutputFormatList(printSession: PMPrintSession; destType: PMDestinationType; var documentFormatP: CFArrayRef): OSStatus; external name '_PMSessionCopyOutputFormatList';
 
842
 
 
843
 
 
844
{
 
845
 *  PMSessionCreatePageFormatList()
 
846
 *  
 
847
 *  Summary:
 
848
 *    Hand back a list of page format instances. Each page format
 
849
 *    instance describes a paper size available on the specified
 
850
 *    printer.
 
851
 *  
 
852
 *  Parameters:
 
853
 *    
 
854
 *    printSession:
 
855
 *      A currently open print session.
 
856
 *    
 
857
 *    printer:
 
858
 *      The printer whose page size list should be enumerated. To get
 
859
 *      the session's current printer, see PMSessionGetCurrentPrinter().
 
860
 *    
 
861
 *    pageFormatList:
 
862
 *      If this function is successful then noErr will be returned and
 
863
 *      *'pageFormatList' will be set to a newly created CFArray. Each
 
864
 *      element in the array will be a PMPageFormat describing an
 
865
 *      available paper size for the specified printer. If this
 
866
 *      function fails then a non-zero error code will be returned and
 
867
 *      *'pageFormatList' will be set to NULL.
 
868
 *    
 
869
 *    SPECIAL_AVAILABILITY_NOTE:
 
870
 *      This routine is available in ApplicationsServices.framework in
 
871
 *      Mac OS X version 10.1 and later. On Mac OS X it is available to
 
872
 *      CFM applications through CarbonLib starting with Mac OS X
 
873
 *      version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
 
874
 *      routine returns kPMNotImplemented
 
875
 *  
 
876
 *  Availability:
 
877
 *    Non-Carbon CFM:   not available
 
878
 *    CarbonLib:        in CarbonLib 1.6 and later
 
879
 *    Mac OS X:         in version 10.1 and later
 
880
 }
 
881
function PMSessionCreatePageFormatList(printSession: PMPrintSession; printer: PMPrinter; var pageFormatList: CFArrayRef): OSStatus; external name '_PMSessionCreatePageFormatList';
 
882
 
 
883
{
 
884
 * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
 
885
 * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
 
886
 * starting with Mac OS X version 10.2 and later.
 
887
 *
 
888
 * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
 
889
 }
 
890
{
 
891
 *  PMSessionBeginDocumentNoDialog()
 
892
 *  
 
893
 *  Availability:
 
894
 *    Non-Carbon CFM:   not available
 
895
 *    CarbonLib:        in CarbonLib 1.6 and later
 
896
 *    Mac OS X:         in version 10.0 and later
 
897
 }
 
898
function PMSessionBeginDocumentNoDialog(printSession: PMPrintSession; printSettings: PMPrintSettings; pageFormat: PMPageFormat): OSStatus; external name '_PMSessionBeginDocumentNoDialog';
 
899
 
 
900
{
 
901
 * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
 
902
 * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
 
903
 * starting with Mac OS X version 10.2 and later.
 
904
 *
 
905
 * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
 
906
 }
 
907
{
 
908
 *  PMSessionEndDocumentNoDialog()
 
909
 *  
 
910
 *  Availability:
 
911
 *    Non-Carbon CFM:   not available
 
912
 *    CarbonLib:        in CarbonLib 1.6 and later
 
913
 *    Mac OS X:         in version 10.0 and later
 
914
 }
 
915
function PMSessionEndDocumentNoDialog(printSession: PMPrintSession): OSStatus; external name '_PMSessionEndDocumentNoDialog';
 
916
 
 
917
{
 
918
 * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
 
919
 * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
 
920
 * starting with Mac OS X version 10.2 and later.
 
921
 *
 
922
 * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
 
923
 }
 
924
{
 
925
 *  PMSessionBeginPageNoDialog()
 
926
 *  
 
927
 *  Availability:
 
928
 *    Non-Carbon CFM:   not available
 
929
 *    CarbonLib:        in CarbonLib 1.6 and later
 
930
 *    Mac OS X:         in version 10.0 and later
 
931
 }
 
932
function PMSessionBeginPageNoDialog(printSession: PMPrintSession; pageFormat: PMPageFormat; pageFrame: PMRectPtr): OSStatus; external name '_PMSessionBeginPageNoDialog';
 
933
 
 
934
{
 
935
 * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
 
936
 * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
 
937
 * starting with Mac OS X version 10.2 and later.
 
938
 *
 
939
 * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
 
940
 }
 
941
{
 
942
 *  PMSessionEndPageNoDialog()
 
943
 *  
 
944
 *  Availability:
 
945
 *    Non-Carbon CFM:   not available
 
946
 *    CarbonLib:        in CarbonLib 1.6 and later
 
947
 *    Mac OS X:         in version 10.0 and later
 
948
 }
 
949
function PMSessionEndPageNoDialog(printSession: PMPrintSession): OSStatus; external name '_PMSessionEndPageNoDialog';
 
950
 
 
951
{$elsec}
 
952
{
 
953
 *  PMSetIdleProc()
 
954
 *  
 
955
 *  Availability:
 
956
 *    Non-Carbon CFM:   not available
 
957
 *    CarbonLib:        in CarbonLib 1.0 and later
 
958
 *    Mac OS X:         in version 10.0 and later
 
959
 }
 
960
function PMSetIdleProc(idleProc: PMIdleUPP): OSStatus; external name '_PMSetIdleProc';
 
961
 
 
962
{ Print loop }
 
963
{
 
964
 *  PMBegin()
 
965
 *  
 
966
 *  Availability:
 
967
 *    Non-Carbon CFM:   not available
 
968
 *    CarbonLib:        in CarbonLib 1.0 and later
 
969
 *    Mac OS X:         in version 10.0 and later
 
970
 }
 
971
function PMBegin: OSStatus; external name '_PMBegin';
 
972
 
 
973
{
 
974
 *  PMEnd()
 
975
 *  
 
976
 *  Availability:
 
977
 *    Non-Carbon CFM:   not available
 
978
 *    CarbonLib:        in CarbonLib 1.0 and later
 
979
 *    Mac OS X:         in version 10.0 and later
 
980
 }
 
981
function PMEnd: OSStatus; external name '_PMEnd';
 
982
 
 
983
{**********************}
 
984
{  Valid only within a PMBeginPage/PMEndPage block. You should retrieve the printing }
 
985
{  port with this call and set it before imaging a page. }
 
986
{**********************}
 
987
{
 
988
 *  PMGetGrafPtr()
 
989
 *  
 
990
 *  Availability:
 
991
 *    Non-Carbon CFM:   not available
 
992
 *    CarbonLib:        in CarbonLib 1.0 and later
 
993
 *    Mac OS X:         in version 10.0 and later
 
994
 }
 
995
function PMGetGrafPtr(printContext: PMPrintContext; var grafPort: GrafPtr): OSStatus; external name '_PMGetGrafPtr';
 
996
 
 
997
{ PMPageFormat }
 
998
{
 
999
 *  PMNewPageFormat()
 
1000
 *  
 
1001
 *  Availability:
 
1002
 *    Non-Carbon CFM:   not available
 
1003
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1004
 *    Mac OS X:         in version 10.0 and later
 
1005
 }
 
1006
function PMNewPageFormat(var pageFormat: PMPageFormat): OSStatus; external name '_PMNewPageFormat';
 
1007
 
 
1008
{
 
1009
 *  PMDisposePageFormat()
 
1010
 *  
 
1011
 *  Availability:
 
1012
 *    Non-Carbon CFM:   not available
 
1013
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1014
 *    Mac OS X:         in version 10.0 and later
 
1015
 }
 
1016
function PMDisposePageFormat(pageFormat: PMPageFormat): OSStatus; external name '_PMDisposePageFormat';
 
1017
 
 
1018
{
 
1019
 *  PMDefaultPageFormat()
 
1020
 *  
 
1021
 *  Availability:
 
1022
 *    Non-Carbon CFM:   not available
 
1023
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1024
 *    Mac OS X:         in version 10.0 and later
 
1025
 }
 
1026
function PMDefaultPageFormat(pageFormat: PMPageFormat): OSStatus; external name '_PMDefaultPageFormat';
 
1027
 
 
1028
{
 
1029
 *  PMValidatePageFormat()
 
1030
 *  
 
1031
 *  Availability:
 
1032
 *    Non-Carbon CFM:   not available
 
1033
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1034
 *    Mac OS X:         in version 10.0 and later
 
1035
 }
 
1036
function PMValidatePageFormat(pageFormat: PMPageFormat; var result: boolean): OSStatus; external name '_PMValidatePageFormat';
 
1037
 
 
1038
{ PMPrintSettings }
 
1039
{
 
1040
 *  PMNewPrintSettings()
 
1041
 *  
 
1042
 *  Availability:
 
1043
 *    Non-Carbon CFM:   not available
 
1044
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1045
 *    Mac OS X:         in version 10.0 and later
 
1046
 }
 
1047
function PMNewPrintSettings(var printSettings: PMPrintSettings): OSStatus; external name '_PMNewPrintSettings';
 
1048
 
 
1049
{
 
1050
 *  PMDisposePrintSettings()
 
1051
 *  
 
1052
 *  Availability:
 
1053
 *    Non-Carbon CFM:   not available
 
1054
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1055
 *    Mac OS X:         in version 10.0 and later
 
1056
 }
 
1057
function PMDisposePrintSettings(printSettings: PMPrintSettings): OSStatus; external name '_PMDisposePrintSettings';
 
1058
 
 
1059
{
 
1060
 *  PMDefaultPrintSettings()
 
1061
 *  
 
1062
 *  Availability:
 
1063
 *    Non-Carbon CFM:   not available
 
1064
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1065
 *    Mac OS X:         in version 10.0 and later
 
1066
 }
 
1067
function PMDefaultPrintSettings(printSettings: PMPrintSettings): OSStatus; external name '_PMDefaultPrintSettings';
 
1068
 
 
1069
{
 
1070
 *  PMValidatePrintSettings()
 
1071
 *  
 
1072
 *  Availability:
 
1073
 *    Non-Carbon CFM:   not available
 
1074
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1075
 *    Mac OS X:         in version 10.0 and later
 
1076
 }
 
1077
function PMValidatePrintSettings(printSettings: PMPrintSettings; var result: boolean): OSStatus; external name '_PMValidatePrintSettings';
 
1078
 
 
1079
{ Classic Support }
 
1080
{
 
1081
 *  PMGeneral()
 
1082
 *  
 
1083
 *  Availability:
 
1084
 *    Non-Carbon CFM:   not available
 
1085
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1086
 *    Mac OS X:         in version 10.0 and later
 
1087
 }
 
1088
function PMGeneral(pData: Ptr): OSStatus; external name '_PMGeneral';
 
1089
 
 
1090
{
 
1091
 *  PMConvertOldPrintRecord()
 
1092
 *  
 
1093
 *  Availability:
 
1094
 *    Non-Carbon CFM:   not available
 
1095
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1096
 *    Mac OS X:         in version 10.0 and later
 
1097
 }
 
1098
function PMConvertOldPrintRecord(printRecordHandle: Handle; var printSettings: PMPrintSettings; var pageFormat: PMPageFormat): OSStatus; external name '_PMConvertOldPrintRecord';
 
1099
 
 
1100
{
 
1101
 *  PMMakeOldPrintRecord()
 
1102
 *  
 
1103
 *  Availability:
 
1104
 *    Non-Carbon CFM:   not available
 
1105
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1106
 *    Mac OS X:         in version 10.0 and later
 
1107
 }
 
1108
function PMMakeOldPrintRecord(printSettings: PMPrintSettings; pageFormat: PMPageFormat; var printRecordHandle: Handle): OSStatus; external name '_PMMakeOldPrintRecord';
 
1109
 
 
1110
{ Driver Information }
 
1111
{
 
1112
 *  PMIsPostScriptDriver()
 
1113
 *  
 
1114
 *  Availability:
 
1115
 *    Non-Carbon CFM:   not available
 
1116
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1117
 *    Mac OS X:         in version 10.0 and later
 
1118
 }
 
1119
function PMIsPostScriptDriver(var isPostScript: boolean): OSStatus; external name '_PMIsPostScriptDriver';
 
1120
 
 
1121
{
 
1122
 *  PMGetLanguageInfo()
 
1123
 *  
 
1124
 *  Availability:
 
1125
 *    Non-Carbon CFM:   not available
 
1126
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1127
 *    Mac OS X:         in version 10.0 and later
 
1128
 }
 
1129
function PMGetLanguageInfo(var info: PMLanguageInfo): OSStatus; external name '_PMGetLanguageInfo';
 
1130
 
 
1131
{
 
1132
 *  PMGetDriverCreator()
 
1133
 *  
 
1134
 *  Availability:
 
1135
 *    Non-Carbon CFM:   not available
 
1136
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1137
 *    Mac OS X:         in version 10.0 and later
 
1138
 }
 
1139
function PMGetDriverCreator(var creator: OSType): OSStatus; external name '_PMGetDriverCreator';
 
1140
 
 
1141
{
 
1142
 *  PMGetDriverReleaseInfo()
 
1143
 *  
 
1144
 *  Availability:
 
1145
 *    Non-Carbon CFM:   not available
 
1146
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1147
 *    Mac OS X:         in version 10.0 and later
 
1148
 }
 
1149
function PMGetDriverReleaseInfo(var release: VersRec): OSStatus; external name '_PMGetDriverReleaseInfo';
 
1150
 
 
1151
{
 
1152
 *  PMGetPrinterResolutionCount()
 
1153
 *  
 
1154
 *  Availability:
 
1155
 *    Non-Carbon CFM:   not available
 
1156
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1157
 *    Mac OS X:         in version 10.0 and later
 
1158
 }
 
1159
function PMGetPrinterResolutionCount(var count: UInt32): OSStatus; external name '_PMGetPrinterResolutionCount';
 
1160
 
 
1161
{
 
1162
 *  PMGetPrinterResolution()
 
1163
 *  
 
1164
 *  Availability:
 
1165
 *    Non-Carbon CFM:   not available
 
1166
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1167
 *    Mac OS X:         in version 10.0 and later
 
1168
 }
 
1169
function PMGetPrinterResolution(tag: PMTag; var res: PMResolution): OSStatus; external name '_PMGetPrinterResolution';
 
1170
 
 
1171
{
 
1172
 *  PMGetIndexedPrinterResolution()
 
1173
 *  
 
1174
 *  Availability:
 
1175
 *    Non-Carbon CFM:   not available
 
1176
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1177
 *    Mac OS X:         in version 10.0 and later
 
1178
 }
 
1179
function PMGetIndexedPrinterResolution(index: UInt32; var res: PMResolution): OSStatus; external name '_PMGetIndexedPrinterResolution';
 
1180
 
 
1181
{**********************}
 
1182
{  PMEnableColorSync and PMDisableColorSync are valid within }
 
1183
{  BeginPage/EndPage block }
 
1184
{**********************}
 
1185
{ ColorSync & PostScript Support }
 
1186
{
 
1187
 *  PMEnableColorSync()
 
1188
 *  
 
1189
 *  Availability:
 
1190
 *    Non-Carbon CFM:   not available
 
1191
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1192
 *    Mac OS X:         in version 10.0 and later
 
1193
 }
 
1194
function PMEnableColorSync: OSStatus; external name '_PMEnableColorSync';
 
1195
 
 
1196
{
 
1197
 *  PMDisableColorSync()
 
1198
 *  
 
1199
 *  Availability:
 
1200
 *    Non-Carbon CFM:   not available
 
1201
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1202
 *    Mac OS X:         in version 10.0 and later
 
1203
 }
 
1204
function PMDisableColorSync: OSStatus; external name '_PMDisableColorSync';
 
1205
 
 
1206
{**********************}
 
1207
{  The PMPostScriptxxx calls are valid within a }
 
1208
{  BeginPage/EndPage block }
 
1209
{**********************}
 
1210
{
 
1211
 *  PMPostScriptBegin()
 
1212
 *  
 
1213
 *  Availability:
 
1214
 *    Non-Carbon CFM:   not available
 
1215
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1216
 *    Mac OS X:         in version 10.0 and later
 
1217
 }
 
1218
function PMPostScriptBegin: OSStatus; external name '_PMPostScriptBegin';
 
1219
 
 
1220
{
 
1221
 *  PMPostScriptEnd()
 
1222
 *  
 
1223
 *  Availability:
 
1224
 *    Non-Carbon CFM:   not available
 
1225
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1226
 *    Mac OS X:         in version 10.0 and later
 
1227
 }
 
1228
function PMPostScriptEnd: OSStatus; external name '_PMPostScriptEnd';
 
1229
 
 
1230
{**********************}
 
1231
{  These PMPostScriptxxx calls are valid within a }
 
1232
{  PMPostScriptBegin/PMPostScriptEnd block }
 
1233
{**********************}
 
1234
{
 
1235
 *  PMPostScriptHandle()
 
1236
 *  
 
1237
 *  Availability:
 
1238
 *    Non-Carbon CFM:   not available
 
1239
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1240
 *    Mac OS X:         in version 10.0 and later
 
1241
 }
 
1242
function PMPostScriptHandle(psHandle: Handle): OSStatus; external name '_PMPostScriptHandle';
 
1243
 
 
1244
{
 
1245
 *  PMPostScriptData()
 
1246
 *  
 
1247
 *  Availability:
 
1248
 *    Non-Carbon CFM:   not available
 
1249
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1250
 *    Mac OS X:         in version 10.0 and later
 
1251
 }
 
1252
function PMPostScriptData(psPtr: Ptr; len: Size): OSStatus; external name '_PMPostScriptData';
 
1253
 
 
1254
{
 
1255
 *  PMPostScriptFile()
 
1256
 *  
 
1257
 *  Availability:
 
1258
 *    Non-Carbon CFM:   not available
 
1259
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1260
 *    Mac OS X:         in version 10.0 and later
 
1261
 }
 
1262
function PMPostScriptFile(var psFile: FSSpec): OSStatus; external name '_PMPostScriptFile';
 
1263
 
 
1264
{ Error }
 
1265
{
 
1266
 *  PMError()
 
1267
 *  
 
1268
 *  Availability:
 
1269
 *    Non-Carbon CFM:   not available
 
1270
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1271
 *    Mac OS X:         in version 10.0 and later
 
1272
 }
 
1273
function PMError: OSStatus; external name '_PMError';
 
1274
 
 
1275
{
 
1276
 *  PMSetError()
 
1277
 *  
 
1278
 *  Availability:
 
1279
 *    Non-Carbon CFM:   not available
 
1280
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1281
 *    Mac OS X:         in version 10.0 and later
 
1282
 }
 
1283
function PMSetError(printError: OSStatus): OSStatus; external name '_PMSetError';
 
1284
 
 
1285
{$endc}  {PM_USE_SESSION_APIS}
 
1286
 
 
1287
{ PMPageFormat }
 
1288
{
 
1289
 *  PMCopyPageFormat()
 
1290
 *  
 
1291
 *  Availability:
 
1292
 *    Non-Carbon CFM:   not available
 
1293
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1294
 *    Mac OS X:         in version 10.0 and later
 
1295
 }
 
1296
function PMCopyPageFormat(formatSrc: PMPageFormat; formatDest: PMPageFormat): OSStatus; external name '_PMCopyPageFormat';
 
1297
 
 
1298
{**********************}
 
1299
{  Flattening a page format should only be necessary if you intend to preserve }
 
1300
{  the object settings along with a document. A page format will persist outside of a }
 
1301
{  PMBegin/PMEnd block. This will allow you to use any accessors on the object without }
 
1302
{  the need to flatten and unflatten. Keep in mind accessors make no assumption }
 
1303
{  on the validity of the value you set. This can only be done thru PMValidatePageFormat }
 
1304
{  in a PMBegin/PMEnd block or with PMSessionValidatePageFormat with a valid session. }
 
1305
{  It is your responsibility for disposing of the handle. }
 
1306
{**********************}
 
1307
{
 
1308
 *  PMFlattenPageFormat()
 
1309
 *  
 
1310
 *  Availability:
 
1311
 *    Non-Carbon CFM:   not available
 
1312
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1313
 *    Mac OS X:         in version 10.0 and later
 
1314
 }
 
1315
function PMFlattenPageFormat(pageFormat: PMPageFormat; var flatFormat: Handle): OSStatus; external name '_PMFlattenPageFormat';
 
1316
 
 
1317
{
 
1318
 *  PMUnflattenPageFormat()
 
1319
 *  
 
1320
 *  Availability:
 
1321
 *    Non-Carbon CFM:   not available
 
1322
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1323
 *    Mac OS X:         in version 10.0 and later
 
1324
 }
 
1325
function PMUnflattenPageFormat(flatFormat: Handle; var pageFormat: PMPageFormat): OSStatus; external name '_PMUnflattenPageFormat';
 
1326
 
 
1327
{ PMPageFormat Accessors }
 
1328
{**********************}
 
1329
{ PMSetxxx calls only saves the value inside the printing object. They make no assumption on the }
 
1330
{ validity of the value. This should be done using PMValidatePageFormat/PMSessionValidatePageFormat }
 
1331
{ Any dependant settings are also updated during a validate call. }
 
1332
{ For example: }
 
1333
{ PMGetAdjustedPaperRect - returns a rect of a certain size }
 
1334
{ PMSetScale( aPageFormat, 500.0 )  }
 
1335
{ PMGetAdjustedPaperRect - returns the SAME rect as the first call  }
 
1336
{}
 
1337
{ PMGetAdjustedPaperRect - returns a rect of a certain size }
 
1338
{ PMSetScale( aPageFormat, 500.0 ) }
 
1339
{ PMValidatePageFormat or PMSessionValidatePageFormat }
 
1340
{ PMGetAdjustedPaperRect - returns a rect thats scaled 500% from the first call }
 
1341
{**********************}
 
1342
{
 
1343
 *  PMGetPageFormatExtendedData()
 
1344
 *  
 
1345
 *  Availability:
 
1346
 *    Non-Carbon CFM:   not available
 
1347
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1348
 *    Mac OS X:         in version 10.0 and later
 
1349
 }
 
1350
function PMGetPageFormatExtendedData(pageFormat: PMPageFormat; dataID: OSType; var size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMGetPageFormatExtendedData';
 
1351
 
 
1352
{
 
1353
 *  PMSetPageFormatExtendedData()
 
1354
 *  
 
1355
 *  Availability:
 
1356
 *    Non-Carbon CFM:   not available
 
1357
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1358
 *    Mac OS X:         in version 10.0 and later
 
1359
 }
 
1360
function PMSetPageFormatExtendedData(pageFormat: PMPageFormat; dataID: OSType; size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMSetPageFormatExtendedData';
 
1361
 
 
1362
{**********************}
 
1363
{  A value of 100.0 means 100% (no scaling). 50.0 means 50% scaling }
 
1364
{**********************}
 
1365
{
 
1366
 *  PMGetScale()
 
1367
 *  
 
1368
 *  Availability:
 
1369
 *    Non-Carbon CFM:   not available
 
1370
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1371
 *    Mac OS X:         in version 10.0 and later
 
1372
 }
 
1373
function PMGetScale(pageFormat: PMPageFormat; var scale: Double): OSStatus; external name '_PMGetScale';
 
1374
 
 
1375
{
 
1376
 *  PMSetScale()
 
1377
 *  
 
1378
 *  Availability:
 
1379
 *    Non-Carbon CFM:   not available
 
1380
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1381
 *    Mac OS X:         in version 10.0 and later
 
1382
 }
 
1383
function PMSetScale(pageFormat: PMPageFormat; scale: Double): OSStatus; external name '_PMSetScale';
 
1384
 
 
1385
{**********************}
 
1386
{  This is the drawing resolution of an app. This should not be confused with }
 
1387
{  the resolution of the printer. You can call PMGetPrinterResolution to see }
 
1388
{  what resolutions are avaliable for the current printer. }
 
1389
{**********************}
 
1390
{
 
1391
 *  PMGetResolution()
 
1392
 *  
 
1393
 *  Availability:
 
1394
 *    Non-Carbon CFM:   not available
 
1395
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1396
 *    Mac OS X:         in version 10.0 and later
 
1397
 }
 
1398
function PMGetResolution(pageFormat: PMPageFormat; var res: PMResolution): OSStatus; external name '_PMGetResolution';
 
1399
 
 
1400
{
 
1401
 *  PMSetResolution()
 
1402
 *  
 
1403
 *  Availability:
 
1404
 *    Non-Carbon CFM:   not available
 
1405
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1406
 *    Mac OS X:         in version 10.0 and later
 
1407
 }
 
1408
function PMSetResolution(pageFormat: PMPageFormat; const (*var*) res: PMResolution): OSStatus; external name '_PMSetResolution';
 
1409
 
 
1410
{**********************}
 
1411
{  This is the physical size of the paper without regard to resolution, orientation }
 
1412
{  or scaling. It is returned as a 72dpi value. }
 
1413
{**********************}
 
1414
{
 
1415
 *  PMGetPhysicalPaperSize()
 
1416
 *  
 
1417
 *  Availability:
 
1418
 *    Non-Carbon CFM:   not available
 
1419
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1420
 *    Mac OS X:         in version 10.0 and later
 
1421
 }
 
1422
function PMGetPhysicalPaperSize(pageFormat: PMPageFormat; var paperSize: PMRect): OSStatus; external name '_PMGetPhysicalPaperSize';
 
1423
 
 
1424
{
 
1425
 *  PMSetPhysicalPaperSize()
 
1426
 *  
 
1427
 *  Availability:
 
1428
 *    Non-Carbon CFM:   not available
 
1429
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1430
 *    Mac OS X:         in version 10.0 and later
 
1431
 }
 
1432
function PMSetPhysicalPaperSize(pageFormat: PMPageFormat; const (*var*) paperSize: PMRect): OSStatus; external name '_PMSetPhysicalPaperSize';
 
1433
 
 
1434
{**********************}
 
1435
{  This is the physical size of the page without regard to resolution, orientation }
 
1436
{  or scaling. It is returned as a 72dpi value. }
 
1437
{**********************}
 
1438
{
 
1439
 *  PMGetPhysicalPageSize()
 
1440
 *  
 
1441
 *  Availability:
 
1442
 *    Non-Carbon CFM:   not available
 
1443
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1444
 *    Mac OS X:         in version 10.0 and later
 
1445
 }
 
1446
function PMGetPhysicalPageSize(pageFormat: PMPageFormat; var pageSize: PMRect): OSStatus; external name '_PMGetPhysicalPageSize';
 
1447
 
 
1448
{
 
1449
 *  PMGetAdjustedPaperRect()
 
1450
 *  
 
1451
 *  Availability:
 
1452
 *    Non-Carbon CFM:   not available
 
1453
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1454
 *    Mac OS X:         in version 10.0 and later
 
1455
 }
 
1456
function PMGetAdjustedPaperRect(pageFormat: PMPageFormat; var paperRect: PMRect): OSStatus; external name '_PMGetAdjustedPaperRect';
 
1457
 
 
1458
{
 
1459
 *  PMGetAdjustedPageRect()
 
1460
 *  
 
1461
 *  Availability:
 
1462
 *    Non-Carbon CFM:   not available
 
1463
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1464
 *    Mac OS X:         in version 10.0 and later
 
1465
 }
 
1466
function PMGetAdjustedPageRect(pageFormat: PMPageFormat; var pageRect: PMRect): OSStatus; external name '_PMGetAdjustedPageRect';
 
1467
 
 
1468
{
 
1469
 *  PMGetUnadjustedPaperRect()
 
1470
 *  
 
1471
 *  Availability:
 
1472
 *    Non-Carbon CFM:   not available
 
1473
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1474
 *    Mac OS X:         in version 10.0 and later
 
1475
 }
 
1476
function PMGetUnadjustedPaperRect(pageFormat: PMPageFormat; var paperRect: PMRect): OSStatus; external name '_PMGetUnadjustedPaperRect';
 
1477
 
 
1478
{
 
1479
 *  PMSetUnadjustedPaperRect()
 
1480
 *  
 
1481
 *  Availability:
 
1482
 *    Non-Carbon CFM:   not available
 
1483
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1484
 *    Mac OS X:         in version 10.0 and later
 
1485
 }
 
1486
function PMSetUnadjustedPaperRect(pageFormat: PMPageFormat; const (*var*) paperRect: PMRect): OSStatus; external name '_PMSetUnadjustedPaperRect';
 
1487
 
 
1488
{
 
1489
 *  PMGetUnadjustedPageRect()
 
1490
 *  
 
1491
 *  Availability:
 
1492
 *    Non-Carbon CFM:   not available
 
1493
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1494
 *    Mac OS X:         in version 10.0 and later
 
1495
 }
 
1496
function PMGetUnadjustedPageRect(pageFormat: PMPageFormat; var pageRect: PMRect): OSStatus; external name '_PMGetUnadjustedPageRect';
 
1497
 
 
1498
{
 
1499
 *  PMSetAdjustedPageRect()
 
1500
 *  
 
1501
 *  Availability:
 
1502
 *    Non-Carbon CFM:   not available
 
1503
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1504
 *    Mac OS X:         in version 10.0 and later
 
1505
 }
 
1506
function PMSetAdjustedPageRect(pageFormat: PMPageFormat; const (*var*) pageRect: PMRect): OSStatus; external name '_PMSetAdjustedPageRect';
 
1507
 
 
1508
{
 
1509
 *  PMGetOrientation()
 
1510
 *  
 
1511
 *  Availability:
 
1512
 *    Non-Carbon CFM:   not available
 
1513
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1514
 *    Mac OS X:         in version 10.0 and later
 
1515
 }
 
1516
function PMGetOrientation(pageFormat: PMPageFormat; var orientation: PMOrientation): OSStatus; external name '_PMGetOrientation';
 
1517
 
 
1518
{
 
1519
 *  PMSetOrientation()
 
1520
 *  
 
1521
 *  Availability:
 
1522
 *    Non-Carbon CFM:   not available
 
1523
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1524
 *    Mac OS X:         in version 10.0 and later
 
1525
 }
 
1526
function PMSetOrientation(pageFormat: PMPageFormat; orientation: PMOrientation; lock: boolean): OSStatus; external name '_PMSetOrientation';
 
1527
 
 
1528
{ PMPrintSettings }
 
1529
{
 
1530
 *  PMCopyPrintSettings()
 
1531
 *  
 
1532
 *  Availability:
 
1533
 *    Non-Carbon CFM:   not available
 
1534
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1535
 *    Mac OS X:         in version 10.0 and later
 
1536
 }
 
1537
function PMCopyPrintSettings(settingSrc: PMPrintSettings; settingDest: PMPrintSettings): OSStatus; external name '_PMCopyPrintSettings';
 
1538
 
 
1539
{**********************}
 
1540
{  Flattening a print settings should only be necessary if you intend to preserve }
 
1541
{  the object settings along with a document. A print settings will persist outside of a }
 
1542
{  PMBegin/PMEnd block. This allows you to use any accessors on the object without }
 
1543
{  the need to flatten and unflatten. Keep in mind the accessors make no assumption }
 
1544
{  on the validity of the value. This can only be done thru PMValidatePrintSettings }
 
1545
{  in a PMBegin/PMEnd block or with PMSessionValidatePrintSettings with a valid session. }
 
1546
{  It is your responsibility for disposing of the handle. }
 
1547
{**********************}
 
1548
{
 
1549
 *  PMFlattenPrintSettings()
 
1550
 *  
 
1551
 *  Availability:
 
1552
 *    Non-Carbon CFM:   not available
 
1553
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1554
 *    Mac OS X:         in version 10.0 and later
 
1555
 }
 
1556
function PMFlattenPrintSettings(printSettings: PMPrintSettings; var flatSettings: Handle): OSStatus; external name '_PMFlattenPrintSettings';
 
1557
 
 
1558
{
 
1559
 *  PMUnflattenPrintSettings()
 
1560
 *  
 
1561
 *  Availability:
 
1562
 *    Non-Carbon CFM:   not available
 
1563
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1564
 *    Mac OS X:         in version 10.0 and later
 
1565
 }
 
1566
function PMUnflattenPrintSettings(flatSettings: Handle; var printSettings: PMPrintSettings): OSStatus; external name '_PMUnflattenPrintSettings';
 
1567
 
 
1568
{ PMPrintSettings Accessors }
 
1569
{
 
1570
 *  PMGetPrintSettingsExtendedData()
 
1571
 *  
 
1572
 *  Availability:
 
1573
 *    Non-Carbon CFM:   not available
 
1574
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1575
 *    Mac OS X:         in version 10.0 and later
 
1576
 }
 
1577
function PMGetPrintSettingsExtendedData(printSettings: PMPrintSettings; dataID: OSType; var size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMGetPrintSettingsExtendedData';
 
1578
 
 
1579
{
 
1580
 *  PMSetPrintSettingsExtendedData()
 
1581
 *  
 
1582
 *  Availability:
 
1583
 *    Non-Carbon CFM:   not available
 
1584
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1585
 *    Mac OS X:         in version 10.0 and later
 
1586
 }
 
1587
function PMSetPrintSettingsExtendedData(printSettings: PMPrintSettings; dataID: OSType; size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMSetPrintSettingsExtendedData';
 
1588
 
 
1589
{
 
1590
 *  PMGetDestination()
 
1591
 *  
 
1592
 *  Availability:
 
1593
 *    Non-Carbon CFM:   not available
 
1594
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1595
 *    Mac OS X:         in version 10.0 and later
 
1596
 }
 
1597
function PMGetDestination(printSettings: PMPrintSettings; var destType: PMDestinationType; var fileURL: CFURLRef): OSStatus; external name '_PMGetDestination';
 
1598
 
 
1599
{
 
1600
 *  PMGetJobName()
 
1601
 *  
 
1602
 *  Availability:
 
1603
 *    Non-Carbon CFM:   not available
 
1604
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1605
 *    Mac OS X:         in version 10.0 and later
 
1606
 }
 
1607
function PMGetJobName(printSettings: PMPrintSettings; name: StringPtr): OSStatus; external name '_PMGetJobName';
 
1608
 
 
1609
{
 
1610
 *  PMSetJobName()
 
1611
 *  
 
1612
 *  Availability:
 
1613
 *    Non-Carbon CFM:   not available
 
1614
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1615
 *    Mac OS X:         in version 10.0 and later
 
1616
 }
 
1617
function PMSetJobName(printSettings: PMPrintSettings; const (*var*) name: Str255): OSStatus; external name '_PMSetJobName';
 
1618
 
 
1619
{
 
1620
 *  PMGetCopies()
 
1621
 *  
 
1622
 *  Availability:
 
1623
 *    Non-Carbon CFM:   not available
 
1624
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1625
 *    Mac OS X:         in version 10.0 and later
 
1626
 }
 
1627
function PMGetCopies(printSettings: PMPrintSettings; var copies: UInt32): OSStatus; external name '_PMGetCopies';
 
1628
 
 
1629
{
 
1630
 *  PMSetCopies()
 
1631
 *  
 
1632
 *  Availability:
 
1633
 *    Non-Carbon CFM:   not available
 
1634
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1635
 *    Mac OS X:         in version 10.0 and later
 
1636
 }
 
1637
function PMSetCopies(printSettings: PMPrintSettings; copies: UInt32; lock: boolean): OSStatus; external name '_PMSetCopies';
 
1638
 
 
1639
{
 
1640
 *  PMGetFirstPage()
 
1641
 *  
 
1642
 *  Availability:
 
1643
 *    Non-Carbon CFM:   not available
 
1644
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1645
 *    Mac OS X:         in version 10.0 and later
 
1646
 }
 
1647
function PMGetFirstPage(printSettings: PMPrintSettings; var first: UInt32): OSStatus; external name '_PMGetFirstPage';
 
1648
 
 
1649
{
 
1650
 *  PMSetFirstPage()
 
1651
 *  
 
1652
 *  Availability:
 
1653
 *    Non-Carbon CFM:   not available
 
1654
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1655
 *    Mac OS X:         in version 10.0 and later
 
1656
 }
 
1657
function PMSetFirstPage(printSettings: PMPrintSettings; first: UInt32; lock: boolean): OSStatus; external name '_PMSetFirstPage';
 
1658
 
 
1659
{
 
1660
 *  PMGetLastPage()
 
1661
 *  
 
1662
 *  Availability:
 
1663
 *    Non-Carbon CFM:   not available
 
1664
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1665
 *    Mac OS X:         in version 10.0 and later
 
1666
 }
 
1667
function PMGetLastPage(printSettings: PMPrintSettings; var last: UInt32): OSStatus; external name '_PMGetLastPage';
 
1668
 
 
1669
{
 
1670
 *  PMSetLastPage()
 
1671
 *  
 
1672
 *  Availability:
 
1673
 *    Non-Carbon CFM:   not available
 
1674
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1675
 *    Mac OS X:         in version 10.0 and later
 
1676
 }
 
1677
function PMSetLastPage(printSettings: PMPrintSettings; last: UInt32; lock: boolean): OSStatus; external name '_PMSetLastPage';
 
1678
 
 
1679
{**********************}
 
1680
{  The default page range is from 1-32000. The page range is something that is }
 
1681
{  set by the application. It is NOT the first and last page to print. It serves }
 
1682
{  as limits for setting the first and last page. You may pass kPMPrintAllPages for }
 
1683
{  the maxPage value to specified that all pages are available for printing. }
 
1684
{**********************}
 
1685
{
 
1686
 *  PMGetPageRange()
 
1687
 *  
 
1688
 *  Availability:
 
1689
 *    Non-Carbon CFM:   not available
 
1690
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1691
 *    Mac OS X:         in version 10.0 and later
 
1692
 }
 
1693
function PMGetPageRange(printSettings: PMPrintSettings; var minPage: UInt32; var maxPage: UInt32): OSStatus; external name '_PMGetPageRange';
 
1694
 
 
1695
{**********************}
 
1696
{ The first and last page are immediately clipped to the new range }
 
1697
{**********************}
 
1698
{
 
1699
 *  PMSetPageRange()
 
1700
 *  
 
1701
 *  Availability:
 
1702
 *    Non-Carbon CFM:   not available
 
1703
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1704
 *    Mac OS X:         in version 10.0 and later
 
1705
 }
 
1706
function PMSetPageRange(printSettings: PMPrintSettings; minPage: UInt32; maxPage: UInt32): OSStatus; external name '_PMSetPageRange';
 
1707
 
 
1708
{
 
1709
 *  PMSetProfile()
 
1710
 *  
 
1711
 *  Availability:
 
1712
 *    Non-Carbon CFM:   not available
 
1713
 *    CarbonLib:        in CarbonLib 1.0 and later
 
1714
 *    Mac OS X:         in version 10.0 and later
 
1715
 }
 
1716
function PMSetProfile(printSettings: PMPrintSettings; tag: PMTag; const (*var*) profile: CMProfileLocation): OSStatus; external name '_PMSetProfile';
 
1717
 
 
1718
{
 
1719
 *  PMGetColorMode()
 
1720
 *  
 
1721
 *  Availability:
 
1722
 *    Non-Carbon CFM:   not available
 
1723
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1724
 *    Mac OS X:         in version 10.0 and later
 
1725
 }
 
1726
function PMGetColorMode(printSettings: PMPrintSettings; var colorMode: PMColorMode): OSStatus; external name '_PMGetColorMode';
 
1727
 
 
1728
{
 
1729
 *  PMSetColorMode()
 
1730
 *  
 
1731
 *  Availability:
 
1732
 *    Non-Carbon CFM:   not available
 
1733
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1734
 *    Mac OS X:         in version 10.0 and later
 
1735
 }
 
1736
function PMSetColorMode(printSettings: PMPrintSettings; colorMode: PMColorMode): OSStatus; external name '_PMSetColorMode';
 
1737
 
 
1738
{
 
1739
 *  PMGetJobNameCFString()
 
1740
 *  
 
1741
 *  Availability:
 
1742
 *    Non-Carbon CFM:   not available
 
1743
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1744
 *    Mac OS X:         in version 10.0 and later
 
1745
 }
 
1746
function PMGetJobNameCFString(printSettings: PMPrintSettings; var name: CFStringRef): OSStatus; external name '_PMGetJobNameCFString';
 
1747
 
 
1748
{
 
1749
 *  PMSetJobNameCFString()
 
1750
 *  
 
1751
 *  Availability:
 
1752
 *    Non-Carbon CFM:   not available
 
1753
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1754
 *    Mac OS X:         in version 10.0 and later
 
1755
 }
 
1756
function PMSetJobNameCFString(printSettings: PMPrintSettings; name: CFStringRef): OSStatus; external name '_PMSetJobNameCFString';
 
1757
 
 
1758
{
 
1759
 *  PMSetCollate()
 
1760
 *  
 
1761
 *  Availability:
 
1762
 *    Non-Carbon CFM:   not available
 
1763
 *    CarbonLib:        in CarbonLib 1.6 and later
 
1764
 *    Mac OS X:         in version 10.2 and later
 
1765
 }
 
1766
function PMSetCollate(printSettings: PMPrintSettings; collate: boolean): OSStatus; external name '_PMSetCollate';
 
1767
 
 
1768
{
 
1769
 *  PMGetCollate()
 
1770
 *  
 
1771
 *  Availability:
 
1772
 *    Non-Carbon CFM:   not available
 
1773
 *    CarbonLib:        in CarbonLib 1.6 and later
 
1774
 *    Mac OS X:         in version 10.2 and later
 
1775
 }
 
1776
function PMGetCollate(printSettings: PMPrintSettings; var collate: boolean): OSStatus; external name '_PMGetCollate';
 
1777
 
 
1778
{$ALIGN MAC68K}
 
1779
 
 
1780
 
 
1781
end.