diff options
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h new file mode 100644 index 0000000..74cc231 --- /dev/null +++ b/src/window.h @@ -0,0 +1,31 @@ +#ifndef COMET_WINDOW_H +#define COMET_WINDOW_H + +#include <cairo.h> +#include <xcb/xcb.h> +#include <xcb/xcb_aux.h> + +#include "display.h" + +typedef struct { + display_t *display; + xcb_drawable_t window; + uint32_t cw_mask; + xcb_params_cw_t cw_params; + cairo_surface_t *surface; + cairo_t *cr; + int x, y; + int width, height; +} window_t; + +void window_init(window_t *window, display_t *display); + +void window_move(window_t *window, int x, int y); + +void window_resize(window_t *window, int width, int height); + +void window_present(window_t *window, cairo_surface_t *surface, int width, int height); + +void window_close(window_t *window); + +#endif |
