[gtk/ebassi/new-a11y: 57/63] a11y: Consolidate the attributes container
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/new-a11y: 57/63] a11y: Consolidate the attributes container
- Date: Mon, 20 Jul 2020 12:11:15 +0000 (UTC)
commit 4bc4f50fac9aadd725b1ccaac1a441341822f31f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 17 12:49:59 2020 +0100
a11y: Consolidate the attributes container
While we have split the various attributes for convenience, there's no
reason why we should have specialised data types for the attributes
container object.
gtk/gtkaccessibleattributeset.c | 249 +++++++++++++++++++++++++++++++++
gtk/gtkaccessibleattributesetprivate.h | 57 ++++++++
gtk/gtkaccessiblepropertyset.c | 218 -----------------------------
gtk/gtkaccessiblepropertysetprivate.h | 49 -------
gtk/gtkaccessiblerelationset.c | 217 ----------------------------
gtk/gtkaccessiblerelationsetprivate.h | 49 -------
gtk/gtkaccessiblestateset.c | 207 ---------------------------
gtk/gtkaccessiblestatesetprivate.h | 49 -------
gtk/gtkatcontext.c | 124 +++++++++++-----
gtk/gtkatcontextprivate.h | 16 +--
gtk/gtktestatcontext.c | 12 +-
gtk/meson.build | 4 +-
12 files changed, 408 insertions(+), 843 deletions(-)
---
diff --git a/gtk/gtkaccessibleattributeset.c b/gtk/gtkaccessibleattributeset.c
new file mode 100644
index 0000000000..0a24a7f16d
--- /dev/null
+++ b/gtk/gtkaccessibleattributeset.c
@@ -0,0 +1,249 @@
+/* gtkaccessibleattributeset.c: Accessible attribute containt
+ *
+ * Copyright 2020 GNOME Foundation
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "gtkaccessibleattributesetprivate.h"
+
+#include "gtkbitmaskprivate.h"
+#include "gtkenums.h"
+
+struct _GtkAccessibleAttributeSet
+{
+ gsize n_attributes;
+
+ GtkAccessibleAttributeDefaultFunc default_func;
+
+ GtkBitmask *attributes_set;
+
+ char **attribute_names;
+ GtkAccessibleValue **attribute_values;
+};
+
+static GtkAccessibleAttributeSet *
+gtk_accessible_attribute_set_init (GtkAccessibleAttributeSet *self,
+ gsize n_attributes,
+ const char **attribute_names,
+ GtkAccessibleAttributeDefaultFunc default_func)
+{
+ self->n_attributes = n_attributes;
+ self->default_func = default_func;
+ self->attribute_names = g_new (char *, n_attributes);
+ self->attribute_values = g_new (GtkAccessibleValue *, n_attributes);
+ self->attributes_set = _gtk_bitmask_new ();
+
+ /* Initialize all attribute values, so we can always get the full attribute */
+ for (int i = 0; i < self->n_attributes; i++)
+ {
+ self->attribute_names[i] = g_strdup (attribute_names[i]);
+ self->attribute_values[i] = (* self->default_func) (i);
+ }
+
+ return self;
+}
+
+GtkAccessibleAttributeSet *
+gtk_accessible_attribute_set_new (gsize n_attributes,
+ const char **attribute_names,
+ GtkAccessibleAttributeDefaultFunc default_func)
+{
+ GtkAccessibleAttributeSet *set = g_rc_box_new0 (GtkAccessibleAttributeSet);
+
+ return gtk_accessible_attribute_set_init (set, n_attributes, attribute_names, default_func);
+}
+
+GtkAccessibleAttributeSet *
+gtk_accessible_attribute_set_ref (GtkAccessibleAttributeSet *self)
+{
+ g_return_val_if_fail (self != NULL, NULL);
+
+ return g_rc_box_acquire (self);
+}
+
+static void
+gtk_accessible_attribute_set_free (gpointer data)
+{
+ GtkAccessibleAttributeSet *self = data;
+
+ for (int i = 0; i < self->n_attributes; i++)
+ {
+ g_free (self->attribute_names[i]);
+
+ if (self->attribute_values[i] != NULL)
+ gtk_accessible_value_unref (self->attribute_values[i]);
+ }
+
+ g_free (self->attribute_names);
+ g_free (self->attribute_values);
+
+ _gtk_bitmask_free (self->attributes_set);
+}
+
+void
+gtk_accessible_attribute_set_unref (GtkAccessibleAttributeSet *self)
+{
+ g_rc_box_release_full (self, gtk_accessible_attribute_set_free);
+}
+
+/*< private >
+ * gtk_accessible_attribute_set_add:
+ * @self: a #GtkAccessibleAttributeSet
+ * @attribute: the attribute to set
+ * @value: (nullable): a #GtkAccessibleValue
+ *
+ * Adds @attribute to the attributes set, and sets its value.
+ *
+ * If @value is %NULL, the @attribute is reset to its default value.
+ *
+ * If you want to remove @attribute from the set, use gtk_accessible_attribute_set_remove()
+ * instead.
+ */
+void
+gtk_accessible_attribute_set_add (GtkAccessibleAttributeSet *self,
+ int attribute,
+ GtkAccessibleValue *value)
+{
+ g_return_if_fail (attribute >= 0 && attribute < self->n_attributes);
+
+ g_clear_pointer (&(self->attribute_values[attribute]), gtk_accessible_value_unref);
+
+ if (value != NULL)
+ self->attribute_values[attribute] = gtk_accessible_value_ref (value);
+ else
+ self->attribute_values[attribute] = (* self->default_func) (attribute);
+
+ self->attributes_set = _gtk_bitmask_set (self->attributes_set, attribute, TRUE);
+}
+
+void
+gtk_accessible_attribute_set_remove (GtkAccessibleAttributeSet *self,
+ int attribute)
+{
+ g_return_if_fail (attribute >= 0 && attribute < self->n_attributes);
+
+ g_clear_pointer (&(self->attribute_values[attribute]), gtk_accessible_value_unref);
+
+ self->attribute_values[attribute] = (* self->default_func) (attribute);
+ self->attributes_set = _gtk_bitmask_set (self->attributes_set, attribute, FALSE);
+}
+
+gboolean
+gtk_accessible_attribute_set_contains (GtkAccessibleAttributeSet *self,
+ int attribute)
+ {
+ g_return_val_if_fail (attribute >= 0 && attribute < self->n_attributes, FALSE);
+
+ return _gtk_bitmask_get (self->attributes_set, attribute);
+}
+
+/*< private >
+ * gtk_accessible_attribute_set_get_value:
+ * @self: a #GtkAccessibleAttributeSet
+ * @attribute: the attribute to retrieve
+ *
+ * Retrieves the value of the given @attribute in the set.
+ *
+ * Returns: (transfer none): the value for the attribute
+ */
+GtkAccessibleValue *
+gtk_accessible_attribute_set_get_value (GtkAccessibleAttributeSet *self,
+ int attribute)
+{
+ g_return_val_if_fail (attribute >= 0 && attribute < self->n_attributes, NULL);
+
+ return self->attribute_values[attribute];
+}
+
+gsize
+gtk_accessible_attribute_set_get_length (GtkAccessibleAttributeSet *self)
+{
+ return self->n_attributes;
+}
+
+guint
+gtk_accessible_attribute_set_get_changed (GtkAccessibleAttributeSet *self)
+{
+ guint changed = 0;
+
+ for (gsize i = 0; i < self->n_attributes; i++)
+ {
+ if (gtk_accessible_attribute_set_contains (self, i))
+ changed |= (1 << i);
+ }
+
+ return changed;
+}
+
+/*< private >
+ * gtk_accessible_attribute_set_print:
+ * @self: a #GtkAccessibleAttributeSet
+ * @only_set: %TRUE if only the set attributes should be printed
+ * @buffer: a #GString
+ *
+ * Prints the contents of the #GtkAccessibleAttributeSet into @buffer.
+ */
+void
+gtk_accessible_attribute_set_print (GtkAccessibleAttributeSet *self,
+ gboolean only_set,
+ GString *buffer)
+{
+ if (only_set && _gtk_bitmask_is_empty (self->attributes_set))
+ {
+ g_string_append (buffer, "{}");
+ return;
+ }
+
+ g_string_append (buffer, "{\n");
+
+ for (gsize i = 0; i < self->n_attributes; i++)
+ {
+ if (only_set && !_gtk_bitmask_get (self->attributes_set, i))
+ continue;
+
+ g_string_append (buffer, " ");
+ g_string_append (buffer, self->attribute_names[i]);
+ g_string_append (buffer, ": ");
+
+ gtk_accessible_value_print (self->attribute_values[i], buffer);
+
+ g_string_append (buffer, ",\n");
+ }
+
+ g_string_append (buffer, "}");
+}
+
+/*< private >
+ * gtk_accessible_attribute_set_to_string:
+ * @self: a #GtkAccessibleAttributeSet
+ *
+ * Prints the contents of a #GtkAccessibleAttributeSet into a string.
+ *
+ * Returns: (transfer full): a newly allocated string with the contents
+ * of the #GtkAccessibleAttributeSet
+ */
+char *
+gtk_accessible_attribute_set_to_string (GtkAccessibleAttributeSet *self)
+{
+ GString *buf = g_string_new (NULL);
+
+ gtk_accessible_attribute_set_print (self, TRUE, buf);
+
+ return g_string_free (buf, FALSE);
+}
diff --git a/gtk/gtkaccessibleattributesetprivate.h b/gtk/gtkaccessibleattributesetprivate.h
new file mode 100644
index 0000000000..57a1e63e35
--- /dev/null
+++ b/gtk/gtkaccessibleattributesetprivate.h
@@ -0,0 +1,57 @@
+/* gtkaccessibleattributesetprivate.h: Accessible attribute container
+ *
+ * Copyright 2020 GNOME Foundation
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "gtkaccessibleprivate.h"
+#include "gtkaccessiblevalueprivate.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GtkAccessibleAttributeSet GtkAccessibleAttributeSet;
+
+typedef GtkAccessibleValue *(* GtkAccessibleAttributeDefaultFunc) (int attribute);
+
+GtkAccessibleAttributeSet * gtk_accessible_attribute_set_new (gsize
n_attributes,
+ const char
**attr_names,
+
GtkAccessibleAttributeDefaultFunc default_func);
+GtkAccessibleAttributeSet * gtk_accessible_attribute_set_ref (GtkAccessibleAttributeSet
*self);
+void gtk_accessible_attribute_set_unref (GtkAccessibleAttributeSet
*self);
+
+gsize gtk_accessible_attribute_set_get_length (GtkAccessibleAttributeSet
*self);
+
+void gtk_accessible_attribute_set_add (GtkAccessibleAttributeSet
*self,
+ int
attribute,
+ GtkAccessibleValue
*value);
+void gtk_accessible_attribute_set_remove (GtkAccessibleAttributeSet
*self,
+ int
state);
+gboolean gtk_accessible_attribute_set_contains (GtkAccessibleAttributeSet
*self,
+ int
state);
+GtkAccessibleValue * gtk_accessible_attribute_set_get_value (GtkAccessibleAttributeSet
*self,
+ int
state);
+
+guint gtk_accessible_attribute_set_get_changed (GtkAccessibleAttributeSet
*self);
+
+void gtk_accessible_attribute_set_print (GtkAccessibleAttributeSet
*self,
+ gboolean
only_set,
+ GString
*string);
+char * gtk_accessible_attribute_set_to_string (GtkAccessibleAttributeSet
*self);
+
+G_END_DECLS
diff --git a/gtk/gtkatcontext.c b/gtk/gtkatcontext.c
index 6466678ad7..7ea1f1a6bb 100644
--- a/gtk/gtkatcontext.c
+++ b/gtk/gtkatcontext.c
@@ -56,9 +56,9 @@ gtk_at_context_finalize (GObject *gobject)
{
GtkATContext *self = GTK_AT_CONTEXT (gobject);
- gtk_accessible_property_set_unref (self->properties);
- gtk_accessible_relation_set_unref (self->relations);
- gtk_accessible_state_set_unref (self->states);
+ gtk_accessible_attribute_set_unref (self->properties);
+ gtk_accessible_attribute_set_unref (self->relations);
+ gtk_accessible_attribute_set_unref (self->states);
G_OBJECT_CLASS (gtk_at_context_parent_class)->finalize (gobject);
}
@@ -114,9 +114,9 @@ gtk_at_context_real_state_change (GtkATContext *self,
GtkAccessibleStateChange changed_states,
GtkAccessiblePropertyChange changed_properties,
GtkAccessibleRelationChange changed_relations,
- GtkAccessibleStateSet *states,
- GtkAccessiblePropertySet *properties,
- GtkAccessibleRelationSet *relations)
+ GtkAccessibleAttributeSet *states,
+ GtkAccessibleAttributeSet *properties,
+ GtkAccessibleAttributeSet *relations)
{
}
@@ -166,14 +166,81 @@ gtk_at_context_class_init (GtkATContextClass *klass)
g_object_class_install_properties (gobject_class, N_PROPS, obj_props);
}
+#define N_PROPERTIES (GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT + 1)
+#define N_RELATIONS (GTK_ACCESSIBLE_RELATION_SET_SIZE + 1)
+#define N_STATES (GTK_ACCESSIBLE_STATE_SELECTED + 1)
+
+static const char *property_attrs[] = {
+ [GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE] = "autocomplete",
+ [GTK_ACCESSIBLE_PROPERTY_DESCRIPTION] = "description",
+ [GTK_ACCESSIBLE_PROPERTY_HAS_POPUP] = "haspopup",
+ [GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS] = "keyshortcuts",
+ [GTK_ACCESSIBLE_PROPERTY_LABEL] = "label",
+ [GTK_ACCESSIBLE_PROPERTY_LEVEL] = "level",
+ [GTK_ACCESSIBLE_PROPERTY_MODAL] = "modal",
+ [GTK_ACCESSIBLE_PROPERTY_MULTI_LINE] = "multiline",
+ [GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE] = "multiselectable",
+ [GTK_ACCESSIBLE_PROPERTY_ORIENTATION] = "orientation",
+ [GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER] = "placeholder",
+ [GTK_ACCESSIBLE_PROPERTY_READ_ONLY] = "readonly",
+ [GTK_ACCESSIBLE_PROPERTY_REQUIRED] = "required",
+ [GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION] = "roledescription",
+ [GTK_ACCESSIBLE_PROPERTY_SORT] = "sort",
+ [GTK_ACCESSIBLE_PROPERTY_VALUE_MAX] = "valuemax",
+ [GTK_ACCESSIBLE_PROPERTY_VALUE_MIN] = "valuemin",
+ [GTK_ACCESSIBLE_PROPERTY_VALUE_NOW] = "valuenow",
+ [GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT] = "valuetext",
+};
+
+static const char *relation_attrs[] = {
+ [GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT] = "activedescendant",
+ [GTK_ACCESSIBLE_RELATION_COL_COUNT] = "colcount",
+ [GTK_ACCESSIBLE_RELATION_COL_INDEX] = "colindex",
+ [GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT] = "colindextext",
+ [GTK_ACCESSIBLE_RELATION_COL_SPAN] = "colspan",
+ [GTK_ACCESSIBLE_RELATION_CONTROLS] = "controls",
+ [GTK_ACCESSIBLE_RELATION_DESCRIBED_BY] = "describedby",
+ [GTK_ACCESSIBLE_RELATION_DETAILS] = "details",
+ [GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE] = "errormessage",
+ [GTK_ACCESSIBLE_RELATION_FLOW_TO] = "flowto",
+ [GTK_ACCESSIBLE_RELATION_LABELLED_BY] = "labelledby",
+ [GTK_ACCESSIBLE_RELATION_OWNS] = "owns",
+ [GTK_ACCESSIBLE_RELATION_POS_IN_SET] = "posinset",
+ [GTK_ACCESSIBLE_RELATION_ROW_COUNT] = "rowcount",
+ [GTK_ACCESSIBLE_RELATION_ROW_INDEX] = "rowindex",
+ [GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT] = "rowindextext",
+ [GTK_ACCESSIBLE_RELATION_ROW_SPAN] = "rowspan",
+ [GTK_ACCESSIBLE_RELATION_SET_SIZE] = "setsize",
+};
+
+static const char *state_attrs[] = {
+ [GTK_ACCESSIBLE_STATE_BUSY] = "busy",
+ [GTK_ACCESSIBLE_STATE_CHECKED] = "checked",
+ [GTK_ACCESSIBLE_STATE_DISABLED] = "disabled",
+ [GTK_ACCESSIBLE_STATE_EXPANDED] = "expanded",
+ [GTK_ACCESSIBLE_STATE_HIDDEN] = "hidden",
+ [GTK_ACCESSIBLE_STATE_INVALID] = "invalid",
+ [GTK_ACCESSIBLE_STATE_PRESSED] = "pressed",
+ [GTK_ACCESSIBLE_STATE_SELECTED] = "selected",
+};
+
static void
gtk_at_context_init (GtkATContext *self)
{
self->accessible_role = GTK_ACCESSIBLE_ROLE_WIDGET;
- self->properties = gtk_accessible_property_set_new ();
- self->relations = gtk_accessible_relation_set_new ();
- self->states = gtk_accessible_state_set_new ();
+ self->properties =
+ gtk_accessible_attribute_set_new (N_PROPERTIES,
+ property_attrs,
+ (GtkAccessibleAttributeDefaultFunc)
gtk_accessible_value_get_default_for_property);
+ self->relations =
+ gtk_accessible_attribute_set_new (N_RELATIONS,
+ relation_attrs,
+ (GtkAccessibleAttributeDefaultFunc)
gtk_accessible_value_get_default_for_relation);
+ self->states =
+ gtk_accessible_attribute_set_new (N_STATES,
+ state_attrs,
+ (GtkAccessibleAttributeDefaultFunc)
gtk_accessible_value_get_default_for_state);
}
/**
@@ -271,27 +338,12 @@ gtk_at_context_update (GtkATContext *self)
{
g_return_if_fail (GTK_IS_AT_CONTEXT (self));
- GtkAccessibleStateChange changed_states = 0;
- GtkAccessiblePropertyChange changed_properties = 0;
- GtkAccessibleRelationChange changed_relations = 0;
-
- for (int i = 0; i < GTK_ACCESSIBLE_STATE_SELECTED; i++)
- {
- if (gtk_accessible_state_set_contains (self->states, i))
- changed_states |= (1 << i);
- }
-
- for (int i = 0; i < GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT; i++)
- {
- if (gtk_accessible_property_set_contains (self->properties, i))
- changed_properties |= (1 << i);
- }
-
- for (int i = 0; i < GTK_ACCESSIBLE_RELATION_SET_SIZE; i++)
- {
- if (gtk_accessible_relation_set_contains (self->relations, i))
- changed_relations |= (1 << i);
- }
+ GtkAccessibleStateChange changed_states =
+ gtk_accessible_attribute_set_get_changed (self->states);
+ GtkAccessiblePropertyChange changed_properties =
+ gtk_accessible_attribute_set_get_changed (self->properties);
+ GtkAccessibleRelationChange changed_relations =
+ gtk_accessible_attribute_set_get_changed (self->relations);
GTK_AT_CONTEXT_GET_CLASS (self)->state_change (self,
changed_states,
@@ -323,9 +375,9 @@ gtk_at_context_set_accessible_state (GtkATContext *self,
g_return_if_fail (GTK_IS_AT_CONTEXT (self));
if (value != NULL)
- gtk_accessible_state_set_add (self->states, state, value);
+ gtk_accessible_attribute_set_add (self->states, state, value);
else
- gtk_accessible_state_set_remove (self->states, state);
+ gtk_accessible_attribute_set_remove (self->states, state);
}
/*< private >
@@ -349,9 +401,9 @@ gtk_at_context_set_accessible_property (GtkATContext *self,
g_return_if_fail (GTK_IS_AT_CONTEXT (self));
if (value != NULL)
- gtk_accessible_property_set_add (self->properties, property, value);
+ gtk_accessible_attribute_set_add (self->properties, property, value);
else
- gtk_accessible_property_set_remove (self->properties, property);
+ gtk_accessible_attribute_set_remove (self->properties, property);
}
/*< private >
@@ -375,7 +427,7 @@ gtk_at_context_set_accessible_relation (GtkATContext *self,
g_return_if_fail (GTK_IS_AT_CONTEXT (self));
if (value != NULL)
- gtk_accessible_relation_set_add (self->relations, relation, value);
+ gtk_accessible_attribute_set_add (self->relations, relation, value);
else
- gtk_accessible_relation_set_remove (self->relations, relation);
+ gtk_accessible_attribute_set_remove (self->relations, relation);
}
diff --git a/gtk/gtkatcontextprivate.h b/gtk/gtkatcontextprivate.h
index ee7a6dea7c..c7f59f8fae 100644
--- a/gtk/gtkatcontextprivate.h
+++ b/gtk/gtkatcontextprivate.h
@@ -22,9 +22,7 @@
#include "gtkatcontext.h"
-#include "gtkaccessiblepropertysetprivate.h"
-#include "gtkaccessiblerelationsetprivate.h"
-#include "gtkaccessiblestatesetprivate.h"
+#include "gtkaccessibleattributesetprivate.h"
G_BEGIN_DECLS
@@ -89,9 +87,9 @@ struct _GtkATContext
GtkAccessibleRole accessible_role;
GtkAccessible *accessible;
- GtkAccessibleStateSet *states;
- GtkAccessiblePropertySet *properties;
- GtkAccessibleRelationSet *relations;
+ GtkAccessibleAttributeSet *states;
+ GtkAccessibleAttributeSet *properties;
+ GtkAccessibleAttributeSet *relations;
};
struct _GtkATContextClass
@@ -102,9 +100,9 @@ struct _GtkATContextClass
GtkAccessibleStateChange changed_states,
GtkAccessiblePropertyChange changed_properties,
GtkAccessibleRelationChange changed_relations,
- GtkAccessibleStateSet *states,
- GtkAccessiblePropertySet *properties,
- GtkAccessibleRelationSet *relations);
+ GtkAccessibleAttributeSet *states,
+ GtkAccessibleAttributeSet *properties,
+ GtkAccessibleAttributeSet *relations);
};
GtkATContext * gtk_at_context_create (GtkAccessibleRole accessible_role,
diff --git a/gtk/gtktestatcontext.c b/gtk/gtktestatcontext.c
index e9b7e8c0b4..8eade3566c 100644
--- a/gtk/gtktestatcontext.c
+++ b/gtk/gtktestatcontext.c
@@ -37,15 +37,15 @@ gtk_test_at_context_state_change (GtkATContext *self,
GtkAccessibleStateChange changed_states,
GtkAccessiblePropertyChange changed_properties,
GtkAccessibleRelationChange changed_relations,
- GtkAccessibleStateSet *states,
- GtkAccessiblePropertySet *properties,
- GtkAccessibleRelationSet *relations)
+ GtkAccessibleAttributeSet *states,
+ GtkAccessibleAttributeSet *properties,
+ GtkAccessibleAttributeSet *relations)
{
GtkAccessible *accessible = gtk_at_context_get_accessible (self);
GtkAccessibleRole role = gtk_at_context_get_accessible_role (self);
- char *states_str = gtk_accessible_state_set_to_string (states);
- char *properties_str = gtk_accessible_property_set_to_string (properties);
- char *relations_str = gtk_accessible_relation_set_to_string (relations);
+ char *states_str = gtk_accessible_attribute_set_to_string (states);
+ char *properties_str = gtk_accessible_attribute_set_to_string (properties);
+ char *relations_str = gtk_accessible_attribute_set_to_string (relations);
g_print ("*** Accessible state changed for accessible ā%sā, with role %d:\n"
"*** states = %s\n"
diff --git a/gtk/meson.build b/gtk/meson.build
index 440be6f55c..3dabe6c7a3 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -16,9 +16,7 @@ gtk_private_sources = files([
'fnmatch.c',
'tools/gdkpixbufutils.c',
'gsettings-mapping.c',
- 'gtkaccessiblepropertyset.c',
- 'gtkaccessiblerelationset.c',
- 'gtkaccessiblestateset.c',
+ 'gtkaccessibleattributeset.c',
'gtkaccessiblevalue.c',
'gtkaccessiblevaluestatic.c',
'gtkactionhelper.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]