16#ifdef WITH_GHOST_WAYLAND_DYNLOAD
19#include <wayland-client.h>
25#ifdef USE_EVENT_BACKGROUND_THREAD
107 int *r_buffer_scale);
109#define FRACTIONAL_DENOMINATOR 120
122#ifdef WITH_GHOST_WAYLAND_DYNLOAD
126bool ghost_wl_dynload_libraries_init();
127void ghost_wl_dynload_libraries_exit();
134 wl_output *
output =
nullptr;
139 struct zxdg_output_v1 *
output =
nullptr;
186#ifdef WITH_GHOST_DBUS
193struct GHOST_SystemDBusSettings {
195 std::atomic<uint32_t> color_scheme = -1;
218 void putClipboard(
const char *buffer,
bool selection)
const override;
272 const bool exclusive,
273 const bool is_dialog,
324 const std::span<GWL_Output *const>
outputs_get()
const;
333 bool completed)
const;
395#ifdef USE_EVENT_BACKGROUND_THREAD
422 void display_destroy_and_free_all();
424#ifdef WITH_GHOST_DBUS
426 void dbus_watcher_start(
bool watch_cursor_size);
428 void dbus_event_push(GWL_DBusEvent dbus_event);
430 void dbus_events_handle_pending();
436 void dbus_event_handle(
const GWL_DBusEvent &dbus_event);
441#ifdef WITH_GHOST_DBUS
442 std::unique_ptr<GHOST_SystemDBusUnix> dbus_watcher_;
443 GHOST_SystemDBusSettings dbus_;
bool ghost_wl_surface_own(const wl_surface *wl_surface)
void ghost_wl_output_tag(wl_output *wl_output)
GHOST_WindowWayland * ghost_wl_surface_user_data(wl_surface *wl_surface)
void ghost_wl_surface_tag_cursor_tablet(wl_surface *wl_surface)
bool ghost_wl_surface_own_cursor_tablet(const wl_surface *wl_surface)
GWL_Output * ghost_wl_output_user_data(wl_output *wl_output)
void ghost_wl_surface_tag(wl_surface *wl_surface)
bool ghost_wl_display_report_error_if_set(wl_display *display)
void ghost_wl_surface_tag_cursor_pointer(wl_surface *wl_surface)
bool ghost_wl_output_own(const wl_output *wl_output)
bool ghost_wl_surface_own_cursor_pointer(const wl_surface *wl_surface)
wl_buffer * ghost_wl_buffer_create_transparent_pixel(wl_shm *shm)
bool ghost_wl_surface_own_with_null_check(const wl_surface *wl_surface)
wl_fixed_t gwl_window_scale_wl_fixed_to(const GWL_WindowScaleParams &scale_params, wl_fixed_t value)
wl_fixed_t gwl_window_scale_wl_fixed_from(const GWL_WindowScaleParams &scale_params, wl_fixed_t value)
int gwl_window_scale_int_to(const GWL_WindowScaleParams &scale_params, int value)
#define FRACTIONAL_DENOMINATOR
int gwl_window_scale_buffer_size_to(const GWL_WindowScaleParams &scale_params, int logical_size, int *r_buffer_scale)
int gwl_window_scale_int_from(const GWL_WindowScaleParams &scale_params, int value)
GHOST_TDrawingContextType
GHOST_TConsoleWindowState
unsigned long long int uint64_t
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
struct zwp_primary_selection_device_manager_v1 * wp_primary_selection_manager_get()
static const char * xdg_app_id_get()
bool supports_color_manager_extended_srgb_linear() const
struct wl_event_queue * wp_color_manager_queue_get()
void xdg_toplevel_icon_update(GHOST_WindowWayland *window, struct xdg_toplevel *toplevel)
bool supports_color_manager_feature_windows_scrgb() const
bool window_surface_unref(const wl_surface *wl_surface)
uint64_t getMilliSeconds() const override
GHOST_IContext * createOffscreenContext(GHOST_GPUSettings gpu_settings) override
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const override
GHOST_TSuccess cursor_visibility_set(bool visible)
std::thread::id main_thread_id
struct wl_display * wl_display_get()
bool use_window_frame_csd_get() const
char * getClipboard(bool selection) const override
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y) override
GHOST_TimerManager * key_repeat_timer_manager()
GHOST_SystemWayland(bool background)
const std::span< GWL_Output *const > outputs_get() const
bool cursor_grab_use_software_display_get(const GHOST_TGrabCursorMode mode)
uint64_t ms_from_input_time(const uint32_t timestamp_as_uint)
GHOST_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpu_settings, const bool exclusive, const bool is_dialog, const GHOST_IWindow *parent_window) override
uint * getClipboardImage(int *r_width, int *r_height) const override
struct xdg_wm_base * xdg_decor_shell_get()
struct wl_compositor * wl_compositor_get()
bool use_window_frame_get() const
struct wp_fractional_scale_manager_v1 * wp_fractional_scale_manager_get()
struct wl_subcompositor * wl_subcompositor_get()
int preferences_cursor_size_get() const
void setMultitouchGestures(const bool use) override
struct wl_shm * wl_shm_get() const
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const override
GHOST_TSuccess cursor_shape_set(GHOST_TStandardCursor shape)
GHOST_TSuccess disposeContext(GHOST_IContext *context) override
struct wp_viewporter * wp_viewporter_get()
struct zxdg_decoration_manager_v1 * xdg_decor_manager_get()
struct wl_seat * wl_seat_active_get_with_input_serial(uint32_t &serial)
GHOST_TSuccess cursor_bitmap_get(GHOST_CursorBitmapRef *bitmap)
GHOST_TSuccess pushEvent_maybe_pending(std::unique_ptr< const GHOST_IEvent > event)
GHOST_TSuccess cursor_shape_custom_set(const GHOST_CursorGenerator &cg)
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const override
void ime_begin(const GHOST_WindowWayland *win, int32_t x, int32_t y, int32_t w, int32_t h, bool completed) const
uint8_t getNumDisplays() const override
bool output_unref(struct wl_output *wl_output)
void putClipboard(const char *buffer, bool selection) const override
void output_scale_update(GWL_Output *output)
GHOST_TCapabilityFlag getCapabilities() const override
struct wp_color_manager_v1 * wp_color_manager_get()
bool window_cursor_grab_set(const GHOST_TGrabCursorMode mode, const GHOST_TGrabCursorMode mode_current, int32_t init_grab_xy[2], const GHOST_Rect *wrap_bounds, GHOST_TAxisFlag wrap_axis, wl_surface *wl_surface, const struct GWL_WindowScaleParams &scale_params, const GHOST_TDrawingContextType context_type)
std::atomic< bool > has_pending_actions_for_window
bool processEvents(bool waitForEvent) override
void seat_active_set(const struct GWL_Seat *seat)
GHOST_TSuccess getCursorPositionClientRelative(const GHOST_IWindow *window, int32_t &x, int32_t &y) const override
GHOST_TSuccess cursor_shape_check(GHOST_TStandardCursor cursor_shape)
GHOST_TSuccess setCursorPositionClientRelative(GHOST_IWindow *window, int32_t x, int32_t y) override
GHOST_TSuccess hasClipboardImage() const override
bool setConsoleWindowState(GHOST_TConsoleWindowState action) override
std::mutex * server_mutex
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const override
struct xdg_activation_v1 * xdg_activation_manager_get()
uint32_t getCursorPreferredLogicalSize() const override
struct zwp_pointer_gestures_v1 * wp_pointer_gestures_get()
void ime_end(const GHOST_WindowWayland *win) const
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const override
GHOST_TSuccess putClipboardImage(uint *rgba, int width, int height) const override
struct zxdg_output_v1 * output
bool has_position_logical
bool has_scale_fractional
struct GWL_Output::@371061212041022101244377303143126301040355372254 wl
int32_t position_logical[2]
struct GWL_Output::@365164314301162002323105114026146113150233044062 xdg
GHOST_SystemWayland * system