diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-01 04:19:01 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-01 04:19:01 +0300 |
commit | 3d3ba9ca8e52cb0d8ed18e401821357754d5ce5e (patch) | |
tree | 6a9d93dee0776087837a2d0cccb6a7abed48d332 /intern/ghost/intern/GHOST_WindowWayland.h | |
parent | cf64a1d73e0e0378049b4e24407e9a4406270e8a (diff) |
Cleanup: group public utility functions for Wayland System/Window
GHOST methods were mixed in with Wayland specific utility functions,
making it difficult to navigate or know where to add new functions.
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWayland.h')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWayland.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h index 1d0693ff1f8..be8ff45553d 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.h +++ b/intern/ghost/intern/GHOST_WindowWayland.h @@ -93,17 +93,14 @@ class GHOST_WindowWayland : public GHOST_Window { void setOpaque() const; #endif - /* WAYLAND utility functions. */ - - GHOST_TSuccess close(); - - GHOST_TSuccess activate(); - - GHOST_TSuccess deactivate(); - - GHOST_TSuccess notify_size(); + /* WAYLAND direct-data access. */ + uint16_t dpi() const; + int scale() const; struct wl_surface *surface() const; + const std::vector<output_t *> &outputs(); + + /* WAYLAND query access. */ /** * Use window find function when the window may have been closed. @@ -117,17 +114,21 @@ class GHOST_WindowWayland : public GHOST_Window { static const GHOST_WindowWayland *from_surface(const wl_surface *surface); static GHOST_WindowWayland *from_surface_mut(wl_surface *surface); - output_t *output_find_by_wl(struct wl_output *output); + /* WAYLAND window-level functions. */ - const std::vector<output_t *> &outputs(); + GHOST_TSuccess close(); + GHOST_TSuccess activate(); + GHOST_TSuccess deactivate(); + GHOST_TSuccess notify_size(); + + /* WAYLAND utility functions. */ bool outputs_enter(output_t *reg_output); bool outputs_leave(output_t *reg_output); - bool outputs_changed_update_scale(); - - uint16_t dpi() const; + bool outputs_enter_wl(const struct wl_output *output); + bool outputs_leave_wl(const struct wl_output *output); - int scale() const; + bool outputs_changed_update_scale(); private: GHOST_SystemWayland *m_system; |