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 "input_observation.h"
60#include "idle.h" // IWYU pragma: keep
61#include "layer_shell.h" // IWYU pragma: keep
62#include "lock_mgr.h" // IWYU pragma: keep
63#include "root_menu.h" // IWYU pragma: keep
64#include "subprocess_monitor.h" // IWYU pragma: keep
65#include "toolkit/toolkit.h"
66#include "xdg_decoration.h" // IWYU pragma: keep
67#include "xdg_shell.h" // IWYU pragma: keep
68#include "xwl.h" // IWYU pragma: keep
69
70#ifdef __cplusplus
71extern "C" {
72#endif // __cplusplus
73
75typedef struct {
79 uint32_t width;
81 uint32_t height;
83
87 bspl_dict_t *config_dict_ptr;
90
92 struct wl_display *wl_display_ptr;
94 const char *wl_socket_name_ptr;
95
100
102 struct wlr_seat *wlr_seat_ptr;
104 struct wlr_scene *wlr_scene_ptr;
106 struct wlr_output_layout *wlr_output_layout_ptr;
107
110
111 // From tinywl.c: A few hands-off wlroots interfaces.
112
114 struct wlr_data_device_manager *wlr_data_device_manager_ptr;
115
136
138 bs_dllist_t input_devices;
139
145 struct wl_signal task_list_enabled_event;
147 struct wl_signal task_list_disabled_event;
148
150 bs_dllist_t bindings;
151
153 bs_dllist_t clients;
154
157
160
161 // TODO(kaeser@gubbe.ch): Move these events into a 'registry' struct, so
162 // it can be more easily shared throughout the code.
164 struct wl_signal window_created_event;
166 struct wl_signal window_destroyed_event;
167
170
174 bspl_array_t *root_menu_array_ptr;
177
180};
181
185 uint32_t modifiers;
189 xkb_keysym_t keysym;
192};
193
206 bspl_dict_t *config_dict_ptr,
207 const wlmaker_server_options_t *options_ptr);
208
215
226 wlmaker_server_t *server_ptr,
227 const wlmaker_key_combo_t *key_combo_ptr,
229
237 wlmaker_server_t *server_ptr,
238 wlmaker_key_binding_t *key_binding_ptr);
239
250 wlmaker_server_t *server_ptr,
251 xkb_keysym_t keysym,
252 uint32_t modifiers);
253
260
267
275struct wlr_output *wlmaker_server_get_output_at_cursor(
276 wlmaker_server_t *server_ptr);
277
279extern const uint32_t wlmaker_modifier_default_mask;
280
282extern const bs_test_case_t wlmaker_server_test_cases[];
283
284#ifdef __cplusplus
285} // extern "C"
286#endif // __cplusplus
287
288#endif /* __WLMAKER_SERVER_H__ */
289/* == End of server.h ================================================== */
void wlmaker_server_deactivate_task_list(wlmaker_server_t *server_ptr)
Definition server.c:423
const bs_test_case_t wlmaker_server_test_cases[]
Definition server.c:667
void wlmaker_server_unbind_key(wlmaker_server_t *server_ptr, wlmaker_key_binding_t *key_binding_ptr)
Definition server.c:466
void wlmaker_server_activate_task_list(wlmaker_server_t *server_ptr)
Definition server.c:416
bool wlmaker_keyboard_process_bindings(wlmaker_server_t *server_ptr, xkb_keysym_t keysym, uint32_t modifiers)
Definition server.c:475
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:440
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:450
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:305
Definition corner.c:53
Definition cursor.h:41
Definition icon_manager.c:44
Definition idle.c:45
Definition input_observation.c:46
Definition server.c:63
Definition server.h:183
uint32_t modifiers
Definition server.h:185
uint32_t modifiers_mask
Definition server.h:187
xkb_keysym_t keysym
Definition server.h:189
bool ignore_case
Definition server.h:191
Definition layer_shell.c:38
Definition lock_mgr.c:55
Definition root_menu.c:50
Definition server.h:85
wlmaker_lock_mgr_t * lock_mgr_ptr
Definition server.h:97
wlmaker_root_menu_t * root_menu_ptr
Definition server.h:172
wlmaker_config_style_t style
Definition server.h:179
wlmaker_xwl_t * xwl_ptr
Definition server.h:135
struct wl_listener unclaimed_button_event_listener
Definition server.h:176
struct wlr_scene * wlr_scene_ptr
Definition server.h:104
wlmaker_icon_manager_t * icon_manager_ptr
Definition server.h:127
wlmaker_xdg_shell_t * xdg_shell_ptr
Definition server.h:119
bs_dllist_t input_devices
Definition server.h:138
bs_dllist_t clients
Definition server.h:153
struct wl_signal task_list_enabled_event
Definition server.h:145
struct wl_signal window_created_event
Definition server.h:164
wlmaker_idle_monitor_t * idle_monitor_ptr
Definition server.h:99
struct wlr_seat * wlr_seat_ptr
Definition server.h:102
bspl_dict_t * config_dict_ptr
Definition server.h:87
wlmaker_corner_t * corner_ptr
Definition server.h:159
wlmtk_dock_t * clip_dock_ptr
Definition server.h:169
struct wl_listener backend_new_input_device_listener
Definition server.h:109
struct wl_signal task_list_disabled_event
Definition server.h:147
wlmtk_root_t * root_ptr
Definition server.h:141
wlmaker_subprocess_monitor_t * monitor_ptr
Definition server.h:156
bool task_list_enabled
Definition server.h:143
const char * wl_socket_name_ptr
Definition server.h:94
struct wlr_output_layout * wlr_output_layout_ptr
Definition server.h:106
wlmaker_input_observation_manager_t * input_observation_manager_ptr
Definition server.h:129
wlmaker_layer_shell_t * layer_shell_ptr
Definition server.h:123
wlmaker_cursor_t * cursor_ptr
Definition server.h:117
struct wl_signal window_destroyed_event
Definition server.h:166
const wlmaker_server_options_t * options_ptr
Definition server.h:89
bs_dllist_t bindings
Definition server.h:150
struct wl_display * wl_display_ptr
Definition server.h:92
wlmaker_xdg_decoration_manager_t * xdg_decoration_manager_ptr
Definition server.h:121
struct wlr_data_device_manager * wlr_data_device_manager_ptr
Definition server.h:114
wlmbe_backend_t * backend_ptr
Definition server.h:125
bspl_array_t * root_menu_array_ptr
Definition server.h:174
Definition subprocess_monitor.c:39
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:47
Definition config.h:73
Definition server.h:75
uint32_t width
Definition server.h:79
bool start_xwayland
Definition server.h:77
uint32_t height
Definition server.h:81