Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-13 00:16:53 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-13 00:16:53 +0300
commitbdfe7d89e2f1292644577972c716931b4ce3c6c3 (patch)
treed00eb50b749cb001e2b08272c91791e66740b05d /intern/ghost
parent78a1c27c4a6abe0ed31ca93ad21910f3df04da56 (diff)
parent7e4db234cee71ead34ee81a12e27da4bd548eb4b (diff)
Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416 Issues: * GHOST/X11 had conflicting changes. Some code was added in 2.5, which was later added in trunk also, but reverted partially, specifically revision 16683. I have left out this reversion in the 2.5 branch since I think it is needed there. http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683 * Scons had various conflicting changes, I decided to go with trunk version for everything except priorities and some library renaming. * In creator.c, there were various fixes and fixes for fixes related to the -w -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done differently. Since this is changed so much, and I don't think those fixes would be needed in 2.5, I've left them out. * Also in creator.c: there was code for a python bugfix where the screen was not initialized when running with -P. The code that initializes the screen there I had to disable, that can't work in 2.5 anymore but left it commented as a reminder. Further I had to disable some new function calls. using src/ and python/, as was done already in this branch, disabled function calls: * bpath.c: error reporting * BME_conversions.c: editmesh conversion functions. * SHD_dynamic: disabled almost completely, there is no python/. * KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled. * text.c: clipboard copy call. * object.c: OB_SUPPORT_MATERIAL. * DerivedMesh.c and subsurf_ccg, stipple_quarttone. Still to be done: * Go over files and functions that were moved to a different location but could still use changes that were done in trunk.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/GHOST_C-api.h25
-rw-r--r--intern/ghost/GHOST_ISystem.h32
-rw-r--r--intern/ghost/GHOST_Types.h50
-rw-r--r--intern/ghost/SConscript28
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp28
-rw-r--r--intern/ghost/intern/GHOST_EventNDOF.h57
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.cpp127
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.h52
-rw-r--r--intern/ghost/intern/GHOST_System.cpp26
-rw-r--r--intern/ghost/intern/GHOST_System.h51
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp151
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.h26
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp98
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.h17
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp306
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h36
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp33
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp117
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.h2
-rw-r--r--intern/ghost/intern/Makefile1
-rw-r--r--intern/ghost/make/msvc_7_0/ghost.vcproj9
-rw-r--r--intern/ghost/make/msvc_9_0/ghost.vcproj539
22 files changed, 1693 insertions, 118 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index 21ddc467f59..cb1eac7a9a6 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -262,6 +262,19 @@ extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
GHOST_EventConsumerHandle consumerhandle);
+/***************************************************************************************
+ ** N-degree of freedom device management functionality
+ ***************************************************************************************/
+
+/**
+* Open N-degree of freedom devices
+ */
+extern int GHOST_OpenNDOF(GHOST_SystemHandle systemhandle,
+ GHOST_WindowHandle windowhandle,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen
+ );
/***************************************************************************************
** Cursor management functionality
@@ -755,6 +768,18 @@ extern void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle,
*/
extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
GHOST_RectangleHandle anotherrectanglehandle);
+
+/**
+ * Return the data from the clipboad
+ * @return clipboard data
+ */
+extern GHOST_TUns8* GHOST_getClipboard(int flag);
+
+/**
+ * Put data to the Clipboard
+ */
+extern void GHOST_putClipboard(GHOST_TInt8 *buffer, int flag);
+
#ifdef __cplusplus
}
#endif
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
index a27b7453687..baf0cb813f8 100644
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@ -224,13 +224,15 @@ public:
* @param state The state of the window when opened.
* @param type The type of drawing context installed in this window.
* @param stereoVisual Create a stereo visual for quad buffered stereo.
+ * @param parentWindow Parent (embedder) window
* @return The new window (or 0 if creation failed).
*/
virtual GHOST_IWindow* createWindow(
const STR_String& title,
GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
GHOST_TWindowState state, GHOST_TDrawingContextType type,
- const bool stereoVisual) = 0;
+ const bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow = 0) = 0;
/**
* Dispose a window.
@@ -292,6 +294,22 @@ public:
*/
virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer* consumer) = 0;
+ /***************************************************************************************
+ ** N-degree of freedom device management functionality
+ ***************************************************************************************/
+
+ /**
+ * Starts the N-degree of freedom device manager
+ */
+ virtual int openNDOF(GHOST_IWindow*,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen
+ // original patch only
+ // GHOST_NDOFEventHandler_fp setNdofEventHandler
+ ) = 0;
+
+
/***************************************************************************************
** Cursor management functionality
***************************************************************************************/
@@ -333,6 +351,18 @@ public:
*/
virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const = 0;
+ /**
+ * Returns the selection buffer
+ * @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer
+ *
+ */
+ virtual GHOST_TUns8* getClipboard(int flag) const = 0;
+
+ /**
+ * Put data to the Clipboard
+ */
+ virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const = 0;
+
protected:
/**
* Initialize the system.
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index a413b765ccb..b683740247a 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -36,6 +36,11 @@ typedef unsigned short GHOST_TUns16;
typedef int GHOST_TInt32;
typedef unsigned int GHOST_TUns32;
+#ifdef WIN32
+#define WM_BLND_NDOF_AXIS WM_USER + 1
+#define WM_BLND_NDOF_BTN WM_USER + 2
+#endif
+
#if defined(WIN32) && !defined(FREE_WINDOWS)
typedef __int64 GHOST_TInt64;
typedef unsigned __int64 GHOST_TUns64;
@@ -95,6 +100,7 @@ typedef enum {
GHOST_kWindowStateMaximized,
GHOST_kWindowStateMinimized,
GHOST_kWindowStateFullScreen,
+ GHOST_kWindowStateEmbedded,
GHOST_kWindowState8Normal = 8,
GHOST_kWindowState8Maximized,
GHOST_kWindowState8Minimized,
@@ -130,6 +136,9 @@ typedef enum {
GHOST_kEventButtonUp, /// Mouse button event
GHOST_kEventWheel, /// Mouse wheel event
+ GHOST_kEventNDOFMotion, /// N degree of freedom device motion event
+ GHOST_kEventNDOFButton, /// N degree of freedom device button event
+
GHOST_kEventKeyDown,
GHOST_kEventKeyUp,
// GHOST_kEventKeyAuto,
@@ -336,6 +345,38 @@ typedef struct {
GHOST_TInt32 z;
} GHOST_TEventWheelData;
+
+/* original patch used floats, but the driver return ints and uns. We will calibrate in view, no sense on doing conversions twice */
+/* as all USB device controls are likely to use ints, this is also more future proof */
+//typedef struct {
+// /** N-degree of freedom device data */
+// float tx, ty, tz; /** -x left, +y up, +z forward */
+// float rx, ry, rz;
+// float dt;
+//} GHOST_TEventNDOFData;
+
+typedef struct {
+ /** N-degree of freedom device data v2*/
+ int changed;
+ GHOST_TUns64 client;
+ GHOST_TUns64 address;
+ GHOST_TInt16 tx, ty, tz; /** -x left, +y up, +z forward */
+ GHOST_TInt16 rx, ry, rz;
+ GHOST_TInt16 buttons;
+ GHOST_TUns64 time;
+ GHOST_TUns64 delta;
+} GHOST_TEventNDOFData;
+
+typedef int (*GHOST_NDOFLibraryInit_fp)();
+typedef void (*GHOST_NDOFLibraryShutdown_fp)(void* deviceHandle);
+typedef void* (*GHOST_NDOFDeviceOpen_fp)(void* platformData);
+
+// original patch windows callback. In mac os X version the callback is internal to the plug-in and post an event to main thead.
+// not necessary faster, but better integration with other events.
+
+//typedef int (*GHOST_NDOFEventHandler_fp)(float* result7, void* deviceHandle, unsigned int message, unsigned int* wParam, unsigned long* lParam);
+//typedef void (*GHOST_NDOFCallBack_fp)(GHOST_TEventNDOFDataV2 *VolDatas);
+
typedef struct {
/** The key code. */
GHOST_TKey key;
@@ -355,6 +396,15 @@ typedef struct {
} GHOST_DisplaySetting;
+#ifdef _WIN32
+typedef long GHOST_TEmbedderWindowID;
+#endif // _WIN32
+
+#ifndef _WIN32
+// I can't use "Window" from "<X11/Xlib.h>" because it conflits with Window defined in winlay.h
+typedef int GHOST_TEmbedderWindowID;
+#endif // _WIN32
+
/**
* A timer task callback routine.
* @param task The timer task object.
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index bca9d715324..ad6b4ff51ba 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -10,25 +10,23 @@ sources = env.Glob('intern/*.cpp')
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window']
-if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6'):
- for f in pf:
- sources.remove('intern' + os.sep + f + 'Win32.cpp')
- sources.remove('intern' + os.sep + f + 'Carbon.cpp')
+if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6'):
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
+ sources.remove('intern' + os.sep + f + 'Carbon.cpp')
elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'):
- for f in pf:
- sources.remove('intern' + os.sep + f + 'X11.cpp')
- sources.remove('intern' + os.sep + f + 'Carbon.cpp')
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'X11.cpp')
+ sources.remove('intern' + os.sep + f + 'Carbon.cpp')
elif window_system == 'darwin':
- for f in pf:
- sources.remove('intern' + os.sep + f + 'Win32.cpp')
- sources.remove('intern' + os.sep + f + 'X11.cpp')
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
+ sources.remove('intern' + os.sep + f + 'X11.cpp')
else:
- print "Unknown window system specified."
- Exit()
+ print "Unknown window system specified."
+ Exit()
incs = '. ../string ' + env['BF_OPENGL_INC']
-
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'):
- incs = env['BF_WINTAB_INC'] + ' ' + incs
-
+ incs = env['BF_WINTAB_INC'] + ' ' + incs
env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['core','intern','player'], priority = [40,44,5] )
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 75d993c3e03..ad5189af0e9 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -251,6 +251,21 @@ GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_Eve
return system->addEventConsumer((GHOST_CallbackEventConsumer*)consumerhandle);
}
+int GHOST_OpenNDOF(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen)
+ //original patch only
+ /* GHOST_NDOFEventHandler_fp setNdofEventHandler)*/
+{
+ GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+
+ return system->openNDOF((GHOST_IWindow*) windowhandle,
+ setNdofLibraryInit, setNdofLibraryShutdown, setNdofDeviceOpen);
+// original patch
+// setNdofLibraryInit, setNdofLibraryShutdown, setNdofDeviceOpen, setNdofEventHandler);
+}
+
GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
@@ -794,3 +809,16 @@ GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
return result;
}
+
+GHOST_TUns8* GHOST_getClipboard(int flag)
+{
+ GHOST_ISystem* system = GHOST_ISystem::getSystem();
+ return system->getClipboard(flag);
+}
+
+void GHOST_putClipboard(GHOST_TInt8 *buffer, int flag)
+{
+ GHOST_ISystem* system = GHOST_ISystem::getSystem();
+ system->putClipboard(buffer, flag);
+}
+
diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h
new file mode 100644
index 00000000000..76f5a9e0894
--- /dev/null
+++ b/intern/ghost/intern/GHOST_EventNDOF.h
@@ -0,0 +1,57 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+
+#ifndef _GHOST_EVENT_NDOF_H_
+#define _GHOST_EVENT_NDOF_H_
+
+#include "GHOST_Event.h"
+
+/**
+ * N-degree of freedom device event.
+ */
+class GHOST_EventNDOF : public GHOST_Event
+{
+public:
+ /**
+ * Constructor.
+ * @param msec The time this event was generated.
+ * @param type The type of this event.
+ * @param x The x-coordinate of the location the cursor was at at the time of the event.
+ * @param y The y-coordinate of the location the cursor was at at the time of the event.
+ */
+ GHOST_EventNDOF(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window,
+ GHOST_TEventNDOFData data)
+ : GHOST_Event(msec, type, window)
+ {
+ m_ndofEventData = data;
+ m_data = &m_ndofEventData;
+ }
+
+protected:
+ /** translation & rotation from the device. */
+ GHOST_TEventNDOFData m_ndofEventData;
+};
+
+
+#endif // _GHOST_EVENT_NDOF_H_
+
diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp
new file mode 100644
index 00000000000..2426146184a
--- /dev/null
+++ b/intern/ghost/intern/GHOST_NDOFManager.cpp
@@ -0,0 +1,127 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdio.h> /* just for printf */
+
+#include "GHOST_NDOFManager.h"
+
+
+// the variable is outside the class because it must be accessed from plugin
+static volatile GHOST_TEventNDOFData currentNdofValues = {0,0,0,0,0,0,0,0,0,0,0};
+
+#if !defined(_WIN32) && !defined(__APPLE__)
+#include "GHOST_SystemX11.h"
+#endif
+
+namespace
+{
+ GHOST_NDOFLibraryInit_fp ndofLibraryInit = 0;
+ GHOST_NDOFLibraryShutdown_fp ndofLibraryShutdown = 0;
+ GHOST_NDOFDeviceOpen_fp ndofDeviceOpen = 0;
+}
+
+GHOST_NDOFManager::GHOST_NDOFManager()
+{
+ m_DeviceHandle = 0;
+
+ // discover the API from the plugin
+ ndofLibraryInit = 0;
+ ndofLibraryShutdown = 0;
+ ndofDeviceOpen = 0;
+}
+
+GHOST_NDOFManager::~GHOST_NDOFManager()
+{
+ if (ndofLibraryShutdown)
+ ndofLibraryShutdown(m_DeviceHandle);
+
+ m_DeviceHandle = 0;
+}
+
+
+int
+GHOST_NDOFManager::deviceOpen(GHOST_IWindow* window,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen)
+{
+ int Pid;
+
+ ndofLibraryInit = setNdofLibraryInit;
+ ndofLibraryShutdown = setNdofLibraryShutdown;
+ ndofDeviceOpen = setNdofDeviceOpen;
+
+ if (ndofLibraryInit && ndofDeviceOpen)
+ {
+ Pid= ndofLibraryInit();
+#if 0
+ printf("%i client \n", Pid);
+#endif
+ #if defined(_WIN32) || defined(__APPLE__)
+ m_DeviceHandle = ndofDeviceOpen((void *)&currentNdofValues);
+ #else
+ GHOST_SystemX11 *sys;
+ sys = static_cast<GHOST_SystemX11*>(GHOST_ISystem::getSystem());
+ void *ndofInfo = sys->prepareNdofInfo(&currentNdofValues);
+ m_DeviceHandle = ndofDeviceOpen(ndofInfo);
+ #endif
+ return (Pid > 0) ? 0 : 1;
+
+ } else
+ return 1;
+}
+
+
+bool
+GHOST_NDOFManager::available() const
+{
+ return m_DeviceHandle != 0;
+}
+
+bool
+GHOST_NDOFManager::event_present() const
+{
+ if( currentNdofValues.changed >0) {
+ printf("time %llu but%u x%i y%i z%i rx%i ry%i rz%i \n" ,
+ currentNdofValues.time, currentNdofValues.buttons,
+ currentNdofValues.tx,currentNdofValues.ty,currentNdofValues.tz,
+ currentNdofValues.rx,currentNdofValues.ry,currentNdofValues.rz);
+ return true;
+ }else
+ return false;
+
+}
+
+void GHOST_NDOFManager::GHOST_NDOFGetDatas(GHOST_TEventNDOFData &datas) const
+{
+ datas.tx = currentNdofValues.tx;
+ datas.ty = currentNdofValues.ty;
+ datas.tz = currentNdofValues.tz;
+ datas.rx = currentNdofValues.rx;
+ datas.ry = currentNdofValues.ry;
+ datas.rz = currentNdofValues.rz;
+ datas.buttons = currentNdofValues.buttons;
+ datas.client = currentNdofValues.client;
+ datas.address = currentNdofValues.address;
+ datas.time = currentNdofValues.time;
+ datas.delta = currentNdofValues.delta;
+}
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
new file mode 100644
index 00000000000..18d651b89af
--- /dev/null
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -0,0 +1,52 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef _GHOST_NDOFMANAGER_H_
+#define _GHOST_NDOFMANAGER_H_
+
+#include "GHOST_System.h"
+#include "GHOST_IWindow.h"
+
+
+
+class GHOST_NDOFManager
+{
+public:
+ GHOST_NDOFManager();
+ virtual ~GHOST_NDOFManager();
+
+ int deviceOpen(GHOST_IWindow* window,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen);
+
+ void GHOST_NDOFGetDatas(GHOST_TEventNDOFData &datas) const;
+
+ bool available() const;
+ bool event_present() const;
+
+protected:
+ void* m_DeviceHandle;
+};
+
+
+#endif
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index 71448a390d7..87e5f375958 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -41,16 +41,18 @@
#include "GHOST_System.h"
#include <time.h>
+#include <stdio.h> /* just for printf */
#include "GHOST_DisplayManager.h"
#include "GHOST_EventManager.h"
+#include "GHOST_NDOFManager.h"
#include "GHOST_TimerTask.h"
#include "GHOST_TimerManager.h"
#include "GHOST_WindowManager.h"
GHOST_System::GHOST_System()
-: m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0)
+: m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0), m_ndofManager(0)
{
}
@@ -236,6 +238,17 @@ GHOST_TSuccess GHOST_System::pushEvent(GHOST_IEvent* event)
return success;
}
+int GHOST_System::openNDOF(GHOST_IWindow* w,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen)
+{
+ return m_ndofManager->deviceOpen(w,
+ setNdofLibraryInit,
+ setNdofLibraryShutdown,
+ setNdofDeviceOpen);
+}
+
GHOST_TSuccess GHOST_System::getModifierKeyState(GHOST_TModifierKeyMask mask, bool& isDown) const
{
@@ -268,6 +281,13 @@ GHOST_TSuccess GHOST_System::init()
m_timerManager = new GHOST_TimerManager ();
m_windowManager = new GHOST_WindowManager ();
m_eventManager = new GHOST_EventManager ();
+ m_ndofManager = new GHOST_NDOFManager();
+
+#if 0
+ if(m_ndofManager)
+ printf("ndof manager \n");
+#endif
+
#ifdef GHOST_DEBUG
if (m_eventManager) {
m_eventManager->addConsumer(&m_eventPrinter);
@@ -303,6 +323,10 @@ GHOST_TSuccess GHOST_System::exit()
delete m_eventManager;
m_eventManager = 0;
}
+ if (m_ndofManager) {
+ delete m_ndofManager;
+ m_ndofManager = 0;
+ }
return GHOST_kSuccess;
}
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index 0484f57246f..efce931860a 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -48,6 +48,7 @@ class GHOST_Event;
class GHOST_TimerManager;
class GHOST_Window;
class GHOST_WindowManager;
+class GHOST_NDOFManager;
/**
* Implementation of platform independent functionality of the GHOST_ISystem
@@ -181,6 +182,27 @@ public:
*/
virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer* consumer);
+
+
+ /***************************************************************************************
+ ** N-degree of freedom devcice management functionality
+ ***************************************************************************************/
+
+ /** Inherited from GHOST_ISystem
+ * Opens the N-degree of freedom device manager
+ * return 0 if device found, 1 otherwise
+ */
+ virtual int openNDOF(GHOST_IWindow* w,
+ GHOST_NDOFLibraryInit_fp setNdofLibraryInit,
+ GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
+ GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen);
+
+// original patch only
+// GHOST_NDOFEventHandler_fp setNdofEventHandler);
+
+
+
+
/***************************************************************************************
** Cursor management functionality
***************************************************************************************/
@@ -240,6 +262,12 @@ public:
*/
virtual inline GHOST_WindowManager* getWindowManager() const;
+ /**
+ * Returns a pointer to our n-degree of freedeom manager.
+ * @return A pointer to our n-degree of freedeom manager.
+ */
+ virtual inline GHOST_NDOFManager* getNDOFManager() const;
+
/**
* Returns the state of all modifier keys.
* @param keys The state of all modifier keys (true == pressed).
@@ -254,6 +282,21 @@ public:
*/
virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const = 0;
+ /**
+ * Returns the selection buffer
+ * @param flag Only used on X11
+ * @return Returns the clipboard data
+ *
+ */
+ virtual GHOST_TUns8* getClipboard(int flag) const = 0;
+
+ /**
+ * Put data to the Clipboard
+ * @param buffer The buffer to copy to the clipboard
+ * @param flag The clipboard to copy too only used on X11
+ */
+ virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const = 0;
+
protected:
/**
* Initialize the system.
@@ -287,6 +330,9 @@ protected:
/** The event manager. */
GHOST_EventManager* m_eventManager;
+ /** The N-degree of freedom device manager */
+ GHOST_NDOFManager* m_ndofManager;
+
/** Prints all the events. */
#ifdef GHOST_DEBUG
GHOST_EventPrinter m_eventPrinter;
@@ -311,5 +357,10 @@ inline GHOST_WindowManager* GHOST_System::getWindowManager() const
return m_windowManager;
}
+inline GHOST_NDOFManager* GHOST_System::getNDOFManager() const
+{
+ return m_ndofManager;
+}
+
#endif // _GHOST_SYSTEM_H_
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index e1980521eb0..5de00d9ab3e 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -34,10 +34,9 @@
* @date May 7, 2001
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
#include "GHOST_SystemCarbon.h"
#include "GHOST_DisplayManagerCarbon.h"
@@ -45,22 +44,34 @@
#include "GHOST_EventButton.h"
#include "GHOST_EventCursor.h"
#include "GHOST_EventWheel.h"
+#include "GHOST_EventNDOF.h"
+
#include "GHOST_TimerManager.h"
#include "GHOST_TimerTask.h"
#include "GHOST_WindowManager.h"
#include "GHOST_WindowCarbon.h"
+#include "GHOST_NDOFManager.h"
+#include "AssertMacros.h"
#define GHOST_KEY_SWITCH(mac, ghost) { case (mac): ghostKey = (ghost); break; }
+/* blender class and types events */
+enum {
+ kEventClassBlender = 'blnd'
+};
+
+enum {
+ kEventBlenderNdofAxis = 1,
+ kEventBlenderNdofButtons = 2
+};
+
const EventTypeSpec kEvents[] =
{
{ kEventClassAppleEvent, kEventAppleEvent },
-
/*
{ kEventClassApplication, kEventAppActivated },
{ kEventClassApplication, kEventAppDeactivated },
*/
-
{ kEventClassKeyboard, kEventRawKeyDown },
{ kEventClassKeyboard, kEventRawKeyRepeat },
{ kEventClassKeyboard, kEventRawKeyUp },
@@ -81,7 +92,12 @@ const EventTypeSpec kEvents[] =
{ kEventClassWindow, kEventWindowActivated },
{ kEventClassWindow, kEventWindowDeactivated },
{ kEventClassWindow, kEventWindowUpdate },
- { kEventClassWindow, kEventWindowBoundsChanged }
+ { kEventClassWindow, kEventWindowBoundsChanged },
+
+ { kEventClassBlender, kEventBlenderNdofAxis },
+ { kEventClassBlender, kEventBlenderNdofButtons }
+
+
};
@@ -386,7 +402,8 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow(
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- bool stereoVisual
+ bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow
)
{
GHOST_IWindow* window = 0;
@@ -413,7 +430,9 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow(
return window;
}
-
+/* this is an old style low level event queue.
+ As we want to handle our own timers, this is ok.
+ the full screen hack should be removed */
bool GHOST_SystemCarbon::processEvents(bool waitForEvent)
{
bool anyProcessed = false;
@@ -421,7 +440,7 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent)
do {
GHOST_TimerManager* timerMgr = getTimerManager();
-
+
if (waitForEvent) {
GHOST_TUns64 next = timerMgr->nextFireTime();
double timeOut;
@@ -450,6 +469,8 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent)
}
}
+
+ /* end loop when no more events available */
while (::ReceiveNextEvent(0, NULL, 0, true, &event)==noErr) {
OSStatus status= ::SendEventToEventTarget(event, ::GetEventDispatcherTarget());
if (status==noErr) {
@@ -461,7 +482,9 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent)
* are, but we get a lot of them
*/
if (i!='cgs ') {
- //printf("Missed - Class: '%.4s', Kind: %d\n", &i, ::GetEventKind(event));
+ if (i!='tblt') { // tablet event. we use the one packaged in the mouse event
+ ; //printf("Missed - Class: '%.4s', Kind: %d\n", &i, ::GetEventKind(event));
+ }
}
}
::ReleaseEvent(event);
@@ -605,6 +628,7 @@ OSErr GHOST_SystemCarbon::sAEHandlerQuit(const AppleEvent *event, AppleEvent *re
GHOST_TSuccess GHOST_SystemCarbon::init()
{
+
GHOST_TSuccess success = GHOST_System::init();
if (success) {
/*
@@ -624,6 +648,7 @@ GHOST_TSuccess GHOST_SystemCarbon::init()
::AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, sAEHandlerOpenDocs, (SInt32) this, false);
::AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, sAEHandlerPrintDocs, (SInt32) this, false);
::AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, sAEHandlerQuit, (SInt32) this, false);
+
}
return success;
}
@@ -760,6 +785,7 @@ OSStatus GHOST_SystemCarbon::handleTabletEvent(EventRef event)
}
err = noErr;
}
+
}
OSStatus GHOST_SystemCarbon::handleMouseEvent(EventRef event)
@@ -962,7 +988,7 @@ bool GHOST_SystemCarbon::handleMouseDown(EventRef event)
GHOST_ASSERT(ghostWindow, "GHOST_SystemCarbon::handleMouseEvent: ghostWindow==0");
if (::TrackGoAway(window, mousePos))
{
- // todo: add option-close, because itØs in the HIG
+ // todo: add option-close, because itÿs in the HIG
// if (event.modifiers & optionKey) {
// Close the clean documents, others will be confirmed one by one.
//}
@@ -1040,11 +1066,15 @@ bool GHOST_SystemCarbon::handleMenuCommand(GHOST_TInt32 menuResult)
return handled;
}
+
OSStatus GHOST_SystemCarbon::sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData)
{
GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) userData;
OSStatus err = eventNotHandledErr;
-
+ GHOST_IWindow* window;
+ GHOST_TEventNDOFData data;
+ UInt32 kind;
+
switch (::GetEventClass(event))
{
case kEventClassAppleEvent:
@@ -1062,7 +1092,102 @@ OSStatus GHOST_SystemCarbon::sEventHandlerProc(EventHandlerCallRef handler, Even
case kEventClassKeyboard:
err = sys->handleKeyEvent(event);
break;
- }
+ case kEventClassBlender :
+ window = sys->m_windowManager->getActiveWindow();
+ sys->m_ndofManager->GHOST_NDOFGetDatas(data);
+ kind = ::GetEventKind(event);
+
+ switch (kind)
+ {
+ case 1:
+ sys->m_eventManager->pushEvent(new GHOST_EventNDOF(sys->getMilliSeconds(), GHOST_kEventNDOFMotion, window, data));
+ // printf("motion\n");
+ break;
+ case 2:
+ sys->m_eventManager->pushEvent(new GHOST_EventNDOF(sys->getMilliSeconds(), GHOST_kEventNDOFButton, window, data));
+// printf("button\n");
+ break;
+ }
+ err = noErr;
+ break;
+ default :
+ ;
+ break;
+ }
return err;
}
+
+GHOST_TUns8* GHOST_SystemCarbon::getClipboard(int flag) const
+{
+ PasteboardRef inPasteboard;
+ PasteboardItemID itemID;
+ CFDataRef flavorData;
+ OSStatus err = noErr;
+ GHOST_TUns8 * temp_buff;
+ CFRange range;
+ OSStatus syncFlags;
+
+ err = PasteboardCreate(kPasteboardClipboard, &inPasteboard);
+ if(err != noErr) { return NULL;}
+
+ syncFlags = PasteboardSynchronize( inPasteboard );
+ /* as we always get in a new string, we can safely ignore sync flags if not an error*/
+ if(syncFlags <0) { return NULL;}
+
+
+ err = PasteboardGetItemIdentifier( inPasteboard, 1, &itemID );
+ if(err != noErr) { return NULL;}
+
+ err = PasteboardCopyItemFlavorData( inPasteboard, itemID, CFSTR("public.utf8-plain-text"), &flavorData);
+ if(err != noErr) { return NULL;}
+
+ range = CFRangeMake(0, CFDataGetLength(flavorData));
+
+ temp_buff = (GHOST_TUns8*) malloc(range.length+1);
+
+ CFDataGetBytes(flavorData, range, (UInt8*)temp_buff);
+
+ temp_buff[range.length] = '\0';
+
+ if(temp_buff) {
+ return temp_buff;
+ } else {
+ return NULL;
+ }
+}
+
+void GHOST_SystemCarbon::putClipboard(GHOST_TInt8 *buffer, int flag) const
+{
+ if(flag == 1) {return;} //If Flag is 1 means the selection and is used on X11
+
+ PasteboardRef inPasteboard;
+ CFDataRef textData = NULL;
+ OSStatus err = noErr; /*For error checking*/
+ OSStatus syncFlags;
+
+ err = PasteboardCreate(kPasteboardClipboard, &inPasteboard);
+ if(err != noErr) { return;}
+
+ syncFlags = PasteboardSynchronize( inPasteboard );
+ /* as we always put in a new string, we can safely ignore sync flags */
+ if(syncFlags <0) { return;}
+
+ err = PasteboardClear( inPasteboard );
+ if(err != noErr) { return;}
+
+ textData = CFDataCreate(kCFAllocatorDefault, (UInt8*)buffer, strlen(buffer));
+
+ if (textData) {
+ err = PasteboardPutItemFlavor( inPasteboard, (PasteboardItemID)1, CFSTR("public.utf8-plain-text"), textData, 0);
+ if(err != noErr) {
+ if(textData) { CFRelease(textData);}
+ return;
+ }
+ }
+
+ if(textData) {
+ CFRelease(textData);
+ }
+}
+
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h
index 6f59710f019..2a1d6325784 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.h
+++ b/intern/ghost/intern/GHOST_SystemCarbon.h
@@ -57,12 +57,12 @@ public:
/**
* Constructor.
*/
- GHOST_SystemCarbon::GHOST_SystemCarbon();
+ GHOST_SystemCarbon();
/**
* Destructor.
*/
- GHOST_SystemCarbon::~GHOST_SystemCarbon();
+ ~GHOST_SystemCarbon();
/***************************************************************************************
** Time(r) functionality
@@ -103,6 +103,7 @@ public:
* @param height The height the window.
* @param state The state of the window when opened.
* @param type The type of drawing context installed in this window.
+ * @param parentWindow Parent (embedder) window
* @return The new window (or 0 if creation failed).
*/
virtual GHOST_IWindow* createWindow(
@@ -113,7 +114,8 @@ public:
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- const bool stereoVisual
+ const bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow = 0
);
/***************************************************************************************
@@ -165,6 +167,20 @@ public:
*/
virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const;
+ /**
+ * Returns Clipboard data
+ * @param flag Indicate which buffer to return
+ * @return Returns the selected buffer
+ */
+ virtual GHOST_TUns8* getClipboard(int flag) const;
+
+ /**
+ * Puts buffer to system clipboard
+ * @param buffer The buffer to be copied
+ * @param flag Indicates which buffer to copy too Only used on X11
+ */
+ virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const;
+
protected:
/**
* Initializes the system.
@@ -221,6 +237,10 @@ protected:
*/
bool handleMenuCommand(GHOST_TInt32 menuResult);
+ /* callback for blender generated events */
+// static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
+
+
/**
* Callback for Carbon when it has events.
*/
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 61b504400d2..6b5fcfe7705 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -40,6 +40,14 @@
#include "GHOST_SystemWin32.h"
+// win64 doesn't define GWL_USERDATA
+#ifdef WIN32
+#ifndef GWL_USERDATA
+#define GWL_USERDATA GWLP_USERDATA
+#define GWL_WNDPROC GWLP_WNDPROC
+#endif
+#endif
+
/*
* According to the docs the mouse wheel message is supported from windows 98
* upwards. Leaving WINVER at default value, the WM_MOUSEWHEEL message and the
@@ -59,10 +67,12 @@
#include "GHOST_EventCursor.h"
#include "GHOST_EventKey.h"
#include "GHOST_EventWheel.h"
+#include "GHOST_EventNDOF.h"
#include "GHOST_TimerTask.h"
#include "GHOST_TimerManager.h"
#include "GHOST_WindowManager.h"
#include "GHOST_WindowWin32.h"
+#include "GHOST_NDOFManager.h"
// Key code values not found in winuser.h
#ifndef VK_MINUS
@@ -157,7 +167,7 @@ GHOST_IWindow* GHOST_SystemWin32::createWindow(
const STR_String& title,
GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
GHOST_TWindowState state, GHOST_TDrawingContextType type,
- bool stereoVisual)
+ bool stereoVisual, const GHOST_TEmbedderWindowID parentWindow )
{
GHOST_Window* window = 0;
window = new GHOST_WindowWin32 (title, left, top, width, height, state, type, stereoVisual);
@@ -299,6 +309,15 @@ GHOST_TSuccess GHOST_SystemWin32::init()
{
GHOST_TSuccess success = GHOST_System::init();
+ /* Disable scaling on high DPI displays on Vista */
+ HMODULE user32 = ::LoadLibraryA("user32.dll");
+ typedef BOOL (WINAPI * LPFNSETPROCESSDPIAWARE)();
+ LPFNSETPROCESSDPIAWARE SetProcessDPIAware =
+ (LPFNSETPROCESSDPIAWARE)GetProcAddress(user32, "SetProcessDPIAware");
+ if (SetProcessDPIAware)
+ SetProcessDPIAware();
+ FreeLibrary(user32);
+
// Determine whether this system has a high frequency performance counter. */
m_hasPerformanceCounter = ::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq) == TRUE;
if (m_hasPerformanceCounter) {
@@ -843,6 +862,28 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* In GHOST, we let DefWindowProc call the timer callback.
*/
break;
+ case WM_BLND_NDOF_AXIS:
+ {
+ GHOST_TEventNDOFData ndofdata;
+ system->m_ndofManager->GHOST_NDOFGetDatas(ndofdata);
+ system->m_eventManager->
+ pushEvent(new GHOST_EventNDOF(
+ system->getMilliSeconds(),
+ GHOST_kEventNDOFMotion,
+ window, ndofdata));
+ }
+ break;
+ case WM_BLND_NDOF_BTN:
+ {
+ GHOST_TEventNDOFData ndofdata;
+ system->m_ndofManager->GHOST_NDOFGetDatas(ndofdata);
+ system->m_eventManager->
+ pushEvent(new GHOST_EventNDOF(
+ system->getMilliSeconds(),
+ GHOST_kEventNDOFButton,
+ window, ndofdata));
+ }
+ break;
}
}
else {
@@ -871,3 +912,58 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
}
return lResult;
}
+
+GHOST_TUns8* GHOST_SystemWin32::getClipboard(int flag) const
+{
+ char *buffer;
+ char *temp_buff;
+
+ if ( IsClipboardFormatAvailable(CF_TEXT) && OpenClipboard(NULL) ) {
+ HANDLE hData = GetClipboardData( CF_TEXT );
+ if (hData == NULL) {
+ CloseClipboard();
+ return NULL;
+ }
+ buffer = (char*)GlobalLock( hData );
+
+ temp_buff = (char*) malloc(strlen(buffer)+1);
+ strcpy(temp_buff, buffer);
+
+ GlobalUnlock( hData );
+ CloseClipboard();
+
+ temp_buff[strlen(buffer)] = '\0';
+ if (buffer) {
+ return (GHOST_TUns8*)temp_buff;
+ } else {
+ return NULL;
+ }
+ } else {
+ return NULL;
+ }
+}
+
+void GHOST_SystemWin32::putClipboard(GHOST_TInt8 *buffer, int flag) const
+{
+ if(flag == 1) {return;} //If Flag is 1 means the selection and is used on X11
+ if (OpenClipboard(NULL)) {
+ HLOCAL clipbuffer;
+ char *data;
+
+ if (buffer) {
+ EmptyClipboard();
+
+ clipbuffer = LocalAlloc(LMEM_FIXED,((strlen(buffer)+1)));
+ data = (char*)GlobalLock(clipbuffer);
+
+ strcpy(data, (char*)buffer);
+ data[strlen(buffer)] = '\0';
+ LocalUnlock(clipbuffer);
+ SetClipboardData(CF_TEXT,clipbuffer);
+ }
+ CloseClipboard();
+ } else {
+ return;
+ }
+}
+
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 968586965ed..00f7af00162 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -109,13 +109,14 @@ public:
* @param height The height the window.
* @param state The state of the window when opened.
* @param type The type of drawing context installed in this window.
+ * @param parentWindow Parent (embedder) window
* @return The new window (or 0 if creation failed).
*/
virtual GHOST_IWindow* createWindow(
const STR_String& title,
GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
GHOST_TWindowState state, GHOST_TDrawingContextType type,
- const bool stereoVisual);
+ const bool stereoVisual, const GHOST_TEmbedderWindowID parentWindow = 0 );
/***************************************************************************************
** Event management functionality
@@ -167,6 +168,20 @@ public:
*/
virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const;
+ /**
+ * Returns unsinged char from CUT_BUFFER0
+ * @param flag Flag is not used on win32 on used on X11
+ * @return Returns the Clipboard
+ */
+ virtual GHOST_TUns8* getClipboard(int flag) const;
+
+ /**
+ * Puts buffer to system clipboard
+ * @param flag Flag is not used on win32 on used on X11
+ * @return No return
+ */
+ virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const;
+
protected:
/**
* Initializes the system.
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 170a7c23843..5a145510e54 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -26,34 +26,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/**
- * $Id$
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -66,12 +38,15 @@
#include "GHOST_EventKey.h"
#include "GHOST_EventButton.h"
#include "GHOST_EventWheel.h"
+#include "GHOST_EventNDOF.h"
+#include "GHOST_NDOFManager.h"
#include "GHOST_DisplayManagerX11.h"
#include "GHOST_Debug.h"
#include <X11/Xatom.h>
#include <X11/keysym.h>
+#include <X11/XKBlib.h> /* allow detectable autorepeate */
#ifdef __sgi
@@ -89,6 +64,24 @@
#include <unistd.h>
#include <vector>
+#include <stdio.h> // for fprintf only
+
+typedef struct NDOFPlatformInfo {
+ Display *display;
+ Window window;
+ volatile GHOST_TEventNDOFData *currValues;
+ Atom cmdAtom;
+ Atom motionAtom;
+ Atom btnPressAtom;
+ Atom btnRelAtom;
+} NDOFPlatformInfo;
+
+static NDOFPlatformInfo sNdofInfo = {NULL, 0, NULL, 0, 0, 0, 0};
+
+
+//these are for copy and select copy
+static char *txt_cut_buffer= NULL;
+static char *txt_select_buffer= NULL;
using namespace std;
@@ -103,15 +96,17 @@ GHOST_SystemX11(
if (!m_display) return;
#ifdef __sgi
- m_delete_window_atom = XSGIFastInternAtom(m_display,
- "WM_DELETE_WINDOW",
- SGI_XA_WM_DELETE_WINDOW,
- False);
+ m_delete_window_atom
+ = XSGIFastInternAtom(m_display,
+ "WM_DELETE_WINDOW",
+ SGI_XA_WM_DELETE_WINDOW, False);
#else
- m_delete_window_atom = XInternAtom(m_display,
- "WM_DELETE_WINDOW", False);
+ m_delete_window_atom
+ = XInternAtom(m_display, "WM_DELETE_WINDOW", True);
#endif
+ m_wm_protocols= XInternAtom(m_display, "WM_PROTOCOLS", False);
+ m_wm_take_focus= XInternAtom(m_display, "WM_TAKE_FOCUS", False);
m_wm_state= XInternAtom(m_display, "WM_STATE", False);
m_wm_change_state= XInternAtom(m_display, "WM_CHANGE_STATE", False);
m_net_state= XInternAtom(m_display, "_NET_WM_STATE", False);
@@ -123,6 +118,7 @@ GHOST_SystemX11(
"_NET_WM_STATE_FULLSCREEN", False);
m_motif= XInternAtom(m_display, "_MOTIF_WM_HINTS", False);
+
// compute the initial time
timeval tv;
if (gettimeofday(&tv,NULL) == -1) {
@@ -130,6 +126,18 @@ GHOST_SystemX11(
}
m_start_time = GHOST_TUns64(tv.tv_sec*1000 + tv.tv_usec/1000);
+
+
+ /* use detectable autorepeate, mac and windows also do this */
+ int use_xkb;
+ int xkb_opcode, xkb_event, xkb_error;
+ int xkb_major = XkbMajorVersion, xkb_minor = XkbMinorVersion;
+
+ use_xkb = XkbQueryExtension(m_display, &xkb_opcode, &xkb_event, &xkb_error, &xkb_major, &xkb_minor);
+ if (use_xkb) {
+ XkbSetDetectableAutoRepeat(m_display, true, NULL);
+ }
+
}
GHOST_TSuccess
@@ -150,8 +158,6 @@ init(
return GHOST_kFailure;
}
-
-
GHOST_TUns64
GHOST_SystemX11::
@@ -199,6 +205,7 @@ getMainDisplayDimensions(
* @param height The height the window.
* @param state The state of the window when opened.
* @param type The type of drawing context installed in this window.
+ * @param parentWindow Parent (embedder) window
* @return The new window (or 0 if creation failed).
*/
GHOST_IWindow*
@@ -211,14 +218,18 @@ createWindow(
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- bool stereoVisual
+ bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow
){
GHOST_WindowX11 * window = 0;
if (!m_display) return 0;
+
+
+
window = new GHOST_WindowX11 (
- this,m_display,title, left, top, width, height, state, type, stereoVisual
+ this,m_display,title, left, top, width, height, state, parentWindow, type, stereoVisual
);
if (window) {
@@ -240,7 +251,6 @@ createWindow(
}
}
return window;
-
}
GHOST_WindowX11 *
@@ -344,7 +354,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
if (!window) {
return;
}
-
+
switch (xe->type) {
case Expose:
{
@@ -484,20 +494,54 @@ GHOST_SystemX11::processEvent(XEvent *xe)
XClientMessageEvent & xcme = xe->xclient;
#ifndef __sgi
- if (xcme.data.l[0] == m_delete_window_atom) {
+ if (((Atom)xcme.data.l[0]) == m_delete_window_atom) {
g_event = new
GHOST_Event(
getMilliSeconds(),
GHOST_kEventWindowClose,
window
);
+ } else
+#endif
+ if (sNdofInfo.currValues) {
+ static GHOST_TEventNDOFData data = {0,0,0,0,0,0,0,0,0,0,0};
+ if (xcme.message_type == sNdofInfo.motionAtom)
+ {
+ data.changed = 1;
+ data.delta = xcme.data.s[8] - data.time;
+ data.time = xcme.data.s[8];
+ data.tx = xcme.data.s[2] >> 2;
+ data.ty = xcme.data.s[3] >> 2;
+ data.tz = xcme.data.s[4] >> 2;
+ data.rx = xcme.data.s[5];
+ data.ry = xcme.data.s[6];
+ data.rz =-xcme.data.s[7];
+ g_event = new GHOST_EventNDOF(getMilliSeconds(),
+ GHOST_kEventNDOFMotion,
+ window, data);
+ } else if (xcme.message_type == sNdofInfo.btnPressAtom) {
+ data.changed = 2;
+ data.delta = xcme.data.s[8] - data.time;
+ data.time = xcme.data.s[8];
+ data.buttons = xcme.data.s[2];
+ g_event = new GHOST_EventNDOF(getMilliSeconds(),
+ GHOST_kEventNDOFButton,
+ window, data);
+ }
+ } else if (((Atom)xcme.data.l[0]) == m_wm_take_focus) {
+ /* as ICCCM say, we need reply this event
+ * with a SetInputFocus, the data[1] have
+ * the valid timestamp (send by the wm).
+ */
+ XSetInputFocus(m_display, xcme.window, RevertToParent, xcme.data.l[1]);
} else {
/* Unknown client message, ignore */
}
-#endif
break;
}
-
+
+ case DestroyNotify:
+ ::exit(-1);
// We're not interested in the following things.(yet...)
case NoExpose :
case GraphicsExpose :
@@ -530,8 +574,57 @@ GHOST_SystemX11::processEvent(XEvent *xe)
case MappingNotify:
case ReparentNotify:
break;
-
- default: {
+ case SelectionRequest:
+ {
+ XEvent nxe;
+ Atom target, string, compound_text, c_string;
+ XSelectionRequestEvent *xse = &xe->xselectionrequest;
+
+ target = XInternAtom(m_display, "TARGETS", False);
+ string = XInternAtom(m_display, "STRING", False);
+ compound_text = XInternAtom(m_display, "COMPOUND_TEXT", False);
+ c_string = XInternAtom(m_display, "C_STRING", False);
+
+ /* support obsolete clients */
+ if (xse->property == None) {
+ xse->property = xse->target;
+ }
+
+ nxe.xselection.type = SelectionNotify;
+ nxe.xselection.requestor = xse->requestor;
+ nxe.xselection.property = xse->property;
+ nxe.xselection.display = xse->display;
+ nxe.xselection.selection = xse->selection;
+ nxe.xselection.target = xse->target;
+ nxe.xselection.time = xse->time;
+
+ /*Check to see if the requestor is asking for String*/
+ if(xse->target == string || xse->target == compound_text || xse->target == c_string) {
+ if (xse->selection == XInternAtom(m_display, "PRIMARY", False)) {
+ XChangeProperty(m_display, xse->requestor, xse->property, xse->target, 8, PropModeReplace, (unsigned char*)txt_select_buffer, strlen(txt_select_buffer));
+ } else if (xse->selection == XInternAtom(m_display, "CLIPBOARD", False)) {
+ XChangeProperty(m_display, xse->requestor, xse->property, xse->target, 8, PropModeReplace, (unsigned char*)txt_cut_buffer, strlen(txt_cut_buffer));
+ }
+ } else if (xse->target == target) {
+ Atom alist[4];
+ alist[0] = target;
+ alist[1] = string;
+ alist[2] = compound_text;
+ alist[3] = c_string;
+ XChangeProperty(m_display, xse->requestor, xse->property, xse->target, 32, PropModeReplace, (unsigned char*)alist, 4);
+ XFlush(m_display);
+ } else {
+ //Change property to None because we do not support anything but STRING
+ nxe.xselection.property = None;
+ }
+
+ //Send the event to the client 0 0 == False, SelectionNotify
+ XSendEvent(m_display, xse->requestor, 0, 0, &nxe);
+ XFlush(m_display);
+ break;
+ }
+
+ default: {
if(xe->type == window->GetXTablet().MotionEvent)
{
XDeviceMotionEvent* data = (XDeviceMotionEvent*)xe;
@@ -565,6 +658,17 @@ GHOST_SystemX11::processEvent(XEvent *xe)
}
}
+ void *
+GHOST_SystemX11::
+prepareNdofInfo(volatile GHOST_TEventNDOFData *currentNdofValues)
+{
+ const vector<GHOST_IWindow*>& v(m_windowManager->getWindows());
+ if (v.size() > 0)
+ sNdofInfo.window = static_cast<GHOST_WindowX11*>(v[0])->getXWindow();
+ sNdofInfo.display = m_display;
+ sNdofInfo.currValues = currentNdofValues;
+ return (void*)&sNdofInfo;
+}
GHOST_TSuccess
GHOST_SystemX11::
@@ -902,3 +1006,115 @@ convertXKey(
}
#undef GXMAP
+
+ GHOST_TUns8*
+GHOST_SystemX11::
+getClipboard(int flag
+) const {
+ //Flag
+ //0 = Regular clipboard 1 = selection
+ static Atom Primary_atom, clip_String, compound_text;
+ Atom rtype;
+ Window m_window, owner;
+ unsigned char *data, *tmp_data;
+ int bits;
+ unsigned long len, bytes;
+ XEvent xevent;
+
+ vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows();
+ vector<GHOST_IWindow *>::iterator win_it = win_vec.begin();
+ GHOST_WindowX11 * window = static_cast<GHOST_WindowX11 *>(*win_it);
+ m_window = window->getXWindow();
+
+ clip_String = XInternAtom(m_display, "_BLENDER_STRING", False);
+ compound_text = XInternAtom(m_display, "COMPOUND_TEXT", False);
+
+ //lets check the owner and if it is us then return the static buffer
+ if(flag == 0) {
+ Primary_atom = XInternAtom(m_display, "CLIPBOARD", False);
+ owner = XGetSelectionOwner(m_display, Primary_atom);
+ if (owner == m_window) {
+ data = (unsigned char*) malloc(strlen(txt_cut_buffer)+1);
+ strcpy((char*)data, txt_cut_buffer);
+ return (GHOST_TUns8*)data;
+ } else if (owner == None) {
+ return NULL;
+ }
+ } else {
+ Primary_atom = XInternAtom(m_display, "PRIMARY", False);
+ owner = XGetSelectionOwner(m_display, Primary_atom);
+ if (owner == m_window) {
+ data = (unsigned char*) malloc(strlen(txt_select_buffer)+1);
+ strcpy((char*)data, txt_select_buffer);
+ return (GHOST_TUns8*)data;
+ } else if (owner == None) {
+ return NULL;
+ }
+ }
+
+ if(!Primary_atom) {
+ return NULL;
+ }
+
+ XDeleteProperty(m_display, m_window, Primary_atom);
+ XConvertSelection(m_display, Primary_atom, compound_text, clip_String, m_window, CurrentTime); //XA_STRING
+ XFlush(m_display);
+
+ //This needs to change so we do not wait for ever or check owner first
+ while(1) {
+ XNextEvent(m_display, &xevent);
+ if(xevent.type == SelectionNotify) {
+ if(XGetWindowProperty(m_display, m_window, xevent.xselection.property, 0L, 4096L, False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) == Success) {
+ if (data) {
+ tmp_data = (unsigned char*) malloc(strlen((char*)data)+1);
+ strcpy((char*)tmp_data, (char*)data);
+ XFree(data);
+ return (GHOST_TUns8*)tmp_data;
+ }
+ }
+ return NULL;
+ }
+ }
+}
+
+ void
+GHOST_SystemX11::
+putClipboard(
+GHOST_TInt8 *buffer, int flag) const
+{
+ static Atom Primary_atom;
+ Window m_window, owner;
+
+ if(!buffer) {return;}
+
+ if(flag == 0) {
+ Primary_atom = XInternAtom(m_display, "CLIPBOARD", False);
+ if(txt_cut_buffer) { free((void*)txt_cut_buffer); }
+
+ txt_cut_buffer = (char*) malloc(strlen(buffer)+1);
+ strcpy(txt_cut_buffer, buffer);
+ } else {
+ Primary_atom = XInternAtom(m_display, "PRIMARY", False);
+ if(txt_select_buffer) { free((void*)txt_select_buffer); }
+
+ txt_select_buffer = (char*) malloc(strlen(buffer)+1);
+ strcpy(txt_select_buffer, buffer);
+ }
+
+ vector<GHOST_IWindow *> & win_vec = m_windowManager->getWindows();
+ vector<GHOST_IWindow *>::iterator win_it = win_vec.begin();
+ GHOST_WindowX11 * window = static_cast<GHOST_WindowX11 *>(*win_it);
+ m_window = window->getXWindow();
+
+ if(!Primary_atom) {
+ return;
+ }
+
+ XSetSelectionOwner(m_display, Primary_atom, m_window, CurrentTime);
+ owner = XGetSelectionOwner(m_display, Primary_atom);
+ if (owner != m_window)
+ fprintf(stderr, "failed to own primary\n");
+
+ return;
+}
+
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index c4d7a6ace54..4b0ddd7a4f9 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -108,6 +108,7 @@ public:
* @param state The state of the window when opened.
* @param type The type of drawing context installed in this window.
* @param stereoVisual Create a stereo visual for quad buffered stereo.
+ * @param parentWindow Parent (embedder) window
* @return The new window (or 0 if creation failed).
*/
GHOST_IWindow*
@@ -119,9 +120,10 @@ public:
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- const bool stereoVisual
+ const bool stereoVisual,
+ const GHOST_TEmbedderWindowID parentWindow = 0
);
-
+
/**
* @section Interface Inherited from GHOST_ISystem
*/
@@ -193,6 +195,26 @@ public:
return m_display;
}
+ void *
+ prepareNdofInfo(
+ volatile GHOST_TEventNDOFData *current_values
+ );
+
+ /**
+ * Returns unsinged char from CUT_BUFFER0
+ * @param flag Flag indicates which buffer to return 0 for clipboard 1 for selection
+ * @return Returns the Clipboard indicated by Flag
+ */
+ GHOST_TUns8*
+ getClipboard(int flag) const;
+
+ /**
+ * Puts buffer to system clipboard
+ * @param buffer The buffer to copy to the clipboard
+ * @param flag Flag indicates which buffer to set ownership of 0 for clipboard 1 for selection
+ */
+ virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const;
+
/**
* Atom used for ICCCM, WM-spec and Motif.
* We only need get this atom at the start, it's relative
@@ -206,16 +228,14 @@ public:
Atom m_net_max_vert;
Atom m_net_fullscreen;
Atom m_motif;
-
+ Atom m_wm_take_focus;
+ Atom m_wm_protocols;
+ Atom m_delete_window_atom;
+
private :
Display * m_display;
- /**
- * Atom used to detect window close events
- */
- Atom m_delete_window_atom;
-
/// The vector of windows that need to be updated.
std::vector<GHOST_WindowX11 *> m_dirty_windows;
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index e2e4a2323ee..ce1a42176bd 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -48,6 +48,14 @@
#define M_PI 3.1415926536
#endif
+// win64 doesn't define GWL_USERDATA
+#ifdef WIN32
+#ifndef GWL_USERDATA
+#define GWL_USERDATA GWLP_USERDATA
+#define GWL_WNDPROC GWLP_WNDPROC
+#endif
+#endif
+
LPCSTR GHOST_WindowWin32::s_windowClassName = "GHOST_WindowClass";
const int GHOST_WindowWin32::s_maxTitleLength = 128;
HGLRC GHOST_WindowWin32::s_firsthGLRc = NULL;
@@ -441,10 +449,6 @@ GHOST_TSuccess GHOST_WindowWin32::setOrder(GHOST_TWindowOrder order)
GHOST_TSuccess GHOST_WindowWin32::swapBuffers()
{
- // adding a glFinish() here is to prevent Geforce in 'full scene antialias' mode
- // from antialising the Blender window. Officially a swapbuffers does a glFinish
- // itself, so this feels really like a hack... but it won't harm. (ton)
- glFinish();
return ::SwapBuffers(m_hDC) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}
@@ -886,12 +890,25 @@ static int EnumPixelFormats(HDC hdc) {
for(i=1; i<=n; i++) { /* not the idiom, but it's right */
::DescribePixelFormat( hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd );
w = WeightPixelFormat(pfd);
- if(w > weight) {
- weight = w;
- iPixelFormat = i;
+ // be strict on stereo
+ if (!((sPreferredFormat.dwFlags ^ pfd.dwFlags) & PFD_STEREO)) {
+ if(w > weight) {
+ weight = w;
+ iPixelFormat = i;
+ }
+ }
+ }
+ if (weight == 0) {
+ // we could find the correct stereo setting, just find any suitable format
+ for(i=1; i<=n; i++) { /* not the idiom, but it's right */
+ ::DescribePixelFormat( hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd );
+ w = WeightPixelFormat(pfd);
+ if(w > weight) {
+ weight = w;
+ iPixelFormat = i;
+ }
}
}
-
return iPixelFormat;
}
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index faf6c5b2a99..3785b325eaf 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -35,12 +35,12 @@
#include <X11/cursorfont.h>
#include <X11/Xatom.h>
-#include <cstdio>
-
#if defined(__sun__) || defined( __sun ) || defined (__sparc) || defined (__sparc__)
#include <strings.h>
#endif
+#include <cstring>
+#include <cstdio>
// For obscure full screen mode stuuf
// lifted verbatim from blut.
@@ -148,6 +148,7 @@ GHOST_WindowX11(
GHOST_TUns32 width,
GHOST_TUns32 height,
GHOST_TWindowState state,
+ const GHOST_TEmbedderWindowID parentWindow,
GHOST_TDrawingContextType type,
const bool stereoVisual
) :
@@ -165,7 +166,8 @@ GHOST_WindowX11(
// X can find us a visual matching those requirements.
int attributes[40], i = 0;
-
+ Atom atoms[2];
+ int natom;
if(m_stereoVisual)
attributes[i++] = GLX_STEREO;
@@ -211,25 +213,60 @@ GHOST_WindowX11(
KeyPressMask | KeyReleaseMask |
EnterWindowMask | LeaveWindowMask |
ButtonPressMask | ButtonReleaseMask |
- PointerMotionMask | FocusChangeMask;
+ PointerMotionMask | FocusChangeMask | PropertyChangeMask;
// create the window!
- m_window =
- XCreateWindow(
- m_display,
- RootWindow(m_display, m_visual->screen),
- left,
- top,
- width,
- height,
- 0, // no border.
- m_visual->depth,
- InputOutput,
- m_visual->visual,
- CWBorderPixel|CWColormap|CWEventMask,
- &xattributes
- );
+ ;
+ if (parentWindow == 0) {
+ m_window =
+ XCreateWindow(
+ m_display,
+ RootWindow(m_display, m_visual->screen),
+ left,
+ top,
+ width,
+ height,
+ 0, // no border.
+ m_visual->depth,
+ InputOutput,
+ m_visual->visual,
+ CWBorderPixel|CWColormap|CWEventMask,
+ &xattributes
+ );
+ } else {
+
+ Window root_return;
+ int x_return,y_return;
+ unsigned int w_return,h_return,border_w_return,depth_return;
+
+ XGetGeometry(m_display, parentWindow, &root_return, &x_return, &y_return,
+ &w_return, &h_return, &border_w_return, &depth_return );
+
+ left = 0;
+ top = 0;
+ width = w_return;
+ height = h_return;
+
+
+ m_window = XCreateWindow(
+ m_display,
+ parentWindow, // reparent against embedder
+ left,
+ top,
+ width,
+ height,
+ 0, // no border.
+ m_visual->depth,
+ InputOutput,
+ m_visual->visual,
+ CWBorderPixel|CWColormap|CWEventMask,
+ &xattributes
+ );
+
+ XSelectInput(m_display , parentWindow, SubstructureNotifyMask);
+
+ }
/*
* One of the problem with WM-spec is that can't set a property
@@ -273,6 +310,25 @@ GHOST_WindowX11(
free(wmclass);
XFree(xclasshint);
+ /* The basic for a good ICCCM "work" */
+ if (m_system->m_wm_protocols) {
+ natom= 0;
+
+ if (m_system->m_delete_window_atom) {
+ atoms[natom]= m_system->m_delete_window_atom;
+ natom++;
+ }
+
+ if (m_system->m_wm_take_focus) {
+ atoms[natom]= m_system->m_wm_take_focus;
+ natom++;
+ }
+
+ if (natom) {
+ /* printf("Register atoms: %d\n", natom); */
+ XSetWMProtocols(m_display, m_window, atoms, natom);
+ }
+ }
// Set the window icon
XWMHints *xwmhints = XAllocWMHints();
@@ -921,9 +977,9 @@ setOrder(
xev.xclient.message_type = atom;
xev.xclient.format = 32;
- xev.xclient.data.l[0] = 0;
- xev.xclient.data.l[1] = 0;
- xev.xclient.data.l[2] = 0;
+ xev.xclient.data.l[0] = 1;
+ xev.xclient.data.l[1] = CurrentTime;
+ xev.xclient.data.l[2] = m_window;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
@@ -1020,6 +1076,15 @@ validate(
GHOST_WindowX11::
~GHOST_WindowX11(
){
+ static Atom Primary_atom, Clipboard_atom;
+ Window p_owner, c_owner;
+ /*Change the owner of the Atoms to None if we are the owner*/
+ Primary_atom = XInternAtom(m_display, "PRIMARY", False);
+ Clipboard_atom = XInternAtom(m_display, "CLIPBOARD", False);
+
+ p_owner = XGetSelectionOwner(m_display, Primary_atom);
+ c_owner = XGetSelectionOwner(m_display, Clipboard_atom);
+
std::map<unsigned int, Cursor>::iterator it = m_standard_cursors.begin();
for (; it != m_standard_cursors.end(); it++) {
XFreeCursor(m_display, it->second);
@@ -1038,6 +1103,14 @@ GHOST_WindowX11::
}
glXDestroyContext(m_display, m_context);
}
+
+ if (p_owner == m_window) {
+ XSetSelectionOwner(m_display, Primary_atom, None, CurrentTime);
+ }
+ if (c_owner == m_window) {
+ XSetSelectionOwner(m_display, Clipboard_atom, None, CurrentTime);
+ }
+
XDestroyWindow(m_display, m_window);
XFree(m_visual);
}
diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h
index a80928ae15f..1392e2c19a6 100644
--- a/intern/ghost/intern/GHOST_WindowX11.h
+++ b/intern/ghost/intern/GHOST_WindowX11.h
@@ -64,6 +64,7 @@ public:
* @param width The width the window.
* @param height The height the window.
* @param state The state the window is initially opened with.
+ * @param parentWindow Parent (embedder) window
* @param type The type of drawing context installed in this window.
* @param stereoVisual Stereo visual for quad buffered stereo.
*/
@@ -76,6 +77,7 @@ public:
GHOST_TUns32 width,
GHOST_TUns32 height,
GHOST_TWindowState state,
+ const GHOST_TEmbedderWindowID parentWindow,
GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
const bool stereoVisual = false
);
diff --git a/intern/ghost/intern/Makefile b/intern/ghost/intern/Makefile
index f4dfcd30ce0..467ec768720 100644
--- a/intern/ghost/intern/Makefile
+++ b/intern/ghost/intern/Makefile
@@ -36,6 +36,7 @@ CCSRCS += GHOST_EventManager.cpp GHOST_EventPrinter.cpp GHOST_WindowManager.cpp
CCSRCS += GHOST_ISystem.cpp GHOST_ModifierKeys.cpp GHOST_TimerManager.cpp
CCSRCS += GHOST_Rect.cpp GHOST_DisplayManager.cpp GHOST_C-api.cpp
CCSRCS += GHOST_CallbackEventConsumer.cpp
+CCSRCS += GHOST_NDOFManager.cpp
include nan_definitions.mk
diff --git a/intern/ghost/make/msvc_7_0/ghost.vcproj b/intern/ghost/make/msvc_7_0/ghost.vcproj
index 9d0aef451e7..e5b2e09a678 100644
--- a/intern/ghost/make/msvc_7_0/ghost.vcproj
+++ b/intern/ghost/make/msvc_7_0/ghost.vcproj
@@ -281,6 +281,9 @@ ECHO Done
RelativePath="..\..\intern\GHOST_EventManager.h">
</File>
<File
+ RelativePath="..\..\intern\GHOST_EventNDOF.h">
+ </File>
+ <File
RelativePath="..\..\intern\GHOST_EventPrinter.h">
</File>
<File
@@ -293,6 +296,9 @@ ECHO Done
RelativePath="..\..\intern\GHOST_ModifierKeys.h">
</File>
<File
+ RelativePath="..\..\intern\GHOST_NDOFManager.cpp">
+ </File>
+ <File
RelativePath="..\..\intern\GHOST_System.h">
</File>
<File
@@ -374,6 +380,9 @@ ECHO Done
RelativePath="..\..\intern\GHOST_ModifierKeys.cpp">
</File>
<File
+ RelativePath="..\..\intern\GHOST_NDOFManager.cpp">
+ </File>
+ <File
RelativePath="..\..\intern\GHOST_Rect.cpp">
</File>
<File
diff --git a/intern/ghost/make/msvc_9_0/ghost.vcproj b/intern/ghost/make/msvc_9_0/ghost.vcproj
new file mode 100644
index 00000000000..fa128786a90
--- /dev/null
+++ b/intern/ghost/make/msvc_9_0/ghost.vcproj
@@ -0,0 +1,539 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="INT_ghost"
+ ProjectGUID="{76D90B92-ECC7-409C-9F98-A8814B90F3C0}"
+ RootNamespace="ghost"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Blender Release|Win32"
+ OutputDirectory="..\..\..\..\..\build\msvc_9\intern\ghost"
+ IntermediateDirectory="..\..\..\..\..\build\msvc_9\intern\ghost"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\wintab\INCLUDE"
+ PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\intern\ghost\ghost.pch"
+ AssemblerListingLocation="..\..\..\..\..\build\msvc_9\intern\ghost\"
+ ObjectFile="..\..\..\..\..\build\msvc_9\intern\ghost\"
+ ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\intern\ghost\"
+ WarningLevel="2"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\..\..\build\msvc_9\libs\intern\libghost.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copying GHOST files library (release target) to lib tree."
+ CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\intern\ghost\include MKDIR ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;XCOPY /Y ..\..\*.h ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Blender Debug|Win32"
+ OutputDirectory="..\..\..\..\..\build\msvc_9\intern\ghost\debug"
+ IntermediateDirectory="..\..\..\..\..\build\msvc_9\intern\ghost\debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\wintab\INCLUDE"
+ PreprocessorDefinitions="WIN32,_DEBUG,_LIB,_USE_MATH_DEFINES"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\intern\ghost\debug\ghost.pch"
+ AssemblerListingLocation="..\..\..\..\..\build\msvc_9\intern\ghost\debug\"
+ ObjectFile="..\..\..\..\..\build\msvc_9\intern\ghost\debug\"
+ ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\intern\ghost\debug\"
+ BrowseInformation="1"
+ WarningLevel="2"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\..\..\build\msvc_9\libs\intern\debug\libghost.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copying GHOST files library (debug target) to lib tree."
+ CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\intern\ghost\include MKDIR ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;XCOPY /Y ..\..\*.h ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="3DPlugin Release|Win32"
+ OutputDirectory="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll"
+ IntermediateDirectory="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\wintab\INCLUDE"
+ PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\ghost.pch"
+ AssemblerListingLocation="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\"
+ ObjectFile="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\"
+ ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\"
+ WarningLevel="2"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\..\..\build\msvc_9\libs\intern\mtdll\libghost.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copying GHOST files library (release target) to lib tree."
+ CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\intern\ghost\include MKDIR ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;XCOPY /Y ..\..\*.h ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="3DPlugin Debug|Win32"
+ OutputDirectory="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\debug"
+ IntermediateDirectory="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\wintab\INCLUDE"
+ PreprocessorDefinitions="WIN32,_DEBUG,_LIB"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\debug\ghost.pch"
+ AssemblerListingLocation="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\debug\"
+ ObjectFile="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\debug\"
+ ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\intern\ghost\mtdll\debug\"
+ BrowseInformation="1"
+ WarningLevel="2"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\..\..\build\msvc_9\libs\intern\mtdll\debug\libghost.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copying GHOST files library (debug target) to lib tree."
+ CommandLine="ECHO Copying header files&#x0D;&#x0A;IF NOT EXIST ..\..\..\..\..\build\msvc_9\intern\ghost\include MKDIR ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;XCOPY /Y ..\..\*.h ..\..\..\..\..\build\msvc_9\intern\ghost\include&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Header Files"
+ >
+ <Filter
+ Name="intern"
+ >
+ <File
+ RelativePath="..\..\intern\GHOST_Buttons.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_CallbackEventConsumer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_Debug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_DisplayManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_DisplayManagerWin32.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_Event.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventButton.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventCursor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventKey.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventNDOF.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventPrinter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventWheel.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventWindow.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_ModifierKeys.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_NDOFManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_System.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_SystemWin32.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_TimerManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_TimerTask.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_Window.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_WindowManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_WindowWin32.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="extern"
+ >
+ <File
+ RelativePath="..\..\GHOST_C-api.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_IEvent.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_IEventConsumer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_ISystem.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_ITimerTask.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_IWindow.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_Rect.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\GHOST_Types.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Source Files"
+ >
+ <File
+ RelativePath="..\..\intern\GHOST_Buttons.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_C-api.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_CallbackEventConsumer.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_DisplayManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_DisplayManagerWin32.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_EventPrinter.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_ISystem.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_ModifierKeys.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_NDOFManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_Rect.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_System.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_SystemWin32.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_TimerManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_Window.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_WindowManager.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\intern\GHOST_WindowWin32.cpp"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>