Commit b24876a7 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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.
parent d0952240
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.
2005-10-04 Federico Mena Quintero <federico@ximian.com> 2005-10-04 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Take a * gtk/gtkfilechooserdefault.c (switch_to_shortcut): Take a
......
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.
2005-10-04 Federico Mena Quintero <federico@ximian.com> 2005-10-04 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Take a * gtk/gtkfilechooserdefault.c (switch_to_shortcut): Take a
......
...@@ -716,6 +716,10 @@ gtk_style_new (void) ...@@ -716,6 +716,10 @@ gtk_style_new (void)
* it to a particular visual and colormap. The process may * it to a particular visual and colormap. The process may
* involve the creation of a new style if the style has already * involve the creation of a new style if the style has already
* been attached to a window with a different style and colormap. * 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* GtkStyle*
gtk_style_attach (GtkStyle *style, gtk_style_attach (GtkStyle *style,
...@@ -792,10 +796,19 @@ gtk_style_attach (GtkStyle *style, ...@@ -792,10 +796,19 @@ gtk_style_attach (GtkStyle *style,
return new_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 void
gtk_style_detach (GtkStyle *style) gtk_style_detach (GtkStyle *style)
{ {
g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_IS_STYLE (style));
g_return_if_fail (style->attach_count > 0);
style->attach_count -= 1; style->attach_count -= 1;
if (style->attach_count == 0) if (style->attach_count == 0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment