[gtk+/rendering-cleanup: 51/55] gdk: Make GdkWindow->impl a GdkWindowImpl



commit 8a5cbcef637e619b6820387bbf9e23e9c03ec235
Author: Benjamin Otte <otte redhat com>
Date:   Wed Nov 24 14:36:45 2010 +0100

    gdk: Make GdkWindow->impl a GdkWindowImpl

 gdk/gdkinternals.h      |    3 ++-
 gdk/gdkwindow.c         |   10 +++++-----
 gdk/x11/gdkwindow-x11.c |    8 ++------
 3 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 24b0956..7da2d83 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -32,6 +32,7 @@
 #include <gio/gio.h>
 #include <gdk/gdktypes.h>
 #include <gdk/gdkwindow.h>
+#include <gdk/gdkwindowimpl.h>
 #include <gdk/gdkprivate.h>
 
 G_BEGIN_DECLS
@@ -186,7 +187,7 @@ struct _GdkWindow
 {
   GObject parent_instance;
 
-  GdkDrawable *impl; /* window-system-specific delegate object */  
+  GdkWindowImpl *impl; /* window-system-specific delegate object */  
   
   GdkWindow *parent;
   GdkVisual *visual;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 75af905..2118f78 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1473,11 +1473,11 @@ is_parent_of (GdkWindow *parent,
 static void
 change_impl (GdkWindow *private,
 	     GdkWindow *impl_window,
-	     GdkDrawable *new)
+	     GdkWindowImpl *new)
 {
   GList *l;
   GdkWindow *child;
-  GdkDrawable *old_impl;
+  GdkWindowImpl *old_impl;
   GdkWindow *old_impl_window;
 
   old_impl = private->impl;
@@ -1777,7 +1777,7 @@ gboolean
 gdk_window_ensure_native (GdkWindow *window)
 {
   GdkWindow *impl_window;
-  GdkDrawable *new_impl, *old_impl;
+  GdkWindowImpl *new_impl, *old_impl;
   GdkScreen *screen;
   GdkWindow *above;
   GList listhead;
@@ -3398,7 +3398,7 @@ gdk_window_flush_if_exposing (GdkWindow *window)
 
 static void
 gdk_window_flush_recursive_helper (GdkWindow *window,
-				   GdkDrawable *impl)
+				   GdkWindowImpl *impl)
 {
   GdkWindow *child;
   GList *l;
@@ -6054,7 +6054,7 @@ move_native_children (GdkWindow *private)
 
 static gboolean
 collect_native_child_region_helper (GdkWindow *window,
-				    GdkDrawable *impl,
+				    GdkWindowImpl *impl,
 				    cairo_region_t **region,
 				    int x_offset,
 				    int y_offset)
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 3c090b6..25ba686 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -702,7 +702,7 @@ _gdk_window_impl_new (GdkWindow     *window,
   display_x11 = GDK_DISPLAY_X11 (GDK_SCREEN_DISPLAY (screen));
   
   impl = g_object_new (GDK_TYPE_WINDOW_IMPL_X11, NULL);
-  window->impl = (GdkDrawable *)impl;
+  window->impl = GDK_WINDOW_IMPL (impl);
   impl->wrapper = GDK_WINDOW (window);
   
   xdisplay = screen_x11->xdisplay;
@@ -5536,8 +5536,6 @@ gdk_x11_get_server_time (GdkWindow *window)
 XID
 gdk_x11_window_get_xid (GdkWindow *window)
 {
-  GdkDrawable *impl;
-      
   /* Try to ensure the window has a native window */
   if (!_gdk_window_has_impl (window))
     {
@@ -5556,9 +5554,7 @@ gdk_x11_window_get_xid (GdkWindow *window)
       return None;
     }
   
-  impl = window->impl;
-
-  return ((GdkWindowImplX11 *)impl)->xid;
+  return GDK_WINDOW_IMPL_X11 (window->impl)->xid;
 }
 
 static void



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