[gtkmm] Plug, Socket: Fix the build by using Window as ::Window.



commit e5f9af5aa0b5cba72f3648dd424d1b781f01c969
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Feb 1 10:36:20 2011 +0100

    Plug, Socket: Fix the build by using Window as ::Window.
    
    * gtk/src/plug.[hg|ccg]:
    * gtk/src/socket.hg: Include the namespacing-destroying gtkx.h and
    use ::Window when we mean the nasty X11 Window type.

 ChangeLog         |    8 ++++++++
 gtk/src/plug.ccg  |    4 ++--
 gtk/src/plug.hg   |   12 ++++++++----
 gtk/src/socket.hg |    8 +++++---
 4 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 012a1ad..3af5257 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-02-01  Murray Cumming  <murrayc murrayc com>
+
+	Plug, Socket: Fix the build by using Window as ::Window.
+	
+	* gtk/src/plug.[hg|ccg]:
+	* gtk/src/socket.hg: Include the namespacing-destroying gtkx.h and 
+	use ::Window when we mean the nasty X11 Window type.
+
 2011-02-01  Murray Cumming  <murrayc murrayc-desktop>
 
 	Display, Event: Remove ClientEvent methods. 
diff --git a/gtk/src/plug.ccg b/gtk/src/plug.ccg
index 23c0187..63207ad 100644
--- a/gtk/src/plug.ccg
+++ b/gtk/src/plug.ccg
@@ -32,14 +32,14 @@ Plug::Plug()
   gtk_plug_construct(gobj(), 0);
 }
 
-Plug::Plug(GdkNativeWindow socket_id)
+Plug::Plug(::Window socket_id)
 :
   _CONSTRUCT()
 {
   gtk_plug_construct(gobj(), socket_id);
 }
 
-Plug::Plug(const Glib::RefPtr<Gdk::Display>& display, GdkNativeWindow socket_id)
+Plug::Plug(const Glib::RefPtr<Gdk::Display>& display, ::Window socket_id)
 :
   _CONSTRUCT()
 {
diff --git a/gtk/src/plug.hg b/gtk/src/plug.hg
index ba7182a..b7daf21 100644
--- a/gtk/src/plug.hg
+++ b/gtk/src/plug.hg
@@ -18,13 +18,14 @@
  */
 
 #include <gtkmm/window.h>
+#include <gtk/gtkx.h> //Necessary for the X11 Window type.
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/window_p.h)
 
 namespace Gtk
 {
 
-//Note that Window is the (awfully named) type from the X11 header.
+//Note that Window (not Gtk::Window) is the (awfully named) type from the X11 header.
 //gtkx.h (needed to get GtkPlug and GtkSocket) pulls this in,
 //assuming that you will be careful when doing so.
   
@@ -37,10 +38,13 @@ class Plug : public Window
   _GTKMMPROC_WIN32_NO_WRAP
 public:
   Plug();
-  explicit Plug(Window socket_id);
-  Plug(const Glib::RefPtr<Gdk::Display>& display, Window socket_id);
+  
+#m4 _CONVERSION(`Window', `::Window', `($3)')
+#m4 _CONVERSION(`::Window', `Window', `($3)')
+  explicit Plug(::Window socket_id);
+  Plug(const Glib::RefPtr<Gdk::Display>& display, ::Window socket_id);
 
-  _WRAP_METHOD(Window get_id() const, gtk_plug_get_id)
+  _WRAP_METHOD(::Window get_id() const, gtk_plug_get_id)
 
   _WRAP_METHOD(bool get_embedded() const, gtk_plug_get_embedded)
 
diff --git a/gtk/src/socket.hg b/gtk/src/socket.hg
index 6c105b6..3bc5580 100644
--- a/gtk/src/socket.hg
+++ b/gtk/src/socket.hg
@@ -19,6 +19,7 @@
 
 #include <gtkmm/container.h>
 #include <gdkmm/types.h>
+#include <gtk/gtkx.h> //Necessary for the X11 Window type.
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
 
@@ -83,9 +84,10 @@ class Socket : public Container
 public:
   _CTOR_DEFAULT
   
-
-  _WRAP_METHOD(void add_id(Window window_id), gtk_socket_add_id)
-  _WRAP_METHOD(Window get_id() const, gtk_socket_get_id)
+#m4 _CONVERSION(`Window', `::Window', `($3)')
+#m4 _CONVERSION(`::Window', `Window', `($3)')
+  _WRAP_METHOD(void add_id(::Window window_id), gtk_socket_add_id)
+  _WRAP_METHOD(::Window get_id() const, gtk_socket_get_id)
 
   _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_plug_window(), gtk_socket_get_plug_window, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_plug_window() const, gtk_socket_get_plug_window, refreturn, constversion)



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