-/* signal handling */
-
-static void
-cursor_changed (GtkTreeView *tree_view,
- GtkTreeViewAccessible *accessible)
-{
- AtkObject *cell;
-
- cell = gtk_tree_view_accessible_ref_focus_cell (tree_view);
- if (cell)
- {
- if (cell != accessible->focus_cell)
- {
- if (accessible->focus_cell)
- {
- _gtk_cell_accessible_remove_state (GTK_CELL_ACCESSIBLE (accessible->focus_cell), ATK_STATE_ACTIVE, FALSE);
- _gtk_cell_accessible_remove_state (GTK_CELL_ACCESSIBLE (accessible->focus_cell), ATK_STATE_FOCUSED, FALSE);
- g_object_unref (accessible->focus_cell);
- accessible->focus_cell = cell;
- }
-
- if (gtk_widget_has_focus (GTK_WIDGET (tree_view)))
- {
- _gtk_cell_accessible_add_state (GTK_CELL_ACCESSIBLE (cell), ATK_STATE_ACTIVE, FALSE);
- _gtk_cell_accessible_add_state (GTK_CELL_ACCESSIBLE (cell), ATK_STATE_FOCUSED, FALSE);
- }
-
- g_signal_emit_by_name (accessible, "active-descendant-changed", cell);
- }
- else
- g_object_unref (cell);
- }
-}
-
-static gboolean
-focus_in (GtkWidget *widget)
-{
- GtkTreeView *tree_view;
- GtkTreeViewAccessible *accessible;
- AtkStateSet *state_set;
- AtkObject *cell;
-
- tree_view = GTK_TREE_VIEW (widget);
- accessible = GTK_TREE_VIEW_ACCESSIBLE (gtk_widget_get_accessible (widget));
-
- if (accessible->focus_cell == NULL)
- {
- cell = gtk_tree_view_accessible_ref_focus_cell (tree_view);
- if (cell)
- {
- state_set = atk_object_ref_state_set (cell);
- if (state_set)
- {
- if (!atk_state_set_contains_state (state_set, ATK_STATE_FOCUSED))
- {
- _gtk_cell_accessible_add_state (GTK_CELL_ACCESSIBLE (cell), ATK_STATE_ACTIVE, FALSE);
- accessible->focus_cell = cell;
- _gtk_cell_accessible_add_state (GTK_CELL_ACCESSIBLE (cell), ATK_STATE_FOCUSED, FALSE);
- g_signal_emit_by_name (accessible, "active-descendant-changed", cell);
- }
- g_object_unref (state_set);
- }
- }
- }
- return FALSE;
-}
-
-static gboolean
-focus_out (GtkWidget *widget)
-{
- GtkTreeViewAccessible *accessible;
-
- accessible = GTK_TREE_VIEW_ACCESSIBLE (gtk_widget_get_accessible (widget));
- if (accessible->focus_cell)
- {
- _gtk_cell_accessible_remove_state (GTK_CELL_ACCESSIBLE (accessible->focus_cell), ATK_STATE_ACTIVE, FALSE);
- _gtk_cell_accessible_remove_state (GTK_CELL_ACCESSIBLE (accessible->focus_cell), ATK_STATE_FOCUSED, FALSE);
- g_object_unref (accessible->focus_cell);
- accessible->focus_cell = NULL;
- }
- return FALSE;
-}
-