Blender  V2.93
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GHOST_WindowCocoa Class Reference

#include <GHOST_WindowCocoa.h>

Inherits GHOST_Window.

Public Member Functions

 GHOST_WindowCocoa (GHOST_SystemCocoa *systemCocoa, const char *title, GHOST_TInt32 left, GHOST_TInt32 bottom, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type=GHOST_kDrawingContextTypeNone, const bool stereoVisual=false, bool is_debug=false, bool dialog=false, GHOST_WindowCocoa *parentWindow=0)
 
 ~GHOST_WindowCocoa ()
 
bool getValid () const
 
void * getOSWindow () const
 
void setTitle (const char *title)
 
std::string getTitle () const
 
void getWindowBounds (GHOST_Rect &bounds) const
 
void getClientBounds (GHOST_Rect &bounds) const
 
GHOST_TSuccess setClientWidth (GHOST_TUns32 width)
 
GHOST_TSuccess setClientHeight (GHOST_TUns32 height)
 
GHOST_TSuccess setClientSize (GHOST_TUns32 width, GHOST_TUns32 height)
 
GHOST_TWindowState getState () const
 
GHOST_TSuccess setModifiedState (bool isUnsavedChanges)
 
void screenToClient (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
 
void clientToScreen (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
 
void clientToScreenIntern (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
 
void screenToClientIntern (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
 
NSScreen * getScreen ()
 
GHOST_TSuccess setState (GHOST_TWindowState state)
 
GHOST_TSuccess setOrder (GHOST_TWindowOrder order)
 
NSCursor * getStandardCursor (GHOST_TStandardCursor cursor) const
 
void loadCursor (bool visible, GHOST_TStandardCursor cursor) const
 
bool isDialog () const
 
GHOST_TabletDataGetCocoaTabletData ()
 
GHOST_TSuccess setProgressBar (float progress)
 
GHOST_TSuccess endProgressBar ()
 
void setNativePixelSize (void)
 
GHOST_TSuccess beginFullScreen () const
 
GHOST_TSuccess endFullScreen () const
 
CocoaWindowgetCocoaWindow () const
 
void setImmediateDraw (bool value)
 
bool getImmediateDraw (void) const
 
- 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 ()
 
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)
 
GHOST_TSuccess setSwapInterval (int interval)
 
GHOST_TSuccess getSwapInterval (int &intervalOut)
 
void setAcceptDragOperation (bool canAccept)
 
bool canAcceptDragOperation () const
 
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

GHOST_ContextnewDrawingContext (GHOST_TDrawingContextType type)
 
GHOST_TSuccess invalidate ()
 
GHOST_TSuccess setWindowCursorVisibility (bool visible)
 
GHOST_TSuccess setWindowCursorGrab (GHOST_TGrabCursorMode mode)
 
GHOST_TSuccess setWindowCursorShape (GHOST_TStandardCursor shape)
 
GHOST_TSuccess hasCursorShape (GHOST_TStandardCursor shape)
 
GHOST_TSuccess setWindowCustomCursorShape (GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
 
- Protected Member Functions inherited from GHOST_Window
GHOST_TSuccess releaseNativeHandles ()
 

Protected Attributes

CocoaWindowm_window
 
CocoaOpenGLView * m_openGLView
 
CocoaMetalView * m_metalView
 
CAMetalLayer * m_metalLayer
 
GHOST_SystemCocoam_systemCocoa
 
NSCursor * m_customCursor
 
GHOST_TabletData m_tablet
 
bool m_immediateDraw
 
bool m_debug_context
 
bool m_is_dialog
 
- 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 42 of file GHOST_WindowCocoa.h.

Constructor & Destructor Documentation

◆ GHOST_WindowCocoa()

GHOST_WindowCocoa::GHOST_WindowCocoa ( GHOST_SystemCocoa systemCocoa,
const char *  title,
GHOST_TInt32  left,
GHOST_TInt32  bottom,
GHOST_TUns32  width,
GHOST_TUns32  height,
GHOST_TWindowState  state,
GHOST_TDrawingContextType  type = GHOST_kDrawingContextTypeNone,
const bool  stereoVisual = false,
bool  is_debug = false,
bool  dialog = false,
GHOST_WindowCocoa parentWindow = 0 
)

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

Parameters
systemCocoaThe associated system class to forward events to.
titleThe text shown in the title bar of the window.
leftThe coordinate of the left edge of the window.
bottomThe coordinate of the bottom edge of the window.
widthThe width the window.
heightThe height the window.
stateThe state the window is initially opened with.
typeThe type of drawing context installed in this window.
stereoVisualStereo visual for quad buffered stereo.

Definition at line 290 of file GHOST_WindowCocoa.mm.

References GHOST_Window::activateDrawingContext(), bottom, GHOST_kWindowStateFullScreen, GHOST_TABLET_DATA_NONE, height, left, GHOST_Window::m_fullScreen, m_metalLayer, m_metalView, GHOST_System::m_nativePixel, m_openGLView, m_systemCocoa, m_tablet, m_window, blender::compositor::pool, GHOST_Window::setDrawingContextType(), setNativePixelSize(), setState(), CocoaWindowDelegate::setSystemAndWindowCocoa:windowCocoa:, CocoaWindow::setSystemAndWindowCocoa:windowCocoa:, setTitle(), state, type, GHOST_Window::updateDrawingContext(), view, and width.

◆ ~GHOST_WindowCocoa()

GHOST_WindowCocoa::~GHOST_WindowCocoa ( )

Destructor. Closes the window and disposes resources allocated.

Definition at line 422 of file GHOST_WindowCocoa.mm.

References Freestyle::a, m_customCursor, m_metalLayer, m_metalView, m_openGLView, m_window, blender::compositor::pool, and GHOST_Window::releaseNativeHandles().

Member Function Documentation

◆ beginFullScreen()

GHOST_TSuccess GHOST_WindowCocoa::beginFullScreen ( ) const
inlinevirtual

Implements GHOST_IWindow.

Definition at line 240 of file GHOST_WindowCocoa.h.

References GHOST_kFailure.

◆ clientToScreen()

void GHOST_WindowCocoa::clientToScreen ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const
virtual

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 677 of file GHOST_WindowCocoa.mm.

References clientToScreenIntern(), getClientBounds(), GHOST_Rect::getHeight(), getValid(), and GHOST_ASSERT.

◆ clientToScreenIntern()

void GHOST_WindowCocoa::clientToScreenIntern ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const

Converts a point in screen coordinates to client rectangle coordinates but without the y coordinate conversion needed for ghost compatibility.

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.

Definition at line 709 of file GHOST_WindowCocoa.mm.

References m_window.

Referenced by clientToScreen(), and GHOST_SystemCocoa::handleMouseEvent().

◆ endFullScreen()

GHOST_TSuccess GHOST_WindowCocoa::endFullScreen ( void  ) const
inlinevirtual

Implements GHOST_IWindow.

Definition at line 245 of file GHOST_WindowCocoa.h.

References GHOST_kFailure.

◆ endProgressBar()

GHOST_TSuccess GHOST_WindowCocoa::endProgressBar ( )
virtual

Hides the progress bar icon

Reimplemented from GHOST_Window.

Definition at line 907 of file GHOST_WindowCocoa.mm.

References GHOST_kFailure, GHOST_kSuccess, GHOST_Window::m_progressBarVisible, blender::compositor::pool, and postNotification().

◆ getClientBounds()

void GHOST_WindowCocoa::getClientBounds ( GHOST_Rect bounds) const
virtual

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 556 of file GHOST_WindowCocoa.mm.

References bounds(), getValid(), GHOST_ASSERT, m_window, and blender::compositor::pool.

Referenced by clientToScreen(), GHOST_SystemCocoa::handleMouseEvent(), screenToClient(), setClientHeight(), setClientSize(), setClientWidth(), and setNativePixelSize().

◆ GetCocoaTabletData()

GHOST_TabletData& GHOST_WindowCocoa::GetCocoaTabletData ( )
inline

Definition at line 222 of file GHOST_WindowCocoa.h.

References m_tablet.

Referenced by GHOST_SystemCocoa::setCursorPosition().

◆ getCocoaWindow()

CocoaWindow* GHOST_WindowCocoa::getCocoaWindow ( ) const
inline

public function to get the window containing the OpenGL view

Definition at line 251 of file GHOST_WindowCocoa.h.

References m_window.

◆ getImmediateDraw()

bool GHOST_WindowCocoa::getImmediateDraw ( void  ) const
inline

Definition at line 261 of file GHOST_WindowCocoa.h.

References m_immediateDraw.

◆ getOSWindow()

void * GHOST_WindowCocoa::getOSWindow ( ) const
virtual

Returns the associated NSWindow object

Returns
The associated NSWindow object

Reimplemented from GHOST_Window.

Definition at line 472 of file GHOST_WindowCocoa.mm.

References m_window.

Referenced by GHOST_SystemCocoa::handleMouseEvent().

◆ getScreen()

NSScreen * GHOST_WindowCocoa::getScreen ( )

Gets the screen the window is displayed in

Returns
The NSScreen object

Definition at line 726 of file GHOST_WindowCocoa.mm.

References m_window.

Referenced by GHOST_SystemCocoa::setMouseCursorPosition().

◆ getStandardCursor()

NSCursor * GHOST_WindowCocoa::getStandardCursor ( GHOST_TStandardCursor  cursor) const

◆ getState()

GHOST_TWindowState GHOST_WindowCocoa::getState ( ) const
virtual

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

Returns
The state of the window.

Implements GHOST_IWindow.

Definition at line 627 of file GHOST_WindowCocoa.mm.

References getValid(), GHOST_ASSERT, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, m_immediateDraw, m_window, blender::compositor::pool, and state.

◆ getTitle()

std::string GHOST_WindowCocoa::getTitle ( ) const
virtual

Returns the title displayed in the title bar.

Parameters
titleThe title displayed in the title bar.

Implements GHOST_IWindow.

Definition at line 519 of file GHOST_WindowCocoa.mm.

References getValid(), GHOST_ASSERT, m_window, and blender::compositor::pool.

◆ getValid()

bool GHOST_WindowCocoa::getValid ( ) const
virtual

Returns indication as to whether the window is valid.

Returns
The validity of the window.

Reimplemented from GHOST_Window.

Definition at line 466 of file GHOST_WindowCocoa.mm.

References GHOST_Window::getValid(), m_metalView, m_openGLView, m_window, NULL, and view.

Referenced by clientToScreen(), getClientBounds(), getState(), getTitle(), getWindowBounds(), invalidate(), screenToClient(), setClientHeight(), setClientSize(), setClientWidth(), setOrder(), setState(), and setTitle().

◆ getWindowBounds()

void GHOST_WindowCocoa::getWindowBounds ( GHOST_Rect bounds) const
virtual

Returns the window rectangle dimensions. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

Parameters
boundsThe bounding rectangle of the window.

Implements GHOST_IWindow.

Definition at line 537 of file GHOST_WindowCocoa.mm.

References bounds(), getValid(), GHOST_ASSERT, m_window, and blender::compositor::pool.

◆ hasCursorShape()

GHOST_TSuccess GHOST_WindowCocoa::hasCursorShape ( GHOST_TStandardCursor  cursorShape)
protectedvirtual

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

Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 1127 of file GHOST_WindowCocoa.mm.

References getStandardCursor(), GHOST_kFailure, GHOST_kSuccess, and blender::compositor::pool.

◆ invalidate()

GHOST_TSuccess GHOST_WindowCocoa::invalidate ( void  )
protectedvirtual

Invalidates the contents of this window.

Returns
Indication of success.

Implements GHOST_IWindow.

Definition at line 844 of file GHOST_WindowCocoa.mm.

References getValid(), GHOST_ASSERT, GHOST_kSuccess, m_metalView, m_openGLView, blender::compositor::pool, and view.

◆ isDialog()

bool GHOST_WindowCocoa::isDialog ( ) const
virtual

◆ loadCursor()

void GHOST_WindowCocoa::loadCursor ( bool  visible,
GHOST_TStandardCursor  cursor 
) const

◆ newDrawingContext()

GHOST_Context * GHOST_WindowCocoa::newDrawingContext ( GHOST_TDrawingContextType  type)
protectedvirtual
Parameters
typeThe type of rendering context create.
Returns
Indication of success.

Implements GHOST_Window.

Definition at line 826 of file GHOST_WindowCocoa.mm.

References context, GHOST_kDrawingContextTypeOpenGL, m_metalLayer, m_metalView, m_openGLView, GHOST_Window::m_wantStereoVisual, NULL, and type.

◆ screenToClient()

void GHOST_WindowCocoa::screenToClient ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const
virtual

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 662 of file GHOST_WindowCocoa.mm.

References getClientBounds(), GHOST_Rect::getHeight(), getValid(), GHOST_ASSERT, and screenToClientIntern().

Referenced by GHOST_SystemCocoa::handleMouseEvent().

◆ screenToClientIntern()

void GHOST_WindowCocoa::screenToClientIntern ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const

Converts a point in screen coordinates to client rectangle coordinates, but without the y coordinate conversion needed for ghost compatibility.

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.

Definition at line 692 of file GHOST_WindowCocoa.mm.

References m_window.

Referenced by GHOST_SystemCocoa::handleMouseEvent(), and screenToClient().

◆ setClientHeight()

GHOST_TSuccess GHOST_WindowCocoa::setClientHeight ( GHOST_TUns32  height)
virtual

Resizes client rectangle height.

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

Implements GHOST_IWindow.

Definition at line 594 of file GHOST_WindowCocoa.mm.

References getClientBounds(), GHOST_Rect::getHeight(), getValid(), GHOST_Rect::getWidth(), GHOST_ASSERT, GHOST_kSuccess, height, m_window, blender::compositor::pool, and size().

◆ setClientSize()

GHOST_TSuccess GHOST_WindowCocoa::setClientSize ( GHOST_TUns32  width,
GHOST_TUns32  height 
)
virtual

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 610 of file GHOST_WindowCocoa.mm.

References getClientBounds(), GHOST_Rect::getHeight(), getValid(), GHOST_Rect::getWidth(), GHOST_ASSERT, GHOST_kSuccess, height, m_window, blender::compositor::pool, size(), and width.

◆ setClientWidth()

GHOST_TSuccess GHOST_WindowCocoa::setClientWidth ( GHOST_TUns32  width)
virtual

Resizes client rectangle width.

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

Implements GHOST_IWindow.

Definition at line 578 of file GHOST_WindowCocoa.mm.

References getClientBounds(), GHOST_Rect::getHeight(), getValid(), GHOST_Rect::getWidth(), GHOST_ASSERT, GHOST_kSuccess, m_window, blender::compositor::pool, size(), and width.

◆ setImmediateDraw()

void GHOST_WindowCocoa::setImmediateDraw ( bool  value)
inline

Definition at line 257 of file GHOST_WindowCocoa.h.

References m_immediateDraw.

◆ setModifiedState()

GHOST_TSuccess GHOST_WindowCocoa::setModifiedState ( bool  isUnsavedChanges)
virtual

Sets the window "modified" status, indicating unsaved changes

Parameters
isUnsavedChangesUnsaved changes or not.
Returns
Indication of success.

Reimplemented from GHOST_Window.

Definition at line 789 of file GHOST_WindowCocoa.mm.

References m_window, blender::compositor::pool, and GHOST_Window::setModifiedState().

◆ setNativePixelSize()

void GHOST_WindowCocoa::setNativePixelSize ( void  )

◆ setOrder()

GHOST_TSuccess GHOST_WindowCocoa::setOrder ( GHOST_TWindowOrder  order)
virtual

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

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

Implements GHOST_IWindow.

Definition at line 799 of file GHOST_WindowCocoa.mm.

References count, getValid(), GHOST_ASSERT, GHOST_kSuccess, GHOST_kWindowOrderTop, m_window, order, and blender::compositor::pool.

◆ setProgressBar()

GHOST_TSuccess GHOST_WindowCocoa::setProgressBar ( float  progress)
virtual

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

Parameters
progressThe progress percentage (0.0 to 1.0).

Reimplemented from GHOST_Window.

Definition at line 856 of file GHOST_WindowCocoa.mm.

References GHOST_kSuccess, GHOST_Window::m_progressBarVisible, and blender::compositor::pool.

◆ setState()

GHOST_TSuccess GHOST_WindowCocoa::setState ( GHOST_TWindowState  state)
virtual

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

Parameters
stateThe state of the window.
Returns
Indication of success.
Note
Fullscreen switch is not actual fullscreen with display capture. As this capture removes all OS X window manager features.

Instead, the menu bar and the dock are hidden, and the window is made border-less and enlarged. Thus, process switch, exposé, spaces, ... still work in fullscreen mode

Implements GHOST_IWindow.

Definition at line 750 of file GHOST_WindowCocoa.mm.

References getValid(), GHOST_ASSERT, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, m_window, blender::compositor::pool, and state.

Referenced by GHOST_WindowCocoa().

◆ setTitle()

void GHOST_WindowCocoa::setTitle ( const char *  title)
virtual

Sets the title displayed in the title bar.

Parameters
titleThe title to display in the title bar.

Implements GHOST_IWindow.

Definition at line 477 of file GHOST_WindowCocoa.mm.

References e, getValid(), GHOST_ASSERT, len, m_window, and blender::compositor::pool.

Referenced by GHOST_WindowCocoa().

◆ setWindowCursorGrab()

GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorGrab ( GHOST_TGrabCursorMode  mode)
protectedvirtual

◆ setWindowCursorShape()

GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorShape ( GHOST_TStandardCursor  shape)
protectedvirtual

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

Implements GHOST_Window.

Definition at line 1115 of file GHOST_WindowCocoa.mm.

References GHOST_Window::getCursorVisibility(), GHOST_kSuccess, loadCursor(), m_window, and blender::compositor::pool.

◆ setWindowCursorVisibility()

GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorVisibility ( bool  visible)
protectedvirtual

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

Implements GHOST_Window.

Definition at line 1067 of file GHOST_WindowCocoa.mm.

References GHOST_Window::getCursorShape(), GHOST_kSuccess, loadCursor(), m_window, and blender::compositor::pool.

Referenced by setWindowCursorGrab().

◆ setWindowCustomCursorShape()

GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape ( GHOST_TUns8 bitmap,
GHOST_TUns8 mask,
int  sizex,
int  sizey,
int  hotX,
int  hotY,
bool  canInvertColor 
)
protectedvirtual

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

Implements GHOST_Window.

Definition at line 1156 of file GHOST_WindowCocoa.mm.

References GHOST_Window::getCursorVisibility(), GHOST_kStandardCursorCustom, GHOST_kSuccess, loadCursor(), m_customCursor, m_window, mask(), blender::compositor::pool, uns16ReverseBits(), and y.

Member Data Documentation

◆ m_customCursor

NSCursor* GHOST_WindowCocoa::m_customCursor
protected

◆ m_debug_context

bool GHOST_WindowCocoa::m_debug_context
protected

Definition at line 326 of file GHOST_WindowCocoa.h.

◆ m_immediateDraw

bool GHOST_WindowCocoa::m_immediateDraw
protected

Definition at line 325 of file GHOST_WindowCocoa.h.

Referenced by getImmediateDraw(), getState(), and setImmediateDraw().

◆ m_is_dialog

bool GHOST_WindowCocoa::m_is_dialog
protected

Definition at line 327 of file GHOST_WindowCocoa.h.

Referenced by isDialog().

◆ m_metalLayer

CAMetalLayer* GHOST_WindowCocoa::m_metalLayer
protected

Definition at line 316 of file GHOST_WindowCocoa.h.

Referenced by GHOST_WindowCocoa(), newDrawingContext(), and ~GHOST_WindowCocoa().

◆ m_metalView

CocoaMetalView* GHOST_WindowCocoa::m_metalView
protected

◆ m_openGLView

CocoaOpenGLView* GHOST_WindowCocoa::m_openGLView
protected

The view, either Metal or OpenGL

Definition at line 314 of file GHOST_WindowCocoa.h.

Referenced by getValid(), GHOST_WindowCocoa(), invalidate(), newDrawingContext(), setNativePixelSize(), and ~GHOST_WindowCocoa().

◆ m_systemCocoa

GHOST_SystemCocoa* GHOST_WindowCocoa::m_systemCocoa
protected

The mother SystemCocoa class to send events

Definition at line 319 of file GHOST_WindowCocoa.h.

Referenced by GHOST_WindowCocoa(), and setWindowCursorGrab().

◆ m_tablet

GHOST_TabletData GHOST_WindowCocoa::m_tablet
protected

Definition at line 323 of file GHOST_WindowCocoa.h.

Referenced by GetCocoaTabletData(), and GHOST_WindowCocoa().

◆ m_window

CocoaWindow* GHOST_WindowCocoa::m_window
protected

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