[gtk+] [gdk] Added GDK_GPOINTER_TO_NATIVE_WINDOW() macro



commit cd2ff792ca268c6e772bb40002a125a034654839
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Nov 10 20:09:18 2009 +0100

    [gdk] Added GDK_GPOINTER_TO_NATIVE_WINDOW() macro
    
    GdkNativeWindow cast is needed in 64-bit Windows so gpointer data
    is converted to a (64-bit) native window handle.
    GPOINTER_TO_UINT() is used in other platforms.

 gdk/gdktypes.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index ac8e443..506f35d 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -82,6 +82,12 @@ typedef struct _GdkAtom            *GdkAtom;
 #define GDK_ATOM_TO_POINTER(atom) (atom)
 #define GDK_POINTER_TO_ATOM(ptr)  ((GdkAtom)(ptr))
 
+#ifdef GDK_NATIVE_WINDOW_POINTER
+#define GDK_GPOINTER_TO_NATIVE_WINDOW(p) ((GdkNativeWindow) (p))
+#else
+#define GDK_GPOINTER_TO_NATIVE_WINDOW(p) GPOINTER_TO_UINT(p)
+#endif
+
 #define _GDK_MAKE_ATOM(val) ((GdkAtom)GUINT_TO_POINTER(val))
 #define GDK_NONE            _GDK_MAKE_ATOM (0)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]