static void gtk_cell_accessible_object_finalize (GObject *obj) { AtkRelationSet *relation_set; AtkRelation *relation; GPtrArray *target; gpointer target_object; gint i; relation_set = atk_object_ref_relation_set (ATK_OBJECT (obj)); if (ATK_IS_RELATION_SET (relation_set)) { relation = atk_relation_set_get_relation_by_type (relation_set, ATK_RELATION_NODE_CHILD_OF); if (relation) { target = atk_relation_get_target (relation); for (i = 0; i < target->len; i++) { target_object = g_ptr_array_index (target, i); if (GTK_IS_CELL_ACCESSIBLE (target_object)) g_object_unref (target_object); } } g_object_unref (relation_set); } G_OBJECT_CLASS (_gtk_cell_accessible_parent_class)->finalize (obj); }
void _gtk_container_cell_accessible_remove_child (GtkContainerCellAccessible *container, GtkCellAccessible *child) { g_return_if_fail (GTK_IS_CONTAINER_CELL_ACCESSIBLE (container)); g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (child)); g_return_if_fail (container->NChildren > 0); container->children = g_list_remove (container->children, child); container->NChildren--; }
void _gtk_container_cell_accessible_add_child (GtkContainerCellAccessible *container, GtkCellAccessible *child) { g_return_if_fail (GTK_IS_CONTAINER_CELL_ACCESSIBLE (container)); g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (child)); container->NChildren++; container->children = g_list_append (container->children, child); atk_object_set_parent (ATK_OBJECT (child), ATK_OBJECT (container)); }
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); }
/** * gtk_cell_accessible_parent_get_row_header_cells: * Returns: (transfer full) (element-type AtkObject) */ GPtrArray * gtk_cell_accessible_parent_get_row_header_cells (GtkCellAccessibleParent *parent, GtkCellAccessible *cell) { GtkCellAccessibleParentIface *iface; g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), NULL); g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), NULL); iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent); if (iface->get_row_header_cells) return (iface->get_row_header_cells) (parent, cell); else return NULL; }
void gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, AtkRelationSet *relationset) { GtkCellAccessibleParentIface *iface; g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent)); g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell)); g_return_if_fail (ATK_IS_RELATION_SET (relationset)); iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent); if (iface->update_relationset) (iface->update_relationset) (parent, cell, relationset); }
GtkCellRendererState gtk_cell_accessible_parent_get_renderer_state (GtkCellAccessibleParent *parent, GtkCellAccessible *cell) { 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 (iface->get_renderer_state) return (iface->get_renderer_state) (parent, cell); else return 0; }
void gtk_cell_accessible_parent_get_cell_position (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, gint *row, gint *column) { 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->get_cell_position) (iface->get_cell_position) (parent, cell, row, column); else { if (row) *row = -1; if (column) *column = -1; } }