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 | |
112ac1d3 |
23 | ;; $Id: gtktypes.lisp,v 1.37 2005-04-23 16:48:52 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 | |
2a8752b0 |
115 | ;; We don't really need to access any of these slots, but we need to |
116 | ;; specify the size of the struct somehow |
117 | (defclass tree-iter (boxed) |
118 | ((stamp :allocation :alien :type int) |
119 | (user-data :allocation :alien :type pointer) |
120 | (user-data2 :allocation :alien :type pointer) |
121 | (user-data3 :allocation :alien :type pointer)) |
122 | (:metaclass boxed-class)) |
123 | |
124 | |
125 | ;; (defclass tree-path (boxed) |
126 | ;; ((depth :allocation :alien :type int) |
127 | ;; (indices :allocation :alien :type pointer)) |
128 | ;; (:metaclass boxed-class)) |
129 | |
f4175703 |
130 | (deftype tree-path () '(vector integer)) |
dfa4f314 |
131 | (register-type 'tree-path '|gtk_tree_path_get_type|) |
2a8752b0 |
132 | |
68f519e0 |
133 | (deftype position () |
134 | '(or int (enum (:start 0) (:end -1) (:first 0) (:last -1)))) |
135 | |
136 | (defmethod reader-function ((type (eql 'position)) &rest args) |
137 | (declare (ignore type args)) |
138 | (reader-function 'int)) |
d76e9fca |
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) |
c2a12566 |
161 | (parent :merge t :initarg nil) |
162 | (visible :merge t :initarg nil) |
68f519e0 |
163 | (parent-window |
164 | :allocation :virtual |
165 | :getter %widget-parent-window |
166 | :setter "gtk_widget_set_parent_window" |
167 | :accessor widget-parent-window |
168 | :initarg :parent-window |
169 | :type gdk:window) |
5b51dee1 |
170 | (state |
171 | :allocation :virtual |
172 | :getter "gtk_widget_get_state" |
173 | :setter "gtk_widget_set_state" |
174 | :accessor widget-state |
175 | :initarg :state |
176 | :type state-type) |
177 | (colormap |
178 | :allocation :virtual |
179 | :getter "gtk_widget_get_colormap" |
e6d40e16 |
180 | :setter "gtk_widget_set_colormap" |
181 | :initarg :colormap |
182 | :accessor widget-colormap |
5b51dee1 |
183 | :type gdk:colormap) |
184 | (visual |
185 | :allocation :virtual |
186 | :getter "gtk_widget_get_visual" |
187 | :reader widget-visual |
e6d40e16 |
188 | :type gdk:visual) |
189 | (direction |
190 | :allocation :virtual |
191 | :getter "gtk_widget_get_direction" |
192 | :setter "gtk_widget_set_direction" |
193 | :accessor widget-direction |
194 | :initarg :direction |
195 | :type text-direction) |
196 | (composite-name |
197 | :allocation :virtual |
198 | :getter "gtk_widget_get_composite_name" |
199 | :setter "gtk_widget_set_composite_name" |
200 | :accessor widget-composite-name |
201 | :initarg :composite-name |
68f519e0 |
202 | :type (copy-of string)) ; will leak the string when setting |
e6d40e16 |
203 | (settings |
204 | :allocation :virtual |
205 | :getter "gtk_widget_get_settings" |
206 | :accessor widget-settings |
207 | :type settings) |
208 | (child-visible |
209 | :allocation :virtual |
210 | :getter "gtk_widget_get_child_visible" |
211 | :setter "gtk_widget_set_child_visible" |
212 | :accessor widget-child-visible-p |
213 | :initarg :child-visible |
aa77651b |
214 | :type boolean) |
215 | (width-request |
216 | :merge t :unbound -1) |
217 | (height-request |
218 | :merge t :unbound -1))) |
e6d40e16 |
219 | |
5b51dee1 |
220 | ("GtkContainer" |
221 | :slots |
d76e9fca |
222 | ((child :ignore t) |
5b51dee1 |
223 | (children |
224 | :allocation :virtual |
225 | :getter container-children |
d76e9fca |
226 | :setter (setf container-children) |
227 | ;; The following doesn't work because gtk_container_get_children doesn't |
228 | ;; increase the reference count of the children |
229 | ; :getter "gtk_container_get_children" |
230 | ; :reader container-children |
231 | ; :type (glist widget) |
232 | ) |
233 | (child-type |
234 | :allocation :virtual |
cb4bf772 |
235 | :getter "gtk_container_child_type" |
d76e9fca |
236 | :reader container-child-type |
237 | :type gtype) |
5b51dee1 |
238 | (focus-child |
239 | :allocation :virtual |
240 | :getter "gtk_container_get_focus_child" |
241 | :setter "gtk_container_set_focus_child" |
242 | :accessor container-focus-child |
243 | :initarg :focus-child |
244 | :type widget) |
e6d40e16 |
245 | (focus-chain |
246 | :allocation :virtual |
247 | :getter container-focus-chain |
248 | :setter (setf container-focus-chain)) |
5b51dee1 |
249 | (focus-hadjustment |
250 | :allocation :virtual |
251 | :getter "gtk_container_get_focus_hadjustment" |
252 | :setter "gtk_container_set_focus_hadjustment" |
253 | :accessor container-focus-hadjustment |
254 | :initarg :focus-hadjustment |
255 | :type adjustment) |
256 | (focus-vadjustment |
257 | :allocation :virtual |
258 | :getter "gtk_container_get_focus_vadjustment" |
259 | :setter "gtk_container_set_focus_vadjustment" |
260 | :accessor container-focus-vadjustment |
261 | :initarg :focus-vadjustment |
d76e9fca |
262 | :type adjustment) |
263 | (reallocate-redraws |
264 | :allocation :virtual |
265 | :getter "gtk_container_get_reallocate_redraws" |
266 | :setter "gtk_container_set_reallocate_redraws" |
267 | :accessor container-reallocate-redraws |
268 | :initarg :reallocate-redraws |
269 | :type boolean))) |
5b51dee1 |
270 | |
271 | ("GtkBin" |
272 | :slots |
273 | ((child |
274 | :allocation :virtual |
56460319 |
275 | :getter "gtk_bin_get_child" |
276 | :setter (setf bin-child) |
277 | :reader bin-child |
278 | :type widget))) |
3f73963b |
279 | |
280 | ("GtkWindow" |
281 | :slots |
4d16221f |
282 | ((focus-widget |
3f73963b |
283 | :allocation :virtual |
284 | :getter "gtk_window_get_focus" |
285 | :setter "gtk_window_set_focus" |
286 | :accessor window-focus-widget |
287 | :initarg :focus-widget |
288 | :type widget) |
289 | (default-widget |
290 | :allocation :virtual |
291 | :getter "gtk_window_get_default" |
292 | :setter "gtk_window_set_default" |
293 | :accessor window-default-widget |
294 | :initarg :default-widget |
295 | :type widget) |
3f73963b |
296 | (has-frame |
297 | :allocation :virtual |
298 | :getter "gtk_window_get_has_frame" |
299 | :setter "gtk_window_set_has_frame" |
300 | :accessor window-has-frame-p |
301 | :initarg :has-frame |
302 | :type boolean) |
4d16221f |
303 | (icon-list |
3f73963b |
304 | :allocation :virtual |
4d16221f |
305 | :getter "gtk_window_get_icon_list" |
306 | :setter "gtk_window_set_icon_list" |
307 | :accessor window-icon-list |
308 | :initarg :icon-list |
309 | :type (glist gdk:pixbuf)) |
3f73963b |
310 | (mnemonic-modifier |
311 | :allocation :virtual |
312 | :getter "gtk_window_get_mnemonic_modifier" |
313 | :setter "gtk_window_set_mnemonic_modifier" |
314 | :accessor window-mnemonic-modifier |
315 | :initarg :mnemonic-modifier |
316 | :type gdk:modifier-type) |
317 | (transient-for |
318 | :allocation :virtual |
319 | :getter "gtk_window_get_transient_for" |
320 | :setter "gtk_window_set_transient_for" |
321 | :accessor window-transient-for |
322 | :initarg :transient-for |
4d16221f |
323 | :type window) |
324 | (group |
325 | :allocation :virtual |
326 | :getter "gtk_window_get_group" |
327 | :setter (setf window-group) |
328 | :reader window-group |
329 | :initarg :group |
330 | :type window-group) |
331 | (default-width :merge t :unbound -1) |
332 | (default-height :merge t :unbound -1))) |
5b51dee1 |
333 | |
4d16221f |
334 | ("GtkWindowGroup" |
335 | :slots |
336 | ((grabs |
337 | :allocation :alien |
338 | :accessor window-group-grabs |
339 | :type (gslist window)))) |
340 | |
5b51dee1 |
341 | ("GtkTooltips" |
342 | :slots |
343 | ((enabled |
344 | :allocation :virtual |
345 | :getter "gtk_tooltips_get_enabled" |
346 | :setter (setf tooltips-enabled-p) |
347 | :reader tooltips-enabled-p |
348 | :initarg :enabled |
349 | :type boolean))) |
350 | |
5b51dee1 |
351 | ("GtkMenuItem" |
352 | :slots |
353 | ((label |
354 | :allocation :virtual |
f5b67f2b |
355 | :getter menu-item-label |
356 | :setter (setf menu-item-label) |
5b51dee1 |
357 | :type string) |
d76e9fca |
358 | (use-underline |
359 | :allocation :user-data |
360 | :initform nil |
361 | :initarg :use-underline |
362 | :accessor menu-item-use-underline-p) |
f5b67f2b |
363 | (right-justified |
364 | :allocation :virtual |
365 | :getter "gtk_menu_item_get_right_justified" |
366 | :setter "gtk_menu_item_set_right_justified" |
367 | :accessor menu-item-right-justified-p |
368 | :initarg :right-justified |
369 | :type boolean) |
5b51dee1 |
370 | (submenu |
371 | :allocation :virtual |
372 | :getter "gtk_menu_item_get_submenu" |
d76e9fca |
373 | :setter "gtk_menu_item_set_submenu" |
374 | :accessor menu-item-submenu |
5b51dee1 |
375 | :initarg :submenu |
d76e9fca |
376 | :type widget))) |
5b51dee1 |
377 | |
378 | ("GtkColorSelectionDialog" |
379 | :slots |
380 | ((colorsel |
381 | :allocation :alien |
382 | :reader color-selection-dialog-colorsel |
383 | :type widget) |
384 | (ok-button |
385 | :allocation :alien |
386 | :reader color-selection-dialog-ok-button |
387 | :type widget) |
388 | (cancel-button |
389 | :allocation :alien |
390 | :reader color-selection-dialog-cancel-button |
391 | :type widget) |
392 | (help-button |
393 | :allocation :alien |
394 | :reader color-selection-dialog-help-button |
395 | :type widget))) |
396 | |
397 | ("GtkScrolledWindow" |
398 | :slots |
399 | ((hscrollbar |
400 | :allocation :alien |
401 | :reader scrolled-window-hscrollbar |
402 | :type widget) |
403 | (vscrollbar |
404 | :allocation :alien |
405 | :reader scrolled-window-vscrollbar |
406 | :type widget))) |
560af5c5 |
407 | |
5b51dee1 |
408 | ("GtkPaned" |
1047e159 |
409 | :slots |
5b51dee1 |
410 | ((child1 |
560af5c5 |
411 | :allocation :virtual |
1dd03ab8 |
412 | :getter "gtk_paned_get_child1" |
413 | :setter "gtk_paned_add1" |
414 | :accessor paned-child1 |
5b51dee1 |
415 | :initarg :child1 |
560af5c5 |
416 | :type widget) |
5b51dee1 |
417 | (child2 |
2d379b6a |
418 | :allocation :virtual |
1dd03ab8 |
419 | :getter "gtk_paned_get_child2" |
420 | :setter "gtk_paned_add2" |
421 | :accessor paned-child2 |
5b51dee1 |
422 | :initarg :child2 |
423 | :type widget))) |
560af5c5 |
424 | |
5b51dee1 |
425 | ("GtkMenu" |
426 | :slots |
427 | ((accel-group |
428 | :allocation :virtual |
429 | :getter "gtk_menu_get_accel_group" |
430 | :setter "gtk_menu_set_accel_group" |
431 | :accessor menu-accel-group |
432 | :initarg :accel-group |
433 | :type accel-group) |
434 | (active |
435 | :allocation :virtual |
436 | :getter "gtk_menu_get_active" |
437 | :setter (setf menu-active) |
438 | :reader menu-active |
439 | :initarg :active |
440 | :type widget) |
d76e9fca |
441 | (screen |
442 | :allocation :virtual |
443 | :getter "gtk_menu_get_screen" |
444 | :setter "gtk_menu_set_screen" |
445 | :accessor menu-screen |
446 | :initarg :screen |
447 | :type gdk:screen) |
448 | (attach-widget |
449 | :allocation :virtual |
450 | :getter "gtk_menu_get_attach_widget" |
451 | :reader menu-attach-widget |
452 | :type widget) |
453 | #-gtk2.6 |
454 | (tearoff-state |
5b51dee1 |
455 | :allocation :virtual |
456 | :getter "gtk_menu_get_tearoff_state" |
457 | :setter "gtk_menu_set_tearoff_state" |
d76e9fca |
458 | :accessor menu-tearoff-state-p |
459 | :initarg :tearoff-state |
5b51dee1 |
460 | :type boolean))) |
461 | |
462 | ("GtkToolbar" |
463 | :slots |
cb4bf772 |
464 | ((show-tooltips |
5b51dee1 |
465 | :allocation :virtual |
466 | :getter "gtk_toolbar_get_tooltips" |
467 | :setter "gtk_toolbar_set_tooltips" |
cb4bf772 |
468 | :accessor toolbar-show-tooltips-p |
469 | :initarg :show-tooltips |
5b51dee1 |
470 | :type boolean) |
cb4bf772 |
471 | (tooltips |
5b51dee1 |
472 | :allocation :virtual |
cb4bf772 |
473 | :getter "gtk_toolbar_get_tooltips_object" |
474 | :reader toolbar-tooltips |
475 | :type tooltips) |
1047e159 |
476 | (toolbar-style |
477 | :allocation :property |
478 | :pname "toolbar-style" |
479 | :initarg :toolbar-style |
480 | :accessor toolbar-style |
cb4bf772 |
481 | :type toolbar-style) |
482 | (n-items |
483 | :allocation :virtual |
484 | :getter "gtk_toolbar_get_n_items" |
485 | :reader toolbar-n-items |
486 | :type int))) |
5b51dee1 |
487 | |
d76e9fca |
488 | ("GtkToolItem" |
489 | :slots |
cb4bf772 |
490 | ((use-drag-window |
d76e9fca |
491 | :allocation :virtual |
cb4bf772 |
492 | :getter "gtk_tool_item_get_use_drag_window" |
493 | :setter "gtk_tool_item_set_use_drag_window" |
494 | :accessor tool-item-use-drag-window-p |
d76e9fca |
495 | :initarg :drag-window |
cb4bf772 |
496 | :type boolean) |
497 | (tip-text |
498 | :allocation :user-data |
499 | :setter (setf tool-item-tip-text) |
500 | :initarg :tip-text |
501 | :reader tool-item-tip-text) |
502 | (tip-private |
503 | :allocation :user-data |
504 | :setter (setf tool-item-tip-private) |
505 | :initarg :tip-private |
506 | :reader tool-item-tip-private))) |
507 | |
508 | ("GtkToolButton" |
509 | :slots |
510 | ((stock-id :merge t :initarg :stock) |
511 | (icon-widget :merge t :initarg :icon))) |
d76e9fca |
512 | |
513 | ("GtkToggleToolButton" |
514 | :slots |
515 | ((active |
516 | :allocation :virtual |
517 | :getter "gtk_toggle_tool_button_get_active" |
518 | :setter "gtk_toggle_tool_button_get_active" |
519 | :accessor toggle-tool-button-active-p |
520 | :initarg :active |
521 | :type boolean))) |
522 | |
523 | ("GtkRadioToolButton" |
524 | :slots |
525 | ((group |
526 | :allocation :virtual |
527 | :getter "gtk_radio_tool_button_get_group" |
528 | :reader radio-tool-button-group |
cb4bf772 |
529 | :type (copy-of (gslist widget))) |
530 | (value |
531 | :allocation :user-data |
532 | :initarg :value |
533 | :accessor radio-tool-button-value |
534 | :documentation "Value passed as argument to the activate callback"))) |
d76e9fca |
535 | |
f5b67f2b |
536 | ("GtkNotebook" |
537 | :slots |
538 | ((current-page |
539 | :allocation :virtual |
68f519e0 |
540 | :getter %notebook-current-page |
f5b67f2b |
541 | :setter (setf notebook-current-page) |
68f519e0 |
542 | :reader notebook-current-page |
543 | :type widget |
f5b67f2b |
544 | :initarg :current-page) |
68f519e0 |
545 | (current-page-num |
546 | :allocation :virtual |
547 | :getter "gtk_notebook_get_current_page" |
548 | :setter "gtk_notebook_set_current_page" |
549 | :unbound -1 |
550 | :initarg :current-page-num |
551 | :accessor notebook-current-page-num |
552 | :type position))) |
f5b67f2b |
553 | |
5b51dee1 |
554 | ("GtkRuler" |
555 | :slots |
556 | ((metric |
557 | :allocation :virtual |
558 | :getter "gtk_ruler_get_metric" |
559 | :setter "gtk_ruler_set_metric" |
560 | :accessor ruler-metric |
561 | :initarg :metric |
562 | :type metric-type))) |
563 | |
564 | ("GtkProgressBar" |
565 | :slots |
566 | ; deprecated properties |
567 | ((bar-style :ignore t) |
568 | (adjustment :ignore t) |
569 | (activity-step :ignore t) |
570 | (activity-blocks :ignore t) |
571 | (discrete-blocks :ignore t))) |
572 | |
d76e9fca |
573 | ("GtkHandleBox" |
574 | :slots |
575 | ; deprecated property |
576 | ((shadow :ignore t))) |
577 | |
578 | ("GtkFrame" |
579 | :slots |
580 | ; deprecated property |
581 | ((shadow :ignore t))) |
582 | |
5b51dee1 |
583 | ("GtkTable" |
584 | :slots |
585 | ((column-spacing |
586 | :allocation :virtual |
587 | :getter "gtk_table_get_default_col_spacing" |
588 | :setter "gtk_table_set_col_spacings" |
589 | :initarg :column-spacing |
590 | :type unsigned-int) |
591 | (row-spacing |
592 | :allocation :virtual |
593 | :getter "gtk_table_get_default_row_spacing" |
594 | :setter "gtk_table_set_row_spacings" |
595 | :initarg :row-spacing |
596 | :type unsigned-int))) |
597 | |
598 | ("GtkDialog" |
599 | :slots |
1047e159 |
600 | ((vbox |
5b51dee1 |
601 | :allocation :virtual |
602 | :getter "gtk_dialog_get_vbox" |
1047e159 |
603 | :reader dialog-vbox |
5b51dee1 |
604 | :type widget) |
605 | (action-area |
606 | :allocation :virtual |
607 | :getter "gtk_dialog_get_action_area" |
608 | :reader dialog-action-area |
609 | :type widget))) |
2ed3bebb |
610 | |
d76e9fca |
611 | ("GtkEntry" |
5b51dee1 |
612 | :slots |
d76e9fca |
613 | ((layout |
5b51dee1 |
614 | :allocation :virtual |
d76e9fca |
615 | :getter "gtk_entry_get_layout" |
616 | :reader entry-layout |
617 | :type pango:layout) |
618 | (completion |
619 | :getter "gtk_entry_get_completion" |
620 | :setter "gtk_entry_set_completion" |
621 | :initarg :completion |
622 | :accessor entry-completion |
623 | :type entry-completion) |
624 | (max-length :merge t :unbound 0) |
625 | #+gtk2.6 |
647c99e5 |
626 | (width-chars :merge t :unbound -1))) |
d76e9fca |
627 | |
f45fd227 |
628 | ("GtkEntryCompletion" |
629 | :slots |
630 | ((entry |
631 | :allocation :virtual |
632 | :getter "gtk_entry_completion_get_entry" |
633 | :reader entry-completion-entry |
634 | :type entry) |
d76e9fca |
635 | (minimum-key-length :merge t :unbound -1) |
f45fd227 |
636 | #+gtk2.6 |
d76e9fca |
637 | (text-column :merge t :unbound -1))) |
f45fd227 |
638 | |
5b51dee1 |
639 | ("GtkRadioButton" |
640 | :slots |
641 | ((group |
642 | :allocation :virtual |
643 | :getter "gtk_radio_button_get_group" |
644 | :reader radio-button-group |
cb4bf772 |
645 | :type (copy-of (gslist widget))) |
646 | (value |
647 | :allocation :user-data |
648 | :initarg :value |
649 | :accessor radio-button-value |
650 | :documentation "Value passed as argument to the activate callback"))) |
d520140e |
651 | |
5b51dee1 |
652 | ("GtkRadioMenuItem" |
653 | :slots |
654 | ((group |
655 | :allocation :virtual |
656 | :getter "gtk_radio_menu_item_get_group" |
657 | :reader radio-menu-item-group |
cb4bf772 |
658 | :type (copy-of (gslist widget))) |
659 | (value |
660 | :allocation :user-data |
661 | :initarg :value |
662 | :accessor radio-menu-item-value |
663 | :documentation "Value passed as argument to the activate callback"))) |
560af5c5 |
664 | |
5b51dee1 |
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 | |
68f519e0 |
727 | ("GtkScale" |
728 | :slots |
729 | ((layout |
730 | :allocation :virtual |
731 | :getter "gtk_scale_get_layout" |
732 | :reader scale-layout |
733 | :type pango:layout))) |
734 | |
1047e159 |
735 | ("GtkEditable" |
736 | :slots |
737 | ((editable |
738 | :allocation :virtual |
739 | :getter "gtk_editable_get_editable" |
740 | :setter "gtk_editable_set_editable" |
741 | :reader editable-editable-p |
742 | :initarg :editable |
743 | :type boolean) |
744 | (position |
745 | :allocation :virtual |
746 | :getter "gtk_editable_get_position" |
747 | :setter "gtk_editable_set_position" |
748 | :reader editable-position |
749 | :initarg :position |
cb4bf772 |
750 | :type position) |
1047e159 |
751 | (text |
752 | :allocation :virtual |
753 | :getter editable-text |
754 | :setter (setf editable-text) |
755 | :initarg text))) |
756 | |
757 | ("GtkFileChooser" |
758 | :slots |
759 | ((filename |
760 | :allocation :virtual |
761 | :getter "gtk_file_chooser_get_filename" |
762 | :setter "gtk_file_chooser_set_filename" |
763 | :accessor file-chooser-filename |
764 | :initarg :filename |
765 | :type string) |
766 | (current-name |
767 | :allocation :virtual |
768 | :setter "gtk_file_chooser_set_current_name" |
68f519e0 |
769 | :accessor file-chooser-current-name |
1047e159 |
770 | :initarg :current-name |
771 | :type string) |
772 | (current-folder |
773 | :allocation :virtual |
774 | :setter "gtk_file_chooser_set_current_folder" |
775 | :setter "gtk_file_chooser_get_current_folder" |
68f519e0 |
776 | :accessor file-chooser-current-folder |
1047e159 |
777 | :initarg :current-folder |
778 | :type string) |
779 | (uri |
780 | :allocation :virtual |
781 | :getter "gtk_file_chooser_get_uri" |
782 | :setter "gtk_file_chooser_set_uri" |
68f519e0 |
783 | :accessor file-chooser-uri |
1047e159 |
784 | :initarg :uri |
785 | :type string) |
786 | (current-folder-uri |
787 | :allocation :virtual |
788 | :setter "gtk_file_chooser_set_current_folder_uri" |
789 | :setter "gtk_file_chooser_get_current_folder_uri" |
68f519e0 |
790 | :accessor file-chooser-current-folder-uri |
1047e159 |
791 | :initarg :current-folder-uri |
792 | :type string))) |
793 | |
68f519e0 |
794 | ("GtkFileFilter" |
795 | :slots |
796 | ((name |
797 | :allocation :virtual |
798 | :getter "gtk_file_filter_get_name" |
799 | :setter "gtk_file_filter_set_name" |
800 | :accessor file-filter-name |
801 | :initarg :name |
802 | :type string))) |
803 | |
1a1949c7 |
804 | ("GtkTreeView" |
805 | :slots |
806 | ((columns |
807 | :allocation :virtual |
808 | :getter "gtk_tree_view_get_columns" |
809 | :reader tree-view-columns |
f4175703 |
810 | :type (glist tree-view-column)) |
811 | (selection |
812 | :allocation :virtual |
813 | :getter "gtk_tree_view_get_selection" |
814 | :reader tree-view-selection |
815 | :type tree-selection))) |
1a1949c7 |
816 | |
2a8752b0 |
817 | ("GtkTreeModel" |
818 | :slots |
819 | ((n-columns |
820 | :allocation :virtual |
821 | :getter "gtk_tree_model_get_n_columns" |
822 | :reader tree-model-n-columns |
823 | :type int))) |
824 | |
f4175703 |
825 | ("GtkTreeSelection" |
826 | :slots |
827 | ((mode |
828 | :allocation :virtual |
829 | :getter "gtk_tree_selection_get_mode" |
830 | :setter "gtk_tree_selection_set_mode" |
831 | :accessor tree-selection-mode |
832 | :initarg :mode |
833 | :type selection-mode) |
834 | (tree-view |
835 | :allocation :virtual |
836 | :getter "gtk_tree_selection_get_mode" |
837 | :reader tree-selection-mode |
838 | :type tree-view))) |
839 | |
1a1949c7 |
840 | ("GtkComboBox" |
841 | :slots |
842 | ((active-iter |
843 | :allocation :virtual |
844 | :getter "gtk_combo_box_get_active_iter" |
845 | :setter "gtk_combo_box_set_active_iter" |
846 | :accessor combo-box-active-iter |
847 | :type tree-iter))) |
848 | |
aa77651b |
849 | ("GtkTextBuffer" |
850 | :slots |
851 | ((line-count |
852 | :allocation :virtual |
853 | :getter "gtk_text_buffer_get_line_count" |
854 | :reader text-buffer-line-count |
855 | :type int) |
856 | (char-count |
857 | :allocation :virtual |
858 | :getter "gtk_text_buffer_get_char_count" |
859 | :reader text-buffer-char-count |
860 | :type int) |
861 | (modified |
862 | :allocation :virtual |
863 | :getter "gtk_text_buffer_get_modified" |
864 | :setter "gtk_text_buffer_set_modified" |
865 | :accessor text-buffer-modifed-p |
866 | :type boolean))) |
867 | |
5e17fb78 |
868 | ("GtkTextView" |
869 | :slots |
870 | ((default-attributes |
871 | :allocation :virtual |
872 | :getter "gtk_text_view_get_default_attributes" |
873 | :reader text-view-default-attributes |
874 | :type text-attributes))) |
875 | |
aa77651b |
876 | ("GtkTextTagTable" |
877 | :slots |
878 | ((size |
879 | :allocation :virtual |
880 | :getter "gtk_text_tag_table_get_size" |
881 | :reader text-tag-table-size |
882 | :type int))) |
883 | |
884 | ("GtkTextTag" |
885 | :slots |
886 | ((priority |
887 | :allocation :virtual |
888 | :getter "gtk_text_tag_get_priority" |
889 | :setter "gtk_text_tag_set_priority" |
890 | :accessor text-tag-priority |
891 | :type int) |
892 | (weight |
893 | :merge t :type pango:weight))) |
894 | |
0763f21d |
895 | ("GtkTextMark" |
896 | :slots |
897 | ((buffer |
898 | :allocation :virtual |
899 | :getter "gtk_text_mark_get_buffer" |
900 | :reader text-mark-buffer |
901 | :type text-buffer) |
902 | (name |
903 | :allocation :virtual |
904 | :getter "gtk_text_mark_get_name" |
905 | :reader text-mark-name |
906 | :type string) |
907 | (visible |
908 | :allocation :virtual |
909 | :getter "gtk_text_mark_get_visible" |
910 | :setter "gtk_text_mark_set_visible" |
911 | :accessor text-mark-visible-p |
912 | :type boolean) |
913 | (deleted |
914 | :allocation :virtual |
915 | :getter "gtk_text_mark_get_deleted" |
916 | :reader text-mark-deleted-p |
917 | :type boolean) |
918 | (left-gravity |
919 | :allocation :virtual |
920 | :getter "gtk_text_mark_get_left_gravity" |
921 | :reader text-mark-left-gravity-p |
922 | :type boolean))) |
923 | |
5e17fb78 |
924 | ("GtkUIManager" |
925 | :type ui-manager |
926 | :slots |
927 | ((action-groups |
928 | :allocation :virtual |
929 | :getter "gtk_ui_manager_get_action_groups" |
930 | :reader ui-manager-action-groups |
931 | :type (copy-of (glist action-group))) |
932 | (accel-group |
933 | :allocation :virtual |
934 | :getter "gtk_ui_manager_get_accel_group" |
935 | :reader ui-manager-accel-group |
936 | :type accel-group))) |
937 | |
938 | ("GtkUIManagerItemType" |
939 | :type ui-manager-item-type) |
940 | |
a5522de5 |
941 | ("GtkAction" |
5e17fb78 |
942 | :slots |
943 | ((accelerator |
a5522de5 |
944 | :allocation :user-data :initarg :accelerator |
945 | :reader action-accelerator))) |
5e17fb78 |
946 | |
947 | ("GtkToggleAction" |
948 | :slots |
949 | ((active |
950 | :allocation :virtual |
951 | :getter "gtk_toggle_action_get_active" |
952 | :setter "gtk_toggle_action_set_active" |
953 | :initarg :active |
954 | :accessor toggle-action-active-p |
955 | :type boolean))) |
956 | |
957 | ("GtkRadioAction" |
958 | :slots |
959 | ((group |
960 | :allocation :virtual |
961 | :getter "gtk_radio_button_get_group" |
d76e9fca |
962 | :reader radio-action-group |
5e17fb78 |
963 | :type (copy-of (gslist widget))) |
a5522de5 |
964 | (self |
965 | :allocation :property :pname "value" :type int |
966 | :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 |
967 | (value |
a5522de5 |
968 | :allocation :user-data :initarg :value :accessor radio-action-value))) |
2a8752b0 |
969 | |
68f519e0 |
970 | ("GtkColorSelection" |
971 | :slots |
972 | ((previous-alpha |
973 | :allocation :virtual |
974 | :getter "gtk_color_selection_get_previous_alpha" |
975 | :setter "gtk_color_selection_get_previous_alpha" |
976 | :initarg :previous-alpha |
977 | :accessor color-selection-previous-alpha |
978 | :type (unsigned 16)) |
979 | (previous-color |
980 | :allocation :virtual |
981 | :getter "gtk_color_selection_get_previous_color" |
982 | :setter "gtk_color_selection_get_previous_color" |
983 | :initarg :previous-color |
984 | :accessor color-selection-previous-color |
985 | :type gdk:color))) |
986 | |
987 | ("GtkFontSelection" |
988 | :slots |
989 | ; deprecated property |
990 | ((font :ignore t))) |
aa77651b |
991 | |
647c99e5 |
992 | ("GtkClipboard" |
993 | :slots |
994 | ((display |
995 | :allocation :virtual |
996 | :getter "gtk_clipboard_get_display" |
997 | :reader clipboard-display |
998 | :type gdk:display))) |
999 | |
43e260ae |
1000 | #+gtk2.6 |
1001 | ("GtkIconView" |
1002 | :slots |
1003 | ((text-column :merge t :setter %icon-view-set-text-column) |
1004 | (markup-column :merge t :setter %icon-view-set-markup-column) |
1005 | (pixbuf-column :merge t :setter %icon-view-set-pixbuf-column))) |
647c99e5 |
1006 | |
5b51dee1 |
1007 | ;; Not needed |
1008 | ("GtkFundamentalType" :ignore t) |
1009 | ("GtkArgFlags" :ignore t) |
560af5c5 |
1010 | |
d520140e |
1011 | |
5b51dee1 |
1012 | ;; Deprecated widgets |
1013 | ("GtkCList" :ignore-prefix t) |
1014 | ("GtkCTree" :ignore-prefix t) |
1a1949c7 |
1015 | ("GtkList" :ignore t) |
1016 | ("GtkListItem" :ignore t) |
5b51dee1 |
1017 | ("GtkTree" :ignore t) |
1018 | ("GtkTreeItem" :ignore t) |
1a1949c7 |
1019 | ("GtkItemFactory" :ignore t) |
5e17fb78 |
1020 | ("GtkText" :ignore t) |
5b51dee1 |
1021 | ("GtkPacker" :ignore-prefix t) |
1022 | ("GtkPixmap" :ignore t) |
1023 | ("GtkPreview" :ignore-prefix t) |
1a1949c7 |
1024 | ("GtkProgres" :ignore t) |
5b51dee1 |
1025 | ("GtkTipsQuery" :ignore t) |
1047e159 |
1026 | ("GtkOldEditable" :ignore t) |
1a1949c7 |
1027 | ("GtkCombo" :ignore t) |
1028 | ("GtkOptionMenu" :ignore t) |
68f519e0 |
1029 | ("GtkFileSelection" :ignore t) |
1030 | ("GtkInputDialog") |
1047e159 |
1031 | |
1032 | ;; What are these? |
1033 | ("GtkFileSystemModule" :ignore t) |
1034 | ("GtkIMModule" :ignore t) |
fa60e0a2 |
1035 | ("GtkThemeEngine" :ignore t)) |
aa77651b |
1036 | |
1037 | |
1038 | (defclass text-iter (boxed) |
1039 | ((buffer |
1040 | :allocation :virtual |
1041 | :getter "gtk_text_iter_get_buffer" |
1042 | :reader text-iter-buffer |
68f519e0 |
1043 | :type pointer) ;text-buffer) |
aa77651b |
1044 | (offset |
1045 | :allocation :virtual |
1046 | :getter "gtk_text_iter_get_offset" |
1047 | :setter "gtk_text_iter_set_offset" |
1048 | :accessor text-iter-offset |
1049 | :type int) |
1050 | (line |
1051 | :allocation :virtual |
1052 | :getter "gtk_text_iter_get_line" |
1053 | :setter "gtk_text_iter_set_line" |
1054 | :accessor text-iter-line |
1055 | :type int) |
1056 | (line-offset |
1057 | :allocation :virtual |
1058 | :getter "gtk_text_iter_get_line_offset" |
1059 | :setter "gtk_text_iter_set_line_offset" |
1060 | :accessor text-iter-line-offset |
1061 | :type int) |
1062 | (line-index |
1063 | :allocation :virtual |
1064 | :getter "gtk_text_iter_get_line_index" |
1065 | :setter "gtk_text_iter_set_line_index" |
1066 | :accessor text-iter-line-index |
1067 | :type int) |
1068 | (visible-line-index |
1069 | :allocation :virtual |
1070 | :getter "gtk_text_iter_get_visible_line_index" |
1071 | :setter "gtk_text_iter_set_visible_line_index" |
1072 | :accessor text-iter-visible-line-index |
1073 | :type int) |
1074 | (visible-line-offset |
1075 | :allocation :virtual |
1076 | :getter "gtk_text_iter_get_visible_line_offset" |
1077 | :setter "gtk_text_iter_set_visible_line_offset" |
1078 | :accessor text-iter-visible-line-offset |
1079 | :type int) |
1080 | ;; Workaround to get correct size |
1081 | (dummy14 |
68f519e0 |
1082 | :allocation :alien :offset #.(* 13 (size-of 'pointer)) |
1083 | :type pointer)) |
aa77651b |
1084 | (:metaclass boxed-class |
1085 | ;; I am pretty sure this was working in older versons on CMUCL |
68f519e0 |
1086 | ; :size #.(* 14 (size-of 'pointer)) |
1087 | )) |
d76e9fca |
1088 | |
1089 | |
1090 | (defclass tooltips-data (struct) |
1091 | ((tooltips |
1092 | :allocation :alien |
1093 | :reader tooltips-data-tooltips |
1094 | :type tooltips) |
1095 | (widget |
1096 | :allocation :alien |
1097 | :reader tooltips-data-widget |
1098 | :type widget) |
1099 | (tip-text |
1100 | :allocation :alien |
1101 | :reader tooltips-data-tip-text |
1102 | :type string) |
1103 | (tip-private |
1104 | :allocation :alien |
1105 | :reader tooltips-data-tip-private |
1106 | :type string)) |
1107 | (:metaclass struct-class)) |
68f519e0 |
1108 | |
1109 | (defclass file-filter-info (struct) |
1110 | ((contains |
1111 | :allocation :alien |
1112 | :initarg :contains |
1113 | :type file-filter-flags) |
1114 | (filename |
1115 | :allocation :alien |
1116 | :initarg :filename |
1117 | :type string) |
1118 | (uri |
1119 | :allocation :alien |
1120 | :initarg :uri |
1121 | :type string) |
1122 | (display-name |
1123 | :allocation :alien |
1124 | :initarg :display-name |
1125 | :type string) |
1126 | (mime-type |
1127 | :allocation :alien |
1128 | :initarg :mime-type |
1129 | :type string)) |
1130 | (:metaclass struct-class)) |