summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtk.symbols1
-rw-r--r--gtk/gtkplug.c16
-rw-r--r--gtk/gtkplug.h12
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
@@ -245,6 +245,22 @@ gtk_plug_get_id (GtkPlug *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
* @socket_: a #GtkSocket
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,