00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _FLOATING_H
00012 #define _FLOATING_H
00013
00014 #include "tree.h"
00015
00017 typedef void(*callback_t)(Con*, Rect*, uint32_t, uint32_t, void*);
00018
00020 #define DRAGGING_CB(name) \
00021 static void name(Con *con, Rect *old_rect, uint32_t new_x, \
00022 uint32_t new_y, void *extra)
00023
00025 typedef enum { BORDER_LEFT = (1 << 0),
00026 BORDER_RIGHT = (1 << 1),
00027 BORDER_TOP = (1 << 2),
00028 BORDER_BOTTOM = (1 << 3)} border_t;
00029
00036 void floating_enable(Con *con, bool automatic);
00037
00043 void floating_disable(Con *con, bool automatic);
00044
00054 void toggle_floating_mode(Con *con, bool automatic);
00055
00060 void floating_raise_con(Con *con);
00061
00067 bool floating_maybe_reassign_ws(Con *con);
00068
00069 #if 0
00070
00076 void floating_assign_to_workspace(Client *client, Workspace *new_workspace);
00077
00084 int floating_border_click(xcb_connection_t *conn, Client *client,
00085 xcb_button_press_event_t *event);
00086
00087 #endif
00088
00093 void floating_drag_window(Con *con, xcb_button_press_event_t *event);
00094
00101 void floating_resize_window(Con *con, bool proportional, xcb_button_press_event_t *event);
00102
00103 #if 0
00104
00111 void floating_focus_direction(xcb_connection_t *conn, Client *currently_focused,
00112 direction_t direction);
00113
00118 void floating_move(xcb_connection_t *conn, Client *currently_focused,
00119 direction_t direction);
00120
00126 void floating_toggle_hide(xcb_connection_t *conn, Workspace *workspace);
00127
00128 #endif
00129
00137 void drag_pointer(Con *con, xcb_button_press_event_t *event,
00138 xcb_window_t confine_to, border_t border, callback_t callback,
00139 void *extra);
00140
00141 #endif