X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fmove.h;h=df644a6b8b7b217b1c3dfd8b433a00e5d94621eb;hb=0ed29f567866ad00a2cb14ce2e6eb5a29b277011;hp=d0c97014034b831fcb06654ae5845c081a354140;hpb=2728c0246794df9eae0a12d77f32d7bd0031df6f;p=i3%2Fi3 diff --git a/include/move.h b/include/move.h index d0c97014..df644a6b 100644 --- a/include/move.h +++ b/include/move.h @@ -1,15 +1,29 @@ /* * vim:ts=4:sw=4:expandtab + * + * i3 - an improved dynamic tiling window manager + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) + * + * move.c: Moving containers into some direction. + * */ +#pragma once -#ifndef _MOVE_H -#define _MOVE_H +#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; -#endif +/** + * 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);