[gtk+] Fix Win32 build
- From: Tor Lillqvist <tml src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix Win32 build
- Date: Sun, 29 Aug 2010 09:48:00 +0000 (UTC)
commit 87bf99dcc55153a618fce79c856a4653b5eb598c
Author: Tor Lillqvist <tml iki fi>
Date: Sun Aug 29 12:40:56 2010 +0300
Fix Win32 build
gdk/win32/gdkwindow-win32.c | 3 +-
gtk/gtk.symbols | 2 -
gtk/gtkfilechooserentry.c | 4 +-
gtk/gtkplug-win32.c | 74 +++++++++++++++++++++++++-----------------
4 files changed, 47 insertions(+), 36 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index ea2a04d..8680fb7 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -308,7 +308,6 @@ static ATOM
RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
{
static ATOM klassTOPLEVEL = 0;
- static ATOM klassDIALOG = 0;
static ATOM klassCHILD = 0;
static ATOM klassTEMP = 0;
static ATOM klassTEMPSHADOW = 0;
@@ -482,7 +481,7 @@ _gdk_window_impl_new (GdkWindow *window,
(attributes->window_type == GDK_WINDOW_TOPLEVEL ? "TOPLEVEL" :
(attributes->window_type == GDK_WINDOW_CHILD ? "CHILD" :
(attributes->window_type == GDK_WINDOW_TEMP ? "TEMP" :
- "???"))))));
+ "???")))));
hparent = GDK_WINDOW_HWND (real_parent);
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 01ed52b..5505b23 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -389,8 +389,6 @@ gtk_size_request_mode_get_type G_GNUC_CONST
gtk_sort_type_get_type G_GNUC_CONST
gtk_spin_type_get_type G_GNUC_CONST
gtk_state_type_get_type G_GNUC_CONST
-gtk_submenu_direction_get_type G_GNUC_CONST
-gtk_submenu_placement_get_type G_GNUC_CONST
gtk_target_flags_get_type G_GNUC_CONST
gtk_text_direction_get_type G_GNUC_CONST
gtk_text_buffer_target_info_get_type G_GNUC_CONST
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 4032bd8..1f91dc3 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -1727,7 +1727,7 @@ insert_text_callback (GtkFileChooserEntry *chooser_entry,
*position + (colon - new_text) != 1) ||
(new_text_length > 0 &&
*position <= 1 &&
- GTK_ENTRY (chooser_entry)->text_length >= 2 &&
+ gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)) >= 2 &&
gtk_entry_get_text (GTK_ENTRY (chooser_entry))[1] == ':'))
{
gtk_widget_error_bell (GTK_WIDGET (chooser_entry));
@@ -1746,7 +1746,7 @@ delete_text_callback (GtkFileChooserEntry *chooser_entry,
{
/* If deleting a drive letter, delete the colon, too */
if (start_pos == 0 && end_pos == 1 &&
- GTK_ENTRY (chooser_entry)->text_length >= 2 &&
+ gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)) >= 2 &&
gtk_entry_get_text (GTK_ENTRY (chooser_entry))[1] == ':')
{
g_signal_handlers_block_by_func (chooser_entry,
diff --git a/gtk/gtkplug-win32.c b/gtk/gtkplug-win32.c
index edcaaf4..435b78d 100644
--- a/gtk/gtkplug-win32.c
+++ b/gtk/gtkplug-win32.c
@@ -50,13 +50,15 @@ _gtk_plug_windowing_get_id (GtkPlug *plug)
void
_gtk_plug_windowing_realize_toplevel (GtkPlug *plug)
{
- if (plug->socket_window)
+ GtkPlugPrivate *priv = plug->priv;
+
+ if (priv->socket_window)
{
- _gtk_win32_embed_send (plug->socket_window,
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_PARENT_NOTIFY,
(WPARAM) GDK_WINDOW_HWND (GTK_WIDGET (plug)->window),
GTK_WIN32_EMBED_PROTOCOL_VERSION);
- _gtk_win32_embed_send (plug->socket_window,
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_EVENT_PLUG_MAPPED, 0, 0);
}
}
@@ -64,8 +66,10 @@ _gtk_plug_windowing_realize_toplevel (GtkPlug *plug)
void
_gtk_plug_windowing_map_toplevel (GtkPlug *plug)
{
- if (plug->socket_window)
- _gtk_win32_embed_send (plug->socket_window,
+ GtkPlugPrivate *priv = plug->priv;
+
+ if (priv->socket_window)
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_EVENT_PLUG_MAPPED,
1, 0);
}
@@ -73,8 +77,10 @@ _gtk_plug_windowing_map_toplevel (GtkPlug *plug)
void
_gtk_plug_windowing_unmap_toplevel (GtkPlug *plug)
{
- if (plug->socket_window)
- _gtk_win32_embed_send (plug->socket_window,
+ GtkPlugPrivate *priv = plug->priv;
+
+ if (priv->socket_window)
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_EVENT_PLUG_MAPPED,
0, 0);
}
@@ -82,8 +88,10 @@ _gtk_plug_windowing_unmap_toplevel (GtkPlug *plug)
void
_gtk_plug_windowing_set_focus (GtkPlug *plug)
{
- if (plug->socket_window)
- _gtk_win32_embed_send (plug->socket_window,
+ GtkPlugPrivate *priv = plug->priv;
+
+ if (priv->socket_window)
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_REQUEST_FOCUS,
0, 0);
}
@@ -93,8 +101,10 @@ _gtk_plug_windowing_add_grabbed_key (GtkPlug *plug,
guint accelerator_key,
GdkModifierType accelerator_mods)
{
- if (plug->socket_window)
- _gtk_win32_embed_send (plug->socket_window,
+ GtkPlugPrivate *priv = plug->priv;
+
+ if (priv->socket_window)
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_GRAB_KEY,
accelerator_key, accelerator_mods);
}
@@ -104,8 +114,10 @@ _gtk_plug_windowing_remove_grabbed_key (GtkPlug *plug,
guint accelerator_key,
GdkModifierType accelerator_mods)
{
- if (plug->socket_window)
- _gtk_win32_embed_send (plug->socket_window,
+ GtkPlugPrivate *priv = plug->priv;
+
+ if (priv->socket_window)
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_UNGRAB_KEY,
accelerator_key, accelerator_mods);
}
@@ -114,6 +126,7 @@ void
_gtk_plug_windowing_focus_to_parent (GtkPlug *plug,
GtkDirectionType direction)
{
+ GtkPlugPrivate *priv = plug->priv;
GtkWin32EmbedMessageType message = GTK_WIN32_EMBED_FOCUS_PREV;
switch (direction)
@@ -130,7 +143,7 @@ _gtk_plug_windowing_focus_to_parent (GtkPlug *plug,
break;
}
- _gtk_win32_embed_send_focus_message (plug->socket_window, message, 0);
+ _gtk_win32_embed_send_focus_message (priv->socket_window, message, 0);
}
GdkFilterReturn
@@ -139,6 +152,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
gpointer data)
{
GtkPlug *plug = GTK_PLUG (data);
+ GtkPlugPrivate *priv = plug->priv;
MSG *msg = (MSG *) gdk_xevent;
GdkFilterReturn return_val = GDK_FILTER_CONTINUE;
@@ -151,26 +165,26 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
* crashes in testsocket.
*/
case WM_WINDOWPOSCHANGED:
- if (!plug->same_app)
+ if (!priv->same_app)
{
HWND parent = GetAncestor (msg->hwnd, GA_PARENT);
- gboolean was_embedded = plug->socket_window != NULL;
+ gboolean was_embedded = priv->socket_window != NULL;
GdkScreen *screen = gdk_drawable_get_screen (event->any.window);
GdkDisplay *display = gdk_screen_get_display (screen);
- GTK_NOTE (PLUGSOCKET, g_printerr ("WM_WINDOWPOSCHANGED: hwnd=%p GA_PARENT=%p socket_window=%p\n", msg->hwnd, parent, plug->socket_window));
+ GTK_NOTE (PLUGSOCKET, g_printerr ("WM_WINDOWPOSCHANGED: hwnd=%p GA_PARENT=%p socket_window=%p\n", msg->hwnd, parent, priv->socket_window));
g_object_ref (plug);
if (was_embedded)
{
/* End of embedding protocol for previous socket */
- if (parent != GDK_WINDOW_HWND (plug->socket_window))
+ if (parent != GDK_WINDOW_HWND (priv->socket_window))
{
GtkWidget *widget = GTK_WIDGET (plug);
GTK_NOTE (PLUGSOCKET, g_printerr ("was_embedded, current parent != socket_window\n"));
- gdk_window_set_user_data (plug->socket_window, NULL);
- g_object_unref (plug->socket_window);
- plug->socket_window = NULL;
+ gdk_window_set_user_data (priv->socket_window, NULL);
+ g_object_unref (priv->socket_window);
+ priv->socket_window = NULL;
/* Emit a delete window, as if the user attempted to
* close the toplevel. Only do this if we are being
@@ -196,27 +210,27 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
/* Start of embedding protocol */
GTK_NOTE (PLUGSOCKET, g_printerr ("start of embedding\n"));
- plug->socket_window = gdk_window_lookup_for_display (display, (GdkNativeWindow) parent);
- if (plug->socket_window)
+ priv->socket_window = gdk_window_lookup_for_display (display, (GdkNativeWindow) parent);
+ if (priv->socket_window)
{
gpointer user_data = NULL;
GTK_NOTE (PLUGSOCKET, g_printerr ("already had socket_window\n"));
- gdk_window_get_user_data (plug->socket_window, &user_data);
+ gdk_window_get_user_data (priv->socket_window, &user_data);
if (user_data)
{
g_warning (G_STRLOC "Plug reparented unexpectedly into window in the same process");
- plug->socket_window = NULL;
+ priv->socket_window = NULL;
break;
}
- g_object_ref (plug->socket_window);
+ g_object_ref (priv->socket_window);
}
else
{
- plug->socket_window = gdk_window_foreign_new_for_display (display, (GdkNativeWindow) parent);
- if (!plug->socket_window) /* Already gone */
+ priv->socket_window = gdk_window_foreign_new_for_display (display, (GdkNativeWindow) parent);
+ if (!priv->socket_window) /* Already gone */
break;
}
@@ -231,9 +245,9 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
break;
case WM_SIZE:
- if (!plug->same_app && plug->socket_window)
+ if (!priv->same_app && priv->socket_window)
{
- _gtk_win32_embed_send (plug->socket_window,
+ _gtk_win32_embed_send (priv->socket_window,
GTK_WIN32_EMBED_PLUG_RESIZED,
0, 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]