i3
floating.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * floating.c: Floating windows.
8  *
9  */
10 #ifndef I3_FLOATING_H
11 #define I3_FLOATING_H
12 
13 #include "tree.h"
14 
16 typedef void(*callback_t)(Con*, Rect*, uint32_t, uint32_t, const void*);
17 
19 #define DRAGGING_CB(name) \
20  static void name(Con *con, Rect *old_rect, uint32_t new_x, \
21  uint32_t new_y, const void *extra)
22 
24 typedef enum { BORDER_LEFT = (1 << 0),
25  BORDER_RIGHT = (1 << 1),
26  BORDER_TOP = (1 << 2),
27  BORDER_BOTTOM = (1 << 3)} border_t;
28 
35 void floating_enable(Con *con, bool automatic);
36 
42 void floating_disable(Con *con, bool automatic);
43 
53 void toggle_floating_mode(Con *con, bool automatic);
54 
59 void floating_raise_con(Con *con);
60 
67 
68 #if 0
69 
75 void floating_assign_to_workspace(Client *client, Workspace *new_workspace);
76 
83 int floating_border_click(xcb_connection_t *conn, Client *client,
84  xcb_button_press_event_t *event);
85 
86 #endif
87 
92 void floating_drag_window(Con *con, const xcb_button_press_event_t *event);
93 
100 void floating_resize_window(Con *con, const bool proportional, const xcb_button_press_event_t *event);
101 
108 void floating_check_size(Con *floating_con);
109 
110 #if 0
111 
118 void floating_focus_direction(xcb_connection_t *conn, Client *currently_focused,
119  direction_t direction);
120 
125 void floating_move(xcb_connection_t *conn, Client *currently_focused,
126  direction_t direction);
127 
133 void floating_toggle_hide(xcb_connection_t *conn, Workspace *workspace);
134 
135 #endif
136 
152 typedef enum {
153  DRAGGING = 0,
157 } drag_result_t;
158 
167 drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event,
168  xcb_window_t confine_to, border_t border, int cursor,
169  callback_t callback, const void *extra);
170 
178 void floating_reposition(Con *con, Rect newrect);
179 
185 void floating_fix_coordinates(Con *con, Rect *old_rect, Rect *new_rect);
186 
187 #endif