From 22086e50382b99de092899a203e520c30f50b618 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Wed, 15 Nov 2023 22:35:41 +0100 Subject: Add `Connection` to separate xcb setup from window logic --- window.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 window.h (limited to 'window.h') diff --git a/window.h b/window.h new file mode 100644 index 0000000..009966a --- /dev/null +++ b/window.h @@ -0,0 +1,30 @@ +#ifndef COMET_WINDOW_H +#define COMET_WINDOW_H + +#include + +#include "connection.h" + +typedef struct Window Window; + +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 -- cgit v1.2.3