A dispatch table is used to direct function calls to whatever driver is chosen at run-time. Below are listed the names of each entry in the PLDispatchTable dispatch table struct defined in plcore.h. The entries specific to each device (defined in drivers/*.c) are typically named similarly but with "pl_" replaced by a string specific for that device (the logical order must be preserved, however). The dispatch table entries are :
pl_MenuStr: Pointer to string that is printed in device menu.
pl_DevName: A short device "name" for device selection by name.
pl_type: 0 for file-oriented device, 1 for interactive (the null driver uses -1 here).
pl_init: Initialize device. This routine may also prompt the user for certain device parameters or open a graphics file (see Notes). Called only once to set things up. Certain options such as familying and resolution (dots/mm) should be set up before calling this routine (note: some drivers ignore these).
pl_line: Draws a line between two points.
pl_polyline: Draws a polyline (no broken segments).
pl_eop: Finishes out current page (see Notes).
pl_bop: Set up for plotting on a new page. May also open a new a new graphics file (see Notes).
pl_tidy: Tidy up. May close graphics file (see Notes).
pl_state: Handle change in PLStream state (color, pen width, fill attribute, etc).
pl_esc: Escape function for driver-specific commands.