Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleaned up

  • Loading branch information...
commit 96ffe01c241021ae61f76a79326168c5e32d2125 1 parent 6ff5bd5
@schlunsen authored
Showing with 198 additions and 48,742 deletions.
  1. +9 −7 Assets/AwesomiumWrapper/AwesomiumWrapper.cs
  2. +41 −17 Assets/AwesomiumWrapper/BrowserGUIEvents.cs
  3. +1 −1  Assets/GUI/ControlWindow.cs
  4. BIN  Assets/Plugins/UnityAwesomium.dll
  5. BIN  Assets/test.unity
  6. BIN  Library/EditorUserBuildSettings.asset
  7. BIN  Library/InspectorExpandedItems.asset
  8. BIN  Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
  9. BIN  Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll.mdb
  10. BIN  Library/ScriptAssemblies/Assembly-CSharp.dll
  11. BIN  Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
  12. BIN  Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll
  13. BIN  Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll.mdb
  14. BIN  Library/assetDatabase3
  15. BIN  Library/cache/2d/2da4750ec37d9394fb9cb4f7aea61749
  16. BIN  Library/cache/63/63e17b67e6d81ac499bbb13d6d93f49e
  17. BIN  Library/cache/a8/a8a85186e5d6a0f499559738477fbdfd
  18. +6 −0 NavigationLog.log
  19. BIN  UnityAwesomium.suo
  20. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.dll
  21. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.exp
  22. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.lib
  23. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.pdb
  24. +11 −5 UnityAwesomiumSource/Unity/Unity/AwesomiumPlugin.cpp
  25. BIN  UnityAwesomiumSource/Unity/Unity/Release/AwesomiumPlugin.obj
  26. BIN  UnityAwesomiumSource/Unity/Unity/Release/BuildLog.htm
  27. +1 −1  UnityAwesomiumSource/Unity/Unity/Release/mt.dep
  28. BIN  UnityAwesomiumSource/Unity/Unity/Release/vc90.idb
  29. BIN  UnityAwesomiumSource/Unity/Unity/Release/vc90.pdb
  30. +2 −2 UnityAwesomiumSource/Unity/Unity/global.h
  31. BIN  UnityAwesomiumSource/Unity/UnityAwesomium.ncb
  32. BIN  UnityAwesomiumSource/Unity/UnityAwesomium.suo
  33. +11 −27 build/awesomium.log
  34. +3 −0  build/output/debugger.log
  35. +43 −3 build/output/testDBG.txt
  36. BIN  build/test_Data/Managed/Assembly-CSharp-firstpass.dll
  37. BIN  build/test_Data/Managed/Assembly-CSharp.dll
  38. BIN  build/test_Data/Managed/Assembly-UnityScript-firstpass.dll
  39. BIN  build/test_Data/Plugins/UnityAwesomium.dll
  40. BIN  build/test_Data/mainData
  41. +70 −48,679 build/test_Data/output_log.txt
View
16 Assets/AwesomiumWrapper/AwesomiumWrapper.cs
@@ -53,18 +53,20 @@ public class AwesomiumWrapper {
// end Mouse func
+ // Key func
+ [DllImport("UnityAwesomium")]
+ public static extern void injectKeyboard(int msg, uint wParam, long lParam);
- //[DllImport("UnityAwesomium")]
- //public static extern void SetDelegates(SetPixelsFunc setPixelsFunc, ApplyPixelsFunc applyPixelsFunc);
+
- public class Window
- {
- [DllImport("UnityAwesomium")]
- public static extern void update();
+ //public class Window
+ //{
+ // [DllImport("UnityAwesomium")]
+ // public static extern void update();
- }
+ //}
}
View
58 Assets/AwesomiumWrapper/BrowserGUIEvents.cs
@@ -5,18 +5,52 @@ public class BrowserGUIEvents : MonoBehaviour
{
public bool interactive = true;
- public int width, height;
+ private int width, height;
private string output;
private bool mouseOver = false;
+ public AwesomiumMeshRender mesh;
void Start()
{
-
+ width = mesh.width;
+ height = mesh.height;
}
+ void OnGUI()
+ {
+ // Inject input into the page when the GUI doesn't have focus
+ if (Event.current.isKey && GUIUtility.keyboardControl == 0)
+ {
+ // Insert character
+ Debug.Log(Event.current.keyCode);
+ AwesomiumWrapper.injectKeyboard((int)Event.current.keyCode, 2, 0);
+
+
+
+ //UnityBerkelium.Window.textEvent(m_TextureID, Event.current.character);
+
+ //KeyCode key = Event.current.keyCode;
+ //bool pressed = (Event.current.type == EventType.KeyDown);
+
+ //// Special case for backspace
+ //if (key == KeyCode.Backspace)
+ // UnityBerkelium.Window.keyEvent(m_TextureID, pressed, 0, 08, 0);
+ //// Special case for enter
+ //else if (key == KeyCode.Return)
+ // UnityBerkelium.Window.keyEvent(m_TextureID, pressed, 0, 13, 0);
+
+ // TODO Handle all keys
+ /*int mods = 0;
+ int vk_code = UnityBerkelium.convertKeyCode(Event.current.keyCode);
+ int scancode = 0;
+ UnityBerkelium.Window.keyEvent(m_TextureID, pressed, mods, vk_code, scancode);
+ print("Key event: " + pressed + ", " + Event.current.keyCode);*/
+ }
+
+ }
void Update()
{
@@ -50,15 +84,10 @@ void OnMouseDown()
{
int x = /*width -*/ (int)(hit.textureCoord.x * width);
- int y = height - (int)(hit.textureCoord.y * height);
-
- // Focus the window
- //UnityBerkelium.Window.focus(m_TextureID);
+ int y = height - (int)(hit.textureCoord.y * height);
AwesomiumWrapper.mouseMove(x, y);
- AwesomiumWrapper.mouseDown(0);
-
-
+ AwesomiumWrapper.mouseDown(0);
}
}
@@ -78,8 +107,7 @@ void OnMouseUp()
AwesomiumWrapper.mouseUp(0);
}
}
- //UnityBerkelium.Window.mouseMove(m_TextureID, x, y);
- //UnityBerkelium.Window.mouseUp(m_TextureID, 0);
+
void OnMouseOver()
{
@@ -91,14 +119,10 @@ void OnMouseOver()
RaycastHit hit;
if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit))
- {
-
+ {
int x = /*width -*/ (int)(hit.textureCoord.x * width);
int y = height - (int)(hit.textureCoord.y * height);
- Debug.Log("x " + x + " y: " + y + " width:" + width);
- AwesomiumWrapper.mouseMove(x, y);
-
-
+ AwesomiumWrapper.mouseMove(x, y);
}
}
View
2  Assets/GUI/ControlWindow.cs
@@ -7,7 +7,7 @@ public class ControlWindow : MonoBehaviour
public bool showBrowser = true;
//Window releated;
private int controlWindowId = 1;
- private Rect controlWinRect = new Rect(0, 0, 300, 300);
+ private Rect controlWinRect = new Rect(0, 0, 300, 150);
private string txtString = "http://www.dr.dk";
private Vector3 startPosition;
public GameObject gui;
View
BIN  Assets/Plugins/UnityAwesomium.dll
Binary file not shown
View
BIN  Assets/test.unity
Binary file not shown
View
BIN  Library/EditorUserBuildSettings.asset
Binary file not shown
View
BIN  Library/InspectorExpandedItems.asset
Binary file not shown
View
BIN  Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
Binary file not shown
View
BIN  Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll.mdb
Binary file not shown
View
BIN  Library/ScriptAssemblies/Assembly-CSharp.dll
Binary file not shown
View
BIN  Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown
View
BIN  Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll
Binary file not shown
View
BIN  Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll.mdb
Binary file not shown
View
BIN  Library/assetDatabase3
Binary file not shown
View
BIN  Library/cache/2d/2da4750ec37d9394fb9cb4f7aea61749
Binary file not shown
View
BIN  Library/cache/63/63e17b67e6d81ac499bbb13d6d93f49e
Binary file not shown
View
BIN  Library/cache/a8/a8a85186e5d6a0f499559738477fbdfd
Binary file not shown
View
6 NavigationLog.log
@@ -165,3 +165,9 @@ http://version2.dk/
http://version2.dk/
http://version2.dk/
http://www.dr.dk
+http://version2.dk/
+http://version2.dk/
+http://version2.dk/
+http://version2.dk/
+http://www.google.dk
+http://version2.dk/
View
BIN  UnityAwesomium.suo
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.dll
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.exp
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.lib
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.pdb
Binary file not shown
View
16 UnityAwesomiumSource/Unity/Unity/AwesomiumPlugin.cpp
@@ -143,7 +143,7 @@ extern "C" __declspec(dllexport) void init(float* buffer, int width, int height)
Awesomium::PF_RGBA,
"");
- webView = webCore->createWebView(texWidth, texHeight,true);
+ webView = webCore->createWebView(texWidth, texHeight);
MyWebViewListener *myListener = new MyWebViewListener(m_buffer);
webView->setListener(myListener);
webView->loadURL(URL);
@@ -171,6 +171,14 @@ PLUGIN_API void update(){
PLUGIN_API void gotoURL(char* url){
webView->loadURL(url);
+
+}
+
+/**
+* Keyboard wrapping
+**/
+PLUGIN_API void injectKeyboard(int msg, int wParam, long lParam){
+ webView->injectKeyboardEvent(Awesomium::WebKeyboardEvent(msg,wParam,lParam));
}
/**
@@ -211,10 +219,8 @@ PLUGIN_API void mouseMove(int x,int y){
/**
* wrap scrollwheel function
**/
-PLUGIN_API void scrollWheel(int amount){
- //webView->focus();
- webView->injectMouseWheel(amount);
- myfile << "scrolling: " << amount << " \n";
+PLUGIN_API void scrollWheel(int amount){
+ webView->injectMouseWheel(amount);
}
// End mouse functions
View
BIN  UnityAwesomiumSource/Unity/Unity/Release/AwesomiumPlugin.obj
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Unity/Release/BuildLog.htm
Binary file not shown
View
2  UnityAwesomiumSource/Unity/Unity/Release/mt.dep
@@ -1 +1 @@
-Manifest resource last updated at 18:16:15,30 on 09-11-2010
+Manifest resource last updated at 0:08:02,00 on 10-11-2010
View
BIN  UnityAwesomiumSource/Unity/Unity/Release/vc90.idb
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Unity/Release/vc90.pdb
Binary file not shown
View
4 UnityAwesomiumSource/Unity/Unity/global.h
@@ -5,7 +5,7 @@
#include <fstream>
#include <time.h>
-#define URL "http://version2.dk/"
+#define URL "http://google.dk/"
// unity float buffer ~ m_pixels in unity (Pointer to Color[] ??)
float* m_buffer;
@@ -15,7 +15,7 @@ static Awesomium::WebView* webView = 0;
//Unity prop
int texWidth;
int texHeight;
-std::ofstream myfile(".\\output\\testDBG.txt");
+std::ofstream myfile(".\\output\\debugger.log");
View
BIN  UnityAwesomiumSource/Unity/UnityAwesomium.ncb
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/UnityAwesomium.suo
Binary file not shown
View
38 build/awesomium.log
@@ -1,12 +1,12 @@
-[1109/183150:INFO:WebCore.cpp(74)] Creating the core thread.
-[1109/183150:INFO:WebCore.cpp(84)] Creating the WebCore.
-[1109/183150:INFO:WebCoreProxy.cpp(45)] ICU successfully initialized.
-[1109/183150:INFO:RequestContext.cpp(68)] An invalid or empty cookie path was specified, cookies will be lost on program exit.
-[1109/183150:INFO:RequestContext.cpp(111)] An invalid or empty cache path was specified, cache will be lost on program exit.
-[1109/183150:INFO:WebCoreProxy.cpp(202)] The WebCore is now online.
-[1109/183150:INFO:WebView.cpp(68)] A new WebView has been created.
-[1109/183150:INFO:WebViewProxy.cpp(150)] WebViewProxy[0] has been created.
-[1109/183150:INFO:proxy_service.cc(619)] New proxy configuration was loaded:
+[1110/002242:INFO:WebCore.cpp(74)] Creating the core thread.
+[1110/002242:INFO:WebCore.cpp(84)] Creating the WebCore.
+[1110/002242:INFO:WebCoreProxy.cpp(45)] ICU successfully initialized.
+[1110/002242:INFO:RequestContext.cpp(68)] An invalid or empty cookie path was specified, cookies will be lost on program exit.
+[1110/002242:INFO:RequestContext.cpp(111)] An invalid or empty cache path was specified, cache will be lost on program exit.
+[1110/002242:INFO:WebCoreProxy.cpp(202)] The WebCore is now online.
+[1110/002242:INFO:WebView.cpp(68)] A new WebView has been created.
+[1110/002242:INFO:WebViewProxy.cpp(150)] WebViewProxy[0] has been created.
+[1110/002242:INFO:proxy_service.cc(619)] New proxy configuration was loaded:
{
auto_detect: 0
pac_url:
@@ -22,21 +22,5 @@
proxy_bypass_list:
id: 1
}
-[1109/183150:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
-[1109/183150:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
-[1109/183152:INFO:plugin_lib.cc(97)] PluginLib::NP_Initialize(C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll): initialized=0
-[1109/183152:INFO:plugin_lib.cc(115)] PluginLib::NP_Initialize(C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll): result=0
-[1109/183152:INFO:WindowlessPlugin.h(95)] A WindowlessPlugin has been created
-[1109/183152:INFO:plugin_lib.cc(97)] PluginLib::NP_Initialize(C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll): initialized=1
-[1109/183152:INFO:WindowlessPlugin.h(95)] A WindowlessPlugin has been created
-[1109/183204:INFO:WindowlessPlugin.h(61)] A WindowlessPlugin has been destroyed
-[1109/183204:INFO:WindowlessPlugin.h(61)] A WindowlessPlugin has been destroyed
-[1109/183204:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
-[1109/183204:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
-[1109/183204:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
-[1109/183204:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
-[1109/183214:INFO:plugin_lib.cc(97)] PluginLib::NP_Initialize(C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll): initialized=1
-[1109/183214:INFO:WindowlessPlugin.h(95)] A WindowlessPlugin has been created
-[1109/201426:INFO:WindowlessPlugin.h(61)] A WindowlessPlugin has been destroyed
-[1109/201426:INFO:plugin_lib.cc(97)] PluginLib::NP_Initialize(C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll): initialized=1
-[1109/201426:INFO:WindowlessPlugin.h(95)] A WindowlessPlugin has been created
+[1110/002242:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
+[1110/002242:INFO:WebViewProxy.cpp(1343)] WebViewProxy[0]::AddMessageToConsole, there is a Javascript Error in at line 1. Error message: Uncaught TypeError: Cannot read property 'style' of null
View
3  build/output/debugger.log
@@ -0,0 +1,3 @@
+Unity texture width: 500
+Unity texture height: 500
+m_buffer size (sizeof): 4
View
46 build/output/testDBG.txt
@@ -1,3 +1,43 @@
-Unity texture width: 500
-Unity texture height: 500
-m_buffer size (sizeof): 4
+Unity texture width: 1024
+Unity texture height: 1024
+m_buffer size (sizeof): 4scrolling: -100
+scrolling: -400
+scrolling: -300
+scrolling: -100
+scrolling: -100
+scrolling: -500
+scrolling: -100
+scrolling: -400
+scrolling: 500
+scrolling: 100
+scrolling: 400
+scrolling: 400
+scrolling: 100
+scrolling: 400
+scrolling: 400
+scrolling: -100
+scrolling: -200
+scrolling: 100
+scrolling: 200
+scrolling: 100
+scrolling: 100
+scrolling: 100
+scrolling: 100
+scrolling: 100
+scrolling: 100
+scrolling: -100
+scrolling: -500
+scrolling: -400
+scrolling: -100
+scrolling: 100
+scrolling: 300
+scrolling: 400
+scrolling: 200
+scrolling: -100
+scrolling: -400
+scrolling: -100
+scrolling: -400
+scrolling: -100
+scrolling: -400
+scrolling: -100
+scrolling: -200
View
BIN  build/test_Data/Managed/Assembly-CSharp-firstpass.dll
Binary file not shown
View
BIN  build/test_Data/Managed/Assembly-CSharp.dll
Binary file not shown
View
BIN  build/test_Data/Managed/Assembly-UnityScript-firstpass.dll
Binary file not shown
View
BIN  build/test_Data/Plugins/UnityAwesomium.dll
Binary file not shown
View
BIN  build/test_Data/mainData
Binary file not shown
View
48,749 build/test_Data/output_log.txt
70 additions, 48,679 deletions not shown
Please sign in to comment.
Something went wrong with that request. Please try again.