Blender V4.5
GHOST_Window Class Referenceabstract

#include <GHOST_Window.hh>

Inherits GHOST_IWindow.

Inherited by GHOST_WindowCocoa, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWayland, GHOST_WindowWin32, and GHOST_WindowX11.

Public Member Functions

 GHOST_Window (uint32_t width, uint32_t height, GHOST_TWindowState state, const bool wantStereoVisual=false, const bool exclusive=false)
 
 ~GHOST_Window () override
 
bool getValid () const override
 
void * getOSWindow () const override
 
GHOST_TSuccess setPath (const char *) override
 
virtual GHOST_TWindowDecorationStyleFlags getWindowDecorationStyleFlags () override
 
virtual void setWindowDecorationStyleFlags (GHOST_TWindowDecorationStyleFlags styleFlags) override
 
virtual void setWindowDecorationStyleSettings (GHOST_WindowDecorationStyleSettings decorationSettings) override
 
virtual GHOST_TSuccess applyWindowDecorationStyle () override
 
GHOST_TStandardCursor getCursorShape () const override
 
bool isDialog () const override
 
GHOST_TSuccess setCursorShape (GHOST_TStandardCursor cursorShape) override
 
GHOST_TSuccess setCustomCursorShape (uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor) override
 
GHOST_TSuccess getCursorBitmap (GHOST_CursorBitmapRef *bitmap) override
 
bool getCursorVisibility () const override
 
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) override
 
GHOST_TSuccess setCursorGrab (GHOST_TGrabCursorMode mode, GHOST_TAxisFlag wrap_axis, GHOST_Rect *bounds, int32_t mouse_ungrab_xy[2]) override
 
GHOST_TSuccess getCursorGrabBounds (GHOST_Rect &bounds) const override
 
void getCursorGrabState (GHOST_TGrabCursorMode &mode, GHOST_TAxisFlag &wrap_axis, GHOST_Rect &bounds, bool &use_software_cursor) override
 
bool getCursorGrabUseSoftwareDisplay () override
 
GHOST_TSuccess setProgressBar (float) override
 
GHOST_TSuccess endProgressBar () override
 
GHOST_TSuccess setSwapInterval (int interval) override
 
GHOST_TSuccess getSwapInterval (int &intervalOut) override
 
void setAcceptDragOperation (bool canAccept) override
 
bool canAcceptDragOperation () const override
 
GHOST_TSuccess setModifiedState (bool isUnsavedChanges) override
 
bool getModifiedState () override
 
GHOST_TDrawingContextType getDrawingContextType () override
 
GHOST_TSuccess setDrawingContextType (GHOST_TDrawingContextType type) override
 
GHOST_IContextgetDrawingContext () override
 
GHOST_TSuccess swapBuffers () override
 
GHOST_TSuccess activateDrawingContext () override
 
GHOST_TSuccess updateDrawingContext ()
 
GHOST_ContextgetContext ()
 
unsigned int getDefaultFramebuffer () override
 
GHOST_TUserDataPtr getUserData () const override
 
void setUserData (const GHOST_TUserDataPtr userData) override
 
float getNativePixelSize () override
 
uint16_t getDPIHint () override
 
- Public Member Functions inherited from GHOST_IWindow
virtual ~GHOST_IWindow ()=default
 
virtual void setTitle (const char *title)=0
 
virtual std::string getTitle () const =0
 
virtual void getWindowBounds (GHOST_Rect &bounds) const =0
 
virtual void getClientBounds (GHOST_Rect &bounds) const =0
 
virtual GHOST_TSuccess setClientWidth (uint32_t width)=0
 
virtual GHOST_TSuccess setClientHeight (uint32_t height)=0
 
virtual GHOST_TSuccess setClientSize (uint32_t width, uint32_t height)=0
 
virtual void screenToClient (int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
 
virtual void clientToScreen (int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
 
virtual GHOST_TWindowState getState () const =0
 
virtual GHOST_TSuccess setState (GHOST_TWindowState state)=0
 
virtual GHOST_TSuccess setOrder (GHOST_TWindowOrder order)=0
 
virtual GHOST_TSuccess invalidate ()=0
 
virtual GHOST_TSuccess hasCursorShape (GHOST_TStandardCursor cursorShape)=0
 

Protected Member Functions

virtual GHOST_ContextnewDrawingContext (GHOST_TDrawingContextType type)=0
 
virtual GHOST_TSuccess setWindowCursorVisibility (bool visible)=0
 
virtual GHOST_TSuccess setWindowCursorGrab (GHOST_TGrabCursorMode)
 
virtual GHOST_TSuccess setWindowCursorShape (GHOST_TStandardCursor shape)=0
 
virtual GHOST_TSuccess setWindowCustomCursorShape (uint8_t *bitmap, uint8_t *mask, int szx, int szy, int hotX, int hotY, bool canInvertColor)=0
 
GHOST_TSuccess releaseNativeHandles ()
 

Protected Attributes

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
 
GHOST_TWindowDecorationStyleFlags m_windowDecorationStyleFlags
 
GHOST_WindowDecorationStyleSettings m_windowDecorationStyleSettings
 
bool m_wantStereoVisual
 
uint32_t m_fullScreenWidth
 
uint32_t m_fullScreenHeight
 
float m_nativePixelSize
 

Detailed Description

Platform independent implementation of GHOST_IWindow. Dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. Implements part of the GHOST_IWindow interface and adds some methods to be implemented by sub-classes of this class.

Definition at line 23 of file GHOST_Window.hh.

Constructor & Destructor Documentation

◆ GHOST_Window()

GHOST_Window::GHOST_Window ( uint32_t width,
uint32_t height,
GHOST_TWindowState state,
const bool wantStereoVisual = false,
const bool exclusive = false )

Constructor. Creates a new window and opens it. To check if the window was created properly, use the getValid() method.

Parameters
widthThe width of the window.
heightThe height of the window.
stateThe state the window is initially opened with.
wantStereoVisualStereo visual for quad buffered stereo.
exclusiveUse to show the window on top and ignore others (used full-screen).

Copyright (C) 2001 NaN Technologies B.V.

Definition at line 19 of file GHOST_Window.cc.

References GHOST_kWindowStateFullScreen, m_fullScreen, m_fullScreenHeight, m_fullScreenWidth, and state.

◆ ~GHOST_Window()

GHOST_Window::~GHOST_Window ( )
override

Inherited from GHOST_ISystem

implementation. virtual bool getValid() const = 0; virtual void setTitle(const char * title) = 0; virtual std::string getTitle() const = 0; virtual void getWindowBounds(GHOST_Rect& bounds) const = 0; virtual void getClientBounds(GHOST_Rect& bounds) const = 0; virtual GHOST_TSuccess setClientWidth(uint32_t width) = 0; virtual GHOST_TSuccess setClientHeight(uint32_t height) = 0; virtual GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) = 0; virtual void screenToClient( int32_t inX, int32_t inY, int32_t& outX, int32_t& outY) const = 0; virtual void clientToScreen( int32_t inX, int32_t inY, int32_t& outX, int32_t& outY) const = 0; virtual GHOST_TWindowState getState() const = 0; virtual GHOST_TSuccess setState(GHOST_TWindowState state) = 0; virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order) = 0; virtual GHOST_TSuccess swapBuffers() = 0; virtual GHOST_TSuccess setSwapInterval() = 0; virtual GHOST_TSuccess getSwapInterval(int& intervalOut) = 0; virtual GHOST_TSuccess activateDrawingContext() = 0; virtual GHOST_TSuccess invalidate() = 0; Destructor. Closes the window and disposes resources allocated.

Definition at line 50 of file GHOST_Window.cc.

Member Function Documentation

◆ activateDrawingContext()

GHOST_TSuccess GHOST_Window::activateDrawingContext ( )
overridevirtual

Activates the drawing context of this window.

Returns
A boolean success indicator.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowNULL.

Definition at line 135 of file GHOST_Window.cc.

References GHOST_Context::activateDrawingContext().

Referenced by GHOST_WindowCocoa::GHOST_WindowCocoa().

◆ applyWindowDecorationStyle()

virtual GHOST_TSuccess GHOST_Window::applyWindowDecorationStyle ( )
inlineoverridevirtual

Apply the window decoration style using the current flags and settings.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, and GHOST_WindowWin32.

Definition at line 114 of file GHOST_Window.hh.

References GHOST_kSuccess.

◆ canAcceptDragOperation()

bool GHOST_Window::canAcceptDragOperation ( ) const
overridevirtual

Returns acceptance of the dropped object Usually called by the "object dropped" event handling function

Implements GHOST_IWindow.

Definition at line 258 of file GHOST_Window.cc.

References m_canAcceptDragOperation.

Referenced by GHOST_DropTargetWin32::DragOver(), and GHOST_DropTargetWin32::Drop().

◆ endProgressBar()

GHOST_TSuccess GHOST_Window::endProgressBar ( )
inlineoverridevirtual

Hides the progress bar in the icon

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, GHOST_WindowWin32, and GHOST_WindowX11.

Definition at line 211 of file GHOST_Window.hh.

References GHOST_kFailure.

◆ getContext()

GHOST_Context * GHOST_Window::getContext ( )

Get the drawing context associated with this window.

Returns
Pointer to the context object.

Definition at line 118 of file GHOST_Window.cc.

Referenced by blender::gpu::MTLContext::MTLContext().

◆ getCursorBitmap()

GHOST_TSuccess GHOST_Window::getCursorBitmap ( GHOST_CursorBitmapRef * bitmap)
overridevirtual

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowWayland.

Definition at line 247 of file GHOST_Window.cc.

References GHOST_kFailure.

◆ getCursorGrabAccum()

void GHOST_Window::getCursorGrabAccum ( int32_t & x,
int32_t & y ) const
inline

◆ getCursorGrabAxis()

GHOST_TAxisFlag GHOST_Window::getCursorGrabAxis ( ) const
inline

◆ getCursorGrabBounds()

GHOST_TSuccess GHOST_Window::getCursorGrabBounds ( GHOST_Rect & bounds) const
overridevirtual

◆ getCursorGrabInitPos()

void GHOST_Window::getCursorGrabInitPos ( int32_t & x,
int32_t & y ) const
inline

Definition at line 484 of file GHOST_Window.hh.

References m_cursorGrabInitPos, x, and y.

Referenced by GHOST_SystemCocoa::handleMouseEvent().

◆ getCursorGrabMode()

GHOST_TGrabCursorMode GHOST_Window::getCursorGrabMode ( ) const
inline

◆ getCursorGrabModeIsWarp()

◆ getCursorGrabState()

void GHOST_Window::getCursorGrabState ( GHOST_TGrabCursorMode & mode,
GHOST_TAxisFlag & wrap_axis,
GHOST_Rect & bounds,
bool & use_software_cursor )
overridevirtual

◆ getCursorGrabUseSoftwareDisplay()

bool GHOST_Window::getCursorGrabUseSoftwareDisplay ( )
overridevirtual

Return true when a software cursor should be used.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowWayland.

Definition at line 222 of file GHOST_Window.cc.

Referenced by getCursorGrabState().

◆ getCursorShape()

GHOST_TStandardCursor GHOST_Window::getCursorShape ( ) const
inlineoverridevirtual

Returns the current cursor shape.

Returns
The current cursor shape.

Implements GHOST_IWindow.

Definition at line 502 of file GHOST_Window.hh.

References m_cursorShape.

Referenced by gwl_window_pending_actions_handle(), GHOST_SystemCocoa::handleWindowEvent(), GHOST_SystemWin32::s_wndProc(), and GHOST_WindowX11::setWindowCursorVisibility().

◆ getCursorVisibility()

bool GHOST_Window::getCursorVisibility ( ) const
inlineoverridevirtual

Returns the visibility state of the cursor.

Returns
The visibility state of the cursor.

Implements GHOST_IWindow.

Definition at line 464 of file GHOST_Window.hh.

References m_cursorVisible.

Referenced by GHOST_SystemCocoa::handleWindowEvent(), and GHOST_SystemWin32::s_wndProc().

◆ getDefaultFramebuffer()

uint GHOST_Window::getDefaultFramebuffer ( )
overridevirtual

Gets the OpenGL frame-buffer associated with the window's contents.

Returns
The ID of an OpenGL frame-buffer object.

Implements GHOST_IWindow.

Definition at line 123 of file GHOST_Window.cc.

References GHOST_Context::getDefaultFramebuffer().

◆ getDPIHint()

uint16_t GHOST_Window::getDPIHint ( )
inlineoverridevirtual

Returns the recommended DPI for this window.

Returns
The recommended DPI for this window.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowSDL, GHOST_WindowWayland, GHOST_WindowWin32, and GHOST_WindowX11.

Definition at line 340 of file GHOST_Window.hh.

◆ getDrawingContext()

GHOST_IContext * GHOST_Window::getDrawingContext ( )
overridevirtual

Returns the drawing context used in this window.

Returns
The current drawing context.

Implements GHOST_IWindow.

Definition at line 98 of file GHOST_Window.cc.

◆ getDrawingContextType()

GHOST_TDrawingContextType GHOST_Window::getDrawingContextType ( )
inlineoverridevirtual

Returns the type of drawing context used in this window.

Returns
The current type of drawing context.

Implements GHOST_IWindow.

Definition at line 459 of file GHOST_Window.hh.

References m_drawingContextType.

◆ getModifiedState()

bool GHOST_Window::getModifiedState ( )
overridevirtual

Gets the window "modified" status, indicating unsaved changes

Returns
True if there are unsaved changes

Implements GHOST_IWindow.

Definition at line 270 of file GHOST_Window.cc.

References m_isUnsavedChanges.

◆ getNativePixelSize()

float GHOST_Window::getNativePixelSize ( )
inlineoverridevirtual

Implements GHOST_IWindow.

Definition at line 328 of file GHOST_Window.hh.

References m_nativePixelSize.

◆ getOSWindow()

void * GHOST_Window::getOSWindow ( ) const
overridevirtual

Returns the associated OS object/handle

Returns
The associated OS object/handle

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, and GHOST_WindowWin32.

Definition at line 55 of file GHOST_Window.cc.

◆ getSwapInterval()

GHOST_TSuccess GHOST_Window::getSwapInterval ( int & intervalOut)
overridevirtual

Gets the current swap interval for swapBuffers.

Returns
An integer.

Implements GHOST_IWindow.

Definition at line 113 of file GHOST_Window.cc.

References GHOST_Context::getSwapInterval().

◆ getUserData()

GHOST_TUserDataPtr GHOST_Window::getUserData ( ) const
inlineoverridevirtual

Returns the window user data.

Returns
The window user data.

Implements GHOST_IWindow.

Definition at line 314 of file GHOST_Window.hh.

References m_userData.

◆ getValid()

bool GHOST_Window::getValid ( ) const
inlineoverridevirtual

Returns indication as to whether the window is valid.

Returns
The validity of the window.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWayland, GHOST_WindowWin32, and GHOST_WindowX11.

Definition at line 76 of file GHOST_Window.hh.

Referenced by GHOST_WindowCocoa::getValid(), GHOST_WindowSDL::getValid(), GHOST_WindowWayland::getValid(), GHOST_WindowWin32::getValid(), and GHOST_WindowX11::getValid().

◆ getWindowDecorationStyleFlags()

GHOST_TWindowDecorationStyleFlags GHOST_Window::getWindowDecorationStyleFlags ( )
overridevirtual

Return the current window decoration style flags.

Implements GHOST_IWindow.

Definition at line 60 of file GHOST_Window.cc.

References m_windowDecorationStyleFlags.

◆ isDialog()

bool GHOST_Window::isDialog ( ) const
inlineoverridevirtual

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, GHOST_WindowWayland, GHOST_WindowWin32, and GHOST_WindowX11.

Definition at line 125 of file GHOST_Window.hh.

◆ newDrawingContext()

virtual GHOST_Context * GHOST_Window::newDrawingContext ( GHOST_TDrawingContextType type)
protectedpure virtual

Tries to install a rendering context in this window.

Parameters
typeThe type of rendering context installed.
Returns
Indication as to whether installation has succeeded.

Implemented in GHOST_WindowCocoa, GHOST_WindowSDL, and GHOST_WindowX11.

Referenced by setDrawingContextType().

◆ releaseNativeHandles()

◆ setAcceptDragOperation()

void GHOST_Window::setAcceptDragOperation ( bool canAccept)
overridevirtual

Tells if the ongoing drag & drop object can be accepted upon mouse drop.

Implements GHOST_IWindow.

Definition at line 253 of file GHOST_Window.cc.

References m_canAcceptDragOperation.

Referenced by GHOST_DropTargetWin32::DragEnter().

◆ setCursorGrab()

GHOST_TSuccess GHOST_Window::setCursorGrab ( GHOST_TGrabCursorMode mode,
GHOST_TAxisFlag wrap_axis,
GHOST_Rect * bounds,
int32_t mouse_ungrab_xy[2] )
overridevirtual

Sets the cursor grab.

Parameters
modeThe new grab state of the cursor.
Returns
Indication of success.

Reimplemented from GHOST_IWindow.

Definition at line 159 of file GHOST_Window.cc.

References assert, bounds(), GHOST_IWindow::getClientBounds(), GHOST_kFailure, GHOST_kGrabDisable, GHOST_kSuccess, m_cursorGrab, m_cursorGrabAxis, m_cursorGrabBounds, m_cursorGrabInitPos, GHOST_Rect::m_l, GHOST_Rect::m_r, and setWindowCursorGrab().

◆ setCursorGrabAccum()

void GHOST_Window::setCursorGrabAccum ( int32_t x,
int32_t y )
inline

◆ setCursorShape()

GHOST_TSuccess GHOST_Window::setCursorShape ( GHOST_TStandardCursor cursorShape)
overridevirtual

Set the shape of the cursor.

Parameters
cursorShapeThe new cursor shape type id.
Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 228 of file GHOST_Window.cc.

References GHOST_kFailure, GHOST_kSuccess, m_cursorShape, and setWindowCursorShape().

◆ setCursorVisibility()

GHOST_TSuccess GHOST_Window::setCursorVisibility ( bool visible)
overridevirtual

Shows or hides the cursor.

Parameters
visibleThe new visibility state of the cursor.
Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 150 of file GHOST_Window.cc.

References GHOST_kFailure, GHOST_kSuccess, m_cursorVisible, and setWindowCursorVisibility().

◆ setCustomCursorShape()

GHOST_TSuccess GHOST_Window::setCustomCursorShape ( uint8_t * bitmap,
uint8_t * mask,
int sizex,
int sizey,
int hotX,
int hotY,
bool canInvertColor )
overridevirtual

Set the shape of the cursor to a custom cursor.

Parameters
bitmapThe bitmap data for the cursor.
maskThe mask data for the cursor.
hotXThe X coordinate of the cursor hot-spot.
hotYThe Y coordinate of the cursor hot-spot.
Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 237 of file GHOST_Window.cc.

References GHOST_kFailure, GHOST_kStandardCursorCustom, GHOST_kSuccess, m_cursorShape, mask(), and setWindowCustomCursorShape().

◆ setDrawingContextType()

GHOST_TSuccess GHOST_Window::setDrawingContextType ( GHOST_TDrawingContextType type)
overridevirtual

Tries to install a rendering context in this window. Child classes do not need to overload this method, They should overload newDrawingContext instead.

Parameters
typeThe type of rendering context installed.
Returns
Indication as to whether installation has succeeded.

Implements GHOST_IWindow.

Definition at line 76 of file GHOST_Window.cc.

References GHOST_kDrawingContextTypeNone, GHOST_kFailure, GHOST_kSuccess, m_drawingContextType, m_wantStereoVisual, and newDrawingContext().

Referenced by GHOST_WindowCocoa::GHOST_WindowCocoa(), GHOST_WindowSDL::GHOST_WindowSDL(), GHOST_WindowWayland::GHOST_WindowWayland(), GHOST_WindowWin32::GHOST_WindowWin32(), and GHOST_WindowX11::GHOST_WindowX11().

◆ setModifiedState()

GHOST_TSuccess GHOST_Window::setModifiedState ( bool isUnsavedChanges)
overridevirtual

Sets the window "modified" status, indicating unsaved changes

Parameters
isUnsavedChangesUnsaved changes or not.
Returns
Indication of success.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa.

Definition at line 263 of file GHOST_Window.cc.

References GHOST_kSuccess, and m_isUnsavedChanges.

Referenced by GHOST_WindowCocoa::setModifiedState().

◆ setPath()

GHOST_TSuccess GHOST_Window::setPath ( const char * filepath)
inlineoverridevirtual

Sets the file name represented by this window.

Parameters
filepathThe file directory.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, and GHOST_WindowNULL.

Definition at line 87 of file GHOST_Window.hh.

References GHOST_kFailure.

◆ setProgressBar()

GHOST_TSuccess GHOST_Window::setProgressBar ( float )
inlineoverridevirtual

Sets the progress bar value displayed in the window/application icon

Parameters
progressThe progress percentage (0.0 to 1.0).

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, GHOST_WindowWin32, and GHOST_WindowX11.

Definition at line 203 of file GHOST_Window.hh.

References GHOST_kFailure.

◆ setSwapInterval()

GHOST_TSuccess GHOST_Window::setSwapInterval ( int interval)
overridevirtual

Sets the swap interval for swapBuffers.

Parameters
intervalThe swap interval to use.
Returns
A boolean success indicator.

Implements GHOST_IWindow.

Definition at line 108 of file GHOST_Window.cc.

References GHOST_Context::setSwapInterval().

Referenced by GHOST_WindowWayland::GHOST_WindowWayland().

◆ setUserData()

void GHOST_Window::setUserData ( const GHOST_TUserDataPtr userData)
inlineoverridevirtual

Changes the window user data.

Parameters
userDataThe window user data.

Implements GHOST_IWindow.

Definition at line 323 of file GHOST_Window.hh.

References m_userData.

◆ setWindowCursorGrab()

virtual GHOST_TSuccess GHOST_Window::setWindowCursorGrab ( GHOST_TGrabCursorMode )
inlineprotectedvirtual

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

Reimplemented in GHOST_WindowCocoa, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWayland, and GHOST_WindowX11.

Definition at line 376 of file GHOST_Window.hh.

References GHOST_kSuccess.

Referenced by setCursorGrab().

◆ setWindowCursorShape()

virtual GHOST_TSuccess GHOST_Window::setWindowCursorShape ( GHOST_TStandardCursor shape)
protectedpure virtual

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

Implemented in GHOST_WindowCocoa, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWayland, and GHOST_WindowX11.

Referenced by setCursorShape().

◆ setWindowCursorVisibility()

virtual GHOST_TSuccess GHOST_Window::setWindowCursorVisibility ( bool visible)
protectedpure virtual

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

Implemented in GHOST_WindowCocoa, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWayland, and GHOST_WindowX11.

Referenced by setCursorVisibility().

◆ setWindowCustomCursorShape()

virtual GHOST_TSuccess GHOST_Window::setWindowCustomCursorShape ( uint8_t * bitmap,
uint8_t * mask,
int szx,
int szy,
int hotX,
int hotY,
bool canInvertColor )
protectedpure virtual

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

Implemented in GHOST_WindowCocoa, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWayland, and GHOST_WindowX11.

Referenced by setCustomCursorShape().

◆ setWindowDecorationStyleFlags()

void GHOST_Window::setWindowDecorationStyleFlags ( GHOST_TWindowDecorationStyleFlags styleFlags)
overridevirtual

Set the window decoration style flags.

Parameters
styleFlagsWindow decoration style flags.

Implements GHOST_IWindow.

Definition at line 65 of file GHOST_Window.cc.

References m_windowDecorationStyleFlags.

◆ setWindowDecorationStyleSettings()

void GHOST_Window::setWindowDecorationStyleSettings ( GHOST_WindowDecorationStyleSettings decorationSettings)
overridevirtual

Set the window decoration style settings.

Parameters
decorationSettingsWindow decoration style settings.

Implements GHOST_IWindow.

Definition at line 70 of file GHOST_Window.cc.

References m_windowDecorationStyleSettings.

◆ swapBuffers()

GHOST_TSuccess GHOST_Window::swapBuffers ( )
overridevirtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowNULL, and GHOST_WindowWayland.

Definition at line 103 of file GHOST_Window.cc.

References GHOST_Context::swapBuffers().

Referenced by GHOST_WindowWayland::swapBuffers().

◆ updateDrawingContext()

GHOST_TSuccess GHOST_Window::updateDrawingContext ( )

Updates the drawing context of this window. Needed whenever the window is changed.

Returns
Indication of success.

Definition at line 140 of file GHOST_Window.cc.

References GHOST_Context::updateDrawingContext().

Referenced by GHOST_WindowCocoa::GHOST_WindowCocoa(), and GHOST_SystemCocoa::handleWindowEvent().

Member Data Documentation

◆ m_canAcceptDragOperation

bool GHOST_Window::m_canAcceptDragOperation
protected

The acceptance of the "drop candidate" of the current drag & drop operation.

Definition at line 432 of file GHOST_Window.hh.

Referenced by canAcceptDragOperation(), and setAcceptDragOperation().

◆ m_cursorGrab

◆ m_cursorGrabAccumPos

int32_t GHOST_Window::m_cursorGrabAccumPos[2]
protected

Accumulated offset from m_cursorGrabInitPos.

Definition at line 420 of file GHOST_Window.hh.

Referenced by getCursorGrabAccum(), and setCursorGrabAccum().

◆ m_cursorGrabAxis

GHOST_TAxisFlag GHOST_Window::m_cursorGrabAxis
protected

◆ m_cursorGrabBounds

GHOST_Rect GHOST_Window::m_cursorGrabBounds
protected

Wrap the cursor within this region.

Definition at line 423 of file GHOST_Window.hh.

Referenced by getCursorGrabBounds(), getCursorGrabState(), setCursorGrab(), and GHOST_WindowX11::setWindowCursorGrab().

◆ m_cursorGrabInitPos

int32_t GHOST_Window::m_cursorGrabInitPos[2]
protected

◆ m_cursorShape

◆ m_cursorVisible

bool GHOST_Window::m_cursorVisible
protected

The current visibility of the cursor

Definition at line 408 of file GHOST_Window.hh.

Referenced by getCursorVisibility(), and setCursorVisibility().

◆ m_drawingContextType

GHOST_TDrawingContextType GHOST_Window::m_drawingContextType
protected

The drawing context installed in this window.

Definition at line 402 of file GHOST_Window.hh.

Referenced by getDrawingContextType(), and setDrawingContextType().

◆ m_fullScreen

bool GHOST_Window::m_fullScreen
protected

Stores whether this is a full screen window.

Definition at line 438 of file GHOST_Window.hh.

Referenced by GHOST_Window(), and GHOST_WindowCocoa::GHOST_WindowCocoa().

◆ m_fullScreenHeight

uint32_t GHOST_Window::m_fullScreenHeight
protected

Full-screen height

Definition at line 450 of file GHOST_Window.hh.

Referenced by GHOST_Window().

◆ m_fullScreenWidth

uint32_t GHOST_Window::m_fullScreenWidth
protected

Full-screen width

Definition at line 448 of file GHOST_Window.hh.

Referenced by GHOST_Window().

◆ m_isUnsavedChanges

bool GHOST_Window::m_isUnsavedChanges
protected

Modified state : are there unsaved changes

Definition at line 435 of file GHOST_Window.hh.

Referenced by getModifiedState(), and setModifiedState().

◆ m_nativePixelSize

float GHOST_Window::m_nativePixelSize
protected

Definition at line 453 of file GHOST_Window.hh.

Referenced by getNativePixelSize(), and GHOST_WindowCocoa::setNativePixelSize().

◆ m_progressBarVisible

bool GHOST_Window::m_progressBarVisible
protected

The presence of progress indicator with the application icon

Definition at line 429 of file GHOST_Window.hh.

Referenced by GHOST_WindowCocoa::endProgressBar(), and GHOST_WindowCocoa::setProgressBar().

◆ m_userData

GHOST_TUserDataPtr GHOST_Window::m_userData
protected

The window user data

Definition at line 405 of file GHOST_Window.hh.

Referenced by getUserData(), and setUserData().

◆ m_wantStereoVisual

bool GHOST_Window::m_wantStereoVisual
protected

Whether to attempt to initialize a context with a stereo frame-buffer.

Definition at line 445 of file GHOST_Window.hh.

Referenced by GHOST_WindowCocoa::newDrawingContext(), GHOST_WindowSDL::newDrawingContext(), GHOST_WindowX11::newDrawingContext(), and setDrawingContextType().

◆ m_windowDecorationStyleFlags

◆ m_windowDecorationStyleSettings


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