[gtk+] win32: Make GtkWin32EmbedWidget use HWND instead of GdkNativeWindow



commit 1b18916a7472766d46f799d63ff52ff3c4e94165
Author: Benjamin Otte <otte redhat com>
Date:   Fri Jan 28 15:16:27 2011 +0100

    win32: Make GtkWin32EmbedWidget use HWND instead of GdkNativeWindow

 gtk/gtkprintoperation-win32.c |    2 +-
 gtk/gtkwin32embedwidget.c     |    9 ++++-----
 gtk/gtkwin32embedwidget.h     |    2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c
index 29550b7..008e7bd 100644
--- a/gtk/gtkprintoperation-win32.c
+++ b/gtk/gtkprintoperation-win32.c
@@ -1360,7 +1360,7 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
 
       SetWindowLongPtrW (wnd, GWLP_USERDATA, (LONG_PTR)op);
       
-      plug = _gtk_win32_embed_widget_new ((GdkNativeWindow) wnd);
+      plug = _gtk_win32_embed_widget_new (wnd);
       gtk_window_set_modal (GTK_WINDOW (plug), TRUE);
       op_win32->embed_widget = plug;
       gtk_container_add (GTK_CONTAINER (plug), op->priv->custom_widget);
diff --git a/gtk/gtkwin32embedwidget.c b/gtk/gtkwin32embedwidget.c
index 623e8d9..154b156 100644
--- a/gtk/gtkwin32embedwidget.c
+++ b/gtk/gtkwin32embedwidget.c
@@ -89,7 +89,7 @@ gtk_win32_embed_widget_init (GtkWin32EmbedWidget *embed_widget)
 }
 
 GtkWidget*
-_gtk_win32_embed_widget_new (GdkNativeWindow parent_id)
+_gtk_win32_embed_widget_new (HWND parent)
 {
   GtkWin32EmbedWidget *embed_widget;
 
@@ -97,12 +97,12 @@ _gtk_win32_embed_widget_new (GdkNativeWindow parent_id)
   
   embed_widget->parent_window =
     gdk_win32_window_lookup_for_display (gdk_display_get_default (),
-					 parent_id);
+					 parent);
   
   if (!embed_widget->parent_window)
     embed_widget->parent_window =
       gdk_win32_window_foreign_new_for_display (gdk_display_get_default (),
-					  parent_id);
+					  parent);
   
   return GTK_WIDGET (embed_widget);
 }
@@ -150,8 +150,7 @@ gtk_win32_embed_widget_window_process (HWND hwnd, UINT msg, WPARAM wparam, LPARA
   GtkWin32EmbedWidget *embed_widget;
   gpointer user_data;
 
-  window = gdk_win32_window_lookup_for_display (gdk_display_get_default (),
-						(GdkNativeWindow)hwnd);
+  window = gdk_win32_window_lookup_for_display (gdk_display_get_default (), hwnd);
   if (window == NULL) {
     g_warning ("No such window!");
     return 0;
diff --git a/gtk/gtkwin32embedwidget.h b/gtk/gtkwin32embedwidget.h
index 92515cf..19ff947 100644
--- a/gtk/gtkwin32embedwidget.h
+++ b/gtk/gtkwin32embedwidget.h
@@ -66,7 +66,7 @@ struct _GtkWin32EmbedWidgetClass
 
 
 GType      gtk_win32_embed_widget_get_type (void) G_GNUC_CONST;
-GtkWidget* _gtk_win32_embed_widget_new              (GdkNativeWindow  parent_id);
+GtkWidget* _gtk_win32_embed_widget_new              (HWND parent);
 BOOL       _gtk_win32_embed_widget_dialog_procedure (GtkWin32EmbedWidget *embed_widget,
 						     HWND wnd, UINT message, WPARAM wparam, LPARAM lparam);
 



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