55212af1 |
1 | ;; Common Lisp bindings for GTK+ v2.x |
aa032564 |
2 | ;; Copyright 2000-2006 Espen S. Johnsen <espen@users.sf.net> |
0d07716f |
3 | ;; |
55212af1 |
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: |
0d07716f |
11 | ;; |
55212af1 |
12 | ;; The above copyright notice and this permission notice shall be |
13 | ;; included in all copies or substantial portions of the Software. |
0d07716f |
14 | ;; |
55212af1 |
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. |
0d07716f |
22 | |
83147967 |
23 | ;; $Id: gtkwidget.lisp,v 1.29 2007/09/06 14:27:07 espen Exp $ |
0d07716f |
24 | |
25 | (in-package "GTK") |
26 | |
7af3f90b |
27 | #-debug-ref-counting |
28 | (defmethod print-object ((widget widget) stream) |
29 | (if (and |
30 | (proxy-valid-p widget) |
31 | (slot-boundp widget 'name) (not (zerop (length (widget-name widget))))) |
32 | (print-unreadable-object (widget stream :type t :identity nil) |
33 | (format stream "~S at 0x~X" |
aa032564 |
34 | (widget-name widget) (pointer-address (foreign-location widget)))) |
7af3f90b |
35 | (call-next-method))) |
36 | |
d0cc9e86 |
37 | (defmethod shared-initialize ((widget widget) names &key (visible nil visible-p)) |
aa032564 |
38 | (declare (ignore names)) |
d0cc9e86 |
39 | (when (and visible-p (not visible)) ; widget explicit set as not visible |
40 | (setf (user-data widget 'hidden-p) t) |
41 | (signal-connect widget 'show |
42 | #'(lambda () |
43 | (unset-user-data widget 'hidden-p)) |
44 | :remove t)) |
45 | (call-next-method)) |
dd392521 |
46 | |
9d5e4733 |
47 | (defmethod shared-initialize :after ((widget widget) names &key parent visible) |
d0cc9e86 |
48 | (declare (ignore names)) |
9d5e4733 |
49 | (when visible |
50 | (widget-show widget)) |
d0cc9e86 |
51 | (when parent |
52 | (when (slot-boundp widget 'parent) |
53 | (container-remove (widget-parent widget) widget)) |
54 | (destructuring-bind (parent &rest args) (mklist parent) |
55 | (apply #'container-add parent widget args)))) |
0d07716f |
56 | |
03272be4 |
57 | (defmethod slot-unbound ((class gobject-class) (object widget) |
58 | (slot (eql 'child-properties))) |
0d07716f |
59 | (cond |
03272be4 |
60 | ((slot-boundp object 'parent) |
c66e7b94 |
61 | (with-slots (parent child-properties) object |
03272be4 |
62 | (setf child-properties |
63 | (make-instance |
64 | (gethash (class-of parent) *container-to-child-class-mappings*) |
0d07716f |
65 | :parent parent :child object)))) |
03272be4 |
66 | ((call-next-method)))) |
67 | |
0d07716f |
68 | |
6b465328 |
69 | (defparameter *widget-display-as-default-in-signal-handler-p* t) |
70 | |
a68868d1 |
71 | (defmethod compute-signal-function ((widget widget) signal function object args) |
6b465328 |
72 | (let ((wrapper |
73 | (if (eq object :parent) |
74 | #'(lambda (&rest emission-args) |
75 | (let ((all-args (nconc (rest emission-args) args))) |
76 | (if (slot-boundp widget 'parent) |
77 | (apply function (widget-parent widget) all-args) |
78 | ;; Delay until parent is set |
79 | (signal-connect widget 'parent-set |
80 | #'(lambda (old-parent) |
81 | (declare (ignore old-parent)) |
82 | (apply #'signal-emit widget signal (rest emission-args))) |
83 | :remove t)))) |
84 | (call-next-method)))) |
85 | (if *widget-display-as-default-in-signal-handler-p* |
86 | #'(lambda (&rest args) |
87 | (let ((display (when (slot-boundp widget 'window) |
88 | (gdk:drawable-display (widget-window widget))))) |
89 | (gdk:with-default-display (display) |
90 | (apply wrapper args)))) |
91 | wrapper))) |
92 | |
93 | |
2519d4ca |
94 | |
c66e7b94 |
95 | (defun child-property-value (widget slot) |
96 | (slot-value (widget-child-properties widget) slot)) |
0d07716f |
97 | |
c66e7b94 |
98 | (defun (setf child-property-value) (value widget slot) |
99 | (setf (slot-value (widget-child-properties widget) slot) value)) |
0d07716f |
100 | |
c66e7b94 |
101 | (defmacro with-child-properties (slots widget &body body) |
102 | `(with-slots ,slots (widget-child-properties ,widget) |
0d07716f |
103 | ,@body)) |
104 | |
860e6a2e |
105 | |
860e6a2e |
106 | ;;; Bindings |
107 | |
08aad4db |
108 | (defbinding widget-destroy () nil |
0d07716f |
109 | (widget widget)) |
110 | |
08aad4db |
111 | (defbinding widget-unparent () nil |
0d07716f |
112 | (widget widget)) |
113 | |
08aad4db |
114 | (defbinding widget-show () nil |
0d07716f |
115 | (widget widget)) |
116 | |
08aad4db |
117 | (defbinding widget-show-now () nil |
0d07716f |
118 | (widget widget)) |
119 | |
08aad4db |
120 | (defbinding widget-hide () nil |
0d07716f |
121 | (widget widget)) |
122 | |
d0cc9e86 |
123 | (defun widget-hidden-p (widget) |
124 | "Return T if WIDGET has been explicit hidden during construction." |
125 | (user-data widget 'hidden-p)) |
126 | |
08aad4db |
127 | (defbinding widget-show-all () nil |
0d07716f |
128 | (widget widget)) |
129 | |
08aad4db |
130 | (defbinding widget-hide-all () nil |
0d07716f |
131 | (widget widget)) |
132 | |
08aad4db |
133 | (defbinding widget-map () nil |
0d07716f |
134 | (widget widget)) |
135 | |
08aad4db |
136 | (defbinding widget-unmap () nil |
0d07716f |
137 | (widget widget)) |
138 | |
08aad4db |
139 | (defbinding widget-realize () nil |
0d07716f |
140 | (widget widget)) |
141 | |
08aad4db |
142 | (defbinding widget-unrealize () nil |
0d07716f |
143 | (widget widget)) |
144 | |
860e6a2e |
145 | (defbinding widget-queue-draw () nil |
146 | (widget widget)) |
147 | |
148 | (defbinding widget-queue-resize () nil |
149 | (widget widget)) |
150 | |
03272be4 |
151 | (defbinding widget-queue-resize-no-redraw () nil |
152 | (widget widget)) |
153 | |
154 | (defbinding widget-size-request |
155 | (widget &optional (requisition (make-instance 'requisition))) nil |
860e6a2e |
156 | (widget widget) |
aa032564 |
157 | (requisition requisition :in/return)) |
860e6a2e |
158 | |
03272be4 |
159 | (defbinding widget-get-child-requisition |
160 | (widget &optional (requisition (make-instance 'requisition))) nil |
860e6a2e |
161 | (widget widget) |
aa032564 |
162 | (requisition requisition :in/return)) |
860e6a2e |
163 | |
164 | (defbinding widget-size-allocate () nil |
165 | (widget widget) |
166 | (allocation allocation)) |
167 | |
08aad4db |
168 | (defbinding widget-add-accelerator |
0d07716f |
169 | (widget signal accel-group key modifiers flags) nil |
170 | (widget widget) |
7af3f90b |
171 | ((signal-name-to-string signal) string) |
0d07716f |
172 | (accel-group accel-group) |
173 | ((gdk:keyval-from-name key) unsigned-int) |
174 | (modifiers gdk:modifier-type) |
175 | (flags accel-flags)) |
176 | |
08aad4db |
177 | (defbinding widget-remove-accelerator |
0d07716f |
178 | (widget accel-group key modifiers) nil |
179 | (widget widget) |
180 | (accel-group accel-group) |
181 | ((gdk:keyval-from-name key) unsigned-int) |
182 | (modifiers gdk:modifier-type)) |
183 | |
03272be4 |
184 | (defbinding widget-set-accel-path () nil |
0d07716f |
185 | (widget widget) |
860e6a2e |
186 | (accel-path string) |
187 | (accel-group accel-group)) |
0d07716f |
188 | |
03272be4 |
189 | (defbinding widget-list-accel-closures () (glist pointer) |
190 | (widget widget)) |
191 | |
192 | (defbinding widget-can-activate-accel-p () boolean |
193 | (widget widget) |
194 | (signal-id unsigned-int)) |
195 | |
196 | (defbinding widget-event () boolean |
0d07716f |
197 | (widget widget) |
198 | (event gdk:event)) |
199 | |
08aad4db |
200 | (defbinding widget-activate () boolean |
0d07716f |
201 | (widget widget)) |
202 | |
08aad4db |
203 | (defbinding widget-reparent () nil |
0d07716f |
204 | (widget widget) |
205 | (new-parent widget)) |
206 | |
860e6a2e |
207 | (defbinding %widget-intersect () boolean |
208 | (widget widget) |
209 | (area gdk:rectangle) |
ecdb2ae2 |
210 | (intersection (or null gdk:rectangle))) |
0d07716f |
211 | |
860e6a2e |
212 | (defun widget-intersection (widget area) |
213 | (let ((intersection (make-instance 'gdk:rectangle))) |
214 | (when (%widget-intersect widget area intersection) |
215 | intersection))) |
0d07716f |
216 | |
860e6a2e |
217 | (defun widget-intersect-p (widget area) |
ecdb2ae2 |
218 | (%widget-intersect widget area nil)) |
13148f19 |
219 | |
860e6a2e |
220 | (defbinding widget-grab-focus () nil |
13148f19 |
221 | (widget widget)) |
222 | |
860e6a2e |
223 | (defbinding widget-grab-default () nil |
224 | (widget widget)) |
0d07716f |
225 | |
08aad4db |
226 | (defbinding widget-add-events () nil |
0d07716f |
227 | (widget widget) |
228 | (events gdk:event-mask)) |
229 | |
860e6a2e |
230 | (defbinding widget-get-toplevel () widget |
0d07716f |
231 | (widget widget)) |
232 | |
860e6a2e |
233 | (defbinding widget-get-ancestor (widget type) widget |
0d07716f |
234 | (widget widget) |
235 | ((find-type-number type) type-number)) |
236 | |
860e6a2e |
237 | (defbinding widget-get-pointer () nil |
0d07716f |
238 | (widget widget) |
239 | (x int :out) |
240 | (y int :out)) |
241 | |
03272be4 |
242 | (defbinding widget-is-ancestor-p () boolean |
0d07716f |
243 | (widget widget) |
244 | (ancestor widget)) |
245 | |
860e6a2e |
246 | (defbinding widget-translate-coordinates () boolean |
247 | (src-widget widget) |
248 | (dest-widget widget) |
249 | (src-x int) (src-y int) |
250 | (set-x int :out) (dest-y int :out)) |
251 | |
252 | (defun widget-hide-on-delete (widget) |
253 | "Utility function; intended to be connected to the DELETE-EVENT |
03272be4 |
254 | signal on a WINDOW. The function calls WIDGET-HIDE on its |
860e6a2e |
255 | argument, then returns T. If connected to DELETE-EVENT, the |
256 | result is that clicking the close button for a window (on the window |
257 | frame, top right corner usually) will hide but not destroy the |
258 | window. By default, GTK+ destroys windows when DELETE-EVENT is |
259 | received." |
260 | (widget-hide widget) |
261 | t) |
262 | |
08aad4db |
263 | (defbinding widget-ensure-style () nil |
0d07716f |
264 | (widget widget)) |
265 | |
08aad4db |
266 | (defbinding widget-reset-rc-styles () nil |
0d07716f |
267 | (widget widget)) |
268 | |
08aad4db |
269 | (defbinding widget-push-colormap () nil |
0d07716f |
270 | (colormap gdk:colormap)) |
271 | |
08aad4db |
272 | (defbinding widget-pop-colormap () nil) |
0d07716f |
273 | |
03272be4 |
274 | (defbinding %widget-set-default-colormap () nil |
0d07716f |
275 | (colormap gdk:colormap)) |
276 | |
03272be4 |
277 | (defun (setf widget-default-colormap) (colormap) |
278 | (%widget-set-default-colormap colormap) |
279 | colormap) |
280 | |
281 | (defbinding (widget-default-style "gtk_widget_get_default_style") () style) |
0d07716f |
282 | |
03272be4 |
283 | (defbinding (widget-default-colromap "gtk_widget_get_default_colormap") |
284 | () gdk:colormap) |
0d07716f |
285 | |
03272be4 |
286 | (defbinding (widget-default-visual "gtk_widget_get_default_visual") |
287 | () gdk:visual) |
860e6a2e |
288 | |
03272be4 |
289 | (defbinding (widget-default-direction "gtk_widget_get_default_direction") |
290 | () text-direction) |
860e6a2e |
291 | |
03272be4 |
292 | (defbinding %widget-set-default-direction () nil |
293 | (direction text-direction)) |
294 | |
295 | (defun (setf widget-default-direction) (direction) |
296 | (%widget-set-default-direction direction) |
297 | direction) |
860e6a2e |
298 | |
08aad4db |
299 | (defbinding widget-shape-combine-mask () nil |
0d07716f |
300 | (widget widget) |
03272be4 |
301 | (shape-mask (or null gdk:bitmap)) |
0d07716f |
302 | (x-offset int) |
303 | (y-offset int)) |
304 | |
46158111 |
305 | (defun widget-path (widget) |
306 | (let ((subpath (list (if (and |
307 | (slot-boundp widget 'name) |
308 | (not (zerop (length (widget-name widget))))) |
309 | (widget-name widget) |
310 | (type-of widget))))) |
311 | (if (slot-boundp widget 'parent) |
312 | (nconc (widget-path (widget-parent widget)) subpath) |
313 | subpath))) |
314 | |
315 | (defun widget-class-path (widget) |
316 | (let ((subpath (list (type-of widget)))) |
317 | (if (slot-boundp widget 'parent) |
318 | (nconc (widget-class-path (widget-parent widget)) subpath) |
319 | subpath))) |
320 | |
321 | |
322 | (defun widget-path-lookup (path &optional (root (nreverse (window-list-toplevels))) (error-p t)) |
323 | (let ((component (first path))) |
324 | (loop |
325 | for widget in (mklist root) |
326 | do (when (or |
327 | (and |
328 | (stringp component) (slot-boundp widget 'name) |
329 | (string= component (widget-name widget))) |
330 | (and |
331 | (symbolp component) (typep widget component))) |
332 | (cond |
333 | ((endp (rest path)) (return widget)) |
334 | ((typep widget 'container) |
335 | (let ((descendant (widget-path-lookup (rest path) (container-children widget) nil))) |
336 | (when descendant |
337 | (return descendant)))))))) |
338 | (when error-p |
339 | (error "Widget not found: ~A" path))) |
340 | |
341 | |
342 | (defun widget-find (name &optional (root (nreverse (window-list-toplevels))) (error-p t)) |
343 | "Search for a widget with the given name. ROOT should be a container |
344 | widget or a list of containers." |
345 | (loop |
346 | for widget in (mklist root) |
347 | do (cond |
348 | ((and (slot-boundp widget 'name) (string= name (widget-name widget))) |
9afb775d |
349 | (return-from widget-find widget)) |
46158111 |
350 | ((typep widget 'container) |
351 | (let ((descendant (widget-find name (container-children widget) nil))) |
352 | (when descendant |
9afb775d |
353 | (return-from widget-find descendant)))))) |
46158111 |
354 | (when error-p |
355 | (error "Widget not found: ~A" name))) |
860e6a2e |
356 | |
860e6a2e |
357 | |
358 | (defbinding widget-modify-style () nil |
359 | (widget widget) |
360 | (style rc-style)) |
361 | |
03272be4 |
362 | (defbinding widget-get-modifier-style () rc-style |
860e6a2e |
363 | (widget widget)) |
364 | |
03272be4 |
365 | (defbinding widget-modify-fg () nil |
860e6a2e |
366 | (widget widget) |
367 | (state state-type) |
368 | (color gdk:color)) |
369 | |
03272be4 |
370 | (defbinding widget-modify-bg () nil |
860e6a2e |
371 | (widget widget) |
372 | (state state-type) |
373 | (color gdk:color)) |
374 | |
375 | (defbinding widget-modify-text () nil |
376 | (widget widget) |
377 | (state state-type) |
378 | (color gdk:color)) |
379 | |
380 | (defbinding widget-modify-base () nil |
381 | (widget widget) |
382 | (state state-type) |
383 | (color gdk:color)) |
384 | |
b22f5374 |
385 | (defbinding widget-modify-font (widget font-desc) nil |
860e6a2e |
386 | (widget widget) |
b22f5374 |
387 | ((etypecase font-desc |
388 | (pango:font-description font-desc) |
389 | (string (pango:font-description-from-string font-desc))) |
390 | pango:font-description)) |
860e6a2e |
391 | |
392 | (defbinding widget-create-pango-context () pango:context |
393 | (widget widget)) |
394 | |
395 | (defbinding widget-get-pango-context () pango:context |
396 | (widget widget)) |
397 | |
398 | (defbinding widget-create-pango-layout (widget &optional text) pango:layout |
399 | (widget widget) |
400 | (text (or string null))) |
401 | |
03272be4 |
402 | (defbinding widget-render-icon (widget stock-id &optional size detail) |
403 | gdk:pixbuf |
860e6a2e |
404 | (widget widget) |
405 | (stock-id string) |
03272be4 |
406 | ((or size -1) (or icon-size int)) |
407 | (detail (or null string))) |
860e6a2e |
408 | |
409 | (defbinding widget-push-composite-child () nil) |
410 | |
411 | (defbinding widget-pop-composite-child () nil) |
412 | |
413 | (defbinding widget-queue-draw-area () nil |
414 | (widget widget) |
415 | (x int) (y int) (width int) (height int)) |
416 | |
417 | (defbinding widget-reset-shapes () nil |
418 | (widget widget)) |
419 | |
44cba00e |
420 | (defbinding widget-set-double-buffered () nil |
421 | (widget widget) |
422 | (double-buffered boolean)) |
860e6a2e |
423 | |
03272be4 |
424 | ;; (defbinding widget-set-redraw-on-allocate () nil |
425 | ;; (widget widget) |
426 | ;; (redraw-on-allocate boolean)) |
860e6a2e |
427 | |
428 | (defbinding widget-set-scroll-adjustments () boolean |
429 | (widget widget) |
03272be4 |
430 | (hadjustment (or null adjustment)) |
431 | (vadjustment (or null adjustment))) |
860e6a2e |
432 | |
433 | (defbinding widget-mnemonic-activate () boolean |
434 | (widget widget) |
435 | (group-cycling boolean)) |
436 | |
03272be4 |
437 | (defbinding widget-class-find-style-property (class name) param |
438 | ((type-class-peek class) pointer) |
439 | (name string)) |
440 | |
441 | (defbinding widget-class-list-style-properties (class) |
442 | (vector (copy-of param) n-properties) |
443 | ((type-class-peek class) pointer) |
444 | (n-properties unsigned-int :out)) |
445 | |
860e6a2e |
446 | (defbinding widget-region-intersect () pointer ;gdk:region |
447 | (widget widget) |
448 | (region pointer)) ;gdk:region)) |
449 | |
03272be4 |
450 | (defbinding widget-send-expose () boolean |
860e6a2e |
451 | (widget widget) |
452 | (event gdk:event)) |
453 | |
03272be4 |
454 | (defbinding %widget-style-get-property () nil |
455 | (widget widget) |
456 | (name string) |
457 | (value gvalue)) |
458 | |
459 | (defun style-property-value (widget style) |
460 | (let* ((name (string-downcase style)) |
461 | (param (widget-class-find-style-property (class-of widget) name))) |
462 | (if (not param) |
463 | (error "~A has no such style property: ~A" widget style) |
464 | (with-gvalue (gvalue (param-value-type param)) |
465 | (%widget-style-get-property widget (string-downcase style) gvalue))))) |
466 | |
860e6a2e |
467 | (defbinding widget-get-accessible () atk:object |
468 | (widget widget)) |
469 | |
470 | (defbinding widget-child-focus () boolean |
471 | (widget widget) |
472 | (direction direction-type)) |
473 | |
474 | (defbinding widget-child-notify () nil |
475 | (widget widget) |
476 | (child-property string)) |
477 | |
478 | (defbinding widget-freeze-child-notify () nil |
479 | (widget widget)) |
480 | |
03272be4 |
481 | (defbinding widget-get-clipboard () clipboard |
482 | (widget widget) |
483 | (selection int #|gdk:atom|#)) |
484 | |
485 | (defbinding widget-get-display () gdk:display |
486 | (widget widget)) |
487 | |
488 | (defbinding widget-get-root-window () gdk:window |
489 | (widget widget)) |
490 | |
491 | (defbinding widget-get-screen () gdk:screen |
492 | (widget widget)) |
493 | |
494 | (defbinding widget-has-screen-p () boolean |
495 | (widget widget)) |
496 | |
860e6a2e |
497 | (defbinding %widget-get-size-request () nil |
498 | (widget widget) |
499 | (width int :out) |
500 | (height int :out)) |
501 | |
502 | (defun widget-get-size-request (widget) |
503 | (multiple-value-bind (width height) (%widget-get-size-request widget) |
6baf860c |
504 | (values (unless (= width -1) width) (unless (= height -1) height)))) |
860e6a2e |
505 | |
506 | (defbinding widget-set-size-request (widget width height) nil |
507 | (widget widget) |
508 | ((or width -1) int) |
509 | ((or height -1) int)) |
510 | |
511 | (defbinding widget-thaw-child-notify () nil |
512 | (widget widget)) |
513 | |
03272be4 |
514 | (defbinding widget-list-mnemonic-labels () (glist widget) |
515 | (widget widget)) |
516 | |
517 | (defbinding widget-add-mnemonic-label () nil |
518 | (widget widget) |
519 | (label widget)) |
520 | |
521 | (defbinding widget-remove-mnemonic-label () nil |
522 | (widget widget) |
523 | (label widget)) |
524 | |
860e6a2e |
525 | |
526 | ;;; Additional bindings and functions |
527 | |
83147967 |
528 | (defbinding %widget-flags () int |
0d07716f |
529 | (widget widget)) |
530 | |
83147967 |
531 | (defun widget-flags (widget) |
532 | (let ((flags (%widget-flags widget))) |
533 | (nconc |
534 | (int-to-object-flags flags) |
535 | (int-to-widget-flags flags)))) |
536 | |
537 | (defun widget-mapped-p (widget) |
538 | (find :mapped (widget-flags widget))) |
539 | |
540 | (defun widget-realized-p (widget) |
541 | (find :realized (widget-flags widget))) |
542 | |
860e6a2e |
543 | (defbinding widget-get-size-allocation () nil |
544 | (widget widget) |
545 | (width int :out) |
546 | (height int :out)) |
547 | |
548 | (defbinding get-event-widget () widget |
549 | (event gdk:event)) |
550 | |
551 | (defun (setf widget-cursor) (cursor-type widget) |
6091b3e8 |
552 | (warn "(SETF WIDGET-CURSOR) is deprecated, use WIDGET-SET-CURSOR instead") |
553 | (widget-set-cursor widget cursor-type)) |
554 | |
555 | (defun widget-set-cursor (widget cursor &rest args) |
556 | (gdk:window-set-cursor (widget-window widget) |
557 | (apply #'gdk:ensure-cursor cursor args))) |
03272be4 |
558 | |
559 | (defbinding %widget-get-parent-window () gdk:window |
560 | (widget widget)) |
561 | |
562 | (defun %widget-parent-window (widget) |
563 | (when (slot-boundp widget 'parent) |
564 | (%widget-get-parent-window widget))) |