[gtk+] a11y: Add _gtk_tree_view_accessible_add_state()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Add _gtk_tree_view_accessible_add_state()
- Date: Fri, 16 Dec 2011 03:57:08 +0000 (UTC)
commit d9b71702dc004310d152d22b46232d02228502d4
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 12 10:25:27 2011 +0100
a11y: Add _gtk_tree_view_accessible_add_state()
... and _gtk_tree_view_accessible_remove_state(). They should be called
by gtktreeview.c to notify about changes of state for a row.
gtk/a11y/gtktreeviewaccessible.c | 58 ++++++++++++++++++++++++++++++++++++++
gtk/a11y/gtktreeviewaccessible.h | 9 ++++++
2 files changed, 67 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index f959392..77c3114 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -3084,3 +3084,61 @@ _gtk_tree_view_accessible_toggle_visibility (GtkTreeView *treeview,
column,
id);
}
+
+void
+_gtk_tree_view_accessible_add_state (GtkTreeView *treeview,
+ GtkRBTree *tree,
+ GtkRBNode *node,
+ GtkCellRendererState state)
+{
+ GtkTreeViewAccessible *accessible;
+ AtkObject *obj;
+ guint i;
+
+ obj = _gtk_widget_peek_accessible (GTK_WIDGET (treeview));
+ if (obj == NULL)
+ return;
+
+ accessible = GTK_TREE_VIEW_ACCESSIBLE (obj);
+
+ for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
+ {
+ GtkCellAccessible *cell = peek_cell (accessible,
+ tree, node,
+ gtk_tree_view_get_column (treeview, i));
+
+ if (cell == NULL)
+ continue;
+
+ _gtk_cell_accessible_state_changed (cell, state, 0);
+ }
+}
+
+void
+_gtk_tree_view_accessible_remove_state (GtkTreeView *treeview,
+ GtkRBTree *tree,
+ GtkRBNode *node,
+ GtkCellRendererState state)
+{
+ GtkTreeViewAccessible *accessible;
+ AtkObject *obj;
+ guint i;
+
+ obj = _gtk_widget_peek_accessible (GTK_WIDGET (treeview));
+ if (obj == NULL)
+ return;
+
+ accessible = GTK_TREE_VIEW_ACCESSIBLE (obj);
+
+ for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
+ {
+ GtkCellAccessible *cell = peek_cell (accessible,
+ tree, node,
+ gtk_tree_view_get_column (treeview, i));
+
+ if (cell == NULL)
+ continue;
+
+ _gtk_cell_accessible_state_changed (cell, 0, state);
+ }
+}
diff --git a/gtk/a11y/gtktreeviewaccessible.h b/gtk/a11y/gtktreeviewaccessible.h
index 0246ba9..27d9743 100644
--- a/gtk/a11y/gtktreeviewaccessible.h
+++ b/gtk/a11y/gtktreeviewaccessible.h
@@ -72,6 +72,15 @@ void _gtk_tree_view_accessible_toggle_visibility
(GtkTreeView *treeview,
GtkTreeViewColumn *column);
+void _gtk_tree_view_accessible_add_state (GtkTreeView *treeview,
+ GtkRBTree *tree,
+ GtkRBNode *node,
+ GtkCellRendererState state);
+void _gtk_tree_view_accessible_remove_state (GtkTreeView *treeview,
+ GtkRBTree *tree,
+ GtkRBNode *node,
+ GtkCellRendererState state);
+
G_END_DECLS
#endif /* __GTK_TREE_VIEW_ACCESSIBLE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]