From: Christian Dywan Date: Wed, 11 Nov 2009 19:06:52 +0000 (+0100) Subject: [gtk/gtkwindow] Added accessor for GTK_WINDOW ()->type X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=00d87c256345123f15a4ed1d394d1bdb74e64550;p=~andy%2Fgtk [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 --- diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index d5d3e05f3..41b6fa795 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 c1b1e2261..1582eaf48 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 1163fb893..98747b26a 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 69189714f..dc59dfe08 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;