X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fmove.h;h=df644a6b8b7b217b1c3dfd8b433a00e5d94621eb;hb=0ed29f567866ad00a2cb14ce2e6eb5a29b277011;hp=5c8a7d20f2ad7ce2d0d55271548af987a945b909;hpb=c23db20cb56847305bd8b6b362b8623e9e81db69;p=i3%2Fi3 diff --git a/include/move.h b/include/move.h index 5c8a7d20..df644a6b 100644 --- a/include/move.h +++ b/include/move.h @@ -2,16 +2,28 @@ * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager - * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * * move.c: Moving containers into some direction. * */ #pragma once +#include + /** - * Moves the current container in the given direction (TOK_LEFT, TOK_RIGHT, + * Moves the given container in the given direction (TOK_LEFT, TOK_RIGHT, * TOK_UP, TOK_DOWN from cmdparse.l) * */ -void tree_move(int direction); +void tree_move(Con *con, int direction); + +typedef enum { BEFORE, + AFTER } position_t; + +/** + * This function detaches 'con' from its parent and inserts it either before or + * after 'target'. + * + */ +void insert_con_into(Con *con, Con *target, position_t position);