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.
1756 lines
46 KiB
1756 lines
46 KiB
5 years ago
|
/*
|
||
|
File: PMCore.h
|
||
|
|
||
|
Contains: Carbon Printing Manager Interfaces.
|
||
|
|
||
|
Version: QuickTime 7.3
|
||
|
|
||
|
Copyright: (c) 2007 (c) 1998-2001 by Apple Computer, Inc., all rights reserved
|
||
|
|
||
|
Bugs?: For bug reports, consult the following page on
|
||
|
the World Wide Web:
|
||
|
|
||
|
http://developer.apple.com/bugreporter/
|
||
|
|
||
|
*/
|
||
|
#ifndef __PMCORE__
|
||
|
#define __PMCORE__
|
||
|
|
||
|
#ifndef __MACERRORS__
|
||
|
#include <MacErrors.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __FILES__
|
||
|
#include <Files.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __CFSTRING__
|
||
|
#include <CFString.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __CFURL__
|
||
|
#include <CFURL.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __QUICKDRAW__
|
||
|
#include <Quickdraw.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __CMAPPLICATION__
|
||
|
#include <CMApplication.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __PMDEFINITIONS__
|
||
|
#include <PMDefinitions.h>
|
||
|
#endif
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
#if PRAGMA_ONCE
|
||
|
#pragma once
|
||
|
#endif
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
#if PRAGMA_IMPORT
|
||
|
#pragma import on
|
||
|
#endif
|
||
|
|
||
|
#ifndef PM_USE_SESSION_APIS
|
||
|
#define PM_USE_SESSION_APIS 1
|
||
|
#endif /* !defined(PM_USE_SESSION_APIS) */
|
||
|
|
||
|
/* Callbacks */
|
||
|
typedef CALLBACK_API( void , PMIdleProcPtr )(void);
|
||
|
typedef STACK_UPP_TYPE(PMIdleProcPtr) PMIdleUPP;
|
||
|
/*
|
||
|
* NewPMIdleUPP()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API_C( PMIdleUPP )
|
||
|
NewPMIdleUPP(PMIdleProcPtr userRoutine);
|
||
|
|
||
|
/*
|
||
|
* DisposePMIdleUPP()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API_C( void )
|
||
|
DisposePMIdleUPP(PMIdleUPP userUPP);
|
||
|
|
||
|
/*
|
||
|
* InvokePMIdleUPP()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API_C( void )
|
||
|
InvokePMIdleUPP(PMIdleUPP userUPP);
|
||
|
|
||
|
#if PM_USE_SESSION_APIS
|
||
|
/*
|
||
|
* PMSessionCreatePrinterList()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.4 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionCreatePrinterList(
|
||
|
PMPrintSession printSession,
|
||
|
CFArrayRef * printerList,
|
||
|
CFIndex * currentIndex,
|
||
|
PMPrinter * currentPrinter);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSessionSetCurrentPrinter()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.4 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionSetCurrentPrinter(
|
||
|
PMPrintSession session,
|
||
|
CFStringRef printerName);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.5 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionSetDestination(
|
||
|
PMPrintSession printSession,
|
||
|
PMPrintSettings printSettings,
|
||
|
PMDestinationType destType,
|
||
|
CFStringRef destFormat,
|
||
|
CFURLRef destLocation);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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 four destination types:
|
||
|
* kPMDestinationPrinter, kPMDestinationFile, kPMDestinationFax and
|
||
|
* kPMDestinationPreview. The first three destination types are
|
||
|
* stored in the print settings. The switch for preview is stored in
|
||
|
* the print session and, if enabled, overrides the destination in
|
||
|
* the print setting. This function is preferred over
|
||
|
* PMGetDestination as the latter does not take a print session
|
||
|
* parameter and therefore can not indicate whether preview has been
|
||
|
* selected as the destination.
|
||
|
*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.5 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionGetDestinationType(
|
||
|
PMPrintSession printSession,
|
||
|
PMPrintSettings printSettings,
|
||
|
PMDestinationType * destTypeP);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.5 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionCopyDestinationFormat(
|
||
|
PMPrintSession printSession,
|
||
|
PMPrintSettings printSettings,
|
||
|
CFStringRef * destFormatP);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.5 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionCopyDestinationLocation(
|
||
|
PMPrintSession printSession,
|
||
|
PMPrintSettings printSettings,
|
||
|
CFURLRef * destLocationP);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionCopyOutputFormatList(
|
||
|
PMPrintSession printSession,
|
||
|
PMDestinationType destType,
|
||
|
CFArrayRef * documentFormatP);
|
||
|
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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 open print session.
|
||
|
*
|
||
|
* printer:
|
||
|
* The printer whose page size list should be enumerated. To get
|
||
|
* the session's current printer, see PMSessionGetCurrentPrinter().
|
||
|
*
|
||
|
* 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.
|
||
|
*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionCreatePageFormatList(
|
||
|
PMPrintSession printSession,
|
||
|
PMPrinter printer,
|
||
|
CFArrayRef * pageFormatList);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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
|
||
|
*/
|
||
|
/*
|
||
|
* PMSessionBeginDocumentNoDialog()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionBeginDocumentNoDialog(
|
||
|
PMPrintSession printSession,
|
||
|
PMPrintSettings printSettings,
|
||
|
PMPageFormat pageFormat);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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
|
||
|
*/
|
||
|
/*
|
||
|
* PMSessionEndDocumentNoDialog()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionEndDocumentNoDialog(PMPrintSession printSession);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionBeginPageNoDialog(
|
||
|
PMPrintSession printSession,
|
||
|
PMPageFormat pageFormat,
|
||
|
const PMRect * pageFrame);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSessionEndPageNoDialog(PMPrintSession printSession);
|
||
|
|
||
|
|
||
|
#else
|
||
|
/*
|
||
|
* PMSetIdleProc()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetIdleProc(PMIdleUPP idleProc);
|
||
|
|
||
|
|
||
|
/* Print loop */
|
||
|
/*
|
||
|
* PMBegin()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMBegin(void);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMEnd()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMEnd(void);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* Valid only within a PMBeginPage/PMEndPage block. You should retrieve the printing */
|
||
|
/* port with this call and set it before imaging a page. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetGrafPtr()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetGrafPtr(
|
||
|
PMPrintContext printContext,
|
||
|
GrafPtr * grafPort);
|
||
|
|
||
|
|
||
|
/* PMPageFormat */
|
||
|
/*
|
||
|
* PMNewPageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMNewPageFormat(PMPageFormat * pageFormat);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMDisposePageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMDisposePageFormat(PMPageFormat pageFormat);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMDefaultPageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMDefaultPageFormat(PMPageFormat pageFormat);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMValidatePageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMValidatePageFormat(
|
||
|
PMPageFormat pageFormat,
|
||
|
Boolean * result);
|
||
|
|
||
|
|
||
|
/* PMPrintSettings */
|
||
|
/*
|
||
|
* PMNewPrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMNewPrintSettings(PMPrintSettings * printSettings);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMDisposePrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMDisposePrintSettings(PMPrintSettings printSettings);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMDefaultPrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMDefaultPrintSettings(PMPrintSettings printSettings);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMValidatePrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMValidatePrintSettings(
|
||
|
PMPrintSettings printSettings,
|
||
|
Boolean * result);
|
||
|
|
||
|
|
||
|
/* Classic Support */
|
||
|
/*
|
||
|
* PMGeneral()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGeneral(Ptr pData);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMConvertOldPrintRecord()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMConvertOldPrintRecord(
|
||
|
Handle printRecordHandle,
|
||
|
PMPrintSettings * printSettings,
|
||
|
PMPageFormat * pageFormat);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMMakeOldPrintRecord()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMMakeOldPrintRecord(
|
||
|
PMPrintSettings printSettings,
|
||
|
PMPageFormat pageFormat,
|
||
|
Handle * printRecordHandle);
|
||
|
|
||
|
|
||
|
/* Driver Information */
|
||
|
/*
|
||
|
* PMIsPostScriptDriver()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMIsPostScriptDriver(Boolean * isPostScript);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetLanguageInfo()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetLanguageInfo(PMLanguageInfo * info);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetDriverCreator()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetDriverCreator(OSType * creator);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetDriverReleaseInfo()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetDriverReleaseInfo(VersRec * release);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetPrinterResolutionCount()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPrinterResolutionCount(UInt32 * count);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetPrinterResolution()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPrinterResolution(
|
||
|
PMTag tag,
|
||
|
PMResolution * res);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetIndexedPrinterResolution()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetIndexedPrinterResolution(
|
||
|
UInt32 index,
|
||
|
PMResolution * res);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* PMEnableColorSync and PMDisableColorSync are valid within */
|
||
|
/* BeginPage/EndPage block */
|
||
|
/************************/
|
||
|
/* ColorSync & PostScript Support */
|
||
|
/*
|
||
|
* PMEnableColorSync()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMEnableColorSync(void);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMDisableColorSync()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMDisableColorSync(void);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* The PMPostScriptxxx calls are valid within a */
|
||
|
/* BeginPage/EndPage block */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMPostScriptBegin()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPostScriptBegin(void);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPostScriptEnd()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPostScriptEnd(void);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* These PMPostScriptxxx calls are valid within a */
|
||
|
/* PMPostScriptBegin/PMPostScriptEnd block */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMPostScriptHandle()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPostScriptHandle(Handle psHandle);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPostScriptData()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPostScriptData(
|
||
|
Ptr psPtr,
|
||
|
Size len);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPostScriptFile()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPostScriptFile(FSSpec * psFile);
|
||
|
|
||
|
|
||
|
/* Error */
|
||
|
/*
|
||
|
* PMError()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMError(void);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetError()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetError(OSStatus printError);
|
||
|
|
||
|
|
||
|
#endif /* PM_USE_SESSION_APIS */
|
||
|
|
||
|
/* PMPageFormat */
|
||
|
/*
|
||
|
* PMCopyPageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMCopyPageFormat(
|
||
|
PMPageFormat formatSrc,
|
||
|
PMPageFormat formatDest);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* Flattening a page format should only be necessary if you intend to preserve */
|
||
|
/* the object settings along with a document. A page format will persist outside of a */
|
||
|
/* PMBegin/PMEnd block. This will allow you to use any accessors on the object without */
|
||
|
/* the need to flatten and unflatten. Keep in mind accessors make no assumption */
|
||
|
/* on the validity of the value you set. This can only be done thru PMValidatePageFormat */
|
||
|
/* in a PMBegin/PMEnd block or with PMSessionValidatePageFormat with a valid session. */
|
||
|
/* It is your responsibility for disposing of the handle. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMFlattenPageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMFlattenPageFormat(
|
||
|
PMPageFormat pageFormat,
|
||
|
Handle * flatFormat);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMUnflattenPageFormat()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMUnflattenPageFormat(
|
||
|
Handle flatFormat,
|
||
|
PMPageFormat * pageFormat);
|
||
|
|
||
|
|
||
|
/* PMPageFormat Accessors */
|
||
|
/************************/
|
||
|
/* PMSetxxx calls only saves the value inside the printing object. They make no assumption on the */
|
||
|
/* validity of the value. This should be done using PMValidatePageFormat/PMSessionValidatePageFormat */
|
||
|
/* Any dependant 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 */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetPageFormatExtendedData()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPageFormatExtendedData(
|
||
|
PMPageFormat pageFormat,
|
||
|
OSType dataID,
|
||
|
UInt32 * size,
|
||
|
void * extendedData);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetPageFormatExtendedData()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetPageFormatExtendedData(
|
||
|
PMPageFormat pageFormat,
|
||
|
OSType dataID,
|
||
|
UInt32 size,
|
||
|
void * extendedData);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* A value of 100.0 means 100% (no scaling). 50.0 means 50% scaling */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetScale()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetScale(
|
||
|
PMPageFormat pageFormat,
|
||
|
double * scale);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetScale()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetScale(
|
||
|
PMPageFormat pageFormat,
|
||
|
double scale);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* This is the drawing resolution of an app. This should not be confused with */
|
||
|
/* the resolution of the printer. You can call PMGetPrinterResolution to see */
|
||
|
/* what resolutions are avaliable for the current printer. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetResolution()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetResolution(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMResolution * res);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetResolution()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetResolution(
|
||
|
PMPageFormat pageFormat,
|
||
|
const PMResolution * res);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* This is the physical size of the paper without regard to resolution, orientation */
|
||
|
/* or scaling. It is returned as a 72dpi value. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetPhysicalPaperSize()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPhysicalPaperSize(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMRect * paperSize);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetPhysicalPaperSize()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetPhysicalPaperSize(
|
||
|
PMPageFormat pageFormat,
|
||
|
const PMRect * paperSize);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* This is the physical size of the page without regard to resolution, orientation */
|
||
|
/* or scaling. It is returned as a 72dpi value. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetPhysicalPageSize()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPhysicalPageSize(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMRect * pageSize);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetAdjustedPaperRect()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetAdjustedPaperRect(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMRect * paperRect);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetAdjustedPageRect()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetAdjustedPageRect(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMRect * pageRect);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetUnadjustedPaperRect()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.1 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetUnadjustedPaperRect(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMRect * paperRect);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetUnadjustedPaperRect()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.1 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetUnadjustedPaperRect(
|
||
|
PMPageFormat pageFormat,
|
||
|
const PMRect * paperRect);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetUnadjustedPageRect()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.1 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetUnadjustedPageRect(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMRect * pageRect);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetAdjustedPageRect()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.1 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetAdjustedPageRect(
|
||
|
PMPageFormat pageFormat,
|
||
|
const PMRect * pageRect);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetOrientation()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetOrientation(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMOrientation * orientation);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetOrientation()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetOrientation(
|
||
|
PMPageFormat pageFormat,
|
||
|
PMOrientation orientation,
|
||
|
Boolean lock);
|
||
|
|
||
|
|
||
|
/* PMPrintSettings */
|
||
|
/*
|
||
|
* PMCopyPrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMCopyPrintSettings(
|
||
|
PMPrintSettings settingSrc,
|
||
|
PMPrintSettings settingDest);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* Flattening a print settings should only be necessary if you intend to preserve */
|
||
|
/* the object settings along with a document. A print settings will persist outside of a */
|
||
|
/* PMBegin/PMEnd block. This allows you to use any accessors on the object without */
|
||
|
/* the need to flatten and unflatten. Keep in mind the accessors make no assumption */
|
||
|
/* on the validity of the value. This can only be done thru PMValidatePrintSettings */
|
||
|
/* in a PMBegin/PMEnd block or with PMSessionValidatePrintSettings with a valid session. */
|
||
|
/* It is your responsibility for disposing of the handle. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMFlattenPrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMFlattenPrintSettings(
|
||
|
PMPrintSettings printSettings,
|
||
|
Handle * flatSettings);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMUnflattenPrintSettings()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMUnflattenPrintSettings(
|
||
|
Handle flatSettings,
|
||
|
PMPrintSettings * printSettings);
|
||
|
|
||
|
|
||
|
/* PMPrintSettings Accessors */
|
||
|
/*
|
||
|
* PMGetPrintSettingsExtendedData()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPrintSettingsExtendedData(
|
||
|
PMPrintSettings printSettings,
|
||
|
OSType dataID,
|
||
|
UInt32 * size,
|
||
|
void * extendedData);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetPrintSettingsExtendedData()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetPrintSettingsExtendedData(
|
||
|
PMPrintSettings printSettings,
|
||
|
OSType dataID,
|
||
|
UInt32 size,
|
||
|
void * extendedData);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetDestination()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.1 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetDestination(
|
||
|
PMPrintSettings printSettings,
|
||
|
PMDestinationType * destType,
|
||
|
CFURLRef * fileURL);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetJobName()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetJobName(
|
||
|
PMPrintSettings printSettings,
|
||
|
StringPtr name);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetJobName()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetJobName(
|
||
|
PMPrintSettings printSettings,
|
||
|
StringPtr name);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetCopies()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetCopies(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 * copies);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetCopies()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetCopies(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 copies,
|
||
|
Boolean lock);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetFirstPage()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetFirstPage(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 * first);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetFirstPage()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetFirstPage(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 first,
|
||
|
Boolean lock);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetLastPage()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetLastPage(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 * last);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetLastPage()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetLastPage(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 last,
|
||
|
Boolean lock);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* The default page range is from 1-32000. 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. You may pass kPMPrintAllPages for */
|
||
|
/* the maxPage value to specified that all pages are available for printing. */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMGetPageRange()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetPageRange(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 * minPage,
|
||
|
UInt32 * maxPage);
|
||
|
|
||
|
|
||
|
/************************/
|
||
|
/* The first and last page are immediately clipped to the new range */
|
||
|
/************************/
|
||
|
/*
|
||
|
* PMSetPageRange()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetPageRange(
|
||
|
PMPrintSettings printSettings,
|
||
|
UInt32 minPage,
|
||
|
UInt32 maxPage);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetProfile()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.0 and later
|
||
|
* Mac OS X: in version 10.0 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetProfile(
|
||
|
PMPrintSettings printSettings,
|
||
|
PMTag tag,
|
||
|
const CMProfileLocation * profile);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMSetCollate()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMSetCollate(
|
||
|
PMPrintSettings printSettings,
|
||
|
Boolean collate);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMGetCollate()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: in CarbonLib 1.6 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMGetCollate(
|
||
|
PMPrintSettings printSettings,
|
||
|
Boolean * collate);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMServerCreatePrinterList()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMServerCreatePrinterList(
|
||
|
PMServer server,
|
||
|
CFArrayRef * printerList);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterGetName()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( CFStringRef )
|
||
|
PMPrinterGetName(PMPrinter printer);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterGetID()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( CFStringRef )
|
||
|
PMPrinterGetID(PMPrinter printer);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterIsDefault()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( Boolean )
|
||
|
PMPrinterIsDefault(PMPrinter printer);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterGetLocation()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( CFStringRef )
|
||
|
PMPrinterGetLocation(PMPrinter printer);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterGetState()
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPrinterGetState(
|
||
|
PMPrinter printer,
|
||
|
PMPrinterState * state);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterGetDeviceURI()
|
||
|
*
|
||
|
* Summary:
|
||
|
* Hand back the URI of the printer's device.
|
||
|
*
|
||
|
* Discussion:
|
||
|
* If defined on OS 9 this function returns kPMNotImplemented.
|
||
|
*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( OSStatus )
|
||
|
PMPrinterGetDeviceURI(
|
||
|
PMPrinter printer,
|
||
|
CFURLRef * deviceURI);
|
||
|
|
||
|
|
||
|
|
||
|
/*
|
||
|
* PMPrinterIsFavorite()
|
||
|
*
|
||
|
* Summary:
|
||
|
* Return true if the printer is in the user's favorite printer list.
|
||
|
*
|
||
|
* Availability:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
|
||
|
* Mac OS X: in version 10.2 and later
|
||
|
*/
|
||
|
EXTERN_API( Boolean )
|
||
|
PMPrinterIsFavorite(PMPrinter printer);
|
||
|
|
||
|
|
||
|
/*
|
||
|
* 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:
|
||
|
* Non-Carbon CFM: not available
|
||
|
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
|
||
|
* Mac OS X: in version 10.1 and later
|
||
|
*/
|
||
|
EXTERN_API( CGImageRef )
|
||
|
PMCGImageCreateWithEPSDataProvider(
|
||
|
CGDataProviderRef epsDataProvider,
|
||
|
CGImageRef epsPreview);
|
||
|
|
||
|
|
||
|
|
||
|
#ifdef PRAGMA_IMPORT_OFF
|
||
|
#pragma import off
|
||
|
#elif PRAGMA_IMPORT
|
||
|
#pragma import reset
|
||
|
#endif
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif /* __PMCORE__ */
|
||
|
|