diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-08 09:05:36 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-08 09:05:36 +0300 |
commit | 1269bcce810d064612f7f38642440ee22d0fb007 (patch) | |
tree | 80b9796317720ed06946ad8d891e9bf8ecfb4040 /intern | |
parent | 8edd1d8aa597514d5089f8cf2aa640ec14c1e389 (diff) |
Cleanup: use doxy sections for wayland listeners
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 7e471d5c7d4..d89c67efc86 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -38,6 +38,10 @@ #include <cstring> +/* -------------------------------------------------------------------- */ +/** \name Private Types & Defines + * \{ */ + /** * Selected input event code defines from `linux/input-event-codes.h` * We include some of the button input event codes here, since the header is @@ -157,6 +161,12 @@ struct display_t { std::vector<struct wl_egl_window *> os_egl_windows; }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Private Utility Functions + * \{ */ + static GHOST_WindowManager *window_manager = nullptr; static void display_destroy(display_t *d) @@ -430,8 +440,10 @@ static const std::vector<std::string> mime_send = { "text/plain", }; +/** \} */ + /* -------------------------------------------------------------------- */ -/** \name Interface Callbacks +/** \name Listener (Relative Motion), #zwp_relative_pointer_v1_listener * * These callbacks are registered for Wayland interfaces and called when * an event is received from the compositor. @@ -467,6 +479,12 @@ static const zwp_relative_pointer_v1_listener relative_pointer_listener = { relative_pointer_relative_motion, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (Data Source), #wl_data_source_listener + * \{ */ + static void dnd_events(const input_t *const input, const GHOST_TEventType event) { const uint64_t time = input->system->getMilliSeconds(); @@ -582,6 +600,12 @@ static const struct wl_data_source_listener data_source_listener = { data_source_action, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (Data Device), #wl_data_device_listener + * \{ */ + static void data_offer_offer(void *data, struct wl_data_offer * /*wl_data_offer*/, const char *mime_type) @@ -795,6 +819,12 @@ static const struct wl_data_device_listener data_device_listener = { data_device_selection, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (Pointer), #wl_pointer_listener + * \{ */ + static void cursor_buffer_release(void *data, struct wl_buffer *wl_buffer) { cursor_t *cursor = static_cast<cursor_t *>(data); @@ -1032,6 +1062,12 @@ static const struct wl_pointer_listener pointer_listener = { pointer_axis, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (Keyboard), #wl_keyboard_listener + * \{ */ + static void keyboard_keymap( void *data, struct wl_keyboard * /*wl_keyboard*/, uint32_t format, int32_t fd, uint32_t size) { @@ -1237,6 +1273,12 @@ static const struct wl_keyboard_listener keyboard_listener = { keyboard_repeat_info, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (Output), #wl_output_listener + * \{ */ + static void seat_capabilities(void *data, struct wl_seat *wl_seat, uint32_t capabilities) { input_t *input = static_cast<input_t *>(data); @@ -1328,6 +1370,12 @@ static const struct wl_output_listener output_listener = { output_scale, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (XDG WM Base), #xdg_wm_base_listener + * \{ */ + static void shell_ping(void * /*data*/, struct xdg_wm_base *xdg_wm_base, uint32_t serial) { xdg_wm_base_pong(xdg_wm_base, serial); @@ -1337,6 +1385,12 @@ static const struct xdg_wm_base_listener shell_listener = { shell_ping, }; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Listener (Registry), #wl_registry_listener + * \{ */ + static void global_add(void *data, struct wl_registry *wl_registry, uint32_t name, |