aboutsummaryrefslogtreecommitdiff
path: root/window.h
blob: 5ee075f88104e35c3ee558c38a5b8df0aca3ae28 (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
32
33
34
35
36
37
38
39
#ifndef COMET_WINDOW_H
#define COMET_WINDOW_H

#include <cairo.h>

#include "connection.h"

typedef struct Window Window;

struct Window {
    Connection *con;
    xcb_drawable_t window;
    cairo_surface_t *surface;
    cairo_t *cr;
    int x, y;
    int width, height;
};

Window *window_create(Connection *con);

cairo_t *window_get_context(Window *win);

double window_get_scale(Window *win);

void window_set_opacity(Window *win, double alpha);

void window_get_screen_size(Window *win, int *width, int *height);

void window_move(Window *win, int x, int y);

void window_resize(Window *win, int width, int height);

void window_paint_surface(Window *win, cairo_surface_t *surface, int width, int height);

void window_destroy(Window *win);

#endif

// vim: ts=4 sw=4 et