Blender  V3.3
List of all members
GHOST_WindowWayland Class Reference

#include <GHOST_WindowWayland.h>

Inheritance diagram for GHOST_WindowWayland:
GHOST_Window GHOST_IWindow

Public Member Functions

Public WAYLAND Direct Data Access

Expose some members via methods.

uint16_t dpi () const
 
int scale () const
 
struct wl_surface * surface () const
 
const std::vector< output_t * > & outputs ()
 
Public WAYLAND Window Level Functions

High Level Windowing Utilities.

GHOST_TSuccess close ()
 
GHOST_TSuccess activate ()
 
GHOST_TSuccess deactivate ()
 
GHOST_TSuccess notify_size ()
 
Public WAYLAND Utility Functions

Functionality only used for the WAYLAND implementation.

bool outputs_enter (output_t *reg_output)
 
bool outputs_leave (output_t *reg_output)
 
bool outputs_changed_update_scale ()
 
- Public Member Functions inherited from GHOST_Window
 GHOST_Window (uint32_t width, uint32_t height, GHOST_TWindowState state, const bool wantStereoVisual=false, const bool exclusive=false)
 
virtual ~GHOST_Window ()
 
virtual bool getValid () const
 
virtual voidgetOSWindow () const
 
GHOST_TStandardCursor getCursorShape () const
 
GHOST_TSuccess setCursorShape (GHOST_TStandardCursor cursorShape)
 
GHOST_TSuccess setCustomCursorShape (uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
 
bool getCursorVisibility () const
 
GHOST_TGrabCursorMode getCursorGrabMode () const
 
bool getCursorGrabModeIsWarp () const
 
GHOST_TAxisFlag getCursorGrabAxis () const
 
void getCursorGrabInitPos (int32_t &x, int32_t &y) const
 
void getCursorGrabAccum (int32_t &x, int32_t &y) const
 
void setCursorGrabAccum (int32_t x, int32_t y)
 
GHOST_TSuccess setCursorVisibility (bool visible)
 
GHOST_TSuccess setCursorGrab (GHOST_TGrabCursorMode mode, GHOST_TAxisFlag wrap_axis, GHOST_Rect *bounds, int32_t mouse_ungrab_xy[2])
 
GHOST_TSuccess getCursorGrabBounds (GHOST_Rect &bounds)
 
void getCursorGrabState (GHOST_TGrabCursorMode &mode, GHOST_TAxisFlag &axis_flag, GHOST_Rect &bounds, bool &use_software_cursor)
 
virtual GHOST_TSuccess setProgressBar (float)
 
virtual GHOST_TSuccess endProgressBar ()
 
GHOST_TSuccess setSwapInterval (int interval)
 
GHOST_TSuccess getSwapInterval (int &intervalOut)
 
void setAcceptDragOperation (bool canAccept)
 
bool canAcceptDragOperation () const
 
virtual GHOST_TSuccess setModifiedState (bool isUnsavedChanges)
 
virtual bool getModifiedState ()
 
GHOST_TDrawingContextType getDrawingContextType ()
 
GHOST_TSuccess setDrawingContextType (GHOST_TDrawingContextType type)
 
virtual GHOST_TSuccess swapBuffers ()
 
virtual GHOST_TSuccess activateDrawingContext ()
 
GHOST_TSuccess updateDrawingContext ()
 
virtual unsigned int getDefaultFramebuffer ()
 
GHOST_TUserDataPtr getUserData () const
 
void setUserData (const GHOST_TUserDataPtr userData)
 
float getNativePixelSize (void)
 
- Public Member Functions inherited from GHOST_IWindow
virtual ~GHOST_IWindow ()
 

GHOST Implementation

WAYLAND specific implementation of the GHOST_Window interface.

GHOST_TSuccess hasCursorShape (GHOST_TStandardCursor cursorShape) override
 
 GHOST_WindowWayland (GHOST_SystemWayland *system, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, const GHOST_IWindow *parentWindow, GHOST_TDrawingContextType type, const bool is_dialog, const bool stereoVisual, const bool exclusive)
 
 ~GHOST_WindowWayland () override
 
uint16_t getDPIHint () override
 
GHOST_TSuccess setWindowCursorGrab (GHOST_TGrabCursorMode mode) override
 
GHOST_TSuccess setWindowCursorShape (GHOST_TStandardCursor shape) override
 
GHOST_TSuccess setWindowCustomCursorShape (uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor) override
 
bool getCursorGrabUseSoftwareDisplay () override
 
GHOST_TSuccess getCursorBitmap (GHOST_CursorBitmapRef *bitmap) override
 
void setTitle (const char *title) override
 
std::string getTitle () const override
 
void getWindowBounds (GHOST_Rect &bounds) const override
 
void getClientBounds (GHOST_Rect &bounds) const override
 
GHOST_TSuccess setClientWidth (uint32_t width) override
 
GHOST_TSuccess setClientHeight (uint32_t height) override
 
GHOST_TSuccess setClientSize (uint32_t width, uint32_t height) override
 
void screenToClient (int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
 
void clientToScreen (int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
 
GHOST_TSuccess setWindowCursorVisibility (bool visible) override
 
GHOST_TSuccess setState (GHOST_TWindowState state) override
 
GHOST_TWindowState getState () const override
 
GHOST_TSuccess invalidate () override
 
GHOST_TSuccess setOrder (GHOST_TWindowOrder order) override
 
GHOST_TSuccess beginFullScreen () const override
 
GHOST_TSuccess endFullScreen () const override
 
bool isDialog () const override
 

Additional Inherited Members

- Protected Member Functions inherited from GHOST_Window
GHOST_TSuccess releaseNativeHandles ()
 
- Protected Attributes inherited from GHOST_Window
GHOST_TDrawingContextType m_drawingContextType
 
GHOST_TUserDataPtr m_userData
 
bool m_cursorVisible
 
GHOST_TGrabCursorMode m_cursorGrab
 
GHOST_TAxisFlag m_cursorGrabAxis
 
int32_t m_cursorGrabInitPos [2]
 
int32_t m_cursorGrabAccumPos [2]
 
GHOST_Rect m_cursorGrabBounds
 
GHOST_TStandardCursor m_cursorShape
 
bool m_progressBarVisible
 
bool m_canAcceptDragOperation
 
bool m_isUnsavedChanges
 
bool m_fullScreen
 
bool m_wantStereoVisual
 
uint32_t m_fullScreenWidth
 
uint32_t m_fullScreenHeight
 
float m_nativePixelSize
 

Detailed Description

Definition at line 20 of file GHOST_WindowWayland.h.

Constructor & Destructor Documentation

◆ GHOST_WindowWayland()

GHOST_WindowWayland::GHOST_WindowWayland ( GHOST_SystemWayland system,
const char *  title,
int32_t  left,
int32_t  top,
uint32_t  width,
uint32_t  height,
GHOST_TWindowState  state,
const GHOST_IWindow parentWindow,
GHOST_TDrawingContextType  type,
const bool  is_dialog,
const bool  stereoVisual,
const bool  exclusive 
)

◆ ~GHOST_WindowWayland()

GHOST_WindowWayland::~GHOST_WindowWayland ( )
override

Member Function Documentation

◆ activate()

GHOST_TSuccess GHOST_WindowWayland::activate ( )

◆ beginFullScreen()

GHOST_TSuccess GHOST_WindowWayland::beginFullScreen ( ) const
overridevirtual

Implements GHOST_IWindow.

Definition at line 780 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess, libdecor_frame_set_fullscreen, and w().

◆ clientToScreen()

void GHOST_WindowWayland::clientToScreen ( int32_t  inX,
int32_t  inY,
int32_t outX,
int32_t outY 
) const
overridevirtual

Converts a point in client rectangle coordinates to screen coordinates.

Parameters
inXThe x-coordinate in the client rectangle.
inYThe y-coordinate in the client rectangle.
outXThe x-coordinate on the screen.
outYThe y-coordinate on the screen.

Implements GHOST_IWindow.

Definition at line 659 of file GHOST_WindowWayland.cpp.

◆ close()

GHOST_TSuccess GHOST_WindowWayland::close ( )

◆ deactivate()

GHOST_TSuccess GHOST_WindowWayland::deactivate ( )

◆ dpi()

uint16_t GHOST_WindowWayland::dpi ( ) const

Definition at line 870 of file GHOST_WindowWayland.cpp.

References w().

◆ endFullScreen()

GHOST_TSuccess GHOST_WindowWayland::endFullScreen ( void  ) const
overridevirtual

Implements GHOST_IWindow.

Definition at line 790 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess, libdecor_frame_unset_fullscreen, and w().

◆ getClientBounds()

void GHOST_WindowWayland::getClientBounds ( GHOST_Rect bounds) const
overridevirtual

Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.

Parameters
boundsThe bounding rectangle of the client area of the window.

Implements GHOST_IWindow.

Definition at line 619 of file GHOST_WindowWayland.cpp.

References bounds(), UNPACK2, and w().

Referenced by getWindowBounds(), relative_pointer_handle_relative_motion_impl(), and setWindowCursorGrab().

◆ getCursorBitmap()

GHOST_TSuccess GHOST_WindowWayland::getCursorBitmap ( GHOST_CursorBitmapRef bitmap)
overridevirtual

Reimplemented from GHOST_Window.

Definition at line 591 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::getCursorBitmap().

◆ getCursorGrabUseSoftwareDisplay()

bool GHOST_WindowWayland::getCursorGrabUseSoftwareDisplay ( )
overridevirtual

Return true when a software cursor should be used.

Reimplemented from GHOST_Window.

Definition at line 580 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::getCursorGrabUseSoftwareDisplay(), and GHOST_Window::m_cursorGrab.

◆ getDPIHint()

uint16_t GHOST_WindowWayland::getDPIHint ( )
overridevirtual

Returns the recommended DPI for this window.

Returns
The recommended DPI for this window.

Reimplemented from GHOST_Window.

Definition at line 698 of file GHOST_WindowWayland.cpp.

References w().

◆ getState()

GHOST_TWindowState GHOST_WindowWayland::getState ( ) const
overridevirtual

Returns the state of the window (normal, minimized, maximized).

Returns
The state of the window.

Implements GHOST_IWindow.

Definition at line 759 of file GHOST_WindowWayland.cpp.

References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateNormal, and w().

Referenced by setState().

◆ getTitle()

std::string GHOST_WindowWayland::getTitle ( ) const
overridevirtual

Returns the title displayed in the title bar.

Parameters
titleThe title displayed in the title bar.

Implements GHOST_IWindow.

Definition at line 609 of file GHOST_WindowWayland.cpp.

◆ getWindowBounds()

void GHOST_WindowWayland::getWindowBounds ( GHOST_Rect bounds) const
overridevirtual

Returns the window rectangle dimensions. These are screen coordinates.

Parameters
boundsThe bounding rectangle of the window.

Implements GHOST_IWindow.

Definition at line 614 of file GHOST_WindowWayland.cpp.

References bounds(), and getClientBounds().

◆ hasCursorShape()

GHOST_TSuccess GHOST_WindowWayland::hasCursorShape ( GHOST_TStandardCursor  cursorShape)
overridevirtual

Test if the standard cursor shape is supported by current platform.

Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 419 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::hasCursorShape().

◆ invalidate()

GHOST_TSuccess GHOST_WindowWayland::invalidate ( )
overridevirtual

Invalidates the contents of this window.

Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 770 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess.

◆ isDialog()

bool GHOST_WindowWayland::isDialog ( ) const
overridevirtual

Reimplemented from GHOST_Window.

Definition at line 800 of file GHOST_WindowWayland.cpp.

References w().

◆ notify_size()

GHOST_TSuccess GHOST_WindowWayland::notify_size ( )

◆ outputs()

const std::vector< output_t * > & GHOST_WindowWayland::outputs ( )

Definition at line 885 of file GHOST_WindowWayland.cpp.

References w().

Referenced by outputs_changed_update_scale(), outputs_enter(), and outputs_leave().

◆ outputs_changed_update_scale()

bool GHOST_WindowWayland::outputs_changed_update_scale ( )

◆ outputs_enter()

bool GHOST_WindowWayland::outputs_enter ( output_t reg_output)

Definition at line 971 of file GHOST_WindowWayland.cpp.

References outputs(), and w().

Referenced by surface_handle_enter().

◆ outputs_leave()

bool GHOST_WindowWayland::outputs_leave ( output_t reg_output)

Definition at line 982 of file GHOST_WindowWayland.cpp.

References outputs(), and w().

Referenced by surface_handle_leave().

◆ scale()

int GHOST_WindowWayland::scale ( ) const

◆ screenToClient()

void GHOST_WindowWayland::screenToClient ( int32_t  inX,
int32_t  inY,
int32_t outX,
int32_t outY 
) const
overridevirtual

Converts a point in screen coordinates to client rectangle coordinates

Parameters
inXThe x-coordinate on the screen.
inYThe y-coordinate on the screen.
outXThe x-coordinate in the client rectangle.
outYThe y-coordinate in the client rectangle.

Implements GHOST_IWindow.

Definition at line 650 of file GHOST_WindowWayland.cpp.

◆ setClientHeight()

GHOST_TSuccess GHOST_WindowWayland::setClientHeight ( uint32_t  height)
overridevirtual

Resizes client rectangle height.

Parameters
heightThe new height of the client area of the window.

Implements GHOST_IWindow.

Definition at line 629 of file GHOST_WindowWayland.cpp.

References height, setClientSize(), and w().

◆ setClientSize()

GHOST_TSuccess GHOST_WindowWayland::setClientSize ( uint32_t  width,
uint32_t  height 
)
overridevirtual

Resizes client rectangle.

Parameters
widthThe new width of the client area of the window.
heightThe new height of the client area of the window.

Implements GHOST_IWindow.

Definition at line 634 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess, height, notify_size(), w(), width, and wl_egl_window_resize.

Referenced by setClientHeight(), and setClientWidth().

◆ setClientWidth()

GHOST_TSuccess GHOST_WindowWayland::setClientWidth ( uint32_t  width)
overridevirtual

Resizes client rectangle width.

Parameters
widthThe new width of the client area of the window.

Implements GHOST_IWindow.

Definition at line 624 of file GHOST_WindowWayland.cpp.

References setClientSize(), w(), and width.

◆ setOrder()

GHOST_TSuccess GHOST_WindowWayland::setOrder ( GHOST_TWindowOrder  order)
overridevirtual

Sets the order of the window (bottom, top).

Parameters
orderThe order of the window.
Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 775 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess.

◆ setState()

GHOST_TSuccess GHOST_WindowWayland::setState ( GHOST_TWindowState  state)
overridevirtual

◆ setTitle()

void GHOST_WindowWayland::setTitle ( const char *  title)
overridevirtual

Sets the title displayed in the title bar.

Parameters
titleThe title to display in the title bar.

Implements GHOST_IWindow.

Definition at line 596 of file GHOST_WindowWayland.cpp.

References libdecor_frame_set_app_id, libdecor_frame_set_title, and w().

Referenced by GHOST_WindowWayland().

◆ setWindowCursorGrab()

GHOST_TSuccess GHOST_WindowWayland::setWindowCursorGrab ( GHOST_TGrabCursorMode  )
overridevirtual

◆ setWindowCursorShape()

GHOST_TSuccess GHOST_WindowWayland::setWindowCursorShape ( GHOST_TStandardCursor  shape)
overridevirtual

Sets the cursor shape on the window using native window system calls.

Implements GHOST_Window.

Definition at line 573 of file GHOST_WindowWayland.cpp.

References GHOST_kStandardCursorDefault, GHOST_kSuccess, GHOST_Window::m_cursorShape, and GHOST_SystemWayland::setCursorShape().

◆ setWindowCursorVisibility()

GHOST_TSuccess GHOST_WindowWayland::setWindowCursorVisibility ( bool  visible)
overridevirtual

Sets the cursor visibility on the window using native window system calls.

Implements GHOST_Window.

Definition at line 703 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::setCursorVisibility().

◆ setWindowCustomCursorShape()

GHOST_TSuccess GHOST_WindowWayland::setWindowCustomCursorShape ( uint8_t bitmap,
uint8_t mask,
int  szx,
int  szy,
int  hotX,
int  hotY,
bool  canInvertColor 
)
overridevirtual

Sets the cursor shape on the window using native window system calls.

Implements GHOST_Window.

Definition at line 585 of file GHOST_WindowWayland.cpp.

References mask(), and GHOST_SystemWayland::setCustomCursorShape().

◆ surface()

wl_surface * GHOST_WindowWayland::surface ( ) const

Definition at line 880 of file GHOST_WindowWayland.cpp.

References w().


The documentation for this class was generated from the following files: