Correct the DEFPACKAGE for GOBJECT to work with recent closer-mop (0.60)
[cl-gtk2.git] / gdk / gdk.windows.lisp
blob2dd57fd5c93d81fa2cace9a5ac5e7e1d495d5180
1 (in-package :gdk)
3 (defcfun gdk-window-new (g-object gdk-window :already-referenced)
4 (parent (g-object gdk-window))
5 (attributes (g-boxed-foreign gdk-window-attr))
6 (attributes-mask gdk-window-attributes-type))
8 (export 'gdk-window-new)
10 (defcfun gdk-window-destroy :void
11 (window (g-object gdk-window)))
13 (export 'gdk-window-destroy)
15 (defcfun (%gdk-window-at-pointer "gdk_window_at_pointer") (g-object gdk-window)
16 (win-x (:pointer :int))
17 (win-y (:pointer :int)))
19 (defun gdk-window-at-pointer ()
20 (with-foreign-objects ((x :int) (y :int))
21 (let ((window (%gdk-window-at-pointer x y)))
22 (if window
23 (values window (mem-ref x :int) (mem-ref y :int))
24 (values nil nil nil)))))
26 (export 'get-window-at-pointe)
28 (defcfun gdk-window-show :void
29 (window (g-object gdk-window)))
31 (export 'gdk-window-show)
33 (defcfun gdk-window-show-unraised :void
34 (window (g-object gdk-window)))
36 (export 'gdk-window-show-unraised)
38 (defcfun gdk-window-hide :void
39 (window (g-object gdk-window)))
41 (export 'gdk-window-hide)
43 (defcfun gdk-window-withdraw :void
44 (window (g-object gdk-window)))
46 (export 'gdk-window-withdraw)
48 (defcfun gdk-window-iconify :void
49 (window (g-object gdk-window)))
51 (export 'gdk-window-iconify)
53 (defcfun gdk-window-deiconify :void
54 (window (g-object gdk-window)))
56 (export 'gdk-window-deiconify)
58 (defcfun gdk-window-stick :void
59 (window (g-object gdk-window)))
61 (export 'gdk-window-stick)
63 (defcfun gdk-window-unstick :void
64 (window (g-object gdk-window)))
66 (export 'gdk-window-unstick)
68 (defcfun gdk-window-maximize :void
69 (window (g-object gdk-window)))
71 (export 'gdk-window-maximize)
73 (defcfun gdk-window-unmaximize :void
74 (window (g-object gdk-window)))
76 (export 'gdk-window-unmaximize)
78 (defcfun gdk-window-fullscreen :void
79 (window (g-object gdk-window)))
81 (export 'gdk-window-unfullscreen)
83 (defcfun gdk-window-move :void
84 (window (g-object gdk-window))
85 (x :int)
86 (y :int))
88 (export 'gdk-window-move)
90 (defcfun gdk-window-resize :void
91 (window (g-object gdk-window))
92 (width :int)
93 (height :int))
95 (export 'gdk-window-resize)
97 (defcfun gdk-window-move-resize :void
98 (window (g-object gdk-window))
99 (x :int)
100 (y :int)
101 (width :int)
102 (height :int))
104 (export 'gdk-window-move-resize)
106 (defcfun gdk-window-scroll :void
107 (window (g-object gdk-window))
108 (dx :int)
109 (dy :int))
111 (export 'gdk-window-scroll)
113 (defcfun gdk-window-move-region :void
114 (window (g-object gdk-window))
115 (region (g-boxed-foreign region))
116 (dx :int)
117 (dy :int))
119 (export 'gdk-window-move-region)
121 ;; TODO: (because of >= 2.18)
122 ;; void gdk_window_flush (GdkWindow *window);
123 ;; gboolean gdk_window_ensure_native (GdkWindow *window);
125 (defcfun gdk-window-reparent :void
126 (window (g-object gdk-window))
127 (new-parent (g-object gdk-window))
128 (x :int)
129 (y :int))
131 (export 'gdk-window-reparent)
133 (defcfun gdk-window-clear :void
134 (window (g-object gdk-window)))
136 (export 'gdk-window-clear)
138 (defcfun gdk-window-clear-area :void
139 (window (g-object gdk-window))
140 (x :int)
141 (y :int)
142 (width :int)
143 (height :int))
145 (export 'gdk-window-clear-area)
147 (defcfun gdk-window-clear-area-e :void
148 (window (g-object gdk-window))
149 (x :int)
150 (y :int)
151 (width :int)
152 (height :int))
154 (export 'gdk-window-clear-area-e)
156 (defcfun gdk-window-raise :void
157 (window (g-object gdk-window)))
159 (export 'gdk-window-raise)
161 (defcfun gdk-window-lower :void
162 (window (g-object gdk-window)))
164 (export 'gdk-window-lower)
166 (defcfun gdk-window-restack :void
167 (window (g-object gdk-window))
168 (sibling (g-object gdk-window))
169 (above :boolean))
171 (export 'gdk-window-restack)
173 (defcfun gdk-window-focus :void
174 (window (g-object gdk-window))
175 (timestamp :uint32))
177 (export 'gdk-window-focus)
179 (defcfun gdk-window-register-dnd :void
180 (window (g-object gdk-window)))
182 (export 'gdk-window-register-dnd)
184 (defcfun gdk-window-begin-resize-drag :void
185 (window (g-object gdk-window))
186 (edge gdk-window-edge)
187 (button :int)
188 (root-x :int)
189 (root-y :int)
190 (timestamp :uint32))
192 (export 'gdk-window-begin-resize-drag)
194 (defcfun gdk-window-begin-move-drag :void
195 (window (g-object gdk-window))
196 (button :int)
197 (root-x :int)
198 (root-y :int)
199 (timestamp :uint32))
201 (export 'gdk-window-begin-move-drag)
203 (defcfun gdk_window_constrain_size :void
204 (geometry (g-boxed-foreign geometry))
205 (flags gdk-window-hints)
206 (width :int)
207 (height :int)
208 (new-width (:pointer :int))
209 (new-height (:pointer :int)))
211 (defun gdk-window-constrain-size (geometry flags width height)
212 (with-foreign-objects ((new-width :int) (new-height :int))
213 (gdk_window_constrain_size geometry flags width height new-width new-height)
214 (values (mem-ref new-width :int)
215 (mem-ref new-height :int))))
217 (export 'gdk-window-constrain-size)
219 (defcfun gdk-window-beep :void
220 (window (g-object gkd-window)))
222 (export 'gdk-window-beep)
224 (defcfun gdk-window-begin-paint-rect :void
225 (window (g-object gdk-window))
226 (rectangle (g-boxed-foreign rectangle)))
228 (export 'gdk-window-begin-paint-rect)
230 (defcfun gdk-window-begin-paint-region :void
231 (window (g-object gdk-window))
232 (region (g-boxed-foreign region)))
234 (export 'gdk-window-begin-paint-region)
236 (defcfun gdk-window-invalidate-rect :void
237 (window (g-object gdk-window))
238 (rectangle (g-boxed-foreign rectangle))
239 (invalidate-children :boolean))
241 (export 'gdk-window-invalidate-rect)
243 (defcfun gdk-window-invalidate-region :void
244 (window (g-object gdk-window))
245 (region (g-boxed-foreign region))
246 (invalidate-children :boolean))
248 (export 'gdk-window-invalidate-region)
250 (defcfun gdk_window_invalidate_maybe_recurse :void
251 (window (g-object gdk-window))
252 (region (g-boxed-foreign region))
253 (recurse-p-fn :pointer)
254 (user-data :pointer))
256 (defcallback gdk-window-invalidate-maybe-recurse-cb :boolean
257 ((window (g-object gdk-window))
258 (user-data :pointer))
259 (let ((fn (stable-pointer-value user-data)))
260 (funcall fn window)))
262 (defun gdk-window-invalidate-maybe-recurse (window region fn)
263 (with-stable-pointer (ptr fn)
264 (gdk_window_invalidate_maybe_recurse window region (callback gdk-window-invalidate-maybe-recurse-cb) ptr)))
266 (export 'gdk-window-invalidate-maybe-recurse)
268 (defcfun gdk-window-get-update-area (g-boxed-foreign region :return)
269 (window (g-object gdk-window)))
271 (export 'gdk-window-get-update-area)
273 (defcfun gdk-window-freeze-updates :void
274 (window (g-object gdk-window)))
276 (export 'gdk-window-freeze-updates)
278 (defcfun gdk-window-thaw-updates :void
279 (window (g-object gdk-window)))
281 (export 'gdk-window-thaw-updates)
283 (defcfun gdk-window-process-all-updates :void)
285 (export 'gdk-window-process-all-updates)
287 (defcfun gdk-window-process-updates :void
288 (window (g-object gdk-window))
289 (update-children :boolean))
291 (export 'gdk-window-process-updates)
293 (defcfun gdk-window-set-debug-updates :void
294 (settings :boolean))
296 (export 'gdk-window-set-debug-updates)
298 (defcfun gdk_window_get_internal_paint_info :void
299 (window (g-object gdk-window))
300 (real-drawable (:pointer (g-object drawable)))
301 (x-offset (:pointer :int))
302 (y-offset (:pointer :int)))
304 (defun gdk-window-get-internal-paint-info (window)
305 (with-foreign-objects ((real-drawable :pointer) (x-offset :int) (y-offset :int))
306 (gdk_window_get_internal_paint_info window real-drawable x-offset y-offset)
307 (values (mem-ref real-drawable '(g-object drawable))
308 (mem-ref x-offset :int)
309 (mem-ref y-offset :int))))
311 (export 'gdk-window-get-internal-paint-info)
313 (defcfun gdk-window-enable-synchronized-configure :void
314 (window (g-object gdk-window)))
316 (export 'gdk-window-enable-synchronized-configure)
318 (defcfun gdk-window-configure-finished :void
319 (window (g-object gdk-window)))
321 (export 'gdk-window-configure-finished)
323 ;; void gdk_window_add_filter (GdkWindow *window,
324 ;; GdkFilterFunc function,
325 ;; gpointer data);
326 ;; void gdk_window_remove_filter (GdkWindow *window,
327 ;; GdkFilterFunc function,
328 ;; gpointer data);
329 ;; GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
330 ;; GdkEvent *event,
331 ;; gpointer data);
333 (defcfun gdk-window-shape-combine-mask :void
334 (window (g-object window))
335 (mask (g-object pixmap))
336 (x :int)
337 (y :int))
339 (export 'gdk-window-shape-combine-mask)
341 (defcfun gdk-window-shape-combine-region :void
342 (window (g-object window))
343 (region (g-boxed-foreign region))
344 (offset-x :int)
345 (offset-y :int))
347 (export 'gdk-window-shape-combine-region)
349 (defcfun gdk-window-set-child-shapes :void
350 (window (g-object gdk-window)))
352 (export 'gdk-window-set-child-shapes)
354 (defcfun gdk-window-merge-child-shapes :void
355 (window (g-object gdk-window)))
357 (export 'gdk-window-merge-child-shapes)
359 (defcfun gdk-window-input-shape-combine-mask :void
360 (window (g-object gdk-window))
361 (mask (g-object pixmap))
362 (x :int)
363 (y :int))
365 (export 'gdk-window-input-shape-combine-mask)
367 (defcfun gdk-window-input-shape-combine-region :void
368 (window (g-object gdk-window))
369 (shape-region (g-boxed-foreign region))
370 (offset-x :int)
371 (offset-y :int))
373 (export 'gdk-window-input-shape-combine-region)
375 (defcfun gdk-window-set-child-input-shapes :void
376 (window (g-object gdk-window)))
378 (export 'gdk-window-set-chid-input-shapes)
380 (defcfun gdk-window-merge-child-input-shapes :void
381 (window (g-object gdk-window)))
383 (export 'gdk-window-merge-child-input-shapes)
385 (defcfun gdk-window-set-static-gravities :boolean
386 (window (g-object gdk-window))
387 (use-static :boolean))
389 (export 'gdk-window-set-static-gravities)
391 ;; ignored:
392 ;; void gdk_window_set_hints (GdkWindow *window,
393 ;; gint x,
394 ;; gint y,
395 ;; gint min_width,
396 ;; gint min_height,
397 ;; gint max_width,
398 ;; gint max_height,
399 ;; gint flags);
401 (defcfun gdk-window-set-back-pixmap :void
402 (window (g-object gdk-window))
403 (pixmap (g-object pixmap))
404 (parent-relative :boolean))
406 (export 'gdk-window-set-back-pixmap)
408 (defcfun gdk_window_get_geometry :void
409 (window (g-object gdk-window))
410 (x (:pointer :int))
411 (y (:pointer :int))
412 (width (:pointer :int))
413 (height (:pointer :int))
414 (depth (:pointer :int)))
416 (defun gdk-window-get-geometry (window)
417 (with-foreign-objects ((x :int) (y :int) (width :int) (height :int) (depth :int))
418 (gdk_window_get_geometry window x y width height depth)
419 (values (mem-ref x :int)
420 (mem-ref y :int)
421 (mem-ref width :int)
422 (mem-ref height :int)
423 (mem-ref depth :int))))
425 (export 'gdk-window-get-geometry)
427 (defcfun gdk-window-set-geometry-hints :void
428 (window (g-object gdk-window))
429 (geometry (g-boxed-foreign geometry))
430 (geometry-mask gdk-window-hints))
432 (export 'gdk-window-set-geometry-hints)
434 (defcfun gdk_window_get_position :void
435 (window (g-object gdk-window))
436 (x (:pointer :int))
437 (y (:pointer :int)))
439 (defun gdk-window-get-position (window)
440 (with-foreign-objects ((x :int) (y :int))
441 (gdk_window_get_position window x y)
442 (values (mem-ref x :int) (mem-ref y :int))))
444 (export 'gdk-window-get-position)
446 (defcfun gdk_window_get_root_origin :void
447 (window (g-object gdk-window))
448 (x (:pointer :int))
449 (y (:pointer :int)))
451 (defun gdk-window-get-root-origin (window)
452 (with-foreign-objects ((x :int) (y :int))
453 (gdk_window_get_root_origin window x y)
454 (values (mem-ref x :int) (mem-ref y :int))))
456 (export 'gdk-window-get-root-origin)
458 (defcfun gdk_window_get_frame_extents :void
459 (window (g-object gdk-window))
460 (rectangle (g-boxed-foreign rectangle)))
462 (defun gdk-window-get-frame-extents (window)
463 (let ((rectangle (make-rectangle)))
464 (gdk_window_get_frame_extents window rectangle)
465 rectangle))
467 (export 'gdk-window-get-frame-extents)
469 (defcfun gdk_window_get_origin :int
470 (window (g-object gdk-window))
471 (x (:pointer :int))
472 (y (:pointer :int)))
474 (defun gdk-window-get-origin (window)
475 (with-foreign-objects ((x :int) (y :int))
476 (gdk_window_get_origin window x y)
477 (values (mem-ref x :int) (mem-ref y :int))))
479 (export 'gdk-window-get-origin)
481 ;; ignored
482 ;; gboolean gdk_window_get_deskrelative_origin (GdkWindow *window,
483 ;; gint *x,
484 ;; gint *y);
486 (defcfun gdk_window_get_root_coords :void
487 (window (g-object gdk-window))
488 (x :int)
489 (y :int)
490 (root-x :int)
491 (root-y :int))
493 (defun gdk-window-get-root-coords (window x y)
494 (with-foreign-objects ((root-x :int) (root-y :int))
495 (gdk_window_get_root_coords window x y root-x root-y)
496 (values (mem-ref root-x :int) (mem-ref root-y :int))))
498 (defcfun gdk_window_get_pointer (g-object gdk-window)
499 (window (g-object gdk-window))
500 (x (:pointer :int))
501 (y (:pointer :int))
502 (mask (:pointer modifier-type)))
504 (defun gdk-window-get-pointer (window)
505 (with-foreign-objects ((x :int) (y :int) (mask 'modifier-type))
506 (let ((w (gdk_window_get_pointer window x y mask)))
507 (values w
508 (mem-ref x :int)
509 (mem-ref y :int)
510 (mem-ref mask 'modifier-type)))))
512 (export 'gdk-window-get-pointer)
514 (defcfun gdk_window_get_decorations :boolean
515 (window (g-object gdk-window))
516 (decorations (:pointer gdk-w-m-decoration)))
518 (defun gdk-window-get-decorations (window)
519 (with-foreign-object (decorations 'gdk-w-m-decoration)
520 (gdk_window_get_decorations window decorations)
521 (mem-ref decorations 'gdk-w-m-decoration)))
523 (defcfun gdk-window-set-icon :void
524 (window (g-object gdk-window))
525 (icon-window (g-object gdk-window))
526 (pixmap (g-object pixmap))
527 (mask (g-object mask)))
529 (export 'gdk-window-set-icon)
531 ;; ignored
532 ;; GList * gdk_window_get_toplevels (void);
534 (defcfun gdk-get-default-root-window (g-object gdk-window))
536 (export 'gdk-get-default-root-window)
538 ;; TODO
539 ;; GdkPointerHooks;
540 ;; GdkPointerHooks * gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
542 (defcfun gdk-offscreen-window-get-pixmap (g-object pixmap)
543 (window (g-object gdk-window)))
545 (export 'gdk-offscreen-window-get-pixmap)
547 (defcfun (gdk-offscreen-window-embedder "gdk_offscreen_window_get_embedder") (g-object gdk-window)
548 (window (g-object gdk-window)))
550 (defcfun gdk_offscreen_window_set_embedder :void
551 (window (g-object gdk-window))
552 (embedder (g-object gdk-window)))
554 (defun (setf gdk-offscreen-window-embedder) (new-value window)
555 (gdk_offscreen_window_set_embedder window new-value))
557 (export 'gdk-offscreen-window-embedder)
559 (defcfun gdk-window-geometry-changed :void
560 (window (g-object gdk-window)))
562 (export 'gdk-window-geometry-changed)
564 (defcfun gdk-window-redirect-to-drawable :void
565 (window (g-object gdk-window))
566 (drawable (g-object drawable))
567 (src-x :int)
568 (src-y :int)
569 (dest-x :int)
570 (dest-y :int)
571 (width :int)
572 (height :int))
574 (export 'gdk-window-redirect-to-drawable)
576 (defcfun gdk-window-remove-redirection :void
577 (window (g-object gdk-window)))
579 (export 'gdk-window-remove-redirection)