From 8082fbc437eac27a2263e603d7e6e2883e6569d8 Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Mon, 10 Dec 2007 20:44:23 +0000 Subject: [PATCH] Install backend specific header (bug #405915). Also add a getter for the 2007-12-10 Richard Hult * gdk/quartz/Makefile.am: * gdk/quartz/gdkquartz.h: * gdk/quartz/gdkwindow-quartz.c: Install backend specific header (bug #405915). Also add a getter for the toplevel nswindow. svn path=/trunk/; revision=19151 --- ChangeLog | 7 +++++++ gdk/quartz/Makefile.am | 4 ++++ gdk/quartz/gdkquartz.h | 1 + gdk/quartz/gdkwindow-quartz.c | 14 ++++++++++++++ 4 files changed, 26 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0e3d5afa02..d9723ea36e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-10 Richard Hult + + * gdk/quartz/Makefile.am: + * gdk/quartz/gdkquartz.h: + * gdk/quartz/gdkwindow-quartz.c: Install backend specific + header (bug #405915). Also add a getter for the toplevel nswindow. + 2007-12-10 Richard Hult * gdk/quartz/gdkdrawable-quartz.c: diff --git a/gdk/quartz/Makefile.am b/gdk/quartz/Makefile.am index 6643d2b0eb..bbf7db58f8 100644 --- a/gdk/quartz/Makefile.am +++ b/gdk/quartz/Makefile.am @@ -52,3 +52,7 @@ libgdk_quartz_la_SOURCES = \ gdkwindow-quartz.c \ gdkwindow-quartz.h \ xcursors.h + +libgdkinclude_HEADERS = \ + gdkquartz.h + diff --git a/gdk/quartz/gdkquartz.h b/gdk/quartz/gdkquartz.h index 84a04c9724..0e6b5cf754 100644 --- a/gdk/quartz/gdkquartz.h +++ b/gdk/quartz/gdkquartz.h @@ -26,6 +26,7 @@ G_BEGIN_DECLS +NSWindow*gdk_quartz_window_get_nswindow (GdkWindow *window); NSView *gdk_quartz_window_get_nsview (GdkWindow *window); NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf); id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context); diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index 62719e0936..fba383374d 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -44,9 +44,23 @@ gdk_quartz_window_get_nsview (GdkWindow *window) { GdkWindowObject *private = (GdkWindowObject *)window; + if (GDK_WINDOW_DESTROYED (window)) + return NULL; + return ((GdkWindowImplQuartz *)private->impl)->view; } +NSWindow * +gdk_quartz_window_get_nswindow (GdkWindow *window) +{ + GdkWindowObject *private = (GdkWindowObject *)window; + + if (GDK_WINDOW_DESTROYED (window)) + return NULL; + + return ((GdkWindowImplQuartz *)private->impl)->toplevel; +} + static void gdk_window_impl_quartz_get_size (GdkDrawable *drawable, gint *width,