Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1755 lines
46 KiB

  1. /*
  2. File: PMCore.h
  3. Contains: Carbon Printing Manager Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1998-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __PMCORE__
  11. #define __PMCORE__
  12. #ifndef __MACERRORS__
  13. #include <MacErrors.h>
  14. #endif
  15. #ifndef __FILES__
  16. #include <Files.h>
  17. #endif
  18. #ifndef __CFSTRING__
  19. #include <CFString.h>
  20. #endif
  21. #ifndef __CFURL__
  22. #include <CFURL.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __CMAPPLICATION__
  28. #include <CMApplication.h>
  29. #endif
  30. #ifndef __PMDEFINITIONS__
  31. #include <PMDefinitions.h>
  32. #endif
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42. #ifndef PM_USE_SESSION_APIS
  43. #define PM_USE_SESSION_APIS 1
  44. #endif /* !defined(PM_USE_SESSION_APIS) */
  45. /* Callbacks */
  46. typedef CALLBACK_API( void , PMIdleProcPtr )(void);
  47. typedef STACK_UPP_TYPE(PMIdleProcPtr) PMIdleUPP;
  48. /*
  49. * NewPMIdleUPP()
  50. *
  51. * Availability:
  52. * Non-Carbon CFM: not available
  53. * CarbonLib: in CarbonLib 1.0 and later
  54. * Mac OS X: in version 10.0 and later
  55. */
  56. EXTERN_API_C( PMIdleUPP )
  57. NewPMIdleUPP(PMIdleProcPtr userRoutine);
  58. /*
  59. * DisposePMIdleUPP()
  60. *
  61. * Availability:
  62. * Non-Carbon CFM: not available
  63. * CarbonLib: in CarbonLib 1.0 and later
  64. * Mac OS X: in version 10.0 and later
  65. */
  66. EXTERN_API_C( void )
  67. DisposePMIdleUPP(PMIdleUPP userUPP);
  68. /*
  69. * InvokePMIdleUPP()
  70. *
  71. * Availability:
  72. * Non-Carbon CFM: not available
  73. * CarbonLib: in CarbonLib 1.0 and later
  74. * Mac OS X: in version 10.0 and later
  75. */
  76. EXTERN_API_C( void )
  77. InvokePMIdleUPP(PMIdleUPP userUPP);
  78. #if PM_USE_SESSION_APIS
  79. /*
  80. * PMSessionCreatePrinterList()
  81. *
  82. * Availability:
  83. * Non-Carbon CFM: not available
  84. * CarbonLib: in CarbonLib 1.4 and later
  85. * Mac OS X: in version 10.1 and later
  86. */
  87. EXTERN_API( OSStatus )
  88. PMSessionCreatePrinterList(
  89. PMPrintSession printSession,
  90. CFArrayRef * printerList,
  91. CFIndex * currentIndex,
  92. PMPrinter * currentPrinter);
  93. /*
  94. * PMSessionSetCurrentPrinter()
  95. *
  96. * Availability:
  97. * Non-Carbon CFM: not available
  98. * CarbonLib: in CarbonLib 1.4 and later
  99. * Mac OS X: in version 10.1 and later
  100. */
  101. EXTERN_API( OSStatus )
  102. PMSessionSetCurrentPrinter(
  103. PMPrintSession session,
  104. CFStringRef printerName);
  105. /*
  106. * PMSessionSetDestination()
  107. *
  108. * Summary:
  109. * Alter a print session and print settings so that an associated
  110. * print job is sent to the provided destination type in the,
  111. * optional, MIME document format.
  112. *
  113. * Discussion:
  114. * This function is most useful when an application would like to
  115. * write its print output to disk without requiring user
  116. * interaction. The list of MIME types that can be sent to the
  117. * provided destination can be obtained from
  118. * PMSessionCopyOutputFormatList and one of these passed to this
  119. * function.
  120. *
  121. * Parameters:
  122. *
  123. * printSession:
  124. * The session to be used for a print job. The session holds the
  125. * preview setting which can override the destination type in the
  126. * print settings.
  127. *
  128. * printSettings:
  129. * The print settings to be used for a print job. The print
  130. * settings specify whether a job will be directed toward a
  131. * printer or to file. It also holds the requested MIME output
  132. * type.
  133. *
  134. * destType:
  135. * The destiation type for a print job associated with the
  136. * provided print session and print settings. Fax is currently not
  137. * supported, but kPMDestinationPrinter, kPMDestinationFile, and
  138. * kPMDestinationPreview can be set.
  139. *
  140. * destFormat:
  141. * The MIME type to be generated for the provided destination
  142. * type. This parameter can be NULL in which the default format
  143. * for the requested destination type is used. To obtain a list of
  144. * valid formats for a given destiation type, use the function
  145. * PMSessionCopyOutputFormatList.
  146. *
  147. * destLocation:
  148. * Some destination types support a destination location. The
  149. * clearest example is the kPMDestinationFile destination type
  150. * which allows a caller to also supply a file URL specifying
  151. * where the output file is to be created.
  152. *
  153. * SPECIAL_AVAILABILITY_NOTE:
  154. * This routine is available in ApplicationsServices.framework in
  155. * Mac OS X version 10.1 and later. On Mac OS X it is available to
  156. * CFM applications through CarbonLib starting with Mac OS X
  157. * version 10.2 and later.
  158. *
  159. * Availability:
  160. * Non-Carbon CFM: not available
  161. * CarbonLib: in CarbonLib 1.5 and later
  162. * Mac OS X: in version 10.1 and later
  163. */
  164. EXTERN_API( OSStatus )
  165. PMSessionSetDestination(
  166. PMPrintSession printSession,
  167. PMPrintSettings printSettings,
  168. PMDestinationType destType,
  169. CFStringRef destFormat,
  170. CFURLRef destLocation);
  171. /*
  172. * PMSessionGetDestinationType()
  173. *
  174. * Summary:
  175. * Hand back the destination type that will be used for a print job
  176. * with the specified print settings and print session.
  177. *
  178. * Discussion:
  179. * Currently there are four destination types:
  180. * kPMDestinationPrinter, kPMDestinationFile, kPMDestinationFax and
  181. * kPMDestinationPreview. The first three destination types are
  182. * stored in the print settings. The switch for preview is stored in
  183. * the print session and, if enabled, overrides the destination in
  184. * the print setting. This function is preferred over
  185. * PMGetDestination as the latter does not take a print session
  186. * parameter and therefore can not indicate whether preview has been
  187. * selected as the destination.
  188. *
  189. * Parameters:
  190. *
  191. * printSession:
  192. * The session to be used for a print job. The session holds the
  193. * preview setting which can override the destination type in the
  194. * print settings.
  195. *
  196. * printSettings:
  197. * The print settings to be used for a print job. The print
  198. * settings specify whether a job will be directed toward a
  199. * printer or to file.
  200. *
  201. * destTypeP:
  202. * A pointer to a caller supplied PMDestinationType variable. If
  203. * this function succeeds then *'destTypeP' will be filled in with
  204. * the destination type for a print job that used the specified
  205. * session and print settings. If this function fails, then
  206. * *'destType' will be set to kPMDestinationInvalid.
  207. *
  208. * SPECIAL_AVAILABILITY_NOTE:
  209. * This routine is available in ApplicationsServices.framework in
  210. * Mac OS X version 10.1 and later. On Mac OS X it is available to
  211. * CFM applications through CarbonLib starting with Mac OS X
  212. * version 10.2 and later.
  213. *
  214. * Availability:
  215. * Non-Carbon CFM: not available
  216. * CarbonLib: in CarbonLib 1.5 and later
  217. * Mac OS X: in version 10.1 and later
  218. */
  219. EXTERN_API( OSStatus )
  220. PMSessionGetDestinationType(
  221. PMPrintSession printSession,
  222. PMPrintSettings printSettings,
  223. PMDestinationType * destTypeP);
  224. /*
  225. * PMSessionCopyDestinationFormat()
  226. *
  227. * Summary:
  228. * Hand back the destination output MIME type associated with the
  229. * provided print session and print settings.
  230. *
  231. * Parameters:
  232. *
  233. * printSession:
  234. * A currently open print session.
  235. *
  236. * printSettings:
  237. * The print settings that are to be searched.
  238. *
  239. * destFormatP:
  240. * A pointer to a caller allocated CFStringRef variable. If this
  241. * routine returns noErr then *'destFormatP' will either be a copy
  242. * of a CFStringRef specifying the output format for the print
  243. * job, or NULL indicating that the default output format will be
  244. * used. If this function return an error, then *'destFormatP'
  245. * will be set to NULL.
  246. *
  247. * SPECIAL_AVAILABILITY_NOTE:
  248. * This routine is available in ApplicationsServices.framework in
  249. * Mac OS X version 10.1 and later. On Mac OS X it is available to
  250. * CFM applications through CarbonLib starting with Mac OS X
  251. * version 10.2 and later.
  252. *
  253. * Availability:
  254. * Non-Carbon CFM: not available
  255. * CarbonLib: in CarbonLib 1.5 and later
  256. * Mac OS X: in version 10.1 and later
  257. */
  258. EXTERN_API( OSStatus )
  259. PMSessionCopyDestinationFormat(
  260. PMPrintSession printSession,
  261. PMPrintSettings printSettings,
  262. CFStringRef * destFormatP);
  263. /*
  264. * PMSessionCopyDestinationLocation()
  265. *
  266. * Summary:
  267. * Hand back the URL destination location given a print session and
  268. * print settings.
  269. *
  270. * Discussion:
  271. * Some destination type support a destination location which
  272. * further defines where the output from a pritn job should be sent.
  273. * The kPMDestinationFile destiation type, for example, will use a
  274. * file URL to determine where a new file should be created.
  275. *
  276. * Parameters:
  277. *
  278. * printSession:
  279. * A currently open print session.
  280. *
  281. * printSettings:
  282. * The print settings that are to be searched.
  283. *
  284. * destLocationP:
  285. * A pointer to a caller allocated CFURLRef variable. If this
  286. * routine returns noErr then *'outputFileP' will either be NULL
  287. * indicating that the job is using the default destination
  288. * location for the current destination type or a copy of a
  289. * CFURLRef will be placed in *'destLocationP'. If this function
  290. * returns an error then 'destLocationP' will be set to NULL.
  291. *
  292. * SPECIAL_AVAILABILITY_NOTE:
  293. * This routine is available in ApplicationsServices.framework in
  294. * Mac OS X version 10.1 and later. On Mac OS X it is available to
  295. * CFM applications through CarbonLib starting with Mac OS X
  296. * version 10.2 and later.
  297. *
  298. * Availability:
  299. * Non-Carbon CFM: not available
  300. * CarbonLib: in CarbonLib 1.5 and later
  301. * Mac OS X: in version 10.1 and later
  302. */
  303. EXTERN_API( OSStatus )
  304. PMSessionCopyDestinationLocation(
  305. PMPrintSession printSession,
  306. PMPrintSettings printSettings,
  307. CFURLRef * destLocationP);
  308. /*
  309. * PMSessionCopyOutputFormatList()
  310. *
  311. * Summary:
  312. * Hands back an an array of MIME types describing the possible
  313. * output formats for the printer module associated with the current
  314. * printer.
  315. *
  316. * Parameters:
  317. *
  318. * printSession:
  319. * This session's current printer's printer module will be queried
  320. * for its supported output MIME types.
  321. *
  322. * destType:
  323. * A print job can have one of several possible destination types.
  324. * The list of valid output formats is dependent upon the
  325. * destination type. This parameter specifies destination type of
  326. * interest when retrieving the output formats list.
  327. *
  328. * documentFormatP:
  329. * A pointer to a caller's CFArrayRef variable. If this routine
  330. * completes successfully, then *'documentFormatP' will be set to
  331. * a CFArrayRef containing CFStringRefs. Each CFStringRef in the
  332. * array is a MIME type specifying a type of output that can be
  333. * generated by the printer module associated with the current
  334. * printer.
  335. *
  336. * SPECIAL_AVAILABILITY_NOTE:
  337. * This routine is available in ApplicationsServices.framework in
  338. * Mac OS X version 10.1 and later. On Mac OS X it is available to
  339. * CFM applications through CarbonLib starting with Mac OS X
  340. * version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
  341. * routine returns kPMNotImplemented
  342. *
  343. * Availability:
  344. * Non-Carbon CFM: not available
  345. * CarbonLib: in CarbonLib 1.6 and later
  346. * Mac OS X: in version 10.1 and later
  347. */
  348. EXTERN_API( OSStatus )
  349. PMSessionCopyOutputFormatList(
  350. PMPrintSession printSession,
  351. PMDestinationType destType,
  352. CFArrayRef * documentFormatP);
  353. /*
  354. * PMSessionCreatePageFormatList()
  355. *
  356. * Summary:
  357. * Hand back a list of page format instances. Each page format
  358. * instance describes a paper size available on the specified
  359. * printer.
  360. *
  361. * Parameters:
  362. *
  363. * printSession:
  364. * A currently open print session.
  365. *
  366. * printer:
  367. * The printer whose page size list should be enumerated. To get
  368. * the session's current printer, see PMSessionGetCurrentPrinter().
  369. *
  370. * pageFormatList:
  371. * If this function is successful then noErr will be returned and
  372. * *'pageFormatList' will be set to a newly created CFArray. Each
  373. * element in the array will be a PMPageFormat describing an
  374. * available paper size for the specified printer. If this
  375. * function fails then a non-zero error code will be returned and
  376. * *'pageFormatList' will be set to NULL.
  377. *
  378. * SPECIAL_AVAILABILITY_NOTE:
  379. * This routine is available in ApplicationsServices.framework in
  380. * Mac OS X version 10.1 and later. On Mac OS X it is available to
  381. * CFM applications through CarbonLib starting with Mac OS X
  382. * version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
  383. * routine returns kPMNotImplemented
  384. *
  385. * Availability:
  386. * Non-Carbon CFM: not available
  387. * CarbonLib: in CarbonLib 1.6 and later
  388. * Mac OS X: in version 10.1 and later
  389. */
  390. EXTERN_API( OSStatus )
  391. PMSessionCreatePageFormatList(
  392. PMPrintSession printSession,
  393. PMPrinter printer,
  394. CFArrayRef * pageFormatList);
  395. /*
  396. * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
  397. * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
  398. * starting with Mac OS X version 10.2 and later.
  399. *
  400. * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
  401. */
  402. /*
  403. * PMSessionBeginDocumentNoDialog()
  404. *
  405. * Availability:
  406. * Non-Carbon CFM: not available
  407. * CarbonLib: in CarbonLib 1.6 and later
  408. * Mac OS X: in version 10.0 and later
  409. */
  410. EXTERN_API( OSStatus )
  411. PMSessionBeginDocumentNoDialog(
  412. PMPrintSession printSession,
  413. PMPrintSettings printSettings,
  414. PMPageFormat pageFormat);
  415. /*
  416. * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
  417. * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
  418. * starting with Mac OS X version 10.2 and later.
  419. *
  420. * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
  421. */
  422. /*
  423. * PMSessionEndDocumentNoDialog()
  424. *
  425. * Availability:
  426. * Non-Carbon CFM: not available
  427. * CarbonLib: in CarbonLib 1.6 and later
  428. * Mac OS X: in version 10.0 and later
  429. */
  430. EXTERN_API( OSStatus )
  431. PMSessionEndDocumentNoDialog(PMPrintSession printSession);
  432. /*
  433. * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
  434. * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
  435. * starting with Mac OS X version 10.2 and later.
  436. *
  437. * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
  438. */
  439. /*
  440. * PMSessionBeginPageNoDialog()
  441. *
  442. * Availability:
  443. * Non-Carbon CFM: not available
  444. * CarbonLib: in CarbonLib 1.6 and later
  445. * Mac OS X: in version 10.0 and later
  446. */
  447. EXTERN_API( OSStatus )
  448. PMSessionBeginPageNoDialog(
  449. PMPrintSession printSession,
  450. PMPageFormat pageFormat,
  451. const PMRect * pageFrame);
  452. /*
  453. * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
  454. * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
  455. * starting with Mac OS X version 10.2 and later.
  456. *
  457. * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
  458. */
  459. /*
  460. * PMSessionEndPageNoDialog()
  461. *
  462. * Availability:
  463. * Non-Carbon CFM: not available
  464. * CarbonLib: in CarbonLib 1.6 and later
  465. * Mac OS X: in version 10.0 and later
  466. */
  467. EXTERN_API( OSStatus )
  468. PMSessionEndPageNoDialog(PMPrintSession printSession);
  469. #else
  470. /*
  471. * PMSetIdleProc()
  472. *
  473. * Availability:
  474. * Non-Carbon CFM: not available
  475. * CarbonLib: in CarbonLib 1.0 and later
  476. * Mac OS X: in version 10.0 and later
  477. */
  478. EXTERN_API( OSStatus )
  479. PMSetIdleProc(PMIdleUPP idleProc);
  480. /* Print loop */
  481. /*
  482. * PMBegin()
  483. *
  484. * Availability:
  485. * Non-Carbon CFM: not available
  486. * CarbonLib: in CarbonLib 1.0 and later
  487. * Mac OS X: in version 10.0 and later
  488. */
  489. EXTERN_API( OSStatus )
  490. PMBegin(void);
  491. /*
  492. * PMEnd()
  493. *
  494. * Availability:
  495. * Non-Carbon CFM: not available
  496. * CarbonLib: in CarbonLib 1.0 and later
  497. * Mac OS X: in version 10.0 and later
  498. */
  499. EXTERN_API( OSStatus )
  500. PMEnd(void);
  501. /************************/
  502. /* Valid only within a PMBeginPage/PMEndPage block. You should retrieve the printing */
  503. /* port with this call and set it before imaging a page. */
  504. /************************/
  505. /*
  506. * PMGetGrafPtr()
  507. *
  508. * Availability:
  509. * Non-Carbon CFM: not available
  510. * CarbonLib: in CarbonLib 1.0 and later
  511. * Mac OS X: in version 10.0 and later
  512. */
  513. EXTERN_API( OSStatus )
  514. PMGetGrafPtr(
  515. PMPrintContext printContext,
  516. GrafPtr * grafPort);
  517. /* PMPageFormat */
  518. /*
  519. * PMNewPageFormat()
  520. *
  521. * Availability:
  522. * Non-Carbon CFM: not available
  523. * CarbonLib: in CarbonLib 1.0 and later
  524. * Mac OS X: in version 10.0 and later
  525. */
  526. EXTERN_API( OSStatus )
  527. PMNewPageFormat(PMPageFormat * pageFormat);
  528. /*
  529. * PMDisposePageFormat()
  530. *
  531. * Availability:
  532. * Non-Carbon CFM: not available
  533. * CarbonLib: in CarbonLib 1.0 and later
  534. * Mac OS X: in version 10.0 and later
  535. */
  536. EXTERN_API( OSStatus )
  537. PMDisposePageFormat(PMPageFormat pageFormat);
  538. /*
  539. * PMDefaultPageFormat()
  540. *
  541. * Availability:
  542. * Non-Carbon CFM: not available
  543. * CarbonLib: in CarbonLib 1.0 and later
  544. * Mac OS X: in version 10.0 and later
  545. */
  546. EXTERN_API( OSStatus )
  547. PMDefaultPageFormat(PMPageFormat pageFormat);
  548. /*
  549. * PMValidatePageFormat()
  550. *
  551. * Availability:
  552. * Non-Carbon CFM: not available
  553. * CarbonLib: in CarbonLib 1.0 and later
  554. * Mac OS X: in version 10.0 and later
  555. */
  556. EXTERN_API( OSStatus )
  557. PMValidatePageFormat(
  558. PMPageFormat pageFormat,
  559. Boolean * result);
  560. /* PMPrintSettings */
  561. /*
  562. * PMNewPrintSettings()
  563. *
  564. * Availability:
  565. * Non-Carbon CFM: not available
  566. * CarbonLib: in CarbonLib 1.0 and later
  567. * Mac OS X: in version 10.0 and later
  568. */
  569. EXTERN_API( OSStatus )
  570. PMNewPrintSettings(PMPrintSettings * printSettings);
  571. /*
  572. * PMDisposePrintSettings()
  573. *
  574. * Availability:
  575. * Non-Carbon CFM: not available
  576. * CarbonLib: in CarbonLib 1.0 and later
  577. * Mac OS X: in version 10.0 and later
  578. */
  579. EXTERN_API( OSStatus )
  580. PMDisposePrintSettings(PMPrintSettings printSettings);
  581. /*
  582. * PMDefaultPrintSettings()
  583. *
  584. * Availability:
  585. * Non-Carbon CFM: not available
  586. * CarbonLib: in CarbonLib 1.0 and later
  587. * Mac OS X: in version 10.0 and later
  588. */
  589. EXTERN_API( OSStatus )
  590. PMDefaultPrintSettings(PMPrintSettings printSettings);
  591. /*
  592. * PMValidatePrintSettings()
  593. *
  594. * Availability:
  595. * Non-Carbon CFM: not available
  596. * CarbonLib: in CarbonLib 1.0 and later
  597. * Mac OS X: in version 10.0 and later
  598. */
  599. EXTERN_API( OSStatus )
  600. PMValidatePrintSettings(
  601. PMPrintSettings printSettings,
  602. Boolean * result);
  603. /* Classic Support */
  604. /*
  605. * PMGeneral()
  606. *
  607. * Availability:
  608. * Non-Carbon CFM: not available
  609. * CarbonLib: in CarbonLib 1.0 and later
  610. * Mac OS X: in version 10.0 and later
  611. */
  612. EXTERN_API( OSStatus )
  613. PMGeneral(Ptr pData);
  614. /*
  615. * PMConvertOldPrintRecord()
  616. *
  617. * Availability:
  618. * Non-Carbon CFM: not available
  619. * CarbonLib: in CarbonLib 1.0 and later
  620. * Mac OS X: in version 10.0 and later
  621. */
  622. EXTERN_API( OSStatus )
  623. PMConvertOldPrintRecord(
  624. Handle printRecordHandle,
  625. PMPrintSettings * printSettings,
  626. PMPageFormat * pageFormat);
  627. /*
  628. * PMMakeOldPrintRecord()
  629. *
  630. * Availability:
  631. * Non-Carbon CFM: not available
  632. * CarbonLib: in CarbonLib 1.0 and later
  633. * Mac OS X: in version 10.0 and later
  634. */
  635. EXTERN_API( OSStatus )
  636. PMMakeOldPrintRecord(
  637. PMPrintSettings printSettings,
  638. PMPageFormat pageFormat,
  639. Handle * printRecordHandle);
  640. /* Driver Information */
  641. /*
  642. * PMIsPostScriptDriver()
  643. *
  644. * Availability:
  645. * Non-Carbon CFM: not available
  646. * CarbonLib: in CarbonLib 1.0 and later
  647. * Mac OS X: in version 10.0 and later
  648. */
  649. EXTERN_API( OSStatus )
  650. PMIsPostScriptDriver(Boolean * isPostScript);
  651. /*
  652. * PMGetLanguageInfo()
  653. *
  654. * Availability:
  655. * Non-Carbon CFM: not available
  656. * CarbonLib: in CarbonLib 1.0 and later
  657. * Mac OS X: in version 10.0 and later
  658. */
  659. EXTERN_API( OSStatus )
  660. PMGetLanguageInfo(PMLanguageInfo * info);
  661. /*
  662. * PMGetDriverCreator()
  663. *
  664. * Availability:
  665. * Non-Carbon CFM: not available
  666. * CarbonLib: in CarbonLib 1.0 and later
  667. * Mac OS X: in version 10.0 and later
  668. */
  669. EXTERN_API( OSStatus )
  670. PMGetDriverCreator(OSType * creator);
  671. /*
  672. * PMGetDriverReleaseInfo()
  673. *
  674. * Availability:
  675. * Non-Carbon CFM: not available
  676. * CarbonLib: in CarbonLib 1.0 and later
  677. * Mac OS X: in version 10.0 and later
  678. */
  679. EXTERN_API( OSStatus )
  680. PMGetDriverReleaseInfo(VersRec * release);
  681. /*
  682. * PMGetPrinterResolutionCount()
  683. *
  684. * Availability:
  685. * Non-Carbon CFM: not available
  686. * CarbonLib: in CarbonLib 1.0 and later
  687. * Mac OS X: in version 10.0 and later
  688. */
  689. EXTERN_API( OSStatus )
  690. PMGetPrinterResolutionCount(UInt32 * count);
  691. /*
  692. * PMGetPrinterResolution()
  693. *
  694. * Availability:
  695. * Non-Carbon CFM: not available
  696. * CarbonLib: in CarbonLib 1.0 and later
  697. * Mac OS X: in version 10.0 and later
  698. */
  699. EXTERN_API( OSStatus )
  700. PMGetPrinterResolution(
  701. PMTag tag,
  702. PMResolution * res);
  703. /*
  704. * PMGetIndexedPrinterResolution()
  705. *
  706. * Availability:
  707. * Non-Carbon CFM: not available
  708. * CarbonLib: in CarbonLib 1.0 and later
  709. * Mac OS X: in version 10.0 and later
  710. */
  711. EXTERN_API( OSStatus )
  712. PMGetIndexedPrinterResolution(
  713. UInt32 index,
  714. PMResolution * res);
  715. /************************/
  716. /* PMEnableColorSync and PMDisableColorSync are valid within */
  717. /* BeginPage/EndPage block */
  718. /************************/
  719. /* ColorSync & PostScript Support */
  720. /*
  721. * PMEnableColorSync()
  722. *
  723. * Availability:
  724. * Non-Carbon CFM: not available
  725. * CarbonLib: in CarbonLib 1.0 and later
  726. * Mac OS X: in version 10.0 and later
  727. */
  728. EXTERN_API( OSStatus )
  729. PMEnableColorSync(void);
  730. /*
  731. * PMDisableColorSync()
  732. *
  733. * Availability:
  734. * Non-Carbon CFM: not available
  735. * CarbonLib: in CarbonLib 1.0 and later
  736. * Mac OS X: in version 10.0 and later
  737. */
  738. EXTERN_API( OSStatus )
  739. PMDisableColorSync(void);
  740. /************************/
  741. /* The PMPostScriptxxx calls are valid within a */
  742. /* BeginPage/EndPage block */
  743. /************************/
  744. /*
  745. * PMPostScriptBegin()
  746. *
  747. * Availability:
  748. * Non-Carbon CFM: not available
  749. * CarbonLib: in CarbonLib 1.0 and later
  750. * Mac OS X: in version 10.0 and later
  751. */
  752. EXTERN_API( OSStatus )
  753. PMPostScriptBegin(void);
  754. /*
  755. * PMPostScriptEnd()
  756. *
  757. * Availability:
  758. * Non-Carbon CFM: not available
  759. * CarbonLib: in CarbonLib 1.0 and later
  760. * Mac OS X: in version 10.0 and later
  761. */
  762. EXTERN_API( OSStatus )
  763. PMPostScriptEnd(void);
  764. /************************/
  765. /* These PMPostScriptxxx calls are valid within a */
  766. /* PMPostScriptBegin/PMPostScriptEnd block */
  767. /************************/
  768. /*
  769. * PMPostScriptHandle()
  770. *
  771. * Availability:
  772. * Non-Carbon CFM: not available
  773. * CarbonLib: in CarbonLib 1.0 and later
  774. * Mac OS X: in version 10.0 and later
  775. */
  776. EXTERN_API( OSStatus )
  777. PMPostScriptHandle(Handle psHandle);
  778. /*
  779. * PMPostScriptData()
  780. *
  781. * Availability:
  782. * Non-Carbon CFM: not available
  783. * CarbonLib: in CarbonLib 1.0 and later
  784. * Mac OS X: in version 10.0 and later
  785. */
  786. EXTERN_API( OSStatus )
  787. PMPostScriptData(
  788. Ptr psPtr,
  789. Size len);
  790. /*
  791. * PMPostScriptFile()
  792. *
  793. * Availability:
  794. * Non-Carbon CFM: not available
  795. * CarbonLib: in CarbonLib 1.0 and later
  796. * Mac OS X: in version 10.0 and later
  797. */
  798. EXTERN_API( OSStatus )
  799. PMPostScriptFile(FSSpec * psFile);
  800. /* Error */
  801. /*
  802. * PMError()
  803. *
  804. * Availability:
  805. * Non-Carbon CFM: not available
  806. * CarbonLib: in CarbonLib 1.0 and later
  807. * Mac OS X: in version 10.0 and later
  808. */
  809. EXTERN_API( OSStatus )
  810. PMError(void);
  811. /*
  812. * PMSetError()
  813. *
  814. * Availability:
  815. * Non-Carbon CFM: not available
  816. * CarbonLib: in CarbonLib 1.0 and later
  817. * Mac OS X: in version 10.0 and later
  818. */
  819. EXTERN_API( OSStatus )
  820. PMSetError(OSStatus printError);
  821. #endif /* PM_USE_SESSION_APIS */
  822. /* PMPageFormat */
  823. /*
  824. * PMCopyPageFormat()
  825. *
  826. * Availability:
  827. * Non-Carbon CFM: not available
  828. * CarbonLib: in CarbonLib 1.0 and later
  829. * Mac OS X: in version 10.0 and later
  830. */
  831. EXTERN_API( OSStatus )
  832. PMCopyPageFormat(
  833. PMPageFormat formatSrc,
  834. PMPageFormat formatDest);
  835. /************************/
  836. /* Flattening a page format should only be necessary if you intend to preserve */
  837. /* the object settings along with a document. A page format will persist outside of a */
  838. /* PMBegin/PMEnd block. This will allow you to use any accessors on the object without */
  839. /* the need to flatten and unflatten. Keep in mind accessors make no assumption */
  840. /* on the validity of the value you set. This can only be done thru PMValidatePageFormat */
  841. /* in a PMBegin/PMEnd block or with PMSessionValidatePageFormat with a valid session. */
  842. /* It is your responsibility for disposing of the handle. */
  843. /************************/
  844. /*
  845. * PMFlattenPageFormat()
  846. *
  847. * Availability:
  848. * Non-Carbon CFM: not available
  849. * CarbonLib: in CarbonLib 1.0 and later
  850. * Mac OS X: in version 10.0 and later
  851. */
  852. EXTERN_API( OSStatus )
  853. PMFlattenPageFormat(
  854. PMPageFormat pageFormat,
  855. Handle * flatFormat);
  856. /*
  857. * PMUnflattenPageFormat()
  858. *
  859. * Availability:
  860. * Non-Carbon CFM: not available
  861. * CarbonLib: in CarbonLib 1.0 and later
  862. * Mac OS X: in version 10.0 and later
  863. */
  864. EXTERN_API( OSStatus )
  865. PMUnflattenPageFormat(
  866. Handle flatFormat,
  867. PMPageFormat * pageFormat);
  868. /* PMPageFormat Accessors */
  869. /************************/
  870. /* PMSetxxx calls only saves the value inside the printing object. They make no assumption on the */
  871. /* validity of the value. This should be done using PMValidatePageFormat/PMSessionValidatePageFormat */
  872. /* Any dependant settings are also updated during a validate call. */
  873. /* For example: */
  874. /* PMGetAdjustedPaperRect - returns a rect of a certain size */
  875. /* PMSetScale( aPageFormat, 500.0 ) */
  876. /* PMGetAdjustedPaperRect - returns the SAME rect as the first call */
  877. /**/
  878. /* PMGetAdjustedPaperRect - returns a rect of a certain size */
  879. /* PMSetScale( aPageFormat, 500.0 ) */
  880. /* PMValidatePageFormat or PMSessionValidatePageFormat */
  881. /* PMGetAdjustedPaperRect - returns a rect thats scaled 500% from the first call */
  882. /************************/
  883. /*
  884. * PMGetPageFormatExtendedData()
  885. *
  886. * Availability:
  887. * Non-Carbon CFM: not available
  888. * CarbonLib: in CarbonLib 1.0 and later
  889. * Mac OS X: in version 10.0 and later
  890. */
  891. EXTERN_API( OSStatus )
  892. PMGetPageFormatExtendedData(
  893. PMPageFormat pageFormat,
  894. OSType dataID,
  895. UInt32 * size,
  896. void * extendedData);
  897. /*
  898. * PMSetPageFormatExtendedData()
  899. *
  900. * Availability:
  901. * Non-Carbon CFM: not available
  902. * CarbonLib: in CarbonLib 1.0 and later
  903. * Mac OS X: in version 10.0 and later
  904. */
  905. EXTERN_API( OSStatus )
  906. PMSetPageFormatExtendedData(
  907. PMPageFormat pageFormat,
  908. OSType dataID,
  909. UInt32 size,
  910. void * extendedData);
  911. /************************/
  912. /* A value of 100.0 means 100% (no scaling). 50.0 means 50% scaling */
  913. /************************/
  914. /*
  915. * PMGetScale()
  916. *
  917. * Availability:
  918. * Non-Carbon CFM: not available
  919. * CarbonLib: in CarbonLib 1.0 and later
  920. * Mac OS X: in version 10.0 and later
  921. */
  922. EXTERN_API( OSStatus )
  923. PMGetScale(
  924. PMPageFormat pageFormat,
  925. double * scale);
  926. /*
  927. * PMSetScale()
  928. *
  929. * Availability:
  930. * Non-Carbon CFM: not available
  931. * CarbonLib: in CarbonLib 1.0 and later
  932. * Mac OS X: in version 10.0 and later
  933. */
  934. EXTERN_API( OSStatus )
  935. PMSetScale(
  936. PMPageFormat pageFormat,
  937. double scale);
  938. /************************/
  939. /* This is the drawing resolution of an app. This should not be confused with */
  940. /* the resolution of the printer. You can call PMGetPrinterResolution to see */
  941. /* what resolutions are avaliable for the current printer. */
  942. /************************/
  943. /*
  944. * PMGetResolution()
  945. *
  946. * Availability:
  947. * Non-Carbon CFM: not available
  948. * CarbonLib: in CarbonLib 1.0 and later
  949. * Mac OS X: in version 10.0 and later
  950. */
  951. EXTERN_API( OSStatus )
  952. PMGetResolution(
  953. PMPageFormat pageFormat,
  954. PMResolution * res);
  955. /*
  956. * PMSetResolution()
  957. *
  958. * Availability:
  959. * Non-Carbon CFM: not available
  960. * CarbonLib: in CarbonLib 1.0 and later
  961. * Mac OS X: in version 10.0 and later
  962. */
  963. EXTERN_API( OSStatus )
  964. PMSetResolution(
  965. PMPageFormat pageFormat,
  966. const PMResolution * res);
  967. /************************/
  968. /* This is the physical size of the paper without regard to resolution, orientation */
  969. /* or scaling. It is returned as a 72dpi value. */
  970. /************************/
  971. /*
  972. * PMGetPhysicalPaperSize()
  973. *
  974. * Availability:
  975. * Non-Carbon CFM: not available
  976. * CarbonLib: in CarbonLib 1.0 and later
  977. * Mac OS X: in version 10.0 and later
  978. */
  979. EXTERN_API( OSStatus )
  980. PMGetPhysicalPaperSize(
  981. PMPageFormat pageFormat,
  982. PMRect * paperSize);
  983. /*
  984. * PMSetPhysicalPaperSize()
  985. *
  986. * Availability:
  987. * Non-Carbon CFM: not available
  988. * CarbonLib: in CarbonLib 1.0 and later
  989. * Mac OS X: in version 10.0 and later
  990. */
  991. EXTERN_API( OSStatus )
  992. PMSetPhysicalPaperSize(
  993. PMPageFormat pageFormat,
  994. const PMRect * paperSize);
  995. /************************/
  996. /* This is the physical size of the page without regard to resolution, orientation */
  997. /* or scaling. It is returned as a 72dpi value. */
  998. /************************/
  999. /*
  1000. * PMGetPhysicalPageSize()
  1001. *
  1002. * Availability:
  1003. * Non-Carbon CFM: not available
  1004. * CarbonLib: in CarbonLib 1.0 and later
  1005. * Mac OS X: in version 10.0 and later
  1006. */
  1007. EXTERN_API( OSStatus )
  1008. PMGetPhysicalPageSize(
  1009. PMPageFormat pageFormat,
  1010. PMRect * pageSize);
  1011. /*
  1012. * PMGetAdjustedPaperRect()
  1013. *
  1014. * Availability:
  1015. * Non-Carbon CFM: not available
  1016. * CarbonLib: in CarbonLib 1.0 and later
  1017. * Mac OS X: in version 10.0 and later
  1018. */
  1019. EXTERN_API( OSStatus )
  1020. PMGetAdjustedPaperRect(
  1021. PMPageFormat pageFormat,
  1022. PMRect * paperRect);
  1023. /*
  1024. * PMGetAdjustedPageRect()
  1025. *
  1026. * Availability:
  1027. * Non-Carbon CFM: not available
  1028. * CarbonLib: in CarbonLib 1.0 and later
  1029. * Mac OS X: in version 10.0 and later
  1030. */
  1031. EXTERN_API( OSStatus )
  1032. PMGetAdjustedPageRect(
  1033. PMPageFormat pageFormat,
  1034. PMRect * pageRect);
  1035. /*
  1036. * PMGetUnadjustedPaperRect()
  1037. *
  1038. * Availability:
  1039. * Non-Carbon CFM: not available
  1040. * CarbonLib: in CarbonLib 1.1 and later
  1041. * Mac OS X: in version 10.0 and later
  1042. */
  1043. EXTERN_API( OSStatus )
  1044. PMGetUnadjustedPaperRect(
  1045. PMPageFormat pageFormat,
  1046. PMRect * paperRect);
  1047. /*
  1048. * PMSetUnadjustedPaperRect()
  1049. *
  1050. * Availability:
  1051. * Non-Carbon CFM: not available
  1052. * CarbonLib: in CarbonLib 1.1 and later
  1053. * Mac OS X: in version 10.0 and later
  1054. */
  1055. EXTERN_API( OSStatus )
  1056. PMSetUnadjustedPaperRect(
  1057. PMPageFormat pageFormat,
  1058. const PMRect * paperRect);
  1059. /*
  1060. * PMGetUnadjustedPageRect()
  1061. *
  1062. * Availability:
  1063. * Non-Carbon CFM: not available
  1064. * CarbonLib: in CarbonLib 1.1 and later
  1065. * Mac OS X: in version 10.0 and later
  1066. */
  1067. EXTERN_API( OSStatus )
  1068. PMGetUnadjustedPageRect(
  1069. PMPageFormat pageFormat,
  1070. PMRect * pageRect);
  1071. /*
  1072. * PMSetAdjustedPageRect()
  1073. *
  1074. * Availability:
  1075. * Non-Carbon CFM: not available
  1076. * CarbonLib: in CarbonLib 1.1 and later
  1077. * Mac OS X: in version 10.0 and later
  1078. */
  1079. EXTERN_API( OSStatus )
  1080. PMSetAdjustedPageRect(
  1081. PMPageFormat pageFormat,
  1082. const PMRect * pageRect);
  1083. /*
  1084. * PMGetOrientation()
  1085. *
  1086. * Availability:
  1087. * Non-Carbon CFM: not available
  1088. * CarbonLib: in CarbonLib 1.0 and later
  1089. * Mac OS X: in version 10.0 and later
  1090. */
  1091. EXTERN_API( OSStatus )
  1092. PMGetOrientation(
  1093. PMPageFormat pageFormat,
  1094. PMOrientation * orientation);
  1095. /*
  1096. * PMSetOrientation()
  1097. *
  1098. * Availability:
  1099. * Non-Carbon CFM: not available
  1100. * CarbonLib: in CarbonLib 1.0 and later
  1101. * Mac OS X: in version 10.0 and later
  1102. */
  1103. EXTERN_API( OSStatus )
  1104. PMSetOrientation(
  1105. PMPageFormat pageFormat,
  1106. PMOrientation orientation,
  1107. Boolean lock);
  1108. /* PMPrintSettings */
  1109. /*
  1110. * PMCopyPrintSettings()
  1111. *
  1112. * Availability:
  1113. * Non-Carbon CFM: not available
  1114. * CarbonLib: in CarbonLib 1.0 and later
  1115. * Mac OS X: in version 10.0 and later
  1116. */
  1117. EXTERN_API( OSStatus )
  1118. PMCopyPrintSettings(
  1119. PMPrintSettings settingSrc,
  1120. PMPrintSettings settingDest);
  1121. /************************/
  1122. /* Flattening a print settings should only be necessary if you intend to preserve */
  1123. /* the object settings along with a document. A print settings will persist outside of a */
  1124. /* PMBegin/PMEnd block. This allows you to use any accessors on the object without */
  1125. /* the need to flatten and unflatten. Keep in mind the accessors make no assumption */
  1126. /* on the validity of the value. This can only be done thru PMValidatePrintSettings */
  1127. /* in a PMBegin/PMEnd block or with PMSessionValidatePrintSettings with a valid session. */
  1128. /* It is your responsibility for disposing of the handle. */
  1129. /************************/
  1130. /*
  1131. * PMFlattenPrintSettings()
  1132. *
  1133. * Availability:
  1134. * Non-Carbon CFM: not available
  1135. * CarbonLib: in CarbonLib 1.0 and later
  1136. * Mac OS X: in version 10.0 and later
  1137. */
  1138. EXTERN_API( OSStatus )
  1139. PMFlattenPrintSettings(
  1140. PMPrintSettings printSettings,
  1141. Handle * flatSettings);
  1142. /*
  1143. * PMUnflattenPrintSettings()
  1144. *
  1145. * Availability:
  1146. * Non-Carbon CFM: not available
  1147. * CarbonLib: in CarbonLib 1.0 and later
  1148. * Mac OS X: in version 10.0 and later
  1149. */
  1150. EXTERN_API( OSStatus )
  1151. PMUnflattenPrintSettings(
  1152. Handle flatSettings,
  1153. PMPrintSettings * printSettings);
  1154. /* PMPrintSettings Accessors */
  1155. /*
  1156. * PMGetPrintSettingsExtendedData()
  1157. *
  1158. * Availability:
  1159. * Non-Carbon CFM: not available
  1160. * CarbonLib: in CarbonLib 1.0 and later
  1161. * Mac OS X: in version 10.0 and later
  1162. */
  1163. EXTERN_API( OSStatus )
  1164. PMGetPrintSettingsExtendedData(
  1165. PMPrintSettings printSettings,
  1166. OSType dataID,
  1167. UInt32 * size,
  1168. void * extendedData);
  1169. /*
  1170. * PMSetPrintSettingsExtendedData()
  1171. *
  1172. * Availability:
  1173. * Non-Carbon CFM: not available
  1174. * CarbonLib: in CarbonLib 1.0 and later
  1175. * Mac OS X: in version 10.0 and later
  1176. */
  1177. EXTERN_API( OSStatus )
  1178. PMSetPrintSettingsExtendedData(
  1179. PMPrintSettings printSettings,
  1180. OSType dataID,
  1181. UInt32 size,
  1182. void * extendedData);
  1183. /*
  1184. * PMGetDestination()
  1185. *
  1186. * Availability:
  1187. * Non-Carbon CFM: not available
  1188. * CarbonLib: in CarbonLib 1.1 and later
  1189. * Mac OS X: in version 10.0 and later
  1190. */
  1191. EXTERN_API( OSStatus )
  1192. PMGetDestination(
  1193. PMPrintSettings printSettings,
  1194. PMDestinationType * destType,
  1195. CFURLRef * fileURL);
  1196. /*
  1197. * PMGetJobName()
  1198. *
  1199. * Availability:
  1200. * Non-Carbon CFM: not available
  1201. * CarbonLib: in CarbonLib 1.0 and later
  1202. * Mac OS X: in version 10.0 and later
  1203. */
  1204. EXTERN_API( OSStatus )
  1205. PMGetJobName(
  1206. PMPrintSettings printSettings,
  1207. StringPtr name);
  1208. /*
  1209. * PMSetJobName()
  1210. *
  1211. * Availability:
  1212. * Non-Carbon CFM: not available
  1213. * CarbonLib: in CarbonLib 1.0 and later
  1214. * Mac OS X: in version 10.0 and later
  1215. */
  1216. EXTERN_API( OSStatus )
  1217. PMSetJobName(
  1218. PMPrintSettings printSettings,
  1219. StringPtr name);
  1220. /*
  1221. * PMGetCopies()
  1222. *
  1223. * Availability:
  1224. * Non-Carbon CFM: not available
  1225. * CarbonLib: in CarbonLib 1.0 and later
  1226. * Mac OS X: in version 10.0 and later
  1227. */
  1228. EXTERN_API( OSStatus )
  1229. PMGetCopies(
  1230. PMPrintSettings printSettings,
  1231. UInt32 * copies);
  1232. /*
  1233. * PMSetCopies()
  1234. *
  1235. * Availability:
  1236. * Non-Carbon CFM: not available
  1237. * CarbonLib: in CarbonLib 1.0 and later
  1238. * Mac OS X: in version 10.0 and later
  1239. */
  1240. EXTERN_API( OSStatus )
  1241. PMSetCopies(
  1242. PMPrintSettings printSettings,
  1243. UInt32 copies,
  1244. Boolean lock);
  1245. /*
  1246. * PMGetFirstPage()
  1247. *
  1248. * Availability:
  1249. * Non-Carbon CFM: not available
  1250. * CarbonLib: in CarbonLib 1.0 and later
  1251. * Mac OS X: in version 10.0 and later
  1252. */
  1253. EXTERN_API( OSStatus )
  1254. PMGetFirstPage(
  1255. PMPrintSettings printSettings,
  1256. UInt32 * first);
  1257. /*
  1258. * PMSetFirstPage()
  1259. *
  1260. * Availability:
  1261. * Non-Carbon CFM: not available
  1262. * CarbonLib: in CarbonLib 1.0 and later
  1263. * Mac OS X: in version 10.0 and later
  1264. */
  1265. EXTERN_API( OSStatus )
  1266. PMSetFirstPage(
  1267. PMPrintSettings printSettings,
  1268. UInt32 first,
  1269. Boolean lock);
  1270. /*
  1271. * PMGetLastPage()
  1272. *
  1273. * Availability:
  1274. * Non-Carbon CFM: not available
  1275. * CarbonLib: in CarbonLib 1.0 and later
  1276. * Mac OS X: in version 10.0 and later
  1277. */
  1278. EXTERN_API( OSStatus )
  1279. PMGetLastPage(
  1280. PMPrintSettings printSettings,
  1281. UInt32 * last);
  1282. /*
  1283. * PMSetLastPage()
  1284. *
  1285. * Availability:
  1286. * Non-Carbon CFM: not available
  1287. * CarbonLib: in CarbonLib 1.0 and later
  1288. * Mac OS X: in version 10.0 and later
  1289. */
  1290. EXTERN_API( OSStatus )
  1291. PMSetLastPage(
  1292. PMPrintSettings printSettings,
  1293. UInt32 last,
  1294. Boolean lock);
  1295. /************************/
  1296. /* The default page range is from 1-32000. The page range is something that is */
  1297. /* set by the application. It is NOT the first and last page to print. It serves */
  1298. /* as limits for setting the first and last page. You may pass kPMPrintAllPages for */
  1299. /* the maxPage value to specified that all pages are available for printing. */
  1300. /************************/
  1301. /*
  1302. * PMGetPageRange()
  1303. *
  1304. * Availability:
  1305. * Non-Carbon CFM: not available
  1306. * CarbonLib: in CarbonLib 1.0 and later
  1307. * Mac OS X: in version 10.0 and later
  1308. */
  1309. EXTERN_API( OSStatus )
  1310. PMGetPageRange(
  1311. PMPrintSettings printSettings,
  1312. UInt32 * minPage,
  1313. UInt32 * maxPage);
  1314. /************************/
  1315. /* The first and last page are immediately clipped to the new range */
  1316. /************************/
  1317. /*
  1318. * PMSetPageRange()
  1319. *
  1320. * Availability:
  1321. * Non-Carbon CFM: not available
  1322. * CarbonLib: in CarbonLib 1.0 and later
  1323. * Mac OS X: in version 10.0 and later
  1324. */
  1325. EXTERN_API( OSStatus )
  1326. PMSetPageRange(
  1327. PMPrintSettings printSettings,
  1328. UInt32 minPage,
  1329. UInt32 maxPage);
  1330. /*
  1331. * PMSetProfile()
  1332. *
  1333. * Availability:
  1334. * Non-Carbon CFM: not available
  1335. * CarbonLib: in CarbonLib 1.0 and later
  1336. * Mac OS X: in version 10.0 and later
  1337. */
  1338. EXTERN_API( OSStatus )
  1339. PMSetProfile(
  1340. PMPrintSettings printSettings,
  1341. PMTag tag,
  1342. const CMProfileLocation * profile);
  1343. /*
  1344. * PMSetCollate()
  1345. *
  1346. * Availability:
  1347. * Non-Carbon CFM: not available
  1348. * CarbonLib: in CarbonLib 1.6 and later
  1349. * Mac OS X: in version 10.2 and later
  1350. */
  1351. EXTERN_API( OSStatus )
  1352. PMSetCollate(
  1353. PMPrintSettings printSettings,
  1354. Boolean collate);
  1355. /*
  1356. * PMGetCollate()
  1357. *
  1358. * Availability:
  1359. * Non-Carbon CFM: not available
  1360. * CarbonLib: in CarbonLib 1.6 and later
  1361. * Mac OS X: in version 10.2 and later
  1362. */
  1363. EXTERN_API( OSStatus )
  1364. PMGetCollate(
  1365. PMPrintSettings printSettings,
  1366. Boolean * collate);
  1367. /*
  1368. * PMServerCreatePrinterList()
  1369. *
  1370. * Availability:
  1371. * Non-Carbon CFM: not available
  1372. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1373. * Mac OS X: in version 10.2 and later
  1374. */
  1375. EXTERN_API( OSStatus )
  1376. PMServerCreatePrinterList(
  1377. PMServer server,
  1378. CFArrayRef * printerList);
  1379. /*
  1380. * PMPrinterGetName()
  1381. *
  1382. * Availability:
  1383. * Non-Carbon CFM: not available
  1384. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1385. * Mac OS X: in version 10.2 and later
  1386. */
  1387. EXTERN_API( CFStringRef )
  1388. PMPrinterGetName(PMPrinter printer);
  1389. /*
  1390. * PMPrinterGetID()
  1391. *
  1392. * Availability:
  1393. * Non-Carbon CFM: not available
  1394. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1395. * Mac OS X: in version 10.2 and later
  1396. */
  1397. EXTERN_API( CFStringRef )
  1398. PMPrinterGetID(PMPrinter printer);
  1399. /*
  1400. * PMPrinterIsDefault()
  1401. *
  1402. * Availability:
  1403. * Non-Carbon CFM: not available
  1404. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1405. * Mac OS X: in version 10.2 and later
  1406. */
  1407. EXTERN_API( Boolean )
  1408. PMPrinterIsDefault(PMPrinter printer);
  1409. /*
  1410. * PMPrinterGetLocation()
  1411. *
  1412. * Availability:
  1413. * Non-Carbon CFM: not available
  1414. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1415. * Mac OS X: in version 10.2 and later
  1416. */
  1417. EXTERN_API( CFStringRef )
  1418. PMPrinterGetLocation(PMPrinter printer);
  1419. /*
  1420. * PMPrinterGetState()
  1421. *
  1422. * Availability:
  1423. * Non-Carbon CFM: not available
  1424. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1425. * Mac OS X: in version 10.2 and later
  1426. */
  1427. EXTERN_API( OSStatus )
  1428. PMPrinterGetState(
  1429. PMPrinter printer,
  1430. PMPrinterState * state);
  1431. /*
  1432. * PMPrinterGetDeviceURI()
  1433. *
  1434. * Summary:
  1435. * Hand back the URI of the printer's device.
  1436. *
  1437. * Discussion:
  1438. * If defined on OS 9 this function returns kPMNotImplemented.
  1439. *
  1440. * Parameters:
  1441. *
  1442. * printer:
  1443. * The printer whose device URI is to be retrieved.
  1444. *
  1445. * deviceURI:
  1446. * On exit, if successful *'deviceURI' will contain a reference to
  1447. * a CFURL describing the printer's device. The caller is
  1448. * responsible for releasing this reference. If this call returns
  1449. * an error, then *'deviceURI' will be set to NULL.
  1450. *
  1451. * Availability:
  1452. * Non-Carbon CFM: not available
  1453. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1454. * Mac OS X: in version 10.2 and later
  1455. */
  1456. EXTERN_API( OSStatus )
  1457. PMPrinterGetDeviceURI(
  1458. PMPrinter printer,
  1459. CFURLRef * deviceURI);
  1460. /*
  1461. * PMPrinterIsFavorite()
  1462. *
  1463. * Summary:
  1464. * Return true if the printer is in the user's favorite printer list.
  1465. *
  1466. * Availability:
  1467. * Non-Carbon CFM: not available
  1468. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1469. * Mac OS X: in version 10.2 and later
  1470. */
  1471. EXTERN_API( Boolean )
  1472. PMPrinterIsFavorite(PMPrinter printer);
  1473. /*
  1474. * PMCGImageCreateWithEPSDataProvider()
  1475. *
  1476. * Summary:
  1477. * Create an image reference that references both the PostScript
  1478. * contents of an EPS file and a preview (proxy) image for that EPS
  1479. * file.
  1480. *
  1481. * Discussion:
  1482. * For OS X 10.1.0, this function ignores the passed in data
  1483. * provider. The passed in image reference is retained and then
  1484. * returned. For 10.1.1 and later, then the data provider is used
  1485. * and the returned image reference is different than the passed in
  1486. * image reference, so please be careful with your use of these
  1487. * references. It is likely that the data will not be read from the
  1488. * EPS data provider until well after this function returns. The
  1489. * caller should be careful not to free the underlying EPS data
  1490. * until the provider's release routine is invoked. Similarly the
  1491. * preview image's data may be needed long after you think it should
  1492. * be. Do not free the image data until the image data provider's
  1493. * release data function has been called. To make sure these data
  1494. * providers are properly reference counted, release your reference
  1495. * the EPS data provider and on the EPS image preview when they are
  1496. * no longer needed by your application. For Mac OS X 10.2 and
  1497. * later, the contents of the EPS provider at the time of this call
  1498. * can be dumped to a file if you first do the following, BEFORE
  1499. * running your application. From the command line in terminal:
  1500. * defaults write NSGlobalDomain com.apple.print.eps.testProvider
  1501. * /tmp/dump.eps causes a dump of the EPS data into a file
  1502. * /tmp/dump.eps.
  1503. *
  1504. * Parameters:
  1505. *
  1506. * epsDataProvider:
  1507. * A Core Graphics data provider that can supply the PostScript
  1508. * contents of the EPS file. Post OS X 10.1, there will be some
  1509. * checking done on the EPS data provided to the
  1510. * PMCGImageCreateWithEPSDataProvider() call. It is important that
  1511. * the EPS data begin with the EPSF required header and bounding
  1512. * box DSC comments.
  1513. *
  1514. * epsPreview:
  1515. * A Core Graphics image reference to the proxy image for the EPS
  1516. * file. When the image reference result of this function is
  1517. * rendered on screen or printed to a printer that can not render
  1518. * PostScript this proxy image is drawn instead.
  1519. *
  1520. * Result:
  1521. * an image reference capable of rendering either the EPS content or
  1522. * the proxy image depending upon the capabilities of the targeted
  1523. * context.
  1524. *
  1525. * Availability:
  1526. * Non-Carbon CFM: not available
  1527. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1528. * Mac OS X: in version 10.1 and later
  1529. */
  1530. EXTERN_API( CGImageRef )
  1531. PMCGImageCreateWithEPSDataProvider(
  1532. CGDataProviderRef epsDataProvider,
  1533. CGImageRef epsPreview);
  1534. #ifdef PRAGMA_IMPORT_OFF
  1535. #pragma import off
  1536. #elif PRAGMA_IMPORT
  1537. #pragma import reset
  1538. #endif
  1539. #ifdef __cplusplus
  1540. }
  1541. #endif
  1542. #endif /* __PMCORE__ */