svn merge ^/trunk/blender -r46340:46350
[blender.git] / intern / ghost / intern / GHOST_Window.h
index a9f070b89514ca51a1b1741fdec245e856de8c25..23f1b044b6073666322a3f9f8cbefd9cce51b3ee 100644 (file)
@@ -30,8 +30,8 @@
  * Declaration of GHOST_Window class.
  */
 
-#ifndef _GHOST_WINDOW_H_
-#define _GHOST_WINDOW_H_
+#ifndef __GHOST_WINDOW_H__
+#define __GHOST_WINDOW_H__
 
 #include "GHOST_IWindow.h"
 
@@ -161,6 +161,7 @@ public:
         */
        inline virtual bool getCursorVisibility() const;
        inline virtual GHOST_TGrabCursorMode getCursorGrabMode() const;
+       inline virtual bool getCursorGrabModeIsWarp() const;
        inline virtual void getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const;
        inline virtual void getCursorGrabAccum(GHOST_TInt32 &x, GHOST_TInt32 &y) const;
        inline virtual void setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y);
@@ -289,8 +290,9 @@ protected:
         * Sets the cursor shape on the window using
         * native window system calls.
         */
-       virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2],
-                                                        int hotX, int hotY) = 0;
+       virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2],
+                                                         GHOST_TUns8 mask[16][2],
+                                                         int hotX, int hotY) = 0;
        
        virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, 
                                                int szx, int szy, int hotX, int hotY, int fg, int bg) = 0;
@@ -361,6 +363,12 @@ inline GHOST_TGrabCursorMode GHOST_Window::getCursorGrabMode() const
        return m_cursorGrab;
 }
 
+inline bool GHOST_Window::getCursorGrabModeIsWarp() const
+{
+       return  (m_cursorGrab == GHOST_kGrabWrap) ||
+               (m_cursorGrab == GHOST_kGrabHide);
+}
+
 inline void GHOST_Window::getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const
 {
        x = m_cursorGrabInitPos[0];