Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Now using Awesomium 1.08 LGPL version. Destroying of webviews now wor…

…king
  • Loading branch information...
commit b8bd57f95409246f7b5d6e34f3c8ff4596beade0 1 parent 239d566
unknown authored
Showing with 337 additions and 1,163 deletions.
  1. BIN  Assets/Plugins/UnityAwesomium.dll
  2. BIN  Assets/test.unity
  3. BIN  Awesomium.dll
  4. BIN  Library/EditorUserBuildSettings.asset
  5. BIN  Library/InspectorExpandedItems.asset
  6. BIN  Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
  7. BIN  Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll.mdb
  8. BIN  Library/ScriptAssemblies/Assembly-CSharp.dll
  9. BIN  Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
  10. BIN  Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll
  11. BIN  Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll.mdb
  12. BIN  Library/assetDatabase3
  13. BIN  Library/cache/00/00000000000000002000000000000000
  14. BIN  Library/cache/00/00000000000000003000000000000000
  15. BIN  Library/cache/00/00000000000000004000000000000000
  16. BIN  Library/cache/00/00000000000000005000000000000000
  17. BIN  Library/cache/00/00000000000000006000000000000000
  18. BIN  Library/cache/00/00000000000000007000000000000000
  19. BIN  Library/cache/00/00000000000000009000000000000000
  20. BIN  Library/cache/00/0000000000000000a000000000000000
  21. BIN  Library/cache/00/0000000000000000b000000000000000
  22. BIN  Library/cache/00/0000000000000000c000000000000000
  23. BIN  Library/cache/0a/0ab79d7f243824f5d9826bd83522c8df
  24. BIN  Library/cache/0b/0b167d00b3108411a8a963cba5ddde1b
  25. BIN  Library/cache/19/195c271a9118d224c8562ae67cf47a66
  26. BIN  Library/cache/1b/1b3805a7dbdb9a0478f52b05b691abb2
  27. BIN  Library/cache/1d/1d5ac211a643e447ca78c2d794a16381
  28. BIN  Library/cache/23/2372dd1814cb4ed47a91f8174877623e
  29. BIN  Library/cache/2d/2da4750ec37d9394fb9cb4f7aea61749
  30. BIN  Library/cache/32/32ef381921b3f7f479831b042c113762
  31. BIN  Library/cache/35/352e5f82d7105ad408904c5f552b5fe7
  32. BIN  Library/cache/39/397c6a4ca7b394e478c785a93c2c8909
  33. BIN  Library/cache/60/60bca8f58a0b8478e946e6e86658cb29
  34. BIN  Library/cache/63/63e17b67e6d81ac499bbb13d6d93f49e
  35. BIN  Library/cache/66/66ebe4da1ef67e64e8aeccb820e409d6
  36. BIN  Library/cache/68/68ec2fe99d1108b9d0006a298d76c639
  37. BIN  Library/cache/74/743d8c5197cf888429d53c1bed49c255
  38. BIN  Library/cache/7d/7d34d948539c9bf4b9a557ebc771dd9a
  39. BIN  Library/cache/8a/8a98ef45bc7df804d95fd945abd2c943
  40. BIN  Library/cache/96/96aaf6eedb57489419cd1c026e6af47a
  41. BIN  Library/cache/a8/a8a85186e5d6a0f499559738477fbdfd
  42. BIN  Library/cache/b1/b160ccd622e06c9439c8c8afa28d28a0
  43. BIN  Library/cache/c4/c4e702f769357c54698524de673f6313
  44. BIN  Library/cache/da/da93ddd6928094e24bb1f3f665f143d3
  45. BIN  Library/cache/fb/fbf51a8f488eb954ab1b7f2566dfd56f
  46. BIN  Library/metadata/00/00000000000000002000000000000000
  47. BIN  Library/metadata/00/00000000000000003000000000000000
  48. BIN  Library/metadata/00/00000000000000004000000000000000
  49. BIN  Library/metadata/00/00000000000000005000000000000000
  50. BIN  Library/metadata/00/00000000000000006000000000000000
  51. BIN  Library/metadata/00/00000000000000007000000000000000
  52. BIN  Library/metadata/00/00000000000000009000000000000000
  53. BIN  Library/metadata/00/0000000000000000a000000000000000
  54. BIN  Library/metadata/00/0000000000000000b000000000000000
  55. BIN  Library/metadata/00/0000000000000000c000000000000000
  56. BIN  Library/metadata/0a/0ab79d7f243824f5d9826bd83522c8df
  57. BIN  Library/metadata/0b/0b167d00b3108411a8a963cba5ddde1b
  58. BIN  Library/metadata/0c/0c404151eae2f404e94a102dbb9a1e8d
  59. BIN  Library/metadata/19/195c271a9118d224c8562ae67cf47a66
  60. BIN  Library/metadata/1b/1b3805a7dbdb9a0478f52b05b691abb2
  61. BIN  Library/metadata/1d/1d5ac211a643e447ca78c2d794a16381
  62. BIN  Library/metadata/23/2314ce3a3eecf4816bad3c9eca4de2e1
  63. BIN  Library/metadata/23/2372dd1814cb4ed47a91f8174877623e
  64. BIN  Library/metadata/2d/2da4750ec37d9394fb9cb4f7aea61749
  65. BIN  Library/metadata/32/32ef381921b3f7f479831b042c113762
  66. BIN  Library/metadata/35/352e5f82d7105ad408904c5f552b5fe7
  67. BIN  Library/metadata/39/397c6a4ca7b394e478c785a93c2c8909
  68. BIN  Library/metadata/44/449b48f7eb5d87a4baaa5fb73f875a59
  69. BIN  Library/metadata/60/60bca8f58a0b8478e946e6e86658cb29
  70. BIN  Library/metadata/63/63e17b67e6d81ac499bbb13d6d93f49e
  71. BIN  Library/metadata/66/66ebe4da1ef67e64e8aeccb820e409d6
  72. BIN  Library/metadata/68/68ec2fe99d1108b9d0006a298d76c639
  73. BIN  Library/metadata/74/743d8c5197cf888429d53c1bed49c255
  74. BIN  Library/metadata/7d/7d34d948539c9bf4b9a557ebc771dd9a
  75. BIN  Library/metadata/8a/8a98ef45bc7df804d95fd945abd2c943
  76. BIN  Library/metadata/96/96aaf6eedb57489419cd1c026e6af47a
  77. BIN  Library/metadata/9d/9d4133d5d30b644bd87802a347eaccbe
  78. BIN  Library/metadata/a2/a2126534b3a11b34e977105bd9e3cc03
  79. BIN  Library/metadata/a8/a8a85186e5d6a0f499559738477fbdfd
  80. BIN  Library/metadata/b1/b160ccd622e06c9439c8c8afa28d28a0
  81. BIN  Library/metadata/c4/c4e702f769357c54698524de673f6313
  82. BIN  Library/metadata/c6/c64ceccb926e4ff4b831dd2a1e88ad8c
  83. BIN  Library/metadata/ca/ca49380a71a2bb64c830d06bd421b9d1
  84. BIN  Library/metadata/cc/cc9a9e51cb229ff4fa57502d98584f64
  85. BIN  Library/metadata/da/da93ddd6928094e24bb1f3f665f143d3
  86. BIN  Library/metadata/fb/fbf51a8f488eb954ab1b7f2566dfd56f
  87. BIN  Library/previews/19/195c271a9118d224c8562ae67cf47a66
  88. BIN  Library/previews/23/2314ce3a3eecf4816bad3c9eca4de2e1
  89. BIN  Library/previews/23/2372dd1814cb4ed47a91f8174877623e
  90. BIN  Library/previews/32/32ef381921b3f7f479831b042c113762
  91. BIN  Library/previews/35/352e5f82d7105ad408904c5f552b5fe7
  92. BIN  Library/previews/39/397c6a4ca7b394e478c785a93c2c8909
  93. BIN  Library/previews/44/449b48f7eb5d87a4baaa5fb73f875a59
  94. BIN  Library/previews/66/66ebe4da1ef67e64e8aeccb820e409d6
  95. BIN  Library/previews/7d/7d34d948539c9bf4b9a557ebc771dd9a
  96. BIN  Library/previews/8a/8a98ef45bc7df804d95fd945abd2c943
  97. BIN  Library/previews/9d/9d4133d5d30b644bd87802a347eaccbe
  98. BIN  Library/previews/a2/a2126534b3a11b34e977105bd9e3cc03
  99. BIN  Library/previews/c4/c4e702f769357c54698524de673f6313
  100. BIN  Library/previews/ca/ca49380a71a2bb64c830d06bd421b9d1
  101. BIN  Library/previews/cc/cc9a9e51cb229ff4fa57502d98584f64
  102. +1 −1  UnityAwesomium.csproj
  103. BIN  UnityAwesomiumSource/Unity/Awesomium/bin/Awesomium.dll
  104. BIN  UnityAwesomiumSource/Unity/Awesomium/bin/Awesomium_d.dll
  105. +51 −68 UnityAwesomiumSource/Unity/Awesomium/include/JSValue.h
  106. +0 −520 UnityAwesomiumSource/Unity/Awesomium/include/KeyboardCodes.h
  107. +19 −9 UnityAwesomiumSource/Unity/Awesomium/include/PlatformUtils.h
  108. +25 −39 UnityAwesomiumSource/Unity/Awesomium/include/WebCore.h
  109. +0 −145 UnityAwesomiumSource/Unity/Awesomium/include/WebKeyboardEvent.h
  110. +65 −202 UnityAwesomiumSource/Unity/Awesomium/include/WebView.h
  111. +29 −51 UnityAwesomiumSource/Unity/Awesomium/include/WebViewListener.h
  112. BIN  UnityAwesomiumSource/Unity/Awesomium/lib/Awesomium.lib
  113. BIN  UnityAwesomiumSource/Unity/Awesomium/lib/Awesomium_d.lib
  114. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.dll
  115. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.exp
  116. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.lib
  117. BIN  UnityAwesomiumSource/Unity/Release/UnityAwesomium.pdb
  118. +14 −13 UnityAwesomiumSource/Unity/Unity/AwesomiumPlugin.cpp
  119. BIN  UnityAwesomiumSource/Unity/Unity/Release/AwesomiumPlugin.obj
  120. BIN  UnityAwesomiumSource/Unity/Unity/Release/BuildLog.htm
  121. +1 −1  UnityAwesomiumSource/Unity/Unity/Release/mt.dep
  122. BIN  UnityAwesomiumSource/Unity/Unity/Release/vc90.idb
  123. BIN  UnityAwesomiumSource/Unity/Unity/Release/vc90.pdb
  124. +25 −39 UnityAwesomiumSource/Unity/Unity/WebCore.h
  125. BIN  UnityAwesomiumSource/Unity/UnityAwesomium.ncb
  126. BIN  UnityAwesomiumSource/Unity/UnityAwesomium.suo
  127. BIN  build/Awesomium.dll
  128. +95 −63 build/awesomium.log
  129. BIN  build/test_Data/Managed/Assembly-CSharp-firstpass.dll
  130. BIN  build/test_Data/Managed/Assembly-CSharp.dll
  131. BIN  build/test_Data/Managed/Assembly-UnityScript-firstpass.dll
  132. BIN  build/test_Data/Plugins/UnityAwesomium.dll
  133. BIN  build/test_Data/mainData
  134. +12 −12 build/test_Data/output_log.txt
View
BIN  Assets/Plugins/UnityAwesomium.dll
Binary file not shown
View
BIN  Assets/test.unity
Binary file not shown
View
BIN  Awesomium.dll
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/00/00000000000000002000000000000000
Binary file not shown
View
BIN  Library/cache/00/00000000000000003000000000000000
Binary file not shown
View
BIN  Library/cache/00/00000000000000004000000000000000
Binary file not shown
View
BIN  Library/cache/00/00000000000000005000000000000000
Binary file not shown
View
BIN  Library/cache/00/00000000000000006000000000000000
Binary file not shown
View
BIN  Library/cache/00/00000000000000007000000000000000
Binary file not shown
View
BIN  Library/cache/00/00000000000000009000000000000000
Binary file not shown
View
BIN  Library/cache/00/0000000000000000a000000000000000
Binary file not shown
View
BIN  Library/cache/00/0000000000000000b000000000000000
Binary file not shown
View
BIN  Library/cache/00/0000000000000000c000000000000000
Binary file not shown
View
BIN  Library/cache/0a/0ab79d7f243824f5d9826bd83522c8df
Binary file not shown
View
BIN  Library/cache/0b/0b167d00b3108411a8a963cba5ddde1b
Binary file not shown
View
BIN  Library/cache/19/195c271a9118d224c8562ae67cf47a66
Binary file not shown
View
BIN  Library/cache/1b/1b3805a7dbdb9a0478f52b05b691abb2
Binary file not shown
View
BIN  Library/cache/1d/1d5ac211a643e447ca78c2d794a16381
Binary file not shown
View
BIN  Library/cache/23/2372dd1814cb4ed47a91f8174877623e
Binary file not shown
View
BIN  Library/cache/2d/2da4750ec37d9394fb9cb4f7aea61749
Binary file not shown
View
BIN  Library/cache/32/32ef381921b3f7f479831b042c113762
Binary file not shown
View
BIN  Library/cache/35/352e5f82d7105ad408904c5f552b5fe7
Binary file not shown
View
BIN  Library/cache/39/397c6a4ca7b394e478c785a93c2c8909
Binary file not shown
View
BIN  Library/cache/60/60bca8f58a0b8478e946e6e86658cb29
Binary file not shown
View
BIN  Library/cache/63/63e17b67e6d81ac499bbb13d6d93f49e
Binary file not shown
View
BIN  Library/cache/66/66ebe4da1ef67e64e8aeccb820e409d6
Binary file not shown
View
BIN  Library/cache/68/68ec2fe99d1108b9d0006a298d76c639
Binary file not shown
View
BIN  Library/cache/74/743d8c5197cf888429d53c1bed49c255
Binary file not shown
View
BIN  Library/cache/7d/7d34d948539c9bf4b9a557ebc771dd9a
Binary file not shown
View
BIN  Library/cache/8a/8a98ef45bc7df804d95fd945abd2c943
Binary file not shown
View
BIN  Library/cache/96/96aaf6eedb57489419cd1c026e6af47a
Binary file not shown
View
BIN  Library/cache/a8/a8a85186e5d6a0f499559738477fbdfd
Binary file not shown
View
BIN  Library/cache/b1/b160ccd622e06c9439c8c8afa28d28a0
Binary file not shown
View
BIN  Library/cache/c4/c4e702f769357c54698524de673f6313
Binary file not shown
View
BIN  Library/cache/da/da93ddd6928094e24bb1f3f665f143d3
Binary file not shown
View
BIN  Library/cache/fb/fbf51a8f488eb954ab1b7f2566dfd56f
Binary file not shown
View
BIN  Library/metadata/00/00000000000000002000000000000000
Binary file not shown
View
BIN  Library/metadata/00/00000000000000003000000000000000
Binary file not shown
View
BIN  Library/metadata/00/00000000000000004000000000000000
Binary file not shown
View
BIN  Library/metadata/00/00000000000000005000000000000000
Binary file not shown
View
BIN  Library/metadata/00/00000000000000006000000000000000
Binary file not shown
View
BIN  Library/metadata/00/00000000000000007000000000000000
Binary file not shown
View
BIN  Library/metadata/00/00000000000000009000000000000000
Binary file not shown
View
BIN  Library/metadata/00/0000000000000000a000000000000000
Binary file not shown
View
BIN  Library/metadata/00/0000000000000000b000000000000000
Binary file not shown
View
BIN  Library/metadata/00/0000000000000000c000000000000000
Binary file not shown
View
BIN  Library/metadata/0a/0ab79d7f243824f5d9826bd83522c8df
Binary file not shown
View
BIN  Library/metadata/0b/0b167d00b3108411a8a963cba5ddde1b
Binary file not shown
View
BIN  Library/metadata/0c/0c404151eae2f404e94a102dbb9a1e8d
Binary file not shown
View
BIN  Library/metadata/19/195c271a9118d224c8562ae67cf47a66
Binary file not shown
View
BIN  Library/metadata/1b/1b3805a7dbdb9a0478f52b05b691abb2
Binary file not shown
View
BIN  Library/metadata/1d/1d5ac211a643e447ca78c2d794a16381
Binary file not shown
View
BIN  Library/metadata/23/2314ce3a3eecf4816bad3c9eca4de2e1
Binary file not shown
View
BIN  Library/metadata/23/2372dd1814cb4ed47a91f8174877623e
Binary file not shown
View
BIN  Library/metadata/2d/2da4750ec37d9394fb9cb4f7aea61749
Binary file not shown
View
BIN  Library/metadata/32/32ef381921b3f7f479831b042c113762
Binary file not shown
View
BIN  Library/metadata/35/352e5f82d7105ad408904c5f552b5fe7
Binary file not shown
View
BIN  Library/metadata/39/397c6a4ca7b394e478c785a93c2c8909
Binary file not shown
View
BIN  Library/metadata/44/449b48f7eb5d87a4baaa5fb73f875a59
Binary file not shown
View
BIN  Library/metadata/60/60bca8f58a0b8478e946e6e86658cb29
Binary file not shown
View
BIN  Library/metadata/63/63e17b67e6d81ac499bbb13d6d93f49e
Binary file not shown
View
BIN  Library/metadata/66/66ebe4da1ef67e64e8aeccb820e409d6
Binary file not shown
View
BIN  Library/metadata/68/68ec2fe99d1108b9d0006a298d76c639
Binary file not shown
View
BIN  Library/metadata/74/743d8c5197cf888429d53c1bed49c255
Binary file not shown
View
BIN  Library/metadata/7d/7d34d948539c9bf4b9a557ebc771dd9a
Binary file not shown
View
BIN  Library/metadata/8a/8a98ef45bc7df804d95fd945abd2c943
Binary file not shown
View
BIN  Library/metadata/96/96aaf6eedb57489419cd1c026e6af47a
Binary file not shown
View
BIN  Library/metadata/9d/9d4133d5d30b644bd87802a347eaccbe
Binary file not shown
View
BIN  Library/metadata/a2/a2126534b3a11b34e977105bd9e3cc03
Binary file not shown
View
BIN  Library/metadata/a8/a8a85186e5d6a0f499559738477fbdfd
Binary file not shown
View
BIN  Library/metadata/b1/b160ccd622e06c9439c8c8afa28d28a0
Binary file not shown
View
BIN  Library/metadata/c4/c4e702f769357c54698524de673f6313
Binary file not shown
View
BIN  Library/metadata/c6/c64ceccb926e4ff4b831dd2a1e88ad8c
Binary file not shown
View
BIN  Library/metadata/ca/ca49380a71a2bb64c830d06bd421b9d1
Binary file not shown
View
BIN  Library/metadata/cc/cc9a9e51cb229ff4fa57502d98584f64
Binary file not shown
View
BIN  Library/metadata/da/da93ddd6928094e24bb1f3f665f143d3
Binary file not shown
View
BIN  Library/metadata/fb/fbf51a8f488eb954ab1b7f2566dfd56f
Binary file not shown
View
BIN  Library/previews/19/195c271a9118d224c8562ae67cf47a66
Binary file not shown
View
BIN  Library/previews/23/2314ce3a3eecf4816bad3c9eca4de2e1
Binary file not shown
View
BIN  Library/previews/23/2372dd1814cb4ed47a91f8174877623e
Binary file not shown
View
BIN  Library/previews/32/32ef381921b3f7f479831b042c113762
Binary file not shown
View
BIN  Library/previews/35/352e5f82d7105ad408904c5f552b5fe7
Binary file not shown
View
BIN  Library/previews/39/397c6a4ca7b394e478c785a93c2c8909
Binary file not shown
View
BIN  Library/previews/44/449b48f7eb5d87a4baaa5fb73f875a59
Binary file not shown
View
BIN  Library/previews/66/66ebe4da1ef67e64e8aeccb820e409d6
Binary file not shown
View
BIN  Library/previews/7d/7d34d948539c9bf4b9a557ebc771dd9a
Binary file not shown
View
BIN  Library/previews/8a/8a98ef45bc7df804d95fd945abd2c943
Binary file not shown
View
BIN  Library/previews/9d/9d4133d5d30b644bd87802a347eaccbe
Binary file not shown
View
BIN  Library/previews/a2/a2126534b3a11b34e977105bd9e3cc03
Binary file not shown
View
BIN  Library/previews/c4/c4e702f769357c54698524de673f6313
Binary file not shown
View
BIN  Library/previews/ca/ca49380a71a2bb64c830d06bd421b9d1
Binary file not shown
View
BIN  Library/previews/cc/cc9a9e51cb229ff4fa57502d98584f64
Binary file not shown
View
2  UnityAwesomium.csproj
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;UNITY_3_1_0;UNITY_3_1;UNITY_EDITOR;ENABLE_PROFILER;UNITY_STANDALONE_WIN;ENABLE_GENERICS;ENABLE_DUCK_TYPING;ENABLE_TERRAIN;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CLOTH;ENABLE_WWW</DefineConstants>
+ <DefineConstants>DEBUG;TRACE;UNITY_3_0_0;UNITY_3_0;UNITY_EDITOR;ENABLE_PROFILER;UNITY_STANDALONE_WIN;ENABLE_GENERICS;ENABLE_DUCK_TYPING;ENABLE_TERRAIN;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CLOTH;ENABLE_WWW</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
View
BIN  UnityAwesomiumSource/Unity/Awesomium/bin/Awesomium.dll
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Awesomium/bin/Awesomium_d.dll
Binary file not shown
View
119 UnityAwesomiumSource/Unity/Awesomium/include/JSValue.h
@@ -2,7 +2,25 @@
This file is a part of Awesomium, a library that makes it easy for
developers to embed web-content in their applications.
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
+ Copyright (C) 2009 Adam J. Simmons
+
+ Project Website:
+ <http://princeofcode.com/awesomium.php>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
*/
#ifndef __JSVALUE_H__
@@ -10,37 +28,37 @@
#include <string>
#include <vector>
-#include <map>
#include "PlatformUtils.h"
-namespace Impl { struct VariantValue; }
+namespace Impl {
-namespace Awesomium
+typedef enum {
+ VariantType_NULL,
+ VariantType_BOOLEAN,
+ VariantType_INTEGER,
+ VariantType_DOUBLE,
+ VariantType_STRING
+} VariantType;
+
+struct VariantValue
{
+ VariantType type;
-class WebView;
+ std::string stringValue;
-class _OSMExport JSIdentifier
-{
-public:
- JSIdentifier(const char* value);
- JSIdentifier(const std::string& value);
- JSIdentifier(const wchar_t* value);
- JSIdentifier(const std::wstring& value);
- JSIdentifier(int value);
- JSIdentifier(const JSIdentifier& original);
- ~JSIdentifier();
- bool operator<(const JSIdentifier& rhs) const;
+ union {
+ bool booleanValue;
+ int integerValue;
+ double doubleValue;
+ } numericValue;
+};
- bool isString() const;
+}
- const std::wstring& getString() const;
- int getInteger() const;
+namespace Awesomium
+{
-protected:
- union { int intValue; std::wstring* strValue; } data;
- bool isStringData;
-};
+class WebView;
/**
* JSValue is a class that represents a Javascript value. It can be initialized from
@@ -48,12 +66,8 @@ class _OSMExport JSIdentifier
*/
class _OSMExport JSValue
{
- Impl::VariantValue* varValue;
+ Impl::VariantValue varValue;
public:
-
- typedef std::map<std::wstring, JSValue> Object;
- typedef std::vector<JSValue> Array;
-
/// Creates a null JSValue.
JSValue();
@@ -66,30 +80,12 @@ class _OSMExport JSValue
/// Creates a JSValue initialized with a double.
JSValue(double value);
- /// Creates a JSValue initialized with an ASCII string.
+ /// Creates a JSValue initialized with a string.
JSValue(const char* value);
- /// Creates a JSValue initialized with an ASCII string.
+ /// Creates a JSValue initialized with a string.
JSValue(const std::string& value);
- /// Creates a JSValue initialized with a wide string.
- JSValue(const wchar_t* value);
-
- /// Creates a JSValue initialized with a wide string.
- JSValue(const std::wstring& value);
-
- /// Creates a JSValue initialized with an object.
- JSValue(const Object& value);
-
- /// Creates a JSValue initialized with an array.
- JSValue(const Array& value);
-
- JSValue(const JSValue& original);
-
- ~JSValue();
-
- JSValue& operator=(const JSValue& rhs);
-
/// Returns whether or not this JSValue is a boolean.
bool isBoolean() const;
@@ -105,17 +101,16 @@ class _OSMExport JSValue
/// Returns whether or not this JSValue is a string.
bool isString() const;
- /// Returns whether or not this JSValue is an array.
- bool isArray() const;
-
- /// Returns whether or not this JSValue is an object.
- bool isObject() const;
-
/// Returns whether or not this JSValue is null.
bool isNull() const;
- /// Returns this JSValue as a wide string (converting if necessary).
- const std::wstring& toString() const;
+ /**
+ * Returns this JSValue as a string (converting if necessary).
+ *
+ * @note If this JSValue is not a string, the returned reference
+ * is only valid until the next call to JSValue::toString.
+ */
+ const std::string& toString() const;
/// Returns this JSValue as an integer (converting if necessary).
int toInteger() const;
@@ -125,18 +120,6 @@ class _OSMExport JSValue
/// Returns this JSValue as a boolean (converting if necessary).
bool toBoolean() const;
-
- /// Gets a reference to this JSValue's array value (will assert if not an array type)
- Array& getArray();
-
- /// Gets a constant reference to this JSValue's array value (will assert if not an array type)
- const Array& getArray() const;
-
- /// Gets a reference to this JSValue's object value (will assert if not an object type)
- Object& getObject();
-
- /// Gets a constant reference to this JSValue's object value (will assert if not an object type)
- const Object& getObject() const;
};
typedef std::vector<JSValue> JSArguments;
View
520 UnityAwesomiumSource/Unity/Awesomium/include/KeyboardCodes.h
@@ -1,520 +0,0 @@
-/*
- This file is a part of Awesomium, a library that makes it easy for
- developers to embed web-content in their applications.
-
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
-*/
-
-#ifndef __KEYBOARDCODES_H__
-#define __KEYBOARDCODES_H__
-
-namespace Awesomium {
-
-namespace KeyCodes {
-
-// AK_BACK (08) BACKSPACE key
-const int AK_BACK = 0x08;
-
-// AK_TAB (09) TAB key
-const int AK_TAB = 0x09;
-
-// AK_CLEAR (0C) CLEAR key
-const int AK_CLEAR = 0x0C;
-
-// AK_RETURN (0D)
-const int AK_RETURN = 0x0D;
-
-// AK_SHIFT (10) SHIFT key
-const int AK_SHIFT = 0x10;
-
-// AK_CONTROL (11) CTRL key
-const int AK_CONTROL = 0x11;
-
-// AK_MENU (12) ALT key
-const int AK_MENU = 0x12;
-
-// AK_PAUSE (13) PAUSE key
-const int AK_PAUSE = 0x13;
-
-// AK_CAPITAL (14) CAPS LOCK key
-const int AK_CAPITAL = 0x14;
-
-// AK_KANA (15) Input Method Editor (IME) Kana mode
-const int AK_KANA = 0x15;
-
-// AK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use AK_HANGUL)
-// AK_HANGUL (15) IME Hangul mode
-const int AK_HANGUL = 0x15;
-
-// AK_JUNJA (17) IME Junja mode
-const int AK_JUNJA = 0x17;
-
-// AK_FINAL (18) IME final mode
-const int AK_FINAL = 0x18;
-
-// AK_HANJA (19) IME Hanja mode
-const int AK_HANJA = 0x19;
-
-// AK_KANJI (19) IME Kanji mode
-const int AK_KANJI = 0x19;
-
-// AK_ESCAPE (1B) ESC key
-const int AK_ESCAPE = 0x1B;
-
-// AK_CONVERT (1C) IME convert
-const int AK_CONVERT = 0x1C;
-
-// AK_NONCONVERT (1D) IME nonconvert
-const int AK_NONCONVERT = 0x1D;
-
-// AK_ACCEPT (1E) IME accept
-const int AK_ACCEPT = 0x1E;
-
-// AK_MODECHANGE (1F) IME mode change request
-const int AK_MODECHANGE = 0x1F;
-
-// AK_SPACE (20) SPACEBAR
-const int AK_SPACE = 0x20;
-
-// AK_PRIOR (21) PAGE UP key
-const int AK_PRIOR = 0x21;
-
-// AK_NEXT (22) PAGE DOWN key
-const int AK_NEXT = 0x22;
-
-// AK_END (23) END key
-const int AK_END = 0x23;
-
-// AK_HOME (24) HOME key
-const int AK_HOME = 0x24;
-
-// AK_LEFT (25) LEFT ARROW key
-const int AK_LEFT = 0x25;
-
-// AK_UP (26) UP ARROW key
-const int AK_UP = 0x26;
-
-// AK_RIGHT (27) RIGHT ARROW key
-const int AK_RIGHT = 0x27;
-
-// AK_DOWN (28) DOWN ARROW key
-const int AK_DOWN = 0x28;
-
-// AK_SELECT (29) SELECT key
-const int AK_SELECT = 0x29;
-
-// AK_PRINT (2A) PRINT key
-const int AK_PRINT = 0x2A;
-
-// AK_EXECUTE (2B) EXECUTE key
-const int AK_EXECUTE = 0x2B;
-
-// AK_SNAPSHOT (2C) PRINT SCREEN key
-const int AK_SNAPSHOT = 0x2C;
-
-// AK_INSERT (2D) INS key
-const int AK_INSERT = 0x2D;
-
-// AK_DELETE (2E) DEL key
-const int AK_DELETE = 0x2E;
-
-// AK_HELP (2F) HELP key
-const int AK_HELP = 0x2F;
-
-// (30) 0 key
-const int AK_0 = 0x30;
-
-// (31) 1 key
-const int AK_1 = 0x31;
-
-// (32) 2 key
-const int AK_2 = 0x32;
-
-// (33) 3 key
-const int AK_3 = 0x33;
-
-// (34) 4 key
-const int AK_4 = 0x34;
-
-// (35) 5 key;
-const int AK_5 = 0x35;
-
-// (36) 6 key
-const int AK_6 = 0x36;
-
-// (37) 7 key
-const int AK_7 = 0x37;
-
-// (38) 8 key
-const int AK_8 = 0x38;
-
-// (39) 9 key
-const int AK_9 = 0x39;
-
-// (41) A key
-const int AK_A = 0x41;
-
-// (42) B key
-const int AK_B = 0x42;
-
-// (43) C key
-const int AK_C = 0x43;
-
-// (44) D key
-const int AK_D = 0x44;
-
-// (45) E key
-const int AK_E = 0x45;
-
-// (46) F key
-const int AK_F = 0x46;
-
-// (47) G key
-const int AK_G = 0x47;
-
-// (48) H key
-const int AK_H = 0x48;
-
-// (49) I key
-const int AK_I = 0x49;
-
-// (4A) J key
-const int AK_J = 0x4A;
-
-// (4B) K key
-const int AK_K = 0x4B;
-
-// (4C) L key
-const int AK_L = 0x4C;
-
-// (4D) M key
-const int AK_M = 0x4D;
-
-// (4E) N key
-const int AK_N = 0x4E;
-
-// (4F) O key
-const int AK_O = 0x4F;
-
-// (50) P key
-const int AK_P = 0x50;
-
-// (51) Q key
-const int AK_Q = 0x51;
-
-// (52) R key
-const int AK_R = 0x52;
-
-// (53) S key
-const int AK_S = 0x53;
-
-// (54) T key
-const int AK_T = 0x54;
-
-// (55) U key
-const int AK_U = 0x55;
-
-// (56) V key
-const int AK_V = 0x56;
-
-// (57) W key
-const int AK_W = 0x57;
-
-// (58) X key
-const int AK_X = 0x58;
-
-// (59) Y key
-const int AK_Y = 0x59;
-
-// (5A) Z key
-const int AK_Z = 0x5A;
-
-// AK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
-const int AK_LWIN = 0x5B;
-
-// AK_RWIN (5C) Right Windows key (Natural keyboard)
-const int AK_RWIN = 0x5C;
-
-// AK_APPS (5D) Applications key (Natural keyboard)
-const int AK_APPS = 0x5D;
-
-// AK_SLEEP (5F) Computer Sleep key
-const int AK_SLEEP = 0x5F;
-
-// AK_NUMPAD0 (60) Numeric keypad 0 key
-const int AK_NUMPAD0 = 0x60;
-
-// AK_NUMPAD1 (61) Numeric keypad 1 key
-const int AK_NUMPAD1 = 0x61;
-
-// AK_NUMPAD2 (62) Numeric keypad 2 key
-const int AK_NUMPAD2 = 0x62;
-
-// AK_NUMPAD3 (63) Numeric keypad 3 key
-const int AK_NUMPAD3 = 0x63;
-
-// AK_NUMPAD4 (64) Numeric keypad 4 key
-const int AK_NUMPAD4 = 0x64;
-
-// AK_NUMPAD5 (65) Numeric keypad 5 key
-const int AK_NUMPAD5 = 0x65;
-
-// AK_NUMPAD6 (66) Numeric keypad 6 key
-const int AK_NUMPAD6 = 0x66;
-
-// AK_NUMPAD7 (67) Numeric keypad 7 key
-const int AK_NUMPAD7 = 0x67;
-
-// AK_NUMPAD8 (68) Numeric keypad 8 key
-const int AK_NUMPAD8 = 0x68;
-
-// AK_NUMPAD9 (69) Numeric keypad 9 key
-const int AK_NUMPAD9 = 0x69;
-
-// AK_MULTIPLY (6A) Multiply key
-const int AK_MULTIPLY = 0x6A;
-
-// AK_ADD (6B) Add key
-const int AK_ADD = 0x6B;
-
-// AK_SEPARATOR (6C) Separator key
-const int AK_SEPARATOR = 0x6C;
-
-// AK_SUBTRACT (6D) Subtract key
-const int AK_SUBTRACT = 0x6D;
-
-// AK_DECIMAL (6E) Decimal key
-const int AK_DECIMAL = 0x6E;
-
-// AK_DIVIDE (6F) Divide key
-const int AK_DIVIDE = 0x6F;
-
-// AK_F1 (70) F1 key
-const int AK_F1 = 0x70;
-
-// AK_F2 (71) F2 key
-const int AK_F2 = 0x71;
-
-// AK_F3 (72) F3 key
-const int AK_F3 = 0x72;
-
-// AK_F4 (73) F4 key
-const int AK_F4 = 0x73;
-
-// AK_F5 (74) F5 key
-const int AK_F5 = 0x74;
-
-// AK_F6 (75) F6 key
-const int AK_F6 = 0x75;
-
-// AK_F7 (76) F7 key
-const int AK_F7 = 0x76;
-
-// AK_F8 (77) F8 key
-const int AK_F8 = 0x77;
-
-// AK_F9 (78) F9 key
-const int AK_F9 = 0x78;
-
-// AK_F10 (79) F10 key
-const int AK_F10 = 0x79;
-
-// AK_F11 (7A) F11 key
-const int AK_F11 = 0x7A;
-
-// AK_F12 (7B) F12 key
-const int AK_F12 = 0x7B;
-
-// AK_F13 (7C) F13 key
-const int AK_F13 = 0x7C;
-
-// AK_F14 (7D) F14 key
-const int AK_F14 = 0x7D;
-
-// AK_F15 (7E) F15 key
-const int AK_F15 = 0x7E;
-
-// AK_F16 (7F) F16 key
-const int AK_F16 = 0x7F;
-
-// AK_F17 (80H) F17 key
-const int AK_F17 = 0x80;
-
-// AK_F18 (81H) F18 key
-const int AK_F18 = 0x81;
-
-// AK_F19 (82H) F19 key
-const int AK_F19 = 0x82;
-
-// AK_F20 (83H) F20 key
-const int AK_F20 = 0x83;
-
-// AK_F21 (84H) F21 key
-const int AK_F21 = 0x84;
-
-// AK_F22 (85H) F22 key
-const int AK_F22 = 0x85;
-
-// AK_F23 (86H) F23 key
-const int AK_F23 = 0x86;
-
-// AK_F24 (87H) F24 key
-const int AK_F24 = 0x87;
-
-// AK_NUMLOCK (90) NUM LOCK key
-const int AK_NUMLOCK = 0x90;
-
-// AK_SCROLL (91) SCROLL LOCK key
-const int AK_SCROLL = 0x91;
-
-// AK_LSHIFT (A0) Left SHIFT key
-const int AK_LSHIFT = 0xA0;
-
-// AK_RSHIFT (A1) Right SHIFT key
-const int AK_RSHIFT = 0xA1;
-
-// AK_LCONTROL (A2) Left CONTROL key
-const int AK_LCONTROL = 0xA2;
-
-// AK_RCONTROL (A3) Right CONTROL key
-const int AK_RCONTROL = 0xA3;
-
-// AK_LMENU (A4) Left MENU key
-const int AK_LMENU = 0xA4;
-
-// AK_RMENU (A5) Right MENU key
-const int AK_RMENU = 0xA5;
-
-// AK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
-const int AK_BROWSER_BACK = 0xA6;
-
-// AK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
-const int AK_BROWSER_FORWARD = 0xA7;
-
-// AK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
-const int AK_BROWSER_REFRESH = 0xA8;
-
-// AK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
-const int AK_BROWSER_STOP = 0xA9;
-
-// AK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
-const int AK_BROWSER_SEARCH = 0xAA;
-
-// AK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
-const int AK_BROWSER_FAVORITES = 0xAB;
-
-// AK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
-const int AK_BROWSER_HOME = 0xAC;
-
-// AK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
-const int AK_VOLUME_MUTE = 0xAD;
-
-// AK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
-const int AK_VOLUME_DOWN = 0xAE;
-
-// AK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
-const int AK_VOLUME_UP = 0xAF;
-
-// AK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
-const int AK_MEDIA_NEXT_TRACK = 0xB0;
-
-// AK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
-const int AK_MEDIA_PREV_TRACK = 0xB1;
-
-// AK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
-const int AK_MEDIA_STOP = 0xB2;
-
-// AK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
-const int AK_MEDIA_PLAY_PAUSE = 0xB3;
-
-// AK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
-const int AK_MEDIA_LAUNCH_MAIL = 0xB4;
-
-// AK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
-const int AK_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5;
-
-// AK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
-const int AK_MEDIA_LAUNCH_APP1 = 0xB6;
-
-// AK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
-const int AK_MEDIA_LAUNCH_APP2 = 0xB7;
-
-// AK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
-const int AK_OEM_1 = 0xBA;
-
-// AK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
-const int AK_OEM_PLUS = 0xBB;
-
-// AK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
-const int AK_OEM_COMMA = 0xBC;
-
-// AK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
-const int AK_OEM_MINUS = 0xBD;
-
-// AK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
-const int AK_OEM_PERIOD = 0xBE;
-
-// AK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
-const int AK_OEM_2 = 0xBF;
-
-// AK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
-const int AK_OEM_3 = 0xC0;
-
-// AK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
-const int AK_OEM_4 = 0xDB;
-
-// AK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
-const int AK_OEM_5 = 0xDC;
-
-// AK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
-const int AK_OEM_6 = 0xDD;
-
-// AK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
-const int AK_OEM_7 = 0xDE;
-
-// AK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
-const int AK_OEM_8 = 0xDF;
-
-// AK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
-const int AK_OEM_102 = 0xE2;
-
-// AK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
-const int AK_PROCESSKEY = 0xE5;
-
-// AK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The AK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
-const int AK_PACKET = 0xE7;
-
-// AK_ATTN (F6) Attn key
-const int AK_ATTN = 0xF6;
-
-// AK_CRSEL (F7) CrSel key
-const int AK_CRSEL = 0xF7;
-
-// AK_EXSEL (F8) ExSel key
-const int AK_EXSEL = 0xF8;
-
-// AK_EREOF (F9) Erase EOF key
-const int AK_EREOF = 0xF9;
-
-// AK_PLAY (FA) Play key
-const int AK_PLAY = 0xFA;
-
-// AK_ZOOM (FB) Zoom key
-const int AK_ZOOM = 0xFB;
-
-// AK_NONAME (FC) Reserved for future use
-const int AK_NONAME = 0xFC;
-
-// AK_PA1 (FD) PA1 key
-const int AK_PA1 = 0xFD;
-
-// AK_OEM_CLEAR (FE) Clear key
-const int AK_OEM_CLEAR = 0xFE;
-
-const int AK_UNKNOWN = 0;
-
-}
-
-}
-
-#endif
View
28 UnityAwesomiumSource/Unity/Awesomium/include/PlatformUtils.h
@@ -2,7 +2,25 @@
This file is a part of Awesomium, a library that makes it easy for
developers to embed web-content in their applications.
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
+ Copyright (C) 2009 Adam J. Simmons
+
+ Project Website:
+ <http://princeofcode.com/awesomium.php>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
*/
#ifndef __PLATFORM_UTILS_H__
@@ -20,14 +38,6 @@
# define _OSMExport
#endif
-namespace Awesomium {
- _OSMExport const std::wstring& convertAsciiStringToWide(const std::string& asciiString);
-
- _OSMExport const std::string& convertWideStringToAscii(const std::wstring& wideString);
-
- _OSMExport const std::wstring& getCurrentWorkingDirectory();
-};
-
namespace Impl {
void initCommandLine();
void initWebCorePlatform();
View
64 UnityAwesomiumSource/Unity/Awesomium/include/WebCore.h
@@ -2,7 +2,25 @@
This file is a part of Awesomium, a library that makes it easy for
developers to embed web-content in their applications.
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
+ Copyright (C) 2009 Adam J. Simmons
+
+ Project Website:
+ <http://princeofcode.com/awesomium.php>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
*/
#ifndef __WEBCORE_H__
@@ -53,30 +71,13 @@ class _OSMExport WebCore
* Instantiates the WebCore singleton (you can access it later with
* WebCore::Get or GetPointer).
*
- * @param cachePath An absolute path to the directory that will be used to store the cache.
- * If an empty string is specified, the cache will not persist between sessions.
- *
- * @param cookiePath An absolute path to the directory that will be used to store cookies.
- * If an empty string is specified, cookies will not persist between sessions.
- *
- * @param pluginPath An absolute path that will be included in the search for plugins. This is useful
- * if you wish to bundle certain plugins with your application.
- *
- * @param logPath The path to store the awesomium.log. If none is specified, the log will be stored in
- * the working directory.
- *
- * @param level The logging level to use (default is LOG_NORMAL).
+ * @param level The logging level to use (default is LOG_NORMAL).
*
- * @param enablePlugins Whether or not to enable embedded plugins. (default is FALSE) Note that the Flash
- * and Silverlight plugins are only fully-supported on the Windows platform at this time.
+ * @param enablePlugins Whether or not to enable embedded plugins.
*
* @param pixelFormat The pixel-format/byte-ordering to use when rendering WebViews.
- *
- * @param userAgentOverride The user agent string that will override the default. Leave empty to use the default user agent.
*/
- WebCore(const std::wstring& cachePath = L"", const std::wstring& cookiePath = L"", const std::wstring& pluginPath = L"",
- const std::wstring& logPath = L"", LogLevel level = LOG_NORMAL, bool enablePlugins = false, PixelFormat pixelFormat = PF_BGRA,
- const std::string& userAgentOverride = "");
+ WebCore(LogLevel level = LOG_NORMAL, bool enablePlugins = true, PixelFormat pixelFormat = PF_BGRA);
/**
* Destroys the WebCore singleton. (Also destroys any lingering WebViews)
@@ -104,20 +105,11 @@ class _OSMExport WebCore
*
* @param baseDirectory The absolute path to your base directory. The base directory is a
* location that holds all of your local assets. It will be used for
- * WebView::loadFile and WebView::loadHTML (to resolve relative URLs).
+ * WebView::loadFile and WebView::loadHTML (to resolve relative URL's).
*/
void setBaseDirectory(const std::string& baseDirectory);
/**
- * Sets the base directory.
- *
- * @param baseDirectory The absolute path to your base directory. The base directory is a
- * location that holds all of your local assets. It will be used for
- * WebView::loadFile and WebView::loadHTML (to resolve relative URLs).
- */
- void setBaseDirectory(const std::wstring& baseDirectory);
-
- /**
* Creates a new WebView.
*
* @param width The width of the WebView in pixels.
@@ -158,7 +150,7 @@ class _OSMExport WebCore
*
* @return Returns the current base directory.
*/
- const std::wstring& getBaseDirectory() const;
+ const std::string& getBaseDirectory() const;
/**
* Retrieves the pixel format being used.
@@ -179,12 +171,6 @@ class _OSMExport WebCore
* call WebCore::pause right before handling the
* message loop in your main thread (usually via
* SDL_PollEvents) and immediately call resume after.
- * Note that this method is not foolproof and is
- * quite experimental. A much better method has since
- * been discovered but to implement it will require
- * a major change to the current architecture of
- * Awesomium. This architecture rehaul will be
- * conducted in an upcoming release.
*/
void pause();
@@ -211,7 +197,7 @@ class _OSMExport WebCore
std::vector<WebView*> views;
std::queue<WebViewEvent*> eventQueue;
std::map<int, std::string> customResponsePageMap;
- std::wstring baseDirectory;
+ std::string baseDirectory;
bool logOpen;
bool pluginsEnabled;
const PixelFormat pixelFormat;
View
145 UnityAwesomiumSource/Unity/Awesomium/include/WebKeyboardEvent.h
@@ -1,145 +0,0 @@
-/*
- This file is a part of Awesomium, a library that makes it easy for
- developers to embed web-content in their applications.
-
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
-*/
-
-#ifndef __WEBKEYBOARDEVENT_H__
-#define __WEBKEYBOARDEVENT_H__
-
-#if defined(__APPLE__)
-#ifdef __OBJC__
-@class NSEvent;
-#else
-class NSEvent;
-#endif
-#endif
-
-namespace Awesomium {
-
-#if defined(__WIN32__) || defined(_WIN32)
-
-#include <windows.h>
-
-typedef wchar_t WebUChar;
-
-#elif defined(__APPLE__)
-
-typedef unsigned short WebUChar;
-
-#endif
-
-/**
-* A generic keyboard event that can be created from a platform-specific event or
-* synthesized from a virtual event. Used by WebView::injectKeyboardEvent.
-*/
-class _OSMExport WebKeyboardEvent
-{
-public:
- /**
- * Creates an empty WebKeyboardEvent, you will need to initialize its members
- * yourself. This is most useful for synthesizing your own keyboard events.
- */
- WebKeyboardEvent();
-
-#if defined(__WIN32__) || defined(_WIN32)
- /**
- * Creates a WebKeyboardEvent directly from a Windows keyboard event message.
- *
- * @note Valid message types include:
- * - WM_KEYDOWN
- * - WM_KEYUP
- * - WM_SYSKEYDOWN
- * - WM_SYSKEYUP
- * - WM_CHAR
- * - WM_IMECHAR
- * - WM_SYSCHAR
- */
- WebKeyboardEvent(UINT msg, WPARAM wparam, LPARAM lparam);
-#elif defined(__APPLE__)
- /**
- * Creates a WebKeyboardEvent directly from a Mac OSX NSEvent.
- */
- WebKeyboardEvent(NSEvent* event);
-#endif
-
- /// An enumeration of the different WebKeyboardEvent types.
- enum Type
- {
- TYPE_KEY_DOWN, /// Key-Down type
- TYPE_KEY_UP, /// Key-Up type
- TYPE_CHAR /// Character input type
- };
-
- /// An enumeration of the different keyboard modifiers.
- enum Modifiers
- {
- MOD_SHIFT_KEY = 1 << 0, /// Whether or not a Shift key is down
- MOD_CONTROL_KEY = 1 << 1, /// Whether or not a Control key is down
- MOD_ALT_KEY = 1 << 2, /// Whether or not an ALT key is down
- MOD_META_KEY = 1 << 3, /// Whether or not a meta key (Command-key on Mac, Windows-key on Windows) is down
- MOD_IS_KEYPAD = 1 << 4, /// Whether or not the key pressed is on the keypad
- MOD_IS_AUTOREPEAT = 1 << 5, /// Whether or not the character input is the result of an auto-repeat timer.
- };
-
- /// The type of this WebKeyboardEvent
- Type type;
-
- /// The current state of the keyboard. Modifiers may be OR'd together to represent multiple values.
- int modifiers;
-
- /**
- * The virtual key-code associated with this keyboard event. This is either directly
- * from the event (ie, WPARAM on Windows) or via a mapping function. You can see a full
- * list of the possible virtual key-codes in KeyboardCodes.h
- */
- int virtualKeyCode;
-
- /**
- * The actual key-code generated by the platform. The DOM specification primarily uses
- * Windows-equivalent codes (hence virtualKeyCode above) but it helps to additionally
- * specify the platform-specific key-code as well.
- */
- int nativeKeyCode;
-
- /**
- * This is a string identifying the key that was pressed. This can be generated from the
- * virtualKeyCode via the getKeyIdentifierFromVirtualKeyCode() utility function. You can
- * find the full list of key identifiers at: http://www.w3.org/TR/DOM-Level-3-Events/keyset.html
- */
- char keyIdentifier[20];
-
- /**
- * The actual text generated by this keyboard event. This is usually only a single character
- * but we're generous and cap it at a max of 4 characters.
- */
- WebUChar text[4];
-
- /**
- * The text generated by this keyboard event before all modifiers except shift are applied.
- * This is used internally for working out shortcut keys. This is usually only a single
- * character but we're generous and cap it at a max of 4 characters.
- */
- WebUChar unmodifiedText[4];
-
- /**
- * Whether or not the pressed key is a "system key". This is a Windows-only concept and
- * should be "false" for all non-Windows platforms. For more information, see the following
- * link: http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx
- */
- bool isSystemKey;
-};
-
-/**
-* Utility function for generating a key identifier string from a virtual key-code.
-*
-* @param virtualKeyCode The virtual key-code to generate the key identifier from.
-*
-* @param keyIdentifierResult The string to store the result in (must be at least 20 chars).
-*/
-void _OSMExport getKeyIdentifierFromVirtualKeyCode(int virtualKeyCode, char** keyIdentifierResult);
-
-}
-
-#endif
View
267 UnityAwesomiumSource/Unity/Awesomium/include/WebView.h
@@ -2,18 +2,38 @@
This file is a part of Awesomium, a library that makes it easy for
developers to embed web-content in their applications.
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
+ Copyright (C) 2009 Adam J. Simmons
+
+ Project Website:
+ <http://princeofcode.com/awesomium.php>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
*/
#ifndef __WEBVIEW_H__
#define __WEBVIEW_H__
#include "WebViewListener.h"
-#include "WebKeyboardEvent.h"
#include <map>
#if defined(_WIN32)
+#include <windows.h>
#pragma warning( disable: 4251 )
+#elif defined(__APPLE__)
+class NSEvent;
#endif
class WebViewWaitState;
@@ -21,7 +41,6 @@ class WebViewProxy;
class JSValueFutureImpl;
class FutureValueCallback;
class CheckKeyboardFocusCallback;
-class WindowOpenCallback;
namespace base { class Thread; }
class LockImpl;
namespace WebViewEvents { class InvokeCallback; }
@@ -41,26 +60,6 @@ enum MouseButton {
};
/**
-* URL Filtering mode enumerations, used by WebView::setURLFilteringMode
-*/
-enum URLFilteringMode {
- /**
- * All resource requests and page navigations are ALLOWED
- * except those that match the URL filters specified.
- */
- UFM_BLACKLIST,
-
- /**
- * All resource requests and page navigations are DENIED
- * except those that match the URL filters specified.
- */
- UFM_WHITELIST,
-
- // No filtering
- UFM_NONE
-};
-
-/**
* A simple rectangle class, used with WebView::render
*/
struct _OSMExport Rect {
@@ -72,11 +71,6 @@ struct _OSMExport Rect {
};
/**
-* A map of string key/values representing an HTTP header.
-*/
-typedef std::map<std::string, std::string> HeaderDefinition;
-
-/**
* A WebView is essentially a single instance of a web-browser (created via the WebCore singleton)
* that you can interact with (via input injection, javascript, etc.) and render to an off-screen buffer.
*/
@@ -96,7 +90,7 @@ class _OSMExport WebView
* Registers a WebViewListener to call upon various events (such as load completions, callbacks, title receptions,
* cursor changes, etc).
*
- * @param listener The WebViewListener to register or NULL to clear any current registrations.
+ * @param listener The WebViewListener to register. Or, you can pass '0' to undo any current registrations.
*/
void setListener(WebViewListener* listener);
@@ -121,43 +115,18 @@ class _OSMExport WebView
void loadURL(const std::string& url, const std::wstring& frameName = L"", const std::string& username = "", const std::string& password = "");
/**
- * Loads a URL into the WebView asynchronously.
- *
- * @param url The URL to load.
- *
- * @param frameName Optional, the name of the frame to load the URL in; leave this blank to load in the main frame.
- *
- * @param username Optional, if the URL requires authentication, the username to authorize as.
- *
- * @param password Optional, if the URL requires authentication, the password to use.
- */
- void loadURL(const std::wstring& url, const std::wstring& frameName = L"", const std::string& username = "", const std::string& password = "");
-
- /**
* Loads a string of HTML into the WebView asynchronously.
*
- * @param html The HTML string (ASCII) to load.
+ * @param html The HTML string to load.
*
* @param frameName Optional, the name of the frame to load the HTML in; leave this blank to load in the main frame.
*
* @note The base directory (specified via WebCore::setBaseDirectory) will be used to resolve
- * relative URLs/resources (such as images, links, etc).
+ * relative URL's/resources (such as images, links, etc).
*/
void loadHTML(const std::string& html, const std::wstring& frameName = L"");
/**
- * Loads a string of HTML into the WebView asynchronously.
- *
- * @param html The HTML string (wide) to load.
- *
- * @param frameName Optional, the name of the frame to load the HTML in; leave this blank to load in the main frame.
- *
- * @note The base directory (specified via WebCore::setBaseDirectory) will be used to resolve
- * relative URLs/resources (such as images, links, etc).
- */
- void loadHTML(const std::wstring& html, const std::wstring& frameName = L"");
-
- /**
* Loads a local file into the WebView asynchronously.
*
* @param file The file to load.
@@ -184,25 +153,16 @@ class _OSMExport WebView
/**
* Executes a string of Javascript in the context of the current page asynchronously.
*
- * @param javascript The ASCII string of Javascript to execute.
+ * @param javascript The string of Javascript to execute.
*
* @param frameName Optional, the name of the frame to execute in; leave this blank to execute in the main frame.
*/
void executeJavascript(const std::string& javascript, const std::wstring& frameName = L"");
/**
- * Executes a string of Javascript in the context of the current page asynchronously.
- *
- * @param javascript The wide string of Javascript to execute.
- *
- * @param frameName Optional, the name of the frame to execute in; leave this blank to execute in the main frame.
- */
- void executeJavascript(const std::wstring& javascript, const std::wstring& frameName = L"");
-
- /**
* Executes a string of Javascript in the context of the current page asynchronously with a result.
*
- * @param javascript The ASCII string of Javascript to execute.
+ * @param javascript The string of Javascript to execute.
*
* @param frameName Optional, the name of the frame to execute in; leave this blank to execute in the main frame.
*
@@ -212,73 +172,34 @@ class _OSMExport WebView
Awesomium::FutureJSValue executeJavascriptWithResult(const std::string& javascript, const std::wstring& frameName = L"");
/**
- * Executes a string of Javascript in the context of the current page asynchronously with a result.
- *
- * @param javascript The wide string of Javascript to execute.
- *
- * @param frameName Optional, the name of the frame to execute in; leave this blank to execute in the main frame.
- *
- * @return Returns a 'FutureJSValue' which is basically an 'IOU' for the future JSValue result.
- * You can obtain the actual result via FutureJSValue::get later.
- */
- Awesomium::FutureJSValue executeJavascriptWithResult(const std::wstring& javascript, const std::wstring& frameName = L"");
-
- /**
- * Call a certain function defined in Javascript directly.
- *
- * @param object The name of the object that contains the function, pass an empty string if the function
- * is defined in the global scope.
- *
- * @param function The name of the function.
- *
- * @param args The arguments to pass to the function.
- *
- * @param frameName Optional, the name of the frame to execute in; leave this blank to execute in the main frame.
- */
- void callJavascriptFunction(const std::wstring& object, const std::wstring& function, const JSArguments& args, const std::wstring& frameName = L"");
-
- /**
- * Creates a new global Javascript object that will persist throughout the lifetime of this WebView. This object is
- * managed directly by Awesomium and so you can modify its properties and bind callback functions via WebView::setObjectProperty
- * and WebView::setObjectCallback, respectively.
- *
- * @param objectName The name of the object.
- */
- void createObject(const std::wstring& objectName);
-
- /**
- * Destroys a Javascript object previously created by WebView::createObject.
- *
- * @param objectName The name of the object to destroy.
- */
- void destroyObject(const std::wstring& objectName);
-
- /**
- * Sets a property of a Javascript object previously created by WebView::createObject.
- *
- * @param objectName The name of the Javascript object.
- *
- * @param propName The name of the property.
+ * Sets a global 'Client' property that can be accessed via Javascript from
+ * within all pages loaded into this web-view.
*
+ * @param name The name of the property.
* @param value The javascript-value of the property.
+ *
+ * @note You can access all properties you set via the 'Client' object using Javascript. For example,
+ * if you set the property with a name of 'color' and a value of 'blue', you could access
+ * this from the page using Javascript: document.write("The color is " + Client.color);
*/
- void setObjectProperty(const std::wstring& objectName, const std::wstring& propName, const JSValue& value);
+ void setProperty(const std::string& name, const JSValue& value);
/**
- * Sets a callback function of a Javascript object previously created by WebView::createObject. This is very useful
- * for passing events from Javascript to C++. To receive notification of the callback, a WebViewListener should
- * be registered (see WebView::setListener and WebViewListener::onCallback).
+ * Registers a global 'Client' callback that can be invoked via Javascript from
+ * within all pages loaded into this view. You will need to register a WebViewListener
+ * (WebView::setListener) to receieve notification of callbacks (WebViewListener::onCallback).
*
- * @param objectName The name of the Javascript object.
+ * @param name The name of the callback. You can invoke the callback in Javascript
+ * as: Client.your_name_here(arg1, arg2, ...);
*
- * @param callbackName The name of the callback function.
+ * @note In the future, it won't be necessary to register the callback name in advance.
*/
- void setObjectCallback(const std::wstring& objectName, const std::wstring& callbackName);
+ void setCallback(const std::string& name);
/**
- * Returns whether or not the WebView is dirty and needs to be re-rendered via WebView::render.
+ * Returns whether or not the current web-view is dirty and needs to be re-rendered.
*
- * @return If the WebView is dirty, returns true, otherwise returns false.
+ * @return If the web-view is dirty, returns true, otherwise returns false.
*/
bool isDirty();
@@ -324,16 +245,33 @@ class _OSMExport WebView
/**
* Injects a mouse-wheel event.
*
- * @param scrollAmount The relative amount of pixels to scroll by.
+ * @param scrollAmount The amount of pixels to scroll by.
*/
void injectMouseWheel(int scrollAmount);
+#if defined(_WIN32)
/**
- * Injects a keyboard event. See WebKeyboardEvent.h for more information.
+ * Injects a keyboard event. [Windows]
*
- * @param keyboardEvent The keyboard event to inject.
+ * @note The native Windows keyboard message should be passed, valid message types include:
+ * - WM_KEYDOWN
+ * - WM_KEYUP
+ * - WM_SYSKEYDOWN
+ * - WM_SYSKEYUP
+ * - WM_CHAR
+ * - WM_IMECHAR
+ * - WM_SYSCHAR
*/
- void injectKeyboardEvent(const WebKeyboardEvent& keyboardEvent);
+ void injectKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
+
+#elif defined(__APPLE__)
+ /**
+ * Injects a keyboard event. [Mac OSX]
+ *
+ * @note The native OSX keyboard event should be passed.
+ */
+ void injectKeyboardEvent(NSEvent* keyboardEvent);
+#endif
/**
* Invokes a 'cut' action using the system clipboard.
@@ -412,79 +350,6 @@ class _OSMExport WebView
*/
void setTransparent(bool isTransparent);
- /**
- * Sets the current URL Filtering Mode (default is UFM_NONE).
- * See URLFilteringMode for more information on the modes.
- *
- * @param mode The URL filtering mode to use.
- */
- void setURLFilteringMode(URLFilteringMode mode);
-
- /**
- * Adds a new URL Filter rule.
- *
- * @param filter A string with optional wildcards that describes a certain URL.
- *
- * @note For example, to match all URLs from the domain "google.com", your filter string
- * might be: http://google.com/*
- *
- * @note You may also use the "local://" scheme prefix to describe the URL to the base
- * directory (set via WebCore::setBaseDirectory).
- */
- void addURLFilter(const std::wstring& filter);
-
- /**
- * Clears all URL Filter rules.
- */
- void clearAllURLFilters();
-
- /**
- * Defines a new Header Definition or updates it if it already exists.
- *
- * @param name The unique name of the Header Definition; this is used to refer to it later
- * in WebView::addHeaderRewriteRule and WebView::removeHeaderRewriteRulesByDefinitionName.
- *
- * @param definition The header definition, a map of key/values representing an HTTP header.
- */
- void setHeaderDefinition(const std::string& name, const Awesomium::HeaderDefinition& definition);
-
- /**
- * Adds a new a header re-write rule. All requests whose URL matches the specified rule will have its
- * HTTP headers re-written with the specified header definition before sending it to the server.
- *
- * @param rule A wide string with optional wildcards (*, ?) that matches the URL(s) that will
- * have its headers re-written with the specified header definition.
- *
- * @param name The name of the header definition (specified in WebView::setHeaderDefinition).
- *
- * @note The case where a URL is matched by multiple rules is unsupported, only the first match will be used.
- */
- void addHeaderRewriteRule(const std::wstring& rule, const std::string& name);
-
- /**
- * Removes a header re-write rule from this WebView.
- *
- * @param rule The rule to remove (should match the string specified in WebView::addHeaderRewriteRule exactly).
- */
- void removeHeaderRewriteRule(const std::wstring& rule);
-
- /**
- * Removes all header re-write rules that are using a certain header definition.
- *
- * @param name The name of the header definition (specified in WebView::setHeaderDefinition). If you
- * specify an empty string, this will remove ALL header re-write rules.
- */
- void removeHeaderRewriteRulesByDefinitionName(const std::string& name);
-
- /**
- * Sets whether or not external links (links that normally would open in a new window) should
- * be automatically be opened in the same frame. The default behavior is enabled. You can handle
- * external links yourself via WebViewListener::onOpenExternalLink.
- *
- * @param isEnabled Whether or not external links will be automatically opened in the calling frame.
- */
- void setOpensExternalLinksInCallingFrame(bool isEnabled);
-
protected:
WebView(int width, int height, bool isTransparent, bool enableAsyncRendering, int maxAsyncRenderPerSec, base::Thread* coreThread);
~WebView();
@@ -501,7 +366,6 @@ class _OSMExport WebView
void handleFutureJSValueCallback(const Awesomium::JSArguments& args);
void nullifyFutureJSValueCallbacks();
void handleCheckKeyboardFocus(bool isFocused);
- void openExternalLink(const std::string& url, const std::wstring& source);
base::Thread* coreThread;
WebViewProxy* viewProxy;
@@ -518,7 +382,6 @@ class _OSMExport WebView
friend class ::WebViewProxy;
friend class ::FutureValueCallback;
friend class ::CheckKeyboardFocusCallback;
- friend class ::WindowOpenCallback;
};
}
View
80 UnityAwesomiumSource/Unity/Awesomium/include/WebViewListener.h
@@ -2,7 +2,25 @@
This file is a part of Awesomium, a library that makes it easy for
developers to embed web-content in their applications.
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
+ Copyright (C) 2009 Adam J. Simmons
+
+ Project Website:
+ <http://princeofcode.com/awesomium.php>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
*/
#ifndef __WEBVIEWLISTENER_H__
@@ -17,8 +35,6 @@
namespace Awesomium {
-class WebView;
-
/**
* WebViewListener is a virtual interface that you can use to receive notifications
* from a certain WebView. Simply make a class that inherits from WebViewListener
@@ -30,19 +46,15 @@ class _OSMExport WebViewListener
/**
* This event is fired when a WebView begins navigating to a new URL.
*
- * @param caller The WebView that fired the event.
- *
* @param url The URL that is being navigated to.
*
* @param frameName The name of the frame that this event originated from.
*/
- virtual void onBeginNavigation(Awesomium::WebView* caller, const std::string& url, const std::wstring& frameName) = 0;
+ virtual void onBeginNavigation(const std::string& url, const std::wstring& frameName) = 0;
/**
* This event is fired when a WebView begins to actually receive data from a server.
*
- * @param caller The WebView that fired the event.
- *
* @param url The URL of the frame that is being loaded.
*
* @param frameName The name of the frame that this event originated from.
@@ -51,95 +63,61 @@ class _OSMExport WebViewListener
*
* @param mimeType The mime-type of the content that is being loaded.
*/
- virtual void onBeginLoading(Awesomium::WebView* caller, const std::string& url, const std::wstring& frameName, int statusCode, const std::wstring& mimeType) = 0;
+ virtual void onBeginLoading(const std::string& url, const std::wstring& frameName, int statusCode, const std::wstring& mimeType) = 0;
/**
* This event is fired when all loads have finished for a WebView.
- *
- * @param caller The WebView that fired the event.
*/
- virtual void onFinishLoading(Awesomium::WebView* caller) = 0;
+ virtual void onFinishLoading() = 0;
/**
* This event is fired when a Client callback has been invoked via Javascript from a page.
*
- * @param caller The WebView that fired the event.
- *
- * @param objectName The name of the Javascript Object that contains the invoked callback.
- *
- * @param callbackName The name of the callback that was invoked (must have been previously bound via WebView::setObjectCallback).
+ * @param name The name of the client callback that was invoked (specifically, "Client._this_name_here_(...)").
*
* @param args The arguments passed to the callback.
*/
- virtual void onCallback(Awesomium::WebView* caller, const std::wstring& objectName, const std::wstring& callbackName, const Awesomium::JSArguments& args) = 0;
+ virtual void onCallback(const std::string& name, const Awesomium::JSArguments& args) = 0;
/**
* This event is fired when a page title is received.
*
- * @param caller The WebView that fired the event.
- *
* @param title The page title.
*
* @param frameName The name of the frame that this event originated from.
*/
- virtual void onReceiveTitle(Awesomium::WebView* caller, const std::wstring& title, const std::wstring& frameName) = 0;
+ virtual void onReceiveTitle(const std::wstring& title, const std::wstring& frameName) = 0;
/**
* This event is fired when a tooltip has changed state.
*
- * @param caller The WebView that fired the event.
- *
* @param tooltip The tooltip text (or, is an empty string when the tooltip should disappear).
*/
- virtual void onChangeTooltip(Awesomium::WebView* caller, const std::wstring& tooltip) = 0;
+ virtual void onChangeTooltip(const std::wstring& tooltip) = 0;
#if defined(_WIN32)
/**
* This event is fired when a cursor has changed state. [Windows-only]
*
- * @param caller The WebView that fired the event.
- *
* @param cursor The cursor handle/type.
*/
- virtual void onChangeCursor(Awesomium::WebView* caller, const HCURSOR& cursor) = 0;
+ virtual void onChangeCursor(const HCURSOR& cursor) = 0;
#endif
/**
* This event is fired when keyboard focus has changed.
*
- * @param caller The WebView that fired the event.
- *
* @param isFocused Whether or not the keyboard is currently focused.
*/
- virtual void onChangeKeyboardFocus(Awesomium::WebView* caller, bool isFocused) = 0;
+ virtual void onChangeKeyboardFocus(bool isFocused) = 0;
/**
* This event is fired when the target URL has changed. This is usually the result of
* hovering over a link on the page.
*
- * @param caller The WebView that fired the event.
- *
* @param url The updated target URL (or empty if the target URL is cleared).
*/
- virtual void onChangeTargetURL(Awesomium::WebView* caller, const std::string& url) = 0;
-
- /**
- * This event is fired when an external link is attempted to be opened. An external link
- * is any link that normally opens in a new window in a standard browser (for example, links
- * with target="_blank", calls to window.open(url), and URL open events from Flash plugins).
- * External links may or may not be automatically opened by a WebView (please see
- * WebView::setOpensExternalLinksInCallingFrame).
- *
- * @param caller The WebView that fired the event.
- *
- * @param url The URL of the external link.
- *
- * @param source If the external link originated from a call to window.open(), this value
- * is "window.open". Else, if the link originated from a Flash plugin, this
- * value is "flash". Otherwise, this value is the name of the frame that
- * contains the link.
- */
- virtual void onOpenExternalLink(Awesomium::WebView* caller, const std::string& url, const std::wstring& source) = 0;
+ virtual void onChangeTargetURL(const std::string& url) = 0;
};
}
View
BIN  UnityAwesomiumSource/Unity/Awesomium/lib/Awesomium.lib
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/Awesomium/lib/Awesomium_d.lib
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
27 UnityAwesomiumSource/Unity/Unity/AwesomiumPlugin.cpp
@@ -11,7 +11,7 @@
static Awesomium::WebCore* webCore;
-class AwesomiumWindow : public Awesomium::WebViewListener
+class AwesomiumWindow //: public Awesomium::WebViewListener
{
public:
typedef void (*SetPixelsFunc)(/*int left, int top, int width, int height*/);
@@ -37,14 +37,14 @@ class AwesomiumWindow : public Awesomium::WebViewListener
// hookup callbacks
setPaintFunctions(setPixelFunc,applyTextureFunc);
m_webView = webCore->createWebView(m_width,m_height);
- m_webView->setListener(this);
+ //m_webView->setListener(this);
m_webView->loadURL("http://google.dk");//url);
}
AwesomiumWindow::~AwesomiumWindow(){
//free(pixelBuffer);
- m_webView->destroy();
+ m_webView->destroy();
isEnabled = false;
}
@@ -188,16 +188,16 @@ extern "C" __declspec(dllexport) bool isDirtyBuffer(int uniqueId){
**/
extern "C" __declspec(dllexport) void Init(){
-
- webCore = new Awesomium::WebCore(
+ webCore = new Awesomium::WebCore(Awesomium::LOG_VERBOSE,true, Awesomium::PF_RGBA);
+ /*webCore = new Awesomium::WebCore(
L"",
L"",
L"",
L"",
- Awesomium::LOG_VERBOSE,
+ Awesomium::LOG_VERBOSE,
true,
Awesomium::PF_RGBA,
- "");
+ ""); */
}
@@ -269,12 +269,13 @@ PLUGIN_API void LoadFile(int uniqueId, char* url){
/**
* Keyboard wrapping
**/
-PLUGIN_API void InjectKeyboard(int uniqueId, int msg, int wParam, long lParam){
- AwesomiumWindow* pWindow = getWindow(uniqueId);
- if (pWindow)
- pWindow->m_webView->injectKeyboardEvent(Awesomium::WebKeyboardEvent(msg,wParam,lParam));
-
-}
+//PLUGIN_API void InjectKeyboard(int uniqueId, int msg, int wParam, long lParam){
+// AwesomiumWindow* pWindow = getWindow(uniqueId);
+// if (pWindow)
+// pWindow->m_webView->get
+// pWindow->m_webView->injectKeyboardEvent(msg,wParam,lParam);
+//
+//}
/**
* wrap mouse functions function
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:29:29,63 on 11-11-2010
+Manifest resource last updated at 13:23:38,09 on 12-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
64 UnityAwesomiumSource/Unity/Unity/WebCore.h
@@ -2,7 +2,25 @@
This file is a part of Awesomium, a library that makes it easy for
developers to embed web-content in their applications.
- Copyright (C) 2009 Khrona. All rights reserved. Awesomium is a trademark of Khrona.
+ Copyright (C) 2009 Adam J. Simmons
+
+ Project Website:
+ <http://princeofcode.com/awesomium.php>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
*/
#ifndef __WEBCORE_H__
@@ -53,30 +71,13 @@ class _OSMExport WebCore
* Instantiates the WebCore singleton (you can access it later with
* WebCore::Get or GetPointer).
*
- * @param cachePath An absolute path to the directory that will be used to store the cache.
- * If an empty string is specified, the cache will not persist between sessions.
- *
- * @param cookiePath An absolute path to the directory that will be used to store cookies.
- * If an empty string is specified, cookies will not persist between sessions.
- *
- * @param pluginPath An absolute path that will be included in the search for plugins. This is useful
- * if you wish to bundle certain plugins with your application.
- *
- * @param logPath The path to store the awesomium.log. If none is specified, the log will be stored in
- * the working directory.
- *
- * @param level The logging level to use (default is LOG_NORMAL).
+ * @param level The logging level to use (default is LOG_NORMAL).
*
- * @param enablePlugins Whether or not to enable embedded plugins. (default is FALSE) Note that the Flash
- * and Silverlight plugins are only fully-supported on the Windows platform at this time.
+ * @param enablePlugins Whether or not to enable embedded plugins.
*
* @param pixelFormat The pixel-format/byte-ordering to use when rendering WebViews.
- *
- * @param userAgentOverride The user agent string that will override the default. Leave empty to use the default user agent.
*/
- WebCore(const std::wstring& cachePath = L"", const std::wstring& cookiePath = L"", const std::wstring& pluginPath = L"",
- const std::wstring& logPath = L"", LogLevel level = LOG_NORMAL, bool enablePlugins = false, PixelFormat pixelFormat = PF_BGRA,
- const std::string& userAgentOverride = "");
+ WebCore(LogLevel level = LOG_NORMAL, bool enablePlugins = true, PixelFormat pixelFormat = PF_BGRA);
/**
* Destroys the WebCore singleton. (Also destroys any lingering WebViews)
@@ -104,20 +105,11 @@ class _OSMExport WebCore
*
* @param baseDirectory The absolute path to your base directory. The base directory is a
* location that holds all of your local assets. It will be used for
- * WebView::loadFile and WebView::loadHTML (to resolve relative URLs).
+ * WebView::loadFile and WebView::loadHTML (to resolve relative URL's).
*/
void setBaseDirectory(const std::string& baseDirectory);
/**
- * Sets the base directory.
- *
- * @param baseDirectory The absolute path to your base directory. The base directory is a
- * location that holds all of your local assets. It will be used for
- * WebView::loadFile and WebView::loadHTML (to resolve relative URLs).
- */
- void setBaseDirectory(const std::wstring& baseDirectory);
-
- /**
* Creates a new WebView.
*
* @param width The width of the WebView in pixels.
@@ -158,7 +150,7 @@ class _OSMExport WebCore
*
* @return Returns the current base directory.
*/
- const std::wstring& getBaseDirectory() const;
+ const std::string& getBaseDirectory() const;
/**
* Retrieves the pixel format being used.
@@ -179,12 +171,6 @@ class _OSMExport WebCore
* call WebCore::pause right before handling the
* message loop in your main thread (usually via
* SDL_PollEvents) and immediately call resume after.
- * Note that this method is not foolproof and is
- * quite experimental. A much better method has since
- * been discovered but to implement it will require
- * a major change to the current architecture of
- * Awesomium. This architecture rehaul will be
- * conducted in an upcoming release.
*/
void pause();
@@ -211,7 +197,7 @@ class _OSMExport WebCore
std::vector<WebView*> views;
std::queue<WebViewEvent*> eventQueue;
std::map<int, std::string> customResponsePageMap;
- std::wstring baseDirectory;
+ std::string baseDirectory;
bool logOpen;
bool pluginsEnabled;
const PixelFormat pixelFormat;
View
BIN  UnityAwesomiumSource/Unity/UnityAwesomium.ncb
Binary file not shown
View
BIN  UnityAwesomiumSource/Unity/UnityAwesomium.suo
Binary file not shown
View
BIN  build/Awesomium.dll
Binary file not shown
View
158 build/awesomium.log
@@ -1,63 +1,95 @@
-[1111/232648:INFO:WebCore.cpp(74)] Creating the core thread.
-[1111/232648:INFO:WebCore.cpp(84)] Creating the WebCore.
-[1111/232648:INFO:WebCoreProxy.cpp(45)] ICU successfully initialized.
-[1111/232648:INFO:RequestContext.cpp(68)] An invalid or empty cookie path was specified, cookies will be lost on program exit.
-[1111/232648:INFO:RequestContext.cpp(111)] An invalid or empty cache path was specified, cache will be lost on program exit.
-[1111/232648:INFO:WebCoreProxy.cpp(202)] The WebCore is now online.
-[1111/232648:INFO:WebView.cpp(68)] A new WebView has been created.
-[1111/232648:INFO:WebViewProxy.cpp(150)] WebViewProxy[0] has been created.
-[1111/232648:INFO:proxy_service.cc(619)] New proxy configuration was loaded:
-{
- auto_detect: 0
- pac_url:
- proxy_rules:
- {
- type: TYPE_NO_RULES
- single_proxy:
- proxy_for_http:
- proxy_for_https:
- proxy_for_ftp:
- }
- proxy_bypass_local_names: 0
- proxy_bypass_list:
- id: 1
-}
-[1111/232658:INFO:plugin_lib.cc(97)] PluginLib::NP_Initialize(C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll): initialized=0
-[1111/232658:INFO:plugin_