summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dywan <christian@lanedo.com>2009-11-11 20:06:52 +0100
committerJavier Jardón <jjardon@gnome.org>2009-11-11 20:07:39 +0100
commit00d87c256345123f15a4ed1d394d1bdb74e64550 (patch)
treef9a53e92050eab40e1d155117bf10ed91332d0f8
parentecc3065f760616ecdd5a64bfebc98bf2885d5e10 (diff)
downloadgtk+-00d87c256345123f15a4ed1d394d1bdb74e64550.tar.gz
[gtk/gtkwindow] Added accessor for GTK_WINDOW ()->type
There already is the "type" property, but an accessor function for it would be intuitive: gtk_window_get_window_type() Fixes https://bugzilla.gnome.org/show_bug.cgi?id=595498
-rw-r--r--docs/reference/gtk/gtk-sections.txt1
-rw-r--r--gtk/gtk.symbols1
-rw-r--r--gtk/gtkwindow.c18
-rw-r--r--gtk/gtkwindow.h2
4 files changed, 22 insertions, 0 deletions
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index d5d3e05f3a..41b6fa795e 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -5744,6 +5744,7 @@ gtk_window_get_urgency_hint
gtk_window_get_accept_focus
gtk_window_get_focus_on_map
gtk_window_get_group
+gtk_window_get_window_type
gtk_window_move
gtk_window_parse_geometry
gtk_window_reshow_with_initial_size
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index c1b1e2261b..1582eaf48b 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -5198,6 +5198,7 @@ gtk_window_get_title
gtk_window_get_transient_for
gtk_window_get_type G_GNUC_CONST
gtk_window_get_type_hint
+gtk_window_get_window_type
gtk_window_group_add_window
gtk_window_group_get_type G_GNUC_CONST
gtk_window_group_new
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 1163fb8936..98747b26a8 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -8409,6 +8409,24 @@ gtk_window_set_auto_startup_notification (gboolean setting)
disable_startup_notification = !setting;
}
+/**
+ * gtk_window_get_window_type:
+ * @window: a #GtkWindow
+ *
+ * Gets the type of the window. See #GtkWindowType.
+ *
+ * Return value: the type of the window
+ *
+ * Since: 2.20
+ **/
+GtkWindowType
+gtk_window_get_window_type (GtkWindow *window)
+{
+ g_return_val_if_fail (GTK_IS_WINDOW (window), GTK_WINDOW_TOPLEVEL);
+
+ return window->type;
+}
+
#if defined (G_OS_WIN32) && !defined (_WIN64)
#undef gtk_window_set_icon_from_file
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 69189714fd..dc59dfe08a 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -385,6 +385,8 @@ GtkWindowGroup *gtk_window_get_group (GtkWindow *window);
/* Ignore this unless you are writing a GUI builder */
void gtk_window_reshow_with_initial_size (GtkWindow *window);
+GtkWindowType gtk_window_get_window_type (GtkWindow *window);
+
/* Window groups
*/
GType gtk_window_group_get_type (void) G_GNUC_CONST;