[gtk+] [gtk/gtkwindow] Added accessor for GTK_WINDOW ()->type



commit 00d87c256345123f15a4ed1d394d1bdb74e64550
Author: Christian Dywan <christian lanedo com>
Date:   Wed Nov 11 20:06:52 2009 +0100

    [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

 docs/reference/gtk/gtk-sections.txt |    1 +
 gtk/gtk.symbols                     |    1 +
 gtk/gtkwindow.c                     |   18 ++++++++++++++++++
 gtk/gtkwindow.h                     |    2 ++
 4 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index d5d3e05..41b6fa7 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 c1b1e22..1582eaf 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 1163fb8..98747b2 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 6918971..dc59dfe 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]