瀏覽代碼

Merge branch 'master' of github.com:ivansafrin/Polycode

Ivan Safrin 13 年之前
父節點
當前提交
687c75ee22

+ 2 - 0
Core/Contents/Include/PolyGlobals.h

@@ -24,6 +24,8 @@ THE SOFTWARE.
 
 
 // Polycode CORE LIBRARY CONFIGURATION SECTION
 // Polycode CORE LIBRARY CONFIGURATION SECTION
 
 
+#define WINDOWS_TOUCH_SUPPORT
+
 // Compile support for lua bindings.
 // Compile support for lua bindings.
 //#define _COMPILE_LUA
 //#define _COMPILE_LUA
 
 

+ 10 - 3
Core/Contents/Include/PolyWinCore.h

@@ -106,10 +106,11 @@ namespace Polycode {
 		int eventGroup;
 		int eventGroup;
 		int eventCode;		
 		int eventCode;		
 		int mouseX;
 		int mouseX;
-		int mouseY;		
+		int mouseY;
+		std::vector<TouchInfo> touches;
 		PolyKEY keyCode;
 		PolyKEY keyCode;
 		wchar_t unicodeChar;		
 		wchar_t unicodeChar;		
-		char mouseButton;		
+		char mouseButton;	
 		static const int INPUT_EVENT = 0;
 		static const int INPUT_EVENT = 0;
 	};
 	};
 	
 	
@@ -165,7 +166,7 @@ public:
 		
 		
 	public:
 	public:
 		
 		
-		Win32Core(PolycodeViewBase *view, int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, int frameRate);
+		Win32Core(PolycodeViewBase *view, int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, int frameRate,  int monitorIndex = -1);
 		~Win32Core();
 		~Win32Core();
 
 
 		void enableMouse(bool newval);
 		void enableMouse(bool newval);
@@ -179,6 +180,10 @@ public:
 		void handleMouseDown(int mouseCode,LPARAM lParam, WPARAM wParam);
 		void handleMouseDown(int mouseCode,LPARAM lParam, WPARAM wParam);
 		void handleMouseUp(int mouseCode,LPARAM lParam, WPARAM wParam);
 		void handleMouseUp(int mouseCode,LPARAM lParam, WPARAM wParam);
 
 
+		#ifdef WINDOWS_TOUCH_SUPPORT
+			void handleTouchEvent(LPARAM lParam, WPARAM wParam);
+		#endif
+
 		void setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel);
 		void setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel);
 		
 		
 		void initContext(bool usePixelFormat, unsigned int pixelFormat);
 		void initContext(bool usePixelFormat, unsigned int pixelFormat);
@@ -208,8 +213,10 @@ public:
 		void shutdownGamepad();
 		void shutdownGamepad();
 		void Gamepad_processEvents();
 		void Gamepad_processEvents();
 
 
+
 		// NEED TO IMPLEMENT:
 		// NEED TO IMPLEMENT:
 
 
+		void openURL(String url) {}
 		void setCursor(int cursorType){ }
 		void setCursor(int cursorType){ }
 		void copyStringToClipboard(const String& str) { }
 		void copyStringToClipboard(const String& str) { }
 		String getClipboardString() { return ""; }
 		String getClipboardString() { return ""; }

+ 12 - 0
Core/Contents/PolycodeView/MSVC/PolycodeView.cpp

@@ -57,6 +57,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 			core->handleMouseUp(CoreInput::MOUSE_BUTTON2, lParam,wParam);
 			core->handleMouseUp(CoreInput::MOUSE_BUTTON2, lParam,wParam);
 	break;
 	break;
 
 
+	#ifdef WINDOWS_TOUCH_SUPPORT
+		case WM_TOUCH:
+			if(core)
+				core->handleTouchEvent(lParam, wParam);
+		break;
+	#endif
+
 	case WM_MBUTTONDOWN:
 	case WM_MBUTTONDOWN:
 		if(core)
 		if(core)
 			core->handleMouseDown(CoreInput::MOUSE_BUTTON3, lParam,wParam);
 			core->handleMouseDown(CoreInput::MOUSE_BUTTON3, lParam,wParam);
@@ -128,6 +135,11 @@ WNDCLASSEX wcex;
   hwnd = CreateWindowEx(WS_EX_APPWINDOW, L"POLYCODEAPPLICATION", windowTitle, WS_OVERLAPPED|WS_SYSMENU,
   hwnd = CreateWindowEx(WS_EX_APPWINDOW, L"POLYCODEAPPLICATION", windowTitle, WS_OVERLAPPED|WS_SYSMENU,
       0, 0, 640, 480, NULL, NULL, hInstance, NULL);
       0, 0, 640, 480, NULL, NULL, hInstance, NULL);
 
 
+#ifdef WINDOWS_TOUCH_SUPPORT
+	RegisterTouchWindow(hwnd, 0);
+#endif
+	
+
   windowData = (void*)&hwnd;
   windowData = (void*)&hwnd;
 
 
    ShowWindow(hwnd, nCmdShow);
    ShowWindow(hwnd, nCmdShow);

+ 2 - 0
Core/Contents/Source/PolyGLSLShaderModule.cpp

@@ -54,6 +54,7 @@ using namespace Polycode;
 PFNGLUSEPROGRAMPROC glUseProgram;
 PFNGLUSEPROGRAMPROC glUseProgram;
 PFNGLUNIFORM1IPROC glUniform1i;
 PFNGLUNIFORM1IPROC glUniform1i;
 PFNGLUNIFORM1FPROC glUniform1f;
 PFNGLUNIFORM1FPROC glUniform1f;
+PFNGLUNIFORM2FPROC glUniform2f;
 PFNGLUNIFORM3FPROC glUniform3f;
 PFNGLUNIFORM3FPROC glUniform3f;
 PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
 PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
 extern PFNGLACTIVETEXTUREPROC glActiveTexture;
 extern PFNGLACTIVETEXTUREPROC glActiveTexture;
@@ -77,6 +78,7 @@ GLSLShaderModule::GLSLShaderModule() : PolycodeShaderModule() {
 	glUseProgram   = (PFNGLUSEPROGRAMPROC)wglGetProcAddress("glUseProgram");
 	glUseProgram   = (PFNGLUSEPROGRAMPROC)wglGetProcAddress("glUseProgram");
 	glUniform1i = (PFNGLUNIFORM1IPROC)wglGetProcAddress("glUniform1i");
 	glUniform1i = (PFNGLUNIFORM1IPROC)wglGetProcAddress("glUniform1i");
 	glUniform1f = (PFNGLUNIFORM1FPROC)wglGetProcAddress("glUniform1f");	
 	glUniform1f = (PFNGLUNIFORM1FPROC)wglGetProcAddress("glUniform1f");	
+	glUniform2f = (PFNGLUNIFORM2FPROC)wglGetProcAddress("glUniform2f");	
 	glUniform3f = (PFNGLUNIFORM3FPROC)wglGetProcAddress("glUniform3f");
 	glUniform3f = (PFNGLUNIFORM3FPROC)wglGetProcAddress("glUniform3f");
 	glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONARBPROC)wglGetProcAddress("glGetUniformLocation");
 	glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONARBPROC)wglGetProcAddress("glGetUniformLocation");
 	glCreateShader = (PFNGLCREATESHADERPROC)wglGetProcAddress("glCreateShader");
 	glCreateShader = (PFNGLCREATESHADERPROC)wglGetProcAddress("glCreateShader");

+ 1 - 1
Core/Contents/Source/PolySound.cpp

@@ -345,7 +345,7 @@ ALuint Sound::loadOGG(const String& fileName) {
 	} while (bytes > 0);
 	} while (bytes > 0);
 	ov_clear(&oggFile);
 	ov_clear(&oggFile);
 	
 	
-	sampleLength = buffer.size() / sizeof(uint16_t);
+	sampleLength = buffer.size() / sizeof(unsigned int);
 	
 	
 	alBufferData(bufferID, format, &buffer[0], static_cast<ALsizei>(buffer.size()), freq);
 	alBufferData(bufferID, format, &buffer[0], static_cast<ALsizei>(buffer.size()), freq);
 	
 	

+ 138 - 73
Core/Contents/Source/PolyWinCore.cpp

@@ -52,8 +52,8 @@ void ClientResize(HWND hWnd, int nWidth, int nHeight)
   MoveWindow(hWnd,rcWindow.left, rcWindow.top, nWidth + ptDiff.x, nHeight + ptDiff.y, TRUE);
   MoveWindow(hWnd,rcWindow.left, rcWindow.top, nWidth + ptDiff.x, nHeight + ptDiff.y, TRUE);
 }
 }
 
 
-Win32Core::Win32Core(PolycodeViewBase *view, int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, int frameRate) 
-	: Core(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel, frameRate) {
+Win32Core::Win32Core(PolycodeViewBase *view, int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, int frameRate,  int monitorIndex) 
+	: Core(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel, frameRate, monitorIndex) {
 
 
 	hWnd = *((HWND*)view->windowData);
 	hWnd = *((HWND*)view->windowData);
 	core = this;
 	core = this;
@@ -428,6 +428,62 @@ void Win32Core::handleKeyUp(LPARAM lParam, WPARAM wParam) {
 	unlockMutex(eventMutex);
 	unlockMutex(eventMutex);
 }
 }
 
 
+#ifdef WINDOWS_TOUCH_SUPPORT
+
+void Win32Core::handleTouchEvent(LPARAM lParam, WPARAM wParam) {
+	lockMutex(eventMutex);
+
+	int iNumContacts = LOWORD(wParam);
+	HTOUCHINPUT hInput       = (HTOUCHINPUT)lParam;
+    TOUCHINPUT *pInputs      = new TOUCHINPUT[iNumContacts];
+       
+    if(pInputs != NULL) {
+		if(GetTouchInputInfo(hInput, iNumContacts, pInputs, sizeof(TOUCHINPUT))) {
+
+			std::vector<TouchInfo> touches;
+			for(int i = 0; i < iNumContacts; i++) {
+				TOUCHINPUT ti = pInputs[i];
+				TouchInfo touchInfo;
+				touchInfo.id = (int) ti.dwID;
+
+				POINT pt;
+				pt.x = TOUCH_COORD_TO_PIXEL(ti.x);
+				pt.y = TOUCH_COORD_TO_PIXEL(ti.y);
+				ScreenToClient(hWnd, &pt);
+				touchInfo.position.x = pt.x; 
+				touchInfo.position.y = pt.y;
+
+				touches.push_back(touchInfo);
+			}
+              for(int i = 0; i < iNumContacts; i++) {
+					TOUCHINPUT ti = pInputs[i];
+					if (ti.dwFlags & TOUCHEVENTF_UP) {
+						Win32Event newEvent;
+						newEvent.eventGroup = Win32Event::INPUT_EVENT;
+						newEvent.eventCode = InputEvent::EVENT_TOUCHES_ENDED;
+						newEvent.touches = touches;
+						win32Events.push_back(newEvent);	
+					} else if(ti.dwFlags & TOUCHEVENTF_MOVE) {
+						Win32Event newEvent;
+						newEvent.eventGroup = Win32Event::INPUT_EVENT;
+						newEvent.eventCode = InputEvent::EVENT_TOUCHES_MOVED;
+						newEvent.touches = touches;
+						win32Events.push_back(newEvent);
+					} else if(ti.dwFlags & TOUCHEVENTF_DOWN) {
+						Win32Event newEvent;
+						newEvent.eventGroup = Win32Event::INPUT_EVENT;
+						newEvent.eventCode = InputEvent::EVENT_TOUCHES_BEGAN;
+						newEvent.touches = touches;
+						win32Events.push_back(newEvent);
+					}
+			  }
+		}
+	}
+	unlockMutex(eventMutex);	
+}
+
+#endif
+
 void Win32Core::handleMouseMove(LPARAM lParam, WPARAM wParam) {
 void Win32Core::handleMouseMove(LPARAM lParam, WPARAM wParam) {
 	lockMutex(eventMutex);
 	lockMutex(eventMutex);
 	Win32Event newEvent;
 	Win32Event newEvent;
@@ -485,6 +541,15 @@ void Win32Core::checkEvents() {
 		switch(event.eventGroup) {
 		switch(event.eventGroup) {
 			case Win32Event::INPUT_EVENT:
 			case Win32Event::INPUT_EVENT:
 				switch(event.eventCode) {
 				switch(event.eventCode) {
+					case InputEvent::EVENT_TOUCHES_BEGAN:
+						input->touchesBegan(event.touches, getTicks());
+					break;
+					case InputEvent::EVENT_TOUCHES_ENDED:
+						input->touchesEnded(event.touches, getTicks());
+					break;
+					case InputEvent::EVENT_TOUCHES_MOVED:
+						input->touchesMoved(event.touches, getTicks());
+					break;
 					case InputEvent::EVENT_MOUSEMOVE:
 					case InputEvent::EVENT_MOUSEMOVE:
 						input->setDeltaPosition(event.mouseX - lastMouseX , event.mouseY - lastMouseY);										
 						input->setDeltaPosition(event.mouseX - lastMouseX , event.mouseY - lastMouseY);										
 						lastMouseX = event.mouseX;
 						lastMouseX = event.mouseX;
@@ -511,77 +576,77 @@ void Win32Core::checkEvents() {
 	unlockMutex(eventMutex);		
 	unlockMutex(eventMutex);		
 }
 }
 
 
-void Win32Core::handleAxisChange(GamepadDeviceEntry * device, int axisIndex, DWORD value) {
-	if (axisIndex < 0 || axisIndex >= (int) device->numAxes) {
-		return;
-	}	
-	Gamepad_devicePrivate *devicePrivate = device->privateData;
-	float floatVal = (value - devicePrivate->axisRanges[axisIndex][0]) / (float) (devicePrivate->axisRanges[axisIndex][1] - devicePrivate->axisRanges[axisIndex][0]) * 2.0f - 1.0f;
-	input->joystickAxisMoved(axisIndex, floatVal, device->deviceID);	
-}
-
-void Win32Core::handleButtonChange(GamepadDeviceEntry * device, DWORD lastValue, DWORD value) {
-	Gamepad_devicePrivate *devicePrivate = device->privateData;
-	unsigned int buttonIndex;	
-	for (buttonIndex = 0; buttonIndex < device->numButtons; buttonIndex++) {
-		if ((lastValue ^ value) & (1 << buttonIndex)) {
-			if(!!(value & (1 << buttonIndex))) {
-				input->joystickButtonDown(buttonIndex, device->deviceID);
-			} else {
-				input->joystickButtonUp(buttonIndex, device->deviceID);
-			}
-		}
-	}
-}
-
-static void povToXY(DWORD pov, int * outX, int * outY) {
-	if (pov == JOY_POVCENTERED) {
-		*outX = *outY = 0;
-		
-	} else {
-		if (pov > JOY_POVFORWARD && pov < JOY_POVBACKWARD) {
-			*outX = 1;
-			
-		} else if (pov > JOY_POVBACKWARD) {
-			*outX = -1;
-			
-		} else {
-			*outX = 0;
-		}
-		
-		if (pov > JOY_POVLEFT || pov < JOY_POVRIGHT) {
-			*outY = -1;
-			
-		} else if (pov > JOY_POVRIGHT && pov < JOY_POVLEFT) {
-			*outY = 1;
-			
-		} else {
-			*outY = 0;
-		}
-	}
-}
-
-void Win32Core::handlePOVChange(GamepadDeviceEntry * device, DWORD lastValue, DWORD value) {
-	
-	Gamepad_devicePrivate *devicePrivate = device->privateData;
-	
-	int lastX, lastY, newX, newY;
-
-	if (devicePrivate->povXAxisIndex == -1 || devicePrivate->povYAxisIndex == -1) {
-		return;
-	}
-	
-	povToXY(lastValue, &lastX, &lastY);
-	povToXY(value, &newX, &newY);
-	
-	if (newX != lastX) {
-		input->joystickAxisMoved(devicePrivate->povXAxisIndex, newX, device->deviceID);
-	}
-
-	if (newY != lastY) {
-		input->joystickAxisMoved(devicePrivate->povYAxisIndex, newY, device->deviceID);
-	}
-}
+void Win32Core::handleAxisChange(GamepadDeviceEntry * device, int axisIndex, DWORD value) {
+	if (axisIndex < 0 || axisIndex >= (int) device->numAxes) {
+		return;
+	}	
+	Gamepad_devicePrivate *devicePrivate = device->privateData;
+	float floatVal = (value - devicePrivate->axisRanges[axisIndex][0]) / (float) (devicePrivate->axisRanges[axisIndex][1] - devicePrivate->axisRanges[axisIndex][0]) * 2.0f - 1.0f;
+	input->joystickAxisMoved(axisIndex, floatVal, device->deviceID);	
+}
+
+void Win32Core::handleButtonChange(GamepadDeviceEntry * device, DWORD lastValue, DWORD value) {
+	Gamepad_devicePrivate *devicePrivate = device->privateData;
+	unsigned int buttonIndex;	
+	for (buttonIndex = 0; buttonIndex < device->numButtons; buttonIndex++) {
+		if ((lastValue ^ value) & (1 << buttonIndex)) {
+			if(!!(value & (1 << buttonIndex))) {
+				input->joystickButtonDown(buttonIndex, device->deviceID);
+			} else {
+				input->joystickButtonUp(buttonIndex, device->deviceID);
+			}
+		}
+	}
+}
+
+static void povToXY(DWORD pov, int * outX, int * outY) {
+	if (pov == JOY_POVCENTERED) {
+		*outX = *outY = 0;
+		
+	} else {
+		if (pov > JOY_POVFORWARD && pov < JOY_POVBACKWARD) {
+			*outX = 1;
+			
+		} else if (pov > JOY_POVBACKWARD) {
+			*outX = -1;
+			
+		} else {
+			*outX = 0;
+		}
+		
+		if (pov > JOY_POVLEFT || pov < JOY_POVRIGHT) {
+			*outY = -1;
+			
+		} else if (pov > JOY_POVRIGHT && pov < JOY_POVLEFT) {
+			*outY = 1;
+			
+		} else {
+			*outY = 0;
+		}
+	}
+}
+
+void Win32Core::handlePOVChange(GamepadDeviceEntry * device, DWORD lastValue, DWORD value) {
+	
+	Gamepad_devicePrivate *devicePrivate = device->privateData;
+	
+	int lastX, lastY, newX, newY;
+
+	if (devicePrivate->povXAxisIndex == -1 || devicePrivate->povYAxisIndex == -1) {
+		return;
+	}
+	
+	povToXY(lastValue, &lastX, &lastY);
+	povToXY(value, &newX, &newY);
+	
+	if (newX != lastX) {
+		input->joystickAxisMoved(devicePrivate->povXAxisIndex, newX, device->deviceID);
+	}
+
+	if (newY != lastY) {
+		input->joystickAxisMoved(devicePrivate->povYAxisIndex, newY, device->deviceID);
+	}
+}
 
 
 
 
 void Win32Core::Gamepad_processEvents() {
 void Win32Core::Gamepad_processEvents() {

+ 164 - 0
Modules/Contents/Awesomium/PolycodeWebdView.h

@@ -0,0 +1,164 @@
+
+#include <Polycode.h>
+#include <Awesomium/WebCore.h>
+
+using namespace Polycode;
+
+class PolycodeWebViewEvent : public Event {
+	public:
+			PolycodeWebViewEvent() : Event() {}
+			
+			static const int CALLBACK_EVENT = 0;	
+			
+			String objectName;
+			String callbackName;
+			std::vector <String> args;
+
+};
+
+class PolycodeWebView : public Awesomium::WebViewListener, public EventDispatcher {
+	public:
+		PolycodeWebView(unsigned int width, unsigned int height, String url);
+		~PolycodeWebView();		
+		void Update();
+		
+		void loadURL(String url);
+		
+		void Resize(unsigned int width, unsigned int height);
+		
+		Texture *getRenderTexture();
+				
+		void mouseMove(Number x, Number y);
+		void mouseDown(Number x, Number y);
+		void mouseUp(Number x, Number y);
+		void keyDown(PolyKEY key);
+		
+		void injectKey(int keyCode);
+		
+	// ** The following methods are inherited from WebViewListener:
+
+	virtual void onBeginNavigation(Awesomium::WebView* caller, 
+								   const std::string& url, 
+								   const std::wstring& frameName) {}
+	
+	virtual void onBeginLoading(Awesomium::WebView* caller, 
+								const std::string& url, 
+								const std::wstring& frameName, 
+								int statusCode, const std::wstring& mimeType) {}
+	
+	virtual void onFinishLoading(Awesomium::WebView* caller) {}
+	
+	virtual void onCallback(Awesomium::WebView* caller, 
+							const std::wstring& objectName, 
+							const std::wstring& callbackName, 
+							const Awesomium::JSArguments& args);
+	
+	virtual void onReceiveTitle(Awesomium::WebView* caller, 
+								const std::wstring& title, 
+								const std::wstring& frameName) {}
+	
+	virtual void onChangeTooltip(Awesomium::WebView* caller, 
+								 const std::wstring& tooltip) {}
+	
+	virtual void onChangeCursor(Awesomium::WebView* caller, 
+								Awesomium::CursorType cursor) {}
+
+	virtual void onChangeKeyboardFocus(Awesomium::WebView* caller,
+									   bool isFocused) {}
+	
+	virtual void onChangeTargetURL(Awesomium::WebView* caller, 
+								   const std::string& url) {}
+	
+	virtual void onOpenExternalLink(Awesomium::WebView* caller, 
+									const std::string& url, 
+									const std::wstring& source) {}
+
+	virtual void onRequestDownload(Awesomium::WebView* caller,
+								   const std::string& url) {}
+	
+	virtual void onWebViewCrashed(Awesomium::WebView* caller) {}
+	
+	virtual void onPluginCrashed(Awesomium::WebView* caller, 
+								 const std::wstring& pluginName) {}
+	
+	virtual void onRequestMove(Awesomium::WebView* caller, int x, int y) {}
+	
+	virtual void onGetPageContents(Awesomium::WebView* caller, 
+								   const std::string& url, 
+								   const std::wstring& contents) {}
+	
+	virtual void onDOMReady(Awesomium::WebView* caller) {}
+
+	virtual void onRequestFileChooser(Awesomium::WebView* caller,
+										  bool selectMultipleFiles,
+										  const std::wstring& title,
+										  const std::wstring& defaultPath) {}
+
+	virtual void onGetScrollData(Awesomium::WebView* caller,
+								 int contentWidth,
+								 int contentHeight,
+								 int preferredWidth,
+								 int scrollX,
+								 int scrollY) {}
+
+	virtual void onJavascriptConsoleMessage(Awesomium::WebView* caller,
+											const std::wstring& message,
+											int lineNumber,
+											const std::wstring& source) {}
+
+	virtual void onGetFindResults(Awesomium::WebView* caller,
+                                      int requestID,
+                                      int numMatches,
+                                      const Awesomium::Rect& selection,
+                                      int curMatch,
+                                      bool finalUpdate) {}
+
+	virtual void onUpdateIME(Awesomium::WebView* caller,
+                                 Awesomium::IMEState imeState,
+                                 const Awesomium::Rect& caretRect) {}
+
+	virtual void onShowContextMenu(Awesomium::WebView* caller,
+                                   int mouseX,
+								   int mouseY,
+								   Awesomium::MediaType type,
+								   int mediaState,
+								   const std::string& linkURL,
+								   const std::string& srcURL,
+								   const std::string& pageURL,
+								   const std::string& frameURL,
+								   const std::wstring& selectionText,
+								   bool isEditable,
+								   int editFlags) {}
+
+	virtual void onRequestLogin(Awesomium::WebView* caller,
+                                   int requestID,
+								   const std::string& requestURL,
+								   bool isProxy,
+								   const std::wstring& hostAndPort,
+								   const std::wstring& scheme,
+								   const std::wstring& realm) {}
+
+	virtual void onChangeHistory(Awesomium::WebView* caller,
+									int backCount,
+									int forwardCount) {}
+
+	virtual void onFinishResize(Awesomium::WebView* caller,
+									int width,
+									int height) {}
+
+	virtual void onShowJavascriptDialog(Awesomium::WebView* caller,
+											int requestID,
+											int dialogFlags,
+											const std::wstring& message,
+											const std::wstring& defaultPrompt,
+											const std::string& frameURL) {}	
+		
+	protected:
+	
+		int width, height;
+	
+		Texture *renderTexture;
+	
+		Awesomium::WebView* webView;
+		Awesomium::WebCore* webCore;
+};

+ 2 - 2
Modules/Contents/TUIO/Source/TuioClient.cpp

@@ -457,8 +457,8 @@ void TuioClient::connect(bool lk) {
 	pthread_mutex_init(&cursorMutex,NULL);
 	pthread_mutex_init(&cursorMutex,NULL);
 	pthread_mutex_init(&objectMutex,NULL);	
 	pthread_mutex_init(&objectMutex,NULL);	
 #else
 #else
-	cursorMutex = CreateMutex(NULL,FALSE,"cursorMutex");
-	objectMutex = CreateMutex(NULL,FALSE,"objectMutex");
+	cursorMutex = CreateMutex(NULL,FALSE,L"cursorMutex");
+	objectMutex = CreateMutex(NULL,FALSE,L"objectMutex");
 #endif		
 #endif		
 		
 		
 	if (socket==NULL) return;
 	if (socket==NULL) return;