Up: GEOS SDK TechDocs | Up | Prev: SpeedDialGetNumber() ... | Next: SpoolModifyPriority() ...

SpoolGetNumPaperSizes()

void	SpoolGetNumPaperSizes(
        NumPaperSizesInfo		*sizesInfo, 
        PageType 		type);				

Use this routine to find the number of paper sizes, both pre-defined and user-defined, that should appear in a paper size list. The number of paper sizes, along with the index of the default paper size will be returned in a Num

Structures:

        typedef struct {
                word    NPSI_numSizes;
                word    NPSI_defaultSize;
        } NumPaperSizesInfo;

Include: spool.goh

SpoolGetNumPrinters()

word	SpoolGetNumPrinters(
        PrinterDriverType		type,				   /* driver type */
        byte		localOnlyFlag); /* non-zero if only 
								* locally-defined printers should
								* be counted. */

This routine returns the number of installed printers with the given type.

Include: spool.goh

SpoolGetPaperSize()

void 	SpoolGetPaperSize(
        PaperSizeInfo		sizeInfo, 			/* This must be between 0 and the return 
					 	 * value of SpoolGetNumPaperSizes() */
        word		paperSizeNum,	 		/* a paper size number between
								0 and SpoolGetNumPaperSizes() */
        PageType 		*pageType);			/* page type*/

Use this routine to determine the dimensions of a paper size.

Structures:

        typedef struct {
            word        PSI_width;          /* width, in points */
            word        PSI_height;         /* height, in points */
            PageLayout  PSI_defaultLayout;
        } PaperSizeInfo;

Include: spool.goh

SpoolGetPaperSizeOrder()

void	SpoolGetPaperSizeOrder( 
        byte 		*order, 			/* buffer of size MAX_PAPER_SIZES */
						/* On return, this buffer will be 
						 * filled with the page size numbers
						 * arranged in the order 
						 * corresponding to their display */
        byte 		*userSizes,		 	/* buffer of size MAX_PAPER_SIZES */
						/* On return, will hold ordered 
						 * array of user paper sizes. */
        PaperSizeOrderInfo		*numBuf,			/* empty PaperSizeOrderInfo struct */
        PageType                    pageType);  /* What sort of paper we're interested in */

This routine retrieves the paper size order array.

Structures:

        typedef struct {
            word    PSOI_numOrdered;    /* number of ordered sizes */
            word    PSOI_numUnused;     /* number of unused sizes */
        } PaperSizeOrderInfo;

Include: spool.goh

SpoolGetPaperString()

word	SpoolGetPaperString( /* true if error*/
        char	   *stringBuf,		/* empty buffer MAX_PAPER_STRING_LENGTH */
        word	   paperSizeNum,		/* returned name string */
        PageType	  prtrNum);		/* printer number */

Use this routine to determine the string to be displayed for a specific paper size. Upon return, stringBuf will have been filled with a null-terminated string describing the paper. The routine's return value is the length of the paper string, not including the null terminator.

Include: spool.goh

SpoolGetPrinterString()

Boolean	SpoolGetPrinterString( /* Returns true if error */
        PrinterStringInfo	   *retInfo,					/* pass empty structure */
        word	  	printerNum);				/* printer number */

This routine fills a buffer with the requested null-terminated printer name string. If the printer could not be found, the return value will be true (set for error).

Include: spool.goh

SpoolHurryJob()

SpoolOpStatus 	SpoolHurryJob(
        word 	JobID);

This routine moves a print job to the head of the print queue.

SpoolInfo()

SpoolOpStatus 	SpoolInfo(
        SpoolInfoType 		infoType,
        SpoolInfoParams 		*params);

This routine returns various types of information about the print queue's status. You may request information about the queue or about any job on the queue.

Structures:

        typedef enum /* word */ {
            SIT_JOB_INFO    = 0,
            SIT_QUEUE_INFO  = 2
        } SpoolInfoType;

The passed SpoolInfoType specifies whether you seek information about the print queue or a single job on the queue.

        typedef union {
            SpoolInfoQueueParams    SIP_queueParams;
            SpoolInfoJobParams      SIP_jobParams;
        } SpoolInfoParams;

The type of parameters used depend on the passed SpoolInfoType .

        typedef struct {
            Boolean 			SIQP_activityQuery;
            PrintPortInfo 			*SIQP_portInfo;
            MemHandle 			SIQP_retBlock;
            word 			SIQP_retNumJobs;
        } SpoolInfoQueueParams;

This structure contains information about the print queue and the SIQP_retBlock field points to a block of JobStatus structures.

        typedef struct {
            word        SIJP_jobID;
            MemHandle   SIJP_retBlock;
        } SpoolInfoJobParams;

This structure is used to pass the ID of the job to describe. The passed block will hold la JobStatus on return.

        typedef struct {
            char JS_fname[13]; /* std DOS (8.3) spool filename */
            char JS_parent[FILE_LONGNAME_LENGTH+1]; /* parent app's name */
            char JS_documentName[FILE_LONGNAME_LENGTH+1]; /* document name */
            word JS_numPages;                   /* # pages in document */
            SpoolTimeStruct JS_time;            /* time spooled */
            byte JS_printing;                   /* TRUE/FALSE if we are printing */
        } JobStatus;

Each JobStatus structure describes a single print job.


Up: GEOS SDK TechDocs | Up | Prev: SpeedDialGetNumber() ... | Next: SpoolModifyPriority() ...