diff options
author | Benjamin Otte <otte@redhat.com> | 2011-12-12 15:18:54 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-12-16 04:53:14 +0100 |
commit | 9e9533fc887890f73742cfdfd6c5f0f13296700b (patch) | |
tree | 1f80f2379497aed8510861f769e727d0f57f7f57 /gtk/a11y/gtkcellaccessibleparent.c | |
parent | f840efae96afd9c52884d2ce6a807b084387b538 (diff) | |
download | gtk+-9e9533fc887890f73742cfdfd6c5f0f13296700b.tar.gz |
a11y: Redo cell accessible action handling
Multiple changes:
- actions are now available unconditionally, but only work in the right
state. This mirrors other actions.
- instead of adding actions manually, they invoke the action on the
GtkCellAccessibleParent interface.
Tests have been updated to reflect the changes
Diffstat (limited to 'gtk/a11y/gtkcellaccessibleparent.c')
-rw-r--r-- | gtk/a11y/gtkcellaccessibleparent.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gtk/a11y/gtkcellaccessibleparent.c b/gtk/a11y/gtkcellaccessibleparent.c index 82603ece32..6a36c98fde 100644 --- a/gtk/a11y/gtkcellaccessibleparent.c +++ b/gtk/a11y/gtkcellaccessibleparent.c @@ -144,3 +144,47 @@ _gtk_cell_accessible_parent_set_cell_data (GtkCellAccessibleParent *parent, (iface->set_cell_data) (parent, cell); } +void +_gtk_cell_accessible_parent_expand_collapse (GtkCellAccessibleParent *parent, + GtkCellAccessible *cell) +{ + GtkCellAccessibleParentIface *iface; + + g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent)); + g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell)); + + iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent); + + if (iface->expand_collapse) + (iface->expand_collapse) (parent, cell); +} + +void +_gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *parent, + GtkCellAccessible *cell) +{ + GtkCellAccessibleParentIface *iface; + + g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent)); + g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell)); + + iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent); + + if (iface->activate) + (iface->activate) (parent, cell); +} + +void +_gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent, + GtkCellAccessible *cell) +{ + GtkCellAccessibleParentIface *iface; + + g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent)); + g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell)); + + iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent); + + if (iface->edit) + (iface->edit) (parent, cell); +} |