svn merge ^/trunk/blender -r46340:46350
[blender.git] / intern / ghost / intern / GHOST_Window.h
index d4d537873570c8e3cf0447c3145520d37141dbfa..23f1b044b6073666322a3f9f8cbefd9cce51b3ee 100644 (file)
@@ -1,5 +1,4 @@
-/**
- * $Id$
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
  *
  * ***** END GPL LICENSE BLOCK *****
  */
-/**
- * @file       GHOST_Window.h
+
+/** \file ghost/intern/GHOST_Window.h
+ *  \ingroup GHOST
  * 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"
 
@@ -75,9 +75,6 @@ public:
         * Constructor.
         * Creates a new window and opens it.
         * To check if the window was created properly, use the getValid() method.
-        * @param title                         The text shown in the title bar of the window.
-        * @param left                          The coordinate of the left edge of the window.
-        * @param top                           The coordinate of the top edge of the window.
         * @param width                         The width the window.
         * @param heigh                         The height the window.
         * @param state                         The state the window is initially opened with.
@@ -86,9 +83,6 @@ public:
         * @param numOfAASamples        Number of samples used for AA (zero if no AA)
         */
        GHOST_Window(
-               const STR_String& title, 
-               GHOST_TInt32 left,
-               GHOST_TInt32 top,
                GHOST_TUns32 width,
                GHOST_TUns32 height,
                GHOST_TWindowState state,
@@ -167,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);
@@ -295,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;
@@ -344,11 +340,11 @@ protected:
        
        /** Number of samples used in anti-aliasing, set to 0 if no AA **/
        GHOST_TUns16 m_numOfAASamples;
-    
-    /** Full-screen width */
-    GHOST_TUns32 m_fullScreenWidth;
-    /** Full-screen height */
-    GHOST_TUns32 m_fullScreenHeight;
+
+       /** Full-screen width */
+       GHOST_TUns32 m_fullScreenWidth;
+       /** Full-screen height */
+       GHOST_TUns32 m_fullScreenHeight;
 };
 
 
@@ -367,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];