예제 #1
0
static gint
ecv_get_n_children (AtkObject *a11y)
{
	g_return_val_if_fail (GAL_A11Y_IS_E_CELL_VBOX (a11y), 0);

	return GAL_A11Y_E_CELL_VBOX (a11y)->a11y_subcell_count;
}
예제 #2
0
static void
ecv_dispose (GObject *object)
{
	GalA11yECellVbox *gaev = GAL_A11Y_E_CELL_VBOX (object);
	if (gaev->a11y_subcells)
		g_free (gaev->a11y_subcells);

	if (parent_class->dispose)
		parent_class->dispose (object);
}
예제 #3
0
static void
subcell_destroyed (gpointer data)
{
	GalA11yECell *cell;
	AtkObject *parent;
	GalA11yECellVbox *gaev;

	g_return_if_fail (GAL_A11Y_IS_E_CELL (data));
	cell = GAL_A11Y_E_CELL (data);

	parent = atk_object_get_parent (ATK_OBJECT (cell));
	g_return_if_fail (GAL_A11Y_IS_E_CELL_VBOX (parent));
	gaev = GAL_A11Y_E_CELL_VBOX (parent);

	if (cell->view_col < gaev->a11y_subcell_count)
		gaev->a11y_subcells[cell->view_col] = NULL;
}
예제 #4
0
static AtkObject *
ecv_ref_child (AtkObject *a11y,
               gint i)
{
    GalA11yECellVbox *gaev = GAL_A11Y_E_CELL_VBOX (a11y);
    GalA11yECell *gaec = GAL_A11Y_E_CELL (a11y);
    ECellVboxView *ecvv = (ECellVboxView *) (gaec->cell_view);
    AtkObject *ret;
    if (i < gaev->a11y_subcell_count) {
        if (gaev->a11y_subcells[i] == NULL) {
            ECellView *subcell_view;
            gint model_col, row;
            row = gaec->row;
            model_col = ecvv->model_cols[i];
            subcell_view = ecvv->subcell_views[i];
            /* FIXME Should the view column use a fake
             *       one or the same as its parent? */
            ret = gal_a11y_e_cell_registry_get_object (
                      NULL,
                      gaec->item,
                      subcell_view,
                      a11y,
                      model_col,
                      gaec->view_col,
                      row);
            gaev->a11y_subcells[i] = ret;
            g_object_ref (ret);
            g_object_weak_ref (
                G_OBJECT (ret),
                (GWeakNotify) subcell_destroyed,
                ret);
        } else {
            ret = (AtkObject *) gaev->a11y_subcells[i];
            if (ATK_IS_OBJECT (ret))
                g_object_ref (ret);
            else
                ret = NULL;
        }
    } else {
        ret = NULL;
    }

    return ret;
}