diff options
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWayland.h')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWayland.h | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h index d5dd123014b..c754e4cd9e7 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.h +++ b/intern/ghost/intern/GHOST_WindowWayland.h @@ -10,14 +10,12 @@ #include "GHOST_Window.h" -#include <unordered_set> #include <vector> class GHOST_SystemWayland; struct output_t; struct window_t; -struct wl_surface; class GHOST_WindowWayland : public GHOST_Window { public: @@ -38,27 +36,10 @@ class GHOST_WindowWayland : public GHOST_Window { ~GHOST_WindowWayland() override; - uint16_t getDPIHint() override; - - GHOST_TSuccess close(); - - GHOST_TSuccess activate(); - - GHOST_TSuccess deactivate(); - - GHOST_TSuccess notify_size(); - - wl_surface *surface() const; - - const std::vector<output_t *> &outputs() const; - - std::unordered_set<const output_t *> &outputs_active(); - - uint16_t &dpi(); + /* Ghost API */ - int &scale(); + uint16_t getDPIHint() override; - protected: GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override; GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override; @@ -70,6 +51,9 @@ class GHOST_WindowWayland : public GHOST_Window { int hotX, int hotY, bool canInvertColor) override; + bool getCursorGrabUseSoftwareDisplay() override; + + GHOST_TSuccess getCursorBitmap(GHOST_CursorBitmapRef *bitmap) override; void setTitle(const char *title) override; @@ -109,6 +93,27 @@ class GHOST_WindowWayland : public GHOST_Window { void setOpaque() const; #endif + /* WAYLAND direct-data access. */ + + uint16_t dpi() const; + int scale() const; + struct wl_surface *surface() const; + const std::vector<output_t *> &outputs(); + + /* WAYLAND window-level functions. */ + + 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(); + private: GHOST_SystemWayland *m_system; struct window_t *w; |