[gtk+] a11y: Add API to update relationsets of cells to their parents
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Add API to update relationsets of cells to their parents
- Date: Mon, 24 Mar 2014 15:38:38 +0000 (UTC)
commit 8374a586235ef356186f309607475fb33aca636b
Author: Benjamin Otte <otte redhat com>
Date: Mon Mar 24 15:51:38 2014 +0100
a11y: Add API to update relationsets of cells to their parents
gtk/a11y/gtkcellaccessible.c | 22 ++++++++++++++++++++++
gtk/a11y/gtkcellaccessibleparent.c | 17 +++++++++++++++++
gtk/a11y/gtkcellaccessibleparent.h | 8 ++++++++
3 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtkcellaccessible.c b/gtk/a11y/gtkcellaccessible.c
index 051abec..11775e4 100644
--- a/gtk/a11y/gtkcellaccessible.c
+++ b/gtk/a11y/gtkcellaccessible.c
@@ -70,6 +70,27 @@ gtk_cell_accessible_get_index_in_parent (AtkObject *obj)
return gtk_cell_accessible_parent_get_child_index (GTK_CELL_ACCESSIBLE_PARENT (cell->priv->parent), cell);
}
+static AtkRelationSet *
+gtk_cell_accessible_ref_relation_set (AtkObject *object)
+{
+ GtkCellAccessible *cell;
+ AtkRelationSet *relationset;
+ AtkObject *parent;
+
+ relationset = ATK_OBJECT_CLASS (gtk_cell_accessible_parent_class)->ref_relation_set (object);
+ if (relationset == NULL)
+ relationset = atk_relation_set_new ();
+
+ cell = GTK_CELL_ACCESSIBLE (object);
+ parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
+
+ gtk_cell_accessible_parent_update_relationset (GTK_CELL_ACCESSIBLE_PARENT (parent),
+ cell,
+ relationset);
+
+ return relationset;
+}
+
static AtkStateSet *
gtk_cell_accessible_ref_state_set (AtkObject *accessible)
{
@@ -130,6 +151,7 @@ gtk_cell_accessible_class_init (GtkCellAccessibleClass *klass)
class->get_index_in_parent = gtk_cell_accessible_get_index_in_parent;
class->ref_state_set = gtk_cell_accessible_ref_state_set;
+ class->ref_relation_set = gtk_cell_accessible_ref_relation_set;
class->get_parent = gtk_cell_accessible_get_parent;
}
diff --git a/gtk/a11y/gtkcellaccessibleparent.c b/gtk/a11y/gtkcellaccessibleparent.c
index 821828c..e701915 100644
--- a/gtk/a11y/gtkcellaccessibleparent.c
+++ b/gtk/a11y/gtkcellaccessibleparent.c
@@ -170,3 +170,20 @@ gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent,
if (iface->edit)
(iface->edit) (parent, cell);
}
+
+void
+gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent,
+ GtkCellAccessible *cell,
+ AtkRelationSet *relationset)
+{
+ GtkCellAccessibleParentIface *iface;
+
+ g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
+ g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell));
+ g_return_if_fail (ATK_IS_RELATION_SET (relationset));
+
+ iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
+
+ if (iface->update_relationset)
+ (iface->update_relationset) (parent, cell, relationset);
+}
diff --git a/gtk/a11y/gtkcellaccessibleparent.h b/gtk/a11y/gtkcellaccessibleparent.h
index 5528f75..b928e73 100644
--- a/gtk/a11y/gtkcellaccessibleparent.h
+++ b/gtk/a11y/gtkcellaccessibleparent.h
@@ -71,6 +71,10 @@ struct _GtkCellAccessibleParentIface
GtkCellAccessible *cell);
void ( *edit) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
+ /* end of actions */
+ void ( *update_relationset) (GtkCellAccessibleParent *parent,
+ GtkCellAccessible *cell,
+ AtkRelationSet *relationset);
};
GDK_AVAILABLE_IN_ALL
@@ -107,6 +111,10 @@ void gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *p
GDK_AVAILABLE_IN_ALL
void gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
+GDK_AVAILABLE_IN_3_12
+void gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent,
+ GtkCellAccessible *cell,
+ AtkRelationSet *relationset);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]