mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
a11y: Implement get_child_index in treeviewaccessible
This commit is contained in:
parent
b526375e8f
commit
d5b52ae3b1
@ -1526,12 +1526,26 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
|
||||
GtkCellAccessible *cell)
|
||||
{
|
||||
GtkTreeViewAccessibleCellInfo *cell_info;
|
||||
|
||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
||||
return -1;
|
||||
|
||||
return cell_info_get_index (tree_view, info);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_cell_accessible_parent_interface_init (GtkCellAccessibleParentIface *iface)
|
||||
{
|
||||
iface->get_cell_extents = gtk_tree_view_accessible_get_cell_extents;
|
||||
iface->get_cell_area = gtk_tree_view_accessible_get_cell_area;
|
||||
iface->grab_focus = gtk_tree_view_accessible_grab_cell_focus;
|
||||
iface->get_child_index = gtk_tree_view_accessible_get_child_index;
|
||||
}
|
||||
|
||||
/* signal handling */
|
||||
|
Loading…
Reference in New Issue
Block a user