… | |
… | |
19 | |
19 | |
20 | #ifndef NAVIT_GRAPHICS_H |
20 | #ifndef NAVIT_GRAPHICS_H |
21 | #define NAVIT_GRAPHICS_H |
21 | #define NAVIT_GRAPHICS_H |
22 | |
22 | |
23 | #ifdef __cplusplus |
23 | #ifdef __cplusplus |
24 | extern "C" { |
24 | extern "C" |
|
|
25 | { |
25 | #endif |
26 | #endif |
26 | struct attr; |
27 | struct attr; |
27 | struct point; |
28 | struct point; |
28 | struct container; |
29 | struct container; |
29 | struct color; |
30 | struct color; |
… | |
… | |
33 | struct graphics_image; |
34 | struct graphics_image; |
34 | struct transformation; |
35 | struct transformation; |
35 | struct display_list; |
36 | struct display_list; |
36 | struct mapset; |
37 | struct mapset; |
37 | |
38 | |
38 | enum draw_mode_num { |
39 | enum draw_mode_num |
39 | draw_mode_begin, draw_mode_begin_clear, draw_mode_end, draw_mode_cursor, draw_mode_end_lazy |
40 | { |
|
|
41 | draw_mode_begin, |
|
|
42 | draw_mode_begin_clear, |
|
|
43 | draw_mode_end, |
|
|
44 | draw_mode_cursor, |
|
|
45 | draw_mode_end_lazy |
|
|
46 | }; |
|
|
47 | |
|
|
48 | #include "item.h" |
|
|
49 | |
|
|
50 | struct display_context |
|
|
51 | { |
|
|
52 | struct graphics *gra; |
|
|
53 | struct element *e; |
|
|
54 | struct graphics_gc *gc; |
|
|
55 | struct graphics_gc *gc_background; |
|
|
56 | struct graphics_image *img; |
|
|
57 | enum projection pro; |
|
|
58 | int mindist; |
|
|
59 | struct transformation *trans; |
|
|
60 | enum item_type type; |
|
|
61 | int maxlen; |
|
|
62 | }; |
|
|
63 | |
|
|
64 | //#define HASH_SIZE_GRAPHICS_ 1024 |
|
|
65 | #define HASH_SIZE_GRAPHICS_ 2048 // inc. hash size for layer items |
|
|
66 | struct hash_entry |
|
|
67 | { |
|
|
68 | enum item_type type; |
|
|
69 | struct displayitem *di; |
|
|
70 | }; |
|
|
71 | |
|
|
72 | struct displaylist |
|
|
73 | { |
|
|
74 | int busy; |
|
|
75 | int workload; |
|
|
76 | struct callback *cb; |
|
|
77 | struct layout *layout, *layout_hashed; |
|
|
78 | struct display_context dc; |
|
|
79 | int order, order_hashed, max_offset; |
|
|
80 | struct mapset *ms; |
|
|
81 | struct mapset_handle *msh; |
|
|
82 | struct map *m; |
|
|
83 | int conv; |
|
|
84 | struct map_selection *sel; |
|
|
85 | struct map_rect *mr; |
|
|
86 | struct callback *idle_cb; |
|
|
87 | struct event_idle *idle_ev; |
|
|
88 | unsigned int seq; |
|
|
89 | struct hash_entry hash_entries[HASH_SIZE_GRAPHICS_]; |
40 | }; |
90 | }; |
41 | |
91 | |
42 | struct graphics_priv; |
92 | struct graphics_priv; |
43 | struct graphics_font_priv; |
93 | struct graphics_font_priv; |
44 | struct graphics_image_priv; |
94 | struct graphics_image_priv; |
45 | struct graphics_gc_priv; |
95 | struct graphics_gc_priv; |
46 | struct graphics_font_methods; |
96 | struct graphics_font_methods; |
47 | struct graphics_gc_methods; |
97 | struct graphics_gc_methods; |
48 | struct graphics_image_methods; |
98 | struct graphics_image_methods; |
49 | |
99 | |
50 | struct graphics_methods { |
100 | struct graphics_methods |
|
|
101 | { |
51 | void (*graphics_destroy)(struct graphics_priv *gr); |
102 | void (*graphics_destroy)(struct graphics_priv *gr); |
52 | void (*draw_mode)(struct graphics_priv *gr, enum draw_mode_num mode); |
103 | void (*draw_mode)(struct graphics_priv *gr, enum draw_mode_num mode); |
53 | void (*draw_lines)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count); |
104 | void (*draw_lines)(struct graphics_priv *gr, struct graphics_gc_priv *gc, |
54 | void (*draw_lines2)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count, int order, int oneway); |
105 | struct point *p, int count); |
55 | void (*draw_lines_dashed)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count, int order, int oneway); |
106 | void (*draw_lines2)(struct graphics_priv *gr, struct graphics_gc_priv *gc, |
|
|
107 | struct point *p, int count, int order, int oneway); |
|
|
108 | void (*draw_lines3)(struct graphics_priv *gr, struct graphics_gc_priv *gc, |
|
|
109 | struct point *p, int count, int order, int width); |
|
|
110 | void (*draw_lines4)(struct graphics_priv *gr, struct graphics_gc_priv *gc, |
|
|
111 | struct point *p, int count, int order, int width, int type); |
|
|
112 | void (*draw_lines_dashed)(struct graphics_priv *gr, |
|
|
113 | struct graphics_gc_priv *gc, struct point *p, int count, int order, |
|
|
114 | int oneway); |
56 | void (*draw_polygon)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count); |
115 | void (*draw_polygon)(struct graphics_priv *gr, struct graphics_gc_priv *gc, |
57 | void (*draw_polygon2)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count, int order, int oneway); |
116 | struct point *p, int count); |
58 | void (*draw_rectangle)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int w, int h); |
117 | void (*draw_polygon2)(struct graphics_priv *gr, |
|
|
118 | struct graphics_gc_priv *gc, struct point *p, int count, int order, |
|
|
119 | int oneway); |
|
|
120 | void (*draw_rectangle)(struct graphics_priv *gr, |
|
|
121 | struct graphics_gc_priv *gc, struct point *p, int w, int h); |
59 | void (*draw_circle)(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int r); |
122 | void (*draw_circle)(struct graphics_priv *gr, struct graphics_gc_priv *gc, |
60 | void (*draw_text)(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy); |
123 | struct point *p, int r); |
61 | void (*draw_image)(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img); |
124 | void (*draw_text)(struct graphics_priv *gr, struct graphics_gc_priv *fg, |
62 | void (*draw_bigmap)(struct graphics_priv *gr, struct graphics_gc_priv *fg, int yaw, int order, float clat, float clng, int x, int y, int scx, int scy, int px, int py, int valid); |
125 | struct graphics_gc_priv *bg, struct graphics_font_priv *font, |
63 | void (*send_osd_values)(struct graphics_priv *gr, struct graphics_gc_priv *fg, char *id, char *text1, char *text2, char *text3, int i1, int i2, int i3, int i4, float f1, float f2, float f3); |
126 | char *text, struct point *p, int dx, int dy); |
64 | void (*draw_image_warp)(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, int count, char *data); |
127 | void (*draw_image)(struct graphics_priv *gr, struct graphics_gc_priv *fg, |
|
|
128 | struct point *p, struct graphics_image_priv *img); |
|
|
129 | void (*draw_bigmap)(struct graphics_priv *gr, struct graphics_gc_priv *fg, |
|
|
130 | int yaw, int order, float clat, float clng, int x, int y, int scx, |
|
|
131 | int scy, int px, int py, int valid); |
|
|
132 | void (*send_osd_values)(struct graphics_priv *gr, |
|
|
133 | struct graphics_gc_priv *fg, char *id, char *text1, char *text2, |
|
|
134 | char *text3, int i1, int i2, int i3, int i4, float f1, float f2, |
|
|
135 | float f3); |
|
|
136 | void |
|
|
137 | (*draw_image_warp)(struct graphics_priv *gr, |
|
|
138 | struct graphics_gc_priv *fg, struct point *p, int count, |
|
|
139 | char *data); |
65 | void (*draw_restore)(struct graphics_priv *gr, struct point *p, int w, int h); |
140 | void (*draw_restore)(struct graphics_priv *gr, struct point *p, int w, |
|
|
141 | int h); |
66 | void (*draw_drag)(struct graphics_priv *gr, struct point *p); |
142 | void (*draw_drag)(struct graphics_priv *gr, struct point *p); |
67 | struct graphics_font_priv *(*font_new)(struct graphics_priv *gr, struct graphics_font_methods *meth, char *font, int size, int flags); |
143 | struct graphics_font_priv |
|
|
144 | *(*font_new)(struct graphics_priv *gr, |
|
|
145 | struct graphics_font_methods *meth, char *font, int size, |
|
|
146 | int flags); |
68 | struct graphics_gc_priv *(*gc_new)(struct graphics_priv *gr, struct graphics_gc_methods *meth); |
147 | struct graphics_gc_priv *(*gc_new)(struct graphics_priv *gr, |
69 | void (*background_gc)(struct graphics_priv *gr, struct graphics_gc_priv *gc); |
148 | struct graphics_gc_methods *meth); |
70 | struct graphics_priv *(*overlay_new)(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int alpha, int wraparound); |
149 | void |
71 | struct graphics_image_priv *(*image_new)(struct graphics_priv *gr, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation); |
150 | (*background_gc)(struct graphics_priv *gr, |
|
|
151 | struct graphics_gc_priv *gc); |
|
|
152 | struct graphics_priv *(*overlay_new)(struct graphics_priv *gr, |
|
|
153 | struct graphics_methods *meth, struct point *p, int w, int h, |
|
|
154 | int alpha, int wraparound); |
|
|
155 | struct graphics_image_priv *(*image_new)(struct graphics_priv *gr, |
|
|
156 | struct graphics_image_methods *meth, char *path, int *w, int *h, |
|
|
157 | struct point *hot, int rotation); |
72 | void *(*get_data)(struct graphics_priv *gr, const char *type); |
158 | void *(*get_data)(struct graphics_priv *gr, const char *type); |
73 | void (*image_free)(struct graphics_priv *gr, struct graphics_image_priv *priv); |
159 | void (*image_free)(struct graphics_priv *gr, |
74 | void (*get_text_bbox)(struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy, struct point *ret, int estimate); |
160 | struct graphics_image_priv *priv); |
|
|
161 | void (*get_text_bbox)(struct graphics_priv *gr, |
|
|
162 | struct graphics_font_priv *font, char *text, int dx, int dy, |
|
|
163 | struct point *ret, int estimate); |
75 | void (*overlay_disable)(struct graphics_priv *gr, int disable); |
164 | void (*overlay_disable)(struct graphics_priv *gr, int disable); |
76 | void (*overlay_resize)(struct graphics_priv *gr, struct point *p, int w, int h, int alpha, int wraparound); |
165 | void (*overlay_resize)(struct graphics_priv *gr, struct point *p, int w, |
|
|
166 | int h, int alpha, int wraparound); |
77 | int (*set_attr)(struct graphics_priv *gr, struct attr *attr); |
167 | int (*set_attr)(struct graphics_priv *gr, struct attr *attr); |
78 | }; |
168 | }; |
79 | |
169 | |
80 | |
|
|
81 | struct graphics_font_methods { |
170 | struct graphics_font_methods |
|
|
171 | { |
82 | void (*font_destroy)(struct graphics_font_priv *font); |
172 | void (*font_destroy)(struct graphics_font_priv *font); |
83 | }; |
173 | }; |
84 | |
174 | |
85 | struct graphics_font { |
175 | struct graphics_font |
|
|
176 | { |
86 | struct graphics_font_priv *priv; |
177 | struct graphics_font_priv *priv; |
87 | struct graphics_font_methods meth; |
178 | struct graphics_font_methods meth; |
88 | }; |
179 | }; |
89 | |
180 | |
90 | struct graphics_gc_methods { |
181 | struct graphics_gc_methods |
|
|
182 | { |
91 | void (*gc_destroy)(struct graphics_gc_priv *gc); |
183 | void (*gc_destroy)(struct graphics_gc_priv *gc); |
92 | void (*gc_set_linewidth)(struct graphics_gc_priv *gc, int width); |
184 | void (*gc_set_linewidth)(struct graphics_gc_priv *gc, int width); |
93 | void (*gc_set_dashes)(struct graphics_gc_priv *gc, int width, int offset, unsigned char dash_list[], int n); |
185 | void (*gc_set_dashes)(struct graphics *gra, struct graphics_gc_priv *gc, int width, int offset, |
|
|
186 | int dash_list[], int order); |
94 | void (*gc_set_foreground)(struct graphics_gc_priv *gc, struct color *c); |
187 | void (*gc_set_foreground)(struct graphics_gc_priv *gc, struct color *c); |
95 | void (*gc_set_background)(struct graphics_gc_priv *gc, struct color *c); |
188 | void (*gc_set_background)(struct graphics_gc_priv *gc, struct color *c); |
96 | void (*gc_set_stipple)(struct graphics_gc_priv *gc, struct graphics_image_priv *img); |
189 | void (*gc_set_stipple)(struct graphics_gc_priv *gc, |
|
|
190 | struct graphics_image_priv *img); |
97 | }; |
191 | }; |
98 | |
192 | |
99 | struct graphics_gc { |
193 | struct graphics_gc |
|
|
194 | { |
100 | struct graphics_gc_priv *priv; |
195 | struct graphics_gc_priv *priv; |
101 | struct graphics_gc_methods meth; |
196 | struct graphics_gc_methods meth; |
102 | struct graphics *gra; |
197 | struct graphics *gra; |
103 | }; |
198 | }; |
104 | |
199 | |
105 | struct graphics_image_methods { |
200 | struct graphics_image_methods |
|
|
201 | { |
106 | void (*image_destroy)(struct graphics_image_priv *img); |
202 | void (*image_destroy)(struct graphics_image_priv *img); |
107 | }; |
203 | }; |
108 | |
204 | |
109 | struct graphics_image { |
205 | struct graphics_image |
|
|
206 | { |
110 | struct graphics_image_priv *priv; |
207 | struct graphics_image_priv *priv; |
111 | struct graphics_image_methods meth; |
208 | struct graphics_image_methods meth; |
112 | int width; |
209 | int width; |
113 | int height; |
210 | int height; |
114 | struct point hot; |
211 | struct point hot; |
115 | }; |
212 | }; |
116 | |
213 | |
117 | struct graphics_data_image { |
214 | struct graphics_data_image |
|
|
215 | { |
118 | void *data; |
216 | void *data; |
119 | int size; |
217 | int size; |
120 | }; |
218 | }; |
121 | |
219 | |
122 | /* prototypes */ |
220 | /* prototypes */ |
… | |
… | |
142 | struct point_rect; |
240 | struct point_rect; |
143 | struct transformation; |
241 | struct transformation; |
144 | int graphics_set_attr(struct graphics *gra, struct attr *attr); |
242 | int graphics_set_attr(struct graphics *gra, struct attr *attr); |
145 | void graphics_set_rect(struct graphics *gra, struct point_rect *pr); |
243 | void graphics_set_rect(struct graphics *gra, struct point_rect *pr); |
146 | struct graphics *graphics_new(struct attr *parent, struct attr **attrs); |
244 | struct graphics *graphics_new(struct attr *parent, struct attr **attrs); |
147 | int graphics_get_attr(struct graphics *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter); |
245 | int graphics_get_attr(struct graphics *this_, enum attr_type type, |
|
|
246 | struct attr *attr, struct attr_iter *iter); |
148 | struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h, int alpha, int wraparound); |
247 | struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, |
|
|
248 | int w, int h, int alpha, int wraparound); |
149 | void graphics_overlay_resize(struct graphics *this_, struct point *p, int w, int h, int alpha, int wraparound); |
249 | void graphics_overlay_resize(struct graphics *this_, struct point *p, int w, |
|
|
250 | int h, int alpha, int wraparound); |
150 | void graphics_init(struct graphics *this_); |
251 | void graphics_init(struct graphics *this_); |
151 | void *graphics_get_data(struct graphics *this_, const char *type); |
252 | void *graphics_get_data(struct graphics *this_, const char *type); |
152 | void graphics_add_callback(struct graphics *this_, struct callback *cb); |
253 | void graphics_add_callback(struct graphics *this_, struct callback *cb); |
153 | void graphics_remove_callback(struct graphics *this_, struct callback *cb); |
254 | void graphics_remove_callback(struct graphics *this_, struct callback *cb); |
154 | struct graphics_font *graphics_font_new(struct graphics *gra, int size, int flags); |
255 | struct graphics_font *graphics_font_new(struct graphics *gra, int size, |
|
|
256 | int flags); |
155 | struct graphics_font *graphics_named_font_new(struct graphics *gra, char *font, int size, int flags); |
257 | struct graphics_font *graphics_named_font_new(struct graphics *gra, char *font, |
|
|
258 | int size, int flags); |
156 | void graphics_free(struct graphics *gra); |
259 | void graphics_free(struct graphics *gra); |
157 | void graphics_font_destroy_all(struct graphics *gra); |
260 | void graphics_font_destroy_all(struct graphics *gra); |
158 | struct graphics_gc *graphics_gc_new(struct graphics *gra); |
261 | struct graphics_gc *graphics_gc_new(struct graphics *gra); |
159 | void graphics_gc_destroy(struct graphics_gc *gc); |
262 | void graphics_gc_destroy(struct graphics_gc *gc); |
160 | void graphics_gc_set_foreground(struct graphics_gc *gc, struct color *c); |
263 | void graphics_gc_set_foreground(struct graphics_gc *gc, struct color *c); |
161 | void graphics_gc_set_background(struct graphics_gc *gc, struct color *c); |
264 | void graphics_gc_set_background(struct graphics_gc *gc, struct color *c); |
162 | void graphics_gc_set_stipple(struct graphics_gc *gc, struct graphics_image *img); |
265 | void |
|
|
266 | graphics_gc_set_stipple(struct graphics_gc *gc, |
|
|
267 | struct graphics_image *img); |
163 | void graphics_gc_set_linewidth(struct graphics_gc *gc, int width); |
268 | void graphics_gc_set_linewidth(struct graphics_gc *gc, int width); |
164 | void graphics_gc_set_dashes(struct graphics_gc *gc, int width, int offset, unsigned char dash_list[], int n); |
269 | void graphics_gc_set_dashes(struct graphics *gra, struct graphics_gc *gc, int width, int offset, |
|
|
270 | int dash_list[], int n, int order); |
165 | struct graphics_image *graphics_image_new_scaled(struct graphics *gra, char *path, int w, int h); |
271 | struct graphics_image *graphics_image_new_scaled(struct graphics *gra, |
|
|
272 | char *path, int w, int h); |
166 | struct graphics_image *graphics_image_new_scaled_rotated(struct graphics *gra, char *path, int w, int h, int rotate); |
273 | struct graphics_image *graphics_image_new_scaled_rotated(struct graphics *gra, |
|
|
274 | char *path, int w, int h, int rotate); |
167 | struct graphics_image *graphics_image_new(struct graphics *gra, char *path); |
275 | struct graphics_image *graphics_image_new(struct graphics *gra, char *path); |
168 | void graphics_image_free(struct graphics *gra, struct graphics_image *img); |
276 | void graphics_image_free(struct graphics *gra, struct graphics_image *img); |
169 | void graphics_draw_restore(struct graphics *this_, struct point *p, int w, int h); |
277 | void graphics_draw_restore(struct graphics *this_, struct point *p, int w, |
|
|
278 | int h); |
170 | void graphics_draw_mode(struct graphics *this_, enum draw_mode_num mode); |
279 | void graphics_draw_mode(struct graphics *this_, enum draw_mode_num mode); |
171 | void graphics_draw_lines(struct graphics *this_, struct graphics_gc *gc, struct point *p, int count); |
280 | void graphics_draw_lines(struct graphics *this_, struct graphics_gc *gc, |
|
|
281 | struct point *p, int count); |
172 | void graphics_draw_circle(struct graphics *this_, struct graphics_gc *gc, struct point *p, int r); |
282 | void graphics_draw_circle(struct graphics *this_, struct graphics_gc *gc, |
|
|
283 | struct point *p, int r); |
173 | void graphics_draw_rectangle(struct graphics *this_, struct graphics_gc *gc, struct point *p, int w, int h); |
284 | void graphics_draw_rectangle(struct graphics *this_, struct graphics_gc *gc, |
174 | void graphics_draw_rectangle_rounded(struct graphics *this_, struct graphics_gc *gc, struct point *plu, int w, int h, int r, int fill); |
285 | struct point *p, int w, int h); |
175 | void graphics_draw_text(struct graphics *this_, struct graphics_gc *gc1, struct graphics_gc *gc2, struct graphics_font *font, char *text, struct point *p, int dx, int dy); |
286 | void graphics_draw_rectangle_rounded(struct graphics *this_, |
176 | void graphics_get_text_bbox(struct graphics *this_, struct graphics_font *font, char *text, int dx, int dy, struct point *ret, int estimate); |
287 | struct graphics_gc *gc, struct point *plu, int w, int h, int r, |
|
|
288 | int fill); |
|
|
289 | void graphics_draw_text(struct graphics *this_, struct graphics_gc *gc1, |
|
|
290 | struct graphics_gc *gc2, struct graphics_font *font, char *text, |
|
|
291 | struct point *p, int dx, int dy); |
|
|
292 | void graphics_get_text_bbox(struct graphics *this_, struct graphics_font *font, |
|
|
293 | char *text, int dx, int dy, struct point *ret, int estimate); |
177 | void graphics_overlay_disable(struct graphics *this_, int disable); |
294 | void graphics_overlay_disable(struct graphics *this_, int disable); |
178 | void graphics_draw_image(struct graphics *this_, struct graphics_gc *gc, struct point *p, struct graphics_image *img); |
295 | void graphics_draw_image(struct graphics *this_, struct graphics_gc *gc, |
|
|
296 | struct point *p, struct graphics_image *img); |
179 | int graphics_draw_drag(struct graphics *this_, struct point *p); |
297 | int graphics_draw_drag(struct graphics *this_, struct point *p); |
180 | void graphics_background_gc(struct graphics *this_, struct graphics_gc *gc); |
298 | void graphics_background_gc(struct graphics *this_, struct graphics_gc *gc); |
181 | void graphics_draw_text_std(struct graphics *this_, int text_size, char *text, struct point *p); |
299 | void graphics_draw_text_std(struct graphics *this_, int text_size, char *text, |
|
|
300 | struct point *p); |
182 | char *graphics_icon_path(char *icon); |
301 | char *graphics_icon_path(char *icon); |
183 | void graphics_draw_itemgra(struct graphics *gra, struct itemgra *itm, struct transformation *t, char *label); |
302 | void graphics_draw_itemgra(struct graphics *gra, struct itemgra *itm, |
184 | void graphics_displaylist_draw(struct graphics *gra, struct displaylist *displaylist, struct transformation *trans, struct layout *l, int flags); |
303 | struct transformation *t, char *label); |
185 | void graphics_draw(struct graphics *gra, struct displaylist *displaylist, struct mapset *mapset, struct transformation *trans, struct layout *l, int async, struct callback *cb, int flags); |
304 | void graphics_displaylist_draw(struct graphics *gra, |
|
|
305 | struct displaylist *displaylist, struct transformation *trans, |
|
|
306 | struct layout *l, int flags); |
|
|
307 | void graphics_draw(struct graphics *gra, struct displaylist *displaylist, |
|
|
308 | struct mapset *mapset, struct transformation *trans, struct layout *l, |
|
|
309 | int async, struct callback *cb, int flags); |
186 | int graphics_draw_cancel(struct graphics *gra, struct displaylist *displaylist); |
310 | int graphics_draw_cancel(struct graphics *gra, struct displaylist *displaylist); |
187 | struct displaylist_handle *graphics_displaylist_open(struct displaylist *displaylist); |
311 | struct displaylist_handle *graphics_displaylist_open( |
|
|
312 | struct displaylist *displaylist); |
188 | struct displayitem *graphics_displaylist_next(struct displaylist_handle *dlh); |
313 | struct displayitem *graphics_displaylist_next(struct displaylist_handle *dlh); |
189 | void graphics_displaylist_close(struct displaylist_handle *dlh); |
314 | void graphics_displaylist_close(struct displaylist_handle *dlh); |
190 | struct displaylist *graphics_displaylist_new(void); |
315 | struct displaylist *graphics_displaylist_new(void); |
191 | struct item *graphics_displayitem_get_item(struct displayitem *di); |
316 | struct item *graphics_displayitem_get_item(struct displayitem *di); |
192 | int graphics_displayitem_get_coord_count(struct displayitem *di); |
317 | int graphics_displayitem_get_coord_count(struct displayitem *di); |
193 | char *graphics_displayitem_get_label(struct displayitem *di); |
318 | char *graphics_displayitem_get_label(struct displayitem *di); |
194 | int graphics_displayitem_get_displayed(struct displayitem *di); |
319 | int graphics_displayitem_get_displayed(struct displayitem *di); |
195 | int graphics_displayitem_within_dist(struct displaylist *displaylist, struct displayitem *di, struct point *p, int dist); |
320 | int graphics_displayitem_within_dist(struct displaylist *displaylist, |
196 | void graphics_add_selection(struct graphics *gra, struct item *item, enum item_type type, struct displaylist *dl); |
321 | struct displayitem *di, struct point *p, int dist); |
|
|
322 | void graphics_add_selection(struct graphics *gra, struct item *item, |
|
|
323 | enum item_type type, struct displaylist *dl); |
197 | void graphics_remove_selection(struct graphics *gra, struct item *item, enum item_type type, struct displaylist *dl); |
324 | void graphics_remove_selection(struct graphics *gra, struct item *item, |
|
|
325 | enum item_type type, struct displaylist *dl); |
198 | void graphics_clear_selection(struct graphics *gra, struct displaylist *dl); |
326 | void graphics_clear_selection(struct graphics *gra, struct displaylist *dl); |
199 | /* end of prototypes */ |
327 | /* end of prototypes */ |
200 | #ifdef __cplusplus |
328 | #ifdef __cplusplus |
201 | } |
329 | } |
202 | #endif |
330 | #endif |