win32: Make GtkWin32EmbedWidget use HWND instead of GdkNativeWindow

This commit is contained in:
Benjamin Otte 2011-01-28 15:16:27 +01:00
parent 63aa56bcc4
commit 1b18916a74
3 changed files with 6 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);