i3

include/floating.h

Go to the documentation of this file.
00001 /*
00002  * vim:ts=8:expandtab
00003  *
00004  * i3 - an improved dynamic tiling window manager
00005  *
00006  * © 2009-2010 Michael Stapelberg and contributors
00007  *
00008  * See file LICENSE for license information.
00009  *
00010  */
00011 #ifndef _FLOATING_H
00012 #define _FLOATING_H
00013 
00015 typedef void(*callback_t)(xcb_connection_t*, Client*, Rect*, uint32_t, uint32_t, void*);
00016 
00018 #define DRAGGING_CB(name) \
00019         static void name(xcb_connection_t *conn, Client *client, \
00020                          Rect *old_rect, uint32_t new_x, uint32_t new_y, \
00021                          void *extra)
00022 
00024 typedef enum { BORDER_LEFT   = (1 << 0),
00025                BORDER_RIGHT  = (1 << 1),
00026                BORDER_TOP    = (1 << 2),
00027                BORDER_BOTTOM = (1 << 3)} border_t;
00028 
00039 void toggle_floating_mode(xcb_connection_t *conn, Client *client,
00040                           bool automatic);
00041 
00048 void floating_assign_to_workspace(Client *client, Workspace *new_workspace);
00049 
00056 int floating_border_click(xcb_connection_t *conn, Client *client,
00057                           xcb_button_press_event_t *event);
00058 
00064 void floating_drag_window(xcb_connection_t *conn, Client *client,
00065                           xcb_button_press_event_t *event);
00066 
00073 void floating_resize_window(xcb_connection_t *conn, Client *client,
00074                             bool proportional, xcb_button_press_event_t *event);
00075 
00083 void floating_focus_direction(xcb_connection_t *conn, Client *currently_focused,
00084                               direction_t direction);
00085 
00090 void floating_move(xcb_connection_t *conn, Client *currently_focused,
00091                    direction_t direction);
00092 
00098 void floating_toggle_hide(xcb_connection_t *conn, Workspace *workspace);
00099 
00108 void drag_pointer(xcb_connection_t *conn, Client *client, xcb_button_press_event_t *event,
00109                   xcb_window_t confine_to, border_t border, callback_t callback,
00110                   void *extra);
00111 
00112 #endif