fix portability.
[gss-tcad.git] / src / include / xgraph.h
blobea2a64a4a458594ca7578caf6c495ac3177c8a1e
1 /*-----------------------------------------------------------------------------
3 FILE: xgraph.h
5 PROJECT:
7 AUTHOR: Kevin M. Kramer
8 J. Joshua Feng
10 REVISION HISTORY
11 DATE INITIALS DESCRIPTION
12 -------- -------- --------------------------------------------------------
13 12/15/93 KMK initial implementation
14 02/04/97 JJF Modification (Adding LUT functions)
15 12/12/05 gdiso Support rainbow color
17 DESCRIPTION:
19 This module contains functions implement a small subset of the Borland BGI
20 functions under X windows. Hence this module should not be included when
21 compiling under Borland C++ enviroments.
23 -----------------------------------------------------------------------------*/
24 #ifdef HAVE_X11
26 #ifndef __xgraph_h
27 #define __xgraph_h
29 // definition of command line argument structure
30 #define RES_640x480 1 /* 640 x 480 resolution */
31 #define RES_800x600 2 /* 800 x 600 resolution */
32 #define RES_1024x768 3 /* 1024 x 768 resolution */
34 #define GR_BLACK 0
35 #define GR_BLUE 1
36 #define GR_GREEN 2
37 #define GR_CYAN 3
38 #define GR_RED 4
39 #define GR_MAGENTA 5
40 #define GR_BROWN 6
41 #define GR_LIGHTGRAY 7
42 #define GR_DARKGRAY 8
43 #define GR_LIGHTBLUE 9
44 #define GR_LIGHTGREEN 10
45 #define GR_LIGHTCYAN 11
46 #define GR_LIGHTRED 12
47 #define GR_LIGHTMAGENTA 13
48 #define GR_YELLOW 14
49 #define GR_WHITE 15
51 #define Rainbow_Color_NUM 20
52 #define Rainbow_0 16
53 #define Rainbow_1 17
54 #define Rainbow_2 18
55 #define Rainbow_3 19
56 #define Rainbow_4 20
57 #define Rainbow_5 21
58 #define Rainbow_6 22
59 #define Rainbow_7 23
60 #define Rainbow_8 24
61 #define Rainbow_9 25
62 #define Rainbow_10 26
63 #define Rainbow_11 27
64 #define Rainbow_12 28
65 #define Rainbow_13 29
66 #define Rainbow_14 30
67 #define Rainbow_15 31
68 #define Rainbow_16 32
69 #define Rainbow_17 33
70 #define Rainbow_18 34
71 #define Rainbow_19 35
73 #define DETECT 0
75 #define PS_SOLID 1
77 #define EXPOSE 0
78 #define CONFIGURENOTIFY 1
79 #define KEYPRESS 2
80 #define BUTTONPRESS 3
81 #define OTHEREVENT 4
82 #define BACKSPACE 5
83 #define ESCAPE 6
84 #define LEFTARROW 7
85 #define RIGHTARROW 8
86 #define UPARROW 9
87 #define DOWNARROW 10
88 #define BUTTONMOTION 11
89 #define BUTTONRELEASE 12
91 #define grOk 0
92 #define grNoInitGraph -1
93 #define grNotDetected -2
94 #define grFileNotFound -3
95 #define grInvalidDriver -4
96 #define grNoLoadMem -5
98 typedef void (*PFREDRAW) ();
100 int GRPrintOpen (const char *, int = 20);
101 void GRPrintClose (void);
102 void GRInitGraphics (int = 7, int = 14);
103 void GRFreeGraphics (void);
104 void GROpenGraphWin (char *, char *, int, int, int, int, PFREDRAW);
105 void GRClearGraphWin (void);
106 void GRSetColor (int);
107 void GRSetFillColor (int, int = PS_SOLID);
108 void GRPutPixel (int, int, int);
109 void GRLine (int, int, int, int);
110 void GRCircle (int, int, int);
111 void GRDrawPoly (int, int *);
112 void GRFillPoly (int, int *);
113 void GRText (int, int, char *);
114 int GRGetMaxX (void);
115 int GRGetMaxY (void);
116 int GRSetLUT (int);
117 void setcmdargs (int, char **);
118 void flushdisplay (void);
119 int getevent (short int *, int *, int *, int *, int *);
120 int GRSaveScreen (const char *, int, int);
121 #endif /* __xgraph_h */
123 #endif