PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pltkd.h
Go to the documentation of this file.
1 // Holds system header includes, prototypes of TK driver
2 // utility functions, and definition of the state structure.
3 //
4 // This file is set up so that the determined user can get access
5 // to the tk driver data without too much hassle. The only drawback
6 // is that plplotP.h must be included to get all of the necessary
7 // system header files and configuration settings.
8 //
9 
10 #ifndef __PLTKD_H__
11 #define __PLTKD_H__
12 
13 #include "plplotP.h"
14 #include "pltk.h"
15 #include "pdf.h"
16 
17 #include <tk.h>
18 #ifdef PLD_dp
19 #include <dp.h>
20 #endif
21 
22 // typedef the type pid_t - a dummy for the moment - for MS Windows
23 // platforms other than those (e.g., MinGW) that typedef it already.
24 #if defined ( __WIN32__ ) && !defined ( __MINGW32__ )
25 typedef unsigned int pid_t;
26 #endif
27 
28 // One of these holds the TK driver state information
29 
30 typedef struct
31 {
32  Tk_Window w; // Main window
33  Tcl_Interp *interp; // Interpreter
34  PLINT xold, yold; // Coordinates of last point plotted
35  unsigned width, height; // Current window dimensions
36  int exit_eventloop; // Break out of event loop
37  int pass_thru; // Skip normal error termination
38  char *cmdbuf; // Command buffer
39  size_t cmdbuf_len; // and its length
40  PLiodev *iodev; // I/O device info
41  const char *updatecmd; // Name of update command
42  pid_t child_pid; // PID for child process
43  int instr; // Instruction timer
44  int max_instr; // Limit before issuing an update
45  int locate_mode; // Set while in locate mode
46  PLGraphicsIn gin; // Graphics input structure
47 } TkDev;
48 
49 #endif // __PLTKD_H__