Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowCocoa.h
| Show All 20 Lines | |||||
| @class CocoaMetalView; | @class CocoaMetalView; | ||||
| @class CocoaOpenGLView; | @class CocoaOpenGLView; | ||||
| @class CocoaWindow; | @class CocoaWindow; | ||||
| @class NSCursor; | @class NSCursor; | ||||
| @class NSScreen; | @class NSScreen; | ||||
| class GHOST_SystemCocoa; | class GHOST_SystemCocoa; | ||||
| typedef enum { | |||||
| MousePressed, | |||||
| MouseReleased, | |||||
| OperatorGrab, | |||||
| OperatorUngrab | |||||
| } GHOST_MouseCaptureEventCocoa; | |||||
| class GHOST_WindowCocoa : public GHOST_Window { | class GHOST_WindowCocoa : public GHOST_Window { | ||||
| public: | public: | ||||
| /** | /** | ||||
| * Constructor. | * Constructor. | ||||
| * Creates a new window and opens it. | * Creates a new window and opens it. | ||||
| * To check if the window was created properly, use the #getValid() method. | * To check if the window was created properly, use the #getValid() method. | ||||
| * \param systemCocoa: The associated system class to forward events to. | * \param systemCocoa: The associated system class to forward events to. | ||||
| * \param title: The text shown in the title bar of the window. | * \param title: The text shown in the title bar of the window. | ||||
| ▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | public: | ||||
| */ | */ | ||||
| GHOST_TSuccess setProgressBar(float progress); | GHOST_TSuccess setProgressBar(float progress); | ||||
| /** | /** | ||||
| * Hides the progress bar icon | * Hides the progress bar icon | ||||
| */ | */ | ||||
| GHOST_TSuccess endProgressBar(); | GHOST_TSuccess endProgressBar(); | ||||
| /** | |||||
| * Register a mouse capture state (should be called | |||||
| * for any real button press, controls mouse | |||||
| * capturing). | |||||
| * | |||||
| * \param event: Whether mouse was pressed and released, | |||||
| * or an operator grabbed or ungrabbed the mouse. | |||||
| */ | |||||
| void updateMouseCapture(GHOST_MouseCaptureEventCocoa event); | |||||
| /** | |||||
| * Inform the window that it has lost mouse capture, | |||||
| * called when the window is inactivated. | |||||
| */ | |||||
| void lostMouseCapture(); | |||||
| void setNativePixelSize(void); | void setNativePixelSize(void); | ||||
| GHOST_TSuccess beginFullScreen() const | GHOST_TSuccess beginFullScreen() const | ||||
| { | { | ||||
| return GHOST_kFailure; | return GHOST_kFailure; | ||||
| } | } | ||||
| GHOST_TSuccess endFullScreen() const | GHOST_TSuccess endFullScreen() const | ||||
| ▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | protected: | ||||
| /** The view, either Metal or OpenGL */ | /** The view, either Metal or OpenGL */ | ||||
| CocoaOpenGLView *m_openGLView; | CocoaOpenGLView *m_openGLView; | ||||
| CocoaMetalView *m_metalView; | CocoaMetalView *m_metalView; | ||||
| CAMetalLayer *m_metalLayer; | CAMetalLayer *m_metalLayer; | ||||
| /** The mother SystemCocoa class to send events */ | /** The mother SystemCocoa class to send events */ | ||||
| GHOST_SystemCocoa *m_systemCocoa; | GHOST_SystemCocoa *m_systemCocoa; | ||||
| /** | |||||
| * Flag if an operator grabs the mouse with #WM_cursor_grab_enable, #WM_cursor_grab_disable | |||||
| * Multiple grabs must be released with a single un-grab. | |||||
| */ | |||||
| bool m_hasGrabMouse; | |||||
| /** Count of number of pressed buttons. */ | |||||
| int m_nPressedButtons; | |||||
| NSCursor *m_customCursor; | NSCursor *m_customCursor; | ||||
| GHOST_TabletData m_tablet; | GHOST_TabletData m_tablet; | ||||
| bool m_immediateDraw; | bool m_immediateDraw; | ||||
| bool m_debug_context; // for debug messages during context setup | bool m_debug_context; // for debug messages during context setup | ||||
| bool m_is_dialog; | bool m_is_dialog; | ||||
| }; | }; | ||||
| Show All 27 Lines | |||||