[gtk+/gtk-style-context: 78/191] GtkStyleContext: Add gtk_style_context_list_child_classes().
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 78/191] GtkStyleContext: Add gtk_style_context_list_child_classes().
- Date: Tue, 17 Aug 2010 13:54:45 +0000 (UTC)
commit 4d9106530d900b88597e8f814ce0e3f79187a6b2
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 23 02:31:57 2010 +0200
GtkStyleContext: Add gtk_style_context_list_child_classes().
gtk/gtkstylecontext.c | 25 +++++++++++++++++++++++++
gtk/gtkstylecontext.h | 2 ++
2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index f8f6c08..c4401cc 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -473,6 +473,31 @@ child_style_class_compare (gconstpointer p1,
return (gint) c1->class_quark - c2->class_quark;
}
+GList *
+gtk_style_context_list_child_classes (GtkStyleContext *context)
+{
+ GtkStyleContextPrivate *priv;
+ GList *classes = NULL;
+ GList *link;
+
+ g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
+
+ priv = GTK_STYLE_CONTEXT_GET_PRIVATE (context);
+ link = priv->child_style_classes;
+
+ while (link)
+ {
+ GtkChildClass *link_class;
+
+ link_class = link->data;
+ classes = g_list_prepend (classes,
+ g_quark_to_string (link_class->class_quark));
+ link = link->next;
+ }
+
+ return classes;
+}
+
void
gtk_style_context_set_child_class (GtkStyleContext *context,
const gchar *class_name,
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index a9ddd75..2ef9ee1 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -84,6 +84,8 @@ void gtk_style_context_unset_class (GtkStyleContext *context,
gboolean gtk_style_context_has_class (GtkStyleContext *context,
const gchar *class_name);
+GList * gtk_style_context_list_child_classes (GtkStyleContext *context);
+
void gtk_style_context_set_child_class (GtkStyleContext *context,
const gchar *class_name,
GtkChildClassFlags flags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]