560af5c5 |
1 | ;; Common Lisp bindings for GTK+ v2.0.x |
56460319 |
2 | ;; Copyright (C) 1999-2001 Espen S. Johnsen <espen@users.sourceforge.org> |
560af5c5 |
3 | ;; |
4 | ;; This library is free software; you can redistribute it and/or |
5 | ;; modify it under the terms of the GNU Lesser General Public |
6 | ;; License as published by the Free Software Foundation; either |
7 | ;; version 2 of the License, or (at your option) any later version. |
8 | ;; |
9 | ;; This library is distributed in the hope that it will be useful, |
10 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | ;; Lesser General Public License for more details. |
13 | ;; |
14 | ;; You should have received a copy of the GNU Lesser General Public |
15 | ;; License along with this library; if not, write to the Free Software |
16 | ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | |
cb4bf772 |
18 | ;; $Id: gtktypes.lisp,v 1.28 2005-01-06 21:05:46 espen Exp $ |
560af5c5 |
19 | |
20 | |
21 | (in-package "GTK") |
22 | |
2719586f |
23 | (defclass requisition (boxed) |
24 | ((width |
25 | :allocation :alien |
26 | :accessor requisition-width |
27 | :initarg :width |
28 | :type int) |
29 | (height |
30 | :allocation :alien |
31 | :accessor requisition-height |
32 | :initarg :height |
33 | :type int)) |
1047e159 |
34 | (:metaclass boxed-class)) |
35 | |
2719586f |
36 | |
e6d40e16 |
37 | (defclass allocation (struct) |
38 | ((x |
39 | :allocation :alien |
40 | :accessor allocation-width |
41 | :initarg :x |
42 | :type int) |
43 | (y |
44 | :allocation :alien |
45 | :accessor allocation-width |
46 | :initarg :width |
47 | :type int) |
48 | (width |
49 | :allocation :alien |
50 | :accessor allocation-width |
51 | :initarg :width |
52 | :type int) |
53 | (height |
54 | :allocation :alien |
55 | :accessor allocation-height |
56 | :initarg :height |
57 | :type int)) |
9adccb27 |
58 | (:metaclass struct-class)) |
e6d40e16 |
59 | |
2719586f |
60 | (defclass border (boxed) |
61 | ((left |
62 | :allocation :alien |
63 | :accessor border-left |
64 | :initarg :left |
65 | :type int) |
66 | (right |
67 | :allocation :alien |
68 | :accessor border-right |
69 | :initarg :right |
70 | :type int) |
71 | (top |
72 | :allocation :alien |
73 | :accessor border-top |
74 | :initarg :top |
75 | :type int) |
76 | (bottom |
77 | :allocation :alien |
78 | :accessor border-bottom |
79 | :initarg :bottom |
80 | :type int)) |
1047e159 |
81 | (:metaclass boxed-class)) |
2719586f |
82 | |
f5b67f2b |
83 | (defclass stock-item (struct) |
84 | ((id |
85 | :allocation :alien |
86 | :accessor stock-item-id |
87 | :initarg :id |
88 | :type string) |
89 | (label |
90 | :allocation :alien |
91 | :accessor stock-item-label |
92 | :initarg :label |
93 | :type string) |
94 | (modifier |
95 | :allocation :alien |
96 | :accessor stock-item-modifier |
97 | :initarg :modifier |
98 | :type gdk:modifier-type) |
99 | (keyval |
100 | :allocation :alien |
101 | :accessor stock-item-keyval |
102 | :initarg :keyval |
103 | :type int) |
104 | (translation-domain |
105 | :allocation :alien |
106 | :accessor stock-item-translation-domain |
107 | :initarg :translation-domain |
108 | :type string)) |
5e17fb78 |
109 | (:metaclass struct-class)) |
f5b67f2b |
110 | |
2a8752b0 |
111 | ;; We don't really need to access any of these slots, but we need to |
112 | ;; specify the size of the struct somehow |
113 | (defclass tree-iter (boxed) |
114 | ((stamp :allocation :alien :type int) |
115 | (user-data :allocation :alien :type pointer) |
116 | (user-data2 :allocation :alien :type pointer) |
117 | (user-data3 :allocation :alien :type pointer)) |
118 | (:metaclass boxed-class)) |
119 | |
120 | |
121 | ;; (defclass tree-path (boxed) |
122 | ;; ((depth :allocation :alien :type int) |
123 | ;; (indices :allocation :alien :type pointer)) |
124 | ;; (:metaclass boxed-class)) |
125 | |
f4175703 |
126 | (deftype tree-path () '(vector integer)) |
2a8752b0 |
127 | (register-type 'tree-path "GtkTreePath") |
128 | |
cb4bf772 |
129 | (deftype position () '(or int (enum (:start 0) (:end -1)))) |
d76e9fca |
130 | |
131 | ;; Forward definitions |
132 | (defclass widget (%object) |
133 | () |
134 | (:metaclass gobject-class)) |
135 | (defclass container (widget) |
136 | () |
137 | (:metaclass gobject-class)) |
138 | |
2a8752b0 |
139 | |
2719586f |
140 | (define-types-by-introspection "Gtk" |
141 | ;; Manually defined |
142 | ("GtkObject" :ignore t) |
143 | ("GtkRequisition" :ignore t) |
144 | ("GtkBorder" :ignore t) |
2a8752b0 |
145 | ("GtkTreeIter" :ignore t) |
146 | ("GtkTreePath" :ignore t) |
aa77651b |
147 | ; ("GtkStyle" :ignore t) |
1047e159 |
148 | |
5b51dee1 |
149 | ;; Manual override |
150 | ("GtkWidget" |
151 | :slots |
c289d084 |
152 | ((child-properties |
1047e159 |
153 | :allocation :instance |
c289d084 |
154 | :accessor widget-child-properties |
1047e159 |
155 | :type container-child) |
5b51dee1 |
156 | (window |
157 | :allocation :virtual |
158 | :getter "gtk_widget_get_window" |
159 | :reader widget-window |
160 | :type gdk:window) |
161 | (state |
162 | :allocation :virtual |
163 | :getter "gtk_widget_get_state" |
164 | :setter "gtk_widget_set_state" |
165 | :accessor widget-state |
166 | :initarg :state |
167 | :type state-type) |
168 | (colormap |
169 | :allocation :virtual |
170 | :getter "gtk_widget_get_colormap" |
e6d40e16 |
171 | :setter "gtk_widget_set_colormap" |
172 | :initarg :colormap |
173 | :accessor widget-colormap |
5b51dee1 |
174 | :type gdk:colormap) |
175 | (visual |
176 | :allocation :virtual |
177 | :getter "gtk_widget_get_visual" |
178 | :reader widget-visual |
e6d40e16 |
179 | :type gdk:visual) |
180 | (direction |
181 | :allocation :virtual |
182 | :getter "gtk_widget_get_direction" |
183 | :setter "gtk_widget_set_direction" |
184 | :accessor widget-direction |
185 | :initarg :direction |
186 | :type text-direction) |
187 | (composite-name |
188 | :allocation :virtual |
189 | :getter "gtk_widget_get_composite_name" |
190 | :setter "gtk_widget_set_composite_name" |
191 | :accessor widget-composite-name |
192 | :initarg :composite-name |
193 | :type string) |
194 | (settings |
195 | :allocation :virtual |
196 | :getter "gtk_widget_get_settings" |
197 | :accessor widget-settings |
198 | :type settings) |
199 | (child-visible |
200 | :allocation :virtual |
201 | :getter "gtk_widget_get_child_visible" |
202 | :setter "gtk_widget_set_child_visible" |
203 | :accessor widget-child-visible-p |
204 | :initarg :child-visible |
aa77651b |
205 | :type boolean) |
206 | (width-request |
207 | :merge t :unbound -1) |
208 | (height-request |
209 | :merge t :unbound -1))) |
e6d40e16 |
210 | |
5b51dee1 |
211 | ("GtkContainer" |
212 | :slots |
d76e9fca |
213 | ((child :ignore t) |
5b51dee1 |
214 | (children |
215 | :allocation :virtual |
216 | :getter container-children |
d76e9fca |
217 | :setter (setf container-children) |
218 | ;; The following doesn't work because gtk_container_get_children doesn't |
219 | ;; increase the reference count of the children |
220 | ; :getter "gtk_container_get_children" |
221 | ; :reader container-children |
222 | ; :type (glist widget) |
223 | ) |
224 | (child-type |
225 | :allocation :virtual |
cb4bf772 |
226 | :getter "gtk_container_child_type" |
d76e9fca |
227 | :reader container-child-type |
228 | :type gtype) |
5b51dee1 |
229 | (focus-child |
230 | :allocation :virtual |
231 | :getter "gtk_container_get_focus_child" |
232 | :setter "gtk_container_set_focus_child" |
233 | :accessor container-focus-child |
234 | :initarg :focus-child |
235 | :type widget) |
e6d40e16 |
236 | (focus-chain |
237 | :allocation :virtual |
238 | :getter container-focus-chain |
239 | :setter (setf container-focus-chain)) |
5b51dee1 |
240 | (focus-hadjustment |
241 | :allocation :virtual |
242 | :getter "gtk_container_get_focus_hadjustment" |
243 | :setter "gtk_container_set_focus_hadjustment" |
244 | :accessor container-focus-hadjustment |
245 | :initarg :focus-hadjustment |
246 | :type adjustment) |
247 | (focus-vadjustment |
248 | :allocation :virtual |
249 | :getter "gtk_container_get_focus_vadjustment" |
250 | :setter "gtk_container_set_focus_vadjustment" |
251 | :accessor container-focus-vadjustment |
252 | :initarg :focus-vadjustment |
d76e9fca |
253 | :type adjustment) |
254 | (reallocate-redraws |
255 | :allocation :virtual |
256 | :getter "gtk_container_get_reallocate_redraws" |
257 | :setter "gtk_container_set_reallocate_redraws" |
258 | :accessor container-reallocate-redraws |
259 | :initarg :reallocate-redraws |
260 | :type boolean))) |
5b51dee1 |
261 | |
262 | ("GtkBin" |
263 | :slots |
264 | ((child |
265 | :allocation :virtual |
56460319 |
266 | :getter "gtk_bin_get_child" |
267 | :setter (setf bin-child) |
268 | :reader bin-child |
269 | :type widget))) |
3f73963b |
270 | |
271 | ("GtkWindow" |
272 | :slots |
4d16221f |
273 | ((focus-widget |
3f73963b |
274 | :allocation :virtual |
275 | :getter "gtk_window_get_focus" |
276 | :setter "gtk_window_set_focus" |
277 | :accessor window-focus-widget |
278 | :initarg :focus-widget |
279 | :type widget) |
280 | (default-widget |
281 | :allocation :virtual |
282 | :getter "gtk_window_get_default" |
283 | :setter "gtk_window_set_default" |
284 | :accessor window-default-widget |
285 | :initarg :default-widget |
286 | :type widget) |
3f73963b |
287 | (has-frame |
288 | :allocation :virtual |
289 | :getter "gtk_window_get_has_frame" |
290 | :setter "gtk_window_set_has_frame" |
291 | :accessor window-has-frame-p |
292 | :initarg :has-frame |
293 | :type boolean) |
4d16221f |
294 | (icon-list |
3f73963b |
295 | :allocation :virtual |
4d16221f |
296 | :getter "gtk_window_get_icon_list" |
297 | :setter "gtk_window_set_icon_list" |
298 | :accessor window-icon-list |
299 | :initarg :icon-list |
300 | :type (glist gdk:pixbuf)) |
3f73963b |
301 | (mnemonic-modifier |
302 | :allocation :virtual |
303 | :getter "gtk_window_get_mnemonic_modifier" |
304 | :setter "gtk_window_set_mnemonic_modifier" |
305 | :accessor window-mnemonic-modifier |
306 | :initarg :mnemonic-modifier |
307 | :type gdk:modifier-type) |
308 | (transient-for |
309 | :allocation :virtual |
310 | :getter "gtk_window_get_transient_for" |
311 | :setter "gtk_window_set_transient_for" |
312 | :accessor window-transient-for |
313 | :initarg :transient-for |
4d16221f |
314 | :type window) |
315 | (group |
316 | :allocation :virtual |
317 | :getter "gtk_window_get_group" |
318 | :setter (setf window-group) |
319 | :reader window-group |
320 | :initarg :group |
321 | :type window-group) |
322 | (default-width :merge t :unbound -1) |
323 | (default-height :merge t :unbound -1))) |
5b51dee1 |
324 | |
4d16221f |
325 | ("GtkWindowGroup" |
326 | :slots |
327 | ((grabs |
328 | :allocation :alien |
329 | :accessor window-group-grabs |
330 | :type (gslist window)))) |
331 | |
5b51dee1 |
332 | ("GtkTooltips" |
333 | :slots |
334 | ((enabled |
335 | :allocation :virtual |
336 | :getter "gtk_tooltips_get_enabled" |
337 | :setter (setf tooltips-enabled-p) |
338 | :reader tooltips-enabled-p |
339 | :initarg :enabled |
340 | :type boolean))) |
341 | |
5b51dee1 |
342 | ("GtkMenuItem" |
343 | :slots |
344 | ((label |
345 | :allocation :virtual |
f5b67f2b |
346 | :getter menu-item-label |
347 | :setter (setf menu-item-label) |
5b51dee1 |
348 | :type string) |
d76e9fca |
349 | (use-underline |
350 | :allocation :user-data |
351 | :initform nil |
352 | :initarg :use-underline |
353 | :accessor menu-item-use-underline-p) |
f5b67f2b |
354 | (right-justified |
355 | :allocation :virtual |
356 | :getter "gtk_menu_item_get_right_justified" |
357 | :setter "gtk_menu_item_set_right_justified" |
358 | :accessor menu-item-right-justified-p |
359 | :initarg :right-justified |
360 | :type boolean) |
5b51dee1 |
361 | (submenu |
362 | :allocation :virtual |
363 | :getter "gtk_menu_item_get_submenu" |
d76e9fca |
364 | :setter "gtk_menu_item_set_submenu" |
365 | :accessor menu-item-submenu |
5b51dee1 |
366 | :initarg :submenu |
d76e9fca |
367 | :type widget))) |
5b51dee1 |
368 | |
369 | ("GtkColorSelectionDialog" |
370 | :slots |
371 | ((colorsel |
372 | :allocation :alien |
373 | :reader color-selection-dialog-colorsel |
374 | :type widget) |
375 | (ok-button |
376 | :allocation :alien |
377 | :reader color-selection-dialog-ok-button |
378 | :type widget) |
379 | (cancel-button |
380 | :allocation :alien |
381 | :reader color-selection-dialog-cancel-button |
382 | :type widget) |
383 | (help-button |
384 | :allocation :alien |
385 | :reader color-selection-dialog-help-button |
386 | :type widget))) |
387 | |
388 | ("GtkScrolledWindow" |
389 | :slots |
390 | ((hscrollbar |
391 | :allocation :alien |
392 | :reader scrolled-window-hscrollbar |
393 | :type widget) |
394 | (vscrollbar |
395 | :allocation :alien |
396 | :reader scrolled-window-vscrollbar |
397 | :type widget))) |
560af5c5 |
398 | |
5b51dee1 |
399 | ("GtkPaned" |
1047e159 |
400 | :slots |
5b51dee1 |
401 | ((child1 |
560af5c5 |
402 | :allocation :virtual |
1dd03ab8 |
403 | :getter "gtk_paned_get_child1" |
404 | :setter "gtk_paned_add1" |
405 | :accessor paned-child1 |
5b51dee1 |
406 | :initarg :child1 |
560af5c5 |
407 | :type widget) |
5b51dee1 |
408 | (child2 |
2d379b6a |
409 | :allocation :virtual |
1dd03ab8 |
410 | :getter "gtk_paned_get_child2" |
411 | :setter "gtk_paned_add2" |
412 | :accessor paned-child2 |
5b51dee1 |
413 | :initarg :child2 |
414 | :type widget))) |
560af5c5 |
415 | |
5b51dee1 |
416 | ("GtkMenu" |
417 | :slots |
418 | ((accel-group |
419 | :allocation :virtual |
420 | :getter "gtk_menu_get_accel_group" |
421 | :setter "gtk_menu_set_accel_group" |
422 | :accessor menu-accel-group |
423 | :initarg :accel-group |
424 | :type accel-group) |
425 | (active |
426 | :allocation :virtual |
427 | :getter "gtk_menu_get_active" |
428 | :setter (setf menu-active) |
429 | :reader menu-active |
430 | :initarg :active |
431 | :type widget) |
d76e9fca |
432 | (screen |
433 | :allocation :virtual |
434 | :getter "gtk_menu_get_screen" |
435 | :setter "gtk_menu_set_screen" |
436 | :accessor menu-screen |
437 | :initarg :screen |
438 | :type gdk:screen) |
439 | (attach-widget |
440 | :allocation :virtual |
441 | :getter "gtk_menu_get_attach_widget" |
442 | :reader menu-attach-widget |
443 | :type widget) |
444 | #-gtk2.6 |
445 | (tearoff-state |
5b51dee1 |
446 | :allocation :virtual |
447 | :getter "gtk_menu_get_tearoff_state" |
448 | :setter "gtk_menu_set_tearoff_state" |
d76e9fca |
449 | :accessor menu-tearoff-state-p |
450 | :initarg :tearoff-state |
5b51dee1 |
451 | :type boolean))) |
452 | |
453 | ("GtkToolbar" |
454 | :slots |
cb4bf772 |
455 | ((show-tooltips |
5b51dee1 |
456 | :allocation :virtual |
457 | :getter "gtk_toolbar_get_tooltips" |
458 | :setter "gtk_toolbar_set_tooltips" |
cb4bf772 |
459 | :accessor toolbar-show-tooltips-p |
460 | :initarg :show-tooltips |
5b51dee1 |
461 | :type boolean) |
cb4bf772 |
462 | (tooltips |
5b51dee1 |
463 | :allocation :virtual |
cb4bf772 |
464 | :getter "gtk_toolbar_get_tooltips_object" |
465 | :reader toolbar-tooltips |
466 | :type tooltips) |
1047e159 |
467 | (toolbar-style |
468 | :allocation :property |
469 | :pname "toolbar-style" |
470 | :initarg :toolbar-style |
471 | :accessor toolbar-style |
cb4bf772 |
472 | :type toolbar-style) |
473 | (n-items |
474 | :allocation :virtual |
475 | :getter "gtk_toolbar_get_n_items" |
476 | :reader toolbar-n-items |
477 | :type int))) |
5b51dee1 |
478 | |
d76e9fca |
479 | ("GtkToolItem" |
480 | :slots |
cb4bf772 |
481 | ((use-drag-window |
d76e9fca |
482 | :allocation :virtual |
cb4bf772 |
483 | :getter "gtk_tool_item_get_use_drag_window" |
484 | :setter "gtk_tool_item_set_use_drag_window" |
485 | :accessor tool-item-use-drag-window-p |
d76e9fca |
486 | :initarg :drag-window |
cb4bf772 |
487 | :type boolean) |
488 | (tip-text |
489 | :allocation :user-data |
490 | :setter (setf tool-item-tip-text) |
491 | :initarg :tip-text |
492 | :reader tool-item-tip-text) |
493 | (tip-private |
494 | :allocation :user-data |
495 | :setter (setf tool-item-tip-private) |
496 | :initarg :tip-private |
497 | :reader tool-item-tip-private))) |
498 | |
499 | ("GtkToolButton" |
500 | :slots |
501 | ((stock-id :merge t :initarg :stock) |
502 | (icon-widget :merge t :initarg :icon))) |
d76e9fca |
503 | |
504 | ("GtkToggleToolButton" |
505 | :slots |
506 | ((active |
507 | :allocation :virtual |
508 | :getter "gtk_toggle_tool_button_get_active" |
509 | :setter "gtk_toggle_tool_button_get_active" |
510 | :accessor toggle-tool-button-active-p |
511 | :initarg :active |
512 | :type boolean))) |
513 | |
514 | ("GtkRadioToolButton" |
515 | :slots |
516 | ((group |
517 | :allocation :virtual |
518 | :getter "gtk_radio_tool_button_get_group" |
519 | :reader radio-tool-button-group |
cb4bf772 |
520 | :type (copy-of (gslist widget))) |
521 | (value |
522 | :allocation :user-data |
523 | :initarg :value |
524 | :accessor radio-tool-button-value |
525 | :documentation "Value passed as argument to the activate callback"))) |
d76e9fca |
526 | |
f5b67f2b |
527 | ("GtkNotebook" |
528 | :slots |
529 | ((current-page |
530 | :allocation :virtual |
531 | :getter notebook-current-page |
532 | :setter (setf notebook-current-page) |
533 | :initarg :current-page) |
534 | (page :ignore t))) |
535 | |
5b51dee1 |
536 | ("GtkRuler" |
537 | :slots |
538 | ((metric |
539 | :allocation :virtual |
540 | :getter "gtk_ruler_get_metric" |
541 | :setter "gtk_ruler_set_metric" |
542 | :accessor ruler-metric |
543 | :initarg :metric |
544 | :type metric-type))) |
545 | |
546 | ("GtkProgressBar" |
547 | :slots |
548 | ; deprecated properties |
549 | ((bar-style :ignore t) |
550 | (adjustment :ignore t) |
551 | (activity-step :ignore t) |
552 | (activity-blocks :ignore t) |
553 | (discrete-blocks :ignore t))) |
554 | |
d76e9fca |
555 | ("GtkHandleBox" |
556 | :slots |
557 | ; deprecated property |
558 | ((shadow :ignore t))) |
559 | |
560 | ("GtkFrame" |
561 | :slots |
562 | ; deprecated property |
563 | ((shadow :ignore t))) |
564 | |
5b51dee1 |
565 | ("GtkTable" |
566 | :slots |
567 | ((column-spacing |
568 | :allocation :virtual |
569 | :getter "gtk_table_get_default_col_spacing" |
570 | :setter "gtk_table_set_col_spacings" |
571 | :initarg :column-spacing |
572 | :type unsigned-int) |
573 | (row-spacing |
574 | :allocation :virtual |
575 | :getter "gtk_table_get_default_row_spacing" |
576 | :setter "gtk_table_set_row_spacings" |
577 | :initarg :row-spacing |
578 | :type unsigned-int))) |
579 | |
580 | ("GtkDialog" |
581 | :slots |
1047e159 |
582 | ((vbox |
5b51dee1 |
583 | :allocation :virtual |
584 | :getter "gtk_dialog_get_vbox" |
1047e159 |
585 | :reader dialog-vbox |
5b51dee1 |
586 | :type widget) |
587 | (action-area |
588 | :allocation :virtual |
589 | :getter "gtk_dialog_get_action_area" |
590 | :reader dialog-action-area |
591 | :type widget))) |
2ed3bebb |
592 | |
d76e9fca |
593 | ("GtkEntry" |
5b51dee1 |
594 | :slots |
d76e9fca |
595 | ((layout |
5b51dee1 |
596 | :allocation :virtual |
d76e9fca |
597 | :getter "gtk_entry_get_layout" |
598 | :reader entry-layout |
599 | :type pango:layout) |
600 | (completion |
601 | :getter "gtk_entry_get_completion" |
602 | :setter "gtk_entry_set_completion" |
603 | :initarg :completion |
604 | :accessor entry-completion |
605 | :type entry-completion) |
606 | (max-length :merge t :unbound 0) |
607 | #+gtk2.6 |
608 | (with-chars :merge t :unbound -1))) |
609 | |
f45fd227 |
610 | ("GtkEntryCompletion" |
611 | :slots |
612 | ((entry |
613 | :allocation :virtual |
614 | :getter "gtk_entry_completion_get_entry" |
615 | :reader entry-completion-entry |
616 | :type entry) |
d76e9fca |
617 | (minimum-key-length :merge t :unbound -1) |
f45fd227 |
618 | #+gtk2.6 |
d76e9fca |
619 | (text-column :merge t :unbound -1))) |
f45fd227 |
620 | |
5b51dee1 |
621 | ("GtkRadioButton" |
622 | :slots |
623 | ((group |
624 | :allocation :virtual |
625 | :getter "gtk_radio_button_get_group" |
626 | :reader radio-button-group |
cb4bf772 |
627 | :type (copy-of (gslist widget))) |
628 | (value |
629 | :allocation :user-data |
630 | :initarg :value |
631 | :accessor radio-button-value |
632 | :documentation "Value passed as argument to the activate callback"))) |
d520140e |
633 | |
5b51dee1 |
634 | ("GtkRadioMenuItem" |
635 | :slots |
636 | ((group |
637 | :allocation :virtual |
638 | :getter "gtk_radio_menu_item_get_group" |
639 | :reader radio-menu-item-group |
cb4bf772 |
640 | :type (copy-of (gslist widget))) |
641 | (value |
642 | :allocation :user-data |
643 | :initarg :value |
644 | :accessor radio-menu-item-value |
645 | :documentation "Value passed as argument to the activate callback"))) |
560af5c5 |
646 | |
5b51dee1 |
647 | ("GtkFileSelection" |
648 | :slots |
649 | ((action-area |
d520140e |
650 | :allocation :virtual |
5b51dee1 |
651 | :getter "gtk_file_selection_get_action_area" |
d520140e |
652 | :reader file-selection-action-area |
653 | :type widget) |
654 | (ok-button |
655 | :allocation :virtual |
5b51dee1 |
656 | :getter "gtk_file_selection_get_ok_button" |
d520140e |
657 | :reader file-selection-ok-button |
658 | :type widget) |
659 | (cancel-button |
660 | :allocation :virtual |
5b51dee1 |
661 | :getter "gtk_file_selection_get_cancel_button" |
d520140e |
662 | :reader file-selection-cancel-button |
5b51dee1 |
663 | :type widget))) |
664 | |
665 | ("GtkLayout" |
666 | :slots |
667 | ((bin-window |
1047e159 |
668 | :allocation :virtual |
5b51dee1 |
669 | :getter "gtk_layout_get_bin_window" |
670 | :reader layout-bin-window |
f784870f |
671 | :type gdk:window))) |
f5b67f2b |
672 | |
673 | ("GtkFixed" |
674 | :slots |
675 | ((has-window |
1047e159 |
676 | :allocation :virtual |
f5b67f2b |
677 | :getter "gtk_fixed_get_has_window" |
678 | :setter "gtk_fixed_set_has_window" |
679 | :reader fixed-has-window-p |
680 | :initarg :has-window |
681 | :type boolean))) |
1047e159 |
682 | |
683 | ("GtkRange" |
684 | :slots |
685 | ((value |
686 | :allocation :virtual |
687 | :getter "gtk_range_get_value" |
688 | :setter "gtk_range_set_value" |
689 | :initarg :value |
690 | :accessor range-value |
691 | :type double-float) |
692 | (upper |
693 | :allocation :virtual |
694 | :getter range-upper |
695 | :setter (setf range-upper) |
696 | :initarg :upper) |
697 | (lower |
698 | :allocation :virtual |
699 | :getter range-lower |
700 | :setter (setf range-lower) |
701 | :initarg :lower) |
702 | (step-increment |
703 | :allocation :virtual |
704 | :getter range-step-increment |
705 | :setter (setf range-step-increment) |
706 | :initarg :step-increment) |
707 | (page-increment |
708 | :allocation :virtual |
709 | :getter range-page-increment |
710 | :setter (setf range-page-increment) |
711 | :initarg :page-increment))) |
712 | |
713 | ("GtkImage" |
714 | :slots |
d76e9fca |
715 | ((file :ignore t) |
716 | #+gtk2.6 |
717 | (pixel-size :merge t :unbound -1))) |
718 | |
719 | ("GtkLabel" |
720 | :slots |
721 | ((layout |
722 | :allocation :virtual |
723 | :getter "gtk_label_get_layout" |
724 | :reader label-layout |
725 | :type pango:layout))) |
726 | |
1047e159 |
727 | ("GtkEditable" |
728 | :slots |
729 | ((editable |
730 | :allocation :virtual |
731 | :getter "gtk_editable_get_editable" |
732 | :setter "gtk_editable_set_editable" |
733 | :reader editable-editable-p |
734 | :initarg :editable |
735 | :type boolean) |
736 | (position |
737 | :allocation :virtual |
738 | :getter "gtk_editable_get_position" |
739 | :setter "gtk_editable_set_position" |
740 | :reader editable-position |
741 | :initarg :position |
cb4bf772 |
742 | :type position) |
1047e159 |
743 | (text |
744 | :allocation :virtual |
745 | :getter editable-text |
746 | :setter (setf editable-text) |
747 | :initarg text))) |
748 | |
749 | ("GtkFileChooser" |
750 | :slots |
751 | ((filename |
752 | :allocation :virtual |
753 | :getter "gtk_file_chooser_get_filename" |
754 | :setter "gtk_file_chooser_set_filename" |
755 | :accessor file-chooser-filename |
756 | :initarg :filename |
757 | :type string) |
758 | (current-name |
759 | :allocation :virtual |
760 | :setter "gtk_file_chooser_set_current_name" |
761 | :accessor file-choser-current-name |
762 | :initarg :current-name |
763 | :type string) |
764 | (current-folder |
765 | :allocation :virtual |
766 | :setter "gtk_file_chooser_set_current_folder" |
767 | :setter "gtk_file_chooser_get_current_folder" |
768 | :accessor file-choser-current-folder |
769 | :initarg :current-folder |
770 | :type string) |
771 | (uri |
772 | :allocation :virtual |
773 | :getter "gtk_file_chooser_get_uri" |
774 | :setter "gtk_file_chooser_set_uri" |
775 | :accessor file-choser-uri |
776 | :initarg :uri |
777 | :type string) |
778 | (current-folder-uri |
779 | :allocation :virtual |
780 | :setter "gtk_file_chooser_set_current_folder_uri" |
781 | :setter "gtk_file_chooser_get_current_folder_uri" |
782 | :accessor file-choser-current-folder-uri |
783 | :initarg :current-folder-uri |
784 | :type string))) |
785 | |
1a1949c7 |
786 | ("GtkTreeView" |
787 | :slots |
788 | ((columns |
789 | :allocation :virtual |
790 | :getter "gtk_tree_view_get_columns" |
791 | :reader tree-view-columns |
f4175703 |
792 | :type (glist tree-view-column)) |
793 | (selection |
794 | :allocation :virtual |
795 | :getter "gtk_tree_view_get_selection" |
796 | :reader tree-view-selection |
797 | :type tree-selection))) |
1a1949c7 |
798 | |
2a8752b0 |
799 | ("GtkTreeModel" |
800 | :slots |
801 | ((n-columns |
802 | :allocation :virtual |
803 | :getter "gtk_tree_model_get_n_columns" |
804 | :reader tree-model-n-columns |
805 | :type int))) |
806 | |
f4175703 |
807 | ("GtkTreeSelection" |
808 | :slots |
809 | ((mode |
810 | :allocation :virtual |
811 | :getter "gtk_tree_selection_get_mode" |
812 | :setter "gtk_tree_selection_set_mode" |
813 | :accessor tree-selection-mode |
814 | :initarg :mode |
815 | :type selection-mode) |
816 | (tree-view |
817 | :allocation :virtual |
818 | :getter "gtk_tree_selection_get_mode" |
819 | :reader tree-selection-mode |
820 | :type tree-view))) |
821 | |
1a1949c7 |
822 | ("GtkComboBox" |
823 | :slots |
824 | ((active-iter |
825 | :allocation :virtual |
826 | :getter "gtk_combo_box_get_active_iter" |
827 | :setter "gtk_combo_box_set_active_iter" |
828 | :accessor combo-box-active-iter |
829 | :type tree-iter))) |
830 | |
aa77651b |
831 | ("GtkTextBuffer" |
832 | :slots |
833 | ((line-count |
834 | :allocation :virtual |
835 | :getter "gtk_text_buffer_get_line_count" |
836 | :reader text-buffer-line-count |
837 | :type int) |
838 | (char-count |
839 | :allocation :virtual |
840 | :getter "gtk_text_buffer_get_char_count" |
841 | :reader text-buffer-char-count |
842 | :type int) |
843 | (modified |
844 | :allocation :virtual |
845 | :getter "gtk_text_buffer_get_modified" |
846 | :setter "gtk_text_buffer_set_modified" |
847 | :accessor text-buffer-modifed-p |
848 | :type boolean))) |
849 | |
5e17fb78 |
850 | ("GtkTextView" |
851 | :slots |
852 | ((default-attributes |
853 | :allocation :virtual |
854 | :getter "gtk_text_view_get_default_attributes" |
855 | :reader text-view-default-attributes |
856 | :type text-attributes))) |
857 | |
aa77651b |
858 | ("GtkTextTagTable" |
859 | :slots |
860 | ((size |
861 | :allocation :virtual |
862 | :getter "gtk_text_tag_table_get_size" |
863 | :reader text-tag-table-size |
864 | :type int))) |
865 | |
866 | ("GtkTextTag" |
867 | :slots |
868 | ((priority |
869 | :allocation :virtual |
870 | :getter "gtk_text_tag_get_priority" |
871 | :setter "gtk_text_tag_set_priority" |
872 | :accessor text-tag-priority |
873 | :type int) |
874 | (weight |
875 | :merge t :type pango:weight))) |
876 | |
5e17fb78 |
877 | ("GtkUIManager" |
878 | :type ui-manager |
879 | :slots |
880 | ((action-groups |
881 | :allocation :virtual |
882 | :getter "gtk_ui_manager_get_action_groups" |
883 | :reader ui-manager-action-groups |
884 | :type (copy-of (glist action-group))) |
885 | (accel-group |
886 | :allocation :virtual |
887 | :getter "gtk_ui_manager_get_accel_group" |
888 | :reader ui-manager-accel-group |
889 | :type accel-group))) |
890 | |
891 | ("GtkUIManagerItemType" |
892 | :type ui-manager-item-type) |
893 | |
894 | ("GtkToggle" |
895 | :slots |
896 | ((accelerator |
897 | :allocation :virtual |
898 | :getter action-accelerator))) |
899 | |
900 | ("GtkToggleAction" |
901 | :slots |
902 | ((active |
903 | :allocation :virtual |
904 | :getter "gtk_toggle_action_get_active" |
905 | :setter "gtk_toggle_action_set_active" |
906 | :initarg :active |
907 | :accessor toggle-action-active-p |
908 | :type boolean))) |
909 | |
910 | ("GtkRadioAction" |
911 | :slots |
912 | ((group |
913 | :allocation :virtual |
914 | :getter "gtk_radio_button_get_group" |
d76e9fca |
915 | :reader radio-action-group |
5e17fb78 |
916 | :type (copy-of (gslist widget))) |
917 | (%value |
918 | :allocation :property :pname "value" |
919 | :readable nil :type int) |
920 | (value |
921 | :allocation :virtual |
922 | :getter radio-action-value))) |
2a8752b0 |
923 | |
aa77651b |
924 | |
5b51dee1 |
925 | ;; Not needed |
926 | ("GtkFundamentalType" :ignore t) |
927 | ("GtkArgFlags" :ignore t) |
560af5c5 |
928 | |
d520140e |
929 | |
5b51dee1 |
930 | ;; Deprecated widgets |
931 | ("GtkCList" :ignore-prefix t) |
932 | ("GtkCTree" :ignore-prefix t) |
1a1949c7 |
933 | ("GtkList" :ignore t) |
934 | ("GtkListItem" :ignore t) |
5b51dee1 |
935 | ("GtkTree" :ignore t) |
936 | ("GtkTreeItem" :ignore t) |
1a1949c7 |
937 | ("GtkItemFactory" :ignore t) |
5e17fb78 |
938 | ("GtkText" :ignore t) |
5b51dee1 |
939 | ("GtkPacker" :ignore-prefix t) |
940 | ("GtkPixmap" :ignore t) |
941 | ("GtkPreview" :ignore-prefix t) |
1a1949c7 |
942 | ("GtkProgres" :ignore t) |
5b51dee1 |
943 | ("GtkTipsQuery" :ignore t) |
1047e159 |
944 | ("GtkOldEditable" :ignore t) |
1a1949c7 |
945 | ("GtkCombo" :ignore t) |
946 | ("GtkOptionMenu" :ignore t) |
1047e159 |
947 | |
948 | ;; What are these? |
949 | ("GtkFileSystemModule" :ignore t) |
950 | ("GtkIMModule" :ignore t) |
951 | ("GtkThemeEngine" :ignore t) |
952 | |
953 | ) |
aa77651b |
954 | |
955 | |
956 | (defclass text-iter (boxed) |
957 | ((buffer |
958 | :allocation :virtual |
959 | :getter "gtk_text_iter_get_buffer" |
960 | :reader text-iter-buffer |
961 | :type text-buffer) |
962 | (offset |
963 | :allocation :virtual |
964 | :getter "gtk_text_iter_get_offset" |
965 | :setter "gtk_text_iter_set_offset" |
966 | :accessor text-iter-offset |
967 | :type int) |
968 | (line |
969 | :allocation :virtual |
970 | :getter "gtk_text_iter_get_line" |
971 | :setter "gtk_text_iter_set_line" |
972 | :accessor text-iter-line |
973 | :type int) |
974 | (line-offset |
975 | :allocation :virtual |
976 | :getter "gtk_text_iter_get_line_offset" |
977 | :setter "gtk_text_iter_set_line_offset" |
978 | :accessor text-iter-line-offset |
979 | :type int) |
980 | (line-index |
981 | :allocation :virtual |
982 | :getter "gtk_text_iter_get_line_index" |
983 | :setter "gtk_text_iter_set_line_index" |
984 | :accessor text-iter-line-index |
985 | :type int) |
986 | (visible-line-index |
987 | :allocation :virtual |
988 | :getter "gtk_text_iter_get_visible_line_index" |
989 | :setter "gtk_text_iter_set_visible_line_index" |
990 | :accessor text-iter-visible-line-index |
991 | :type int) |
992 | (visible-line-offset |
993 | :allocation :virtual |
994 | :getter "gtk_text_iter_get_visible_line_offset" |
995 | :setter "gtk_text_iter_set_visible_line_offset" |
996 | :accessor text-iter-visible-line-offset |
997 | :type int) |
998 | ;; Workaround to get correct size |
999 | (dummy14 |
1000 | :allocation :alien :offset #.(* 13 (size-of 'pointer)) |
1001 | :type pointer)) |
1002 | (:metaclass boxed-class |
1003 | ;; I am pretty sure this was working in older versons on CMUCL |
1004 | :size #.(* 14 (size-of 'pointer)))) |
d76e9fca |
1005 | |
1006 | |
1007 | (defclass tooltips-data (struct) |
1008 | ((tooltips |
1009 | :allocation :alien |
1010 | :reader tooltips-data-tooltips |
1011 | :type tooltips) |
1012 | (widget |
1013 | :allocation :alien |
1014 | :reader tooltips-data-widget |
1015 | :type widget) |
1016 | (tip-text |
1017 | :allocation :alien |
1018 | :reader tooltips-data-tip-text |
1019 | :type string) |
1020 | (tip-private |
1021 | :allocation :alien |
1022 | :reader tooltips-data-tip-private |
1023 | :type string)) |
1024 | (:metaclass struct-class)) |