rhodes 3.3.1 → 3.3.2.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -2
- data/Manifest.txt +20 -0
- data/Rakefile +2 -1
- data/doc/build.txt +9 -3
- data/doc/configuration.txt +5 -1
- data/doc/device-caps.txt +112 -27
- data/doc/extensions.txt +0 -51
- data/doc/generator.txt +6 -0
- data/doc/rhom.txt +3 -0
- data/doc/simulator.txt +57 -17
- data/doc/ui.txt +24 -27
- data/installer/RHOELEMENTS-EULA.txt +295 -0
- data/installer/Rakefile +75 -49
- data/installer/rhostudio-moto.nsi +534 -0
- data/installer/rhostudio.nsi +13 -4
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +3 -0
- data/lib/framework/rho/rhoapplication.rb +4 -0
- data/lib/framework/rho/rhoevent.rb +2 -3
- data/lib/framework/rho/rhoevent_c.rb +2 -2
- data/lib/framework/rho/rhofsconnector.rb +24 -2
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +3 -3
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +164 -90
- data/platform/android/Rhodes/jni/src/signature.cpp +13 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +76 -34
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +3 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +10 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +0 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Callout.java +6 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +0 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +7 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +46 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +29 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +2 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +4 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +10 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +3 -2
- data/platform/android/build/android.rake +6 -27
- data/platform/android/build/androidcommon.rb +1 -1
- data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +26 -0
- data/platform/iphone/Classes/AppManager/AppManager.h +1 -0
- data/platform/iphone/Classes/AppManager/AppManager.m +70 -12
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +1 -1
- data/platform/iphone/Classes/Event/Event.m +38 -3
- data/platform/iphone/Classes/Rhodes.m +3 -2
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +1 -1
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/rbuild/iphone.rake +8 -8
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulatorMac.zip +0 -0
- data/platform/osx/build/osx.rake +1 -1
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
- data/platform/shared/common/RhoConf.cpp +15 -6
- data/platform/shared/common/RhoConf.h +6 -1
- data/platform/shared/common/RhodesApp.cpp +19 -6
- data/platform/shared/common/RhodesApp.h +4 -2
- data/platform/shared/common/RhodesAppBase.cpp +18 -10
- data/platform/shared/common/RhodesAppBase.h +6 -3
- data/platform/shared/common/map/GeocodingMapEngine.h +2 -2
- data/platform/shared/logging/RhoLogConf.cpp +14 -8
- data/platform/shared/logging/RhoLogConf.h +1 -0
- data/platform/shared/net/HttpServer.cpp +15 -3
- data/platform/shared/net/HttpServer.h +2 -1
- data/platform/shared/qt/curl/curl.pro +1 -1
- data/platform/shared/qt/rhodes/QtMainWindow.h +1 -1
- data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +2 -2
- data/platform/shared/qt/rhodes/main.cpp +2 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +1 -0
- data/platform/shared/ruby/ext/rho/rhosupport.c +11 -1
- data/platform/shared/sync/SyncNotify.cpp +1 -2
- data/platform/shared/sync/SyncNotify.h +2 -2
- data/platform/shared/sync/SyncThread.cpp +27 -12
- data/platform/shared/sync/SyncThread.h +2 -0
- data/platform/shared/unzip/unzip.cpp +3 -2
- data/platform/win32/RhoSimulator/Microsoft.VC80.CRT.manifest +8 -0
- data/platform/win32/RhoSimulator/Microsoft.VC80.OpenMP.manifest +7 -0
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
- data/platform/win32/RhoSimulator/libeay32.dll +0 -0
- data/platform/win32/RhoSimulator/msvcm80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr80.dll +0 -0
- data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp.dll +0 -0
- data/platform/wm/build/rhodes.nsi +316 -0
- data/platform/wm/build/wm.rake +57 -10
- data/platform/wm/rhodes/Rhodes.cpp +2 -1
- data/platform/wm/rhodes/rhodes.vcproj +2 -0
- data/platform/wm/tools/wmdc_connect.sln +20 -0
- data/platform/wm/tools/wmdc_connect/stdafx.cpp +27 -0
- data/platform/wm/tools/wmdc_connect/stdafx.h +35 -0
- data/platform/wm/tools/wmdc_connect/wmdc_connect.cpp +119 -0
- data/platform/wm/tools/wmdc_connect/wmdc_connect.vcproj +205 -0
- data/platform/wp7/RhoRubyExtGen/RhoAlert.cs +73 -0
- data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +1 -0
- data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +8 -8
- data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +47 -6
- data/platform/wp7/RhoRubyLib/RhoRuby.cs +8 -0
- data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +5 -0
- data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +5 -0
- data/platform/wp7/RhoRubyLib/common/RhoParams.cs +2 -1
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +58 -37
- data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +37 -0
- data/platform/wp7/RhoRubyLib/db/DBAttrManager.cs +63 -1
- data/platform/wp7/RhoRubyLib/db/IDBStorage.cs +2 -0
- data/platform/wp7/RhoRubyLib/db/SqliteStorage.cs +27 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +2 -2
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +4 -3
- data/platform/wp7/RhoRubyLib/rubyext/RhoAlert.cs +160 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +44 -12
- data/platform/wp7/RhoRubyLib/sync/ClientRegister.cs +4 -3
- data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +27 -32
- data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +31 -11
- data/platform/wp7/RhoRubyLib/sync/SyncProtocol_3.cs +6 -1
- data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +4 -0
- data/platform/wp7/RhoRubyLib/sync/SyncThread.cs +21 -15
- data/platform/wp7/build/wp.rake +6 -0
- data/rakefile.rb +2 -1
- data/res/build-tools/Coding4Fun.Phone.Controls.dll +0 -0
- data/res/build-tools/wmdc_connect.exe +0 -0
- data/res/generators/templates/spec/app/SpecRunner/index.erb +14 -13
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +10 -1
- data/version +1 -1
- metadata +26 -4
@@ -0,0 +1,73 @@
|
|
1
|
+
/*------------------------------------------------------------------------
|
2
|
+
* (The MIT License)
|
3
|
+
*
|
4
|
+
* Copyright (c) 2008-2011 Rhomobile, Inc.
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*
|
24
|
+
* http://rhomobile.com
|
25
|
+
*------------------------------------------------------------------------*/
|
26
|
+
|
27
|
+
using Microsoft.Scripting.Utils;
|
28
|
+
using Microsoft.Scripting.Runtime;
|
29
|
+
using IronRuby.Runtime;
|
30
|
+
using IronRuby.Builtins;
|
31
|
+
using System;
|
32
|
+
using System.Runtime.InteropServices;
|
33
|
+
|
34
|
+
namespace rho.rubyext
|
35
|
+
{
|
36
|
+
[RubyModule("Alert")]
|
37
|
+
public static class RhoAlert
|
38
|
+
{
|
39
|
+
#region Private Implementation Details
|
40
|
+
|
41
|
+
#endregion
|
42
|
+
|
43
|
+
#region Private Instance & Singleton Methods
|
44
|
+
|
45
|
+
[RubyMethodAttribute("show_popup", RubyMethodAttributes.PublicSingleton)]
|
46
|
+
public static void ShowPopup(RubyModule/*!*/ self, Hash args)
|
47
|
+
{
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
[RubyMethodAttribute("hide_popup", RubyMethodAttributes.PublicSingleton)]
|
52
|
+
public static void HidePopup(RubyModule/*!*/ self)
|
53
|
+
{
|
54
|
+
}
|
55
|
+
|
56
|
+
[RubyMethodAttribute("vibrate", RubyMethodAttributes.PublicSingleton)]
|
57
|
+
public static void Vibrate(RubyModule/*!*/ self, int duration)
|
58
|
+
{
|
59
|
+
}
|
60
|
+
|
61
|
+
[RubyMethodAttribute("play_file", RubyMethodAttributes.PublicSingleton)]
|
62
|
+
public static void PlayFile(RubyModule/*!*/ self, [NotNull]String/*!*/ fileName, [NotNull]String/*!*/ mediaType)
|
63
|
+
{
|
64
|
+
}
|
65
|
+
|
66
|
+
[RubyMethodAttribute("show_status", RubyMethodAttributes.PublicSingleton)]
|
67
|
+
public static void ShowStatus(RubyModule/*!*/ self, [NotNull]String/*!*/ title, [NotNull]String/*!*/ text, String/*!*/ hideLabel)
|
68
|
+
{
|
69
|
+
}
|
70
|
+
|
71
|
+
#endregion
|
72
|
+
}
|
73
|
+
}
|
@@ -37,28 +37,28 @@ namespace rho.rubyext
|
|
37
37
|
public static class RhoSyncEngine
|
38
38
|
{
|
39
39
|
[RubyMethod("dosync", RubyMethodAttributes.PublicSingleton)]
|
40
|
-
public static object dosync(RubyModule/*!*/ self)
|
40
|
+
public static object dosync(RubyModule/*!*/ self, RubyArray args)
|
41
41
|
{
|
42
42
|
return null;
|
43
43
|
}
|
44
44
|
|
45
|
-
[RubyMethod("dosync", RubyMethodAttributes.PublicSingleton)]
|
46
|
-
public static object dosync(RubyModule
|
45
|
+
/*[RubyMethod("dosync", RubyMethodAttributes.PublicSingleton)]
|
46
|
+
public static object dosync(RubyModule self, bool show_status_popup)
|
47
47
|
{
|
48
48
|
return null;
|
49
|
-
}
|
49
|
+
}*/
|
50
50
|
|
51
51
|
[RubyMethod("dosync_source", RubyMethodAttributes.PublicSingleton)]
|
52
|
-
public static object dosync_source(RubyModule/*!*/ self,
|
52
|
+
public static object dosync_source(RubyModule/*!*/ self, RubyArray args)
|
53
53
|
{
|
54
54
|
return null;
|
55
55
|
}
|
56
56
|
|
57
|
-
[RubyMethod("dosync_source", RubyMethodAttributes.PublicSingleton)]
|
58
|
-
public static object dosync_source(RubyModule
|
57
|
+
/*[RubyMethod("dosync_source", RubyMethodAttributes.PublicSingleton)]
|
58
|
+
public static object dosync_source(RubyModule self, [NotNull]object srcID, bool show_status_popup)
|
59
59
|
{
|
60
60
|
return null;
|
61
|
-
}
|
61
|
+
}*/
|
62
62
|
|
63
63
|
[RubyMethod("dosearch", RubyMethodAttributes.PublicSingleton)]
|
64
64
|
public static object dosearch(RubyModule/*!*/ self, [NotNull]RubyArray/*!*/ arSources, [NotNull]String/*!*/ from, [NotNull]String/*!*/ strParams,
|
@@ -26,6 +26,8 @@ namespace rho.rubyext {
|
|
26
26
|
IronRuby.Builtins.RubyClass classRef0 = GetClass(typeof(System.Object));
|
27
27
|
|
28
28
|
|
29
|
+
DefineGlobalModule("Alert", typeof(rho.rubyext.RhoAlert), 0x00000008, null, LoadAlert_Class, null, IronRuby.Builtins.RubyModule.EmptyArray);
|
30
|
+
DefineGlobalModule("Camera", typeof(rho.rubyext.RhoCamera), 0x00000008, null, LoadCamera_Class, null, IronRuby.Builtins.RubyModule.EmptyArray);
|
29
31
|
DefineGlobalModule("NativeBar", typeof(rho.rubyext.RhoNativeBar), 0x00000008, null, LoadNativeBar_Class, null, IronRuby.Builtins.RubyModule.EmptyArray);
|
30
32
|
IronRuby.Builtins.RubyModule def3 = DefineGlobalModule("Rho", typeof(rho.rubyext.RhoRoot), 0x00000008, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray);
|
31
33
|
IronRuby.Builtins.RubyModule def1 = DefineGlobalModule("Rho", typeof(rho.rubyext.Rho), 0x00000008, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray);
|
@@ -44,6 +46,47 @@ namespace rho.rubyext {
|
|
44
46
|
SetConstant(def5, "Database", def6);
|
45
47
|
}
|
46
48
|
|
49
|
+
private static void LoadAlert_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
|
50
|
+
DefineLibraryMethod(module, "hide_popup", 0x21,
|
51
|
+
0x00000000U,
|
52
|
+
new Action<IronRuby.Builtins.RubyModule>(rho.rubyext.RhoAlert.HidePopup)
|
53
|
+
);
|
54
|
+
|
55
|
+
DefineLibraryMethod(module, "play_file", 0x21,
|
56
|
+
0x00000006U,
|
57
|
+
new Action<IronRuby.Builtins.RubyModule, System.String, System.String>(rho.rubyext.RhoAlert.PlayFile)
|
58
|
+
);
|
59
|
+
|
60
|
+
DefineLibraryMethod(module, "show_popup", 0x21,
|
61
|
+
0x00000000U,
|
62
|
+
new Action<IronRuby.Builtins.RubyModule, IronRuby.Builtins.Hash>(rho.rubyext.RhoAlert.ShowPopup)
|
63
|
+
);
|
64
|
+
|
65
|
+
DefineLibraryMethod(module, "show_status", 0x21,
|
66
|
+
0x00000006U,
|
67
|
+
new Action<IronRuby.Builtins.RubyModule, System.String, System.String, System.String>(rho.rubyext.RhoAlert.ShowStatus)
|
68
|
+
);
|
69
|
+
|
70
|
+
DefineLibraryMethod(module, "vibrate", 0x21,
|
71
|
+
0x00000000U,
|
72
|
+
new Action<IronRuby.Builtins.RubyModule, System.Int32>(rho.rubyext.RhoAlert.Vibrate)
|
73
|
+
);
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
private static void LoadCamera_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
|
78
|
+
DefineLibraryMethod(module, "choose_picture", 0x21,
|
79
|
+
0x00000002U,
|
80
|
+
new Action<IronRuby.Builtins.RubyModule, System.String>(rho.rubyext.RhoCamera.choosePicture)
|
81
|
+
);
|
82
|
+
|
83
|
+
DefineLibraryMethod(module, "take_picture", 0x21,
|
84
|
+
0x00000002U,
|
85
|
+
new Action<IronRuby.Builtins.RubyModule, System.String>(rho.rubyext.RhoCamera.takePicture)
|
86
|
+
);
|
87
|
+
|
88
|
+
}
|
89
|
+
|
47
90
|
private static void LoadNativeBar_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
|
48
91
|
DefineLibraryMethod(module, "create", 0x21,
|
49
92
|
0x00000000U,
|
@@ -242,15 +285,13 @@ namespace rho.rubyext {
|
|
242
285
|
);
|
243
286
|
|
244
287
|
DefineLibraryMethod(module, "dosync", 0x21,
|
245
|
-
0x00000000U,
|
246
|
-
new Func<IronRuby.Builtins.RubyModule, System.Object>(rho.rubyext.RhoSyncEngine.dosync)
|
247
|
-
new Func<IronRuby.Builtins.RubyModule, System.Boolean, System.Object>(rho.rubyext.RhoSyncEngine.dosync)
|
288
|
+
0x00000000U,
|
289
|
+
new Func<IronRuby.Builtins.RubyModule, IronRuby.Builtins.RubyArray, System.Object>(rho.rubyext.RhoSyncEngine.dosync)
|
248
290
|
);
|
249
291
|
|
250
292
|
DefineLibraryMethod(module, "dosync_source", 0x21,
|
251
|
-
|
252
|
-
new Func<IronRuby.Builtins.RubyModule,
|
253
|
-
new Func<IronRuby.Builtins.RubyModule, System.Object, System.Boolean, System.Object>(rho.rubyext.RhoSyncEngine.dosync_source)
|
293
|
+
0x00000000U,
|
294
|
+
new Func<IronRuby.Builtins.RubyModule, IronRuby.Builtins.RubyArray, System.Object>(rho.rubyext.RhoSyncEngine.dosync_source)
|
254
295
|
);
|
255
296
|
|
256
297
|
DefineLibraryMethod(module, "enable_status_popup", 0x21,
|
@@ -392,6 +392,14 @@ namespace rho
|
|
392
392
|
return MutableString.Create(str);
|
393
393
|
}
|
394
394
|
|
395
|
+
public static object CreateSymbol(String name)
|
396
|
+
{
|
397
|
+
if (m_instance != null && m_instance.rubyContext != null)
|
398
|
+
return (object)m_instance.rubyContext.CreateSymbol(name, RubyEncoding.UTF8);
|
399
|
+
|
400
|
+
return (object)name;
|
401
|
+
}
|
402
|
+
|
395
403
|
public static Hashtable<String, String> enum_strhash(Object valHash)
|
396
404
|
{
|
397
405
|
Hashtable<String, String> hash = new Hashtable<String, String>();
|
@@ -45,6 +45,9 @@
|
|
45
45
|
<WarningLevel>4</WarningLevel>
|
46
46
|
</PropertyGroup>
|
47
47
|
<ItemGroup>
|
48
|
+
<Reference Include="Coding4Fun.Phone.Controls">
|
49
|
+
<HintPath>..\..\..\res\build-tools\Coding4Fun.Phone.Controls.dll</HintPath>
|
50
|
+
</Reference>
|
48
51
|
<Reference Include="IronRuby">
|
49
52
|
<HintPath>..\ironruby\bin\Silverlight3$(Configuration)\IronRuby.dll</HintPath>
|
50
53
|
</Reference>
|
@@ -118,6 +121,7 @@
|
|
118
121
|
<Compile Include="net\NetRequest.cs" />
|
119
122
|
<Compile Include="net\HttpServer.cs" />
|
120
123
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
124
|
+
<Compile Include="rubyext\RhoAlert.cs" />
|
121
125
|
<Compile Include="rubyext\RhoAsyncHttp.cs" />
|
122
126
|
<Compile Include="rubyext\RhoCamera.cs" />
|
123
127
|
<Compile Include="rubyext\RhoConfig.cs" />
|
@@ -168,6 +172,7 @@
|
|
168
172
|
<SubType>Designer</SubType>
|
169
173
|
</Page>
|
170
174
|
</ItemGroup>
|
175
|
+
<ItemGroup />
|
171
176
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
|
172
177
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
|
173
178
|
<ProjectExtensions />
|
@@ -41,6 +41,11 @@ namespace rho
|
|
41
41
|
return CRhoFile.isResourceFileExist(path) || CRhoFile.isFileExist(path);
|
42
42
|
}
|
43
43
|
|
44
|
+
public override void DeleteFile(string path, bool deleteReadOnly)
|
45
|
+
{
|
46
|
+
CRhoFile.deleteFile(path);
|
47
|
+
}
|
48
|
+
|
44
49
|
public override string GetDirectoryName(string path)
|
45
50
|
{
|
46
51
|
return Path.GetDirectoryName(CFilePath.removeLastSlash(path));
|
@@ -33,6 +33,7 @@ namespace rho.common
|
|
33
33
|
{
|
34
34
|
public class RhoParams
|
35
35
|
{
|
36
|
+
|
36
37
|
protected Object m_pParams;
|
37
38
|
|
38
39
|
public RhoParams(Object p)
|
@@ -52,7 +53,7 @@ namespace rho.common
|
|
52
53
|
|
53
54
|
Object val = null;
|
54
55
|
Hash values = (Hash)m_pParams;
|
55
|
-
values.TryGetValue(
|
56
|
+
values.TryGetValue(CRhoRuby.CreateSymbol(name), out val);
|
56
57
|
return (val != null) ? val : null;
|
57
58
|
}
|
58
59
|
|
@@ -54,6 +54,7 @@ namespace rho.common
|
|
54
54
|
|
55
55
|
private WebBrowser m_webBrowser;
|
56
56
|
private PhoneApplicationPage m_appMainPage;
|
57
|
+
public PhoneApplicationPage MainPage { get { return m_appMainPage; } }
|
57
58
|
private Grid m_layoutRoot;
|
58
59
|
private TabControl m_tabControl;
|
59
60
|
private Stack<Uri> m_backHistory = new Stack<Uri>();
|
@@ -219,24 +220,30 @@ namespace rho.common
|
|
219
220
|
{
|
220
221
|
m_webBrowser.Dispatcher.BeginInvoke( () =>
|
221
222
|
{
|
222
|
-
|
223
|
-
|
224
|
-
|
223
|
+
try{
|
224
|
+
if (index > 0)
|
225
|
+
{
|
226
|
+
if (m_tabControl != null && m_tabControl.Items.Count > 0)
|
227
|
+
{
|
228
|
+
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.IsScriptEnabled = true;
|
229
|
+
if (isExternalUrl(strUrl))
|
230
|
+
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.Navigate(new Uri(strUrl, UriKind.Absolute));
|
231
|
+
else
|
232
|
+
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.Navigate(new Uri(strUrl, UriKind.Relative));
|
233
|
+
}
|
234
|
+
}
|
235
|
+
else
|
225
236
|
{
|
226
|
-
|
237
|
+
m_webBrowser.IsScriptEnabled = true;
|
227
238
|
if (isExternalUrl(strUrl))
|
228
|
-
|
239
|
+
m_webBrowser.Navigate(new Uri(strUrl, UriKind.Absolute));
|
229
240
|
else
|
230
|
-
|
241
|
+
m_webBrowser.Navigate(new Uri(strUrl, UriKind.Relative));
|
231
242
|
}
|
232
243
|
}
|
233
|
-
|
244
|
+
catch (Exception exc)
|
234
245
|
{
|
235
|
-
|
236
|
-
if (isExternalUrl(strUrl))
|
237
|
-
m_webBrowser.Navigate(new Uri(strUrl, UriKind.Absolute));
|
238
|
-
else
|
239
|
-
m_webBrowser.Navigate(new Uri(strUrl, UriKind.Relative));
|
246
|
+
LOG.ERROR("WebView.navigate failed : " + strUrl + ", index: " + index, exc);
|
240
247
|
}
|
241
248
|
});
|
242
249
|
}
|
@@ -245,16 +252,23 @@ namespace rho.common
|
|
245
252
|
{
|
246
253
|
m_webBrowser.Dispatcher.BeginInvoke(() =>
|
247
254
|
{
|
248
|
-
|
255
|
+
try
|
249
256
|
{
|
250
|
-
if (
|
257
|
+
if (index > 0)
|
258
|
+
{
|
259
|
+
if (m_tabControl != null && m_tabControl.Items.Count > 0)
|
260
|
+
{
|
261
|
+
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.Navigate(m_webBrowser.Source);
|
262
|
+
}
|
263
|
+
}
|
264
|
+
else
|
251
265
|
{
|
252
|
-
|
266
|
+
m_webBrowser.Navigate(m_webBrowser.Source);
|
253
267
|
}
|
254
268
|
}
|
255
|
-
|
269
|
+
catch (Exception exc)
|
256
270
|
{
|
257
|
-
|
271
|
+
LOG.ERROR("WebView.refresh failed : " + index, exc);
|
258
272
|
}
|
259
273
|
});
|
260
274
|
}
|
@@ -277,16 +291,23 @@ namespace rho.common
|
|
277
291
|
|
278
292
|
m_webBrowser.Dispatcher.BeginInvoke(() =>
|
279
293
|
{
|
280
|
-
|
294
|
+
try
|
281
295
|
{
|
282
|
-
if (
|
296
|
+
if (index > 0)
|
283
297
|
{
|
284
|
-
(
|
298
|
+
if (m_tabControl != null && m_tabControl.Items.Count > 0)
|
299
|
+
{
|
300
|
+
((RhoView)((TabItem)m_tabControl.Items[index]).Content).webBrowser1.InvokeScript(arr[0], arrParams);
|
301
|
+
}
|
302
|
+
}
|
303
|
+
else
|
304
|
+
{
|
305
|
+
m_webBrowser.InvokeScript(arr[0], arrParams);
|
285
306
|
}
|
286
307
|
}
|
287
|
-
|
308
|
+
catch (Exception exc)
|
288
309
|
{
|
289
|
-
|
310
|
+
LOG.ERROR("WebView.execute_js failed: " + arr[0] + "(" + String.Join(",", arrParams), exc);
|
290
311
|
}
|
291
312
|
});
|
292
313
|
}
|
@@ -369,11 +390,11 @@ namespace rho.common
|
|
369
390
|
object val = null;
|
370
391
|
|
371
392
|
Hash values = (Hash)hashArray[i];
|
372
|
-
if (values.TryGetValue(
|
393
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("action"), out val))
|
373
394
|
action = val.ToString();
|
374
|
-
if (values.TryGetValue(
|
395
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("icon"), out val))
|
375
396
|
icon = val.ToString();
|
376
|
-
if (values.TryGetValue(
|
397
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("label"), out val))
|
377
398
|
label = val.ToString();
|
378
399
|
|
379
400
|
if (label == null && barType == 0)
|
@@ -462,10 +483,10 @@ namespace rho.common
|
|
462
483
|
else
|
463
484
|
paramHash = (Hash)barParams;
|
464
485
|
|
465
|
-
if (paramHash != null && paramHash.TryGetValue(
|
486
|
+
if (paramHash != null && paramHash.TryGetValue(CRhoRuby.CreateSymbol("background_color"), out val))
|
466
487
|
m_appMainPage.ApplicationBar.BackgroundColor = getColorFromString(val.ToString());
|
467
488
|
|
468
|
-
if (paramHash != null && paramHash.TryGetValue(
|
489
|
+
if (paramHash != null && paramHash.TryGetValue(CRhoRuby.CreateSymbol("buttons"), out val) && val is RubyArray)
|
469
490
|
hashArray = ((RubyArray)val).ToArray();
|
470
491
|
|
471
492
|
createToolBarButtons(barType, hashArray);
|
@@ -643,17 +664,17 @@ namespace rho.common
|
|
643
664
|
object val = null;
|
644
665
|
|
645
666
|
Hash values = (Hash)hashArray[i];
|
646
|
-
if (values.TryGetValue(
|
667
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("action"), out val))
|
647
668
|
action = val.ToString();
|
648
|
-
if (values.TryGetValue(
|
669
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("icon"), out val))
|
649
670
|
icon = val.ToString();
|
650
|
-
if (values.TryGetValue(
|
671
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("label"), out val))
|
651
672
|
label = val.ToString();
|
652
|
-
if (values.TryGetValue(
|
673
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("reload"), out val))
|
653
674
|
reload = Convert.ToBoolean(val);
|
654
|
-
if (values.TryGetValue(
|
675
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("web_bkg_color"), out val))
|
655
676
|
web_bkg_color = new SolidColorBrush(getColorFromString(val.ToString()));
|
656
|
-
if (values.TryGetValue(
|
677
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("use_current_view_for_tab"), out val))
|
657
678
|
use_current_view_for_tab = Convert.ToBoolean(val);
|
658
679
|
|
659
680
|
//if (label == null && barType == 0)
|
@@ -673,9 +694,9 @@ namespace rho.common
|
|
673
694
|
tabItem.Header = new RhoTabHeader(label, icon);
|
674
695
|
//if (i == 0)// && use_current_view_for_tab)
|
675
696
|
tabItem.Content = new RhoView(m_appMainPage, m_layoutRoot, action, reload, web_bkg_color);
|
676
|
-
if (values.TryGetValue(
|
697
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("selected_color"), out val))
|
677
698
|
tabItem.Background = new SolidColorBrush(getColorFromString(val.ToString()));
|
678
|
-
if (values.TryGetValue(
|
699
|
+
if (values.TryGetValue(CRhoRuby.CreateSymbol("disabled"), out val))
|
679
700
|
tabItem.IsEnabled = !Convert.ToBoolean(val);
|
680
701
|
m_tabControl.Items.Add(tabItem);
|
681
702
|
}
|
@@ -701,10 +722,10 @@ namespace rho.common
|
|
701
722
|
else
|
702
723
|
paramHash = (Hash)tabBarParams;
|
703
724
|
|
704
|
-
if (paramHash != null && paramHash.TryGetValue(
|
725
|
+
if (paramHash != null && paramHash.TryGetValue(CRhoRuby.CreateSymbol("background_color"), out val))
|
705
726
|
m_tabControl.Background = new SolidColorBrush(getColorFromString(val.ToString()));
|
706
727
|
|
707
|
-
if (paramHash != null && paramHash.TryGetValue(
|
728
|
+
if (paramHash != null && paramHash.TryGetValue(CRhoRuby.CreateSymbol("tabs"), out val) && val is RubyArray)
|
708
729
|
hashArray = ((RubyArray)val).ToArray();
|
709
730
|
|
710
731
|
createTabBarButtons(tabBarType, hashArray);
|