Blender V5.0
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 GHOST_ContextParams &context_params, 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 style_flags) override
virtual void setWindowDecorationStyleSettings (GHOST_WindowDecorationStyleSettings decoration_settings) override
virtual GHOST_TSuccess applyWindowDecorationStyle () override
GHOST_TStandardCursor getCursorShape () const override
bool isDialog () const override
GHOST_TSuccess setCursorShape (GHOST_TStandardCursor cursor_shape) override
GHOST_TSuccess setCustomCursorShape (const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_spot[2], bool can_invert_color) override
GHOST_TSuccess setCustomCursorGenerator (GHOST_CursorGenerator *cursor_generator) 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 &interval_out) override
void setAcceptDragOperation (bool can_accept) override
bool canAcceptDragOperation () const override
GHOST_TSuccess setModifiedState (bool is_unsaved_changes) override
bool getModifiedState () override
GHOST_TDrawingContextType getDrawingContextType () override
GHOST_TSuccess setDrawingContextType (GHOST_TDrawingContextType type) override
GHOST_IContextgetDrawingContext () override
GHOST_TSuccess swapBufferAcquire () override
GHOST_TSuccess swapBufferRelease () override
GHOST_TSuccess activateDrawingContext () override
GHOST_TSuccess updateDrawingContext ()
GHOST_ContextgetContext ()
unsigned int getDefaultFramebuffer () override
GHOST_TUserDataPtr getUserData () const override
void setUserData (const GHOST_TUserDataPtr user_data) override
float getNativePixelSize () override
uint16_t getDPIHint () override
GHOST_WindowHDRInfo getHDRInfo () 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 cursor_shape)=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 (const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_size[2], bool can_invert_color)=0
virtual GHOST_TSuccess setWindowCustomCursorGenerator (GHOST_CursorGenerator *cursor_generator)
GHOST_TSuccess releaseNativeHandles ()

Protected Attributes

GHOST_TDrawingContextType drawing_context_type_
GHOST_TUserDataPtr user_data_
bool cursor_visible_
GHOST_TGrabCursorMode cursor_grab_
GHOST_TAxisFlag cursor_grab_axis_
int32_t cursor_grab_init_pos_ [2]
int32_t cursor_grab_accum_pos_ [2]
GHOST_Rect cursor_grab_bounds_
GHOST_TStandardCursor cursor_shape_
bool progress_bar_visible_
bool can_accept_drag_operation_
bool is_unsaved_changes_
bool full_screen_
GHOST_TWindowDecorationStyleFlags window_decoration_style_flags_
GHOST_WindowDecorationStyleSettings window_decoration_style_settings_
GHOST_ContextParams want_context_params_
uint32_t full_screen_width_
uint32_t full_screen_height_
float native_pixel_size_
GHOST_WindowHDRInfo hdr_info_ = GHOST_WINDOW_HDR_INFO_NONE

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 GHOST_ContextParams & context_params,
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 can_accept_drag_operation_, cursor_grab_, cursor_grab_accum_pos_, cursor_grab_axis_, cursor_grab_init_pos_, cursor_shape_, cursor_visible_, drawing_context_type_, false, full_screen_, full_screen_height_, full_screen_width_, GHOST_CONTEXT_PARAMS_NONE, GHOST_kAxisNone, GHOST_kDecorationNone, GHOST_kDrawingContextTypeNone, GHOST_kGrabDisable, GHOST_kStandardCursorDefault, GHOST_kWindowStateFullScreen, is_unsaved_changes_, native_pixel_size_, nullptr, progress_bar_visible_, state, true, user_data_, want_context_params_, window_decoration_style_flags_, and window_decoration_style_settings_.

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

◆ ~GHOST_Window()

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 141 of file GHOST_Window.cc.

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 100 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 276 of file GHOST_Window.cc.

References can_accept_drag_operation_.

◆ 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 163 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 124 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 265 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 401 of file GHOST_Window.hh.

References cursor_grab_init_pos_, x, and y.

◆ 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 228 of file GHOST_Window.cc.

Referenced by getCursorGrabState().

◆ getCursorShape()

GHOST_TStandardCursor GHOST_Window::getCursorShape ( ) const
inlineoverridevirtual

◆ 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 381 of file GHOST_Window.hh.

References cursor_visible_.

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

◆ getDefaultFramebuffer()

uint GHOST_Window::getDefaultFramebuffer ( )
overridevirtual

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

Returns
The name of an OpenGL frame-buffer object.

Implements GHOST_IWindow.

Definition at line 129 of file GHOST_Window.cc.

◆ 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 251 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 100 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 376 of file GHOST_Window.hh.

References drawing_context_type_.

◆ getHDRInfo()

GHOST_WindowHDRInfo GHOST_Window::getHDRInfo ( )
inlineoverridevirtual

Returns high dynamic range color information about this window.

Returns
HDR info.

Implements GHOST_IWindow.

Definition at line 257 of file GHOST_Window.hh.

References hdr_info_.

◆ 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 288 of file GHOST_Window.cc.

References is_unsaved_changes_.

◆ getNativePixelSize()

float GHOST_Window::getNativePixelSize ( )
inlineoverridevirtual

If this window was opened using native pixel size, return the scaling factor.

Implements GHOST_IWindow.

Definition at line 242 of file GHOST_Window.hh.

References native_pixel_size_.

◆ 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 57 of file GHOST_Window.cc.

◆ getSwapInterval()

GHOST_TSuccess GHOST_Window::getSwapInterval ( int & interval_out)
overridevirtual

Gets the current swap interval for #swapBuffers.

Parameters
interval_outpointer to location to return swap interval. (left untouched if there is an error)
Returns
A boolean success indicator of if swap interval was successfully read.

Implements GHOST_IWindow.

Definition at line 119 of file GHOST_Window.cc.

◆ getUserData()

GHOST_TUserDataPtr GHOST_Window::getUserData ( ) const
inlineoverridevirtual

Returns the window user data.

Returns
The window user data.

Implements GHOST_IWindow.

Definition at line 230 of file GHOST_Window.hh.

References user_data_.

◆ 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 74 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 62 of file GHOST_Window.cc.

References window_decoration_style_flags_.

◆ isDialog()

bool GHOST_Window::isDialog ( ) const
inlineoverridevirtual

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa, GHOST_WindowWayland, GHOST_WindowWin32, and GHOST_WindowX11.

Definition at line 108 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 can_accept)
overridevirtual

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

Implements GHOST_IWindow.

Definition at line 271 of file GHOST_Window.cc.

References can_accept_drag_operation_.

◆ setCursorGrab()

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

Grabs the cursor for a modal operation.

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

Reimplemented from GHOST_IWindow.

Definition at line 165 of file GHOST_Window.cc.

References assert, bounds(), cursor_grab_, cursor_grab_axis_, cursor_grab_bounds_, cursor_grab_init_pos_, GHOST_IWindow::getClientBounds(), GHOST_kFailure, GHOST_kGrabDisable, GHOST_kSuccess, and setWindowCursorGrab().

◆ setCursorGrabAccum()

◆ setCursorShape()

GHOST_TSuccess GHOST_Window::setCursorShape ( GHOST_TStandardCursor cursor_shape)
overridevirtual

Set the shape of the cursor.

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

Implements GHOST_IWindow.

Definition at line 234 of file GHOST_Window.cc.

References cursor_shape_, GHOST_kFailure, GHOST_kSuccess, 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 156 of file GHOST_Window.cc.

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

◆ setCustomCursorGenerator()

GHOST_TSuccess GHOST_Window::setCustomCursorGenerator ( GHOST_CursorGenerator * cursor_generator)
overridevirtual

Set the cursor generator.

Parameters
cursor_generatorAn object which generates cursors. Ownership is transferred to GHOST which is responsible for calling it's free method.

Implements GHOST_IWindow.

Definition at line 256 of file GHOST_Window.cc.

References cursor_shape_, GHOST_kFailure, GHOST_kStandardCursorCustom, GHOST_kSuccess, and setWindowCustomCursorGenerator().

◆ setCustomCursorShape()

GHOST_TSuccess GHOST_Window::setCustomCursorShape ( const uint8_t * bitmap,
const uint8_t * mask,
const int size[2],
const int hot_spot[2],
bool can_invert_color )
overridevirtual

Set the shape of the cursor to a custom cursor.

Parameters
bitmapThe bitmap data for the cursor.
maskThe mask data for the cursor.
sizeThe X,Y size of the cursor in pixels.
hot_spotThe X,Y coordinate of the cursor hot-spot.
Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 243 of file GHOST_Window.cc.

References cursor_shape_, GHOST_kFailure, GHOST_kStandardCursorCustom, GHOST_kSuccess, mask(), setWindowCustomCursorShape(), and size().

◆ setDrawingContextType()

GHOST_TSuccess GHOST_Window::setDrawingContextType ( GHOST_TDrawingContextType type)
overridevirtual

Tries to install a rendering context in this window.

Parameters
typeThe type of rendering context installed.
Returns
Indication as to whether installation has succeeded.
Note
Child classes do not need to overload this method, They should overload newDrawingContext instead.

Implements GHOST_IWindow.

Definition at line 78 of file GHOST_Window.cc.

References drawing_context_type_, GHOST_kDrawingContextTypeNone, GHOST_kFailure, GHOST_kSuccess, newDrawingContext(), and want_context_params_.

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 is_unsaved_changes)
overridevirtual

Sets the window "modified" status, indicating unsaved changes.

Parameters
is_unsaved_changesUnsaved changes or not.
Returns
Indication of success.

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowCocoa.

Definition at line 281 of file GHOST_Window.cc.

References GHOST_kSuccess, and is_unsaved_changes_.

Referenced by GHOST_WindowCocoa::setModifiedState().

◆ setPath()

GHOST_TSuccess GHOST_Window::setPath ( const char * )
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 83 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 157 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 114 of file GHOST_Window.cc.

Referenced by GHOST_WindowWayland::GHOST_WindowWayland().

◆ setUserData()

void GHOST_Window::setUserData ( const GHOST_TUserDataPtr user_data)
inlineoverridevirtual

Changes the window user data.

Parameters
user_dataThe window user data.

Implements GHOST_IWindow.

Definition at line 236 of file GHOST_Window.hh.

References user_data_.

◆ 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 293 of file GHOST_Window.hh.

References GHOST_kSuccess.

Referenced by setCursorGrab().

◆ setWindowCursorShape()

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

◆ 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().

◆ setWindowCustomCursorGenerator()

virtual GHOST_TSuccess GHOST_Window::setWindowCustomCursorGenerator ( GHOST_CursorGenerator * cursor_generator)
inlineprotectedvirtual

Reimplemented in GHOST_WindowWayland.

Definition at line 308 of file GHOST_Window.hh.

References GHOST_CursorGenerator::free_fn, and GHOST_kFailure.

Referenced by setCustomCursorGenerator().

◆ setWindowCustomCursorShape()

virtual GHOST_TSuccess GHOST_Window::setWindowCustomCursorShape ( const uint8_t * bitmap,
const uint8_t * mask,
const int size[2],
const int hot_size[2],
bool can_invert_color )
protectedpure virtual

◆ setWindowDecorationStyleFlags()

void GHOST_Window::setWindowDecorationStyleFlags ( GHOST_TWindowDecorationStyleFlags style_flags)
overridevirtual

Set the window decoration style flags.

Parameters
style_flagsWindow decoration style flags.

Implements GHOST_IWindow.

Definition at line 67 of file GHOST_Window.cc.

References window_decoration_style_flags_.

◆ setWindowDecorationStyleSettings()

void GHOST_Window::setWindowDecorationStyleSettings ( GHOST_WindowDecorationStyleSettings decoration_settings)
overridevirtual

Set the window decoration style settings.

Parameters
decoration_settingsWindow decoration style settings.

Implements GHOST_IWindow.

Definition at line 72 of file GHOST_Window.cc.

References window_decoration_style_settings_.

◆ swapBufferAcquire()

GHOST_TSuccess GHOST_Window::swapBufferAcquire ( )
overridevirtual

Acquire the next buffer of the swap chain.

Returns
A boolean success indicator.

Implements GHOST_IWindow.

Definition at line 105 of file GHOST_Window.cc.

◆ swapBufferRelease()

GHOST_TSuccess GHOST_Window::swapBufferRelease ( )
overridevirtual

Implements GHOST_IWindow.

Reimplemented in GHOST_WindowNULL, and GHOST_WindowWayland.

Definition at line 109 of file GHOST_Window.cc.

Referenced by GHOST_WindowWayland::swapBufferRelease().

◆ 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 146 of file GHOST_Window.cc.

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

Member Data Documentation

◆ can_accept_drag_operation_

bool GHOST_Window::can_accept_drag_operation_
protected

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

Definition at line 347 of file GHOST_Window.hh.

Referenced by canAcceptDragOperation(), GHOST_Window(), and setAcceptDragOperation().

◆ cursor_grab_

◆ cursor_grab_accum_pos_

int32_t GHOST_Window::cursor_grab_accum_pos_[2]
protected

Accumulated offset from cursor_grab_init_pos_.

Definition at line 335 of file GHOST_Window.hh.

Referenced by getCursorGrabAccum(), GHOST_Window(), and setCursorGrabAccum().

◆ cursor_grab_axis_

GHOST_TAxisFlag GHOST_Window::cursor_grab_axis_
protected

◆ cursor_grab_bounds_

GHOST_Rect GHOST_Window::cursor_grab_bounds_
protected

◆ cursor_grab_init_pos_

int32_t GHOST_Window::cursor_grab_init_pos_[2]
protected

◆ cursor_shape_

◆ cursor_visible_

bool GHOST_Window::cursor_visible_
protected

The current visibility of the cursor

Definition at line 323 of file GHOST_Window.hh.

Referenced by getCursorVisibility(), GHOST_Window(), and setCursorVisibility().

◆ drawing_context_type_

GHOST_TDrawingContextType GHOST_Window::drawing_context_type_
protected

The drawing context installed in this window.

Definition at line 317 of file GHOST_Window.hh.

Referenced by getDrawingContextType(), GHOST_Window(), and setDrawingContextType().

◆ full_screen_

bool GHOST_Window::full_screen_
protected

Stores whether this is a full screen window.

Definition at line 353 of file GHOST_Window.hh.

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

◆ full_screen_height_

uint32_t GHOST_Window::full_screen_height_
protected

Full-screen height

Definition at line 365 of file GHOST_Window.hh.

Referenced by GHOST_Window().

◆ full_screen_width_

uint32_t GHOST_Window::full_screen_width_
protected

Full-screen width

Definition at line 363 of file GHOST_Window.hh.

Referenced by GHOST_Window().

◆ hdr_info_

◆ is_unsaved_changes_

bool GHOST_Window::is_unsaved_changes_
protected

Modified state : are there unsaved changes

Definition at line 350 of file GHOST_Window.hh.

Referenced by getModifiedState(), GHOST_Window(), and setModifiedState().

◆ native_pixel_size_

float GHOST_Window::native_pixel_size_
protected

◆ progress_bar_visible_

bool GHOST_Window::progress_bar_visible_
protected

The presence of progress indicator with the application icon

Definition at line 344 of file GHOST_Window.hh.

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

◆ user_data_

GHOST_TUserDataPtr GHOST_Window::user_data_
protected

The window user data

Definition at line 320 of file GHOST_Window.hh.

Referenced by getUserData(), GHOST_Window(), and setUserData().

◆ want_context_params_

GHOST_ContextParams GHOST_Window::want_context_params_
protected

The desired parameters to use when initializing the context for this window.

Definition at line 360 of file GHOST_Window.hh.

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

◆ window_decoration_style_flags_

◆ window_decoration_style_settings_


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