From a6a7b8adcb7eb42aeb4a5db2ae7b6eb75a728338 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Mon, 25 Jan 2010 03:17:51 +0300 Subject: [PATCH] Hide new functions in Gdk-2.18 behind conditional read --- gdk/gdk.windows.lisp | 75 +++++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/gdk/gdk.windows.lisp b/gdk/gdk.windows.lisp index cba0f6c..f977692 100644 --- a/gdk/gdk.windows.lisp +++ b/gdk/gdk.windows.lisp @@ -118,9 +118,14 @@ (export 'gdk-window-move-region) -;; TODO: (because of >= 2.18) -;; void gdk_window_flush (GdkWindow *window); -;; gboolean gdk_window_ensure_native (GdkWindow *window); +#+gtk-2.18 +(progn + (defcfun gdk-window-flush :void + (window (g-object gdk-window))) + (export 'gdk-window-flush) + (defcfun gdk-window-ensure-native :void + (window (g-object gdk-window))) + (export 'gdk-window-ensure-native)) (defcfun gdk-window-reparent :void (window (g-object gdk-window)) @@ -163,14 +168,14 @@ (export 'gdk-window-lower) -#| +#+gtk-2.18 (defcfun gdk-window-restack :void (window (g-object gdk-window)) (sibling (g-object gdk-window)) (above :boolean)) +#+gtk-2.18 (export 'gdk-window-restack) -|# (defcfun gdk-window-focus :void (window (g-object gdk-window)) @@ -485,19 +490,21 @@ ;; gint *x, ;; gint *y); -#| -(defcfun gdk_window_get_root_coords :void - (window (g-object gdk-window)) - (x :int) - (y :int) - (root-x :int) - (root-y :int)) - -(defun gdk-window-get-root-coords (window x y) - (with-foreign-objects ((root-x :int) (root-y :int)) - (gdk_window_get_root_coords window x y root-x root-y) - (values (mem-ref root-x :int) (mem-ref root-y :int)))) -|# +#+gtk-2.18 +(progn + (defcfun gdk_window_get_root_coords :void + (window (g-object gdk-window)) + (x :int) + (y :int) + (root-x :int) + (root-y :int)) + + (defun gdk-window-get-root-coords (window x y) + (with-foreign-objects ((root-x :int) (root-y :int)) + (gdk_window_get_root_coords window x y root-x root-y) + (values (mem-ref root-x :int) (mem-ref root-y :int)))) + + (export 'gdk-window-get-root-coords)) (defcfun gdk_window_get_pointer (g-object gdk-window) (window (g-object gdk-window)) @@ -543,29 +550,29 @@ ;; GdkPointerHooks; ;; GdkPointerHooks * gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks); -#| -(defcfun gdk-offscreen-window-get-pixmap (g-object pixmap) - (window (g-object gdk-window))) +#+gtk-2.18 +(progn + (defcfun gdk-offscreen-window-get-pixmap (g-object pixmap) + (window (g-object gdk-window))) -(export 'gdk-offscreen-window-get-pixmap) + (export 'gdk-offscreen-window-get-pixmap) -(defcfun (gdk-offscreen-window-embedder "gdk_offscreen_window_get_embedder") (g-object gdk-window) - (window (g-object gdk-window))) + (defcfun (gdk-offscreen-window-embedder "gdk_offscreen_window_get_embedder") (g-object gdk-window) + (window (g-object gdk-window))) -(defcfun gdk_offscreen_window_set_embedder :void - (window (g-object gdk-window)) - (embedder (g-object gdk-window))) + (defcfun gdk_offscreen_window_set_embedder :void + (window (g-object gdk-window)) + (embedder (g-object gdk-window))) -(defun (setf gdk-offscreen-window-embedder) (new-value window) - (gdk_offscreen_window_set_embedder window new-value)) + (defun (setf gdk-offscreen-window-embedder) (new-value window) + (gdk_offscreen_window_set_embedder window new-value)) -(export 'gdk-offscreen-window-embedder) + (export 'gdk-offscreen-window-embedder) -(defcfun gdk-window-geometry-changed :void - (window (g-object gdk-window))) + (defcfun gdk-window-geometry-changed :void + (window (g-object gdk-window))) -(export 'gdk-window-geometry-changed) -|# + (export 'gdk-window-geometry-changed)) (defcfun gdk-window-redirect-to-drawable :void (window (g-object gdk-window)) -- 1.7.10.4