aboutsummaryrefslogtreecommitdiffstats
path: root/include/client/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/client/window.h')
-rw-r--r--include/client/window.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/include/client/window.h b/include/client/window.h
deleted file mode 100644
index 8af8225c..00000000
--- a/include/client/window.h
+++ /dev/null
@@ -1,67 +0,0 @@
1#ifndef _CLIENT_H
2#define _CLIENT_H
3
4#include <wayland-client.h>
5#include "wayland-desktop-shell-client-protocol.h"
6#include <cairo/cairo.h>
7#include <pango/pangocairo.h>
8#include <stdbool.h>
9#include "list.h"
10#include "client/registry.h"
11
12struct window;
13
14struct buffer {
15 struct wl_buffer *buffer;
16 cairo_surface_t *surface;
17 cairo_t *cairo;
18 PangoContext *pango;
19 uint32_t width, height;
20 bool busy;
21};
22
23struct cursor {
24 struct wl_surface *surface;
25 struct wl_cursor_theme *cursor_theme;
26 struct wl_cursor *cursor;
27 struct wl_pointer *pointer;
28};
29
30enum scroll_direction {
31 SCROLL_UP,
32 SCROLL_DOWN,
33 SCROLL_LEFT,
34 SCROLL_RIGHT,
35};
36
37struct pointer_input {
38 int last_x;
39 int last_y;
40
41 void (*notify_button)(struct window *window, int x, int y, uint32_t button, uint32_t state_w);
42 void (*notify_scroll)(struct window *window, enum scroll_direction direction);
43};
44
45struct window {
46 struct registry *registry;
47 struct buffer buffers[2];
48 struct buffer *buffer;
49 struct wl_surface *surface;
50 struct wl_shell_surface *shell_surface;
51 struct wl_callback *frame_cb;
52 struct cursor cursor;
53 uint32_t width, height;
54 int32_t scale;
55 char *font;
56 cairo_t *cairo;
57 struct pointer_input pointer_input;
58};
59
60struct window *window_setup(struct registry *registry, uint32_t width, uint32_t height,
61 int32_t scale, bool shell_surface);
62void window_teardown(struct window *state);
63int window_prerender(struct window *state);
64int window_render(struct window *state);
65void window_make_shell(struct window *window);
66
67#endif