112ac1d3 |
1 | ;; Common Lisp bindings for GTK+ v2.x |
2 | ;; Copyright 1999-2005 Espen S. Johnsen <espen@users.sf.net> |
560af5c5 |
3 | ;; |
112ac1d3 |
4 | ;; Permission is hereby granted, free of charge, to any person obtaining |
5 | ;; a copy of this software and associated documentation files (the |
6 | ;; "Software"), to deal in the Software without restriction, including |
7 | ;; without limitation the rights to use, copy, modify, merge, publish, |
8 | ;; distribute, sublicense, and/or sell copies of the Software, and to |
9 | ;; permit persons to whom the Software is furnished to do so, subject to |
10 | ;; the following conditions: |
560af5c5 |
11 | ;; |
112ac1d3 |
12 | ;; The above copyright notice and this permission notice shall be |
13 | ;; included in all copies or substantial portions of the Software. |
560af5c5 |
14 | ;; |
112ac1d3 |
15 | ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
16 | ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
17 | ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
18 | ;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
19 | ;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
20 | ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
21 | ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
560af5c5 |
22 | |
75689fea |
23 | ;; $Id: gtktypes.lisp,v 1.44 2006-02-26 15:30:01 espen Exp $ |
560af5c5 |
24 | |
25 | (in-package "GTK") |
26 | |
2719586f |
27 | (defclass requisition (boxed) |
28 | ((width |
29 | :allocation :alien |
30 | :accessor requisition-width |
31 | :initarg :width |
32 | :type int) |
33 | (height |
34 | :allocation :alien |
35 | :accessor requisition-height |
36 | :initarg :height |
37 | :type int)) |
1047e159 |
38 | (:metaclass boxed-class)) |
39 | |
2719586f |
40 | |
e6d40e16 |
41 | (defclass allocation (struct) |
42 | ((x |
43 | :allocation :alien |
44 | :accessor allocation-width |
45 | :initarg :x |
46 | :type int) |
47 | (y |
48 | :allocation :alien |
49 | :accessor allocation-width |
50 | :initarg :width |
51 | :type int) |
52 | (width |
53 | :allocation :alien |
54 | :accessor allocation-width |
55 | :initarg :width |
56 | :type int) |
57 | (height |
58 | :allocation :alien |
59 | :accessor allocation-height |
60 | :initarg :height |
61 | :type int)) |
9adccb27 |
62 | (:metaclass struct-class)) |
e6d40e16 |
63 | |
2719586f |
64 | (defclass border (boxed) |
65 | ((left |
66 | :allocation :alien |
67 | :accessor border-left |
68 | :initarg :left |
69 | :type int) |
70 | (right |
71 | :allocation :alien |
72 | :accessor border-right |
73 | :initarg :right |
74 | :type int) |
75 | (top |
76 | :allocation :alien |
77 | :accessor border-top |
78 | :initarg :top |
79 | :type int) |
80 | (bottom |
81 | :allocation :alien |
82 | :accessor border-bottom |
83 | :initarg :bottom |
84 | :type int)) |
1047e159 |
85 | (:metaclass boxed-class)) |
2719586f |
86 | |
f5b67f2b |
87 | (defclass stock-item (struct) |
88 | ((id |
89 | :allocation :alien |
90 | :accessor stock-item-id |
91 | :initarg :id |
92 | :type string) |
93 | (label |
94 | :allocation :alien |
95 | :accessor stock-item-label |
96 | :initarg :label |
97 | :type string) |
98 | (modifier |
99 | :allocation :alien |
100 | :accessor stock-item-modifier |
101 | :initarg :modifier |
102 | :type gdk:modifier-type) |
103 | (keyval |
104 | :allocation :alien |
105 | :accessor stock-item-keyval |
106 | :initarg :keyval |
107 | :type int) |
108 | (translation-domain |
109 | :allocation :alien |
110 | :accessor stock-item-translation-domain |
111 | :initarg :translation-domain |
112 | :type string)) |
5e17fb78 |
113 | (:metaclass struct-class)) |
f5b67f2b |
114 | |
163a08aa |
115 | ;; We don't really need to access any slots in this class, so we just |
116 | ;; specify the total size |
117 | (defclass tree-iter (boxed) |
118 | ( |
119 | ;; (stamp :allocation :alien :type int) |
120 | ;; (user-data :allocation :alien :type pointer) |
121 | ;; (user-data2 :allocation :alien :type pointer) |
122 | ;; (user-data3 :allocation :alien :type pointer) |
123 | ) |
124 | (:metaclass boxed-class) |
125 | (:size #.(+ (size-of 'int) (* 3 (size-of 'pointer))))) |
2a8752b0 |
126 | |
127 | |
128 | ;; (defclass tree-path (boxed) |
129 | ;; ((depth :allocation :alien :type int) |
130 | ;; (indices :allocation :alien :type pointer)) |
131 | ;; (:metaclass boxed-class)) |
132 | |
f4175703 |
133 | (deftype tree-path () '(vector integer)) |
dfa4f314 |
134 | (register-type 'tree-path '|gtk_tree_path_get_type|) |
2a8752b0 |
135 | |
68f519e0 |
136 | (deftype position () |
137 | '(or int (enum (:start 0) (:end -1) (:first 0) (:last -1)))) |
138 | |
75689fea |
139 | (define-type-method from-alien-form ((type position) form) |
140 | (declare (ignore type)) |
141 | (from-alien-form 'int form)) |
142 | |
143 | (define-type-method from-alien-function ((type position)) |
144 | (declare (ignore type)) |
145 | (from-alien-function 'int)) |
146 | |
147 | (define-type-method reader-function ((type position)) |
148 | (declare (ignore type)) |
68f519e0 |
149 | (reader-function 'int)) |
d76e9fca |
150 | |
163a08aa |
151 | |
152 | |
2719586f |
153 | (define-types-by-introspection "Gtk" |
154 | ;; Manually defined |
155 | ("GtkObject" :ignore t) |
156 | ("GtkRequisition" :ignore t) |
157 | ("GtkBorder" :ignore t) |
2a8752b0 |
158 | ("GtkTreeIter" :ignore t) |
159 | ("GtkTreePath" :ignore t) |
aa77651b |
160 | ; ("GtkStyle" :ignore t) |
1047e159 |
161 | |
5b51dee1 |
162 | ;; Manual override |
163 | ("GtkWidget" |
164 | :slots |
c289d084 |
165 | ((child-properties |
b19bbc94 |
166 | :special t |
c289d084 |
167 | :accessor widget-child-properties |
1047e159 |
168 | :type container-child) |
5b51dee1 |
169 | (window |
170 | :allocation :virtual |
171 | :getter "gtk_widget_get_window" |
172 | :reader widget-window |
173 | :type gdk:window) |
c2a12566 |
174 | (parent :merge t :initarg nil) |
175 | (visible :merge t :initarg nil) |
68f519e0 |
176 | (parent-window |
177 | :allocation :virtual |
178 | :getter %widget-parent-window |
179 | :setter "gtk_widget_set_parent_window" |
180 | :accessor widget-parent-window |
181 | :initarg :parent-window |
182 | :type gdk:window) |
5b51dee1 |
183 | (state |
184 | :allocation :virtual |
185 | :getter "gtk_widget_get_state" |
186 | :setter "gtk_widget_set_state" |
187 | :accessor widget-state |
188 | :initarg :state |
189 | :type state-type) |
190 | (colormap |
191 | :allocation :virtual |
192 | :getter "gtk_widget_get_colormap" |
e6d40e16 |
193 | :setter "gtk_widget_set_colormap" |
194 | :initarg :colormap |
195 | :accessor widget-colormap |
5b51dee1 |
196 | :type gdk:colormap) |
197 | (visual |
198 | :allocation :virtual |
199 | :getter "gtk_widget_get_visual" |
200 | :reader widget-visual |
e6d40e16 |
201 | :type gdk:visual) |
202 | (direction |
203 | :allocation :virtual |
204 | :getter "gtk_widget_get_direction" |
205 | :setter "gtk_widget_set_direction" |
206 | :accessor widget-direction |
207 | :initarg :direction |
208 | :type text-direction) |
209 | (composite-name |
210 | :allocation :virtual |
211 | :getter "gtk_widget_get_composite_name" |
212 | :setter "gtk_widget_set_composite_name" |
213 | :accessor widget-composite-name |
214 | :initarg :composite-name |
68f519e0 |
215 | :type (copy-of string)) ; will leak the string when setting |
e6d40e16 |
216 | (settings |
217 | :allocation :virtual |
218 | :getter "gtk_widget_get_settings" |
219 | :accessor widget-settings |
220 | :type settings) |
221 | (child-visible |
222 | :allocation :virtual |
223 | :getter "gtk_widget_get_child_visible" |
224 | :setter "gtk_widget_set_child_visible" |
225 | :accessor widget-child-visible-p |
226 | :initarg :child-visible |
aa77651b |
227 | :type boolean) |
228 | (width-request |
229 | :merge t :unbound -1) |
230 | (height-request |
231 | :merge t :unbound -1))) |
e6d40e16 |
232 | |
5b51dee1 |
233 | ("GtkContainer" |
234 | :slots |
d76e9fca |
235 | ((child :ignore t) |
5b51dee1 |
236 | (children |
237 | :allocation :virtual |
238 | :getter container-children |
d76e9fca |
239 | :setter (setf container-children) |
240 | ;; The following doesn't work because gtk_container_get_children doesn't |
241 | ;; increase the reference count of the children |
242 | ; :getter "gtk_container_get_children" |
243 | ; :reader container-children |
244 | ; :type (glist widget) |
245 | ) |
246 | (child-type |
247 | :allocation :virtual |
cb4bf772 |
248 | :getter "gtk_container_child_type" |
d76e9fca |
249 | :reader container-child-type |
250 | :type gtype) |
5b51dee1 |
251 | (focus-child |
252 | :allocation :virtual |
253 | :getter "gtk_container_get_focus_child" |
254 | :setter "gtk_container_set_focus_child" |
255 | :accessor container-focus-child |
256 | :initarg :focus-child |
257 | :type widget) |
e6d40e16 |
258 | (focus-chain |
259 | :allocation :virtual |
260 | :getter container-focus-chain |
261 | :setter (setf container-focus-chain)) |
5b51dee1 |
262 | (focus-hadjustment |
263 | :allocation :virtual |
264 | :getter "gtk_container_get_focus_hadjustment" |
265 | :setter "gtk_container_set_focus_hadjustment" |
266 | :accessor container-focus-hadjustment |
267 | :initarg :focus-hadjustment |
268 | :type adjustment) |
269 | (focus-vadjustment |
270 | :allocation :virtual |
271 | :getter "gtk_container_get_focus_vadjustment" |
272 | :setter "gtk_container_set_focus_vadjustment" |
273 | :accessor container-focus-vadjustment |
274 | :initarg :focus-vadjustment |
d76e9fca |
275 | :type adjustment) |
276 | (reallocate-redraws |
277 | :allocation :virtual |
278 | :getter "gtk_container_get_reallocate_redraws" |
279 | :setter "gtk_container_set_reallocate_redraws" |
280 | :accessor container-reallocate-redraws |
281 | :initarg :reallocate-redraws |
282 | :type boolean))) |
5b51dee1 |
283 | |
284 | ("GtkBin" |
285 | :slots |
286 | ((child |
287 | :allocation :virtual |
56460319 |
288 | :getter "gtk_bin_get_child" |
289 | :setter (setf bin-child) |
290 | :reader bin-child |
291 | :type widget))) |
3f73963b |
292 | |
293 | ("GtkWindow" |
294 | :slots |
4d16221f |
295 | ((focus-widget |
3f73963b |
296 | :allocation :virtual |
297 | :getter "gtk_window_get_focus" |
298 | :setter "gtk_window_set_focus" |
299 | :accessor window-focus-widget |
300 | :initarg :focus-widget |
301 | :type widget) |
302 | (default-widget |
303 | :allocation :virtual |
304 | :getter "gtk_window_get_default" |
305 | :setter "gtk_window_set_default" |
306 | :accessor window-default-widget |
307 | :initarg :default-widget |
308 | :type widget) |
3f73963b |
309 | (has-frame |
310 | :allocation :virtual |
311 | :getter "gtk_window_get_has_frame" |
312 | :setter "gtk_window_set_has_frame" |
313 | :accessor window-has-frame-p |
314 | :initarg :has-frame |
315 | :type boolean) |
4d16221f |
316 | (icon-list |
3f73963b |
317 | :allocation :virtual |
b049d554 |
318 | :getter %window-get-icon-list |
4d16221f |
319 | :setter "gtk_window_set_icon_list" |
320 | :accessor window-icon-list |
321 | :initarg :icon-list |
322 | :type (glist gdk:pixbuf)) |
3f73963b |
323 | (mnemonic-modifier |
324 | :allocation :virtual |
325 | :getter "gtk_window_get_mnemonic_modifier" |
326 | :setter "gtk_window_set_mnemonic_modifier" |
327 | :accessor window-mnemonic-modifier |
328 | :initarg :mnemonic-modifier |
329 | :type gdk:modifier-type) |
330 | (transient-for |
331 | :allocation :virtual |
332 | :getter "gtk_window_get_transient_for" |
333 | :setter "gtk_window_set_transient_for" |
334 | :accessor window-transient-for |
335 | :initarg :transient-for |
4d16221f |
336 | :type window) |
337 | (group |
338 | :allocation :virtual |
339 | :getter "gtk_window_get_group" |
340 | :setter (setf window-group) |
341 | :reader window-group |
342 | :initarg :group |
343 | :type window-group) |
344 | (default-width :merge t :unbound -1) |
345 | (default-height :merge t :unbound -1))) |
5b51dee1 |
346 | |
4d16221f |
347 | ("GtkWindowGroup" |
348 | :slots |
349 | ((grabs |
350 | :allocation :alien |
351 | :accessor window-group-grabs |
352 | :type (gslist window)))) |
353 | |
5b51dee1 |
354 | ("GtkTooltips" |
355 | :slots |
356 | ((enabled |
357 | :allocation :virtual |
358 | :getter "gtk_tooltips_get_enabled" |
359 | :setter (setf tooltips-enabled-p) |
360 | :reader tooltips-enabled-p |
361 | :initarg :enabled |
362 | :type boolean))) |
363 | |
5b51dee1 |
364 | ("GtkMenuItem" |
365 | :slots |
366 | ((label |
367 | :allocation :virtual |
f5b67f2b |
368 | :getter menu-item-label |
369 | :setter (setf menu-item-label) |
5b51dee1 |
370 | :type string) |
d76e9fca |
371 | (use-underline |
372 | :allocation :user-data |
373 | :initform nil |
374 | :initarg :use-underline |
375 | :accessor menu-item-use-underline-p) |
f5b67f2b |
376 | (right-justified |
377 | :allocation :virtual |
378 | :getter "gtk_menu_item_get_right_justified" |
379 | :setter "gtk_menu_item_set_right_justified" |
380 | :accessor menu-item-right-justified-p |
381 | :initarg :right-justified |
382 | :type boolean) |
5b51dee1 |
383 | (submenu |
384 | :allocation :virtual |
385 | :getter "gtk_menu_item_get_submenu" |
d76e9fca |
386 | :setter "gtk_menu_item_set_submenu" |
387 | :accessor menu-item-submenu |
5b51dee1 |
388 | :initarg :submenu |
d76e9fca |
389 | :type widget))) |
5b51dee1 |
390 | |
bdc0e300 |
391 | ("GtkMenuShell" |
392 | :slots |
393 | ((take-focus-p |
394 | :allocation :virtual |
395 | :getter "gtk_menu_shell_get_take_focus" |
396 | :setter "gtk_menu_shell_set_take_focus" |
397 | :accessor menu-shell-take-focus-p |
398 | :type boolean))) |
399 | |
5b51dee1 |
400 | ("GtkColorSelectionDialog" |
401 | :slots |
402 | ((colorsel |
403 | :allocation :alien |
404 | :reader color-selection-dialog-colorsel |
405 | :type widget) |
406 | (ok-button |
407 | :allocation :alien |
408 | :reader color-selection-dialog-ok-button |
409 | :type widget) |
410 | (cancel-button |
411 | :allocation :alien |
412 | :reader color-selection-dialog-cancel-button |
413 | :type widget) |
414 | (help-button |
415 | :allocation :alien |
416 | :reader color-selection-dialog-help-button |
417 | :type widget))) |
418 | |
419 | ("GtkScrolledWindow" |
420 | :slots |
bdc0e300 |
421 | (#-gtk2.8 |
422 | (hscrollbar |
423 | :allocation :alien |
5b51dee1 |
424 | :reader scrolled-window-hscrollbar |
425 | :type widget) |
bdc0e300 |
426 | #-gtk2.8 |
5b51dee1 |
427 | (vscrollbar |
428 | :allocation :alien |
429 | :reader scrolled-window-vscrollbar |
bdc0e300 |
430 | :type widget) |
431 | #+gtk2.8 |
432 | (hscrollbar |
433 | :allocation :virtual |
434 | :getter "gtk_scrolled_window_get_hscrollbar" |
435 | :reader scrolled-window-hscrollbar |
436 | :type widget) |
437 | #+gtk2.8 |
438 | (vscrollbar |
439 | :allocation :virtual |
440 | :getter "gtk_scrolled_window_get_hscrollbar" |
441 | :reader scrolled-window-vscrollbar |
5b51dee1 |
442 | :type widget))) |
560af5c5 |
443 | |
5b51dee1 |
444 | ("GtkPaned" |
1047e159 |
445 | :slots |
5b51dee1 |
446 | ((child1 |
560af5c5 |
447 | :allocation :virtual |
1dd03ab8 |
448 | :getter "gtk_paned_get_child1" |
449 | :setter "gtk_paned_add1" |
450 | :accessor paned-child1 |
5b51dee1 |
451 | :initarg :child1 |
560af5c5 |
452 | :type widget) |
5b51dee1 |
453 | (child2 |
2d379b6a |
454 | :allocation :virtual |
1dd03ab8 |
455 | :getter "gtk_paned_get_child2" |
456 | :setter "gtk_paned_add2" |
457 | :accessor paned-child2 |
5b51dee1 |
458 | :initarg :child2 |
459 | :type widget))) |
560af5c5 |
460 | |
5b51dee1 |
461 | ("GtkMenu" |
462 | :slots |
463 | ((accel-group |
464 | :allocation :virtual |
465 | :getter "gtk_menu_get_accel_group" |
466 | :setter "gtk_menu_set_accel_group" |
467 | :accessor menu-accel-group |
468 | :initarg :accel-group |
469 | :type accel-group) |
470 | (active |
471 | :allocation :virtual |
472 | :getter "gtk_menu_get_active" |
473 | :setter (setf menu-active) |
474 | :reader menu-active |
475 | :initarg :active |
476 | :type widget) |
d76e9fca |
477 | (screen |
478 | :allocation :virtual |
479 | :getter "gtk_menu_get_screen" |
480 | :setter "gtk_menu_set_screen" |
481 | :accessor menu-screen |
482 | :initarg :screen |
483 | :type gdk:screen) |
484 | (attach-widget |
485 | :allocation :virtual |
486 | :getter "gtk_menu_get_attach_widget" |
487 | :reader menu-attach-widget |
488 | :type widget) |
489 | #-gtk2.6 |
490 | (tearoff-state |
5b51dee1 |
491 | :allocation :virtual |
492 | :getter "gtk_menu_get_tearoff_state" |
493 | :setter "gtk_menu_set_tearoff_state" |
d76e9fca |
494 | :accessor menu-tearoff-state-p |
495 | :initarg :tearoff-state |
5b51dee1 |
496 | :type boolean))) |
497 | |
498 | ("GtkToolbar" |
499 | :slots |
cb4bf772 |
500 | ((show-tooltips |
5b51dee1 |
501 | :allocation :virtual |
502 | :getter "gtk_toolbar_get_tooltips" |
503 | :setter "gtk_toolbar_set_tooltips" |
cb4bf772 |
504 | :accessor toolbar-show-tooltips-p |
505 | :initarg :show-tooltips |
5b51dee1 |
506 | :type boolean) |
cb4bf772 |
507 | (tooltips |
5b51dee1 |
508 | :allocation :virtual |
cb4bf772 |
509 | :getter "gtk_toolbar_get_tooltips_object" |
510 | :reader toolbar-tooltips |
511 | :type tooltips) |
1047e159 |
512 | (toolbar-style |
513 | :allocation :property |
514 | :pname "toolbar-style" |
515 | :initarg :toolbar-style |
516 | :accessor toolbar-style |
cb4bf772 |
517 | :type toolbar-style) |
518 | (n-items |
519 | :allocation :virtual |
520 | :getter "gtk_toolbar_get_n_items" |
521 | :reader toolbar-n-items |
522 | :type int))) |
5b51dee1 |
523 | |
d76e9fca |
524 | ("GtkToolItem" |
525 | :slots |
cb4bf772 |
526 | ((use-drag-window |
d76e9fca |
527 | :allocation :virtual |
cb4bf772 |
528 | :getter "gtk_tool_item_get_use_drag_window" |
529 | :setter "gtk_tool_item_set_use_drag_window" |
530 | :accessor tool-item-use-drag-window-p |
d76e9fca |
531 | :initarg :drag-window |
cb4bf772 |
532 | :type boolean) |
533 | (tip-text |
534 | :allocation :user-data |
535 | :setter (setf tool-item-tip-text) |
536 | :initarg :tip-text |
537 | :reader tool-item-tip-text) |
538 | (tip-private |
539 | :allocation :user-data |
540 | :setter (setf tool-item-tip-private) |
541 | :initarg :tip-private |
542 | :reader tool-item-tip-private))) |
543 | |
544 | ("GtkToolButton" |
545 | :slots |
546 | ((stock-id :merge t :initarg :stock) |
547 | (icon-widget :merge t :initarg :icon))) |
d76e9fca |
548 | |
549 | ("GtkToggleToolButton" |
550 | :slots |
551 | ((active |
552 | :allocation :virtual |
553 | :getter "gtk_toggle_tool_button_get_active" |
554 | :setter "gtk_toggle_tool_button_get_active" |
555 | :accessor toggle-tool-button-active-p |
556 | :initarg :active |
557 | :type boolean))) |
558 | |
559 | ("GtkRadioToolButton" |
560 | :slots |
561 | ((group |
562 | :allocation :virtual |
563 | :getter "gtk_radio_tool_button_get_group" |
564 | :reader radio-tool-button-group |
cb4bf772 |
565 | :type (copy-of (gslist widget))) |
566 | (value |
567 | :allocation :user-data |
568 | :initarg :value |
569 | :accessor radio-tool-button-value |
570 | :documentation "Value passed as argument to the activate callback"))) |
d76e9fca |
571 | |
f5b67f2b |
572 | ("GtkNotebook" |
573 | :slots |
574 | ((current-page |
575 | :allocation :virtual |
68f519e0 |
576 | :getter %notebook-current-page |
f5b67f2b |
577 | :setter (setf notebook-current-page) |
68f519e0 |
578 | :reader notebook-current-page |
579 | :type widget |
f5b67f2b |
580 | :initarg :current-page) |
68f519e0 |
581 | (current-page-num |
582 | :allocation :virtual |
583 | :getter "gtk_notebook_get_current_page" |
584 | :setter "gtk_notebook_set_current_page" |
585 | :unbound -1 |
586 | :initarg :current-page-num |
587 | :accessor notebook-current-page-num |
588 | :type position))) |
f5b67f2b |
589 | |
5b51dee1 |
590 | ("GtkRuler" |
591 | :slots |
592 | ((metric |
593 | :allocation :virtual |
594 | :getter "gtk_ruler_get_metric" |
595 | :setter "gtk_ruler_set_metric" |
596 | :accessor ruler-metric |
597 | :initarg :metric |
598 | :type metric-type))) |
599 | |
600 | ("GtkProgressBar" |
601 | :slots |
602 | ; deprecated properties |
603 | ((bar-style :ignore t) |
604 | (adjustment :ignore t) |
605 | (activity-step :ignore t) |
606 | (activity-blocks :ignore t) |
607 | (discrete-blocks :ignore t))) |
608 | |
d76e9fca |
609 | ("GtkHandleBox" |
610 | :slots |
611 | ; deprecated property |
612 | ((shadow :ignore t))) |
613 | |
614 | ("GtkFrame" |
615 | :slots |
616 | ; deprecated property |
617 | ((shadow :ignore t))) |
618 | |
5b51dee1 |
619 | ("GtkTable" |
620 | :slots |
621 | ((column-spacing |
622 | :allocation :virtual |
623 | :getter "gtk_table_get_default_col_spacing" |
624 | :setter "gtk_table_set_col_spacings" |
625 | :initarg :column-spacing |
626 | :type unsigned-int) |
627 | (row-spacing |
628 | :allocation :virtual |
629 | :getter "gtk_table_get_default_row_spacing" |
630 | :setter "gtk_table_set_row_spacings" |
631 | :initarg :row-spacing |
632 | :type unsigned-int))) |
633 | |
634 | ("GtkDialog" |
635 | :slots |
1047e159 |
636 | ((vbox |
5b51dee1 |
637 | :allocation :virtual |
638 | :getter "gtk_dialog_get_vbox" |
1047e159 |
639 | :reader dialog-vbox |
5b51dee1 |
640 | :type widget) |
641 | (action-area |
642 | :allocation :virtual |
643 | :getter "gtk_dialog_get_action_area" |
644 | :reader dialog-action-area |
645 | :type widget))) |
2ed3bebb |
646 | |
d76e9fca |
647 | ("GtkEntry" |
5b51dee1 |
648 | :slots |
d76e9fca |
649 | ((layout |
5b51dee1 |
650 | :allocation :virtual |
d76e9fca |
651 | :getter "gtk_entry_get_layout" |
652 | :reader entry-layout |
653 | :type pango:layout) |
654 | (completion |
163a08aa |
655 | :allocation :virtual |
d76e9fca |
656 | :getter "gtk_entry_get_completion" |
657 | :setter "gtk_entry_set_completion" |
658 | :initarg :completion |
659 | :accessor entry-completion |
660 | :type entry-completion) |
661 | (max-length :merge t :unbound 0) |
662 | #+gtk2.6 |
647c99e5 |
663 | (width-chars :merge t :unbound -1))) |
d76e9fca |
664 | |
f45fd227 |
665 | ("GtkEntryCompletion" |
666 | :slots |
667 | ((entry |
668 | :allocation :virtual |
669 | :getter "gtk_entry_completion_get_entry" |
670 | :reader entry-completion-entry |
671 | :type entry) |
d76e9fca |
672 | (minimum-key-length :merge t :unbound -1) |
f45fd227 |
673 | #+gtk2.6 |
d76e9fca |
674 | (text-column :merge t :unbound -1))) |
f45fd227 |
675 | |
5b51dee1 |
676 | ("GtkRadioButton" |
677 | :slots |
678 | ((group |
679 | :allocation :virtual |
680 | :getter "gtk_radio_button_get_group" |
681 | :reader radio-button-group |
cb4bf772 |
682 | :type (copy-of (gslist widget))) |
683 | (value |
684 | :allocation :user-data |
685 | :initarg :value |
686 | :accessor radio-button-value |
687 | :documentation "Value passed as argument to the activate callback"))) |
d520140e |
688 | |
5b51dee1 |
689 | ("GtkRadioMenuItem" |
690 | :slots |
691 | ((group |
692 | :allocation :virtual |
693 | :getter "gtk_radio_menu_item_get_group" |
694 | :reader radio-menu-item-group |
cb4bf772 |
695 | :type (copy-of (gslist widget))) |
696 | (value |
697 | :allocation :user-data |
698 | :initarg :value |
699 | :accessor radio-menu-item-value |
700 | :documentation "Value passed as argument to the activate callback"))) |
560af5c5 |
701 | |
5b51dee1 |
702 | ("GtkLayout" |
703 | :slots |
704 | ((bin-window |
1047e159 |
705 | :allocation :virtual |
5b51dee1 |
706 | :getter "gtk_layout_get_bin_window" |
707 | :reader layout-bin-window |
f784870f |
708 | :type gdk:window))) |
f5b67f2b |
709 | |
710 | ("GtkFixed" |
711 | :slots |
712 | ((has-window |
1047e159 |
713 | :allocation :virtual |
f5b67f2b |
714 | :getter "gtk_fixed_get_has_window" |
715 | :setter "gtk_fixed_set_has_window" |
716 | :reader fixed-has-window-p |
717 | :initarg :has-window |
718 | :type boolean))) |
1047e159 |
719 | |
720 | ("GtkRange" |
721 | :slots |
722 | ((value |
723 | :allocation :virtual |
724 | :getter "gtk_range_get_value" |
725 | :setter "gtk_range_set_value" |
726 | :initarg :value |
727 | :accessor range-value |
728 | :type double-float) |
729 | (upper |
730 | :allocation :virtual |
731 | :getter range-upper |
732 | :setter (setf range-upper) |
733 | :initarg :upper) |
734 | (lower |
735 | :allocation :virtual |
736 | :getter range-lower |
737 | :setter (setf range-lower) |
738 | :initarg :lower) |
739 | (step-increment |
740 | :allocation :virtual |
741 | :getter range-step-increment |
742 | :setter (setf range-step-increment) |
743 | :initarg :step-increment) |
744 | (page-increment |
745 | :allocation :virtual |
746 | :getter range-page-increment |
747 | :setter (setf range-page-increment) |
748 | :initarg :page-increment))) |
749 | |
750 | ("GtkImage" |
751 | :slots |
d76e9fca |
752 | ((file :ignore t) |
753 | #+gtk2.6 |
754 | (pixel-size :merge t :unbound -1))) |
755 | |
756 | ("GtkLabel" |
757 | :slots |
758 | ((layout |
759 | :allocation :virtual |
760 | :getter "gtk_label_get_layout" |
761 | :reader label-layout |
762 | :type pango:layout))) |
763 | |
68f519e0 |
764 | ("GtkScale" |
765 | :slots |
766 | ((layout |
767 | :allocation :virtual |
768 | :getter "gtk_scale_get_layout" |
769 | :reader scale-layout |
770 | :type pango:layout))) |
771 | |
1047e159 |
772 | ("GtkEditable" |
773 | :slots |
774 | ((editable |
775 | :allocation :virtual |
776 | :getter "gtk_editable_get_editable" |
777 | :setter "gtk_editable_set_editable" |
778 | :reader editable-editable-p |
779 | :initarg :editable |
780 | :type boolean) |
781 | (position |
782 | :allocation :virtual |
783 | :getter "gtk_editable_get_position" |
784 | :setter "gtk_editable_set_position" |
785 | :reader editable-position |
786 | :initarg :position |
cb4bf772 |
787 | :type position) |
1047e159 |
788 | (text |
789 | :allocation :virtual |
790 | :getter editable-text |
791 | :setter (setf editable-text) |
792 | :initarg text))) |
793 | |
794 | ("GtkFileChooser" |
795 | :slots |
796 | ((filename |
797 | :allocation :virtual |
798 | :getter "gtk_file_chooser_get_filename" |
799 | :setter "gtk_file_chooser_set_filename" |
800 | :accessor file-chooser-filename |
801 | :initarg :filename |
802 | :type string) |
803 | (current-name |
804 | :allocation :virtual |
805 | :setter "gtk_file_chooser_set_current_name" |
68f519e0 |
806 | :accessor file-chooser-current-name |
1047e159 |
807 | :initarg :current-name |
808 | :type string) |
809 | (current-folder |
810 | :allocation :virtual |
811 | :setter "gtk_file_chooser_set_current_folder" |
812 | :setter "gtk_file_chooser_get_current_folder" |
68f519e0 |
813 | :accessor file-chooser-current-folder |
1047e159 |
814 | :initarg :current-folder |
815 | :type string) |
816 | (uri |
817 | :allocation :virtual |
818 | :getter "gtk_file_chooser_get_uri" |
819 | :setter "gtk_file_chooser_set_uri" |
68f519e0 |
820 | :accessor file-chooser-uri |
1047e159 |
821 | :initarg :uri |
822 | :type string) |
823 | (current-folder-uri |
824 | :allocation :virtual |
825 | :setter "gtk_file_chooser_set_current_folder_uri" |
826 | :setter "gtk_file_chooser_get_current_folder_uri" |
68f519e0 |
827 | :accessor file-chooser-current-folder-uri |
1047e159 |
828 | :initarg :current-folder-uri |
829 | :type string))) |
830 | |
68f519e0 |
831 | ("GtkFileFilter" |
832 | :slots |
833 | ((name |
834 | :allocation :virtual |
835 | :getter "gtk_file_filter_get_name" |
836 | :setter "gtk_file_filter_set_name" |
837 | :accessor file-filter-name |
838 | :initarg :name |
839 | :type string))) |
840 | |
1a1949c7 |
841 | ("GtkTreeView" |
842 | :slots |
843 | ((columns |
844 | :allocation :virtual |
845 | :getter "gtk_tree_view_get_columns" |
846 | :reader tree-view-columns |
f4175703 |
847 | :type (glist tree-view-column)) |
848 | (selection |
849 | :allocation :virtual |
850 | :getter "gtk_tree_view_get_selection" |
851 | :reader tree-view-selection |
852 | :type tree-selection))) |
1a1949c7 |
853 | |
2a8752b0 |
854 | ("GtkTreeModel" |
855 | :slots |
856 | ((n-columns |
857 | :allocation :virtual |
858 | :getter "gtk_tree_model_get_n_columns" |
859 | :reader tree-model-n-columns |
860 | :type int))) |
861 | |
f4175703 |
862 | ("GtkTreeSelection" |
863 | :slots |
864 | ((mode |
865 | :allocation :virtual |
866 | :getter "gtk_tree_selection_get_mode" |
867 | :setter "gtk_tree_selection_set_mode" |
868 | :accessor tree-selection-mode |
869 | :initarg :mode |
870 | :type selection-mode) |
871 | (tree-view |
872 | :allocation :virtual |
873 | :getter "gtk_tree_selection_get_mode" |
874 | :reader tree-selection-mode |
875 | :type tree-view))) |
876 | |
1a1949c7 |
877 | ("GtkComboBox" |
878 | :slots |
879 | ((active-iter |
880 | :allocation :virtual |
881 | :getter "gtk_combo_box_get_active_iter" |
882 | :setter "gtk_combo_box_set_active_iter" |
883 | :accessor combo-box-active-iter |
884 | :type tree-iter))) |
885 | |
aa77651b |
886 | ("GtkTextBuffer" |
887 | :slots |
888 | ((line-count |
889 | :allocation :virtual |
890 | :getter "gtk_text_buffer_get_line_count" |
891 | :reader text-buffer-line-count |
892 | :type int) |
893 | (char-count |
894 | :allocation :virtual |
895 | :getter "gtk_text_buffer_get_char_count" |
896 | :reader text-buffer-char-count |
897 | :type int) |
898 | (modified |
899 | :allocation :virtual |
900 | :getter "gtk_text_buffer_get_modified" |
901 | :setter "gtk_text_buffer_set_modified" |
902 | :accessor text-buffer-modifed-p |
903 | :type boolean))) |
904 | |
5e17fb78 |
905 | ("GtkTextView" |
906 | :slots |
907 | ((default-attributes |
908 | :allocation :virtual |
909 | :getter "gtk_text_view_get_default_attributes" |
910 | :reader text-view-default-attributes |
911 | :type text-attributes))) |
912 | |
aa77651b |
913 | ("GtkTextTagTable" |
914 | :slots |
915 | ((size |
916 | :allocation :virtual |
917 | :getter "gtk_text_tag_table_get_size" |
918 | :reader text-tag-table-size |
919 | :type int))) |
920 | |
921 | ("GtkTextTag" |
922 | :slots |
923 | ((priority |
924 | :allocation :virtual |
925 | :getter "gtk_text_tag_get_priority" |
926 | :setter "gtk_text_tag_set_priority" |
927 | :accessor text-tag-priority |
928 | :type int) |
929 | (weight |
930 | :merge t :type pango:weight))) |
931 | |
0763f21d |
932 | ("GtkTextMark" |
933 | :slots |
934 | ((buffer |
935 | :allocation :virtual |
936 | :getter "gtk_text_mark_get_buffer" |
937 | :reader text-mark-buffer |
938 | :type text-buffer) |
939 | (name |
940 | :allocation :virtual |
941 | :getter "gtk_text_mark_get_name" |
942 | :reader text-mark-name |
943 | :type string) |
944 | (visible |
945 | :allocation :virtual |
946 | :getter "gtk_text_mark_get_visible" |
947 | :setter "gtk_text_mark_set_visible" |
948 | :accessor text-mark-visible-p |
949 | :type boolean) |
950 | (deleted |
951 | :allocation :virtual |
952 | :getter "gtk_text_mark_get_deleted" |
953 | :reader text-mark-deleted-p |
954 | :type boolean) |
955 | (left-gravity |
956 | :allocation :virtual |
957 | :getter "gtk_text_mark_get_left_gravity" |
958 | :reader text-mark-left-gravity-p |
959 | :type boolean))) |
960 | |
5e17fb78 |
961 | ("GtkUIManager" |
962 | :type ui-manager |
963 | :slots |
964 | ((action-groups |
965 | :allocation :virtual |
966 | :getter "gtk_ui_manager_get_action_groups" |
967 | :reader ui-manager-action-groups |
968 | :type (copy-of (glist action-group))) |
969 | (accel-group |
970 | :allocation :virtual |
971 | :getter "gtk_ui_manager_get_accel_group" |
972 | :reader ui-manager-accel-group |
973 | :type accel-group))) |
974 | |
975 | ("GtkUIManagerItemType" |
976 | :type ui-manager-item-type) |
977 | |
a5522de5 |
978 | ("GtkAction" |
5e17fb78 |
979 | :slots |
980 | ((accelerator |
a5522de5 |
981 | :allocation :user-data :initarg :accelerator |
982 | :reader action-accelerator))) |
5e17fb78 |
983 | |
984 | ("GtkToggleAction" |
985 | :slots |
986 | ((active |
987 | :allocation :virtual |
988 | :getter "gtk_toggle_action_get_active" |
989 | :setter "gtk_toggle_action_set_active" |
990 | :initarg :active |
991 | :accessor toggle-action-active-p |
992 | :type boolean))) |
993 | |
994 | ("GtkRadioAction" |
995 | :slots |
996 | ((group |
997 | :allocation :virtual |
998 | :getter "gtk_radio_button_get_group" |
d76e9fca |
999 | :reader radio-action-group |
5e17fb78 |
1000 | :type (copy-of (gslist widget))) |
a5522de5 |
1001 | (self |
1002 | :allocation :property :pname "value" :type int |
1003 | :documentation "A hack so we can use the alien function gtk_radio_action_get_current_value to retrieve the active radio action in a group.") |
5e17fb78 |
1004 | (value |
a5522de5 |
1005 | :allocation :user-data :initarg :value :accessor radio-action-value))) |
2a8752b0 |
1006 | |
68f519e0 |
1007 | ("GtkColorSelection" |
1008 | :slots |
1009 | ((previous-alpha |
1010 | :allocation :virtual |
1011 | :getter "gtk_color_selection_get_previous_alpha" |
1012 | :setter "gtk_color_selection_get_previous_alpha" |
1013 | :initarg :previous-alpha |
1014 | :accessor color-selection-previous-alpha |
1015 | :type (unsigned 16)) |
1016 | (previous-color |
1017 | :allocation :virtual |
1018 | :getter "gtk_color_selection_get_previous_color" |
1019 | :setter "gtk_color_selection_get_previous_color" |
1020 | :initarg :previous-color |
1021 | :accessor color-selection-previous-color |
1022 | :type gdk:color))) |
1023 | |
1024 | ("GtkFontSelection" |
1025 | :slots |
1026 | ; deprecated property |
1027 | ((font :ignore t))) |
aa77651b |
1028 | |
647c99e5 |
1029 | ("GtkClipboard" |
1030 | :slots |
1031 | ((display |
1032 | :allocation :virtual |
1033 | :getter "gtk_clipboard_get_display" |
1034 | :reader clipboard-display |
1035 | :type gdk:display))) |
1036 | |
43e260ae |
1037 | #+gtk2.6 |
1038 | ("GtkIconView" |
1039 | :slots |
1040 | ((text-column :merge t :setter %icon-view-set-text-column) |
1041 | (markup-column :merge t :setter %icon-view-set-markup-column) |
1042 | (pixbuf-column :merge t :setter %icon-view-set-pixbuf-column))) |
647c99e5 |
1043 | |
5b51dee1 |
1044 | ;; Not needed |
1045 | ("GtkFundamentalType" :ignore t) |
1046 | ("GtkArgFlags" :ignore t) |
560af5c5 |
1047 | |
d520140e |
1048 | |
5b51dee1 |
1049 | ;; Deprecated widgets |
1050 | ("GtkCList" :ignore-prefix t) |
1051 | ("GtkCTree" :ignore-prefix t) |
1a1949c7 |
1052 | ("GtkList" :ignore t) |
1053 | ("GtkListItem" :ignore t) |
5b51dee1 |
1054 | ("GtkTree" :ignore t) |
1055 | ("GtkTreeItem" :ignore t) |
1a1949c7 |
1056 | ("GtkItemFactory" :ignore t) |
5e17fb78 |
1057 | ("GtkText" :ignore t) |
5b51dee1 |
1058 | ("GtkPacker" :ignore-prefix t) |
1059 | ("GtkPixmap" :ignore t) |
1060 | ("GtkPreview" :ignore-prefix t) |
1a1949c7 |
1061 | ("GtkProgres" :ignore t) |
5b51dee1 |
1062 | ("GtkTipsQuery" :ignore t) |
1047e159 |
1063 | ("GtkOldEditable" :ignore t) |
1a1949c7 |
1064 | ("GtkCombo" :ignore t) |
1065 | ("GtkOptionMenu" :ignore t) |
68f519e0 |
1066 | ("GtkFileSelection" :ignore t) |
1067 | ("GtkInputDialog") |
1047e159 |
1068 | |
1069 | ;; What are these? |
1070 | ("GtkFileSystemModule" :ignore t) |
1071 | ("GtkIMModule" :ignore t) |
fa60e0a2 |
1072 | ("GtkThemeEngine" :ignore t)) |
aa77651b |
1073 | |
1074 | |
1075 | (defclass text-iter (boxed) |
1076 | ((buffer |
1077 | :allocation :virtual |
1078 | :getter "gtk_text_iter_get_buffer" |
1079 | :reader text-iter-buffer |
68f519e0 |
1080 | :type pointer) ;text-buffer) |
aa77651b |
1081 | (offset |
1082 | :allocation :virtual |
1083 | :getter "gtk_text_iter_get_offset" |
1084 | :setter "gtk_text_iter_set_offset" |
1085 | :accessor text-iter-offset |
1086 | :type int) |
1087 | (line |
1088 | :allocation :virtual |
1089 | :getter "gtk_text_iter_get_line" |
1090 | :setter "gtk_text_iter_set_line" |
1091 | :accessor text-iter-line |
1092 | :type int) |
1093 | (line-offset |
1094 | :allocation :virtual |
1095 | :getter "gtk_text_iter_get_line_offset" |
1096 | :setter "gtk_text_iter_set_line_offset" |
1097 | :accessor text-iter-line-offset |
1098 | :type int) |
1099 | (line-index |
1100 | :allocation :virtual |
1101 | :getter "gtk_text_iter_get_line_index" |
1102 | :setter "gtk_text_iter_set_line_index" |
1103 | :accessor text-iter-line-index |
1104 | :type int) |
1105 | (visible-line-index |
1106 | :allocation :virtual |
1107 | :getter "gtk_text_iter_get_visible_line_index" |
1108 | :setter "gtk_text_iter_set_visible_line_index" |
1109 | :accessor text-iter-visible-line-index |
1110 | :type int) |
1111 | (visible-line-offset |
1112 | :allocation :virtual |
1113 | :getter "gtk_text_iter_get_visible_line_offset" |
1114 | :setter "gtk_text_iter_set_visible_line_offset" |
1115 | :accessor text-iter-visible-line-offset |
163a08aa |
1116 | :type int)) |
1117 | (:metaclass boxed-class) |
1118 | (:size #.(* 14 (size-of 'pointer)))) |
d76e9fca |
1119 | |
1120 | |
1121 | (defclass tooltips-data (struct) |
1122 | ((tooltips |
1123 | :allocation :alien |
1124 | :reader tooltips-data-tooltips |
1125 | :type tooltips) |
1126 | (widget |
1127 | :allocation :alien |
1128 | :reader tooltips-data-widget |
1129 | :type widget) |
1130 | (tip-text |
1131 | :allocation :alien |
1132 | :reader tooltips-data-tip-text |
1133 | :type string) |
1134 | (tip-private |
1135 | :allocation :alien |
1136 | :reader tooltips-data-tip-private |
1137 | :type string)) |
1138 | (:metaclass struct-class)) |
68f519e0 |
1139 | |
1140 | (defclass file-filter-info (struct) |
1141 | ((contains |
1142 | :allocation :alien |
1143 | :initarg :contains |
1144 | :type file-filter-flags) |
1145 | (filename |
1146 | :allocation :alien |
1147 | :initarg :filename |
1148 | :type string) |
1149 | (uri |
1150 | :allocation :alien |
1151 | :initarg :uri |
1152 | :type string) |
1153 | (display-name |
1154 | :allocation :alien |
1155 | :initarg :display-name |
1156 | :type string) |
1157 | (mime-type |
1158 | :allocation :alien |
1159 | :initarg :mime-type |
1160 | :type string)) |
1161 | (:metaclass struct-class)) |
eacab64f |
1162 | |
1163 | |
1164 | (defclass accel-key (struct) |
1165 | ((key |
1166 | :allocation :alien |
1167 | :type unsigned-int) |
1168 | (modifiers |
1169 | :allocation :alien |
1170 | :type gdk:modifier-type) |
1171 | (flags |
1172 | :allocation :alien |
1173 | :type (unsigned 16))) |
1174 | (:metaclass struct-class)) |
1175 | |
1176 | (defclass accel-group-entry (struct) |
1177 | ((key |
1178 | :allocation :alien |
1179 | :setter nil |
1180 | :type (inlined accel-key)) |
1181 | (gclosure |
1182 | :allocation :alien |
1183 | :type gclosure) |
1184 | (accel_path_quark |
1185 | :allocation :alien |
1186 | :type quark)) |
1187 | (:metaclass struct-class)) |
bdc0e300 |
1188 | |
1189 | #+gtk2.8 |
1190 | (define-enum-type drop-position |
1191 | :no-drop :drop-into :drop-left :drop-right :drop-above :drop-below) |
163a08aa |
1192 | |
1193 | |
163a08aa |
1194 | (defclass target-entry (struct) |
1195 | ((target |
1196 | :allocation :alien |
1197 | :accessor target-entry-target |
1198 | :initarg :target |
1199 | :type string) |
1200 | (flags |
1201 | :allocation :alien |
1202 | :accessor target-entry-flags |
1203 | :initarg :flags |
1204 | :type target-flags) |
1205 | (id |
1206 | :allocation :alien |
1207 | :accessor target-entry-id |
1208 | :initarg :id |
1209 | :type unsigned-int)) |
1210 | (:metaclass struct-class)) |
1211 | |
18c83e09 |
1212 | |
1213 | (defclass selection-data (boxed) |
1214 | ((selection |
1215 | :allocation :alien :type gdk:atom |
1216 | :reader selection-data-selection) |
1217 | (target |
1218 | :allocation :alien :type gdk:atom |
1219 | :reader selection-data-target) |
1220 | (type |
1221 | :allocation :alien :type gdk:atom |
1222 | :reader selection-data-type) |
1223 | (format |
1224 | :allocation :alien :type int |
1225 | :reader selection-data-format) |
1226 | (data |
1227 | :allocation :alien :type pointer |
1228 | :reader selection-data-data) |
1229 | (length |
1230 | :allocation :alien :type int |
1231 | :reader selection-data-length) |
1232 | (display |
1233 | :allocation :alien :type gdk:display |
1234 | :reader selection-data-display)) |
1235 | (:metaclass boxed-class)) |
1236 | |
1237 | |
1238 | (defclass target-list (proxy) |
1239 | () |
1240 | (:metaclass proxy-class)) |