ftp.nice.ch/pub/next/unix/developer/plplot.3.0.s.tar.gz#/plplot/include/dispatch.h

This is dispatch.h in view mode; [Download] [Up]

/* 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 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_orient  : set plot orientation. */
/* pl_select  : Set graphics storage file pointer. 
 *              This routine is also optional. 
 *              This routine must be called before plstar(), plbeg(),
 *              plenv(), or pladv(). */
/* 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_eop     : End current page (flush buffers) */
/* 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. */
/* pl_cwin    : Switch to command window */
/* pl_gwin    : Switch to graphics window */

/* 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(). The purpose of pl_text() is to allow the user to
 *       place device-dependent characters on the graph.  The user is 
 *       responsible for positioning these characters.  Its use is
 *       discouraged. pl_cwin() and pl_gwin() are provided to allow the
 *       user to switch between a command mode and a graphics mode.
 *       In command mode i/o to standard input/output can be accomplished.
 */

#include <stdio.h>

struct dispatch_table {
   char *pl_MenuStr;
   void (*pl_setup) PLARGS((double xdpi, double ydpi, int xwid, int ywid));
   void (*pl_orient) PLARGS((int orient));
   void (*pl_select) PLARGS((FILE *fileptr));
   void (*pl_init) PLARGS((void));
   void (*pl_line) PLARGS((int x1, int y1, int x2, int y2));
   void (*pl_clear) PLARGS((void));
   void (*pl_page) PLARGS((void));
   void (*pl_eop) PLARGS((void));
   void (*pl_tidy) PLARGS((void));
   void (*pl_color) PLARGS((int color));
   void (*pl_text) PLARGS((void));
   void (*pl_graph) PLARGS((void));
   void (*pl_width) PLARGS((int width));
   void (*pl_cwin) PLARGS((void));
   void (*pl_gwin) PLARGS((void));
};

typedef struct dispatch_table  DISPATCH_TABLE;

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.