GEOS SDK TechDocs
|
|
7 Other Printing Components
|
7.2 Printer Drivers
SpoolInfo(), SpoolHurryJob(), SpoolDelayJob(), SpoolModifyPriority(), SpoolVerifyPrinterPort(), SpoolCreateSpoolFile(), SpoolDelJob(), MSG_PRINT_NOTIFY_PRINT_JOB_CREATED
Geodes may invoke certain routines that affect the Spooler, but for the most part they should avoid this practice. These routines allow the geode to take advantage of some of the Spooler's scheduling capabilities, so the geode can hurry some jobs and delay others. Most applications should not be concerned with the scheduling of printer jobs. If the user thinks that some job should be given a higher priority, he can work with the Printer Control Panel. Many of the following routines require the print job's ID. Applications that will use these routines should have a handler for
MSG_PRINT_NOTIFY_PRINT_JOB_CREATED
, which has reference material at the end of this section.
For those applications that will be scheduling, the
SpoolHurryJob()
and
SpoolDelayJob()
routines may come in handy. Passed a job ID, these routines move the associated job to the front or back of the queue.
SpoolModifyPriority()
changes the priority of a spool thread so that it may print in the foreground or be moved further into the background. Each function returns a code describing the Spool's Operating Status, alerting the geode if the job wasn't found, the queue was empty, the port couldn't be verified, or even if the operation was successful.
The
SpoolInfo()
routine returns the list of jobs on a queue or information about any individual job. The other kind of information application writers might be interested in is the printer port status. It's sometimes unwise to spool a job when the printer is having problems, and
SpoolVerifyPrinterPort()
can give some warning about problems.
While the above routines are used only rarely in applications, there are others that are used even less often.
SpoolCreateSpoolFile()
creates a spool file, which may be used to create a pre-generated job for the printer kept handy. Such a file would only be useful to applications that can only print one thing and don't mind leaving around an extra spool file.
SpoolDelJob()
deletes jobs from the queue.
void MSG_PRINT_NOTIFY_PRINT_JOB_CREATED(
optr printControlOD,
word jobID);
The PrintControl sends this message when it has sent the job to the print queue. Applications may intercept this message to retrieve the new job's ID number or for any other reason.
Source: PrintControl object.
Destination:
GCI_output
object.
Parameters: printControlOD The optr of the PrintControl object.
Return: Nothing.
Interception: Applications that want to know the ID of created jobs should intercept this message. Note that this behavior is not encouraged, and most applications will want to leave meddling with a print job's status up to the user's discretion.
GEOS SDK TechDocs
|
|
7 Other Printing Components
|
7.2 Printer Drivers