diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-10-05 13:23:21 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-10-05 13:23:21 +0000 |
commit | b24876a79ce8909036f76b5a66a7db88fbab8e41 (patch) | |
tree | b317e39ac474b83d94c4683c113be89ad543dbe4 /gtk/gtkstyle.c | |
parent | d0952240cbc7859af0722c508376b990d3cd3476 (diff) | |
download | gdk-pixbuf-b24876a79ce8909036f76b5a66a7db88fbab8e41.tar.gz |
Documentation improvements. (gtk_style_detach): Assert that the
2005-10-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkstyle.c (gtk_style_detach):
(gtk_style_attach): Documentation improvements.
(gtk_style_detach): Assert that the attach_count is > 0.
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 44a657308..8df20d2c8 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -716,6 +716,10 @@ gtk_style_new (void) * it to a particular visual and colormap. The process may * involve the creation of a new style if the style has already * been attached to a window with a different style and colormap. + * + * Since this function may return a new object, you have to use it + * in the following way: + * <literal>style = gtk_style_attach (style, window)</literal> **/ GtkStyle* gtk_style_attach (GtkStyle *style, @@ -792,10 +796,19 @@ gtk_style_attach (GtkStyle *style, return new_style; } +/** + * gtk_style_detach: + * @style: a #GtkStyle + * + * Detaches a style from a window. If the style is not attached + * to any windows anymore, it is unrealized. See gtk_style_attach(). + * + */ void gtk_style_detach (GtkStyle *style) { g_return_if_fail (GTK_IS_STYLE (style)); + g_return_if_fail (style->attach_count > 0); style->attach_count -= 1; if (style->attach_count == 0) |