rhodes 1.5.5 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Manifest.txt +214 -32
- data/Rakefile +33 -10
- data/bin/upgrade-rhodes-app +0 -1
- data/lib/build/compileERB/bb.rb +2 -2
- data/lib/build/compileERB/default.rb +7 -5
- data/lib/build/jake.rb +1 -1
- data/lib/extensions/digest-md5/ext.yml +1 -1
- data/lib/extensions/digest-md5/ext/Rakefile +35 -36
- data/lib/extensions/digest-md5/ext/build.bat +1 -0
- data/lib/extensions/digest-md5/ext/digest-md5.vcproj +203 -0
- data/lib/extensions/digest-sha1/ext.yml +1 -1
- data/lib/extensions/digest/ext.yml +1 -1
- data/lib/extensions/digest/ext/Rakefile +35 -39
- data/lib/extensions/digest/ext/build.bat +1 -2
- data/lib/extensions/digest/ext/digest.vcproj +203 -0
- data/lib/framework/rho/render.rb +79 -22
- data/lib/framework/rho/rho.rb +294 -56
- data/lib/framework/rho/rhoapplication.rb +10 -0
- data/lib/framework/rho/rhofsconnector.rb +2 -6
- data/lib/framework/rho/rhoutils.rb +56 -14
- data/lib/framework/rho/rhoviewhelpers.rb +2 -0
- data/lib/framework/rhodes.rb +2 -2
- data/lib/framework/rhom/rhom.rb +42 -15
- data/lib/framework/rhom/rhom_db_adapter.rb +165 -159
- data/lib/framework/rhom/rhom_object.rb +0 -1
- data/lib/framework/rhom/rhom_object_factory.rb +343 -166
- data/lib/framework/rhom/rhom_source.rb +28 -15
- data/lib/framework/version.rb +2 -2
- data/lib/rhodes.rb +2 -2
- data/platform/android/Rhodes/AndroidManifest.xml +2 -2
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +39 -44
- data/platform/android/Rhodes/jni/include/JNIRhodes.h +1 -1
- data/platform/android/Rhodes/jni/include/details/rhojava.inc +23 -20
- data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_RhoMenu.h +61 -0
- data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_Rhodes.h +16 -0
- data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_alert_Alert.h +21 -0
- data/platform/android/Rhodes/jni/include/sslimpl.h +1 -1
- data/platform/android/Rhodes/jni/src/alert.cpp +32 -5
- data/platform/android/Rhodes/jni/src/callbacks.cpp +51 -21
- data/platform/android/Rhodes/jni/src/mapview.cpp +3 -8
- data/platform/android/Rhodes/jni/src/menu.cpp +70 -0
- data/platform/android/Rhodes/jni/src/navbar.cpp +16 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +37 -0
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +3 -3
- data/platform/android/Rhodes/jni/src/webview.cpp +21 -7
- data/platform/android/Rhodes/res/drawable/alert_alert.png +0 -0
- data/platform/android/Rhodes/res/drawable/alert_info.png +0 -0
- data/platform/android/Rhodes/res/drawable/alert_question.png +0 -0
- data/platform/android/Rhodes/res/drawable/camera.png +0 -0
- data/platform/android/Rhodes/res/layout/camera.xml +18 -3
- data/platform/android/Rhodes/res/menu/options.xml +0 -10
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +5 -10
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +12 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +105 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +157 -122
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java +7 -58
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +16 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +220 -17
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +22 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +44 -25
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +10 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +3 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +10 -21
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +15 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Phonebook.java +44 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +47 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/MailUriHandler.java +13 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java +11 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/UriHandler.java +1 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/VideoUriHandler.java +61 -0
- data/platform/android/build/RhodesSRC_build.files +3 -0
- data/platform/android/build/android.rake +173 -60
- data/platform/android/build/androidcommon.rb +1 -2
- data/platform/android/build/librhocommon_build.files +5 -0
- data/platform/android/build/librhodes_build.files +2 -0
- data/platform/android/build/libruby_build.files +2 -1
- data/platform/bb/Hsqldb/Hsqldb.jdp +0 -3
- data/platform/bb/Hsqldb/src/com/rho/db/FileUtilBB.java +1 -1
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +16 -1
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBRowResult.java +5 -0
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +25 -4
- data/platform/bb/Hsqldb/src/com/rho/db/Journal.java +1 -1
- data/platform/bb/Hsqldb/src/com/rho/file/FileAccessBB.java +0 -1
- data/platform/bb/Hsqldb/src/j2me/math/Number.java +6 -3
- data/platform/bb/Hsqldb/src/org/hsqldb/CompiledStatementExecutor.java +2 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +1 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Parser.java +1 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Result.java +2 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Select.java +12 -6
- data/platform/bb/Hsqldb/src/org/hsqldb/Session.java +19 -12
- data/platform/bb/Hsqldb/src/org/hsqldb/Table.java +10 -4
- data/platform/bb/Hsqldb/src/org/hsqldb/Token.java +10 -2
- data/platform/bb/Hsqldb/src/org/hsqldb/Tokenizer.java +3 -3
- data/platform/bb/Hsqldb/src/org/hsqldb/lib/java/JavaSystem.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/persist/HsqlProperties.java +2 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/persist/ScaledRAFile.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/scriptio/ScriptReaderText.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java +1 -1
- data/platform/bb/RubyVM/RubyVM.jdp +9 -10
- data/platform/bb/build/RubyVM_build.files +9 -7
- data/platform/bb/build/bb.rake +13 -3
- data/platform/bb/build/hsqldb_build.files +0 -2
- data/platform/bb/build/rhodes_build.files +5 -2
- data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +8 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +154 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/RhoMainScreen.java +8 -0
- data/platform/bb/rhodes/platform/common/com/rho/BrowserAdapter5.java +28 -0
- data/platform/bb/rhodes/rhodes.jdp +12 -7
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +331 -0
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +28 -0
- data/platform/bb/rhodes/src/com/rho/IBrowserAdapter.java +10 -0
- data/platform/bb/rhodes/src/com/rho/RhoMainScreen.java +4 -0
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +2 -4
- data/platform/bb/rhodes/src/com/rho/{Jsr75File.java → file/Jsr75File.java} +83 -36
- data/platform/bb/{Hsqldb → rhodes}/src/com/rho/file/Jsr75RAFileImpl.java +0 -1
- data/platform/bb/{Hsqldb → rhodes}/src/com/rho/file/PersistRAFileImpl.java +0 -2
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +8 -10
- data/platform/bb/rhodes/src/com/rho/rubyext/Alert.java +1 -1
- data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +39 -0
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +63 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +100 -0
- data/platform/bb/rhodes/src/rhomobile/LogScreen.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +13 -1
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +138 -492
- data/platform/bb/rhodes/src/rhomobile/SecondaryResourceFetchThread.java +11 -2
- data/platform/bb/rhodes/src/rhomobile/Utilities.java +14 -10
- data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +5 -14
- data/platform/bb/rhodes/src/rhomobile/camera/ImageBrowserScreen.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapField.java +2 -2
- data/platform/iphone/Classes/AppManager/AppManager.m +37 -14
- data/platform/iphone/Classes/Camera/PickImageDelegate.h +15 -4
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +53 -50
- data/platform/iphone/Classes/DateTimePicker.h +17 -0
- data/platform/iphone/Classes/DateTimePicker.m +35 -0
- data/platform/iphone/Classes/GeoLocation/LocationController.m +2 -3
- data/platform/iphone/Classes/LogOptionsController.m +3 -2
- data/platform/iphone/Classes/LogViewController.m +4 -2
- data/platform/iphone/Classes/MapView/GoogleGeocoder.m +12 -20
- data/platform/iphone/Classes/MapView/MapAnnotation.h +9 -13
- data/platform/iphone/Classes/MapView/MapAnnotation.m +17 -65
- data/platform/iphone/Classes/MapView/MapViewController.h +1 -7
- data/platform/iphone/Classes/MapView/MapViewController.m +51 -25
- data/platform/iphone/Classes/NativeBar.h +0 -12
- data/platform/iphone/Classes/NativeBar.m +121 -2
- data/platform/iphone/Classes/NavBar.h +16 -0
- data/platform/iphone/Classes/NavBar.m +115 -0
- data/platform/iphone/Classes/RhoAlert.h +19 -0
- data/platform/iphone/Classes/RhoAlert.m +258 -0
- data/platform/iphone/Classes/RhoDelegate.m +1 -0
- data/platform/iphone/Classes/RhoMainView.h +33 -0
- data/platform/iphone/Classes/Rhodes.h +56 -0
- data/platform/iphone/Classes/Rhodes.m +533 -0
- data/platform/iphone/Classes/RingtoneManager.h +17 -0
- data/platform/iphone/Classes/RingtoneManager.m +73 -0
- data/platform/iphone/Classes/SimpleMainView.h +30 -0
- data/platform/iphone/Classes/SimpleMainView.m +380 -0
- data/platform/iphone/Classes/TabbedMainView.h +24 -0
- data/platform/iphone/Classes/TabbedMainView.m +202 -0
- data/platform/iphone/Classes/WebView.m +123 -0
- data/platform/iphone/Classes/rho/net/NetRequestImpl.m +2 -2
- data/platform/iphone/Classes/rho/net/sslimpl.cpp +13 -1
- data/platform/iphone/Classes/rho/net/sslimpl.h +1 -1
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +44 -0
- data/platform/iphone/main.m +1 -2
- data/platform/iphone/rbuild/iphone.rake +8 -16
- data/platform/iphone/rhoextlib/dosyscall.c +1 -1
- data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +6 -4
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +12 -0
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +97 -62
- data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +12 -0
- data/platform/osx/Rhodes Launcher/launch.rb +14 -21
- data/platform/shared/common/AppMenu.cpp +122 -0
- data/platform/shared/common/AppMenu.h +46 -0
- data/platform/shared/common/PosixThreadImpl.cpp +1 -1
- data/platform/shared/common/RhoConf.cpp +27 -2
- data/platform/shared/common/RhoConf.h +5 -0
- data/platform/shared/common/RhoFilePath.h +21 -0
- data/platform/shared/common/RhoStd.h +44 -5
- data/platform/shared/common/RhoTime.h +20 -7
- data/platform/shared/common/RhodesApp.cpp +236 -177
- data/platform/shared/common/RhodesApp.h +36 -13
- data/platform/shared/common/SplashScreen.cpp +2 -2
- data/platform/shared/common/StringConverter.h +10 -11
- data/platform/shared/common/rhoparams.c +0 -6
- data/platform/shared/curl/lib/rhossl.c +3 -2
- data/platform/shared/curl/lib/url.c +0 -5
- data/platform/shared/db/DBAdapter.cpp +304 -81
- data/platform/shared/db/DBAdapter.h +24 -7
- data/platform/shared/db/DBAttrManager.cpp +83 -30
- data/platform/shared/db/DBAttrManager.h +6 -0
- data/platform/shared/db/DBResult.h +15 -4
- data/platform/shared/json/JSONIterator.cpp +100 -3
- data/platform/shared/json/JSONIterator.h +28 -3
- data/platform/shared/net/AsyncHttp.cpp +25 -22
- data/platform/shared/net/AsyncHttp.h +10 -6
- data/platform/shared/net/CURLNetRequest.cpp +115 -36
- data/platform/shared/net/CURLNetRequest.h +6 -0
- data/platform/shared/net/HttpServer.cpp +6 -4
- data/platform/shared/net/HttpServer.h +0 -1
- data/platform/shared/net/INetRequest.h +19 -3
- data/platform/shared/net/URI.cpp +2 -2
- data/platform/shared/net/ssl.cpp +2 -2
- data/platform/shared/net/ssl.h +2 -2
- data/platform/shared/ruby/ext/alert/alert.i +14 -2
- data/platform/shared/ruby/ext/alert/alert_wrap.c +40 -20
- data/platform/shared/ruby/ext/asynchttp/asynchttp.i +8 -8
- data/platform/shared/ruby/ext/asynchttp/asynchttp_wrap.c +112 -16
- data/platform/shared/ruby/ext/geolocation/geolocation.i +16 -12
- data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +481 -125
- data/platform/shared/ruby/ext/navbar/navbar.i +20 -0
- data/platform/shared/ruby/ext/navbar/navbar_wrap.c +1859 -0
- data/platform/shared/ruby/ext/rho/extensions.c +1 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +32 -2
- data/platform/shared/ruby/ext/rho/rhoruby.h +7 -2
- data/platform/shared/ruby/ext/rhoconf/rhoconf.i +4 -0
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +31 -0
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +188 -3226
- data/platform/shared/ruby/ext/syncengine/syncengine.i +14 -25
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +96 -104
- data/platform/shared/ruby/ext/system/system.i +12 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +101 -7
- data/platform/shared/ruby/ext/webview/webview.i +20 -15
- data/platform/shared/ruby/ext/webview/webview_wrap.c +42 -16
- data/platform/shared/ruby/thread_pthread.c +4 -4
- data/platform/shared/ruby/thread_win32.c +4 -4
- data/platform/shared/ruby/wince/io_wce.c +0 -1
- data/platform/shared/rubyJVM/src/com/rho/FilePath.java +18 -2
- data/platform/shared/rubyJVM/src/com/rho/IRhoRubyHelper.java +1 -0
- data/platform/shared/rubyJVM/src/com/rho/Properties.java +9 -0
- data/platform/shared/rubyJVM/src/com/rho/RhoClassFactory.java +2 -3
- data/platform/shared/rubyJVM/src/com/rho/RhoConf.java +47 -8
- data/platform/shared/rubyJVM/src/com/rho/RhoLogConf.java +1 -0
- data/platform/shared/rubyJVM/src/com/rho/RhoLogFileSink.java +1 -0
- data/platform/shared/rubyJVM/src/com/rho/RhoRuby.java +43 -5
- data/platform/shared/rubyJVM/src/com/rho/RhodesApp.java +98 -3
- data/platform/shared/rubyJVM/src/com/rho/db/DBAdapter.java +460 -175
- data/platform/shared/rubyJVM/src/com/rho/db/DBAttrManager.java +81 -33
- data/platform/shared/rubyJVM/src/com/rho/db/IDBCallback.java +3 -5
- data/platform/shared/rubyJVM/src/com/rho/db/IDBResult.java +2 -0
- data/platform/shared/rubyJVM/src/com/rho/db/IDBStorage.java +2 -0
- data/platform/shared/rubyJVM/src/com/rho/{IFile.java → file/IFile.java} +1 -1
- data/platform/shared/rubyJVM/src/com/rho/{IFileAccess.java → file/IFileAccess.java} +1 -1
- data/platform/shared/rubyJVM/src/com/rho/{IRAFile.java → file/IRAFile.java} +1 -1
- data/platform/{bb/Hsqldb/src/com/rho/db → shared/rubyJVM/src/com/rho/file}/RandomAccessFile.java +1 -2
- data/platform/shared/rubyJVM/src/com/rho/{SimpleFile.java → file/SimpleFile.java} +5 -1
- data/platform/shared/rubyJVM/src/com/rho/net/AsyncHttp.java +23 -18
- data/platform/shared/rubyJVM/src/com/rho/net/NetRequest.java +167 -250
- data/platform/shared/rubyJVM/src/com/rho/net/RhoConnection.java +100 -30
- data/platform/shared/rubyJVM/src/com/rho/net/URI.java +0 -1
- data/platform/shared/rubyJVM/src/com/rho/sync/ClientRegister.java +30 -33
- data/platform/shared/rubyJVM/src/com/rho/sync/ISyncProtocol.java +20 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java +5 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/JSONStructIterator.java +74 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncEngine.java +486 -257
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncNotify.java +89 -58
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncProtocol_3.java +79 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncSource.java +634 -495
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncThread.java +74 -90
- data/platform/shared/rubyJVM/src/com/xruby/GeneratedMethods/RubySymbol_Methods.java +1 -0
- data/platform/shared/rubyJVM/src/com/xruby/runtime/builtin/RubyThread.java +6 -0
- data/platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyRuntime.java +6 -2
- data/platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubySymbol.java +17 -1
- data/platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyValue.java +1 -0
- data/platform/shared/rubyJVM/src/org/json/me/JSONObject.java +3 -0
- data/platform/shared/rubyext/GeoLocation.cpp +23 -0
- data/platform/shared/rubyext/GeoLocation.h +2 -0
- data/platform/shared/rubyext/RhoRuby.cpp +31 -0
- data/platform/shared/rubyext/RhoRuby.h +32 -0
- data/platform/shared/rubyext/System.cpp +14 -3
- data/platform/shared/rubyext/WebView.h +21 -0
- data/platform/shared/sync/ClientRegister.cpp +23 -28
- data/platform/shared/sync/ClientRegister.h +6 -2
- data/platform/shared/sync/ISyncProtocol.h +29 -0
- data/platform/shared/sync/SyncEngine.cpp +450 -190
- data/platform/shared/sync/SyncEngine.h +28 -38
- data/platform/shared/sync/SyncNotify.cpp +43 -41
- data/platform/shared/sync/SyncNotify.h +7 -7
- data/platform/shared/sync/SyncProtocol_3.h +86 -0
- data/platform/shared/sync/SyncSource.cpp +535 -371
- data/platform/shared/sync/SyncSource.h +48 -55
- data/platform/shared/sync/SyncThread.cpp +59 -103
- data/platform/shared/sync/SyncThread.h +10 -23
- data/platform/shared/unzip/unzip.cpp +3 -2
- data/platform/shared/unzip/unzip.h +5 -1
- data/platform/shared/wtl80/include/atlapp.h +10 -10
- data/platform/wm/RhoLib/RhoLib.vcproj +32 -0
- data/platform/wm/build/build_inf.js +40 -3
- data/platform/wm/build/wm.rake +95 -9
- data/platform/wm/rhodes/Alert.cpp +4 -0
- data/platform/wm/rhodes/DateTimePicker.cpp +183 -0
- data/platform/wm/rhodes/DateTimePicker.h +100 -0
- data/platform/wm/rhodes/MainWindow.cpp +222 -209
- data/platform/wm/rhodes/MainWindow.h +28 -35
- data/platform/wm/rhodes/Rhodes.cpp +20 -60
- data/platform/wm/rhodes/Rhodes.rc +41 -7
- data/platform/wm/rhodes/Utils.cpp +65 -0
- data/platform/wm/rhodes/Utils.h +9 -0
- data/platform/wm/rhodes/camera/Camera.cpp +2 -2
- data/platform/wm/rhodes/menubar.cpp +2 -33
- data/platform/wm/rhodes/menubar.h +0 -14
- data/platform/wm/rhodes/resource.h +13 -11
- data/platform/wm/rhodes/rho/net/NetRequest.cpp +16 -35
- data/platform/wm/rhodes/rho/net/NetRequest.h +8 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +264 -46
- data/platform/wm/rhodes/rho/net/NetRequestImpl.h +14 -4
- data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.cpp +1 -1
- data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.h +1 -1
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +77 -4
- data/platform/wm/rhodes/rho/rubyext/WebView.cpp +63 -0
- data/platform/wm/rhodes/rhodes.vcproj +20 -66
- data/platform/wm/rhodes/stdafx.h +22 -0
- data/platform/wm/rubylib/rubylib.vcproj +4 -0
- data/platform/wm/syncengine/syncengine.vcproj +8 -0
- data/platform/wm/tools/detool.sln +66 -0
- data/platform/wm/tools/detool/DEMComInterface.tlb +0 -0
- data/platform/wm/tools/detool/ReadMe.txt +33 -0
- data/platform/wm/tools/detool/detool.cpp +559 -0
- data/platform/wm/tools/detool/detool.h +5 -0
- data/platform/wm/tools/detool/detool.vcproj +233 -0
- data/platform/wm/tools/detool/stdafx.cpp +8 -0
- data/platform/wm/tools/detool/stdafx.h +15 -0
- data/platform/wm/tools/detool/targetver.h +24 -0
- data/platform/wm/tools/rhosetup/ReadMe.txt +41 -0
- data/platform/wm/tools/rhosetup/rhosetup.cpp +52 -0
- data/platform/wm/tools/rhosetup/rhosetup.vcproj +641 -0
- data/platform/wm/tools/rhosetup/stdafx.cpp +8 -0
- data/platform/wm/tools/rhosetup/stdafx.h +59 -0
- data/rakefile.rb +33 -10
- data/res/build-tools/db/syncdb.schema +25 -23
- data/res/build-tools/db/syncdb.triggers +1 -1
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/rhosetup.dll +0 -0
- data/res/generators/rhogen.rb +27 -22
- data/res/generators/templates/application/app/Settings/controller.rb +3 -1
- data/res/generators/templates/application/app/Settings/home.bb.erb +17 -0
- data/res/generators/templates/application/app/Settings/home.erb +21 -12
- data/res/generators/templates/application/app/Settings/index.bb.erb +32 -0
- data/res/generators/templates/application/app/Settings/index.erb +44 -15
- data/res/generators/templates/application/app/Settings/login.bb.erb +35 -0
- data/res/generators/templates/application/app/Settings/login.erb +29 -30
- data/res/generators/templates/application/app/Settings/reset.bb.erb +15 -0
- data/res/generators/templates/application/app/Settings/reset.erb +16 -13
- data/res/generators/templates/application/app/Settings/wait.bb.erb +3 -0
- data/res/generators/templates/application/app/Settings/wait.erb +4 -4
- data/res/generators/templates/application/app/application.rb +8 -0
- data/res/generators/templates/application/app/helpers/browser_helper.rb +13 -0
- data/res/generators/templates/application/app/index.bb.erb +26 -0
- data/res/generators/templates/application/app/index.erb +21 -12
- data/res/generators/templates/application/app/layout.erb +9 -11
- data/res/generators/templates/application/public/css/android.css +285 -0
- data/res/generators/templates/application/public/css/blackberry.css +85 -78
- data/res/generators/templates/application/public/css/iphone.css +286 -296
- data/res/generators/templates/application/public/css/webkit.css +34 -0
- data/res/generators/templates/application/public/css/windows_mobile.css +208 -0
- data/res/generators/templates/application/public/icons/Read me first - license.txt +14 -0
- data/res/generators/templates/application/public/icons/about.png +0 -0
- data/res/generators/templates/application/public/icons/airplane.png +0 -0
- data/res/generators/templates/application/public/icons/baby.png +0 -0
- data/res/generators/templates/application/public/icons/badge.png +0 -0
- data/res/generators/templates/application/public/icons/bandaid.png +0 -0
- data/res/generators/templates/application/public/icons/bar-chart.png +0 -0
- data/res/generators/templates/application/public/icons/battery.png +0 -0
- data/res/generators/templates/application/public/icons/beaker.png +0 -0
- data/res/generators/templates/application/public/icons/beaker2.png +0 -0
- data/res/generators/templates/application/public/icons/beermug.png +0 -0
- data/res/generators/templates/application/public/icons/bird.png +0 -0
- data/res/generators/templates/application/public/icons/book.png +0 -0
- data/res/generators/templates/application/public/icons/bookmark.png +0 -0
- data/res/generators/templates/application/public/icons/brightness.png +0 -0
- data/res/generators/templates/application/public/icons/bug.png +0 -0
- data/res/generators/templates/application/public/icons/cabinet.png +0 -0
- data/res/generators/templates/application/public/icons/calendar.png +0 -0
- data/res/generators/templates/application/public/icons/camera.png +0 -0
- data/res/generators/templates/application/public/icons/changeName.rb +22 -0
- data/res/generators/templates/application/public/icons/chat2.png +0 -0
- data/res/generators/templates/application/public/icons/chicken.png +0 -0
- data/res/generators/templates/application/public/icons/clock.png +0 -0
- data/res/generators/templates/application/public/icons/cloud.png +0 -0
- data/res/generators/templates/application/public/icons/coffee.png +0 -0
- data/res/generators/templates/application/public/icons/compass.png +0 -0
- data/res/generators/templates/application/public/icons/contrast.png +0 -0
- data/res/generators/templates/application/public/icons/dashboard.png +0 -0
- data/res/generators/templates/application/public/icons/display.png +0 -0
- data/res/generators/templates/application/public/icons/dogpaw.png +0 -0
- data/res/generators/templates/application/public/icons/download.png +0 -0
- data/res/generators/templates/application/public/icons/dumbbell.png +0 -0
- data/res/generators/templates/application/public/icons/ekg.png +0 -0
- data/res/generators/templates/application/public/icons/envelope.png +0 -0
- data/res/generators/templates/application/public/icons/equalizer.png +0 -0
- data/res/generators/templates/application/public/icons/eye.png +0 -0
- data/res/generators/templates/application/public/icons/film-roll.png +0 -0
- data/res/generators/templates/application/public/icons/flag.png +0 -0
- data/res/generators/templates/application/public/icons/fork-and-knife.png +0 -0
- data/res/generators/templates/application/public/icons/fuel.png +0 -0
- data/res/generators/templates/application/public/icons/gameplan.png +0 -0
- data/res/generators/templates/application/public/icons/gear.png +0 -0
- data/res/generators/templates/application/public/icons/gear2.png +0 -0
- data/res/generators/templates/application/public/icons/gift.png +0 -0
- data/res/generators/templates/application/public/icons/heart.png +0 -0
- data/res/generators/templates/application/public/icons/house.png +0 -0
- data/res/generators/templates/application/public/icons/inbox.png +0 -0
- data/res/generators/templates/application/public/icons/index-cards.png +0 -0
- data/res/generators/templates/application/public/icons/iphone.png +0 -0
- data/res/generators/templates/application/public/icons/ipod.png +0 -0
- data/res/generators/templates/application/public/icons/key.png +0 -0
- data/res/generators/templates/application/public/icons/lifebuoy.png +0 -0
- data/res/generators/templates/application/public/icons/lightbulb.png +0 -0
- data/res/generators/templates/application/public/icons/line-chart.png +0 -0
- data/res/generators/templates/application/public/icons/location.png +0 -0
- data/res/generators/templates/application/public/icons/lock.png +0 -0
- data/res/generators/templates/application/public/icons/loopback.png +0 -0
- data/res/generators/templates/application/public/icons/magnifying-glass.png +0 -0
- data/res/generators/templates/application/public/icons/map-marker.png +0 -0
- data/res/generators/templates/application/public/icons/map.png +0 -0
- data/res/generators/templates/application/public/icons/medical-bag.png +0 -0
- data/res/generators/templates/application/public/icons/medical.png +0 -0
- data/res/generators/templates/application/public/icons/microphone.png +0 -0
- data/res/generators/templates/application/public/icons/movie1.png +0 -0
- data/res/generators/templates/application/public/icons/movie2.png +0 -0
- data/res/generators/templates/application/public/icons/network.png +0 -0
- data/res/generators/templates/application/public/icons/note.png +0 -0
- data/res/generators/templates/application/public/icons/outlet.png +0 -0
- data/res/generators/templates/application/public/icons/palette.png +0 -0
- data/res/generators/templates/application/public/icons/paperclip.png +0 -0
- data/res/generators/templates/application/public/icons/phone.png +0 -0
- data/res/generators/templates/application/public/icons/photos.png +0 -0
- data/res/generators/templates/application/public/icons/piano.png +0 -0
- data/res/generators/templates/application/public/icons/picture-frame.png +0 -0
- data/res/generators/templates/application/public/icons/pill.png +0 -0
- data/res/generators/templates/application/public/icons/pin.png +0 -0
- data/res/generators/templates/application/public/icons/pinetree.png +0 -0
- data/res/generators/templates/application/public/icons/planet.png +0 -0
- data/res/generators/templates/application/public/icons/puzzle.png +0 -0
- data/res/generators/templates/application/public/icons/radar.png +0 -0
- data/res/generators/templates/application/public/icons/redo.png +0 -0
- data/res/generators/templates/application/public/icons/refresh.png +0 -0
- data/res/generators/templates/application/public/icons/runner.png +0 -0
- data/res/generators/templates/application/public/icons/shoebox.png +0 -0
- data/res/generators/templates/application/public/icons/shopping-bag.png +0 -0
- data/res/generators/templates/application/public/icons/shopping-cart.png +0 -0
- data/res/generators/templates/application/public/icons/shuffle.png +0 -0
- data/res/generators/templates/application/public/icons/signpost.png +0 -0
- data/res/generators/templates/application/public/icons/skull-n-crossbones.png +0 -0
- data/res/generators/templates/application/public/icons/skull.png +0 -0
- data/res/generators/templates/application/public/icons/sliders.png +0 -0
- data/res/generators/templates/application/public/icons/spraycan.png +0 -0
- data/res/generators/templates/application/public/icons/squiggle.png +0 -0
- data/res/generators/templates/application/public/icons/star.png +0 -0
- data/res/generators/templates/application/public/icons/stopwatch.png +0 -0
- data/res/generators/templates/application/public/icons/suitcase.png +0 -0
- data/res/generators/templates/application/public/icons/tag.png +0 -0
- data/res/generators/templates/application/public/icons/tags.png +0 -0
- data/res/generators/templates/application/public/icons/target.png +0 -0
- data/res/generators/templates/application/public/icons/testtube.png +0 -0
- data/res/generators/templates/application/public/icons/thermometer.png +0 -0
- data/res/generators/templates/application/public/icons/toolbox.png +0 -0
- data/res/generators/templates/application/public/icons/trophy.png +0 -0
- data/res/generators/templates/application/public/icons/tshirt.png +0 -0
- data/res/generators/templates/application/public/icons/tv.png +0 -0
- data/res/generators/templates/application/public/icons/umbrella.png +0 -0
- data/res/generators/templates/application/public/icons/walk.png +0 -0
- data/res/generators/templates/application/public/icons/weather.png +0 -0
- data/res/generators/templates/application/public/icons/widescreen.png +0 -0
- data/res/generators/templates/application/public/icons/wineglass.png +0 -0
- data/res/generators/templates/application/public/icons/zap.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_check_off.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_check_on.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_radio_off.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_radio_on.png +0 -0
- data/res/generators/templates/application/public/images/android/ic_menu_more.png +0 -0
- data/res/generators/templates/application/public/images/iphone/disclosure.png +0 -0
- data/res/generators/templates/application/public/images/iphone/disclosure_detail.png +0 -0
- data/res/generators/templates/application/public/images/iphone/radiobutton.png +0 -0
- data/res/generators/templates/application/public/images/iphone/select.png +0 -0
- data/res/generators/templates/application/public/images/iphone/switch.png +0 -0
- data/res/generators/templates/application/public/images/listArrow.png +0 -0
- data/res/generators/templates/application/public/images/listArrowDown.png +0 -0
- data/res/generators/templates/model/controller.rb +2 -0
- data/res/generators/templates/model/edit.bb.erb +24 -0
- data/res/generators/templates/model/edit.erb +21 -25
- data/res/generators/templates/model/index.bb.erb +21 -0
- data/res/generators/templates/model/index.erb +28 -14
- data/res/generators/templates/model/new.bb.erb +24 -0
- data/res/generators/templates/model/new.erb +20 -20
- data/res/generators/templates/model/show.bb.erb +21 -0
- data/res/generators/templates/model/show.erb +15 -15
- data/rhobuild.yml +37 -0
- data/rhodes.gemspec +1 -1
- data/spec/framework_spec/app/Account/config.rb +57 -1
- data/spec/framework_spec/app/Case/config.rb +1 -1
- data/spec/framework_spec/app/Customer/config.rb +1 -1
- data/spec/framework_spec/app/Product/config.rb +15 -1
- data/spec/framework_spec/app/spec/fixtures/object_values.txt +90 -90
- data/spec/framework_spec/app/spec/pagination/fixtures/object_values.txt +91 -91
- data/spec/framework_spec/app/spec/rho_spec.rb +1 -1
- data/spec/framework_spec/app/spec/rhom_object_spec.rb +47 -28
- data/spec/framework_spec/app/spec/rhom_spec.rb +8 -8
- data/spec/framework_spec/app/spec/spec_helper.rb +13 -5
- data/spec/framework_spec/app/spec_runner.rb +5 -4
- data/spec/framework_spec/public/css/base.css +0 -1
- data/spec/framework_spec/public/css/iphone.css +0 -1
- data/spec/framework_spec/rhoconfig.txt +3 -1
- metadata +220 -37
- data/platform/bb/rhodes/src/rhomobile/WebView.java +0 -90
- data/platform/iphone/Classes/BarItem.h +0 -27
- data/platform/iphone/Classes/BarItem.m +0 -32
- data/platform/iphone/Classes/JSString.h +0 -12
- data/platform/iphone/Classes/JSString.m +0 -7
- data/platform/iphone/Classes/RhoRunnerAppDelegate.h +0 -48
- data/platform/iphone/Classes/RhoRunnerAppDelegate.m +0 -617
- data/platform/iphone/Classes/Server/ServerHost.h +0 -81
- data/platform/iphone/Classes/Server/ServerHost.m +0 -597
- data/platform/iphone/Classes/Server/WebViewUrl.h +0 -13
- data/platform/iphone/Classes/Server/WebViewUrl.m +0 -8
- data/platform/iphone/Classes/TabBarDelegate.h +0 -39
- data/platform/iphone/Classes/TabBarDelegate.m +0 -151
- data/platform/iphone/Classes/Utils/unzip.cpp +0 -4328
- data/platform/iphone/Classes/Utils/unzip.h +0 -234
- data/platform/iphone/Classes/WebViewController.h +0 -59
- data/platform/iphone/Classes/WebViewController.m +0 -472
- data/platform/wm/rhodes/GetURLDialog.cpp +0 -64
- data/platform/wm/rhodes/GetURLDialog.h +0 -39
- data/res/generators/templates/application/public/css/base.css +0 -39
- data/res/generators/templates/application/public/css/rho.css +0 -3
- data/res/generators/templates/application/public/css/xhtml.css +0 -114
- data/spec/framework_spec/app/Question/config.rb +0 -3
- data/spec/generator_spec/source_generator_spec.rb +0 -27
@@ -6,7 +6,7 @@
|
|
6
6
|
#undef DEFAULT_LOGCATEGORY
|
7
7
|
#define DEFAULT_LOGCATEGORY "Callbacks"
|
8
8
|
|
9
|
-
extern "C" void
|
9
|
+
extern "C" void rho_webview_navigate(const char* url, int index);
|
10
10
|
|
11
11
|
namespace rho
|
12
12
|
{
|
@@ -25,7 +25,7 @@ RHO_GLOBAL void rho_map_location(char* query)
|
|
25
25
|
{
|
26
26
|
rho::String url = "http://maps.google.com/?";
|
27
27
|
url += query;
|
28
|
-
|
28
|
+
rho_webview_navigate(url.c_str(), 0);
|
29
29
|
}
|
30
30
|
|
31
31
|
RHO_GLOBAL void rho_appmanager_load( void* /*httpContext*/, const char* /*szQuery*/)
|
@@ -64,12 +64,7 @@ RHO_GLOBAL VALUE rho_sys_makephonecall(const char* callname, int nparams, char**
|
|
64
64
|
|
65
65
|
RHO_GLOBAL void rho_net_impl_network_indicator(int enable)
|
66
66
|
{
|
67
|
-
|
68
|
-
jclass cls = getJNIClass(RHODES_JAVA_CLASS_RHODES);
|
69
|
-
if (!cls) return;
|
70
|
-
jmethodID mid = getJNIClassStaticMethod(env, cls, "showNetworkIndicator", "(Z)V");
|
71
|
-
if (!mid) return;
|
72
|
-
env->CallStaticVoidMethod(cls, mid, enable);
|
67
|
+
// No GUI indicator on Android
|
73
68
|
}
|
74
69
|
|
75
70
|
RHO_GLOBAL void *rho_nativethread_start()
|
@@ -85,52 +80,87 @@ RHO_GLOBAL void rho_nativethread_end(void *)
|
|
85
80
|
jvm()->DetachCurrentThread();
|
86
81
|
}
|
87
82
|
|
88
|
-
RHO_GLOBAL
|
83
|
+
RHO_GLOBAL int rho_sysimpl_get_property(char* szPropName, VALUE* resValue)
|
89
84
|
{
|
90
|
-
VALUE nil = rho_ruby_get_NIL();
|
91
|
-
|
92
85
|
JNIEnv *env = jnienv();
|
93
86
|
|
94
87
|
jclass cls = getJNIClass(RHODES_JAVA_CLASS_RHODES);
|
95
|
-
if (!cls) return
|
88
|
+
if (!cls) return 0;
|
96
89
|
jmethodID mid = getJNIClassStaticMethod(env, cls, "getProperty", "(Ljava/lang/String;)Ljava/lang/Object;");
|
97
|
-
if (!mid) return
|
90
|
+
if (!mid) return 0;
|
98
91
|
|
99
92
|
jobject result = env->CallStaticObjectMethod(cls, mid, rho_cast<jstring>(szPropName));
|
100
|
-
if (!result) return
|
93
|
+
if (!result) return 0;
|
101
94
|
|
102
95
|
jclass clsBoolean = getJNIClass(RHODES_JAVA_CLASS_BOOLEAN);
|
103
96
|
jclass clsInteger = getJNIClass(RHODES_JAVA_CLASS_INTEGER);
|
97
|
+
jclass clsFloat = getJNIClass(RHODES_JAVA_CLASS_FLOAT);
|
98
|
+
jclass clsDouble = getJNIClass(RHODES_JAVA_CLASS_DOUBLE);
|
104
99
|
jclass clsString = getJNIClass(RHODES_JAVA_CLASS_STRING);
|
105
100
|
|
106
101
|
if (env->IsInstanceOf(result, clsBoolean)) {
|
107
102
|
jmethodID midValue = getJNIClassMethod(env, clsBoolean, "booleanValue", "()Z");
|
108
|
-
|
103
|
+
*resValue = rho_ruby_create_boolean((int)env->CallBooleanMethod(result, midValue));
|
104
|
+
return 1;
|
109
105
|
}
|
110
106
|
else if (env->IsInstanceOf(result, clsInteger)) {
|
111
107
|
jmethodID midValue = getJNIClassMethod(env, clsInteger, "intValue", "()I");
|
112
|
-
|
108
|
+
*resValue = rho_ruby_create_integer((int)env->CallIntMethod(result, midValue));
|
109
|
+
return 1;
|
110
|
+
}
|
111
|
+
else if (env->IsInstanceOf(result, clsFloat)) {
|
112
|
+
jmethodID midValue = getJNIClassMethod(env, clsFloat, "floatValue", "()F");
|
113
|
+
*resValue = rho_ruby_create_double((double)env->CallFloatMethod(result, midValue));
|
114
|
+
return 1;
|
115
|
+
}
|
116
|
+
else if (env->IsInstanceOf(result, clsDouble)) {
|
117
|
+
jmethodID midValue = getJNIClassMethod(env, clsDouble, "doubleValue", "()D");
|
118
|
+
*resValue = rho_ruby_create_double((double)env->CallDoubleMethod(result, midValue));
|
119
|
+
return 1;
|
113
120
|
}
|
114
121
|
else if (env->IsInstanceOf(result, clsString)) {
|
115
122
|
jstring resStrObj = (jstring)result;
|
116
|
-
|
123
|
+
*resValue = rho_ruby_create_string(rho_cast<std::string>(resStrObj).c_str());
|
124
|
+
return 1;
|
117
125
|
}
|
118
126
|
|
119
|
-
return
|
127
|
+
return 0;
|
120
128
|
}
|
121
129
|
|
122
130
|
RHO_GLOBAL VALUE rho_sys_get_locale()
|
123
131
|
{
|
124
|
-
|
132
|
+
VALUE res;
|
133
|
+
if ( rho_sysimpl_get_property((char*)"locale", &res) )
|
134
|
+
return res;
|
135
|
+
|
136
|
+
return rho_ruby_get_NIL();
|
125
137
|
}
|
126
138
|
|
127
139
|
RHO_GLOBAL int rho_sys_get_screen_width()
|
128
140
|
{
|
129
|
-
|
141
|
+
VALUE res;
|
142
|
+
if ( rho_sysimpl_get_property((char*)"screen_width", &res) )
|
143
|
+
return NUM2INT(res);
|
144
|
+
|
145
|
+
return 0;
|
130
146
|
}
|
131
147
|
|
132
148
|
RHO_GLOBAL int rho_sys_get_screen_height()
|
133
149
|
{
|
134
|
-
|
150
|
+
VALUE res;
|
151
|
+
if ( rho_sysimpl_get_property((char*)"screen_height", &res) )
|
152
|
+
return NUM2INT(res);
|
153
|
+
|
154
|
+
return 0;
|
155
|
+
}
|
156
|
+
|
157
|
+
RHO_GLOBAL void rho_sys_app_exit()
|
158
|
+
{
|
159
|
+
JNIEnv *env = jnienv();
|
160
|
+
jclass cls = getJNIClass(RHODES_JAVA_CLASS_RHODES);
|
161
|
+
if (!cls) return;
|
162
|
+
jmethodID mid = getJNIClassStaticMethod(env, cls, "exit", "()V");
|
163
|
+
if (!mid) return;
|
164
|
+
env->CallStaticVoidMethod(cls, mid);
|
135
165
|
}
|
136
166
|
|
@@ -1,17 +1,13 @@
|
|
1
1
|
#include "JNIRhodes.h"
|
2
2
|
|
3
|
-
#include "gapikey.h"
|
4
|
-
|
5
3
|
#include <common/rhoparams.h>
|
6
4
|
|
7
5
|
#undef DEFAULT_LOGCATEGORY
|
8
6
|
#define DEFAULT_LOGCATEGORY "MapView"
|
9
7
|
|
10
|
-
extern "C" void alert_show_popup(char *);
|
11
|
-
|
12
8
|
RHO_GLOBAL void mapview_create(rho_param *p)
|
13
9
|
{
|
14
|
-
#ifdef
|
10
|
+
#ifdef RHO_GOOGLE_API_KEY
|
15
11
|
JNIEnv *env = jnienv();
|
16
12
|
jclass clsMapView = getJNIClass(RHODES_JAVA_CLASS_MAPVIEW);
|
17
13
|
if (!clsMapView) return;
|
@@ -24,10 +20,9 @@ RHO_GLOBAL void mapview_create(rho_param *p)
|
|
24
20
|
}
|
25
21
|
|
26
22
|
jobject paramsObj = RhoValueConverter(env).createObject(p);
|
27
|
-
env->CallStaticVoidMethod(clsMapView, midCreate, rho_cast<jstring>(
|
23
|
+
env->CallStaticVoidMethod(clsMapView, midCreate, rho_cast<jstring>(RHO_GOOGLE_API_KEY), paramsObj);
|
28
24
|
#else
|
29
|
-
|
30
|
-
alert_show_popup((char*)message);
|
25
|
+
RAWLOG_ERROR("MapView disabled at build time");
|
31
26
|
#endif
|
32
27
|
}
|
33
28
|
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#include "JNIRhodes.h"
|
2
|
+
|
3
|
+
#include <jni/com_rhomobile_rhodes_RhoMenu.h>
|
4
|
+
|
5
|
+
#include <common/RhodesApp.h>
|
6
|
+
#include <common/AppMenu.h>
|
7
|
+
|
8
|
+
#undef DEFAULT_LOGCATEGORY
|
9
|
+
#define DEFAULT_LOGCATEGORY "Menu"
|
10
|
+
|
11
|
+
typedef rho::Vector<rho::common::CAppMenuItem> items_t;
|
12
|
+
|
13
|
+
static items_t &menu_items(jlong menu)
|
14
|
+
{
|
15
|
+
return *reinterpret_cast<items_t*>(menu);
|
16
|
+
}
|
17
|
+
|
18
|
+
RHO_GLOBAL jlong JNICALL Java_com_rhomobile_rhodes_RhoMenu_allocMenu
|
19
|
+
(JNIEnv *, jobject)
|
20
|
+
{
|
21
|
+
std::auto_ptr<items_t> items(new items_t());
|
22
|
+
RHODESAPP().getAppMenu().copyMenuItems(*items);
|
23
|
+
return reinterpret_cast<jlong>(items.release());
|
24
|
+
}
|
25
|
+
|
26
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhoMenu_deallocMenu
|
27
|
+
(JNIEnv *, jobject, jlong menu)
|
28
|
+
{
|
29
|
+
delete &menu_items(menu);
|
30
|
+
}
|
31
|
+
|
32
|
+
RHO_GLOBAL jint JNICALL Java_com_rhomobile_rhodes_RhoMenu_getMenuSize
|
33
|
+
(JNIEnv *, jobject, jlong menu)
|
34
|
+
{
|
35
|
+
return menu_items(menu).size();
|
36
|
+
}
|
37
|
+
|
38
|
+
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhoMenu_getMenuItemLabel
|
39
|
+
(JNIEnv *env, jobject, jlong menu, jint idx)
|
40
|
+
{
|
41
|
+
return rho_cast<jstring>(env, menu_items(menu)[idx].m_strLabel.c_str());
|
42
|
+
}
|
43
|
+
|
44
|
+
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhoMenu_getMenuItemType
|
45
|
+
(JNIEnv *env, jobject, jlong menu, jint idx)
|
46
|
+
{
|
47
|
+
const char *s = "unknown";
|
48
|
+
namespace r = rho::common;
|
49
|
+
r::CAppMenuItem &item = menu_items(menu)[idx];
|
50
|
+
switch (item.m_eType)
|
51
|
+
{
|
52
|
+
case r::CAppMenuItem::emtUrl: s = "url"; break;
|
53
|
+
case r::CAppMenuItem::emtRefresh: s = "refresh"; break;
|
54
|
+
case r::CAppMenuItem::emtHome: s = "home"; break;
|
55
|
+
case r::CAppMenuItem::emtBack: s = "back"; break;
|
56
|
+
case r::CAppMenuItem::emtSync: s = "sync"; break;
|
57
|
+
case r::CAppMenuItem::emtOptions: s = "options"; break;
|
58
|
+
case r::CAppMenuItem::emtLog: s = "log"; break;
|
59
|
+
case r::CAppMenuItem::emtExit: s = "exit"; break;
|
60
|
+
case r::CAppMenuItem::emtClose: s = "close"; break;
|
61
|
+
}
|
62
|
+
return rho_cast<jstring>(env, s);
|
63
|
+
}
|
64
|
+
|
65
|
+
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhoMenu_getMenuItemUrl
|
66
|
+
(JNIEnv *env, jobject, jlong menu, jint idx)
|
67
|
+
{
|
68
|
+
return rho_cast<jstring>(env, menu_items(menu)[idx].m_strLink.c_str());
|
69
|
+
}
|
70
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#include "JNIRhodes.h"
|
2
|
+
|
3
|
+
#include <common/rhoparams.h>
|
4
|
+
|
5
|
+
#undef DEFAULT_LOGCATEGORY
|
6
|
+
#define DEFAULT_LOGCATEGORY "NavBar"
|
7
|
+
|
8
|
+
RHO_GLOBAL void create_navbar(rho_param *p)
|
9
|
+
{
|
10
|
+
RHO_NOT_IMPLEMENTED;
|
11
|
+
}
|
12
|
+
|
13
|
+
RHO_GLOBAL void remove_navbar()
|
14
|
+
{
|
15
|
+
RHO_NOT_IMPLEMENTED;
|
16
|
+
}
|
@@ -284,9 +284,35 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_Rhodes_makeLink
|
|
284
284
|
env->ThrowNew(env->FindClass("java/lang/RuntimeException"), "Can not create symlink");
|
285
285
|
}
|
286
286
|
|
287
|
+
static bool set_capabilities(JNIEnv *env)
|
288
|
+
{
|
289
|
+
char const *caps[] = {
|
290
|
+
#define RHO_DEFINE_CAP(x) #x,
|
291
|
+
#include <rhocaps.inc>
|
292
|
+
#undef RHO_DEFINE_CAP
|
293
|
+
};
|
294
|
+
std::map<std::string, bool> actual_caps;
|
295
|
+
#define RHO_DEFINE_CAP(x) actual_caps[#x] = RHO_CAP_ ## x ## _ENABLED;
|
296
|
+
#include <rhocaps.inc>
|
297
|
+
#undef RHO_DEFINE_CAP
|
298
|
+
|
299
|
+
jclass cls = getJNIClass(RHODES_JAVA_CLASS_CAPABILITIES);
|
300
|
+
if (!cls) return false;
|
301
|
+
for (size_t i = 0, lim = sizeof(caps)/sizeof(caps[0]); i < lim; ++i)
|
302
|
+
{
|
303
|
+
std::string field_name = std::string(caps[i]) + "_ENABLED";
|
304
|
+
jfieldID fid = getJNIClassStaticField(env, cls, field_name.c_str(), "Z");
|
305
|
+
if (!fid) return false;
|
306
|
+
env->SetStaticBooleanField(cls, fid, actual_caps[caps[i]]);
|
307
|
+
}
|
308
|
+
return true;
|
309
|
+
}
|
310
|
+
|
287
311
|
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_Rhodes_createRhodesApp
|
288
312
|
(JNIEnv *env, jobject, jstring path)
|
289
313
|
{
|
314
|
+
if (!set_capabilities(env)) return;
|
315
|
+
|
290
316
|
g_rootPath = rho_cast<std::string>(path);
|
291
317
|
|
292
318
|
// Init SQLite temp directory
|
@@ -371,3 +397,14 @@ RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_Rhodes_normalizeUrl
|
|
371
397
|
return newStr;
|
372
398
|
}
|
373
399
|
|
400
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_Rhodes_navigateBack
|
401
|
+
(JNIEnv *, jclass)
|
402
|
+
{
|
403
|
+
rho_rhodesapp_navigate_back();
|
404
|
+
}
|
405
|
+
|
406
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_Rhodes_loadUrl
|
407
|
+
(JNIEnv *, jclass, jstring str)
|
408
|
+
{
|
409
|
+
rho_rhodesapp_load_url(rho_cast<std::string>(str).c_str());
|
410
|
+
}
|
@@ -70,7 +70,7 @@ SSLImpl::SSLImpl()
|
|
70
70
|
if (!cls) return;
|
71
71
|
midConstructor = getJNIClassMethod(env, cls, "<init>", "()V");
|
72
72
|
if (!midConstructor) return;
|
73
|
-
midConnect = getJNIClassMethod(env, cls, "connect", "(
|
73
|
+
midConnect = getJNIClassMethod(env, cls, "connect", "(IZ)Z");
|
74
74
|
if (!midConnect) return;
|
75
75
|
midShutdown = getJNIClassMethod(env, cls, "shutdown", "()V");
|
76
76
|
if (!midShutdown) return;
|
@@ -95,12 +95,12 @@ void SSLImpl::freeStorage(void *ptr)
|
|
95
95
|
jnienv()->DeleteGlobalRef(obj);
|
96
96
|
}
|
97
97
|
|
98
|
-
CURLcode SSLImpl::connect(int sockfd, int nonblocking, int *done, void *storage)
|
98
|
+
CURLcode SSLImpl::connect(int sockfd, int nonblocking, int *done, int ssl_verify_peer, void *storage)
|
99
99
|
{
|
100
100
|
if (!storage) return CURLE_SSL_CONNECT_ERROR;
|
101
101
|
|
102
102
|
jobject obj = (jobject)storage;
|
103
|
-
jboolean result = jnienv()->CallBooleanMethod(obj, midConnect, sockfd);
|
103
|
+
jboolean result = jnienv()->CallBooleanMethod(obj, midConnect, sockfd, (jboolean)ssl_verify_peer);
|
104
104
|
if (!result)
|
105
105
|
return CURLE_SSL_CONNECT_ERROR;
|
106
106
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#undef DEFAULT_LOGCATEGORY
|
6
6
|
#define DEFAULT_LOGCATEGORY "WebView"
|
7
7
|
|
8
|
-
RHO_GLOBAL void
|
8
|
+
RHO_GLOBAL void rho_webview_navigate(const char* url, int index)
|
9
9
|
{
|
10
10
|
JNIEnv *env = jnienv();
|
11
11
|
jclass cls = getJNIClass(RHODES_JAVA_CLASS_WEB_VIEW);
|
@@ -19,7 +19,7 @@ RHO_GLOBAL void webview_navigate(char* url, int index)
|
|
19
19
|
env->DeleteLocalRef(objNormUrl);
|
20
20
|
}
|
21
21
|
|
22
|
-
RHO_GLOBAL void
|
22
|
+
RHO_GLOBAL void rho_webview_refresh(int index)
|
23
23
|
{
|
24
24
|
JNIEnv *env = jnienv();
|
25
25
|
jclass cls = getJNIClass(RHODES_JAVA_CLASS_WEB_VIEW);
|
@@ -29,7 +29,17 @@ RHO_GLOBAL void webview_refresh(int index)
|
|
29
29
|
env->CallStaticVoidMethod(cls, mid, index);
|
30
30
|
}
|
31
31
|
|
32
|
-
RHO_GLOBAL
|
32
|
+
RHO_GLOBAL void rho_webview_navigate_back()
|
33
|
+
{
|
34
|
+
JNIEnv *env = jnienv();
|
35
|
+
jclass cls = getJNIClass(RHODES_JAVA_CLASS_WEB_VIEW);
|
36
|
+
if (!cls) return;
|
37
|
+
jmethodID mid =getJNIClassStaticMethod(env, cls, "navigateBack", "()V");
|
38
|
+
if (!mid) return;
|
39
|
+
env->CallStaticVoidMethod(cls, mid);
|
40
|
+
}
|
41
|
+
|
42
|
+
RHO_GLOBAL const char* rho_webview_current_location(int index)
|
33
43
|
{
|
34
44
|
static std::string curLoc;
|
35
45
|
|
@@ -41,15 +51,15 @@ RHO_GLOBAL char* webview_current_location(int index)
|
|
41
51
|
|
42
52
|
jstring str = (jstring)env->CallStaticObjectMethod(cls, mid, index);
|
43
53
|
curLoc = rho_cast<std::string>(str);
|
44
|
-
return
|
54
|
+
return curLoc.c_str();
|
45
55
|
}
|
46
56
|
|
47
|
-
RHO_GLOBAL void
|
57
|
+
RHO_GLOBAL void rho_webview_set_menu_items(VALUE valMenu)
|
48
58
|
{
|
49
59
|
rho_rhodesapp_setViewMenu(valMenu);
|
50
60
|
}
|
51
61
|
|
52
|
-
RHO_GLOBAL int
|
62
|
+
RHO_GLOBAL int rho_webview_active_tab()
|
53
63
|
{
|
54
64
|
JNIEnv *env = jnienv();
|
55
65
|
jclass cls = getJNIClass(RHODES_JAVA_CLASS_WEB_VIEW);
|
@@ -60,7 +70,7 @@ RHO_GLOBAL int webview_active_tab()
|
|
60
70
|
return env->CallStaticIntMethod(cls, mid);
|
61
71
|
}
|
62
72
|
|
63
|
-
RHO_GLOBAL char*
|
73
|
+
RHO_GLOBAL const char* rho_webview_execute_js(const char* js, int index)
|
64
74
|
{
|
65
75
|
static std::string result;
|
66
76
|
|
@@ -77,3 +87,7 @@ RHO_GLOBAL char* webview_execute_js(char* js, int index)
|
|
77
87
|
return (char*)result.c_str();
|
78
88
|
}
|
79
89
|
|
90
|
+
RHO_GLOBAL void rho_webview_full_screen_mode(int enable)
|
91
|
+
{
|
92
|
+
//TODO: rho_webview_full_screen_mode
|
93
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,11 +1,26 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<
|
2
|
+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
3
|
android:layout_width="fill_parent"
|
4
4
|
android:layout_height="fill_parent"
|
5
5
|
android:orientation="vertical">
|
6
6
|
|
7
7
|
<SurfaceView
|
8
|
-
android:id="@+id/surface"
|
8
|
+
android:id="@+id/surface"
|
9
|
+
android:layout_width="fill_parent"
|
10
|
+
android:layout_height="fill_parent"
|
11
|
+
android:layout_weight="1">
|
9
12
|
</SurfaceView>
|
13
|
+
<ImageButton
|
14
|
+
android:id="@+id/cameraButton"
|
15
|
+
android:layout_width="wrap_content"
|
16
|
+
android:layout_height="wrap_content"
|
17
|
+
android:clickable="true"
|
18
|
+
android:src="@drawable/camera"
|
19
|
+
android:layout_gravity="top|right"
|
20
|
+
android:layout_marginTop="10px"
|
21
|
+
android:layout_marginRight="10px"
|
22
|
+
android:layout_marginLeft="10px"
|
23
|
+
android:layout_marginBottom="10px">
|
24
|
+
</ImageButton>
|
10
25
|
|
11
|
-
</
|
26
|
+
</FrameLayout>
|
@@ -1,12 +1,2 @@
|
|
1
1
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
2
|
-
<item android:title="@string/home" android:id="@+id/navigation_home" android:icon="@drawable/home"/>
|
3
|
-
<item android:title="@string/forward" android:id="@+id/navigation_forward" android:icon="@drawable/next" />
|
4
|
-
<item android:title="@string/back" android:id="@+id/navigation_back" android:icon="@drawable/back"/>
|
5
|
-
<item android:title="@string/refresh" android:id="@+id/refresh" android:icon="@drawable/refresh"/>
|
6
|
-
<item android:title="@string/sync" android:icon="@drawable/sync" android:id="@+id/sync" />
|
7
|
-
<item android:title="@string/options" android:icon="@drawable/options" android:id="@+id/options" />
|
8
|
-
<item android:title="@string/about" android:icon="@drawable/info" android:id="@+id/about" />
|
9
|
-
<item android:title="@string/exit" android:icon="@drawable/exit" android:id="@+id/exit" />
|
10
|
-
<item android:title="@string/logview" android:id="@+id/logview" />
|
11
|
-
<item android:title="@string/logoptions" android:id="@+id/logoptions" />
|
12
2
|
</menu>
|