[gtk/wip/matthiasc/popup5] win32: Build fixes



commit 40a8fb50a8200aaef7e8bab08121f8ceed4e41e1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 19 03:09:05 2019 +0000

    win32: Build fixes

 gdk/win32/gdkcairocontext-win32.c |   8 +-
 gdk/win32/gdkdevice-virtual.c     |   2 +-
 gdk/win32/gdkdevice-win32.c       |   6 +-
 gdk/win32/gdkdevice-wintab.c      |   2 +-
 gdk/win32/gdkdisplay-win32.c      |   2 +-
 gdk/win32/gdkdrop-win32.c         |  16 +-
 gdk/win32/gdkevents-win32.c       | 109 +++++++------
 gdk/win32/gdkgeometry-win32.c     |  12 +-
 gdk/win32/gdkglcontext-win32.c    |   8 +-
 gdk/win32/gdkprivate-win32.h      |  13 +-
 gdk/win32/gdksurface-win32.c      | 312 +++++++++++++++++---------------------
 gdk/win32/gdksurface-win32.h      |  26 +---
 gdk/win32/gdkwin32misc.h          |   2 +-
 13 files changed, 236 insertions(+), 282 deletions(-)
---
diff --git a/gdk/win32/gdkcairocontext-win32.c b/gdk/win32/gdkcairocontext-win32.c
index c0bc2bb602..5ccc640774 100644
--- a/gdk/win32/gdkcairocontext-win32.c
+++ b/gdk/win32/gdkcairocontext-win32.c
@@ -37,7 +37,7 @@ gdk_win32_surface_get_queued_window_rect (GdkSurface *surface,
                                           RECT       *return_window_rect)
 {
   RECT window_rect;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
 
   _gdk_win32_get_window_client_area_rect (surface, scale, &window_rect);
 
@@ -78,7 +78,7 @@ gdk_win32_surface_apply_queued_move_resize (GdkSurface *surface,
 }
 
 static cairo_surface_t *
-create_cairo_surface_for_layered_window (GdkSurfaceImplWin32  *impl,
+create_cairo_surface_for_layered_window (GdkWin32Surface  *impl,
                                          gint                  width,
                                          gint                  height,
                                          gint                  scale)
@@ -143,14 +143,14 @@ gdk_win32_cairo_context_begin_frame (GdkDrawContext *draw_context,
 {
   GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
   GdkSurface *surface;
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
   int scale;
   cairo_t *cr;
   gint width, height;
   RECT queued_window_rect;
 
   surface = gdk_draw_context_get_surface (draw_context);
-  impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
+  impl = GDK_WIN32_SURFACE (surface);
   scale = gdk_surface_get_scale_factor (surface);
 
   self->layered = impl->layered;
diff --git a/gdk/win32/gdkdevice-virtual.c b/gdk/win32/gdkdevice-virtual.c
index c7e7bdb20e..3910f0bd39 100644
--- a/gdk/win32/gdkdevice-virtual.c
+++ b/gdk/win32/gdkdevice-virtual.c
@@ -109,7 +109,7 @@ gdk_device_virtual_set_surface_cursor (GdkDevice  *device,
   if (win32_hcursor != NULL)
     SetCursor (gdk_win32_hcursor_get_handle (win32_hcursor));
 
-  g_set_object (&GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor, win32_hcursor);
+  g_set_object (&GDK_WIN32_SURFACE (window)->cursor, win32_hcursor);
 }
 
 static void
diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c
index bea82f991f..573eb8ce10 100644
--- a/gdk/win32/gdkdevice-win32.c
+++ b/gdk/win32/gdkdevice-win32.c
@@ -106,7 +106,7 @@ gdk_device_win32_query_state (GdkDevice        *device,
 
   if (window)
     {
-      scale = GDK_SURFACE_IMPL_WIN32 (window->impl)->surface_scale;
+      scale = GDK_WIN32_SURFACE (window)->surface_scale;
       hwnd = GDK_SURFACE_HWND (window);
     }
   else
@@ -197,7 +197,7 @@ _gdk_device_win32_surface_at_position (GdkDevice       *device,
                                       gboolean         get_toplevel)
 {
   GdkSurface *window = NULL;
-  GdkSurfaceImplWin32 *impl = NULL;
+  GdkWin32Surface *impl = NULL;
   POINT screen_pt, client_pt;
   HWND hwnd, hwndc;
   RECT rect;
@@ -261,7 +261,7 @@ _gdk_device_win32_surface_at_position (GdkDevice       *device,
 
   if (window && (win_x || win_y))
     {
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       if (win_x)
         *win_x = client_pt.x / impl->surface_scale;
diff --git a/gdk/win32/gdkdevice-wintab.c b/gdk/win32/gdkdevice-wintab.c
index 873c05c21a..b5f03e3e76 100644
--- a/gdk/win32/gdkdevice-wintab.c
+++ b/gdk/win32/gdkdevice-wintab.c
@@ -117,7 +117,7 @@ gdk_device_wintab_query_state (GdkDevice        *device,
   device_wintab = GDK_DEVICE_WINTAB (device);
   if (window)
     {
-      scale = GDK_SURFACE_IMPL_WIN32 (window->impl)->surface_scale;
+      scale = GDK_WIN32_SURFACE (window)->surface_scale;
       hwnd = GDK_SURFACE_HWND (window);
     }
   else
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index bbfda32729..31567e37c7 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1116,7 +1116,7 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
 
   display_class->get_next_serial = gdk_win32_display_get_next_serial;
   display_class->notify_startup_complete = gdk_win32_display_notify_startup_complete;
-  display_class->create_surface_impl = _gdk_win32_display_create_surface_impl;
+  display_class->create_surface = _gdk_win32_display_create_surface;
 
   display_class->get_keymap = _gdk_win32_display_get_keymap;
   display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c
index 44dab15c19..6ad6615442 100644
--- a/gdk/win32/gdkdrop-win32.c
+++ b/gdk/win32/gdkdrop-win32.c
@@ -129,7 +129,7 @@ struct _drop_target_context
    * this surface remains the same.
    * This is not a reference, as drop_target_context must not
    * outlive the surface it's attached to.
-   * drop_target_context is not folded into GdkSurfaceImplWin32
+   * drop_target_context is not folded into GdkWin32Surface
    * only because it's easier to present it to COM as a separate
    * object when it's allocated separately.
    */
@@ -206,12 +206,12 @@ gdk_drop_new (GdkDisplay        *display,
 GdkDrop *
 _gdk_win32_get_drop_for_dest_surface (GdkSurface *dest)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
 
   if (dest == NULL)
     return NULL;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (dest->impl);
+  impl = GDK_WIN32_SURFACE (dest);
 
   if (impl->drop_target != NULL)
     return impl->drop_target->drop;
@@ -465,7 +465,7 @@ _gdk_win32_local_drop_target_dragenter (GdkDrag        *drag,
   GdkWin32Drop *drop_win32;
   GdkDisplay *display;
   GdkDragAction source_actions;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (dest_surface->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (dest_surface);
 
   GDK_NOTE (DND, g_print ("_gdk_win32_local_drop_target_dragenter %p @ %d : %d"
                           " for dest window 0x%p"
@@ -685,7 +685,7 @@ void
 _gdk_win32_local_drop_target_dragleave (GdkDrop *drop,
                                         guint32  time_)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (gdk_drop_get_surface (drop)->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (gdk_drop_get_surface (drop));
   GDK_NOTE (DND, g_print ("_gdk_win32_local_drop_target_dragleave %p\n", drop));
 
   gdk_drop_emit_leave_event (drop, TRUE, time_);
@@ -1156,7 +1156,7 @@ _gdk_win32_surface_register_dnd (GdkSurface *window)
     }
   else
     {
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
 
       /* Return if window is already setup for DND. */
       if (impl->drop_target != NULL)
@@ -1188,7 +1188,7 @@ _gdk_win32_surface_register_dnd (GdkSurface *window)
 void
 _gdk_win32_surface_unregister_dnd (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
 
   if (impl->drop_target)
     idroptarget_release (&impl->drop_target->idt);
@@ -1289,7 +1289,7 @@ gdk_win32_drop_read_async (GdkDrop             *drop,
       return;
     }
 
-  tctx = GDK_SURFACE_IMPL_WIN32 (gdk_drop_get_surface (drop)->impl)->drop_target;
+  tctx = GDK_WIN32_SURFACE (gdk_drop_get_surface (drop))->drop_target;
 
   if (tctx == NULL)
     {
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 5e1910534c..1da2701c45 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -991,7 +991,7 @@ apply_message_filters (GdkDisplay *display,
 static void
 show_window_recurse (GdkSurface *window, gboolean hide_window)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
   GSList *children = impl->transient_children;
   GdkSurface *child = NULL;
 
@@ -1040,7 +1040,7 @@ static void
 do_show_window (GdkSurface *window, gboolean hide_window)
 {
   GdkSurface *tmp_window = NULL;
-  GdkSurfaceImplWin32 *tmp_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *tmp_impl = GDK_WIN32_SURFACE (window);
 
   if (!tmp_impl->changing_state)
     {
@@ -1048,7 +1048,7 @@ do_show_window (GdkSurface *window, gboolean hide_window)
       while (tmp_impl->transient_owner != NULL)
        {
          tmp_window = tmp_impl->transient_owner;
-         tmp_impl = GDK_SURFACE_IMPL_WIN32 (tmp_window->impl);
+         tmp_impl = GDK_WIN32_SURFACE (tmp_window);
        }
 
       /* If we couldn't find one, use the window provided. */
@@ -1080,7 +1080,7 @@ send_crossing_event (GdkDisplay                 *display,
   GdkDeviceGrabInfo *grab;
   GdkDeviceManagerWin32 *device_manager;
   POINT pt;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
 
   device_manager = _gdk_device_manager;
 
@@ -1294,16 +1294,13 @@ synthesize_crossing_events (GdkDisplay                 *display,
  * TRUE otherwise.
  */
 gboolean
-_gdk_win32_get_window_rect (GdkSurface *window,
+_gdk_win32_get_window_rect (GdkSurface *surface,
                             RECT      *rect)
 {
-  GdkSurfaceImplWin32 *surface_impl;
   RECT client_rect;
   POINT point;
   HWND hwnd;
 
-  surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
-
   hwnd = GDK_SURFACE_HWND (window);
 
   GetClientRect (hwnd, &client_rect);
@@ -1314,8 +1311,8 @@ _gdk_win32_get_window_rect (GdkSurface *window,
   if (gdk_surface_get_parent (window) == NULL)
     {
       ClientToScreen (hwnd, &point);
-      point.x += _gdk_offset_x * surface_impl->surface_scale;
-      point.y += _gdk_offset_y * surface_impl->surface_scale;
+      point.x += _gdk_offset_x * surface->surface_scale;
+      point.y += _gdk_offset_y * surface->surface_scale;
     }
 
   rect->left = point.x;
@@ -1323,36 +1320,34 @@ _gdk_win32_get_window_rect (GdkSurface *window,
   rect->right = point.x + client_rect.right - client_rect.left;
   rect->bottom = point.y + client_rect.bottom - client_rect.top;
 
-  return !surface_impl->inhibit_configure;
+  return !surface->inhibit_configure;
 }
 
 void
-_gdk_win32_do_emit_configure_event (GdkSurface *window,
+_gdk_win32_do_emit_configure_event (GdkSurface *surface,
                                     RECT       rect)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
-
-  impl->unscaled_width = rect.right - rect.left;
-  impl->unscaled_height = rect.bottom - rect.top;
-  window->width = (impl->unscaled_width + impl->surface_scale - 1) / impl->surface_scale;
-  window->height = (impl->unscaled_height + impl->surface_scale - 1) / impl->surface_scale;
-  window->x = rect.left / impl->surface_scale;
-  window->y = rect.top / impl->surface_scale;
+  surface->unscaled_width = rect.right - rect.left;
+  surface->unscaled_height = rect.bottom - rect.top;
+  surface->width = (surface->unscaled_width + surface->surface_scale - 1) / surface->surface_scale;
+  surface->height = (surface->unscaled_height + surface->surface_scale - 1) / surface->surface_scale;
+  surface->x = rect.left / surface->surface_scale;
+  surface->y = rect.top / surface->surface_scale;
 
-  _gdk_surface_update_size (window);
+  _gdk_surface_update_size (surface);
 
-  g_signal_emit_by_name (window, "size-changed", window->width, window->height);
+  g_signal_emit_by_name (surface, "size-changed", surface->width, surface->height);
 }
 
 void
-_gdk_win32_emit_configure_event (GdkSurface *window)
+_gdk_win32_emit_configure_event (GdkSurface *surface)
 {
   RECT rect;
 
-  if (!_gdk_win32_get_window_rect (window, &rect))
+  if (!_gdk_win32_get_window_rect (surface, &rect))
     return;
 
-  _gdk_win32_do_emit_configure_event (window, rect);
+  _gdk_win32_do_emit_configure_event (surface, rect);
 }
 
 cairo_region_t *
@@ -1418,7 +1413,7 @@ handle_wm_paint (MSG        *msg,
   HDC hdc;
   PAINTSTRUCT paintstruct;
   cairo_region_t *update_region;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
 
   if (GetUpdateRgn (msg->hwnd, hrgn, FALSE) == ERROR)
     {
@@ -1523,7 +1518,7 @@ handle_nchittest (HWND hwnd,
                   gint *ret_valp)
 {
   RECT rect;
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
 
   if (window == NULL || window->input_shape == NULL)
     return FALSE;
@@ -1537,7 +1532,7 @@ handle_nchittest (HWND hwnd,
   if (!GetWindowRect (hwnd, &rect))
     return FALSE;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_WIN32_SURFACE (window);
   rect.left = screen_x - rect.left;
   rect.top = screen_y - rect.top;
 
@@ -1558,7 +1553,7 @@ static void
 handle_dpi_changed (GdkSurface *window,
                     MSG       *msg)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
   GdkDisplay *display = gdk_display_get_default ();
   GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display);
   RECT *rect = (RECT *)msg->lParam;
@@ -1611,7 +1606,7 @@ generate_button_event (GdkEventType      type,
 {
   GdkEvent *event = gdk_event_new (type);
   GdkDeviceManagerWin32 *device_manager;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
 
   if (_gdk_input_ignore_core > 0)
     return;
@@ -1674,7 +1669,7 @@ ensure_stacking_on_unminimize (MSG *msg)
        rover = GetNextWindow (rover, GW_HWNDNEXT))
     {
       GdkSurface *rover_gdkw = gdk_win32_handle_table_lookup (rover);
-      GdkSurfaceImplWin32 *rover_impl;
+      GdkWin32Surface *rover_impl;
       gboolean rover_ontop;
 
       /* Checking window group not implemented yet */
@@ -1682,7 +1677,7 @@ ensure_stacking_on_unminimize (MSG *msg)
         continue;
 
       rover_ontop = should_window_be_always_on_top (rover_gdkw);
-      rover_impl = GDK_SURFACE_IMPL_WIN32 (rover_gdkw->impl);
+      rover_impl = GDK_WIN32_SURFACE (rover_gdkw);
 
       if (GDK_SURFACE_IS_MAPPED (rover_gdkw) &&
           (rover_impl->type_hint == GDK_SURFACE_TYPE_HINT_UTILITY ||
@@ -1708,7 +1703,7 @@ static gboolean
 ensure_stacking_on_window_pos_changing (MSG       *msg,
                                        GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
   WINDOWPOS *windowpos = (WINDOWPOS *) msg->lParam;
   HWND rover;
   gboolean restacking;
@@ -1735,7 +1730,7 @@ ensure_stacking_on_window_pos_changing (MSG       *msg,
        rover = GetNextWindow (rover, GW_HWNDNEXT))
     {
       GdkSurface *rover_gdkw = gdk_win32_handle_table_lookup (rover);
-      GdkSurfaceImplWin32 *rover_impl;
+      GdkWin32Surface *rover_impl;
       gboolean rover_ontop;
 
       /* Checking window group not implemented yet */
@@ -1744,7 +1739,7 @@ ensure_stacking_on_window_pos_changing (MSG       *msg,
        continue;
 
       rover_ontop = should_window_be_always_on_top (rover_gdkw);
-      rover_impl = GDK_SURFACE_IMPL_WIN32 (rover_gdkw->impl);
+      rover_impl = GDK_WIN32_SURFACE (rover_gdkw);
 
       if (GDK_SURFACE_IS_MAPPED (rover_gdkw) &&
           (rover_impl->type_hint == GDK_SURFACE_TYPE_HINT_UTILITY ||
@@ -1772,7 +1767,7 @@ static void
 ensure_stacking_on_activate_app (MSG       *msg,
                                 GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
   HWND rover;
   gboolean window_ontop;
 
@@ -1803,7 +1798,7 @@ ensure_stacking_on_activate_app (MSG       *msg,
        rover = GetNextWindow (rover, GW_HWNDPREV))
     {
       GdkSurface *rover_gdkw = gdk_win32_handle_table_lookup (rover);
-      GdkSurfaceImplWin32 *rover_impl;
+      GdkWin32Surface *rover_impl;
       gboolean rover_ontop;
 
       /* Checking window group not implemented yet */
@@ -1811,7 +1806,7 @@ ensure_stacking_on_activate_app (MSG       *msg,
         continue;
 
       rover_ontop = should_window_be_always_on_top (rover_gdkw);
-      rover_impl = GDK_SURFACE_IMPL_WIN32 (rover_gdkw->impl);
+      rover_impl = GDK_WIN32_SURFACE (rover_gdkw);
 
       if (GDK_SURFACE_IS_MAPPED (rover_gdkw) &&
           (rover_impl->type_hint == GDK_SURFACE_TYPE_HINT_UTILITY ||
@@ -1832,11 +1827,11 @@ ensure_stacking_on_activate_app (MSG       *msg,
 static gboolean
 handle_wm_sysmenu (GdkSurface *window, MSG *msg, gint *ret_valp)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
   LONG_PTR style, tmp_style;
   LONG_PTR additional_styles;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_WIN32_SURFACE (window);
 
   style = GetWindowLongPtr (msg->hwnd, GWL_STYLE);
 
@@ -1907,13 +1902,13 @@ gboolean
 _gdk_win32_surface_fill_min_max_info (GdkSurface  *window,
                                      MINMAXINFO *mmi)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
   RECT rect;
 
   if (GDK_SURFACE_DESTROYED (window))
     return FALSE;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_WIN32_SURFACE (window);
 
   if (impl->hint_flags & GDK_HINT_MIN_SIZE)
     {
@@ -2035,7 +2030,7 @@ gdk_event_translate (MSG  *msg,
 
   GdkDisplay *display;
   GdkSurface *window = NULL;
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
   GdkWin32Display *win32_display;
 
   GdkSurface *new_window;
@@ -2190,7 +2185,7 @@ gdk_event_translate (MSG  *msg,
       if (GDK_SURFACE_DESTROYED (window))
        break;
 
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       API_CALL (GetKeyboardState, (key_state));
 
@@ -2517,7 +2512,7 @@ gdk_event_translate (MSG  *msg,
       generate_button_event (GDK_BUTTON_RELEASE, button,
                             window, msg);
 
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       /* End a drag op when the same button that started it is released */
       if (impl->drag_move_resize_context.op != GDK_WIN32_DRAGOP_NONE &&
@@ -2586,7 +2581,7 @@ gdk_event_translate (MSG  *msg,
        }
 
       g_set_object (&window, find_window_for_mouse_event (window, msg));
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       /* If we haven't moved, don't create any GDK event. Windows
        * sends WM_MOUSEMOVE messages after a new window is shows under
@@ -2720,7 +2715,7 @@ gdk_event_translate (MSG  *msg,
          g_set_object (&window, new_window);
        }
 
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
       ScreenToClient (msg->hwnd, &point);
 
       event = gdk_event_new (GDK_SCROLL);
@@ -2892,11 +2887,11 @@ gdk_event_translate (MSG  *msg,
 
       if (!return_val &&
           !GDK_SURFACE_DESTROYED (window) &&
-          GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor != NULL)
+          GDK_WIN32_SURFACE (window)->cursor != NULL)
         {
           win32_display = GDK_WIN32_DISPLAY (gdk_surface_get_display (window));
-          GDK_NOTE (EVENTS, g_print (" (window SetCursor(%p)", gdk_win32_hcursor_get_handle 
(GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor)));
-          SetCursor (gdk_win32_hcursor_get_handle (GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor));
+          GDK_NOTE (EVENTS, g_print (" (window SetCursor(%p)", gdk_win32_hcursor_get_handle 
(GDK_WIN32_SURFACE (window)->cursor)));
+          SetCursor (gdk_win32_hcursor_get_handle (GDK_WIN32_SURFACE (window)->cursor));
           return_val = TRUE;
           *ret_valp = TRUE;
         }
@@ -2908,7 +2903,7 @@ gdk_event_translate (MSG  *msg,
       break;
 
     case WM_INITMENU:
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       if (impl->have_temp_styles)
         {
@@ -2935,7 +2930,7 @@ gdk_event_translate (MSG  *msg,
          do_show_window (window, msg->wParam == SC_MINIMIZE ? TRUE : FALSE);
          break;
         case SC_MAXIMIZE:
-          impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+          impl = GDK_WIN32_SURFACE (window);
           impl->maximizing = TRUE;
          break;
        }
@@ -2993,7 +2988,7 @@ gdk_event_translate (MSG  *msg,
          _gdk_win32_end_modal_call (GDK_WIN32_MODAL_OP_SIZEMOVE_MASK);
        }
 
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       if (impl->drag_move_resize_context.op != GDK_WIN32_DRAGOP_NONE)
         gdk_win32_surface_end_move_resize_drag (window);
@@ -3016,7 +3011,7 @@ gdk_event_translate (MSG  *msg,
         {
          return_val = ensure_stacking_on_window_pos_changing (msg, window);
 
-          impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+          impl = GDK_WIN32_SURFACE (window);
 
           if (impl->maximizing)
             {
@@ -3117,7 +3112,7 @@ gdk_event_translate (MSG  *msg,
          !GDK_SURFACE_DESTROYED (window))
        {
          /* Make transient parent the forground window when window unmaps */
-         impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+         impl = GDK_WIN32_SURFACE (window);
 
          if (impl->transient_owner &&
              GetForegroundWindow () == GDK_SURFACE_HWND (window))
@@ -3156,7 +3151,7 @@ gdk_event_translate (MSG  *msg,
                                 _gdk_win32_rect_to_string (&rect),
                                 _gdk_win32_rect_to_string (drag)));
 
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
       orig_drag = *drag;
       if (impl->hint_flags & GDK_HINT_RESIZE_INC)
        {
@@ -3390,7 +3385,7 @@ gdk_event_translate (MSG  *msg,
 
       _gdk_win32_append_event (event);
 
-      impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      impl = GDK_WIN32_SURFACE (window);
 
       if (impl->transient_owner && GetForegroundWindow() == GDK_SURFACE_HWND (window))
        {
diff --git a/gdk/win32/gdkgeometry-win32.c b/gdk/win32/gdkgeometry-win32.c
index 7b386e66c3..904bfe448f 100644
--- a/gdk/win32/gdkgeometry-win32.c
+++ b/gdk/win32/gdkgeometry-win32.c
@@ -49,9 +49,9 @@ typedef struct _GdkSurfaceParentPos GdkSurfaceParentPos;
 static void
 tmp_unset_bg (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_WIN32_SURFACE (window);
 
   impl->no_bg = TRUE;
 }
@@ -59,9 +59,9 @@ tmp_unset_bg (GdkSurface *window)
 static void
 tmp_reset_bg (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_WIN32_SURFACE (window);
 
   impl->no_bg = FALSE;
 }
@@ -73,12 +73,12 @@ _gdk_surface_move_resize_child (GdkSurface *window,
                               gint       width,
                               gint       height)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
 
   g_return_if_fail (window != NULL);
   g_return_if_fail (GDK_IS_SURFACE (window));
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_WIN32_SURFACE (window);
   GDK_NOTE (MISC, g_print ("_gdk_surface_move_resize_child: %s@%+d%+d %dx%d@%+d%+d\n",
                           _gdk_win32_surface_description (window),
                           window->x, window->y, width, height, x, y));
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index f97dc67fc3..98a64a1f58 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -66,7 +66,7 @@ _gdk_win32_gl_context_dispose (GObject *gobject)
 
   if (surface != NULL && surface->impl != NULL)
     {
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
+      GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
 
       if (impl->suppress_layered > 0)
         impl->suppress_layered--;
@@ -166,11 +166,11 @@ gdk_win32_gl_context_begin_frame (GdkDrawContext *draw_context,
 {
   GdkGLContext *context = GDK_GL_CONTEXT (draw_context);
   GdkSurface *surface;
-  GdkSurfaceImplWin32 *impl;
+  GdkWin32Surface *impl;
   RECT queued_window_rect;
 
   surface = gdk_gl_context_get_surface (context);
-  impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
+  impl = GDK_WIN32_SURFACE (surface);
 
   gdk_win32_surface_get_queued_window_rect (surface,
                                             gdk_surface_get_scale_factor (surface),
@@ -667,7 +667,7 @@ gdk_win32_gl_context_realize (GdkGLContext *context,
   gint glver_minor = 0;
 
   GdkSurface *surface = gdk_gl_context_get_surface (context);
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
+  GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
   GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (gdk_surface_get_display (surface));
 
   if (!_set_pixformat_for_hdc (context_win32->gl_hdc,
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index 4f8a3e2f30..7ec3117886 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -126,8 +126,6 @@
 
 GdkWin32Screen *GDK_SURFACE_SCREEN(GObject *win);
 
-#define GDK_SURFACE_IS_WIN32(win)        (GDK_IS_SURFACE_IMPL_WIN32 (win->impl))
-
 /* Use this for hWndInsertAfter (2nd argument to SetWindowPos()) if
  * SWP_NOZORDER flag is used. Otherwise it's unobvious why a particular
  * argument is used. Using NULL is misleading, because
@@ -414,10 +412,13 @@ void       _gdk_win32_keymap_set_active_layout   (GdkWin32Keymap *keymap,
 
 GdkKeymap *_gdk_win32_display_get_keymap (GdkDisplay *display);
 
-void       _gdk_win32_display_create_surface_impl   (GdkDisplay    *display,
-                                                     GdkSurface     *window,
-                                                     GdkSurface     *real_parent,
-                                                     GdkSurfaceAttr *attributes);
+void       _gdk_win32_display_create_surface   (GdkDisplay    *display,
+                                                GdkSurfaceType type,
+                                                GdkSurface     *parent,
+                                                int             x,
+                                                int             y,
+                                                int             width,
+                                                int             height);
 
 /* stray GdkSurfaceImplWin32 members */
 void _gdk_win32_surface_register_dnd (GdkSurface *window);
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 9b62a34f38..74d7416111 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -29,7 +29,7 @@
 #include <stdlib.h>
 
 #include "gdk.h"
-#include "gdksurfaceimpl.h"
+#include "gdksurfaceprivate.h"
 #include "gdkprivate-win32.h"
 #include "gdkdeviceprivate.h"
 #include "gdkdevicemanager-win32.h"
@@ -48,9 +48,7 @@
 #include <math.h>
 #include "fallback-c89.c"
 
-static void gdk_surface_impl_win32_init       (GdkSurfaceImplWin32      *window);
-static void gdk_surface_impl_win32_class_init (GdkSurfaceImplWin32Class *klass);
-static void gdk_surface_impl_win32_finalize   (GObject                 *object);
+static void gdk_surface_win32_finalize (GObject *object);
 
 static gpointer parent_class = NULL;
 static GSList *modal_window_stack = NULL;
@@ -147,38 +145,10 @@ gdk_win32_surface_init (GdkWin32Surface *window)
 }
 
 
-G_DEFINE_TYPE (GdkSurfaceImplWin32, gdk_surface_impl_win32, GDK_TYPE_SURFACE_IMPL)
-
-GType
-_gdk_surface_impl_win32_get_type (void)
-{
-  static GType object_type = 0;
-
-  if (!object_type)
-    {
-      const GTypeInfo object_info =
-      {
-        sizeof (GdkSurfaceImplWin32Class),
-        (GBaseInitFunc) NULL,
-        (GBaseFinalizeFunc) NULL,
-        (GClassInitFunc) gdk_surface_impl_win32_class_init,
-        NULL,           /* class_finalize */
-        NULL,           /* class_data */
-        sizeof (GdkSurfaceImplWin32),
-        0,              /* n_preallocs */
-        (GInstanceInitFunc) gdk_surface_impl_win32_init,
-      };
-
-      object_type = g_type_register_static (GDK_TYPE_SURFACE_IMPL,
-                                            "GdkSurfaceImplWin32",
-                                            &object_info, 0);
-    }
-
-  return object_type;
-}
+G_DEFINE_TYPE (GdkSurfaceWin32, gdk_surface_win32, GDK_TYPE_SURFACE)
 
 static void
-gdk_surface_impl_win32_init (GdkSurfaceImplWin32 *impl)
+gdk_surface_win32_init (GdkSurfaceWin32 *impl)
 {
   impl->hicon_big = NULL;
   impl->hicon_small = NULL;
@@ -193,65 +163,65 @@ gdk_surface_impl_win32_init (GdkSurfaceImplWin32 *impl)
 
 
 static void
-gdk_surface_impl_win32_dispose (GObject *object)
+gdk_surface_win32_dispose (GObject *object)
 {
-  GdkSurfaceImplWin32 *surface_impl;
+  GdkSurfaceWin32 *surface;
 
-  g_return_if_fail (GDK_IS_SURFACE_IMPL_WIN32 (object));
+  g_return_if_fail (GDK_IS_SURFACE_WIN32 (object));
 
-  surface_impl = GDK_SURFACE_IMPL_WIN32 (object);
+  surface = GDK_SURFACE_WIN32 (object);
 
-  g_clear_object (&surface_impl->cursor);
+  g_clear_object (&surface->cursor);
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
 
 static void
-gdk_surface_impl_win32_finalize (GObject *object)
+gdk_surface_win32_finalize (GObject *object)
 {
   GdkSurface *wrapper;
-  GdkSurfaceImplWin32 *surface_impl;
+  GdkSurfaceWin32 *surface;
 
-  g_return_if_fail (GDK_IS_SURFACE_IMPL_WIN32 (object));
+  g_return_if_fail (GDK_IS_SURFACE_WIN32 (object));
 
-  surface_impl = GDK_SURFACE_IMPL_WIN32 (object);
+  surface = GDK_SURFACE_WIN32 (object);
 
-  wrapper = surface_impl->wrapper;
+  wrapper = surface->wrapper;
 
   if (!GDK_SURFACE_DESTROYED (wrapper))
     {
-      gdk_win32_handle_table_remove (surface_impl->handle);
+      gdk_win32_handle_table_remove (surface->handle);
     }
 
-  g_clear_pointer (&surface_impl->snap_stash, g_free);
-  g_clear_pointer (&surface_impl->snap_stash_int, g_free);
+  g_clear_pointer (&surface->snap_stash, g_free);
+  g_clear_pointer (&surface->snap_stash_int, g_free);
 
-  if (surface_impl->hicon_big != NULL)
+  if (surface->hicon_big != NULL)
     {
-      GDI_CALL (DestroyIcon, (surface_impl->hicon_big));
-      surface_impl->hicon_big = NULL;
+      GDI_CALL (DestroyIcon, (surface->hicon_big));
+      surface->hicon_big = NULL;
     }
 
-  if (surface_impl->hicon_small != NULL)
+  if (surface->hicon_small != NULL)
     {
-      GDI_CALL (DestroyIcon, (surface_impl->hicon_small));
-      surface_impl->hicon_small = NULL;
+      GDI_CALL (DestroyIcon, (surface->hicon_small));
+      surface->hicon_small = NULL;
     }
 
-  g_free (surface_impl->decorations);
+  g_free (surface->decorations);
 
-  if (surface_impl->cache_surface)
+  if (surface->cache_surface)
     {
-      cairo_surface_destroy (surface_impl->cache_surface);
-      surface_impl->cache_surface = NULL;
+      cairo_surface_destroy (surface->cache_surface);
+      surface->cache_surface = NULL;
     }
 
   _gdk_win32_surface_unregister_dnd (wrapper);
-  g_clear_object (&surface_impl->drop);
+  g_clear_object (&surface->drop);
 
-  g_assert (surface_impl->transient_owner == NULL);
-  g_assert (surface_impl->transient_children == NULL);
+  g_assert (surface->transient_owner == NULL);
+  g_assert (surface->transient_children == NULL);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -319,7 +289,7 @@ _gdk_win32_adjust_client_rect (GdkSurface *window,
 gboolean
 _gdk_win32_surface_enable_transparency (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   DWM_BLURBEHIND blur_behind;
   HRGN empty_region;
   HRESULT call_result;
@@ -328,7 +298,7 @@ _gdk_win32_surface_enable_transparency (GdkSurface *window)
   if (window == NULL || GDK_SURFACE_HWND (window) == NULL)
     return FALSE;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   /* layered windows don't need blurbehind for transparency */
   if (impl->layered)
@@ -524,7 +494,7 @@ RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
  * [1] http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00214.html
  */
 void
-_gdk_win32_display_create_surface_impl (GdkDisplay    *display,
+_gdk_win32_display_create_surface (GdkDisplay    *display,
                                       GdkSurface     *window,
                                       GdkSurface     *real_parent)
 {
@@ -533,7 +503,7 @@ _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
   ATOM klass = 0;
   DWORD dwStyle = 0, dwExStyle;
   RECT rect;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   GdkWin32Display *display_win32;
   const gchar *title;
   wchar_t *wtitle;
@@ -545,14 +515,14 @@ _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
   g_return_if_fail (display == _gdk_display);
 
   GDK_NOTE (MISC,
-            g_print ("_gdk_surface_impl_new: %s\n", (window->surface_type == GDK_SURFACE_TOPLEVEL ? 
"TOPLEVEL" :
+            g_print ("_gdk_surface_new: %s\n", (window->surface_type == GDK_SURFACE_TOPLEVEL ? "TOPLEVEL" :
                                                        (window->surface_type == GDK_SURFACE_TEMP ? "TEMP" : 
"???")));
 
   hparent = (real_parent != NULL) ? GDK_SURFACE_HWND (real_parent) : NULL;
 
-  impl = g_object_new (GDK_TYPE_SURFACE_IMPL_WIN32, NULL);
+  impl = g_object_new (GDK_TYPE_SURFACE_WIN32, NULL);
   impl->wrapper = GDK_SURFACE (window);
-  window->impl = GDK_SURFACE_IMPL (impl);
+  window->impl = GDK_SURFACE (impl);
 
   impl->layered = FALSE;
   impl->layered_opacity = 1.0;
@@ -724,7 +694,7 @@ gdk_win32_surface_destroy (GdkSurface *window,
                          gboolean   recursing,
                          gboolean   foreign_destroy)
 {
-  GdkSurfaceImplWin32 *surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *surface = GDK_SURFACE_WIN32 (window->impl);
   GSList *tmp;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
@@ -736,14 +706,14 @@ gdk_win32_surface_destroy (GdkSurface *window,
   _gdk_remove_modal_window (window);
 
   /* Remove all our transient children */
-  while (surface_impl->transient_children != NULL)
+  while (surface->transient_children != NULL)
     {
-      GdkSurface *child = surface_impl->transient_children->data;
+      GdkSurface *child = surface->transient_children->data;
       gdk_surface_set_transient_for (child, NULL);
     }
 
   /* Remove ourself from our transient owner */
-  if (surface_impl->transient_owner != NULL)
+  if (surface->transient_owner != NULL)
     {
       gdk_surface_set_transient_for (window, NULL);
     }
@@ -785,7 +755,7 @@ get_outer_rect (GdkSurface *window,
                gint       height,
                RECT      *rect)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   rect->left = rect->top = 0;
   rect->right = width * impl->surface_scale;
@@ -800,7 +770,7 @@ adjust_for_gravity_hints (GdkSurface *window,
                          gint          *x,
                          gint          *y)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (impl->hint_flags & GDK_HINT_WIN_GRAVITY)
     {
@@ -868,7 +838,7 @@ show_window_internal (GdkSurface *window,
                       gboolean   already_mapped,
                      gboolean   deiconify)
 {
-  GdkSurfaceImplWin32 *surface_impl;
+  GdkSurfaceWin32 *surface;
   gboolean focus_on_map = FALSE;
   DWORD exstyle;
 
@@ -940,19 +910,19 @@ show_window_internal (GdkSurface *window,
    * + Certain window types and hints have more elaborate positioning
    *   schemes.
    */
-  surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  surface = GDK_SURFACE_WIN32 (window->impl);
   if (!already_mapped &&
       GDK_SURFACE_TYPE (window) == GDK_SURFACE_TOPLEVEL &&
-      (surface_impl->hint_flags & (GDK_HINT_POS | GDK_HINT_USER_POS)) == 0)
+      (surface->hint_flags & (GDK_HINT_POS | GDK_HINT_USER_POS)) == 0)
     {
       gboolean center = FALSE;
       RECT window_rect, center_on_rect;
       int x, y;
 
-      x = surface_impl->initial_x;
-      y = surface_impl->initial_y;
+      x = surface->initial_x;
+      y = surface->initial_y;
 
-      if (surface_impl->type_hint == GDK_SURFACE_TYPE_HINT_SPLASHSCREEN)
+      if (surface->type_hint == GDK_SURFACE_TYPE_HINT_SPLASHSCREEN)
        {
          HMONITOR monitor;
          MONITORINFO mi;
@@ -970,15 +940,15 @@ show_window_internal (GdkSurface *window,
            }
          center = TRUE;
        }
-      else if (surface_impl->transient_owner != NULL &&
-              GDK_SURFACE_IS_MAPPED (surface_impl->transient_owner))
+      else if (surface->transient_owner != NULL &&
+              GDK_SURFACE_IS_MAPPED (surface->transient_owner))
        {
-         GdkSurface *owner = surface_impl->transient_owner;
+         GdkSurface *owner = surface->transient_owner;
          /* Center on transient parent */
-         center_on_rect.left = (owner->x - _gdk_offset_x) * surface_impl->surface_scale;
-         center_on_rect.top = (owner->y - _gdk_offset_y) * surface_impl->surface_scale;
-         center_on_rect.right = center_on_rect.left + owner->width * surface_impl->surface_scale;
-         center_on_rect.bottom = center_on_rect.top + owner->height * surface_impl->surface_scale;
+         center_on_rect.left = (owner->x - _gdk_offset_x) * surface->surface_scale;
+         center_on_rect.top = (owner->y - _gdk_offset_y) * surface->surface_scale;
+         center_on_rect.right = center_on_rect.left + owner->width * surface->surface_scale;
+         center_on_rect.bottom = center_on_rect.top + owner->height * surface->surface_scale;
 
          _gdk_win32_adjust_client_rect (GDK_SURFACE (owner), &center_on_rect);
          center = TRUE;
@@ -988,8 +958,8 @@ show_window_internal (GdkSurface *window,
        {
          window_rect.left = 0;
          window_rect.top = 0;
-         window_rect.right = window->width * surface_impl->surface_scale;
-         window_rect.bottom = window->height * surface_impl->surface_scale;
+         window_rect.right = window->width * surface->surface_scale;
+         window_rect.bottom = window->height * surface->surface_scale;
          _gdk_win32_adjust_client_rect (window, &window_rect);
 
          x = center_on_rect.left + ((center_on_rect.right - center_on_rect.left) - (window_rect.right - 
window_rect.left)) / 2;
@@ -1175,7 +1145,7 @@ gdk_win32_surface_move (GdkSurface *window,
   else
     {
       RECT outer_rect;
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
       get_outer_rect (window, window->width, window->height, &outer_rect);
 
@@ -1273,7 +1243,7 @@ gdk_win32_surface_move_resize_internal (GdkSurface *window,
   else
     {
       RECT outer_rect;
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
       get_outer_rect (window, width, height, &outer_rect);
 
@@ -1305,10 +1275,10 @@ gdk_win32_surface_move_resize (GdkSurface *window,
                              gint       width,
                              gint       height)
 {
-  GdkSurfaceImplWin32 *surface_impl;
+  GdkSurfaceWin32 *surface;
 
-  surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
-  surface_impl->inhibit_configure = TRUE;
+  surface = GDK_SURFACE_WIN32 (window->impl);
+  surface->inhibit_configure = TRUE;
 
   /* We ignore changes to the window being moved or resized by the
      user, as we don't want to fight the user */
@@ -1332,7 +1302,7 @@ gdk_win32_surface_move_resize (GdkSurface *window,
     }
 
  out:
-  surface_impl->inhibit_configure = FALSE;
+  surface->inhibit_configure = FALSE;
 
   _gdk_win32_emit_configure_event (window);
 }
@@ -1417,9 +1387,9 @@ static gboolean
 get_effective_window_decorations (GdkSurface       *window,
                                   GdkWMDecoration *decoration)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = (GdkSurfaceImplWin32 *)window->impl;
+  impl = (GdkSurfaceWin32 *)window->impl;
 
   if (gdk_surface_get_decorations (window, decoration))
     return TRUE;
@@ -1505,7 +1475,7 @@ gdk_win32_surface_set_geometry_hints (GdkSurface         *window,
                               const GdkGeometry *geometry,
                               GdkSurfaceHints     geom_mask)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   FullscreenInfo *fi;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
@@ -1516,7 +1486,7 @@ gdk_win32_surface_set_geometry_hints (GdkSurface         *window,
   GDK_NOTE (MISC, g_print ("gdk_surface_set_geometry_hints: %p\n",
                           GDK_SURFACE_HWND (window)));
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   fi = g_object_get_data (G_OBJECT (window), "fullscreen-info");
   if (fi)
@@ -1603,8 +1573,8 @@ gdk_win32_surface_set_transient_for (GdkSurface *window,
   HWND window_id, parent_id;
   LONG_PTR old_ptr;
   DWORD w32_error;
-  GdkSurfaceImplWin32 *surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
-  GdkSurfaceImplWin32 *parent_impl = NULL;
+  GdkSurfaceWin32 *surface = GDK_SURFACE_WIN32 (window->impl);
+  GdkSurfaceWin32 *parent_impl = NULL;
   GSList *item;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
@@ -1624,12 +1594,12 @@ gdk_win32_surface_set_transient_for (GdkSurface *window,
       return;
     }
 
-  if (surface_impl->transient_owner == parent)
+  if (surface->transient_owner == parent)
     return;
 
-  if (GDK_IS_SURFACE (surface_impl->transient_owner))
+  if (GDK_IS_SURFACE (surface->transient_owner))
     {
-      GdkSurfaceImplWin32 *trans_impl = GDK_SURFACE_IMPL_WIN32 (surface_impl->transient_owner->impl);
+      GdkSurfaceWin32 *trans_impl = GDK_SURFACE_WIN32 (surface->transient_owner->impl);
       item = g_slist_find (trans_impl->transient_children, window);
       item->data = NULL;
       trans_impl->transient_children = g_slist_delete_link (trans_impl->transient_children, item);
@@ -1640,20 +1610,20 @@ gdk_win32_surface_set_transient_for (GdkSurface *window,
           trans_impl->transient_children = NULL;
         }
 
-      g_object_unref (G_OBJECT (surface_impl->transient_owner));
+      g_object_unref (G_OBJECT (surface->transient_owner));
       g_object_unref (G_OBJECT (window));
 
-      surface_impl->transient_owner = NULL;
+      surface->transient_owner = NULL;
     }
 
   if (parent)
     {
-      parent_impl = GDK_SURFACE_IMPL_WIN32 (parent->impl);
+      parent_impl = GDK_SURFACE_WIN32 (parent->impl);
 
       parent_impl->transient_children = g_slist_append (parent_impl->transient_children, window);
       g_object_ref (G_OBJECT (window));
       parent_impl->num_transients++;
-      surface_impl->transient_owner = parent;
+      surface->transient_owner = parent;
       g_object_ref (G_OBJECT (parent));
     }
 
@@ -1756,7 +1726,7 @@ gdk_win32_surface_get_geometry (GdkSurface *window,
   if (!GDK_SURFACE_DESTROYED (window))
     {
       RECT rect;
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
       API_CALL (GetClientRect, (GDK_SURFACE_HWND (window), &rect));
 
@@ -1814,7 +1784,7 @@ gdk_win32_surface_get_root_coords (GdkSurface *window,
   gint tx;
   gint ty;
   POINT pt;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   pt.x = x * impl->surface_scale;
   pt.y = y * impl->surface_scale;
@@ -1849,7 +1819,7 @@ gdk_win32_surface_get_frame_extents (GdkSurface    *window,
 {
   HWND hwnd;
   RECT r;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
   g_return_if_fail (rect != NULL);
@@ -1868,7 +1838,7 @@ gdk_win32_surface_get_frame_extents (GdkSurface    *window,
   while (window->parent && window->parent->parent)
     window = window->parent;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
   hwnd = GDK_SURFACE_HWND (window);
   API_CALL (GetWindowRect, (hwnd, &r));
 
@@ -1945,14 +1915,14 @@ gdk_win32_surface_set_icon_list (GdkSurface *window,
   gint w, h;
   gint dw, dh, diff;
   HICON small_hicon, big_hicon;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
 
   if (GDK_SURFACE_DESTROYED (window) || textures == NULL)
     return;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   /* ideal sizes for small and large icons */
   big_w = GetSystemMetrics (SM_CXICON);
@@ -2070,14 +2040,14 @@ update_single_bit (LONG    *style,
 gboolean
 _gdk_win32_surface_lacks_wm_decorations (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   LONG style;
   gboolean has_any_decorations;
 
   if (GDK_SURFACE_DESTROYED (window))
     return FALSE;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   /* This is because GTK calls gdk_surface_set_decorations (window, 0),
    * even though GdkWMDecoration docs indicate that 0 does NOT mean
@@ -2122,7 +2092,7 @@ _gdk_win32_surface_lacks_wm_decorations (GdkSurface *window)
 void
 _gdk_win32_surface_update_style_bits (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl = (GdkSurfaceImplWin32 *)window->impl;
+  GdkSurfaceWin32 *impl = (GdkSurfaceWin32 *)window->impl;
   GdkWMDecoration decorations;
   LONG old_style, new_style, old_exstyle, new_exstyle;
   gboolean all;
@@ -2293,11 +2263,11 @@ static void
 gdk_win32_surface_set_decorations (GdkSurface      *window,
                                  GdkWMDecoration decorations)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   GDK_NOTE (MISC, g_print ("gdk_surface_set_decorations: %p: %s %s%s%s%s%s%s\n",
                           GDK_SURFACE_HWND (window),
@@ -2321,11 +2291,11 @@ static gboolean
 gdk_win32_surface_get_decorations (GdkSurface       *window,
                                  GdkWMDecoration *decorations)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_val_if_fail (GDK_IS_SURFACE (window), FALSE);
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (impl->decorations == NULL)
     return FALSE;
@@ -2407,7 +2377,7 @@ calculate_aerosnap_regions (GdkW32DragMoveResizeContext *context)
 {
   GdkDisplay *display;
   gint n_monitors, monitor_idx, other_monitor_idx;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (context->window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (context->window->impl);
 #if defined(MORE_AEROSNAP_DEBUGGING)
   gint i;
 #endif
@@ -2565,9 +2535,9 @@ calculate_aerosnap_regions (GdkW32DragMoveResizeContext *context)
 static void
 discard_snapinfo (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_UNDETERMINED;
 
@@ -2582,10 +2552,10 @@ static void
 unsnap (GdkSurface  *window,
         GdkMonitor *monitor)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   GdkRectangle rect;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_UNDETERMINED;
 
@@ -2657,7 +2627,7 @@ unsnap (GdkSurface  *window,
 
 static void
 stash_window (GdkSurface          *window,
-              GdkSurfaceImplWin32 *impl)
+              GdkSurfaceWin32 *impl)
 {
   gint x, y;
   gint width, wwidth;
@@ -2734,9 +2704,9 @@ snap_up (GdkSurface *window)
   SHORT maxysize;
   gint x, y;
   gint width, height;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_FULLUP;
 
@@ -2763,9 +2733,9 @@ snap_left (GdkSurface  *window,
            GdkMonitor *snap_monitor)
 {
   GdkRectangle rect;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_HALFLEFT;
 
@@ -2789,9 +2759,9 @@ snap_right (GdkSurface  *window,
             GdkMonitor *snap_monitor)
 {
   GdkRectangle rect;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_HALFRIGHT;
 
@@ -2814,7 +2784,7 @@ void
 _gdk_win32_surface_handle_aerosnap (GdkSurface            *window,
                                    GdkWin32AeroSnapCombo combo)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   GdkDisplay *display;
   gint n_monitors;
   GdkSurfaceState surface_state = gdk_surface_get_state (window);
@@ -2823,7 +2793,7 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface            *window,
   gboolean halfsnapped;
   GdkMonitor *monitor;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
   display = gdk_surface_get_display (window);
   n_monitors = gdk_display_get_n_monitors (display);
   monitor = gdk_display_get_monitor_at_surface (display, window);
@@ -3157,7 +3127,7 @@ draw_indicator (GdkW32DragMoveResizeContext *context,
   gdouble line_width;
   gdouble corner_radius;
   gint64 animation_duration;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (context->window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (context->window->impl);
 
   line_width = AEROSNAP_INDICATOR_LINE_WIDTH * impl->surface_scale;
   corner_radius = AEROSNAP_INDICATOR_CORNER_RADIUS;
@@ -3258,7 +3228,7 @@ redraw_indicator (gpointer user_data)
   POINT source_point = { 0, 0 };
   gboolean last_draw;
   gdouble indicator_opacity;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   gboolean do_source_remove = FALSE;
 
   indicator_opacity = AEROSNAP_INDICATOR_OPACITY;
@@ -3269,7 +3239,7 @@ redraw_indicator (gpointer user_data)
       do_source_remove = TRUE;
     }
 
-  impl = GDK_SURFACE_IMPL_WIN32 (context->window->impl);
+  impl = GDK_SURFACE_WIN32 (context->window->impl);
 
   if (!ensure_snap_indicator_surface (context,
                                       context->indicator_window_rect.width,
@@ -3408,7 +3378,7 @@ update_fullup_indicator (GdkSurface                   *window,
   SHORT maxysize;
   GdkRectangle from, to;
   GdkRectangle to_adjusted, from_adjusted, from_or_to;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   GDK_NOTE (MISC, g_print ("Update fullup indicator\n"));
 
@@ -3418,7 +3388,7 @@ update_fullup_indicator (GdkSurface                   *window,
   if (context->shape_indicator == NULL)
     return;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
   maxysize = GetSystemMetrics (SM_CYVIRTUALSCREEN);
   gdk_surface_get_position (window, &to.x, &to.y);
   to.width = gdk_surface_get_width (window);
@@ -3470,7 +3440,7 @@ start_indicator (GdkSurface                   *window,
   SHORT maxysize;
   GdkRectangle start_size, end_size;
   GdkDisplay *display;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   display = gdk_surface_get_display (window);
   monitor = gdk_display_get_monitor_at_point (display, x, y);
@@ -3816,7 +3786,7 @@ setup_drag_move_resize_context (GdkSurface                   *window,
   RECT rect;
   const gchar *cursor_name;
   GdkSurface *pointer_window;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
   gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
   gint root_x, root_y;
 
@@ -4102,7 +4072,7 @@ setup_drag_move_resize_context (GdkSurface                   *window,
 void
 gdk_win32_surface_end_move_resize_drag (GdkSurface *window)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
   GdkW32DragMoveResizeContext *context = &impl->drag_move_resize_context;
 
   context->op = GDK_WIN32_DRAGOP_NONE;
@@ -4160,9 +4130,9 @@ gdk_win32_get_window_size_and_position_from_client_rect (GdkSurface *window,
                                                          SIZE      *window_size,
                                                          POINT     *window_position)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   /* Turn client area into window area */
   _gdk_win32_adjust_client_rect (window, window_rect);
@@ -4193,9 +4163,9 @@ _gdk_win32_update_layered_window_from_cache (GdkSurface *surface,
   SIZE *window_size_ptr;
   POINT source_point = { 0, 0 };
   POINT *source_point_ptr;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
+  impl = GDK_SURFACE_WIN32 (surface->impl);
 
   gdk_win32_get_window_size_and_position_from_client_rect (surface,
                                                            client_rect,
@@ -4251,12 +4221,12 @@ gdk_win32_surface_do_move_resize_drag (GdkSurface *window,
   RECT new_rect;
   gint diffy, diffx;
   MINMAXINFO mmi;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
   GdkW32DragMoveResizeContext *context;
   gint width;
   gint height;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
   context = &impl->drag_move_resize_context;
 
   if (!_gdk_win32_get_window_rect (window, &rect))
@@ -4458,7 +4428,7 @@ gdk_win32_surface_begin_resize_drag (GdkSurface     *window,
                                     gint           y,
                                     guint32        timestamp)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
 
@@ -4476,7 +4446,7 @@ gdk_win32_surface_begin_resize_drag (GdkSurface     *window,
   if (button != 1)
     return;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (impl->drag_move_resize_context.op != GDK_WIN32_DRAGOP_NONE)
     gdk_win32_surface_end_move_resize_drag (window);
@@ -4494,7 +4464,7 @@ gdk_win32_surface_begin_move_drag (GdkSurface *window,
                                   gint       y,
                                   guint32    timestamp)
 {
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
 
@@ -4511,7 +4481,7 @@ gdk_win32_surface_begin_move_drag (GdkSurface *window,
   if (button != 1)
     return;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (impl->drag_move_resize_context.op != GDK_WIN32_DRAGOP_NONE)
     gdk_win32_surface_end_move_resize_drag (window);
@@ -4657,7 +4627,7 @@ gdk_win32_surface_fullscreen (GdkSurface *window)
     g_free (fi);
   else
     {
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
       monitor = MonitorFromWindow (GDK_SURFACE_HWND (window), MONITOR_DEFAULTTONEAREST);
       mi.cbSize = sizeof (mi);
@@ -4703,7 +4673,7 @@ gdk_win32_surface_unfullscreen (GdkSurface *window)
   fi = g_object_get_data (G_OBJECT (window), "fullscreen-info");
   if (fi)
     {
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+      GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
       gdk_synthesize_surface_state (window, GDK_SURFACE_STATE_FULLSCREEN, 0);
 
@@ -4856,7 +4826,7 @@ gdk_win32_surface_set_type_hint (GdkSurface        *window,
                       g_enum_get_value (class, hint)->value_name);
            }G_STMT_END);
 
-  ((GdkSurfaceImplWin32 *)window->impl)->type_hint = hint;
+  ((GdkSurfaceWin32 *)window->impl)->type_hint = hint;
 
   _gdk_win32_surface_update_style_bits (window);
 }
@@ -4869,7 +4839,7 @@ gdk_win32_surface_get_type_hint (GdkSurface *window)
   if (GDK_SURFACE_DESTROYED (window))
     return GDK_SURFACE_TYPE_HINT_NORMAL;
 
-  return GDK_SURFACE_IMPL_WIN32 (window->impl)->type_hint;
+  return GDK_SURFACE_WIN32 (window->impl)->type_hint;
 }
 
 GdkSurface *
@@ -4888,7 +4858,7 @@ gdk_win32_surface_set_opacity (GdkSurface *window,
   LONG exstyle;
   typedef BOOL (WINAPI *PFN_SetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
   PFN_SetLayeredWindowAttributes setLayeredWindowAttributes = NULL;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   g_return_if_fail (GDK_IS_SURFACE (window));
 
@@ -4900,7 +4870,7 @@ gdk_win32_surface_set_opacity (GdkSurface *window,
   else if (opacity > 1)
     opacity = 1;
 
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (impl->layered)
     {
@@ -4939,7 +4909,7 @@ gdk_win32_surface_set_opacity (GdkSurface *window,
 gboolean
 gdk_win32_surface_is_win32 (GdkSurface *window)
 {
-  return GDK_SURFACE_IS_WIN32 (window);
+  return GDK_IS_WIN32_SURFACE (window);
 }
 
 static gboolean
@@ -4948,7 +4918,7 @@ gdk_win32_surface_show_window_menu (GdkSurface *window,
 {
   double event_x, event_y;
   gint x, y;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   switch (event->any.type)
     {
@@ -4976,7 +4946,7 @@ gdk_win32_surface_show_window_menu (GdkSurface *window,
 HWND
 gdk_win32_surface_get_impl_hwnd (GdkSurface *window)
 {
-  if (GDK_SURFACE_IS_WIN32 (window))
+  if (GDK_IS_WIN32_SURFACE (window))
     return GDK_SURFACE_HWND (window);
   return NULL;
 }
@@ -4995,7 +4965,7 @@ GtkShowWindow (GdkSurface *window,
   BLENDFUNCTION blender;
 
   HWND hwnd = GDK_SURFACE_HWND (window);
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   switch (cmd_show)
     {
@@ -5073,7 +5043,7 @@ gdk_win32_surface_set_shadow_width (GdkSurface *window,
                                    gint       top,
                                    gint       bottom)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (GDK_SURFACE_DESTROYED (window))
     return;
@@ -5100,7 +5070,7 @@ gint
 _gdk_win32_surface_get_scale_factor (GdkSurface *window)
 {
   GdkDisplay *display;
-  GdkSurfaceImplWin32 *impl;
+  GdkSurfaceWin32 *impl;
 
   GdkWin32Display *win32_display;
 
@@ -5110,7 +5080,7 @@ _gdk_win32_surface_get_scale_factor (GdkSurface *window)
   g_return_val_if_fail (window != NULL, 1);
 
   display = gdk_surface_get_display (window);
-  impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  impl = GDK_SURFACE_WIN32 (window->impl);
 
   win32_display = GDK_WIN32_DISPLAY (display);
 
@@ -5149,7 +5119,7 @@ _gdk_win32_surface_get_unscaled_size (GdkSurface *window,
                                     gint      *unscaled_width,
                                     gint      *unscaled_height)
 {
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
+  GdkSurfaceWin32 *impl = GDK_SURFACE_WIN32 (window->impl);
 
   if (unscaled_width)
     *unscaled_width = impl->unscaled_width;
@@ -5169,15 +5139,15 @@ gdk_win32_input_shape_combine_region (GdkSurface            *window,
 }
 
 static void
-gdk_surface_impl_win32_class_init (GdkSurfaceImplWin32Class *klass)
+gdk_surface_win32_class_init (GdkSurfaceWin32Class *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  GdkSurfaceImplClass *impl_class = GDK_SURFACE_IMPL_CLASS (klass);
+  GdkSurfaceClass *impl_class = GDK_SURFACE_CLASS (klass);
 
   parent_class = g_type_class_peek_parent (klass);
 
-  object_class->dispose = gdk_surface_impl_win32_dispose;
-  object_class->finalize = gdk_surface_impl_win32_finalize;
+  object_class->dispose = gdk_surface_win32_dispose;
+  object_class->finalize = gdk_surface_win32_finalize;
 
   impl_class->show = gdk_win32_surface_show;
   impl_class->hide = gdk_win32_surface_hide;
@@ -5239,7 +5209,7 @@ gdk_surface_impl_win32_class_init (GdkSurfaceImplWin32Class *klass)
 HGDIOBJ
 gdk_win32_surface_get_handle (GdkSurface *window)
 {
-  if (!GDK_SURFACE_IS_WIN32 (window))
+  if (!GDK_IS_WIN32_SURFACE (window))
     {
       g_warning (G_STRLOC " window is not a native Win32 window");
       return NULL;
diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h
index 6caa0d2f25..7f774668e1 100644
--- a/gdk/win32/gdksurface-win32.h
+++ b/gdk/win32/gdksurface-win32.h
@@ -27,26 +27,14 @@
 
 #include "gdk/win32/gdkprivate-win32.h"
 #include "gdk/win32/gdkwin32cursor.h"
-#include "gdk/gdksurfaceimpl.h"
+#include "gdk/win32/gdkwin32surface.h"
+#include "gdk/gdksurfaceprivate.h"
 #include "gdk/gdkcursor.h"
 
 #include <windows.h>
 
 G_BEGIN_DECLS
 
-/* Window implementation for Win32
- */
-
-typedef struct _GdkSurfaceImplWin32 GdkSurfaceImplWin32;
-typedef struct _GdkSurfaceImplWin32Class GdkSurfaceImplWin32Class;
-
-#define GDK_TYPE_SURFACE_IMPL_WIN32              (_gdk_surface_impl_win32_get_type ())
-#define GDK_SURFACE_IMPL_WIN32(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), 
GDK_TYPE_SURFACE_IMPL_WIN32, GdkSurfaceImplWin32))
-#define GDK_SURFACE_IMPL_WIN32_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), 
GDK_TYPE_SURFACE_IMPL_WIN32, GdkSurfaceImplWin32Class))
-#define GDK_IS_SURFACE_IMPL_WIN32(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), 
GDK_TYPE_SURFACE_IMPL_WIN32))
-#define GDK_IS_SURFACE_IMPL_WIN32_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GDK_TYPE_SURFACE_IMPL_WIN32))
-#define GDK_SURFACE_IMPL_WIN32_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GDK_TYPE_SURFACE_IMPL_WIN32, GdkSurfaceImplWin32Class))
-
 enum _GdkWin32AeroSnapCombo
 {
   GDK_WIN32_AEROSNAP_COMBO_NOTHING = 0,
@@ -219,9 +207,9 @@ typedef struct _GdkW32DragMoveResizeContext GdkW32DragMoveResizeContext;
 /* defined in gdkdrop-win32.c */
 typedef struct _drop_target_context drop_target_context;
 
-struct _GdkSurfaceImplWin32
+struct _GdkWin32Surface
 {
-  GdkSurfaceImpl parent_instance;
+  GdkSurface parent_instance;
 
   GdkSurface *wrapper;
   HANDLE handle;
@@ -355,12 +343,12 @@ struct _GdkSurfaceImplWin32
   gint unscaled_height;
 };
 
-struct _GdkSurfaceImplWin32Class
+struct _GdkWin32SurfaceClass
 {
-  GdkSurfaceImplClass parent_class;
+  GdkSurfaceClass parent_class;
 };
 
-GType _gdk_surface_impl_win32_get_type (void);
+GType _gdk_win32_surface_get_type (void);
 
 void  _gdk_win32_surface_tmp_unset_bg  (GdkSurface *window,
                                         gboolean   recurse);
diff --git a/gdk/win32/gdkwin32misc.h b/gdk/win32/gdkwin32misc.h
index e8133f0748..5410c8edda 100644
--- a/gdk/win32/gdkwin32misc.h
+++ b/gdk/win32/gdkwin32misc.h
@@ -44,7 +44,7 @@ G_BEGIN_DECLS
 
 #include "gdkprivate-win32.h"
 
-#define GDK_SURFACE_HWND(win)          (GDK_SURFACE_IMPL_WIN32(win->impl)->handle)
+#define GDK_SURFACE_HWND(win)          (GDK_WIN32_SURFACE(win)->handle)
 #else
 /* definition for exported 'internals' go here */
 #define GDK_SURFACE_HWND(d) (gdk_win32_surface_get_handle (d))


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