aboutsummaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-17 15:42:49 +0100
committerFederico Angelilli <code@fedang.net>2023-11-17 15:42:49 +0100
commitab92cac18652f72be12f68b5a96095ba8eb5afdf (patch)
treee52a5f295c7cda59e67a341fa87d25983bd56745 /src/window.h
parentf8363e89257e8b0a4ff71accbd7b6be22935274f (diff)
Reorganize project structure
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h
new file mode 100644
index 0000000..e6172ac
--- /dev/null
+++ b/src/window.h
@@ -0,0 +1,39 @@
+#ifndef COMET_WINDOW_H
+#define COMET_WINDOW_H
+
+#include <cairo.h>
+
+#include "connect.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