[gtk+/gtk-style-context: 180/260] GtkStyleContext: Add gtk_style_context_list_classes().
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 180/260] GtkStyleContext: Add gtk_style_context_list_classes().
- Date: Wed, 20 Oct 2010 10:36:33 +0000 (UTC)
commit 8ed64143dbdffa144035565ea2e3dc7e946bead6
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Aug 6 12:05:42 2010 +0200
GtkStyleContext: Add gtk_style_context_list_classes().
gtk/gtkstylecontext.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index cfe7a5e..647d090 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -845,6 +845,32 @@ gtk_style_context_has_class (GtkStyleContext *context,
}
GList *
+gtk_style_context_list_classes (GtkStyleContext *context)
+{
+ GtkStyleContextPrivate *priv;
+ GtkStyleInfo *info;
+ GList *classes = NULL;
+ guint i;
+
+ g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
+
+ priv = context->priv;
+
+ g_assert (priv->info_stack != NULL);
+ info = priv->info_stack->data;
+
+ for (i = 0; i < info->style_classes->len; i++)
+ {
+ GQuark quark;
+
+ quark = g_array_index (info->style_classes, GQuark, i);
+ classes = g_list_prepend (classes, (gchar *) g_quark_to_string (quark));
+ }
+
+ return classes;
+}
+
+GList *
gtk_style_context_list_regions (GtkStyleContext *context)
{
GtkStyleContextPrivate *priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]