-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow.h
34 lines (27 loc) · 933 Bytes
/
window.h
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
27
28
29
30
31
32
33
#ifndef DEF_WINDOW
#define DEF_WINDOW
#include <xcb/xcb.h>
typedef struct _srv_window_t {
xcb_window_t xcbwin;
uint32_t width;
uint32_t height;
int opened;
} srv_window_t;
/** Request the EWMH data. */
void request_ewmh(xcb_connection_t* c);
void close_ewmh();
/** Check if has EWMH : needed to open windows. */
int has_ewmh();
/** Request the opening of a window. */
srv_window_t open_window(xcb_connection_t* c, xcb_screen_t* scr,
uint32_t x, uint32_t y,
uint32_t w, uint32_t h,
const char* title
);
void close_window(xcb_connection_t* c, srv_window_t win);
void move_window(xcb_connection_t* c, srv_window_t win, uint32_t x, uint32_t y);
void show_window(xcb_connection_t* c, srv_window_t win, int toshow);
/** Check if the window has been openend : return -1 on failure,
* 0 if its still pending and 1 if the window has been opened. */
int opened(srv_window_t win);
#endif