rhodes 2.2.6 → 2.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +20 -0
- data/README.md +46 -0
- data/Rakefile +85 -80
- data/bin/rhodes +2 -2
- data/bin/rhogen +1 -1
- data/doc/application.txt +277 -0
- data/doc/bb-css.txt +209 -0
- data/doc/build.txt +785 -0
- data/doc/configuration.txt +236 -0
- data/doc/connect-to-web-services.txt +282 -0
- data/doc/contributing.txt +64 -0
- data/doc/css-framework.txt +144 -0
- data/doc/device-caps.txt +1152 -0
- data/doc/extensions.txt +528 -0
- data/doc/files.txt +4 -0
- data/doc/generator.txt +141 -0
- data/doc/install.txt +35 -0
- data/doc/introduction.txt +88 -0
- data/doc/rhom.txt +826 -0
- data/doc/standard-css.txt +392 -0
- data/doc/synchronization.txt +542 -0
- data/doc/test-log-debug.txt +148 -0
- data/doc/tutorial.txt +136 -0
- data/doc/ui.txt +766 -0
- data/installer/EnvVarUpdate.nsh +328 -0
- data/installer/README.html +81 -0
- data/installer/RHOSYNC-LICENSE.txt +675 -0
- data/installer/icon.ico +0 -0
- data/installer/instant-rhodes.nsi +427 -0
- data/lib/build/jake.rb +15 -1
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/imageprovider.cpp +1 -1
- data/lib/extensions/barcode/ext/barcode/platform/bb/Barcode6.files +45 -0
- data/lib/extensions/barcode/ext/barcode/platform/bb/Rakefile +6 -0
- data/lib/extensions/barcode/ext/barcode/platform/bb/barcode6.jdp +92 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +7 -4
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Rakefile +2 -1
- data/lib/extensions/barcode/ext/barcode/platform/wm/src/wm_imageprovider.cpp +1 -1
- data/lib/extensions/digest-sha1/ext/build.bat +1 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +335 -0
- data/lib/extensions/esri/ext/build +17 -0
- data/lib/extensions/esri/ext/build.bat +29 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.h +7 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.mm +58 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactoryRegister.mm +22 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewManager.h +21 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewManager.mm +32 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/InitESRI.c +5 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.h +143 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.m +919 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI.xcodeproj/project.pbxproj +320 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI_Prefix.pch +7 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Rakefile +76 -0
- data/lib/extensions/esri/ext.yml +3 -0
- data/lib/extensions/net-http/monitor.rb +265 -0
- data/lib/extensions/net-http/net/ftp.rb +981 -0
- data/lib/extensions/net-http/thread.rb +367 -0
- data/lib/extensions/rhocgi/cgi.rb +16 -0
- data/lib/extensions/rhospec/rhospec.rb +118 -0
- data/lib/framework/base64.rb +91 -0
- data/lib/framework/builtinME.rb +13 -10
- data/lib/framework/ostruct.rb +145 -0
- data/lib/framework/res/back_btn.wm.png +0 -0
- data/lib/framework/res/blue_pushpin.wm.png +0 -0
- data/lib/framework/res/blue_pushpin_small.wm.png +0 -0
- data/lib/framework/res/callout.wm.png +0 -0
- data/lib/framework/res/callout_link.wm.png +0 -0
- data/lib/framework/res/forward_btn.wm.png +0 -0
- data/lib/framework/res/home_btn.wm.png +0 -0
- data/lib/framework/res/options_btn.wm.png +0 -0
- data/lib/framework/res/refresh_btn.wm.png +0 -0
- data/lib/framework/rho/render.rb +5 -2
- data/lib/framework/rho/rho.rb +320 -50
- data/lib/framework/rho/rhoapplication.rb +48 -10
- data/lib/framework/rho/rhonativeviewmanager.rb +73 -0
- data/lib/framework/rho/rhosupport.rb +15 -1
- data/lib/framework/rho/rhotabbar.rb +29 -0
- data/lib/framework/rho/rhotoolbar.rb +17 -0
- data/lib/framework/rho/rhoutils.rb +22 -6
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rholang/rhomsg_de.rb +4 -3
- data/lib/framework/rholang/rhomsg_en.rb +1 -0
- data/lib/framework/rholang/rhomsg_es.rb +1 -0
- data/lib/framework/rholang/rhomsg_it.rb +1 -0
- data/lib/framework/rhom/rhom.rb +31 -10
- data/lib/framework/rhom/rhom_db_adapter.rb +33 -23
- data/lib/framework/rhom/rhom_object_factory.rb +465 -249
- data/lib/framework/rhom/rhom_source.rb +22 -7
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +83 -20
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +5 -0
- data/platform/android/Rhodes/jni/include/rhodes/RhoClassFactory.h +2 -0
- data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +9 -5
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesAppOptions.h +53 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +46 -56
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_SplashScreen.h +10 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_mapview_MapView.h +93 -0
- data/platform/android/Rhodes/jni/include/rhodes/rhocryptimpl.h +38 -0
- data/platform/android/Rhodes/jni/include/rhodes.h +64 -8
- data/platform/android/Rhodes/jni/src/RhoClassFactory.cpp +6 -0
- data/platform/android/Rhodes/jni/src/alert.cpp +5 -11
- data/platform/android/Rhodes/jni/src/bluetooth.cpp +66 -29
- data/platform/android/Rhodes/jni/src/callbacks.cpp +24 -21
- data/platform/android/Rhodes/jni/src/camera.cpp +2 -6
- data/platform/android/Rhodes/jni/src/datetimepicker.cpp +13 -11
- data/platform/android/Rhodes/jni/src/event.cpp +9 -15
- data/platform/android/Rhodes/jni/src/fileapi.cpp +13 -27
- data/platform/android/Rhodes/jni/src/logconf.cpp +3 -3
- data/platform/android/Rhodes/jni/src/mapview.cpp +696 -16
- data/platform/android/Rhodes/jni/src/menu.cpp +3 -3
- data/platform/android/Rhodes/jni/src/nativebar.cpp +55 -4
- data/platform/android/Rhodes/jni/src/nativeview.cpp +33 -0
- data/platform/android/Rhodes/jni/src/phonebook.cpp +6 -11
- data/platform/android/Rhodes/jni/src/rhoconf.cpp +4 -4
- data/platform/android/Rhodes/jni/src/rhocryptimpl.cpp +87 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +55 -34
- data/platform/android/Rhodes/jni/src/ringtones.cpp +2 -3
- data/platform/android/Rhodes/jni/src/signature.cpp +3 -5
- data/platform/android/Rhodes/jni/src/splashscreen.cpp +7 -0
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +17 -20
- data/platform/android/Rhodes/jni/src/webview.cpp +13 -12
- data/platform/android/Rhodes/res/drawable/callout.png +0 -0
- data/platform/android/Rhodes/res/drawable/callout_link.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_cancel.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_clear.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_ok.png +0 -0
- data/platform/android/Rhodes/res/layout/datetime.xml +4 -0
- data/platform/android/Rhodes/res/layout/signature.xml +24 -17
- data/platform/android/Rhodes/res/layout/status_bar_ongoing_event_progress_bar.xml +102 -0
- data/platform/android/Rhodes/res/values/strings.xml +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +6 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Base64.java +575 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +83 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +21 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +23 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +151 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +372 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesAppOptions.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +58 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +705 -523
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java +167 -85
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Utils.java +36 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +4 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +33 -20
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/IRhoBluetoothManager.java +2 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManager.java +2 -24
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerNew.java +106 -36
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerOld.java +15 -58
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothSession.java +0 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +6 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/FileList.java +4 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +91 -27
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java +6 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java +275 -42
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +1 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +120 -43
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +518 -28
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +434 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapTouch.java +20 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +296 -336
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MultiTouchHandler.java +111 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/OneTouchHandler.java +77 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/TouchHandler.java +10 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +0 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +5 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +6 -11
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +6 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +0 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/ui/LogViewDialog.java +9 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +8 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java +5 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +11 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +3 -5
- data/platform/android/build/RhodesSRC_build.files +32 -23
- data/platform/android/build/android.rake +28 -11
- data/platform/android/build/androidcommon.rb +2 -0
- data/platform/android/build/librhocommon_build.files +9 -5
- data/platform/android/build/librhodes_build.files +1 -0
- data/platform/android/build/libruby_build.files +1 -0
- data/platform/bb/Hsqldb/Hsqldb.jdp +0 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +10 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +37 -5
- data/platform/bb/Hsqldb/src/org/hsqldb/Column.java +5 -5
- data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Function.java +73 -78
- data/platform/bb/Hsqldb/src/org/hsqldb/Library.java +288 -8
- data/platform/bb/RubyVM/RubyVM.jdp +3 -0
- data/platform/bb/RubyVM/src/com/rho/FilePath.java +13 -1
- data/platform/bb/RubyVM/src/com/rho/IRhoRubyHelper.java +2 -2
- data/platform/bb/RubyVM/src/com/rho/RhoAppAdapter.java +12 -0
- data/platform/bb/RubyVM/src/com/rho/RhoClassFactory.java +18 -1
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +128 -108
- data/platform/bb/RubyVM/src/com/rho/RhoLogConf.java +9 -10
- data/platform/bb/RubyVM/src/com/rho/RhoLogger.java +16 -1
- data/platform/bb/RubyVM/src/com/rho/RhoProfiler.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +20 -0
- data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +5 -2
- data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +65 -46
- data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +192 -50
- data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +8 -114
- data/platform/bb/RubyVM/src/com/rho/db/DBException.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/db/IDBCallback.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/db/IDBResult.java +5 -3
- data/platform/bb/RubyVM/src/com/rho/db/IDBStorage.java +5 -1
- data/platform/bb/RubyVM/src/com/rho/file/FileAccessBB.java +109 -0
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +85 -0
- data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +12 -4
- data/platform/bb/RubyVM/src/com/rho/net/NetResponse.java +5 -0
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +37 -23
- data/platform/bb/RubyVM/src/com/rho/net/URI.java +84 -0
- data/platform/bb/RubyVM/src/com/rho/sync/ClientRegister.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +119 -61
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +61 -24
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +108 -54
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +121 -163
- data/platform/bb/RubyVM/src/com/xruby/GeneratedMethods/RubyString_Methods.java +23 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyMutex.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyRange.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyRegexp.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyString.java +208 -25
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyTime.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RhoSupport.java +5 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyAPI.java +12 -5
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyID.java +1 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule.java +16 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule_Methods.java +5 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyValue.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/stdlib/RubyStringIO.java +4 -1
- data/platform/bb/{Hsqldb → RubyVM}/src/j2me/math/Number.java +33 -0
- data/platform/bb/build/RubyVM_build.files +3 -0
- data/platform/bb/build/bb.rake +140 -62
- data/platform/bb/build/hsqldb_build.files +0 -2
- data/platform/bb/build/rhodes_build.files +5 -0
- data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +43 -7
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +23 -2
- data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +5 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteCopyResult.java +143 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteResult.java +269 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteStorage.java +446 -0
- data/platform/bb/rhodes/platform/common/com/rho/BrowserAdapter5.java +3 -0
- data/platform/bb/rhodes/platform/common/com/rho/RhoMainScreen.java +12 -2
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteCopyResult.java +2 -0
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteResult.java +2 -0
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteStorage.java +2 -0
- data/platform/bb/rhodes/resources/mappin.png +0 -0
- data/platform/bb/rhodes/rhodes.jdp +3 -0
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +21 -18
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +150 -0
- data/platform/bb/rhodes/src/com/rho/IBrowserAdapter.java +1 -0
- data/platform/bb/rhodes/src/com/rho/RhoMainScreen.java +63 -4
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +6 -5
- data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +242 -2
- data/platform/bb/rhodes/src/com/rho/db/SqliteCopyResult.java +143 -0
- data/platform/bb/rhodes/src/com/rho/db/SqliteResult.java +269 -0
- data/platform/bb/rhodes/src/com/rho/db/SqliteStorage.java +446 -0
- data/platform/bb/rhodes/src/com/rho/file/Jsr75File.java +1 -1
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +71 -14
- data/platform/bb/rhodes/src/com/rho/net/bb/BBHttpConnection.java +4 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/Alert.java +28 -12
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +100 -4
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +3 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/XMLParser.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/NativeBar.java +32 -0
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +9 -2
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +174 -41
- data/platform/bb/rhodes/src/rhomobile/datetime/DateTimePicker.java +52 -3
- data/platform/bb/rhodes/src/rhomobile/datetime/DateTimeScreen.java +33 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/Annotation.java +2 -14
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +686 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapProvider.java +14 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GeoCoding.java +13 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleGeoCoding.java +174 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapField.java +104 -330
- data/platform/bb/rhodes/src/rhomobile/mapview/MapTools.java +79 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapView.java +35 -12
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewParent.java +2 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewScreen.java +336 -44
- data/platform/bb/rhodes/src/rhomobile/mapview/RhoMapField.java +3 -6
- data/platform/iphone/Classes/AppManager/AppManager.m +19 -4
- data/platform/iphone/Classes/DateTime.h +4 -0
- data/platform/iphone/Classes/DateTime.m +1 -1
- data/platform/iphone/Classes/DateTimePicker.m +8 -1
- data/platform/iphone/Classes/DateTimePickerDelegate.m +7 -1
- data/platform/iphone/Classes/Event/Event.m +2 -2
- data/platform/iphone/Classes/MapView/MapViewController.h +4 -1
- data/platform/iphone/Classes/MapView/MapViewController.m +6 -46
- data/platform/iphone/Classes/MapView/MapViewManager.h +26 -0
- data/platform/iphone/Classes/MapView/MapViewManager.m +172 -0
- data/platform/iphone/Classes/NativeBar.h +34 -0
- data/platform/iphone/Classes/NativeBar.m +131 -26
- data/platform/iphone/Classes/NativeView/NVDelegate.h +26 -0
- data/platform/iphone/Classes/NativeView/NVDelegate.m +40 -0
- data/platform/iphone/Classes/NativeView/NVViewController.h +24 -0
- data/platform/iphone/Classes/NativeView/NVViewController.m +90 -0
- data/platform/iphone/Classes/NativeView/RhoNativeViewManager.mm +449 -0
- data/platform/iphone/Classes/{RhoNativeViewManagerOC.h → NativeView/RhoNativeViewManagerOC.h} +15 -0
- data/platform/iphone/Classes/RhoAlert.m +3 -3
- data/platform/iphone/Classes/RhoMainView.h +3 -0
- data/platform/iphone/Classes/Rhodes.h +6 -2
- data/platform/iphone/Classes/Rhodes.m +47 -79
- data/platform/iphone/Classes/Signature/SignatureViewController.m +1 -0
- data/platform/iphone/Classes/SimpleMainView.h +18 -1
- data/platform/iphone/Classes/SimpleMainView.m +180 -35
- data/platform/iphone/Classes/SplitView/LeftViewController.h +1 -1
- data/platform/iphone/Classes/SplitView/LeftViewController.m +13 -7
- data/platform/iphone/Classes/SplitView/RightViewController.h +1 -1
- data/platform/iphone/Classes/SplitView/RightViewController.m +26 -11
- data/platform/iphone/Classes/SplitView/SplittedMainView.h +1 -6
- data/platform/iphone/Classes/SplitView/SplittedMainView.m +14 -52
- data/platform/iphone/Classes/TabbedMainView.h +25 -3
- data/platform/iphone/Classes/TabbedMainView.m +340 -14
- data/platform/iphone/ESRI/BluePushpin.png +0 -0
- data/platform/iphone/ESRI/BluePushpin@2x.png +0 -0
- data/platform/iphone/ESRI/esri.png +0 -0
- data/platform/iphone/ESRI/esri@2x.png +0 -0
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +26 -3
- data/platform/iphone/rbuild/iphone.rake +100 -4
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +12 -0
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +116 -12
- data/platform/shared/SyncClient/SyncClient.cpp +29 -3
- data/platform/shared/SyncClient/SyncClient.h +2 -1
- data/platform/shared/common/IRhoClassFactory.h +3 -0
- data/platform/shared/common/IRhoCrypt.h +16 -0
- data/platform/shared/common/IRhoThreadImpl.h +1 -0
- data/platform/shared/common/RhoAppAdapter.h +2 -0
- data/platform/shared/common/RhoConf.cpp +97 -46
- data/platform/shared/common/RhoConf.h +14 -13
- data/platform/shared/common/RhoFile.cpp +10 -0
- data/platform/shared/common/RhoFile.h +1 -0
- data/platform/shared/common/RhoMath.cpp +43 -0
- data/platform/shared/common/RhoMath.h +27 -0
- data/platform/shared/common/RhoNativeViewManager.h +27 -1
- data/platform/shared/common/RhoPort.h +11 -0
- data/platform/shared/common/RhoStd.h +5 -0
- data/platform/shared/common/RhoThread.cpp +1 -1
- data/platform/shared/common/RhoThread.h +1 -1
- data/platform/shared/common/RhodesApp.cpp +381 -139
- data/platform/shared/common/RhodesApp.h +24 -10
- data/platform/shared/common/RhodesAppBase.cpp +72 -1
- data/platform/shared/common/RhodesAppBase.h +5 -1
- data/platform/shared/common/SplashScreen.h +4 -4
- data/platform/shared/common/ThreadQueue.cpp +44 -17
- data/platform/shared/common/ThreadQueue.h +4 -0
- data/platform/shared/common/app_build_configs.c +0 -1
- data/platform/shared/common/iphone/RhoClassfactory.h +6 -0
- data/platform/shared/common/iphone/RhoCryptImpl.h +47 -0
- data/platform/shared/common/iphone/RhoCryptImpl.mm +286 -0
- data/platform/shared/common/map/ESRIMapEngine.cpp +921 -0
- data/platform/shared/common/map/ESRIMapEngine.h +255 -0
- data/platform/shared/common/map/GoogleMapEngine.cpp +160 -0
- data/platform/shared/common/map/GoogleMapEngine.h +52 -0
- data/platform/shared/common/map/MapEngine.cpp +304 -0
- data/platform/shared/common/map/MapEngine.h +214 -0
- data/platform/shared/db/DBAdapter.cpp +147 -18
- data/platform/shared/db/DBAdapter.h +38 -12
- data/platform/shared/db/DBAttrManager.cpp +4 -3
- data/platform/shared/db/DBAttrManager.h +7 -7
- data/platform/shared/db/res/db/syncdb.triggers +0 -5
- data/platform/shared/db/res/db/syncdb_java.triggers +21 -0
- data/platform/shared/json/JSONIterator.cpp +11 -1
- data/platform/shared/json/JSONIterator.h +1 -0
- data/platform/shared/logging/RhoLogConf.cpp +29 -12
- data/platform/shared/net/CURLNetRequest.cpp +80 -25
- data/platform/shared/net/CURLNetRequest.h +6 -2
- data/platform/shared/net/HttpServer.cpp +12 -6
- data/platform/shared/net/HttpServer.h +2 -1
- data/platform/shared/net/INetRequest.h +1 -0
- data/platform/shared/ruby/ext/alert/alert.i +5 -0
- data/platform/shared/ruby/ext/alert/alert_wrap.c +439 -108
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker.i +42 -0
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +521 -120
- data/platform/shared/ruby/ext/nativebar/nativebar.i +16 -0
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +623 -128
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager.i +18 -0
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +2321 -0
- data/platform/shared/ruby/ext/rho/extensions.c +0 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +53 -0
- data/platform/shared/ruby/ext/rho/rhoruby.h +6 -0
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +6 -3
- data/platform/shared/ruby/ext/syncengine/syncengine.i +9 -1
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +61 -0
- data/platform/shared/ruby/ext/system/system.i +4 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +33 -5
- data/platform/shared/rubyext/RhoAppAdapter.cpp +11 -1
- data/platform/shared/rubyext/System.cpp +9 -0
- data/platform/shared/rubyext/WebView.h +1 -0
- data/platform/shared/sqlite/crypto.c +907 -0
- data/platform/shared/sqlite/sqlite3.c +6 -0
- data/platform/shared/sync/SyncEngine.cpp +49 -19
- data/platform/shared/sync/SyncEngine.h +0 -1
- data/platform/shared/sync/SyncNotify.cpp +14 -5
- data/platform/shared/sync/SyncNotify.h +2 -2
- data/platform/shared/sync/SyncSource.cpp +79 -33
- data/platform/shared/sync/SyncSource.h +1 -0
- data/platform/shared/sync/SyncThread.cpp +26 -11
- data/platform/shared/xruby/src/com/xruby/compiler/codedom/StringExpression.java +4 -2
- data/platform/wm/RhoLib/RhoLib.vcproj +108 -72
- data/platform/wm/build/wm.rake +6 -0
- data/platform/wm/rhodes/Alert.cpp +4 -3
- data/platform/wm/rhodes/Alert.h +1 -1
- data/platform/wm/rhodes/DateTimePicker.cpp +30 -3
- data/platform/wm/rhodes/DateTimePicker.h +9 -1
- data/platform/wm/rhodes/MainWindow.cpp +121 -61
- data/platform/wm/rhodes/MainWindow.h +29 -4
- data/platform/wm/rhodes/MapView/Graphics.cpp +547 -0
- data/platform/wm/rhodes/MapView/Graphics.h +136 -0
- data/platform/wm/rhodes/MapView/MapViewManager.cpp +391 -0
- data/platform/wm/rhodes/MapView/MapViewManager.h +158 -0
- data/platform/wm/rhodes/RhoCryptImpl.cpp +248 -0
- data/platform/wm/rhodes/RhoCryptImpl.h +51 -0
- data/platform/wm/rhodes/RhoNativeViewManager.cpp +208 -0
- data/platform/wm/rhodes/Rhodes.cpp +94 -102
- data/platform/wm/rhodes/Rhodes.rc +27 -0
- data/platform/wm/rhodes/SyncStatusDlg.cpp +1 -0
- data/platform/wm/rhodes/SyncStatusDlg.h +2 -1
- data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +7 -4
- data/platform/wm/rhodes/camera/Camera.cpp +36 -15
- data/platform/wm/rhodes/camera/Camera.h +0 -4
- data/platform/wm/rhodes/resource.h +10 -2
- data/platform/wm/rhodes/rho/common/RhoClassFactory.cpp +7 -0
- data/platform/wm/rhodes/rho/common/RhoClassFactory.h +1 -0
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +10 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.h +10 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +513 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.h +74 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +22 -10
- data/platform/wm/rhodes/rho/rubyext/WebView.cpp +5 -0
- data/platform/wm/rhodes/rhodes.vcproj +38 -2
- data/platform/wm/rhodes/stdafx.h +2 -1
- data/platform/wm/rubylib/rubylib.vcproj +12 -0
- data/rakefile.rb +85 -80
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.m +14 -3
- data/res/build-tools/iphonesim/build/Release/iphonesim +0 -0
- data/res/build-tools/iphonesim/iphonesim.xcodeproj/project.pbxproj +2 -0
- data/res/build-tools/xruby-0.3.3.jar +0 -0
- data/res/generators/templates/application/app/application.rb +2 -2
- data/res/generators/templates/application/app/helpers/application_helper.rb +1 -1
- data/res/generators/templates/application/public/css/android.css +1 -0
- data/res/generators/templates/application/public/jqtouch/jquery.1.3.2.min.js +1 -1
- data/res/generators/templates/application/rhoconfig.txt +66 -14
- data/rhodes.gemspec +3 -3
- data/spec/framework_spec/app/spec/core/file/expand_path_spec.rb +7 -3
- data/spec/framework_spec/build.yml +1 -1
- data/spec/phone_spec/Rakefile +1 -0
- data/spec/phone_spec/app/Account/account.rb +2 -0
- data/spec/phone_spec/app/Account_s/account_s.rb +7 -0
- data/spec/phone_spec/app/spec/{fixtures → array/fixtures}/classes.rb +0 -0
- data/spec/phone_spec/app/spec/{array_pack_spec.rb → array/pack_spec.rb} +2 -1
- data/spec/phone_spec/app/spec/bulksync_spec.rb +1 -0
- data/spec/phone_spec/app/spec/contacts_spec.rb +2 -0
- data/spec/phone_spec/app/spec/rho_spec.rb +34 -233
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +396 -87
- data/spec/phone_spec/app/spec/string/element_set_spec.rb +251 -0
- data/spec/phone_spec/app/spec/string/end_with_spec.rb +49 -0
- data/spec/phone_spec/app/spec/string/fixtures/classes.rb +27 -0
- data/spec/phone_spec/app/spec/{lstrip_spec.rb → string/lstrip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/string/replace_spec.rb +52 -0
- data/spec/phone_spec/app/spec/{rstrip_spec.rb → string/rstrip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/string/slice_spec.rb +473 -0
- data/spec/phone_spec/app/spec/string/split_spec.rb +302 -0
- data/spec/phone_spec/app/spec/string/start_with_spec.rb +48 -0
- data/spec/phone_spec/app/spec/{strip_spec.rb → string/strip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/syncengine_spec.rb +30 -1
- data/spec/phone_spec/app/spec_runner.rb +15 -7
- data/spec/phone_spec/build.yml +2 -2
- metadata +154 -25
- data/README.textile +0 -45
- data/platform/android/Rhodes/AndroidManifest.full.xml +0 -62
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/Manifest.java +0 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoActivity.java +0 -20
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +0 -193
- data/platform/bb/Hsqldb/src/com/rho/file/FileAccessBB.java +0 -25
- data/platform/bb/RubyVM/src/com/rho/AppBuildConfig.java +0 -22
- data/platform/bb/RubyVM/src/com/rho/Capabilities.java +0 -6
- data/platform/bb/RubyVM/src/com/rho/Extensions.java +0 -11
- data/platform/iphone/Classes/RhoNativeViewManager.mm +0 -226
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version
|
3
|
+
* Version 2.0.0
|
4
4
|
*
|
5
5
|
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
@@ -9,6 +9,7 @@
|
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
12
|
+
|
12
13
|
/* -----------------------------------------------------------------------------
|
13
14
|
* This section contains generic SWIG labels for method/variable
|
14
15
|
* declarations/attributes, and other compiler dependent labels.
|
@@ -16,14 +17,14 @@
|
|
16
17
|
|
17
18
|
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
18
19
|
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
19
|
-
# if defined(__SUNPRO_CC)
|
20
|
-
#
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
#
|
20
|
+
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
|
21
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
22
|
+
# elif defined(__HP_aCC)
|
23
|
+
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
|
24
|
+
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
|
25
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
25
26
|
# else
|
26
|
-
#
|
27
|
+
# define SWIGTEMPLATEDISAMBIGUATOR
|
27
28
|
# endif
|
28
29
|
#endif
|
29
30
|
|
@@ -51,6 +52,12 @@
|
|
51
52
|
# endif
|
52
53
|
#endif
|
53
54
|
|
55
|
+
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
56
|
+
# if defined(_MSC_VER)
|
57
|
+
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
58
|
+
# endif
|
59
|
+
#endif
|
60
|
+
|
54
61
|
#ifndef SWIGUNUSEDPARM
|
55
62
|
# ifdef __cplusplus
|
56
63
|
# define SWIGUNUSEDPARM(p)
|
@@ -106,6 +113,12 @@
|
|
106
113
|
# define _CRT_SECURE_NO_DEPRECATE
|
107
114
|
#endif
|
108
115
|
|
116
|
+
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
|
117
|
+
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
|
118
|
+
# define _SCL_SECURE_NO_DEPRECATE
|
119
|
+
#endif
|
120
|
+
|
121
|
+
|
109
122
|
/* -----------------------------------------------------------------------------
|
110
123
|
* This section contains generic SWIG labels for method/variable
|
111
124
|
* declarations/attributes, and other compiler dependent labels.
|
@@ -113,14 +126,14 @@
|
|
113
126
|
|
114
127
|
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
115
128
|
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
116
|
-
# if defined(__SUNPRO_CC)
|
117
|
-
#
|
118
|
-
#
|
119
|
-
|
120
|
-
|
121
|
-
#
|
129
|
+
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
|
130
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
131
|
+
# elif defined(__HP_aCC)
|
132
|
+
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
|
133
|
+
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
|
134
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
122
135
|
# else
|
123
|
-
#
|
136
|
+
# define SWIGTEMPLATEDISAMBIGUATOR
|
124
137
|
# endif
|
125
138
|
#endif
|
126
139
|
|
@@ -148,6 +161,12 @@
|
|
148
161
|
# endif
|
149
162
|
#endif
|
150
163
|
|
164
|
+
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
165
|
+
# if defined(_MSC_VER)
|
166
|
+
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
167
|
+
# endif
|
168
|
+
#endif
|
169
|
+
|
151
170
|
#ifndef SWIGUNUSEDPARM
|
152
171
|
# ifdef __cplusplus
|
153
172
|
# define SWIGUNUSEDPARM(p)
|
@@ -203,16 +222,22 @@
|
|
203
222
|
# define _CRT_SECURE_NO_DEPRECATE
|
204
223
|
#endif
|
205
224
|
|
225
|
+
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
|
226
|
+
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
|
227
|
+
# define _SCL_SECURE_NO_DEPRECATE
|
228
|
+
#endif
|
229
|
+
|
230
|
+
|
206
231
|
/* -----------------------------------------------------------------------------
|
207
232
|
* swigrun.swg
|
208
233
|
*
|
209
|
-
* This file contains generic
|
234
|
+
* This file contains generic C API SWIG runtime support for pointer
|
210
235
|
* type checking.
|
211
236
|
* ----------------------------------------------------------------------------- */
|
212
237
|
|
213
238
|
/* This should only be incremented when either the layout of swig_type_info changes,
|
214
239
|
or for whatever reason, the runtime changes incompatibly */
|
215
|
-
#define SWIG_RUNTIME_VERSION "
|
240
|
+
#define SWIG_RUNTIME_VERSION "4"
|
216
241
|
|
217
242
|
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
|
218
243
|
#ifdef SWIG_TYPE_TABLE
|
@@ -225,11 +250,11 @@
|
|
225
250
|
|
226
251
|
/*
|
227
252
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
228
|
-
creating a static or dynamic library from the
|
229
|
-
In 99.9% of the cases,
|
253
|
+
creating a static or dynamic library from the SWIG runtime code.
|
254
|
+
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
230
255
|
|
231
|
-
But only do this if
|
232
|
-
with your compiler or
|
256
|
+
But only do this if strictly necessary, ie, if you have problems
|
257
|
+
with your compiler or suchlike.
|
233
258
|
*/
|
234
259
|
|
235
260
|
#ifndef SWIGRUNTIME
|
@@ -247,6 +272,7 @@
|
|
247
272
|
|
248
273
|
/* Flags for pointer conversions */
|
249
274
|
#define SWIG_POINTER_DISOWN 0x1
|
275
|
+
#define SWIG_CAST_NEW_MEMORY 0x2
|
250
276
|
|
251
277
|
/* Flags for new pointer objects */
|
252
278
|
#define SWIG_POINTER_OWN 0x1
|
@@ -255,14 +281,14 @@
|
|
255
281
|
/*
|
256
282
|
Flags/methods for returning states.
|
257
283
|
|
258
|
-
The
|
284
|
+
The SWIG conversion methods, as ConvertPtr, return and integer
|
259
285
|
that tells if the conversion was successful or not. And if not,
|
260
286
|
an error code can be returned (see swigerrors.swg for the codes).
|
261
287
|
|
262
288
|
Use the following macros/flags to set or process the returning
|
263
289
|
states.
|
264
290
|
|
265
|
-
In old
|
291
|
+
In old versions of SWIG, code such as the following was usually written:
|
266
292
|
|
267
293
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
268
294
|
// success code
|
@@ -270,7 +296,7 @@
|
|
270
296
|
//fail code
|
271
297
|
}
|
272
298
|
|
273
|
-
Now you can be more explicit
|
299
|
+
Now you can be more explicit:
|
274
300
|
|
275
301
|
int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
|
276
302
|
if (SWIG_IsOK(res)) {
|
@@ -279,7 +305,7 @@
|
|
279
305
|
// fail code
|
280
306
|
}
|
281
307
|
|
282
|
-
|
308
|
+
which is the same really, but now you can also do
|
283
309
|
|
284
310
|
Type *ptr;
|
285
311
|
int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
|
@@ -297,7 +323,7 @@
|
|
297
323
|
|
298
324
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
299
325
|
identify the case and take care of the deallocation. Of course that
|
300
|
-
|
326
|
+
also requires SWIG_ConvertPtr to return new result values, such as
|
301
327
|
|
302
328
|
int SWIG_ConvertPtr(obj, ptr,...) {
|
303
329
|
if (<obj is ok>) {
|
@@ -315,7 +341,7 @@
|
|
315
341
|
|
316
342
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
317
343
|
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
|
318
|
-
|
344
|
+
SWIG errors code.
|
319
345
|
|
320
346
|
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
|
321
347
|
allows to return the 'cast rank', for example, if you have this
|
@@ -329,9 +355,8 @@
|
|
329
355
|
fooi(1) // cast rank '0'
|
330
356
|
|
331
357
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
358
|
+
*/
|
332
359
|
|
333
|
-
|
334
|
-
*/
|
335
360
|
#define SWIG_OK (0)
|
336
361
|
#define SWIG_ERROR (-1)
|
337
362
|
#define SWIG_IsOK(r) (r >= 0)
|
@@ -356,7 +381,6 @@
|
|
356
381
|
#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
|
357
382
|
#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
|
358
383
|
|
359
|
-
|
360
384
|
/* Cast-Rank Mode */
|
361
385
|
#if defined(SWIG_CASTRANK_MODE)
|
362
386
|
# ifndef SWIG_TypeRank
|
@@ -379,18 +403,16 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
|
379
403
|
#endif
|
380
404
|
|
381
405
|
|
382
|
-
|
383
|
-
|
384
406
|
#include <string.h>
|
385
407
|
|
386
408
|
#ifdef __cplusplus
|
387
409
|
extern "C" {
|
388
410
|
#endif
|
389
411
|
|
390
|
-
typedef void *(*swig_converter_func)(void *);
|
412
|
+
typedef void *(*swig_converter_func)(void *, int *);
|
391
413
|
typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
392
414
|
|
393
|
-
/* Structure to store
|
415
|
+
/* Structure to store information on one type */
|
394
416
|
typedef struct swig_type_info {
|
395
417
|
const char *name; /* mangled name of this type */
|
396
418
|
const char *str; /* human readable name of this type */
|
@@ -435,7 +457,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
435
457
|
while ((*f2 == ' ') && (f2 != l2)) ++f2;
|
436
458
|
if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
|
437
459
|
}
|
438
|
-
return (l1 - f1) - (l2 - f2);
|
460
|
+
return (int)((l1 - f1) - (l2 - f2));
|
439
461
|
}
|
440
462
|
|
441
463
|
/*
|
@@ -477,48 +499,66 @@ SWIG_TypeCompare(const char *nb, const char *tb) {
|
|
477
499
|
}
|
478
500
|
|
479
501
|
|
480
|
-
/* think of this as a c++ template<> or a scheme macro */
|
481
|
-
#define SWIG_TypeCheck_Template(comparison, ty) \
|
482
|
-
if (ty) { \
|
483
|
-
swig_cast_info *iter = ty->cast; \
|
484
|
-
while (iter) { \
|
485
|
-
if (comparison) { \
|
486
|
-
if (iter == ty->cast) return iter; \
|
487
|
-
/* Move iter to the top of the linked list */ \
|
488
|
-
iter->prev->next = iter->next; \
|
489
|
-
if (iter->next) \
|
490
|
-
iter->next->prev = iter->prev; \
|
491
|
-
iter->next = ty->cast; \
|
492
|
-
iter->prev = 0; \
|
493
|
-
if (ty->cast) ty->cast->prev = iter; \
|
494
|
-
ty->cast = iter; \
|
495
|
-
return iter; \
|
496
|
-
} \
|
497
|
-
iter = iter->next; \
|
498
|
-
} \
|
499
|
-
} \
|
500
|
-
return 0
|
501
|
-
|
502
502
|
/*
|
503
503
|
Check the typename
|
504
504
|
*/
|
505
505
|
SWIGRUNTIME swig_cast_info *
|
506
506
|
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
507
|
-
|
507
|
+
if (ty) {
|
508
|
+
swig_cast_info *iter = ty->cast;
|
509
|
+
while (iter) {
|
510
|
+
if (strcmp(iter->type->name, c) == 0) {
|
511
|
+
if (iter == ty->cast)
|
512
|
+
return iter;
|
513
|
+
/* Move iter to the top of the linked list */
|
514
|
+
iter->prev->next = iter->next;
|
515
|
+
if (iter->next)
|
516
|
+
iter->next->prev = iter->prev;
|
517
|
+
iter->next = ty->cast;
|
518
|
+
iter->prev = 0;
|
519
|
+
if (ty->cast) ty->cast->prev = iter;
|
520
|
+
ty->cast = iter;
|
521
|
+
return iter;
|
522
|
+
}
|
523
|
+
iter = iter->next;
|
524
|
+
}
|
525
|
+
}
|
526
|
+
return 0;
|
508
527
|
}
|
509
528
|
|
510
|
-
/*
|
529
|
+
/*
|
530
|
+
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
531
|
+
*/
|
511
532
|
SWIGRUNTIME swig_cast_info *
|
512
|
-
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *
|
513
|
-
|
533
|
+
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
|
534
|
+
if (ty) {
|
535
|
+
swig_cast_info *iter = ty->cast;
|
536
|
+
while (iter) {
|
537
|
+
if (iter->type == from) {
|
538
|
+
if (iter == ty->cast)
|
539
|
+
return iter;
|
540
|
+
/* Move iter to the top of the linked list */
|
541
|
+
iter->prev->next = iter->next;
|
542
|
+
if (iter->next)
|
543
|
+
iter->next->prev = iter->prev;
|
544
|
+
iter->next = ty->cast;
|
545
|
+
iter->prev = 0;
|
546
|
+
if (ty->cast) ty->cast->prev = iter;
|
547
|
+
ty->cast = iter;
|
548
|
+
return iter;
|
549
|
+
}
|
550
|
+
iter = iter->next;
|
551
|
+
}
|
552
|
+
}
|
553
|
+
return 0;
|
514
554
|
}
|
515
555
|
|
516
556
|
/*
|
517
557
|
Cast a pointer up an inheritance hierarchy
|
518
558
|
*/
|
519
559
|
SWIGRUNTIMEINLINE void *
|
520
|
-
SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
|
521
|
-
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
|
560
|
+
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
561
|
+
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
522
562
|
}
|
523
563
|
|
524
564
|
/*
|
@@ -791,6 +831,33 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
791
831
|
|
792
832
|
#include <ruby.h>
|
793
833
|
|
834
|
+
/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
|
835
|
+
* breaks using rb_intern as an lvalue, as SWIG does. We work around this
|
836
|
+
* issue for now by disabling this.
|
837
|
+
* https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
|
838
|
+
*/
|
839
|
+
#ifdef rb_intern
|
840
|
+
# undef rb_intern
|
841
|
+
#endif
|
842
|
+
|
843
|
+
/* Remove global macros defined in Ruby's win32.h */
|
844
|
+
#ifdef write
|
845
|
+
# undef write
|
846
|
+
#endif
|
847
|
+
#ifdef read
|
848
|
+
# undef read
|
849
|
+
#endif
|
850
|
+
#ifdef bind
|
851
|
+
# undef bind
|
852
|
+
#endif
|
853
|
+
#ifdef close
|
854
|
+
# undef close
|
855
|
+
#endif
|
856
|
+
#ifdef connect
|
857
|
+
# undef connect
|
858
|
+
#endif
|
859
|
+
|
860
|
+
|
794
861
|
/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
|
795
862
|
#ifndef NUM2LL
|
796
863
|
#define NUM2LL(x) NUM2LONG((x))
|
@@ -819,12 +886,44 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
819
886
|
#ifndef RSTRING_PTR
|
820
887
|
# define RSTRING_PTR(x) RSTRING(x)->ptr
|
821
888
|
#endif
|
889
|
+
#ifndef RSTRING_END
|
890
|
+
# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
|
891
|
+
#endif
|
822
892
|
#ifndef RARRAY_LEN
|
823
893
|
# define RARRAY_LEN(x) RARRAY(x)->len
|
824
894
|
#endif
|
825
895
|
#ifndef RARRAY_PTR
|
826
896
|
# define RARRAY_PTR(x) RARRAY(x)->ptr
|
827
897
|
#endif
|
898
|
+
#ifndef RFLOAT_VALUE
|
899
|
+
# define RFLOAT_VALUE(x) RFLOAT(x)->value
|
900
|
+
#endif
|
901
|
+
#ifndef DOUBLE2NUM
|
902
|
+
# define DOUBLE2NUM(x) rb_float_new(x)
|
903
|
+
#endif
|
904
|
+
#ifndef RHASH_TBL
|
905
|
+
# define RHASH_TBL(x) (RHASH(x)->tbl)
|
906
|
+
#endif
|
907
|
+
#ifndef RHASH_ITER_LEV
|
908
|
+
# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
|
909
|
+
#endif
|
910
|
+
#ifndef RHASH_IFNONE
|
911
|
+
# define RHASH_IFNONE(x) (RHASH(x)->ifnone)
|
912
|
+
#endif
|
913
|
+
#ifndef RHASH_SIZE
|
914
|
+
# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
|
915
|
+
#endif
|
916
|
+
#ifndef RHASH_EMPTY_P
|
917
|
+
# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
|
918
|
+
#endif
|
919
|
+
#ifndef RSTRUCT_LEN
|
920
|
+
# define RSTRUCT_LEN(x) RSTRUCT(x)->len
|
921
|
+
#endif
|
922
|
+
#ifndef RSTRUCT_PTR
|
923
|
+
# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
|
924
|
+
#endif
|
925
|
+
|
926
|
+
|
828
927
|
|
829
928
|
/*
|
830
929
|
* Need to be very careful about how these macros are defined, especially
|
@@ -886,6 +985,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
886
985
|
#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
|
887
986
|
#endif
|
888
987
|
|
988
|
+
static VALUE _mSWIG = Qnil;
|
889
989
|
|
890
990
|
/* -----------------------------------------------------------------------------
|
891
991
|
* error manipulation
|
@@ -976,12 +1076,73 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
|
|
976
1076
|
}
|
977
1077
|
|
978
1078
|
|
1079
|
+
/* This function is called when a user inputs a wrong argument to
|
1080
|
+
a method.
|
1081
|
+
*/
|
1082
|
+
SWIGINTERN
|
1083
|
+
const char* Ruby_Format_TypeError( const char* msg,
|
1084
|
+
const char* type,
|
1085
|
+
const char* name,
|
1086
|
+
const int argn,
|
1087
|
+
VALUE input )
|
1088
|
+
{
|
1089
|
+
char buf[128];
|
1090
|
+
VALUE str;
|
1091
|
+
VALUE asStr;
|
1092
|
+
if ( msg && *msg )
|
1093
|
+
{
|
1094
|
+
str = rb_str_new2(msg);
|
1095
|
+
}
|
1096
|
+
else
|
1097
|
+
{
|
1098
|
+
str = rb_str_new(NULL, 0);
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
str = rb_str_cat2( str, "Expected argument " );
|
1102
|
+
sprintf( buf, "%d of type ", argn-1 );
|
1103
|
+
str = rb_str_cat2( str, buf );
|
1104
|
+
str = rb_str_cat2( str, type );
|
1105
|
+
str = rb_str_cat2( str, ", but got " );
|
1106
|
+
str = rb_str_cat2( str, rb_obj_classname(input) );
|
1107
|
+
str = rb_str_cat2( str, " " );
|
1108
|
+
asStr = rb_inspect(input);
|
1109
|
+
if ( RSTRING_LEN(asStr) > 30 )
|
1110
|
+
{
|
1111
|
+
str = rb_str_cat( str, StringValuePtr(asStr), 30 );
|
1112
|
+
str = rb_str_cat2( str, "..." );
|
1113
|
+
}
|
1114
|
+
else
|
1115
|
+
{
|
1116
|
+
str = rb_str_append( str, asStr );
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
if ( name )
|
1120
|
+
{
|
1121
|
+
str = rb_str_cat2( str, "\n\tin SWIG method '" );
|
1122
|
+
str = rb_str_cat2( str, name );
|
1123
|
+
str = rb_str_cat2( str, "'" );
|
1124
|
+
}
|
1125
|
+
|
1126
|
+
return StringValuePtr( str );
|
1127
|
+
}
|
979
1128
|
|
1129
|
+
/* This function is called when an overloaded method fails */
|
1130
|
+
SWIGINTERN
|
1131
|
+
void Ruby_Format_OverloadedError(
|
1132
|
+
const int argc,
|
1133
|
+
const int maxargs,
|
1134
|
+
const char* method,
|
1135
|
+
const char* prototypes
|
1136
|
+
)
|
1137
|
+
{
|
1138
|
+
const char* msg = "Wrong # of arguments";
|
1139
|
+
if ( argc <= maxargs ) msg = "Wrong arguments";
|
1140
|
+
rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
|
1141
|
+
"Possible C/C++ prototypes are:\n%s",
|
1142
|
+
msg, method, prototypes);
|
1143
|
+
}
|
980
1144
|
|
981
1145
|
/* -----------------------------------------------------------------------------
|
982
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
983
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
984
|
-
*
|
985
1146
|
* rubytracking.swg
|
986
1147
|
*
|
987
1148
|
* This file contains support for tracking mappings from
|
@@ -994,23 +1155,51 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
|
|
994
1155
|
extern "C" {
|
995
1156
|
#endif
|
996
1157
|
|
1158
|
+
/* Ruby 1.8 actually assumes the first case. */
|
1159
|
+
#if SIZEOF_VOIDP == SIZEOF_LONG
|
1160
|
+
# define SWIG2NUM(v) LONG2NUM((unsigned long)v)
|
1161
|
+
# define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
|
1162
|
+
#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
|
1163
|
+
# define SWIG2NUM(v) LL2NUM((unsigned long long)v)
|
1164
|
+
# define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
|
1165
|
+
#else
|
1166
|
+
# error sizeof(void*) is not the same as long or long long
|
1167
|
+
#endif
|
1168
|
+
|
997
1169
|
|
998
1170
|
/* Global Ruby hash table to store Trackings from C/C++
|
999
|
-
structs to Ruby Objects.
|
1000
|
-
|
1171
|
+
structs to Ruby Objects.
|
1172
|
+
*/
|
1173
|
+
static VALUE swig_ruby_trackings = Qnil;
|
1001
1174
|
|
1002
1175
|
/* Global variable that stores a reference to the ruby
|
1003
1176
|
hash table delete function. */
|
1004
|
-
static ID swig_ruby_hash_delete
|
1177
|
+
static ID swig_ruby_hash_delete;
|
1005
1178
|
|
1006
1179
|
/* Setup a Ruby hash table to store Trackings */
|
1007
1180
|
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
1008
1181
|
/* Create a ruby hash table to store Trackings from C++
|
1009
|
-
objects to Ruby objects.
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1182
|
+
objects to Ruby objects. */
|
1183
|
+
|
1184
|
+
/* Try to see if some other .so has already created a
|
1185
|
+
tracking hash table, which we keep hidden in an instance var
|
1186
|
+
in the SWIG module.
|
1187
|
+
This is done to allow multiple DSOs to share the same
|
1188
|
+
tracking table.
|
1189
|
+
*/
|
1190
|
+
ID trackings_id = rb_intern( "@__trackings__" );
|
1191
|
+
VALUE verbose = rb_gv_get("VERBOSE");
|
1192
|
+
rb_gv_set("VERBOSE", Qfalse);
|
1193
|
+
swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
|
1194
|
+
rb_gv_set("VERBOSE", verbose);
|
1195
|
+
|
1196
|
+
/* No, it hasn't. Create one ourselves */
|
1197
|
+
if ( swig_ruby_trackings == Qnil )
|
1198
|
+
{
|
1199
|
+
swig_ruby_trackings = rb_hash_new();
|
1200
|
+
rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
|
1201
|
+
}
|
1202
|
+
|
1014
1203
|
/* Now store a reference to the hash table delete function
|
1015
1204
|
so that we only have to look it up once.*/
|
1016
1205
|
swig_ruby_hash_delete = rb_intern("delete");
|
@@ -1023,8 +1212,7 @@ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
|
|
1023
1212
|
a Ruby number object. */
|
1024
1213
|
|
1025
1214
|
/* Convert the pointer to a Ruby number */
|
1026
|
-
|
1027
|
-
return LONG2NUM(value);
|
1215
|
+
return SWIG2NUM(ptr);
|
1028
1216
|
}
|
1029
1217
|
|
1030
1218
|
/* Get a Ruby number to reference an object */
|
@@ -1034,8 +1222,7 @@ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
|
|
1034
1222
|
a Ruby number object. */
|
1035
1223
|
|
1036
1224
|
/* Convert the Object to a Ruby number */
|
1037
|
-
|
1038
|
-
return LONG2NUM(value);
|
1225
|
+
return SWIG2NUM(object);
|
1039
1226
|
}
|
1040
1227
|
|
1041
1228
|
/* Get a Ruby object from a previously stored reference */
|
@@ -1043,9 +1230,8 @@ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
|
|
1043
1230
|
/* The provided Ruby number object is a reference
|
1044
1231
|
to the Ruby object we want.*/
|
1045
1232
|
|
1046
|
-
/*
|
1047
|
-
|
1048
|
-
return (VALUE) value;
|
1233
|
+
/* Convert the Ruby number to a Ruby object */
|
1234
|
+
return NUM2SWIG(reference);
|
1049
1235
|
}
|
1050
1236
|
|
1051
1237
|
/* Add a Tracking from a C/C++ struct to a Ruby object */
|
@@ -1137,15 +1323,21 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1137
1323
|
return target;
|
1138
1324
|
}
|
1139
1325
|
|
1326
|
+
/* For ruby1.8.4 and earlier. */
|
1327
|
+
#ifndef RUBY_INIT_STACK
|
1328
|
+
RUBY_EXTERN void Init_stack(VALUE* addr);
|
1329
|
+
# define RUBY_INIT_STACK \
|
1330
|
+
VALUE variable_in_this_stack_frame; \
|
1331
|
+
Init_stack(&variable_in_this_stack_frame);
|
1332
|
+
#endif
|
1333
|
+
|
1334
|
+
|
1140
1335
|
#ifdef __cplusplus
|
1141
1336
|
}
|
1142
1337
|
#endif
|
1143
1338
|
|
1144
1339
|
|
1145
1340
|
/* -----------------------------------------------------------------------------
|
1146
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
1147
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
1148
|
-
*
|
1149
1341
|
* rubyrun.swg
|
1150
1342
|
*
|
1151
1343
|
* This file contains the runtime support for Ruby modules
|
@@ -1189,7 +1381,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1189
1381
|
/* Error manipulation */
|
1190
1382
|
|
1191
1383
|
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
|
1192
|
-
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
|
1384
|
+
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
|
1193
1385
|
#define SWIG_fail goto fail
|
1194
1386
|
|
1195
1387
|
|
@@ -1201,6 +1393,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1201
1393
|
#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
|
1202
1394
|
#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
|
1203
1395
|
|
1396
|
+
#include "assert.h"
|
1204
1397
|
|
1205
1398
|
/* -----------------------------------------------------------------------------
|
1206
1399
|
* pointers/data manipulation
|
@@ -1208,9 +1401,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1208
1401
|
|
1209
1402
|
#ifdef __cplusplus
|
1210
1403
|
extern "C" {
|
1211
|
-
#if 0
|
1212
|
-
} /* cc-mode */
|
1213
|
-
#endif
|
1214
1404
|
#endif
|
1215
1405
|
|
1216
1406
|
typedef struct {
|
@@ -1222,10 +1412,44 @@ typedef struct {
|
|
1222
1412
|
} swig_class;
|
1223
1413
|
|
1224
1414
|
|
1225
|
-
|
1415
|
+
/* Global pointer used to keep some internal SWIG stuff */
|
1226
1416
|
static VALUE _cSWIG_Pointer = Qnil;
|
1227
1417
|
static VALUE swig_runtime_data_type_pointer = Qnil;
|
1228
1418
|
|
1419
|
+
/* Global IDs used to keep some internal SWIG stuff */
|
1420
|
+
static ID swig_arity_id = 0;
|
1421
|
+
static ID swig_call_id = 0;
|
1422
|
+
|
1423
|
+
/*
|
1424
|
+
If your swig extension is to be run within an embedded ruby and has
|
1425
|
+
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
|
1426
|
+
This will reset ruby's stack frame on each entry point from the main
|
1427
|
+
program the first time a virtual director function is invoked (in a
|
1428
|
+
non-recursive way).
|
1429
|
+
If this is not done, you run the risk of Ruby trashing the stack.
|
1430
|
+
*/
|
1431
|
+
|
1432
|
+
#ifdef RUBY_EMBEDDED
|
1433
|
+
|
1434
|
+
# define SWIG_INIT_STACK \
|
1435
|
+
if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
|
1436
|
+
++swig_virtual_calls;
|
1437
|
+
# define SWIG_RELEASE_STACK --swig_virtual_calls;
|
1438
|
+
# define Ruby_DirectorTypeMismatchException(x) \
|
1439
|
+
rb_raise( rb_eTypeError, "%s", x ); return c_result;
|
1440
|
+
|
1441
|
+
static unsigned int swig_virtual_calls = 0;
|
1442
|
+
|
1443
|
+
#else /* normal non-embedded extension */
|
1444
|
+
|
1445
|
+
# define SWIG_INIT_STACK
|
1446
|
+
# define SWIG_RELEASE_STACK
|
1447
|
+
# define Ruby_DirectorTypeMismatchException(x) \
|
1448
|
+
throw Swig::DirectorTypeMismatchException( x );
|
1449
|
+
|
1450
|
+
#endif /* RUBY_EMBEDDED */
|
1451
|
+
|
1452
|
+
|
1229
1453
|
SWIGRUNTIME VALUE
|
1230
1454
|
getExceptionClass(void) {
|
1231
1455
|
static int init = 0;
|
@@ -1257,6 +1481,8 @@ SWIG_Ruby_InitRuntime(void)
|
|
1257
1481
|
{
|
1258
1482
|
if (_mSWIG == Qnil) {
|
1259
1483
|
_mSWIG = rb_define_module("SWIG");
|
1484
|
+
swig_call_id = rb_intern("call");
|
1485
|
+
swig_arity_id = rb_intern("arity");
|
1260
1486
|
}
|
1261
1487
|
}
|
1262
1488
|
|
@@ -1280,7 +1506,7 @@ SWIGRUNTIME VALUE
|
|
1280
1506
|
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
1281
1507
|
{
|
1282
1508
|
int own = flags & SWIG_POINTER_OWN;
|
1283
|
-
|
1509
|
+
int track;
|
1284
1510
|
char *klass_name;
|
1285
1511
|
swig_class *sklass;
|
1286
1512
|
VALUE klass;
|
@@ -1293,14 +1519,15 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1293
1519
|
sklass = (swig_class *) type->clientdata;
|
1294
1520
|
|
1295
1521
|
/* Are we tracking this class and have we already returned this Ruby object? */
|
1296
|
-
|
1522
|
+
track = sklass->trackObjects;
|
1523
|
+
if (track) {
|
1297
1524
|
obj = SWIG_RubyInstanceFor(ptr);
|
1298
1525
|
|
1299
1526
|
/* Check the object's type and make sure it has the correct type.
|
1300
1527
|
It might not in cases where methods do things like
|
1301
1528
|
downcast methods. */
|
1302
1529
|
if (obj != Qnil) {
|
1303
|
-
VALUE value = rb_iv_get(obj, "__swigtype__");
|
1530
|
+
VALUE value = rb_iv_get(obj, "@__swigtype__");
|
1304
1531
|
char* type_name = RSTRING_PTR(value);
|
1305
1532
|
|
1306
1533
|
if (strcmp(type->name, type_name) == 0) {
|
@@ -1310,10 +1537,13 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1310
1537
|
}
|
1311
1538
|
|
1312
1539
|
/* Create a new Ruby object */
|
1313
|
-
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
|
1540
|
+
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
|
1541
|
+
( own ? VOIDFUNC(sklass->destroy) :
|
1542
|
+
(track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
|
1543
|
+
), ptr);
|
1314
1544
|
|
1315
1545
|
/* If tracking is on for this class then track this object. */
|
1316
|
-
if (
|
1546
|
+
if (track) {
|
1317
1547
|
SWIG_RubyAddTracking(ptr, obj);
|
1318
1548
|
}
|
1319
1549
|
} else {
|
@@ -1323,7 +1553,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1323
1553
|
free((void *) klass_name);
|
1324
1554
|
obj = Data_Wrap_Struct(klass, 0, 0, ptr);
|
1325
1555
|
}
|
1326
|
-
rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
|
1556
|
+
rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
|
1327
1557
|
|
1328
1558
|
return obj;
|
1329
1559
|
}
|
@@ -1335,7 +1565,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
|
1335
1565
|
VALUE obj;
|
1336
1566
|
swig_class *sklass = (swig_class *) type->clientdata;
|
1337
1567
|
obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
|
1338
|
-
rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
|
1568
|
+
rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
|
1339
1569
|
return obj;
|
1340
1570
|
}
|
1341
1571
|
|
@@ -1343,7 +1573,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
|
1343
1573
|
SWIGRUNTIMEINLINE char *
|
1344
1574
|
SWIG_Ruby_MangleStr(VALUE obj)
|
1345
1575
|
{
|
1346
|
-
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
1576
|
+
VALUE stype = rb_iv_get(obj, "@__swigtype__");
|
1347
1577
|
return StringValuePtr(stype);
|
1348
1578
|
}
|
1349
1579
|
|
@@ -1425,8 +1655,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1425
1655
|
tc = SWIG_TypeCheck(c, ty);
|
1426
1656
|
if (!tc) {
|
1427
1657
|
return SWIG_ERROR;
|
1658
|
+
} else {
|
1659
|
+
int newmemory = 0;
|
1660
|
+
*ptr = SWIG_TypeCast(tc, vptr, &newmemory);
|
1661
|
+
assert(!newmemory); /* newmemory handling not yet implemented */
|
1428
1662
|
}
|
1429
|
-
*ptr = SWIG_TypeCast(tc, vptr);
|
1430
1663
|
} else {
|
1431
1664
|
*ptr = vptr;
|
1432
1665
|
}
|
@@ -1507,10 +1740,42 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1507
1740
|
rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
|
1508
1741
|
}
|
1509
1742
|
|
1743
|
+
/* This function can be used to check whether a proc or method or similarly
|
1744
|
+
callable function has been passed. Usually used in a %typecheck, like:
|
1745
|
+
|
1746
|
+
%typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
|
1747
|
+
$result = SWIG_Ruby_isCallable( $input );
|
1748
|
+
}
|
1749
|
+
*/
|
1750
|
+
SWIGINTERN
|
1751
|
+
int SWIG_Ruby_isCallable( VALUE proc )
|
1752
|
+
{
|
1753
|
+
if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
|
1754
|
+
return 1;
|
1755
|
+
return 0;
|
1756
|
+
}
|
1757
|
+
|
1758
|
+
/* This function can be used to check the arity (number of arguments)
|
1759
|
+
a proc or method can take. Usually used in a %typecheck.
|
1760
|
+
Valid arities will be that equal to minimal or those < 0
|
1761
|
+
which indicate a variable number of parameters at the end.
|
1762
|
+
*/
|
1763
|
+
SWIGINTERN
|
1764
|
+
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1765
|
+
{
|
1766
|
+
if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
|
1767
|
+
{
|
1768
|
+
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1769
|
+
int arity = NUM2INT(num);
|
1770
|
+
if ( arity < 0 && (arity+1) < -minimal ) return 1;
|
1771
|
+
if ( arity == minimal ) return 1;
|
1772
|
+
return 1;
|
1773
|
+
}
|
1774
|
+
return 0;
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
|
1510
1778
|
#ifdef __cplusplus
|
1511
|
-
#if 0
|
1512
|
-
{ /* cc-mode */
|
1513
|
-
#endif
|
1514
1779
|
}
|
1515
1780
|
#endif
|
1516
1781
|
|
@@ -1538,7 +1803,11 @@ static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
|
|
1538
1803
|
|
1539
1804
|
static VALUE mAlert;
|
1540
1805
|
|
1541
|
-
#define
|
1806
|
+
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
|
1807
|
+
#define SWIG_RUBY_THREAD_END_BLOCK
|
1808
|
+
|
1809
|
+
|
1810
|
+
#define SWIGVERSION 0x020000
|
1542
1811
|
#define SWIG_VERSION SWIGVERSION
|
1543
1812
|
|
1544
1813
|
|
@@ -1556,6 +1825,10 @@ extern void alert_vibrate(void*);
|
|
1556
1825
|
extern void alert_play_file(char* file_name, ...);
|
1557
1826
|
#define play_file alert_play_file
|
1558
1827
|
|
1828
|
+
extern void show_status(char* szTitle, char* szText, char* szHideLabel);
|
1829
|
+
#define show_status rho_alert_show_status
|
1830
|
+
|
1831
|
+
|
1559
1832
|
|
1560
1833
|
SWIGINTERN swig_type_info*
|
1561
1834
|
SWIG_pchar_descriptor(void)
|
@@ -1574,11 +1847,11 @@ SWIGINTERN int
|
|
1574
1847
|
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
1575
1848
|
{
|
1576
1849
|
if (TYPE(obj) == T_STRING) {
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1850
|
+
#if defined(StringValuePtr)
|
1851
|
+
char *cstr = StringValuePtr(obj);
|
1852
|
+
#else
|
1580
1853
|
char *cstr = STR2CSTR(obj);
|
1581
|
-
|
1854
|
+
#endif
|
1582
1855
|
size_t size = RSTRING_LEN(obj) + 1;
|
1583
1856
|
if (cptr) {
|
1584
1857
|
if (alloc) {
|
@@ -1672,7 +1945,7 @@ _wrap_play_file(int argc, VALUE *argv, VALUE self) {
|
|
1672
1945
|
}
|
1673
1946
|
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
1674
1947
|
if (!SWIG_IsOK(res1)) {
|
1675
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
1948
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","play_file", 1, argv[0] ));
|
1676
1949
|
}
|
1677
1950
|
arg1 = (char *)(buf1);
|
1678
1951
|
play_file(arg1,arg2);
|
@@ -1684,6 +1957,52 @@ fail:
|
|
1684
1957
|
}
|
1685
1958
|
|
1686
1959
|
|
1960
|
+
SWIGINTERN VALUE
|
1961
|
+
_wrap_show_status(int argc, VALUE *argv, VALUE self) {
|
1962
|
+
char *arg1 = (char *) 0 ;
|
1963
|
+
char *arg2 = (char *) 0 ;
|
1964
|
+
char *arg3 = (char *) 0 ;
|
1965
|
+
int res1 ;
|
1966
|
+
char *buf1 = 0 ;
|
1967
|
+
int alloc1 = 0 ;
|
1968
|
+
int res2 ;
|
1969
|
+
char *buf2 = 0 ;
|
1970
|
+
int alloc2 = 0 ;
|
1971
|
+
int res3 ;
|
1972
|
+
char *buf3 = 0 ;
|
1973
|
+
int alloc3 = 0 ;
|
1974
|
+
|
1975
|
+
if ((argc < 3) || (argc > 3)) {
|
1976
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
1977
|
+
}
|
1978
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
1979
|
+
if (!SWIG_IsOK(res1)) {
|
1980
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","show_status", 1, argv[0] ));
|
1981
|
+
}
|
1982
|
+
arg1 = (char *)(buf1);
|
1983
|
+
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
|
1984
|
+
if (!SWIG_IsOK(res2)) {
|
1985
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","show_status", 2, argv[1] ));
|
1986
|
+
}
|
1987
|
+
arg2 = (char *)(buf2);
|
1988
|
+
res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
|
1989
|
+
if (!SWIG_IsOK(res3)) {
|
1990
|
+
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","show_status", 3, argv[2] ));
|
1991
|
+
}
|
1992
|
+
arg3 = (char *)(buf3);
|
1993
|
+
show_status(arg1,arg2,arg3);
|
1994
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
1995
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
1996
|
+
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
|
1997
|
+
return Qnil;
|
1998
|
+
fail:
|
1999
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
2000
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
2001
|
+
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
|
2002
|
+
return Qnil;
|
2003
|
+
}
|
2004
|
+
|
2005
|
+
|
1687
2006
|
|
1688
2007
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
1689
2008
|
|
@@ -1763,7 +2082,7 @@ SWIGRUNTIME void
|
|
1763
2082
|
SWIG_InitializeModule(void *clientdata) {
|
1764
2083
|
size_t i;
|
1765
2084
|
swig_module_info *module_head, *iter;
|
1766
|
-
int found;
|
2085
|
+
int found, init;
|
1767
2086
|
|
1768
2087
|
clientdata = clientdata;
|
1769
2088
|
|
@@ -1773,6 +2092,9 @@ SWIG_InitializeModule(void *clientdata) {
|
|
1773
2092
|
swig_module.type_initial = swig_type_initial;
|
1774
2093
|
swig_module.cast_initial = swig_cast_initial;
|
1775
2094
|
swig_module.next = &swig_module;
|
2095
|
+
init = 1;
|
2096
|
+
} else {
|
2097
|
+
init = 0;
|
1776
2098
|
}
|
1777
2099
|
|
1778
2100
|
/* Try and load any already created modules */
|
@@ -1801,6 +2123,12 @@ SWIG_InitializeModule(void *clientdata) {
|
|
1801
2123
|
module_head->next = &swig_module;
|
1802
2124
|
}
|
1803
2125
|
|
2126
|
+
/* When multiple interpeters are used, a module could have already been initialized in
|
2127
|
+
a different interpreter, but not yet have a pointer in this interpreter.
|
2128
|
+
In this case, we do not want to continue adding types... everything should be
|
2129
|
+
set up already */
|
2130
|
+
if (init == 0) return;
|
2131
|
+
|
1804
2132
|
/* Now work on filling in swig_module.types */
|
1805
2133
|
#ifdef SWIGRUNTIME_DEBUG
|
1806
2134
|
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
|
@@ -1934,7 +2262,9 @@ SWIG_PropagateClientData(void) {
|
|
1934
2262
|
}
|
1935
2263
|
#endif
|
1936
2264
|
|
2265
|
+
/*
|
1937
2266
|
|
2267
|
+
*/
|
1938
2268
|
#ifdef __cplusplus
|
1939
2269
|
extern "C"
|
1940
2270
|
#endif
|
@@ -1954,5 +2284,6 @@ SWIGEXPORT void Init_Alert(void) {
|
|
1954
2284
|
rb_define_module_function(mAlert, "hide_popup", _wrap_hide_popup, -1);
|
1955
2285
|
rb_define_module_function(mAlert, "vibrate", _wrap_vibrate, -1);
|
1956
2286
|
rb_define_module_function(mAlert, "play_file", _wrap_play_file, -1);
|
2287
|
+
rb_define_module_function(mAlert, "show_status", _wrap_show_status, -1);
|
1957
2288
|
}
|
1958
2289
|
|