1 | ;; gnome-canvas.defs -- GnomeCanvas API definitions -*- lisp -*- |
---|
2 | ;; $Id: gnome-canvas.defs,v 1.1.1.2 2001-03-13 16:47:27 ghudson Exp $ |
---|
3 | |
---|
4 | (import "gtk.defs") |
---|
5 | |
---|
6 | |
---|
7 | ;; Types |
---|
8 | |
---|
9 | (define-object GnomeCanvas (GtkLayout)) |
---|
10 | |
---|
11 | (define-object GnomeCanvasItem (GtkObject)) |
---|
12 | |
---|
13 | (define-object GnomeCanvasGroup (GnomeCanvasItem)) |
---|
14 | |
---|
15 | (define-object GnomeCanvasLine (GnomeCanvasItem)) |
---|
16 | |
---|
17 | (define-object GnomeCanvasPolygon (GnomeCanvasItem)) |
---|
18 | |
---|
19 | (define-object GnomeCanvasRE (GnomeCanvasItem)) |
---|
20 | |
---|
21 | (define-object GnomeCanvasRect (GnomeCanvasRE)) |
---|
22 | |
---|
23 | (define-object GnomeCanvasEllipse (GnomeCanvasRE)) |
---|
24 | |
---|
25 | (define-object GnomeCanvasText (GnomeCanvasItem)) |
---|
26 | |
---|
27 | (define-object GnomeCanvasImage (GnomeCanvasItem)) |
---|
28 | |
---|
29 | (define-object GnomeCanvasWidget (GnomeCanvasItem)) |
---|
30 | |
---|
31 | (define-boxed GnomeCanvasPoints |
---|
32 | (copy gnome_canvas_points_ref) |
---|
33 | (free gnome_canvas_points_unref) |
---|
34 | (conversion "sgtk_gnome_canvas_points_conversion")) |
---|
35 | |
---|
36 | (add-options |
---|
37 | GnomeCanvasPoints (conversion "sgtk_gnome_canvas_points_conversion")) |
---|
38 | |
---|
39 | |
---|
40 | ;; GnomeCanvas |
---|
41 | |
---|
42 | (define-func gnome_canvas_new |
---|
43 | GtkWidget |
---|
44 | ()) |
---|
45 | |
---|
46 | (define-func gnome_canvas_new_aa |
---|
47 | GtkWidget |
---|
48 | ()) |
---|
49 | |
---|
50 | (define-func gnome_canvas_root |
---|
51 | GnomeCanvasGroup |
---|
52 | ((GnomeCanvas canvas))) |
---|
53 | |
---|
54 | (define-func gnome_canvas_set_scroll_region |
---|
55 | none |
---|
56 | ((GnomeCanvas canvas) |
---|
57 | (double x1) |
---|
58 | (double y1) |
---|
59 | (double x2) |
---|
60 | (double y2))) |
---|
61 | |
---|
62 | (define-func gnome_canvas_get_scroll_region |
---|
63 | none |
---|
64 | ((GnomeCanvas canvas) |
---|
65 | ((ret double) x1) |
---|
66 | ((ret double) y1) |
---|
67 | ((ret double) x2) |
---|
68 | ((ret double) y2))) |
---|
69 | |
---|
70 | (define-func gnome_canvas_set_pixels_per_unit |
---|
71 | none |
---|
72 | ((GnomeCanvas canvas) |
---|
73 | (double n))) |
---|
74 | |
---|
75 | (define-func gnome_canvas_scroll_to |
---|
76 | none |
---|
77 | ((GnomeCanvas canvas) |
---|
78 | (int cx) |
---|
79 | (int cy))) |
---|
80 | |
---|
81 | (define-func gnome_canvas_get_scroll_offsets |
---|
82 | none |
---|
83 | ((GnomeCanvas canvas) |
---|
84 | ((ret int) cx) |
---|
85 | ((ret int) cy))) |
---|
86 | |
---|
87 | (define-func gnome_canvas_update_now |
---|
88 | none |
---|
89 | ((GnomeCanvas canvas))) |
---|
90 | |
---|
91 | (define-func gnome_canvas_get_item_at |
---|
92 | GnomeCanvasItem |
---|
93 | ((GnomeCanvas canvas) |
---|
94 | (double x) |
---|
95 | (double y))) |
---|
96 | |
---|
97 | ;(define-func gnome_canvas_request_update_uta |
---|
98 | ; none |
---|
99 | ; ((GnomeCanvas canvas) |
---|
100 | ; (ArtUta uta))) |
---|
101 | |
---|
102 | (define-func gnome_canvas_request_redraw |
---|
103 | none |
---|
104 | ((GnomeCanvas canvas) |
---|
105 | (int x1) |
---|
106 | (int y1) |
---|
107 | (int x2) |
---|
108 | (int y2))) |
---|
109 | |
---|
110 | (define-func gnome_canvas_w2c_affine |
---|
111 | none |
---|
112 | ((GnomeCanvas canvas) |
---|
113 | ((fvec double 6) affine))) |
---|
114 | |
---|
115 | (define-func gnome_canvas_w2c |
---|
116 | none |
---|
117 | ((GnomeCanvas canvas) |
---|
118 | (double wx) |
---|
119 | (double wy) |
---|
120 | ((ret int) cx) |
---|
121 | ((ret int) cy))) |
---|
122 | |
---|
123 | (define-func gnome_canvas_w2c_d |
---|
124 | none |
---|
125 | ((GnomeCanvas canvas) |
---|
126 | (double wx) |
---|
127 | (double wy) |
---|
128 | ((ret double) cx) |
---|
129 | ((ret double) cy))) |
---|
130 | |
---|
131 | (define-func gnome_canvas_c2w |
---|
132 | none |
---|
133 | ((GnomeCanvas canvas) |
---|
134 | (int cx) |
---|
135 | (int cy) |
---|
136 | ((ret double) wx) |
---|
137 | ((ret double) wy))) |
---|
138 | |
---|
139 | (define-func gnome_canvas_window_to_world |
---|
140 | none |
---|
141 | ((GnomeCanvas canvas) |
---|
142 | (double winx) |
---|
143 | (double winy) |
---|
144 | ((ret double) worldx) |
---|
145 | ((ret double) worldy))) |
---|
146 | |
---|
147 | (define-func gnome_canvas_world_to_window |
---|
148 | none |
---|
149 | ((GnomeCanvas canvas) |
---|
150 | (double worldx) |
---|
151 | (double worldy) |
---|
152 | ((ret double) winx) |
---|
153 | ((ret double) winy))) |
---|
154 | |
---|
155 | (define-func gnome_canvas_get_color |
---|
156 | bool |
---|
157 | ((GnomeCanvas canvas) |
---|
158 | (string spec) |
---|
159 | (GdkColor color))) |
---|
160 | |
---|
161 | (define-func gnome_canvas_set_stipple_origin |
---|
162 | none |
---|
163 | ((GnomeCanvas canvas) |
---|
164 | (GdkGC gc))) |
---|
165 | |
---|
166 | |
---|
167 | ;; GnomeCanvasItem |
---|
168 | |
---|
169 | ;in gnome-canvas-support.c |
---|
170 | ;(define-func gnome_canvas_item_new |
---|
171 | ; GnomeCanvasItem |
---|
172 | ; ((GnomeCanvasGroup parent) |
---|
173 | ; (SCM type) |
---|
174 | ; (SCM args))) |
---|
175 | |
---|
176 | ;in gnome-canvas-support.c |
---|
177 | ;(define-func gnome_canvas_item_set |
---|
178 | ; none |
---|
179 | ; ((GnomeCanvasItem item) |
---|
180 | ; (SCM args))) |
---|
181 | |
---|
182 | (define-func gnome_canvas_item_move |
---|
183 | none |
---|
184 | ((GnomeCanvasItem item) |
---|
185 | (double dx) |
---|
186 | (double dy))) |
---|
187 | |
---|
188 | (define-func gnome_canvas_item_affine_relative |
---|
189 | none |
---|
190 | ((GnomeCanvasItem item) |
---|
191 | ((fvec double 6) affine))) |
---|
192 | |
---|
193 | (define-func gnome_canvas_item_affine_absolute |
---|
194 | none |
---|
195 | ((GnomeCanvasItem item) |
---|
196 | ((fvec double 6) affine))) |
---|
197 | |
---|
198 | ;XXX these functions have apparently gone missing |
---|
199 | ;(define-func gnome_canvas_item_scale |
---|
200 | ; none |
---|
201 | ; ((GnomeCanvasItem item) |
---|
202 | ; (double x) |
---|
203 | ; (double y) |
---|
204 | ; (double scale_x) |
---|
205 | ; (double scale_y))) |
---|
206 | ; |
---|
207 | ;(define-func gnome_canvas_item_rotate |
---|
208 | ; none |
---|
209 | ; ((GnomeCanvasItem item) |
---|
210 | ; (double x) |
---|
211 | ; (double y) |
---|
212 | ; (double angle))) |
---|
213 | |
---|
214 | (define-func gnome_canvas_item_raise |
---|
215 | none |
---|
216 | ((GnomeCanvasItem item) |
---|
217 | (int positions))) |
---|
218 | |
---|
219 | (define-func gnome_canvas_item_lower |
---|
220 | none |
---|
221 | ((GnomeCanvasItem item) |
---|
222 | (int positions))) |
---|
223 | |
---|
224 | (define-func gnome_canvas_item_raise_to_top |
---|
225 | none |
---|
226 | ((GnomeCanvasItem item))) |
---|
227 | |
---|
228 | (define-func gnome_canvas_item_lower_to_bottom |
---|
229 | none |
---|
230 | ((GnomeCanvasItem item))) |
---|
231 | |
---|
232 | (define-func gnome_canvas_item_show |
---|
233 | none |
---|
234 | ((GnomeCanvasItem item))) |
---|
235 | |
---|
236 | (define-func gnome_canvas_item_hide |
---|
237 | none |
---|
238 | ((GnomeCanvasItem item))) |
---|
239 | |
---|
240 | ;(define-func gnome_canvas_item_grab |
---|
241 | ; none |
---|
242 | ; ((GnomeCanvasItem item) |
---|
243 | ; (uint event_mask) |
---|
244 | ; (GdkCursor cursor) |
---|
245 | ; (uint etime))) |
---|
246 | |
---|
247 | (define-func gnome_canvas_item_ungrab |
---|
248 | none |
---|
249 | ((GnomeCanvasItem item) |
---|
250 | (uint etime))) |
---|
251 | |
---|
252 | (define-func gnome_canvas_item_w2i |
---|
253 | none |
---|
254 | ((GnomeCanvasItem item) |
---|
255 | ((ret double) x) |
---|
256 | ((ret double) y))) |
---|
257 | |
---|
258 | (define-func gnome_canvas_item_i2w |
---|
259 | none |
---|
260 | ((GnomeCanvasItem item) |
---|
261 | ((ret double) x) |
---|
262 | ((ret double) y))) |
---|
263 | |
---|
264 | (define-func gnome_canvas_item_i2w_affine |
---|
265 | none |
---|
266 | ((GnomeCanvasItem item) |
---|
267 | ((fvec double 6) affine))) |
---|
268 | |
---|
269 | (define-func gnome_canvas_item_i2c_affine |
---|
270 | none |
---|
271 | ((GnomeCanvasItem item) |
---|
272 | ((fvec double 6) affine))) |
---|
273 | |
---|
274 | (define-func gnome_canvas_item_reparent |
---|
275 | none |
---|
276 | ((GnomeCanvasItem item) |
---|
277 | (GnomeCanvasGroup new_group))) |
---|
278 | |
---|
279 | (define-func gnome_canvas_item_grab_focus |
---|
280 | none |
---|
281 | ((GnomeCanvasItem item))) |
---|
282 | |
---|
283 | (define-func gnome_canvas_item_get_bounds |
---|
284 | none |
---|
285 | ((GnomeCanvasItem item) |
---|
286 | ((ret double) x1) |
---|
287 | ((ret double) y1) |
---|
288 | ((ret double) x2) |
---|
289 | ((ret double) y2))) |
---|
290 | |
---|
291 | ;(define-func gnome_canvas_request_update |
---|
292 | ; none |
---|
293 | ; ((GnomeCanvasItem item))) |
---|
294 | |
---|
295 | |
---|
296 | ;; GnomeCanvasGroup |
---|
297 | |
---|
298 | (define-func gnome_canvas_group_child_bounds |
---|
299 | none |
---|
300 | ((GnomeCanvasGroup group) |
---|
301 | (GnomeCanvasItem item))) |
---|
302 | |
---|
303 | |
---|
304 | ;; GnomeIconTextItem |
---|
305 | |
---|
306 | (define-object GnomeIconTextItem (GnomeCanvasItem)) |
---|
307 | |
---|
308 | (define-func gnome_icon_text_item_configure |
---|
309 | none |
---|
310 | ((GnomeIconTextItem iti) |
---|
311 | (int x) |
---|
312 | (int y) |
---|
313 | (int width) |
---|
314 | (string fontname) |
---|
315 | (string text) |
---|
316 | (bool is_editable) |
---|
317 | (bool is_static))) |
---|
318 | |
---|
319 | (define-func gnome_icon_text_item_setxy |
---|
320 | none |
---|
321 | ((GnomeIconTextItem iti) |
---|
322 | (int x) |
---|
323 | (int y))) |
---|
324 | |
---|
325 | (define-func gnome_icon_text_item_select |
---|
326 | none |
---|
327 | ((GnomeIconTextItem iti) |
---|
328 | (bool sel))) |
---|
329 | |
---|
330 | (define-func gnome_icon_text_item_get_text |
---|
331 | string |
---|
332 | ((GnomeIconTextItem iti))) |
---|
333 | |
---|
334 | (define-func gnome_icon_text_item_stop_editing |
---|
335 | none |
---|
336 | ((GnomeIconTextItem iti) |
---|
337 | (bool accept))) |
---|
338 | |
---|
339 | |
---|
340 | ;; GnomeIconList |
---|
341 | |
---|
342 | (define-object GnomeIconList (GnomeCanvas)) |
---|
343 | |
---|
344 | (define-enum GnomeIconListMode |
---|
345 | (icons GNOME_ICON_LIST_ICONS) |
---|
346 | (text-below GNOME_ICON_LIST_TEXT_BELOW) |
---|
347 | (text-right GNOME_ICON_LIST_TEXT_RIGHT)) |
---|
348 | |
---|
349 | (define-func gnome_icon_list_new |
---|
350 | GtkWidget |
---|
351 | ((uint icon_width) |
---|
352 | (GtkAdjustment adj) |
---|
353 | (int flags))) |
---|
354 | |
---|
355 | (define-func gnome_icon_list_set_hadjustment |
---|
356 | none |
---|
357 | ((GnomeIconList gil) |
---|
358 | (GtkAdjustment hadj))) |
---|
359 | |
---|
360 | (define-func gnome_icon_list_set_vadjustment |
---|
361 | none |
---|
362 | ((GnomeIconList gil) |
---|
363 | (GtkAdjustment vadj))) |
---|
364 | |
---|
365 | (define-func gnome_icon_list_freeze |
---|
366 | none |
---|
367 | ((GnomeIconList gil))) |
---|
368 | |
---|
369 | (define-func gnome_icon_list_thaw |
---|
370 | none |
---|
371 | ((GnomeIconList gil))) |
---|
372 | |
---|
373 | (define-func gnome_icon_list_insert |
---|
374 | none |
---|
375 | ((GnomeIconList gil) |
---|
376 | (int pos) |
---|
377 | (string icon_filename) |
---|
378 | (string text))) |
---|
379 | |
---|
380 | ;(define-func gnome_icon_list_insert_imlib |
---|
381 | ; none |
---|
382 | ; ((GnomeIconList gil) |
---|
383 | ; (int pos) |
---|
384 | ; (GdkImlibImage im) |
---|
385 | ; (string text))) |
---|
386 | |
---|
387 | (define-func gnome_icon_list_append |
---|
388 | none |
---|
389 | ((GnomeIconList gil) |
---|
390 | (string icon_filename) |
---|
391 | (string text))) |
---|
392 | |
---|
393 | ;(define-func gnome_icon_list_append_imlib |
---|
394 | ; none |
---|
395 | ; ((GnomeIconList gil) |
---|
396 | ; (GdkImlibImage im) |
---|
397 | ; (string text))) |
---|
398 | |
---|
399 | (define-func gnome_icon_list_clear |
---|
400 | none |
---|
401 | ((GnomeIconList gil))) |
---|
402 | |
---|
403 | (define-func gnome_icon_list_remove |
---|
404 | none |
---|
405 | ((GnomeIconList gil) |
---|
406 | (int pos))) |
---|
407 | |
---|
408 | (define-func gnome_icon_list_set_selection_mode |
---|
409 | none |
---|
410 | ((GnomeIconList gil) |
---|
411 | (GtkSelectionMode mode))) |
---|
412 | |
---|
413 | (define-func gnome_icon_list_select_icon |
---|
414 | none |
---|
415 | ((GnomeIconList gil) |
---|
416 | (int idx))) |
---|
417 | |
---|
418 | (define-func gnome_icon_list_unselect_icon |
---|
419 | none |
---|
420 | ((GnomeIconList gil) |
---|
421 | (int pos))) |
---|
422 | |
---|
423 | (define-func gnome_icon_list_unselect_all |
---|
424 | none |
---|
425 | ((GnomeIconList gil) |
---|
426 | (GdkEvent unused1 (= "NULL")) |
---|
427 | (pointer unused2 (= "NULL")))) |
---|
428 | |
---|
429 | (define-func gnome_icon_list_set_row_spacing |
---|
430 | none |
---|
431 | ((GnomeIconList gil) |
---|
432 | (int pixels))) |
---|
433 | |
---|
434 | (define-func gnome_icon_list_set_col_spacing |
---|
435 | none |
---|
436 | ((GnomeIconList gil) |
---|
437 | (int pixels))) |
---|
438 | |
---|
439 | (define-func gnome_icon_list_set_text_spacing |
---|
440 | none |
---|
441 | ((GnomeIconList gil) |
---|
442 | (int pixels))) |
---|
443 | |
---|
444 | (define-func gnome_icon_list_set_icon_border |
---|
445 | none |
---|
446 | ((GnomeIconList gil) |
---|
447 | (int pixels))) |
---|
448 | |
---|
449 | (define-func gnome_icon_list_set_separators |
---|
450 | none |
---|
451 | ((GnomeIconList gil) |
---|
452 | (string sep))) |
---|
453 | |
---|
454 | (define-func gnome_icon_list_moveto |
---|
455 | none |
---|
456 | ((GnomeIconList gil) |
---|
457 | (int pos) |
---|
458 | (double yalign (= "0.5")))) |
---|
459 | |
---|
460 | (define-func gnome_icon_list_icon_is_visible |
---|
461 | GtkVisibility |
---|
462 | ((GnomeIconList gil) |
---|
463 | (int pos))) |
---|
464 | |
---|
465 | (define-func gnome_icon_list_get_icon_at |
---|
466 | int |
---|
467 | ((GnomeIconList gil) |
---|
468 | (int x) |
---|
469 | (int y))) |
---|
470 | |
---|
471 | (define-func gnome_icon_list_get_items_per_line |
---|
472 | int |
---|
473 | ((GnomeIconList gil))) |
---|
474 | |
---|
475 | |
---|
476 | ;; gnome-canvas-util |
---|
477 | |
---|
478 | (define-func sgtk_gnome_canvas_points_new |
---|
479 | (GnomeCanvasPoints (copy nil)) |
---|
480 | ((SCM points)) |
---|
481 | (scm-name "gnome-canvas-points-new")) |
---|
482 | |
---|
483 | ;; XXX ... |
---|
484 | |
---|
485 | |
---|
486 | ;; Options |
---|
487 | |
---|
488 | (options |
---|
489 | (includes "#include <gnome.h>") |
---|
490 | (includes "#include \"rep-gnome.h\"") |
---|
491 | (init-func "sgtk_gnome_init_gnome_canvas_glue")) |
---|