GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
driver.h
Go to the documentation of this file.
1
2
#ifndef _DRIVER_H
3
#define _DRIVER_H
4
5
#include <grass/freetypecap.h>
6
7
extern
int
NCOLORS
;
8
9
extern
int
screen_left
;
10
extern
int
screen_right
;
11
extern
int
screen_bottom
;
12
extern
int
screen_top
;
13
14
extern
int
cur_x
;
15
extern
int
cur_y
;
16
17
extern
double
text_size_x
;
18
extern
double
text_size_y
;
19
extern
double
text_rotation
;
20
21
extern
int
mouse_button
[];
22
23
extern
struct
GFONT_CAP *
ftcap
;
24
25
struct
driver
26
{
27
void (*
Box_abs
) (int, int, int, int);
28
void (*
Box_rel
) (int, int);
29
void (*
Client_Open
) (void);
30
void (*
Client_Close
) (void);
31
void (*
Erase
) (void);
32
int (*
Get_with_box
) (int, int,
int
*,
int
*,
int
*);
33
int (*
Get_with_line
) (int, int,
int
*,
int
*,
int
*);
34
int (*
Get_with_pointer
) (
int
*,
int
*,
int
*);
35
int (*
Graph_set
) (int,
char
**);
36
void (*
Graph_close
) (void);
37
void (*
Line_width
) (int);
38
void (*
Panel_save
) (
const
char
*, int, int, int, int);
39
void (*
Panel_restore
) (
const
char
*);
40
void (*
Panel_delete
) (
const
char
*);
41
void (*
Polydots_abs
) (
const
int
*,
const
int
*, int);
42
void (*
Polydots_rel
) (
const
int
*,
const
int
*, int);
43
void (*
Polyline_abs
) (
const
int
*,
const
int
*, int);
44
void (*
Polyline_rel
) (
const
int
*,
const
int
*, int);
45
void (*
Polygon_abs
) (
const
int
*,
const
int
*, int);
46
void (*
Polygon_rel
) (
const
int
*,
const
int
*, int);
47
void (*
Set_window
) (int, int, int, int);
48
void (*
Begin_scaled_raster
) (int,
int
[2][2],
int
[2][2]);
49
int (*
Scaled_raster
) (int, int,
50
const
unsigned
char
*,
51
const
unsigned
char
*,
52
const
unsigned
char
*,
const
unsigned
char
*);
53
void (*
End_scaled_raster
) (void);
54
void (*
Respond
) (void);
55
int (*
Work_stream
) (void);
56
void (*
Do_work
) (int);
57
58
int (*
lookup_color
) (int, int, int);
59
void (*
color
) (int);
60
void (*
draw_line
) (int, int, int, int);
61
void (*
draw_point
) (int, int);
62
void (*
draw_bitmap
) (int, int, int,
const
unsigned
char
*);
63
void (*
draw_text
) (
const
char
*);
64
};
65
66
/* Library Functions */
67
68
/* command.c */
69
extern
int
LIB_command_get_input
(
void
);
70
71
/* init.c */
72
extern
int
LIB_init
(
const
struct
driver
*drv,
int
argc,
char
**argv);
73
74
/* main.c */
75
extern
int
LIB_main
(
int
argc,
char
**argv);
76
77
/* Commands */
78
79
/* Bitmap.c */
80
extern
void
COM_Bitmap
(
int
,
int
,
int
,
const
unsigned
char
*);
81
82
/* Box.c */
83
extern
void
COM_Box_abs
(
int
,
int
,
int
,
int
);
84
extern
void
COM_Box_rel
(
int
,
int
);
85
86
/* Client.c */
87
extern
void
COM_Client_Open
(
void
);
88
extern
void
COM_Client_Close
(
void
);
89
90
/* Color.c */
91
extern
void
COM_Color_RGB
(
unsigned
char
,
unsigned
char
,
unsigned
char
);
92
extern
void
COM_Standard_color
(
int
);
93
94
/* Cont.c */
95
extern
void
COM_Cont_abs
(
int
,
int
);
96
extern
void
COM_Cont_rel
(
int
,
int
);
97
98
/* Erase.c */
99
extern
void
COM_Erase
(
void
);
100
101
/* Font.c */
102
extern
void
COM_Font_get
(
const
char
*);
103
extern
void
COM_Font_init_charset
(
const
char
*);
104
extern
void
COM_Font_list
(
char
***,
int
*);
105
extern
void
COM_Font_info
(
char
***,
int
*);
106
107
/* Get_location.c */
108
extern
int
COM_Get_location_with_box
(
int
,
int
,
int
*,
int
*,
int
*);
109
extern
int
COM_Get_location_with_line
(
int
,
int
,
int
*,
int
*,
int
*);
110
extern
int
COM_Get_location_with_pointer
(
int
*,
int
*,
int
*);
111
112
/* Get_t_box.c */
113
extern
void
COM_Get_text_box
(
const
char
*,
int
*,
int
*,
int
*,
int
*);
114
115
/* Graph.c */
116
extern
int
COM_Graph_set
(
int
,
char
**);
117
extern
void
COM_Graph_close
(
void
);
118
119
/* Line_width.c */
120
extern
void
COM_Line_width
(
int
);
121
122
/* Move.c */
123
extern
void
COM_Move_abs
(
int
,
int
);
124
extern
void
COM_Move_rel
(
int
,
int
);
125
126
/* Panel.c */
127
extern
void
COM_Panel_save
(
const
char
*,
int
,
int
,
int
,
int
);
128
extern
void
COM_Panel_restore
(
const
char
*);
129
extern
void
COM_Panel_delete
(
const
char
*);
130
131
/* Polydots.c */
132
extern
void
COM_Polydots_abs
(
const
int
*,
const
int
*,
int
);
133
extern
void
COM_Polydots_rel
(
const
int
*,
const
int
*,
int
);
134
135
/* Polygon.c */
136
extern
void
COM_Polygon_abs
(
const
int
*,
const
int
*,
int
);
137
extern
void
COM_Polygon_rel
(
const
int
*,
const
int
*,
int
);
138
139
/* Polyline.c */
140
extern
void
COM_Polyline_abs
(
const
int
*,
const
int
*,
int
);
141
extern
void
COM_Polyline_rel
(
const
int
*,
const
int
*,
int
);
142
143
/* Raster.c */
144
extern
void
COM_begin_scaled_raster
(
int
,
int
[2][2],
int
[2][2]);
145
extern
int
COM_scaled_raster
(
int
,
int
,
const
unsigned
char
*,
146
const
unsigned
char
*,
const
unsigned
char
*,
147
const
unsigned
char
*);
148
extern
void
COM_end_scaled_raster
(
void
);
149
150
/* Respond.c */
151
extern
void
COM_Respond
(
void
);
152
153
/* Returns.c */
154
extern
void
COM_Screen_left
(
int
*);
155
extern
void
COM_Screen_rite
(
int
*);
156
extern
void
COM_Screen_bot
(
int
*);
157
extern
void
COM_Screen_top
(
int
*);
158
extern
void
COM_Number_of_colors
(
int
*);
159
160
/* Set_window.c */
161
extern
void
COM_Set_window
(
int
,
int
,
int
,
int
);
162
163
/* Text.c */
164
extern
void
COM_Text
(
const
char
*);
165
166
/* Text_size.c */
167
extern
void
COM_Text_size
(
int
,
int
);
168
extern
void
COM_Text_rotation
(
double
);
169
170
/* Work.c */
171
extern
int
COM_Has_work
(
void
);
172
extern
int
COM_Work_stream
(
void
);
173
extern
void
COM_Do_work
(
int
);
174
175
/* Driver Operations */
176
177
/* Color.c */
178
extern
int
DRV_lookup_color
(
int
,
int
,
int
);
179
extern
void
DRV_color
(
int
);
180
181
/* Draw.c */
182
extern
void
DRV_draw_bitmap
(
int
,
int
,
int
,
const
unsigned
char
*);
183
extern
void
DRV_draw_line
(
int
x0,
int
y0,
int
x1,
int
y1);
184
extern
void
DRV_draw_point
(
int
x,
int
y
);
185
186
#endif
/* _DRIVER_H */
lib
driver
driver.h
Generated on Sat Oct 5 2013 12:11:06 for GRASS Programmer's Manual by
1.8.4