Blender  V2.93
List of all members
GHOST_WindowWayland Class Reference

#include <GHOST_WindowWayland.h>

Inherits GHOST_Window.

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, GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, const GHOST_IWindow *parentWindow, GHOST_TDrawingContextType type, const bool is_dialog, const bool stereoVisual, const bool exclusive)
 
 ~GHOST_WindowWayland () override
 
GHOST_TSuccess close ()
 
GHOST_TSuccess activate ()
 
GHOST_TSuccess deactivate ()
 
GHOST_TSuccess notify_size ()
 
GHOST_TSuccess setWindowCursorGrab (GHOST_TGrabCursorMode mode) override
 
GHOST_TSuccess setWindowCursorShape (GHOST_TStandardCursor shape) override
 
GHOST_TSuccess setWindowCustomCursorShape (GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor) 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 (GHOST_TUns32 width) override
 
GHOST_TSuccess setClientHeight (GHOST_TUns32 height) override
 
GHOST_TSuccess setClientSize (GHOST_TUns32 width, GHOST_TUns32 height) override
 
void screenToClient (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const override
 
void clientToScreen (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &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

- Public Member Functions inherited from GHOST_Window
 GHOST_Window (GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, const bool wantStereoVisual=false, const bool exclusive=false)
 
virtual ~GHOST_Window ()
 
virtual bool getValid () const
 
virtual void * getOSWindow () const
 
GHOST_TStandardCursor getCursorShape () const
 
GHOST_TSuccess setCursorShape (GHOST_TStandardCursor cursorShape)
 
GHOST_TSuccess setCustomCursorShape (GHOST_TUns8 *bitmap, GHOST_TUns8 *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 (GHOST_TInt32 &x, GHOST_TInt32 &y) const
 
void getCursorGrabAccum (GHOST_TInt32 &x, GHOST_TInt32 &y) const
 
void setCursorGrabAccum (GHOST_TInt32 x, GHOST_TInt32 y)
 
GHOST_TSuccess setCursorVisibility (bool visible)
 
GHOST_TSuccess setCursorGrab (GHOST_TGrabCursorMode mode, GHOST_TAxisFlag wrap_axis, GHOST_Rect *bounds, GHOST_TInt32 mouse_ungrab_xy[2])
 
GHOST_TSuccess getCursorGrabBounds (GHOST_Rect &bounds)
 
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)
 
virtual GHOST_TUns16 getDPIHint ()
 
- Public Member Functions inherited from GHOST_IWindow
virtual ~GHOST_IWindow ()
 
- 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
 
GHOST_TInt32 m_cursorGrabInitPos [2]
 
GHOST_TInt32 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
 
GHOST_TUns32 m_fullScreenWidth
 
GHOST_TUns32 m_fullScreenHeight
 
float m_nativePixelSize
 

Detailed Description

Definition at line 31 of file GHOST_WindowWayland.h.

Constructor & Destructor Documentation

◆ GHOST_WindowWayland()

GHOST_WindowWayland::GHOST_WindowWayland ( GHOST_SystemWayland system,
const char *  title,
GHOST_TInt32  left,
GHOST_TInt32  top,
GHOST_TUns32  width,
GHOST_TUns32  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

Definition at line 308 of file GHOST_WindowWayland.cpp.

References GHOST_Window::releaseNativeHandles(), and w().

Member Function Documentation

◆ activate()

GHOST_TSuccess GHOST_WindowWayland::activate ( void  )

◆ beginFullScreen()

GHOST_TSuccess GHOST_WindowWayland::beginFullScreen ( ) const
overrideprotectedvirtual

Implements GHOST_IWindow.

Definition at line 379 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess, and w().

◆ clientToScreen()

void GHOST_WindowWayland::clientToScreen ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const
overrideprotectedvirtual

Converts a point in screen coordinates to client rectangle 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 299 of file GHOST_WindowWayland.cpp.

◆ close()

GHOST_TSuccess GHOST_WindowWayland::close ( )

◆ deactivate()

GHOST_TSuccess GHOST_WindowWayland::deactivate ( void  )

◆ endFullScreen()

GHOST_TSuccess GHOST_WindowWayland::endFullScreen ( void  ) const
overrideprotectedvirtual

Implements GHOST_IWindow.

Definition at line 385 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess, and w().

◆ getClientBounds()

void GHOST_WindowWayland::getClientBounds ( GHOST_Rect bounds) const
overrideprotectedvirtual

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 269 of file GHOST_WindowWayland.cpp.

References bounds(), and w().

Referenced by getWindowBounds().

◆ getState()

GHOST_TWindowState GHOST_WindowWayland::getState ( ) const
overrideprotectedvirtual

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

Returns
The state of the window.

Implements GHOST_IWindow.

Definition at line 356 of file GHOST_WindowWayland.cpp.

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

Referenced by setState().

◆ getTitle()

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

Returns the title displayed in the title bar.

Parameters
titleThe title displayed in the title bar.

Implements GHOST_IWindow.

Definition at line 259 of file GHOST_WindowWayland.cpp.

◆ getWindowBounds()

void GHOST_WindowWayland::getWindowBounds ( GHOST_Rect bounds) const
overrideprotectedvirtual

Returns the window rectangle dimensions. These are screen coordinates.

Parameters
boundsThe bounding rectangle of the window.

Implements GHOST_IWindow.

Definition at line 264 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 134 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::hasCursorShape().

◆ invalidate()

GHOST_TSuccess GHOST_WindowWayland::invalidate ( )
overrideprotectedvirtual

Invalidates the contents of this window.

Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 369 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess.

◆ isDialog()

bool GHOST_WindowWayland::isDialog ( ) const
overrideprotectedvirtual

Reimplemented from GHOST_Window.

Definition at line 391 of file GHOST_WindowWayland.cpp.

References w().

◆ notify_size()

GHOST_TSuccess GHOST_WindowWayland::notify_size ( )

◆ screenToClient()

void GHOST_WindowWayland::screenToClient ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const
overrideprotectedvirtual

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 290 of file GHOST_WindowWayland.cpp.

◆ setClientHeight()

GHOST_TSuccess GHOST_WindowWayland::setClientHeight ( GHOST_TUns32  height)
overrideprotectedvirtual

Resizes client rectangle height.

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

Implements GHOST_IWindow.

Definition at line 279 of file GHOST_WindowWayland.cpp.

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

◆ setClientSize()

GHOST_TSuccess GHOST_WindowWayland::setClientSize ( GHOST_TUns32  width,
GHOST_TUns32  height 
)
overrideprotectedvirtual

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 284 of file GHOST_WindowWayland.cpp.

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

Referenced by setClientHeight(), and setClientWidth().

◆ setClientWidth()

GHOST_TSuccess GHOST_WindowWayland::setClientWidth ( GHOST_TUns32  width)
overrideprotectedvirtual

Resizes client rectangle width.

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

Implements GHOST_IWindow.

Definition at line 274 of file GHOST_WindowWayland.cpp.

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

◆ setOrder()

GHOST_TSuccess GHOST_WindowWayland::setOrder ( GHOST_TWindowOrder  order)
overrideprotectedvirtual

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

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

Implements GHOST_IWindow.

Definition at line 374 of file GHOST_WindowWayland.cpp.

References GHOST_kSuccess.

◆ setState()

GHOST_TSuccess GHOST_WindowWayland::setState ( GHOST_TWindowState  state)
overrideprotectedvirtual

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

Parameters
stateThe state of the window.
Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 325 of file GHOST_WindowWayland.cpp.

References getState(), GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowStateEmbedded, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, state, and w().

Referenced by GHOST_WindowWayland().

◆ setTitle()

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

Sets the title displayed in the title bar.

Parameters
titleThe title to display in the title bar.

Implements GHOST_IWindow.

Definition at line 252 of file GHOST_WindowWayland.cpp.

References w().

Referenced by GHOST_WindowWayland().

◆ setWindowCursorGrab()

GHOST_TSuccess GHOST_WindowWayland::setWindowCursorGrab ( GHOST_TGrabCursorMode  )
overrideprotectedvirtual

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

Reimplemented from GHOST_Window.

Definition at line 229 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::setCursorGrab(), and w().

◆ setWindowCursorShape()

GHOST_TSuccess GHOST_WindowWayland::setWindowCursorShape ( GHOST_TStandardCursor  shape)
overrideprotectedvirtual

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

Implements GHOST_Window.

Definition at line 234 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)
overrideprotectedvirtual

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

Implements GHOST_Window.

Definition at line 320 of file GHOST_WindowWayland.cpp.

References GHOST_SystemWayland::setCursorVisibility().

◆ setWindowCustomCursorShape()

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

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

Implements GHOST_Window.

Definition at line 241 of file GHOST_WindowWayland.cpp.

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


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