Dunst
Lightweight notification daemon
Loading...
Searching...
No Matches
wl_ctx.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause */
9
10#ifndef DUNST_WL_PRIVATE_H_
11#define DUNST_WL_PRIVATE_H_
12
13#include <stdbool.h>
14#include <glib.h>
15
16#include <wayland-client.h>
17#include <wayland-client-protocol.h>
18#include <wayland-cursor.h>
19#include <wayland-util.h>
20
21#include "../output.h"
22#include "libgwater-wayland.h"
23#include "pool-buffer.h"
24
25struct wl_ctx {
26 GWaterWaylandSource *esrc;
27 struct wl_display *display; // owned by esrc
28 struct wl_registry *registry;
29 struct wl_compositor *compositor;
30 struct wl_shm *shm;
31 struct zwlr_layer_shell_v1 *layer_shell;
32 struct xdg_wm_base *xdg_shell;
33
34 struct wl_list outputs; /* list of struct dunst_output */
35 struct wl_list seats; /* list of struct dunst_seat */
36
37 struct wl_surface *surface;
38 struct dunst_output *surface_output;
39 struct zwlr_layer_surface_v1 *layer_surface;
40 struct xdg_surface *xdg_surface;
41 struct xdg_toplevel *xdg_toplevel;
42 struct dunst_output *layer_surface_output;
43 struct wl_callback *frame_callback;
44 struct org_kde_kwin_idle *idle_handler;
45#ifdef HAVE_WL_CURSOR_SHAPE
46 struct wp_cursor_shape_manager_v1 *cursor_shape_manager;
47#endif
48#ifdef HAVE_WL_EXT_IDLE_NOTIFY
49 struct ext_idle_notifier_v1 *ext_idle_notifier;
50#endif
51 uint32_t toplevel_manager_name;
52 struct zwlr_foreign_toplevel_manager_v1 *toplevel_manager;
53 bool configured;
54 bool dirty;
55
56 struct dimensions cur_dim;
57
58 int32_t width, height;
59 struct pool_buffer buffers[2];
60 struct pool_buffer *current_buffer;
61 struct wl_cursor_theme *cursor_theme;
62 const struct wl_cursor_image *cursor_image;
63 struct wl_surface *cursor_surface;
64};
65
66extern struct wl_ctx ctx;
67
68void set_dirty(void);
69
70#endif
Generic graphics backend wrapper.
Wayland rendering buffer pool.