diff options
Diffstat (limited to 'intern/ghost/GHOST_ISystem.h')
-rw-r--r-- | intern/ghost/GHOST_ISystem.h | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index bb91abbadec..91cf1c4c558 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -133,6 +133,9 @@ class GHOST_ISystem { */ static GHOST_ISystem *getSystem(); + static GHOST_TBacktraceFn getBacktraceFn(); + static void setBacktraceFn(GHOST_TBacktraceFn backtrace_fn); + protected: /** * Constructor. @@ -305,6 +308,16 @@ class GHOST_ISystem { virtual bool useNativePixel(void) = 0; /** + * Return true when warping the cursor is supported. + */ + virtual bool supportsCursorWarp() = 0; + + /** + * Return true getting/setting the window position is supported. + */ + virtual bool supportsWindowPosition() = 0; + + /** * Focus window after opening, or put them in the background. */ virtual void useWindowFocus(const bool use_focus) = 0; @@ -352,6 +365,25 @@ class GHOST_ISystem { ***************************************************************************************/ /** + * Returns the current location of the cursor (location in window coordinates) + * \param x: The x-coordinate of the cursor. + * \param y: The y-coordinate of the cursor. + * \return Indication of success. + */ + virtual GHOST_TSuccess getCursorPositionClientRelative(const GHOST_IWindow *window, + int32_t &x, + int32_t &y) const = 0; + /** + * Updates the location of the cursor (location in window coordinates). + * \param x: The x-coordinate of the cursor. + * \param y: The y-coordinate of the cursor. + * \return Indication of success. + */ + virtual GHOST_TSuccess setCursorPositionClientRelative(GHOST_IWindow *window, + int32_t x, + int32_t y) = 0; + + /** * Returns the current location of the cursor (location in screen coordinates) * \param x: The x-coordinate of the cursor. * \param y: The y-coordinate of the cursor. @@ -378,7 +410,7 @@ class GHOST_ISystem { * \param isDown: The state of a modifier key (true == pressed). * \return Indication of success. */ - virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKeyMask mask, bool &isDown) const = 0; + virtual GHOST_TSuccess getModifierKeyState(GHOST_TModifierKey mask, bool &isDown) const = 0; /** * Returns the state of a mouse button (outside the message queue). @@ -386,7 +418,7 @@ class GHOST_ISystem { * \param isDown: Button state. * \return Indication of success. */ - virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool &isDown) const = 0; + virtual GHOST_TSuccess getButtonState(GHOST_TButton mask, bool &isDown) const = 0; /** * Set which tablet API to use. Only affects Windows, other platforms have a single API. @@ -477,6 +509,9 @@ class GHOST_ISystem { /** The one and only system */ static GHOST_ISystem *m_system; + /** Function to call that sets the back-trace. */ + static GHOST_TBacktraceFn m_backtrace_fn; + #ifdef WITH_CXX_GUARDEDALLOC MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystem") #endif |