aboutsummaryrefslogtreecommitdiff
path: root/src/window.h
blob: ca38bb5d80f46d2b32924d1715dcdc9846d88c67 (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
27
28
29
30
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);

void window_close(window_t *window);

#endif