PLplot: disptab.h Source File

PLplot 5.15.0

disptab.h
Go to the documentation of this file.
1 // Defines the data structure which holds the driver functions.
2 //
3
4 #ifndef __DISPATCH_H__
5 #define __DISPATCH_H__
6
7 #include "plConfig.h"
8
9 struct PLStream_struct;
10
11 enum
12 {
13 plDevType_FileOriented = 0,
14 plDevType_Interactive = 1,
15 plDevType_Null = -1
16 };
17
18 //--------------------------------------------------------------------------
19 // Define structure containing pointers to device dependent functions.
20 //
21 // pl_MenuStr Pointer to string that is printed in device menu.
22 //
23 // pl_DevName A short device "name" for device selection by name.
24 //
25 // pl_type 0 for file-oriented device, 1 for interactive
26 // (the null driver uses -1 here)
27 //
28 // pl_seq The sequence number for ordering the presentation list of the
29 // available drivers. This is an ordering only, not an absolute
30 // position in the list.
31 //
32 // pl_init Initialize device. This routine may also prompt the user
33 // for certain device parameters or open a graphics file
34 // (see note). Called only once to set things up. Certain
35 // options such as familying and resolution (dots/mm) should
36 // be set up before calling this routine (note: some drivers
37 // ignore these).
38 //
39 // pl_line Draws a line between two points.
40 //
41 // pl_polyline Draws a polyline (no broken segments).
42 //
43 // pl_eop Finishes out current page (see note).
44 //
45 // pl_bop Set up for plotting on a new page. May also open a new
46 // a new graphics file (see note).
47 //
48 // pl_tidy Tidy up. May close graphics file (see note).
49 //
50 // pl_state Handle change in PLStream state
51 // (color, pen width, fill attribute, etc).
52 //
53 // pl_esc Escape function for driver-specific commands.
54 //
55 //
56 // Notes:
57 //
58 // Most devices allow multi-page plots to be stored in a single graphics
59 // file, in which case the graphics file should be opened in the pl_init()
60 // routine, closed in pl_tidy(), and page advances done by calling pl_eop
61 // and pl_bop() in sequence. If multi-page plots need to be stored in
62 // different files then pl_bop() should open the file and pl_eop() should
63 // close it. Do NOT open files in both pl_init() and pl_bop() or close
64 // files in both pl_eop() and pl_tidy().
65 //--------------------------------------------------------------------------
66
67 typedef void ( *plD_init_fp )( struct PLStream_struct * );
68 typedef void ( *plD_line_fp )( struct PLStream_struct *, short, short, short, short );
69 typedef void ( *plD_polyline_fp )( struct PLStream_struct *, short *, short *, PLINT );
70 typedef void ( *plD_eop_fp )( struct PLStream_struct * );
71 typedef void ( *plD_bop_fp )( struct PLStream_struct * );
72 typedef void ( *plD_tidy_fp )( struct PLStream_struct * );
73 typedef void ( *plD_state_fp )( struct PLStream_struct *, PLINT );
74 typedef void ( *plD_esc_fp )( struct PLStream_struct *, PLINT, void * );
75 typedef void ( *plD_wait_fp )( struct PLStream_struct * );
76
77 typedef struct
78 {
79 const char *pl_MenuStr;
80 const char *pl_DevName;
81 int pl_type;
82 int pl_seq;
83 plD_init_fp pl_init;
84 plD_line_fp pl_line;
85 plD_polyline_fp pl_polyline;
86 plD_eop_fp pl_eop;
87 plD_bop_fp pl_bop;
88 plD_tidy_fp pl_tidy;
89 plD_state_fp pl_state;
90 plD_esc_fp pl_esc;
91 plD_wait_fp pl_wait;
92 } PLDispatchTable;
93
94 #endif // __DISPATCH_H__
plConfig.h
plDevType_Interactive
Definition: disptab.h:14
PLDispatchTable::pl_esc
plD_esc_fp pl_esc
Definition: disptab.h:90
plDevType_FileOriented
Definition: disptab.h:13
plD_tidy_fp
void(* plD_tidy_fp)(struct PLStream_struct *)
Definition: disptab.h:72
PLDispatchTable::pl_seq
int pl_seq
Definition: disptab.h:82
PLDispatchTable::pl_MenuStr
const char * pl_MenuStr
Definition: disptab.h:79
PLDispatchTable::pl_tidy
plD_tidy_fp pl_tidy
Definition: disptab.h:88
plD_init_fp
void(* plD_init_fp)(struct PLStream_struct *)
Definition: disptab.h:67
plD_eop_fp
void(* plD_eop_fp)(struct PLStream_struct *)
Definition: disptab.h:70
plD_wait_fp
void(* plD_wait_fp)(struct PLStream_struct *)
Definition: disptab.h:75
plDevType_Null
Definition: disptab.h:15
PLDispatchTable::pl_DevName
const char * pl_DevName
Definition: disptab.h:80
PLDispatchTable::pl_init
plD_init_fp pl_init
Definition: disptab.h:83
PLINT
int PLINT
Definition: plplot.h:181
plD_line_fp
void(* plD_line_fp)(struct PLStream_struct *, short, short, short, short)
Definition: disptab.h:68
plD_esc_fp
void(* plD_esc_fp)(struct PLStream_struct *, PLINT, void *)
Definition: disptab.h:74
plD_polyline_fp
void(* plD_polyline_fp)(struct PLStream_struct *, short *, short *, PLINT)
Definition: disptab.h:69
PLDispatchTable
Definition: disptab.h:77
PLDispatchTable::pl_bop
plD_bop_fp pl_bop
Definition: disptab.h:87
PLDispatchTable::pl_line
plD_line_fp pl_line
Definition: disptab.h:84
PLDispatchTable::pl_wait
plD_wait_fp pl_wait
Definition: disptab.h:91
plD_bop_fp
void(* plD_bop_fp)(struct PLStream_struct *)
Definition: disptab.h:71
PLDispatchTable::pl_state
plD_state_fp pl_state
Definition: disptab.h:89
PLDispatchTable::pl_eop
plD_eop_fp pl_eop
Definition: disptab.h:86
PLDispatchTable::pl_polyline
plD_polyline_fp pl_polyline
Definition: disptab.h:85
plD_state_fp
void(* plD_state_fp)(struct PLStream_struct *, PLINT)
Definition: disptab.h:73
PLDispatchTable::pl_type
int pl_type
Definition: disptab.h:81