4 * i3 - an improved dynamic tiling window manager
6 * (c) 2009 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
18 #define exit_if_null(pointer, ...) { if (pointer == NULL) die(__VA_ARGS__); }
19 #define CIRCLEQ_NEXT_OR_NULL(head, elm, field) (CIRCLEQ_NEXT(elm, field) != CIRCLEQ_END(head) ? \
20 CIRCLEQ_NEXT(elm, field) : NULL)
21 #define CIRCLEQ_PREV_OR_NULL(head, elm, field) (CIRCLEQ_PREV(elm, field) != CIRCLEQ_END(head) ? \
22 CIRCLEQ_PREV(elm, field) : NULL)
23 /* ##__VA_ARGS__ means: leave out __VA_ARGS__ completely if it is empty, that is,
24 delete the preceding comma */
25 #define LOG(fmt, ...) slog("%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
28 int min(int a, int b);
29 int max(int a, int b);
30 void slog(char *fmt, ...);
31 void die(char *fmt, ...);
32 void *smalloc(size_t size);
33 void *scalloc(size_t size);
34 char *sstrdup(const char *str);
35 void start_application(const char *command);
36 void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_message);
37 char *convert_utf8_to_ucs2(const char *input, int *real_strlen);
38 void remove_client_from_container(xcb_connection_t *conn, Client *client, Container *container);
39 void set_focus(xcb_connection_t *conn, Client *client);
40 void leave_stack_mode(xcb_connection_t *conn, Container *container);
41 void switch_layout_mode(xcb_connection_t *conn, Container *container, int mode);
42 void warp_pointer_into(xcb_connection_t *conn, Client *client);
43 void toggle_fullscreen(xcb_connection_t *conn, Client *client);