forked from AuroraMiddleware/gtk
win32: ported backend specific code to now backend specific API
This commit is contained in:
parent
cfeaba9d62
commit
a2b1da064a
@ -29,6 +29,7 @@
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkplug.h"
|
||||
#include "gtkplugprivate.h"
|
||||
#include "gtkwindowprivate.h"
|
||||
#include "gtkdebug.h"
|
||||
|
||||
#include "win32/gdkwin32.h"
|
||||
@ -211,7 +212,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
|
||||
/* Start of embedding protocol */
|
||||
|
||||
GTK_NOTE (PLUGSOCKET, g_printerr ("start of embedding\n"));
|
||||
priv->socket_window = gdk_window_lookup_for_display (display, (GdkNativeWindow) parent);
|
||||
priv->socket_window = gdk_win32_window_lookup_for_display (display, (GdkNativeWindow) parent);
|
||||
if (priv->socket_window)
|
||||
{
|
||||
gpointer user_data = NULL;
|
||||
@ -230,7 +231,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->socket_window = gdk_window_foreign_new_for_display (display, (GdkNativeWindow) parent);
|
||||
priv->socket_window = gdk_win32_window_foreign_new_for_display (display, (GdkNativeWindow) parent);
|
||||
if (!priv->socket_window) /* Already gone */
|
||||
break;
|
||||
}
|
||||
|
@ -40,6 +40,9 @@
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include "x11/gdkx.h"
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#include "win32/gdkwin32.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SECTION:gtkplug
|
||||
@ -546,6 +549,10 @@ gtk_plug_construct_for_display (GtkPlug *plug,
|
||||
if (GDK_IS_X11_DISPLAY (display))
|
||||
priv->socket_window = gdk_x11_window_foreign_new_for_display (display, socket_id);
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (GDK_IS_WIN32_DISPLAY (display))
|
||||
priv->socket_window = gdk_win32_window_foreign_new_for_display (display, socket_id);
|
||||
#endif
|
||||
|
||||
if (priv->socket_window) {
|
||||
g_signal_emit (plug, plug_signals[EMBEDDED], 0);
|
||||
|
@ -655,7 +655,7 @@ static HWND
|
||||
get_parent_hwnd (GtkWidget *widget)
|
||||
{
|
||||
gtk_widget_realize (widget);
|
||||
return gdk_win32_drawable_get_handle (gtk_widget_get_window (widget));
|
||||
return gdk_win32_window_get_handle (gtk_widget_get_window (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "gtkwin32embedwidget.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkwindowprivate.h"
|
||||
|
||||
|
||||
static void gtk_win32_embed_widget_realize (GtkWidget *widget);
|
||||
@ -95,12 +96,12 @@ _gtk_win32_embed_widget_new (GdkNativeWindow parent_id)
|
||||
embed_widget = g_object_new (GTK_TYPE_WIN32_EMBED_WIDGET, NULL);
|
||||
|
||||
embed_widget->parent_window =
|
||||
gdk_window_lookup_for_display (gdk_display_get_default (),
|
||||
parent_id);
|
||||
gdk_win32_window_lookup_for_display (gdk_display_get_default (),
|
||||
parent_id);
|
||||
|
||||
if (!embed_widget->parent_window)
|
||||
embed_widget->parent_window =
|
||||
gdk_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
gdk_win32_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
parent_id);
|
||||
|
||||
return GTK_WIDGET (embed_widget);
|
||||
@ -149,7 +150,8 @@ gtk_win32_embed_widget_window_process (HWND hwnd, UINT msg, WPARAM wparam, LPARA
|
||||
GtkWin32EmbedWidget *embed_widget;
|
||||
gpointer user_data;
|
||||
|
||||
window = gdk_window_lookup ((GdkNativeWindow)hwnd);
|
||||
window = gdk_win32_window_lookup_for_display (gdk_display_get_default (),
|
||||
(GdkNativeWindow)hwnd);
|
||||
if (window == NULL) {
|
||||
g_warning ("No such window!");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user