[gtk/wip/baedert/for-master: 12/12] stylecontext: Remove _list_classes() from public API
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 12/12] stylecontext: Remove _list_classes() from public API
- Date: Sat, 25 Apr 2020 14:45:04 +0000 (UTC)
commit b335a6317967dceaa4da7a86167a0d1ca7b21289
Author: Timm Bäder <mail baedert org>
Date: Sat Apr 25 16:42:30 2020 +0200
stylecontext: Remove _list_classes() from public API
Applications can use gtk_widget_get_css_classes these days.
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkstylecontext.c | 28 ----------------------------
gtk/gtkstylecontext.h | 3 ---
3 files changed, 32 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 42a1f9b114..0691e69957 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4451,7 +4451,6 @@ gtk_style_context_save
gtk_style_context_add_class
gtk_style_context_remove_class
gtk_style_context_has_class
-gtk_style_context_list_classes
gtk_style_context_set_display
gtk_style_context_set_state
gtk_style_context_set_scale
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index d04741cd36..8463b93c0f 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -781,34 +781,6 @@ gtk_style_context_has_class (GtkStyleContext *context,
return gtk_css_node_has_class (priv->cssnode, class_quark);
}
-/**
- * gtk_style_context_list_classes:
- * @context: a #GtkStyleContext
- *
- * Returns the list of classes currently defined in @context.
- *
- * Returns: (transfer container) (element-type utf8): a #GList of
- * strings with the currently defined classes. The contents
- * of the list are owned by GTK+, but you must free the list
- * itself with g_list_free() when you are done with it.
- **/
-GList *
-gtk_style_context_list_classes (GtkStyleContext *context)
-{
- GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context);
- GList *classes_list = NULL;
- const GQuark *classes;
- guint n_classes, i;
-
- g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
-
- classes = gtk_css_node_list_classes (priv->cssnode, &n_classes);
- for (i = n_classes; i > 0; i--)
- classes_list = g_list_prepend (classes_list, (gchar *)g_quark_to_string (classes[i - 1]));
-
- return classes_list;
-}
-
GtkCssValue *
_gtk_style_context_peek_property (GtkStyleContext *context,
guint property_id)
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 6a310b5c3f..e6e7fcd81d 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -865,9 +865,6 @@ void gtk_style_context_set_scale (GtkStyleContext *context,
GDK_AVAILABLE_IN_ALL
gint gtk_style_context_get_scale (GtkStyleContext *context);
-GDK_AVAILABLE_IN_ALL
-GList * gtk_style_context_list_classes (GtkStyleContext *context);
-
GDK_AVAILABLE_IN_ALL
void gtk_style_context_add_class (GtkStyleContext *context,
const gchar *class_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]