diff options
author | Benjamin Otte <otte@redhat.com> | 2011-11-24 01:55:38 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-11-24 18:29:45 +0100 |
commit | 178686ba1139a389a4203107ef4e2ee293a12ab9 (patch) | |
tree | a83e313345fb2c0fe89b3d1166d4cbd856778b9e /gtk/a11y/gtkcellaccessibleparent.c | |
parent | bcafd9ba3cadd03d1a8f1d5775f39099201c8007 (diff) | |
download | gtk+-178686ba1139a389a4203107ef4e2ee293a12ab9.tar.gz |
a11y: Add get_renderer_state() to cell accessibles
Accessibles can use this function to query the state that their row
would be rendered with.
Diffstat (limited to 'gtk/a11y/gtkcellaccessibleparent.c')
-rw-r--r-- | gtk/a11y/gtkcellaccessibleparent.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk/a11y/gtkcellaccessibleparent.c b/gtk/a11y/gtkcellaccessibleparent.c index 76c6b76411..6f76ccb146 100644 --- a/gtk/a11y/gtkcellaccessibleparent.c +++ b/gtk/a11y/gtkcellaccessibleparent.c @@ -112,6 +112,30 @@ _gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent, return -1; } +GtkCellRendererState +_gtk_cell_accessible_parent_get_renderer_state (GtkCellAccessibleParent *parent, + GtkCellAccessible *cell, + gboolean *expandable, + gboolean *expanded) +{ + GtkCellAccessibleParentIface *iface; + + g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), 0); + g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), 0); + + iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent); + + if (expandable) + *expandable = FALSE; + if (expanded) + *expanded = FALSE; + + if (iface->get_renderer_state) + return (iface->get_renderer_state) (parent, cell, expandable, expanded); + else + return 0; +} + void _gtk_cell_accessible_parent_set_cell_data (GtkCellAccessibleParent *parent, GtkCellAccessible *cell) |