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