[Previous] [Contents] [Index] [Next]

PpLoadDefaultPrinter()

Initialize a print context with information for the default printer

Synopsis:

int PpLoadDefaultPrinter( PpPrintContext_t *pc );

Library:

ph

Description:

This function initializes the provided print context with the information found in $HOME/.ph/print/config for the default printer.

Returns:

0
Success.
-1
No default printer could be found, or the printer definition that was loaded didn't define a destination device or filename, so no output can be generated.

Examples:

PpPrintContext_t *pc = PpCreatePC();
PpLoadDefaultPrinter( pc );
PpStartJob( pc );

PpContinueJob( pc );

// Draw stuff

PpSuspendJob( pc );
PpEndJob( pc );
PpReleasePC( pc );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PpContinueJob(), PpCreatePC(), PpEndJob(), PpFreePrinterList(), PpGetPC(), PpLoadPrinter(), PpLoadPrinterList(), PpPrintNewPage(), PpPrintWidget(), PpReleasePC(), PpSetPC(), PpStartJob(), PpSuspendJob(), PtPrintSelection()

Printing chapter of the Programmer's Guide


[Previous] [Contents] [Index] [Next]