diff options
author | Benjamin Otte <otte@redhat.com> | 2011-12-12 10:25:27 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-12-16 04:53:13 +0100 |
commit | d9b71702dc004310d152d22b46232d02228502d4 (patch) | |
tree | 3071251b66de8ea8cfb4ec550074ed6b87941db0 /gtk/a11y | |
parent | 3badf48d2ed8bb332fd42855c3e1fedf97c6bee7 (diff) | |
download | gtk+-d9b71702dc004310d152d22b46232d02228502d4.tar.gz |
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.
Diffstat (limited to 'gtk/a11y')
-rw-r--r-- | gtk/a11y/gtktreeviewaccessible.c | 58 | ||||
-rw-r--r-- | 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 f959392ecd..77c3114b5f 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 0246ba9975..27d97434f0 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__ */ |