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
37
42
51
52#include "backend/backend.h"
53#include "config.h"
54#include "corner.h" // IWYU pragma: keep
55#include "cursor.h" // IWYU pragma: keep
56#include "files.h"
57#include "icon_manager.h" // IWYU pragma: keep
58#include "input_observation.h"
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
88 bspl_dict_t *config_dict_ptr;
91
93 struct wl_display *wl_display_ptr;
95 const char *wl_socket_name_ptr;
96
101
103 struct wlr_seat *wlr_seat_ptr;
105 struct wlr_scene *wlr_scene_ptr;
107 struct wlr_output_layout *wlr_output_layout_ptr;
108
111
112 // From tinywl.c: A few hands-off wlroots interfaces.
113
115 struct wlr_data_device_manager *wlr_data_device_manager_ptr;
116
137
139 bs_dllist_t input_devices;
140
146 struct wl_signal task_list_enabled_event;
148 struct wl_signal task_list_disabled_event;
149
151 bs_dllist_t bindings;
152
154 bs_dllist_t clients;
155
158
161
162 // TODO(kaeser@gubbe.ch): Move these events into a 'registry' struct, so
163 // it can be more easily shared throughout the code.
165 struct wl_signal window_created_event;
167 struct wl_signal window_destroyed_event;
168
171
175 bspl_array_t *root_menu_array_ptr;
178
181};
182
186 uint32_t modifiers;
190 xkb_keysym_t keysym;
193};
194
208 bspl_dict_t *config_dict_ptr,
209 wlmaker_files_t *files_ptr,
210 const wlmaker_server_options_t *options_ptr);
211
218
229 wlmaker_server_t *server_ptr,
230 const wlmaker_key_combo_t *key_combo_ptr,
232
240 wlmaker_server_t *server_ptr,
241 wlmaker_key_binding_t *key_binding_ptr);
242
253 wlmaker_server_t *server_ptr,
254 xkb_keysym_t keysym,
255 uint32_t modifiers);
256
263
270
278struct wlr_output *wlmaker_server_get_output_at_cursor(
279 wlmaker_server_t *server_ptr);
280
282extern const uint32_t wlmaker_modifier_default_mask;
283
285extern const bs_test_set_t wlmaker_server_test_set;
286
287#ifdef __cplusplus
288} // extern "C"
289#endif // __cplusplus
290
291#endif /* __WLMAKER_SERVER_H__ */
292/* == End of server.h ================================================== */
const bs_test_set_t wlmaker_server_test_set
Definition server.c:693
void wlmaker_server_deactivate_task_list(wlmaker_server_t *server_ptr)
Definition server.c:443
void wlmaker_server_unbind_key(wlmaker_server_t *server_ptr, wlmaker_key_binding_t *key_binding_ptr)
Definition server.c:486
void wlmaker_server_activate_task_list(wlmaker_server_t *server_ptr)
Definition server.c:436
bool wlmaker_keyboard_process_bindings(wlmaker_server_t *server_ptr, xkb_keysym_t keysym, uint32_t modifiers)
Definition server.c:495
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:50
struct wlr_output * wlmaker_server_get_output_at_cursor(wlmaker_server_t *server_ptr)
Definition server.c:460
wlmaker_server_t * wlmaker_server_create(bspl_dict_t *config_dict_ptr, wlmaker_files_t *files_ptr, const wlmaker_server_options_t *options_ptr)
Definition server.c:103
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:470
void wlmaker_server_destroy(wlmaker_server_t *server_ptr)
Definition server.c:320
Definition corner.c:53
Definition cursor.h:40
Definition files.c:32
Definition icon_manager.c:43
Definition idle.c:43
Definition input_observation.c:46
Definition server.c:63
Definition server.h:184
uint32_t modifiers
Definition server.h:186
uint32_t modifiers_mask
Definition server.h:188
xkb_keysym_t keysym
Definition server.h:190
bool ignore_case
Definition server.h:192
Definition layer_shell.c:38
Definition lock_mgr.c:52
Definition root_menu.c:50
Definition server.h:84
wlmaker_lock_mgr_t * lock_mgr_ptr
Definition server.h:98
wlmaker_root_menu_t * root_menu_ptr
Definition server.h:173
wlmaker_config_style_t style
Definition server.h:180
wlmaker_xwl_t * xwl_ptr
Definition server.h:136
struct wl_listener unclaimed_button_event_listener
Definition server.h:177
struct wlr_scene * wlr_scene_ptr
Definition server.h:105
wlmaker_icon_manager_t * icon_manager_ptr
Definition server.h:128
wlmaker_files_t * files_ptr
Definition server.h:86
wlmaker_xdg_shell_t * xdg_shell_ptr
Definition server.h:120
bs_dllist_t input_devices
Definition server.h:139
bs_dllist_t clients
Definition server.h:154
struct wl_signal task_list_enabled_event
Definition server.h:146
struct wl_signal window_created_event
Definition server.h:165
wlmaker_idle_monitor_t * idle_monitor_ptr
Definition server.h:100
struct wlr_seat * wlr_seat_ptr
Definition server.h:103
bspl_dict_t * config_dict_ptr
Definition server.h:88
wlmaker_corner_t * corner_ptr
Definition server.h:160
wlmtk_dock_t * clip_dock_ptr
Definition server.h:170
struct wl_listener backend_new_input_device_listener
Definition server.h:110
struct wl_signal task_list_disabled_event
Definition server.h:148
wlmtk_root_t * root_ptr
Definition server.h:142
wlmaker_subprocess_monitor_t * monitor_ptr
Definition server.h:157
bool task_list_enabled
Definition server.h:144
const char * wl_socket_name_ptr
Definition server.h:95
struct wlr_output_layout * wlr_output_layout_ptr
Definition server.h:107
wlmaker_input_observation_manager_t * input_observation_manager_ptr
Definition server.h:130
wlmaker_layer_shell_t * layer_shell_ptr
Definition server.h:124
wlmaker_cursor_t * cursor_ptr
Definition server.h:118
struct wl_signal window_destroyed_event
Definition server.h:167
const wlmaker_server_options_t * options_ptr
Definition server.h:90
bs_dllist_t bindings
Definition server.h:151
struct wl_display * wl_display_ptr
Definition server.h:93
wlmaker_xdg_decoration_manager_t * xdg_decoration_manager_ptr
Definition server.h:122
struct wlr_data_device_manager * wlr_data_device_manager_ptr
Definition server.h:115
wlmbe_backend_t * backend_ptr
Definition server.h:126
bspl_array_t * root_menu_array_ptr
Definition server.h:175
Definition subprocess_monitor.c:39
Definition xdg_decoration.c:43
Definition xdg_shell.h:38
Definition xwl.c:87
Definition backend.c:54
Definition dock.c:35
Definition root.c:47
Definition config.h:74
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