From 7d5da3f8cc6a88002c610a6c558d494f0c2fe6c6 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Fri, 20 Jun 2008 11:08:51 +0000 Subject: [PATCH] Seal GtkPlug svn path=/trunk/; revision=20611 --- gtk/gtk.symbols | 1 + gtk/gtkplug.c | 16 ++++++++++++++++ gtk/gtkplug.h | 12 +++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index a0ed68a75d..60b69a9f06 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -2504,6 +2504,7 @@ gtk_pixmap_set_build_insensitive gtk_plug_construct gtk_plug_construct_for_display gtk_plug_get_id +gtk_plug_get_embedded gtk_plug_get_type G_GNUC_CONST gtk_plug_new gtk_plug_new_for_display diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index 1c07d72d32..9149be74fb 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -244,6 +244,22 @@ gtk_plug_get_id (GtkPlug *plug) return _gtk_plug_windowing_get_id (plug); } +/** + * gtk_plug_get_embedded: + * @plug: a #GtkPlug + * + * Determines whether the plug is embedded in a socket. + * + * Return value: %TRUE if the plug is embedded in a socket + **/ +gboolean +gtk_plug_get_embedded (GtkPlug *plug) +{ + g_return_val_if_fail (GTK_IS_PLUG (plug), NULL); + + return plug->socket_window != NULL; +} + /** * _gtk_plug_add_to_socket: * @plug: a #GtkPlug diff --git a/gtk/gtkplug.h b/gtk/gtkplug.h index 81532757c5..208e3a7799 100644 --- a/gtk/gtkplug.h +++ b/gtk/gtkplug.h @@ -54,12 +54,12 @@ struct _GtkPlug { GtkWindow window; - GdkWindow *socket_window; - GtkWidget *modality_window; - GtkWindowGroup *modality_group; - GHashTable *grabbed_keys; + GdkWindow *GSEAL (socket_window); + GtkWidget *GSEAL (modality_window); + GtkWindowGroup *GSEAL (modality_group); + GHashTable *GSEAL (grabbed_keys); - guint same_app : 1; + guint GSEAL (same_app : 1); }; struct _GtkPlugClass @@ -92,6 +92,8 @@ GtkWidget* gtk_plug_new_for_display (GdkDisplay *display, GdkNativeWindow gtk_plug_get_id (GtkPlug *plug); +gboolean gtk_plug_get_embedded (GtkPlug *plug); + void _gtk_plug_add_to_socket (GtkPlug *plug, GtkSocket *socket_); void _gtk_plug_remove_from_socket (GtkPlug *plug,