4 #include <wayland-client.h>
5 #include <xkbcommon/xkbcommon.h>
7 #include "wayland-xdg-shell-client-protocol.h"
9 #include "renderers/cairo.h"
36 const char *BM_XKB_MASK_NAMES[MASK_LAST];
37 const enum mod_bit BM_XKB_MODS[MASK_LAST];
40 struct xkb_state *state;
41 struct xkb_context *context;
42 struct xkb_keymap *keymap;
43 xkb_mod_mask_t masks[MASK_LAST];
49 struct wl_keyboard *keyboard;
57 xkb_keysym_t repeat_sym;
60 int32_t repeat_rate_sec;
61 int32_t repeat_rate_nsec;
62 int32_t repeat_delay_sec;
63 int32_t repeat_delay_nsec;
66 void (*key)(
enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t code);
73 uint32_t width, height;
78 struct wl_surface *surface;
79 struct wl_shell_surface *shell_surface;
80 struct wl_callback *frame_cb;
81 struct xdg_surface *xdg_surface;
84 uint32_t width, height, max_height;
88 void (*render)(
struct cairo *
cairo, uint32_t width, uint32_t height, uint32_t max_height,
const struct bm_menu *menu,
struct cairo_paint_result *result);
98 struct wl_display *display;
99 struct wl_registry *registry;
100 struct wl_compositor *compositor;
101 struct wl_output *output;
102 struct wl_seat *seat;
103 struct xdg_shell *xdg_shell;
104 struct wl_shell *shell;
114 void bm_wl_window_render(
struct window *
window,
const struct bm_menu *menu);
115 bool bm_wl_window_create(
struct window *
window,
struct wl_shm *shm,
struct wl_shell *shell,
struct xdg_shell *xdg_shell,
struct wl_surface *surface);