1 | /* graph.h (emx+gcc) */
|
---|
2 |
|
---|
3 | #ifndef _GRAPH_H
|
---|
4 | #define _GRAPH_H
|
---|
5 |
|
---|
6 | #if defined (__cplusplus)
|
---|
7 | extern "C" {
|
---|
8 | #endif
|
---|
9 |
|
---|
10 | /* g_mode() and g_modeset() arguments (MODE) */
|
---|
11 |
|
---|
12 | #define G_MODE_OFF 0 /* Back to previous mode */
|
---|
13 |
|
---|
14 | #define G_MODE_EGA_C 16 /* EGA 640x200 16 colors */
|
---|
15 | #define G_MODE_EGA_E 17 /* EGA 640x350 16/64 colors */
|
---|
16 |
|
---|
17 | #define G_MODE_VGA_H 24 /* VGA 640x480 16 colors */
|
---|
18 | #define G_MODE_VGA_L 26 /* VGA 320x200 256 colors */
|
---|
19 |
|
---|
20 | #define G_SET_KEEP 0 /* No change */
|
---|
21 |
|
---|
22 | /* g_wmode() arguments */
|
---|
23 |
|
---|
24 | #define G_NORM 0 /* Normal write mode */
|
---|
25 | #define G_AND 1 /* `AND' mode */
|
---|
26 | #define G_OR 2 /* `OR' mode */
|
---|
27 | #define G_XOR 3 /* `XOR' mode */
|
---|
28 |
|
---|
29 | /* Fill or draw outline */
|
---|
30 |
|
---|
31 | #define G_OUTLINE 0 /* Draw outline */
|
---|
32 | #define G_FILL 1 /* Fill */
|
---|
33 |
|
---|
34 | /* EGA colors */
|
---|
35 |
|
---|
36 | #define G_BLACK 0
|
---|
37 | #define G_BLUE 1
|
---|
38 | #define G_GREEN 2
|
---|
39 | #define G_CYAN 3
|
---|
40 | #define G_RED 4
|
---|
41 | #define G_MAGENTA 5
|
---|
42 | #define G_YELLOW 6
|
---|
43 | #define G_BROWN 6
|
---|
44 | #define G_WHITE 7
|
---|
45 |
|
---|
46 | #define G_INTENSITY 8
|
---|
47 |
|
---|
48 | /* Screen dimensions */
|
---|
49 |
|
---|
50 | extern int g_xsize; /* Screen width */
|
---|
51 | extern int g_ysize; /* Screen height */
|
---|
52 | extern int g_colors; /* Number of colors */
|
---|
53 |
|
---|
54 |
|
---|
55 | void g_box (int x0, int y0, int x1, int y1, int color, int fill_flag);
|
---|
56 | void g_clear (int color);
|
---|
57 | void g_clip (int x0, int y0, int x1, int y1);
|
---|
58 | void g_ellipse (int cx, int cy, int rx, int ry, int color, int fill_flag);
|
---|
59 | int g_get (int x, int y);
|
---|
60 | void g_hline (int y, int x0, int x1, int color);
|
---|
61 | void g_line (int x0, int y0, int x1,int y1, int color);
|
---|
62 | void g_lock (void);
|
---|
63 | int g_mode (int mode);
|
---|
64 | int g_modeset (int mode, int flag);
|
---|
65 | void g_polygon (__const__ int *x, __const__ int *y, int n, int color,
|
---|
66 | int fill_flag);
|
---|
67 | void g_set (int x, int y, int color);
|
---|
68 | void g_triangle (int x0, int y0, int x1, int y1, int x2, int y2, int color,
|
---|
69 | int fill_flag);
|
---|
70 | void g_unlock (void);
|
---|
71 | void g_unlockall (void);
|
---|
72 | void g_vgapal (__const__ char *pal, int first, int n, int wait_flag);
|
---|
73 | void g_vline (int x, int y0, int y1,int color);
|
---|
74 | void g_waitv (void);
|
---|
75 | void g_wmode (int wmode);
|
---|
76 |
|
---|
77 | #if defined (__cplusplus)
|
---|
78 | }
|
---|
79 | #endif
|
---|
80 |
|
---|
81 | #endif /* not _GRAPH_H */
|
---|