Developer --> Technical Publications

     


New Data Types and Accessor Functions

The Carbon Printing Manager replaces the Classic print record ( TPrint ) with two opaque data types, the PMPrintSettings object and the PMPageFormat object. All references to elements of the TPrint record in your code must be updated to refer to one of these objects, using the new accessor functions provided.

Because the PMPrintSettings and PMPageFormat objects are opaque, your application must not make assumptions about their size or internal structure. You will need to update any code that loads, stores, or directly manipulates the TPrint record.

Table 2-3 lists the accessor functions you can use to examine elements of the PMPrintSettings and PMPageFormat objects.

Table 2-3   Carbon accessor functions for Classic print record (TPrint) fields
Data Structure Element Accessor Function
TPrint iPrVersion not supported
(Use PMGetDriverReleaseInfo to obtain a driver's version strings.)
prInfo see TPrInfo
rPaper PMGetAdjustedPaperRect
prStl see TPrStl
prInfoPT not supported
prXInfo not supported
prJob see TPrJob
printX[19] not supported
TPrInfo iDev not supported
iVRes PMGetResolution
iHRes PMGetResolution
rPage PMGetAdjustedPageRect
TPrStl wDev PMGetOrientation
iPageV not supported
iPageH not supported
bPort not supported
feed not supported
TPrJob iFstPage PMGetFirstPage
iLstPage PMGetLastPage
iCopies PMGetCopies
bJDocLoop not supported
fFromUsr not supported
pIdleProc PMSetIdleProc
pFileName not supported
iFileVol not supported
bFileVers not supported
bJobX not supported

When you use these accessor functions, be sure to pass the appropriate constant for any parameters you do not want to pass to the function or receive from it. For example, pass the kPMDontWantData constant in place of a parameter that returns data you're not interested in.

Your application must dispose of any structures, references, or other data returned by Carbon Printing Manager functions. Your application should also dispose of the PMPrintSettings and PMPageFormat objects when they are no longer needed.


© 2000 Apple Computer, Inc. (Last Updated 03 July 2000)