]> git.lizzy.rs Git - bspwm.git/blob - window.h
*leaf_monocle*: only consider tiled windows
[bspwm.git] / window.h
1 /* Copyright (c) 2012, Bastien Dejean
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this
8  *    list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright notice,
10  *    this list of conditions and the following disclaimer in the documentation
11  *    and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24
25 #ifndef BSPWM_WINDOW_H
26 #define BSPWM_WINDOW_H
27
28 #include <stdarg.h>
29 #include <xcb/xcb.h>
30 #include <xcb/xcb_event.h>
31 #include <xcb/xcb_icccm.h>
32 #include "types.h"
33
34 void schedule_window(xcb_window_t win);
35 void manage_window(xcb_window_t win, rule_consequence_t *csq, int fd);
36 void unmanage_window(xcb_window_t win);
37 void window_draw_border(node_t *n, bool focused_window, bool focused_monitor);
38 pointer_state_t *make_pointer_state(void);
39 bool contains(xcb_rectangle_t a, xcb_rectangle_t b);
40 xcb_rectangle_t get_rectangle(client_t *c);
41 void get_side_handle(client_t *c, direction_t dir, xcb_point_t *pt);
42 void adopt_orphans(void);
43 void window_close(node_t *n);
44 void window_kill(monitor_t *m, desktop_t *d, node_t *n);
45 void set_fullscreen(node_t *n, bool value);
46 void set_pseudo_tiled(node_t *n, bool value);
47 void set_floating(node_t *n, bool value);
48 void set_locked(monitor_t *m, desktop_t *d, node_t *n, bool value);
49 void set_sticky(monitor_t *m, desktop_t *d, node_t *n, bool value);
50 void set_private(monitor_t *m, desktop_t *d, node_t *n, bool value);
51 void set_urgency(monitor_t *m, desktop_t *d, node_t *n, bool value);
52 void set_floating_atom(xcb_window_t win, uint32_t value);
53 void enable_floating_atom(xcb_window_t win);
54 void disable_floating_atom(xcb_window_t win);
55 uint32_t get_border_color(client_t *c, bool focused_window, bool focused_monitor);
56 void update_floating_rectangle(client_t *c);
57 void restrain_floating_width(client_t *c, int *width);
58 void restrain_floating_height(client_t *c, int *height);
59 void restrain_floating_size(client_t *c, int *width, int *height);
60 void query_pointer(xcb_window_t *win, xcb_point_t *pt);
61 void window_border_width(xcb_window_t win, uint32_t bw);
62 void window_move(xcb_window_t win, int16_t x, int16_t y);
63 void window_resize(xcb_window_t win, uint16_t w, uint16_t h);
64 void window_move_resize(xcb_window_t win, int16_t x, int16_t y, uint16_t w, uint16_t h);
65 void window_raise(xcb_window_t win);
66 void window_center(monitor_t *m, client_t *c);
67 void window_stack(xcb_window_t w1, xcb_window_t w2, uint32_t mode);
68 void window_above(xcb_window_t w1, xcb_window_t w2);
69 void window_below(xcb_window_t w1, xcb_window_t w2);
70 void window_lower(xcb_window_t win);
71 void window_set_visibility(xcb_window_t win, bool visible);
72 void window_hide(xcb_window_t win);
73 void window_show(xcb_window_t win);
74 void toggle_visibility(void);
75 void enable_motion_recorder(void);
76 void disable_motion_recorder(void);
77 void update_motion_recorder(void);
78 void update_input_focus(void);
79 void set_input_focus(node_t *n);
80 void clear_input_focus(void);
81 void center_pointer(xcb_rectangle_t r);
82 void get_atom(char *name, xcb_atom_t *atom);
83 void set_atom(xcb_window_t win, xcb_atom_t atom, uint32_t value);
84 bool has_proto(xcb_atom_t atom, xcb_icccm_get_wm_protocols_reply_t *protocols);
85 void send_client_message(xcb_window_t win, xcb_atom_t property, xcb_atom_t value);
86
87 #endif