wlmaker
Loading...
Searching...
No Matches
server.h
Go to the documentation of this file.
1/* ========================================================================= */
20#ifndef __WLMAKER_SERVER_H__
21#define __WLMAKER_SERVER_H__
22
23#include <libbase/libbase.h>
24#include <libbase/plist.h>
25#include <stdbool.h>
26#include <stdint.h>
27#include <wayland-server-core.h>
28#include <xkbcommon/xkbcommon.h>
29#define WLR_USE_UNSTABLE
30#include <wlr/backend.h>
31#include <wlr/types/wlr_data_device.h>
32#include <wlr/types/wlr_seat.h>
33#undef WLR_USE_UNSTABLE
34
38
44
53
54#include "backend/backend.h"
55#include "config.h"
56#include "corner.h" // IWYU pragma: keep
57#include "cursor.h" // IWYU pragma: keep
58#include "icon_manager.h" // IWYU pragma: keep
59#include "idle.h" // IWYU pragma: keep
60#include "layer_shell.h" // IWYU pragma: keep
61#include "lock_mgr.h" // IWYU pragma: keep
62#include "root_menu.h" // IWYU pragma: keep
63#include "subprocess_monitor.h" // IWYU pragma: keep
64#include "toolkit/toolkit.h"
65#include "xdg_decoration.h" // IWYU pragma: keep
66#include "xdg_shell.h" // IWYU pragma: keep
67#include "xwl.h" // IWYU pragma: keep
68
69#ifdef __cplusplus
70extern "C" {
71#endif // __cplusplus
72
74typedef struct {
78 uint32_t width;
80 uint32_t height;
82
86 bspl_dict_t *config_dict_ptr;
89
91 struct wl_display *wl_display_ptr;
93 const char *wl_socket_name_ptr;
94
99
101 struct wlr_seat *wlr_seat_ptr;
103 struct wlr_scene *wlr_scene_ptr;
105 struct wlr_output_layout *wlr_output_layout_ptr;
106
109
110 // From tinywl.c: A few hands-off wlroots interfaces.
111
113 struct wlr_data_device_manager *wlr_data_device_manager_ptr;
114
133
135 bs_dllist_t input_devices;
136
142 struct wl_signal task_list_enabled_event;
144 struct wl_signal task_list_disabled_event;
145
147 bs_dllist_t bindings;
148
150 bs_dllist_t clients;
151
154
157
158 // TODO(kaeser@gubbe.ch): Move these events into a 'registry' struct, so
159 // it can be more easily shared throughout the code.
161 struct wl_signal window_created_event;
163 struct wl_signal window_destroyed_event;
164
167
171 bspl_array_t *root_menu_array_ptr;
174
177};
178
182 uint32_t modifiers;
186 xkb_keysym_t keysym;
189};
190
203 bspl_dict_t *config_dict_ptr,
204 const wlmaker_server_options_t *options_ptr);
205
212
223 wlmaker_server_t *server_ptr,
224 const wlmaker_key_combo_t *key_combo_ptr,
226
234 wlmaker_server_t *server_ptr,
235 wlmaker_key_binding_t *key_binding_ptr);
236
247 wlmaker_server_t *server_ptr,
248 xkb_keysym_t keysym,
249 uint32_t modifiers);
250
257
264
272struct wlr_output *wlmaker_server_get_output_at_cursor(
273 wlmaker_server_t *server_ptr);
274
276extern const uint32_t wlmaker_modifier_default_mask;
277
279extern const bs_test_case_t wlmaker_server_test_cases[];
280
281#ifdef __cplusplus
282} // extern "C"
283#endif // __cplusplus
284
285#endif /* __WLMAKER_SERVER_H__ */
286/* == End of server.h ================================================== */
void wlmaker_server_deactivate_task_list(wlmaker_server_t *server_ptr)
Definition server.c:407
const bs_test_case_t wlmaker_server_test_cases[]
Definition server.c:651
void wlmaker_server_unbind_key(wlmaker_server_t *server_ptr, wlmaker_key_binding_t *key_binding_ptr)
Definition server.c:450
void wlmaker_server_activate_task_list(wlmaker_server_t *server_ptr)
Definition server.c:400
bool wlmaker_keyboard_process_bindings(wlmaker_server_t *server_ptr, xkb_keysym_t keysym, uint32_t modifiers)
Definition server.c:459
const uint32_t wlmaker_modifier_default_mask
Definition server.c:90
bool(* wlmaker_keybinding_callback_t)(const wlmaker_key_combo_t *kc)
Definition server.h:52
struct wlr_output * wlmaker_server_get_output_at_cursor(wlmaker_server_t *server_ptr)
Definition server.c:424
wlmaker_key_binding_t * wlmaker_server_bind_key(wlmaker_server_t *server_ptr, const wlmaker_key_combo_t *key_combo_ptr, wlmaker_keybinding_callback_t callback)
Definition server.c:434
wlmaker_server_t * wlmaker_server_create(bspl_dict_t *config_dict_ptr, const wlmaker_server_options_t *options_ptr)
Definition server.c:103
void wlmaker_server_destroy(wlmaker_server_t *server_ptr)
Definition server.c:295
Definition corner.c:53
Definition cursor.h:41
Definition icon_manager.c:44
Definition idle.c:45
Definition server.c:63
Definition server.h:180
uint32_t modifiers
Definition server.h:182
uint32_t modifiers_mask
Definition server.h:184
xkb_keysym_t keysym
Definition server.h:186
bool ignore_case
Definition server.h:188
Definition layer_shell.c:38
Definition lock_mgr.c:55
Definition root_menu.c:36
Definition server.h:84
wlmaker_lock_mgr_t * lock_mgr_ptr
Definition server.h:96
wlmaker_root_menu_t * root_menu_ptr
Definition server.h:169
wlmaker_config_style_t style
Definition server.h:176
wlmaker_xwl_t * xwl_ptr
Definition server.h:132
struct wl_listener unclaimed_button_event_listener
Definition server.h:173
struct wlr_scene * wlr_scene_ptr
Definition server.h:103
wlmaker_icon_manager_t * icon_manager_ptr
Definition server.h:126
wlmaker_xdg_shell_t * xdg_shell_ptr
Definition server.h:118
bs_dllist_t input_devices
Definition server.h:135
bs_dllist_t clients
Definition server.h:150
struct wl_signal task_list_enabled_event
Definition server.h:142
struct wl_signal window_created_event
Definition server.h:161
wlmaker_idle_monitor_t * idle_monitor_ptr
Definition server.h:98
struct wlr_seat * wlr_seat_ptr
Definition server.h:101
bspl_dict_t * config_dict_ptr
Definition server.h:86
wlmaker_corner_t * corner_ptr
Definition server.h:156
wlmtk_dock_t * clip_dock_ptr
Definition server.h:166
struct wl_listener backend_new_input_device_listener
Definition server.h:108
struct wl_signal task_list_disabled_event
Definition server.h:144
wlmtk_root_t * root_ptr
Definition server.h:138
wlmaker_subprocess_monitor_t * monitor_ptr
Definition server.h:153
bool task_list_enabled
Definition server.h:140
const char * wl_socket_name_ptr
Definition server.h:93
struct wlr_output_layout * wlr_output_layout_ptr
Definition server.h:105
wlmaker_layer_shell_t * layer_shell_ptr
Definition server.h:122
wlmaker_cursor_t * cursor_ptr
Definition server.h:116
struct wl_signal window_destroyed_event
Definition server.h:163
const wlmaker_server_options_t * options_ptr
Definition server.h:88
bs_dllist_t bindings
Definition server.h:147
struct wl_display * wl_display_ptr
Definition server.h:91
wlmaker_xdg_decoration_manager_t * xdg_decoration_manager_ptr
Definition server.h:120
struct wlr_data_device_manager * wlr_data_device_manager_ptr
Definition server.h:113
wlmbe_backend_t * backend_ptr
Definition server.h:124
bspl_array_t * root_menu_array_ptr
Definition server.h:171
Definition subprocess_monitor.c:40
Definition xdg_decoration.c:41
Definition xdg_shell.h:39
Definition xwl.c:87
Definition backend.c:52
Definition dock.c:35
Definition root.c:45
Definition config.h:73
Definition server.h:74
uint32_t width
Definition server.h:78
bool start_xwayland
Definition server.h:76
uint32_t height
Definition server.h:80