[gtk+] plug/socket: Make GtkPlug and GtkSocket X11-specific



commit 3860af516c0119d93ccfa5c138f32e20e490c2a9
Author: Benjamin Otte <otte redhat com>
Date:   Fri Jan 28 10:47:34 2011 +0100

    plug/socket: Make GtkPlug and GtkSocket X11-specific
    
    People agreed that it doesn't make sense to make an xembed
    implementation like plug/socket does not make sense on anything but X11.
    And as GdkNativeWindow is going away for multibackend portability
    reasons, we'd either need API fixes in the plug-socket codee or
    constrain the widgets to a single backend. We chose the latter.

 gtk/Makefile.am |    4 ++--
 gtk/gtkplug.h   |    6 ++++++
 gtk/gtksocket.h |    6 ++++++
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 09060ac..80dc18f 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -579,7 +579,6 @@ gtk_base_c_sources = 		\
 	gtkpango.c		\
 	gtkpapersize.c		\
 	gtkpathbar.c		\
-	gtkplug.c		\
 	gtkprintcontext.c	\
 	gtkprintoperation.c	\
 	gtkprintoperationpreview.c \
@@ -615,7 +614,6 @@ gtk_base_c_sources = 		\
 	gtksizegroup.c		\
 	gtksizerequest.c	\
 	gtkshow.c		\
-	gtksocket.c		\
 	gtkspinbutton.c		\
 	gtkspinner.c		\
 	gtkstatusbar.c		\
@@ -725,7 +723,9 @@ gtk_c_sources += $(gtk_os_win32_c_sources)
 endif
 
 gtk_use_x11_c_sources = 	\
+	gtkplug.c		\
 	gtkplug-x11.c		\
+	gtksocket.c		\
 	gtksocket-x11.c		\
 	gtkxembed.c		\
 	gtktrayicon-x11.c	\
diff --git a/gtk/gtkplug.h b/gtk/gtkplug.h
index 679c065..d75850c 100644
--- a/gtk/gtkplug.h
+++ b/gtk/gtkplug.h
@@ -30,6 +30,10 @@
 #ifndef __GTK_PLUG_H__
 #define __GTK_PLUG_H__
 
+#include <gdk/gdk.h>
+
+#ifdef GDK_WINDOWING_X11
+
 
 #include <gtk/gtksocket.h>
 #include <gtk/gtkwindow.h>
@@ -98,4 +102,6 @@ void _gtk_plug_remove_from_socket (GtkPlug   *plug,
 
 G_END_DECLS
 
+#endif /* GDK_WINDOWING_X11 */
+
 #endif /* __GTK_PLUG_H__ */
diff --git a/gtk/gtksocket.h b/gtk/gtksocket.h
index 139d6a2..c823d50 100644
--- a/gtk/gtksocket.h
+++ b/gtk/gtksocket.h
@@ -30,6 +30,10 @@
 #ifndef __GTK_SOCKET_H__
 #define __GTK_SOCKET_H__
 
+#include <gdk/gdk.h>
+
+#ifdef GDK_WINDOWING_X11
+
 #include <gtk/gtkcontainer.h>
 
 G_BEGIN_DECLS
@@ -78,4 +82,6 @@ GdkWindow*      gtk_socket_get_plug_window (GtkSocket       *socket_);
 
 G_END_DECLS
 
+#endif /* GDK_WINDOWING_X11 */
+
 #endif /* __GTK_SOCKET_H__ */



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