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