/* Declare structure containing pointers to device dependent functions. */

/* pl_MenuStr : Pointer to string that is printed in device menu. */
/* pl_setup   : Use this routine to set orientation, x and y  resolution
 *              (dots/mm)  and x and y page widths. Some device drivers
 *              may  choose to ignore any or all of these. A call to
 *              this routine is optional! If a particular driver requires
 *              any of these parameters and they are not set by a call to
 *              pl_setup() then they should be prompted for in pl_init().
 *              The user may call this routine only once and it is called
 *              before plstar() or plbeg(). */
/* pl_file    : Set graphics storage file name. This routine is also
 *              optional. If a device requires a file for storage, the
 *              file name should be prompted for if this routine is not
 *              used. This routine may be called before plstar(), plbeg(),
 *              plenv(), or pladv(). This routine does NOT open the file. */
/* pl_init    : Initialize device.  This routine may also prompt the user
 *              for certain device parameters or open a graphics file (see
 *               note). Called only once to set things up. */
/* pl_line    : Draws a line between two points. */
/* pl_clear   : Clears screen or ejects page or closes file (see note). */
/* pl_page    : Set up for plotting on a new page. May also open a new
 *              a new graphics file (see note). */
/* pl_tidy    : Tidy up. May close graphics file (see note). */
/* pl_color   : Change pen color. */
/* pl_text    : Switch device to text mode. */
/* pl_graph   : Switch device to graphics mode. */
/* pl_width   : Set graphics pen width. */

/* NOTE: Some devices allow multi-page plots to be stored in a single *
 *       graphics file, in which case the graphics file should be opened *
 *       in the pl_init() routine and closed in pl_tidy(). If multi-page *
 *       plots need to be stored in different files then pl_page() should *
 *       open the file and pl_clear() should close it. Do NOT open files *
 *       in both pl_init() and pl_page() or close files in both pl_clear() *
 *       and pl_tidy() */

struct dispatch_table {
   char *pl_MenuStr;
   void (*pl_setup) PLARGS((PLFLT xdpi, PLFLT ydpi, PLINT xwid, PLINT ywid));
   void (*pl_select) PLARGS((PLINT orient, char *filename));
   void (*pl_init) PLARGS((void));
   void (*pl_line) PLARGS((PLINT x1, PLINT y1, PLINT x2, PLINT y2));
   void (*pl_clear) PLARGS((void));
   void (*pl_page) PLARGS((void));
   void (*pl_tidy) PLARGS((void));
   void (*pl_color) PLARGS((PLINT color));
   void (*pl_text) PLARGS((void));
   void (*pl_graph) PLARGS((void));
   void (*pl_width) PLARGS((PLINT width));
};

typedef struct dispatch_table  DISPATCH_TABLE;
