2 * Copyright (c) 2015 Andy Spencer <andy753421@gmail.com>
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
29 static int border = 2;
30 static int stack = 25;
31 static int no_capture = 0;
33 /* Internal structures */
38 static xcb_connection_t *conn;
39 static list_t *screens;
44 void sys_move(win_t *win, int x, int y, int w, int h)
46 printf("sys_move: %p - %dx%d @ %d,%d\n",
50 void sys_raise(win_t *win)
52 printf("sys_raise: %p\n", win);
55 void sys_focus(win_t *win)
57 printf("sys_focus: %p\n", win);
60 void sys_show(win_t *win, state_t state)
62 printf("sys_show: %p - %d\n", win, state);
65 void sys_watch(win_t *win, event_t ev, mod_t mod)
67 printf("sys_watch: %p - 0x%X,0x%X\n", win, ev, mod2int(mod));
70 void sys_unwatch(win_t *win, event_t ev, mod_t mod)
72 printf("sys_unwatch: %p - 0x%X,0x%X\n", win, ev, mod2int(mod));
75 list_t *sys_info(void)
78 if (screens == NULL) {
79 win_t *screen = new0(win_t);
80 screens = list_insert(NULL, screen);
89 /* Load configuration */
90 stack = conf_get_int("main.stack", stack);
91 border = conf_get_int("main.border", border);
92 no_capture = conf_get_int("main.no-capture", no_capture);
94 /* Connect to display */
95 if (!(conn = xcb_connect(NULL, NULL)))
96 error("xcb connect failed");
97 if (xcb_connection_has_error(conn))
98 error("xcb connection has errors");
108 printf("sys_exit\n");
113 printf("sys_free\n");