[gtk+/gtk-style-context: 180/276] 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/276] GtkStyleContext: Add gtk_style_context_list_classes().
- Date: Sat, 23 Oct 2010 19:10:15 +0000 (UTC)
commit b4578fd9cfff930f0d54bdf3c0826645906f9a16
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]