i3
|
00001 /* 00002 * vim:ts=4:sw=4:expandtab 00003 * 00004 * i3 - an improved dynamic tiling window manager 00005 * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) 00006 * 00007 * floating.c: Floating windows. 00008 * 00009 */ 00010 #ifndef _FLOATING_H 00011 #define _FLOATING_H 00012 00013 #include "tree.h" 00014 00016 typedef void(*callback_t)(Con*, Rect*, uint32_t, uint32_t, const void*); 00017 00019 #define DRAGGING_CB(name) \ 00020 static void name(Con *con, Rect *old_rect, uint32_t new_x, \ 00021 uint32_t new_y, const 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 00035 void floating_enable(Con *con, bool automatic); 00036 00042 void floating_disable(Con *con, bool automatic); 00043 00053 void toggle_floating_mode(Con *con, bool automatic); 00054 00059 void floating_raise_con(Con *con); 00060 00066 bool floating_maybe_reassign_ws(Con *con); 00067 00068 #if 0 00069 00075 void floating_assign_to_workspace(Client *client, Workspace *new_workspace); 00076 00083 int floating_border_click(xcb_connection_t *conn, Client *client, 00084 xcb_button_press_event_t *event); 00085 00086 #endif 00087 00092 void floating_drag_window(Con *con, const xcb_button_press_event_t *event); 00093 00100 void floating_resize_window(Con *con, const bool proportional, const xcb_button_press_event_t *event); 00101 00102 #if 0 00103 00110 void floating_focus_direction(xcb_connection_t *conn, Client *currently_focused, 00111 direction_t direction); 00112 00117 void floating_move(xcb_connection_t *conn, Client *currently_focused, 00118 direction_t direction); 00119 00125 void floating_toggle_hide(xcb_connection_t *conn, Workspace *workspace); 00126 00127 #endif 00128 00136 void drag_pointer(Con *con, const xcb_button_press_event_t *event, 00137 xcb_window_t confine_to, border_t border, callback_t callback, 00138 const void *extra); 00139 00147 void floating_reposition(Con *con, Rect newrect); 00148 00154 void floating_fix_coordinates(Con *con, Rect *old_rect, Rect *new_rect); 00155 00156 #endif