[Previous] [Contents] [Next]

Printer Library

The prlib library includes the following functions:

Function Summary
init_slice() Initialize the _doc_ctrl structure
prlib_main() Main program
my_abort() A function called when the program terminates abnormally
my_done() A routine called when the program is about to terminate
my_enddocument() End processing of the document
my_endpage() A function called at the end of each page
my_endslice() A function called at the end of each slice
my_inform() Inform anyone interested that the print job is complete
my_init() Initialize the _doc_ctrl structure
my_main() Initialize the program and parse command-line arguments
my_startdocument() A function called at the beginning of the document
my_startpage() A function called at the beginning of a page
my_startrender() A function called after the render context has been created
my_startslice() A function called at the beginning of each slice
process_slice() Process a slice of a page to be printed.

Note: There are default cover functions for all these functions. When a function is defined in your code, the linker includes that version instead of the prlib version.

You'll probably want to use the default version of these functions:

The flow of control in the default functions is shown below.


prlib flow of control


Flow of control in the default prlib functions.


When your phs file is processed, these functions are called in the following order:


Order of functions


Order in which prlib functions are called when processing a file.



Note: Most of the functions in the printer library return:
EOK
Success.
Any other value
An error occurred.

However, these return codes are currently ignored.



[Previous] [Contents] [Next]