merge with/from trunk at r35190
[blender.git] / intern / ghost / GHOST_IWindow.h
index 97c525ef318cf889250c5c1cf83c48c7f89a1e98..834ac57a5d48fb9cc0451b0d1673ac665a548664 100644 (file)
@@ -66,6 +66,17 @@ public:
        virtual ~GHOST_IWindow()
        {
        }
+       
+       GHOST_IWindow()
+       {
+               static int id = 0;      
+               m_id = id++;
+       }
+
+       virtual int getID()
+       {
+               return m_id;
+       }
 
        /**
         * Returns indication as to whether the window is valid.
@@ -306,6 +317,8 @@ public:
         */
        virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds) { return GHOST_kSuccess; };
 
+private:
+       int m_id;
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
        void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IWindow"); }