} \
while (0)
+extern xcb_window_t root;
+
char *convert_ucs_to_utf8(char *input);
char *convert_utf8_to_ucs2(char *input, int *real_strlen);
uint32_t get_colorpixel(xcb_connection_t *conn, char *hex);
static char *prompt;
static int prompt_len;
static int limit;
+xcb_window_t root;
/*
* Concats the glyphs (either UCS-2 or UTF-8) to a single string, suitable for
if (xcb_connection_has_error(conn))
die("Cannot open display\n");
+ xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
+ root = root_screen->root;
+
/* Set up event handlers for key press and key release */
xcb_event_handlers_t evenths;
memset(&evenths, 0, sizeof(xcb_event_handlers_t));
win = open_input_window(conn, 500, font_height + 8);
/* Create pixmap */
- xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
-
pixmap = xcb_generate_id(conn);
pixmap_gc = xcb_generate_id(conn);
xcb_create_pixmap(conn, root_screen->root_depth, pixmap, win, 500, font_height + 8);
*
*/
xcb_window_t open_input_window(xcb_connection_t *conn, uint32_t width, uint32_t height) {
- xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
xcb_window_t win = xcb_generate_id(conn);
//xcb_cursor_t cursor_id = xcb_generate_id(conn);
void drag_pointer(Con *con, xcb_button_press_event_t *event, xcb_window_t
confine_to, border_t border, callback_t callback, void *extra)
{
- xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
uint32_t new_x, new_y;
Rect old_rect;
if (con != NULL)
*
*/
static xcb_window_t open_input_window(xcb_connection_t *conn, Rect screen_rect, uint32_t width, uint32_t height) {
- xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
xcb_window_t win = xcb_generate_id(conn);
uint32_t mask = 0;
*/
xcb_window_t create_window(xcb_connection_t *conn, Rect dims, uint16_t window_class,
enum xcursor_cursor_t cursor, bool map, uint32_t mask, uint32_t *values) {
- xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
xcb_window_t result = xcb_generate_id(conn);
xcb_cursor_t cursor_id = xcb_generate_id(conn);