summaryrefslogtreecommitdiff
path: root/src/x.h
blob: f4b69bc918c4b17675068abb273dde04b2bbdc4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef X_H
#define X_H

#include <xcb/xcb.h>
#include <xcb/xcb_keysyms.h>

#include "types.h"

typedef struct {
	xcb_connection_t *con;
	xcb_screen_t *scr;
	xcb_screen_iterator_t iter;
	int scr_nbr;
} Server_context_t;

Server_context_t *init_XCB_server();
xcb_window_t create_win(Server_context_t *info);
xcb_cursor_t cursor_set(xcb_connection_t *c, xcb_window_t win, u32 cid);
void cursor_die(xcb_connection_t *c, xcb_window_t win, u32 value_list);
const char *ksym_to_str(const xcb_keysym_t *ksym);
void die(xcb_key_symbols_t *sym, Server_context_t *s_info, xcb_drawable_t win);
xcb_window_t get_focused_win(xcb_connection_t *con);
xcb_atom_t get_atom(xcb_connection_t *c, const char *atom_name);
void xcb_set_win_name(xcb_connection_t *c, xcb_window_t w, const char *title);

#endif