diff options
-rw-r--r-- | ganv/canvas-base.h | 10 | ||||
-rw-r--r-- | src/canvas-base.c | 80 |
2 files changed, 0 insertions, 90 deletions
diff --git a/ganv/canvas-base.h b/ganv/canvas-base.h index bca4951..a6abe5f 100644 --- a/ganv/canvas-base.h +++ b/ganv/canvas-base.h @@ -175,16 +175,6 @@ void ganv_item_set_valist(GanvItem* item, /* Move an item by the specified amount */ void ganv_item_move(GanvItem* item, double dx, double dy); -/* Raise an item in the z-order of its parent group by the specified number of - * positions. - */ -void ganv_item_raise(GanvItem* item, int positions); - -/* Lower an item in the z-order of its parent group by the specified number of - * positions. - */ -void ganv_item_lower(GanvItem* item, int positions); - /* Raise an item to the top of its parent group's z-order. */ void ganv_item_raise_to_top(GanvItem* item); diff --git a/src/canvas-base.c b/src/canvas-base.c index 8a0cd4b..ef523f0 100644 --- a/src/canvas-base.c +++ b/src/canvas-base.c @@ -482,86 +482,6 @@ put_item_after(GList* link, GList* before) } /** - * ganv_item_raise: - * @item: A canvas item. - * @positions: Number of steps to raise the item. - * - * Raises the item in its parent's stack by the specified number of positions. - * If the number of positions is greater than the distance to the top of the - * stack, then the item is put at the top. - **/ -void -ganv_item_raise(GanvItem* item, int positions) -{ - GList* link, * before; - GanvGroup* parent; - - g_return_if_fail(GANV_IS_ITEM(item)); - g_return_if_fail(positions >= 0); - - if (!item->parent || ( positions == 0) ) { - return; - } - - parent = GANV_GROUP(item->parent); - link = g_list_find(parent->item_list, item); - g_assert(link != NULL); - - for (before = link; positions && before; positions--) { - before = before->next; - } - - if (!before) { - before = parent->item_list_end; - } - - if (put_item_after(link, before)) { - redraw_if_visible(item); - item->canvas->need_repick = TRUE; - } -} - -/** - * ganv_item_lower: - * @item: A canvas item. - * @positions: Number of steps to lower the item. - * - * Lowers the item in its parent's stack by the specified number of positions. - * If the number of positions is greater than the distance to the bottom of the - * stack, then the item is put at the bottom. - **/ -void -ganv_item_lower(GanvItem* item, int positions) -{ - GList* link, * before; - GanvGroup* parent; - - g_return_if_fail(GANV_IS_ITEM(item)); - g_return_if_fail(positions >= 1); - - if (!item->parent || ( positions == 0) ) { - return; - } - - parent = GANV_GROUP(item->parent); - link = g_list_find(parent->item_list, item); - g_assert(link != NULL); - - if (link->prev) { - for (before = link->prev; positions && before; positions--) { - before = before->prev; - } - } else { - before = NULL; - } - - if (put_item_after(link, before)) { - redraw_if_visible(item); - item->canvas->need_repick = TRUE; - } -} - -/** * ganv_item_raise_to_top: * @item: A canvas item. * |