From 6d2bebcb6cfa038ba879b8cea007f8261fb5b202 Mon Sep 17 00:00:00 2001 From: Feng Jin Date: Tue, 23 May 2017 17:29:14 +0800 Subject: [PATCH] Apply Dispose pattern to NUI. Change-Id: I4188803aabc6a4aa88b212bed42d0162ea001fd0 Signed-off-by: Feng Jin --- .../src/internal/AccessibilityActionSignal.cs | 177 +- .../internal/AccessibilityFocusOvershotSignal.cs | 184 +- src/Tizen.NUI/src/internal/AccessibilityManager.cs | 4608 ++++++++++---------- src/Tizen.NUI/src/internal/Alignment.cs | 493 ++- src/Tizen.NUI/src/internal/AngleAxis.cs | 185 +- src/Tizen.NUI/src/internal/AngleThresholdPair.cs | 192 +- src/Tizen.NUI/src/internal/Animatable.cs | 332 +- .../AnimatablePropertyComponentRegistration.cs | 114 +- .../src/internal/AnimatablePropertyRegistration.cs | 121 +- src/Tizen.NUI/src/internal/AnimationSignal.cs | 175 +- src/Tizen.NUI/src/internal/Any.cs | 422 +- src/Tizen.NUI/src/internal/Application.cs | 50 +- .../src/internal/ApplicationControlSignal.cs | 62 +- .../src/internal/ApplicationExtensions.cs | 170 +- src/Tizen.NUI/src/internal/ApplicationSignal.cs | 62 +- src/Tizen.NUI/src/internal/AsyncImageLoader.cs | 199 +- src/Tizen.NUI/src/internal/BaseHandle.cs | 515 ++- src/Tizen.NUI/src/internal/BaseObject.cs | 118 +- src/Tizen.NUI/src/internal/BlendEquationType.cs | 14 +- src/Tizen.NUI/src/internal/BlendFactorType.cs | 38 +- src/Tizen.NUI/src/internal/BlendModeType.cs | 14 +- src/Tizen.NUI/src/internal/BufferImage.cs | 254 +- src/Tizen.NUI/src/internal/Builder.cs | 499 ++- src/Tizen.NUI/src/internal/Button.cs | 101 +- src/Tizen.NUI/src/internal/ButtonSignal.cs | 177 +- src/Tizen.NUI/src/internal/Camera.cs | 855 ++-- .../src/internal/ChildPropertyRegistration.cs | 114 +- src/Tizen.NUI/src/internal/ClampState.cs | 14 +- src/Tizen.NUI/src/internal/ClampState2D.cs | 178 +- src/Tizen.NUI/src/internal/ConnectionTracker.cs | 108 +- .../src/internal/ConnectionTrackerInterface.cs | 78 +- src/Tizen.NUI/src/internal/ControlKeySignal.cs | 178 +- .../src/internal/ControlOrientationType.cs | 16 +- src/Tizen.NUI/src/internal/CustomActor.cs | 123 +- src/Tizen.NUI/src/internal/CustomActorImpl.cs | 381 +- .../src/internal/CustomAlgorithmInterface.cs | 164 +- src/Tizen.NUI/src/internal/DaliEnumConstants.cs | 97 +- src/Tizen.NUI/src/internal/DaliEventHandler.cs | 5 +- src/Tizen.NUI/src/internal/DaliException.cs | 172 +- .../src/internal/DefaultItemLayoutProperty.cs | 60 +- .../src/internal/DefaultItemLayoutType.cs | 16 +- src/Tizen.NUI/src/internal/DefaultRuler.cs | 131 +- src/Tizen.NUI/src/internal/DepthFunctionType.cs | 24 +- src/Tizen.NUI/src/internal/DepthTestModeType.cs | 14 +- src/Tizen.NUI/src/internal/DepthWriteModeType.cs | 14 +- src/Tizen.NUI/src/internal/DirectionBias.cs | 14 +- src/Tizen.NUI/src/internal/DirectionType.cs | 12 +- src/Tizen.NUI/src/internal/DisposeQueue.cs | 4 +- src/Tizen.NUI/src/internal/DragAndDropDetector.cs | 158 +- src/Tizen.NUI/src/internal/EncodedBufferImage.cs | 120 +- src/Tizen.NUI/src/internal/EventThreadCallback.cs | 62 +- src/Tizen.NUI/src/internal/FaceCullingModeType.cs | 16 +- src/Tizen.NUI/src/internal/FilterModeType.cs | 24 +- src/Tizen.NUI/src/internal/FixedRuler.cs | 139 +- src/Tizen.NUI/src/internal/FloatSignal.cs | 176 +- src/Tizen.NUI/src/internal/FocusChangedSignal.cs | 184 +- .../src/internal/FocusGroupChangedSignal.cs | 183 +- src/Tizen.NUI/src/internal/FrameBuffer.cs | 288 +- src/Tizen.NUI/src/internal/FrameBufferImage.cs | 143 +- src/Tizen.NUI/src/internal/GaussianBlurView.cs | 417 +- .../src/internal/GaussianBlurViewSignal.cs | 176 +- src/Tizen.NUI/src/internal/Geometry.cs | 207 +- src/Tizen.NUI/src/internal/GestureDetector.cs | 181 +- src/Tizen.NUI/src/internal/HoverSignal.cs | 178 +- src/Tizen.NUI/src/internal/Image.cs | 316 +- src/Tizen.NUI/src/internal/ImageSignal.cs | 176 +- src/Tizen.NUI/src/internal/ImfManager.cs | 431 +- src/Tizen.NUI/src/internal/Item.cs | 199 +- src/Tizen.NUI/src/internal/ItemContainer.cs | 679 +-- src/Tizen.NUI/src/internal/ItemFactory.cs | 63 +- src/Tizen.NUI/src/internal/ItemIdContainer.cs | 730 ++-- src/Tizen.NUI/src/internal/ItemLayout.cs | 327 +- src/Tizen.NUI/src/internal/ItemRange.cs | 221 +- src/Tizen.NUI/src/internal/ItemView.cs | 1034 +++-- src/Tizen.NUI/src/internal/KeyEventSignal.cs | 175 +- src/Tizen.NUI/src/internal/KeyInputFocusManager.cs | 137 +- src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs | 175 +- .../src/internal/KeyboardPreFocusChangeSignal.cs | 180 +- src/Tizen.NUI/src/internal/LinearConstrainer.cs | 236 +- src/Tizen.NUI/src/internal/LoadingState.cs | 14 +- .../src/internal/LongPressGestureDetectedSignal.cs | 185 +- .../src/internal/LongPressGestureDetector.cs | 325 +- src/Tizen.NUI/src/internal/Matrix.cs | 506 ++- src/Tizen.NUI/src/internal/Matrix3.cs | 317 +- src/Tizen.NUI/src/internal/Meta.cs | 10 +- src/Tizen.NUI/src/internal/Model3dView.cs | 510 ++- src/Tizen.NUI/src/internal/NDalic.cs | 2650 ++++++----- src/Tizen.NUI/src/internal/NativeImage.cs | 152 +- src/Tizen.NUI/src/internal/NativeImageInterface.cs | 153 +- src/Tizen.NUI/src/internal/NinePatchImage.cs | 194 +- src/Tizen.NUI/src/internal/Object.cs | 27 +- src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs | 176 +- .../src/internal/ObjectDestroyedSignal.cs | 176 +- src/Tizen.NUI/src/internal/ObjectRegistry.cs | 368 +- src/Tizen.NUI/src/internal/PaddingType.cs | 472 +- src/Tizen.NUI/src/internal/PageFactory.cs | 129 +- src/Tizen.NUI/src/internal/PagePanSignal.cs | 175 +- .../src/internal/PageTurnLandscapeView.cs | 109 +- src/Tizen.NUI/src/internal/PageTurnPortraitView.cs | 109 +- src/Tizen.NUI/src/internal/PageTurnSignal.cs | 175 +- src/Tizen.NUI/src/internal/PageTurnView.cs | 1015 +++-- .../src/internal/PanGestureDetectedSignal.cs | 184 +- src/Tizen.NUI/src/internal/PanGestureDetector.cs | 802 ++-- src/Tizen.NUI/src/internal/PathConstrainer.cs | 232 +- .../src/internal/PinchGestureDetectedSignal.cs | 183 +- src/Tizen.NUI/src/internal/PinchGestureDetector.cs | 272 +- src/Tizen.NUI/src/internal/PixelData.cs | 154 +- src/Tizen.NUI/src/internal/PixelFormat.cs | 118 +- src/Tizen.NUI/src/internal/Popup.cs | 232 +- .../src/internal/PositionInheritanceMode.cs | 16 +- src/Tizen.NUI/src/internal/ProgressBar.cs | 103 +- .../src/internal/ProgressBarValueChangedSignal.cs | 176 +- src/Tizen.NUI/src/internal/PropertyBuffer.cs | 125 +- src/Tizen.NUI/src/internal/PropertyCondition.cs | 116 +- src/Tizen.NUI/src/internal/PropertyNotification.cs | 388 +- src/Tizen.NUI/src/internal/PropertyNotifySignal.cs | 176 +- src/Tizen.NUI/src/internal/PropertyRangeManager.cs | 8 +- src/Tizen.NUI/src/internal/PropertyRanges.cs | 44 +- src/Tizen.NUI/src/internal/PropertyRegistration.cs | 116 +- src/Tizen.NUI/src/internal/RadioButton.cs | 38 +- src/Tizen.NUI/src/internal/RefObject.cs | 154 +- src/Tizen.NUI/src/internal/RenderBufferFormat.cs | 16 +- src/Tizen.NUI/src/internal/RenderModeType.cs | 18 +- src/Tizen.NUI/src/internal/RenderTask.cs | 937 ++-- src/Tizen.NUI/src/internal/RenderTaskList.cs | 165 +- src/Tizen.NUI/src/internal/RenderTaskSignal.cs | 115 +- src/Tizen.NUI/src/internal/Renderer.cs | 1002 +++-- src/Tizen.NUI/src/internal/RenderingType.cs | 12 +- src/Tizen.NUI/src/internal/ResourceImage.cs | 372 +- src/Tizen.NUI/src/internal/ResourceImageSignal.cs | 176 +- src/Tizen.NUI/src/internal/Ruler.cs | 341 +- src/Tizen.NUI/src/internal/RulerDomain.cs | 273 +- src/Tizen.NUI/src/internal/RulerPtr.cs | 543 ++- .../src/internal/SWIGTYPE_p_CallbackBase.cs | 31 +- .../SWIGTYPE_p_Configuration__ContextLoss.cs | 31 +- .../src/internal/SWIGTYPE_p_Dali__CallbackBase.cs | 31 +- .../src/internal/SWIGTYPE_p_Dali__Constraint.cs | 31 +- .../SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs | 31 +- .../internal/SWIGTYPE_p_Dali__FunctorDelegate.cs | 31 +- .../internal/SWIGTYPE_p_Dali__Internal__Texture.cs | 31 +- .../SWIGTYPE_p_Dali__Internal__TypeRegistry.cs | 31 +- ...i__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs | 31 +- .../SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs | 31 +- ...ool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs | 31 +- ...ibilityManager_R_Dali__TouchEvent_const_RF_t.cs | 31 +- ..._Dali__DevelActor__VisibilityChange__TypeF_t.cs | 31 +- ...__SignalT_void_fDali__DragAndDropDetectorF_t.cs | 31 +- ...__Toolkit__Control_Dali__Toolkit__ControlF_t.cs | 31 +- ...li__Toolkit__TextEditor__InputStyle__MaskF_t.cs | 31 +- ...ali__Toolkit__TextField__InputStyle__MaskF_t.cs | 31 +- ...i__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs | 31 +- .../SWIGTYPE_p_Dali__Toolkit__ClampState.cs | 31 +- ..._p_Dali__Toolkit__Internal__AsyncImageLoader.cs | 31 +- ..._Dali__Toolkit__Internal__Control__Extension.cs | 31 +- ...PE_p_Dali__Toolkit__Internal__TransitionData.cs | 31 +- ...TYPE_p_Dali__Toolkit__Internal__Visual__Base.cs | 31 +- ...TYPE_p_Dali__Toolkit__ItemFactory__Extension.cs | 31 +- .../src/internal/SWIGTYPE_p_Dali__TouchEvent.cs | 31 +- .../src/internal/SWIGTYPE_p_FunctorDelegate.cs | 31 +- .../internal/SWIGTYPE_p_KeyboardFocusManager.cs | 31 +- .../internal/SWIGTYPE_p_PropertyInputContainer.cs | 31 +- src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs | 31 +- .../src/internal/SWIGTYPE_p_f_float__float.cs | 31 +- ...Dali__Property__Index__Dali__Property__Value.cs | 31 +- ...t_int_r_q_const__Dali__Property__Value__void.cs | 31 +- ...t__std__string_p_Dali__FunctorDelegate__bool.cs | 31 +- ..._string_r_q_const__Dali__Property__Map__bool.cs | 31 +- ...p_q_const__Dali__Any__AnyContainerBase__void.cs | 31 +- .../internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs | 31 +- ...ContainerBase__p_Dali__Any__AnyContainerBase.cs | 31 +- ...SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs | 31 +- src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs | 31 +- src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs | 31 +- .../src/internal/SWIGTYPE_p_std__type_info.cs | 31 +- src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs | 31 +- .../src/internal/SWIGTYPE_p_unsigned_char.cs | 31 +- .../src/internal/SWIGTYPE_p_unsigned_int.cs | 31 +- .../src/internal/SWIGTYPE_p_unsigned_short.cs | 31 +- src/Tizen.NUI/src/internal/Sampler.cs | 135 +- src/Tizen.NUI/src/internal/ScrollView.cs | 1988 +++++---- src/Tizen.NUI/src/internal/ScrollViewEffect.cs | 77 +- .../src/internal/ScrollViewPagePathEffect.cs | 97 +- .../src/internal/ScrollViewSnapStartedSignal.cs | 175 +- src/Tizen.NUI/src/internal/Scrollable.cs | 1047 +++-- src/Tizen.NUI/src/internal/ScrollableSignal.cs | 175 +- src/Tizen.NUI/src/internal/Shader.cs | 419 +- src/Tizen.NUI/src/internal/SignalConnectorType.cs | 114 +- src/Tizen.NUI/src/internal/SignalObserver.cs | 116 +- src/Tizen.NUI/src/internal/Size.cs | 67 +- src/Tizen.NUI/src/internal/Slider.cs | 133 +- .../src/internal/SliderMarkReachedSignal.cs | 178 +- .../src/internal/SliderValueChangedSignal.cs | 177 +- src/Tizen.NUI/src/internal/SlotObserver.cs | 117 +- src/Tizen.NUI/src/internal/SnapType.cs | 12 +- src/Tizen.NUI/src/internal/StageWheelSignal.cs | 176 +- src/Tizen.NUI/src/internal/StencilFunctionType.cs | 24 +- src/Tizen.NUI/src/internal/StencilOperationType.cs | 24 +- src/Tizen.NUI/src/internal/StringValuePair.cs | 189 +- src/Tizen.NUI/src/internal/StyleChangedSignal.cs | 175 +- .../src/internal/TapGestureDetectedSignal.cs | 183 +- src/Tizen.NUI/src/internal/TapGestureDetector.cs | 320 +- src/Tizen.NUI/src/internal/TextEditorSignal.cs | 176 +- src/Tizen.NUI/src/internal/TextFieldSignal.cs | 176 +- src/Tizen.NUI/src/internal/Texture.cs | 196 +- src/Tizen.NUI/src/internal/TextureSet.cs | 176 +- src/Tizen.NUI/src/internal/TextureType.cs | 12 +- src/Tizen.NUI/src/internal/TimePeriod.cs | 182 +- src/Tizen.NUI/src/internal/TimerSignalType.cs | 179 +- src/Tizen.NUI/src/internal/ToggleButton.cs | 344 +- src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs | 16 +- src/Tizen.NUI/src/internal/TooltipPositionType.cs | 14 +- src/Tizen.NUI/src/internal/TouchDataSignal.cs | 186 +- src/Tizen.NUI/src/internal/TouchPoint.cs | 302 +- src/Tizen.NUI/src/internal/TouchPointContainer.cs | 678 +-- src/Tizen.NUI/src/internal/TouchSignal.cs | 176 +- src/Tizen.NUI/src/internal/TransitionData.cs | 158 +- src/Tizen.NUI/src/internal/Type.cs | 24 +- src/Tizen.NUI/src/internal/TypeAction.cs | 116 +- src/Tizen.NUI/src/internal/TypeInfo.cs | 230 +- src/Tizen.NUI/src/internal/TypeRegistration.cs | 214 +- src/Tizen.NUI/src/internal/TypeRegistry.cs | 174 +- src/Tizen.NUI/src/internal/Uint16Pair.cs | 316 +- src/Tizen.NUI/src/internal/VectorBase.cs | 172 +- src/Tizen.NUI/src/internal/VectorFloat.cs | 327 +- src/Tizen.NUI/src/internal/VectorInteger.cs | 329 +- src/Tizen.NUI/src/internal/VectorUint16Pair.cs | 328 +- src/Tizen.NUI/src/internal/VectorUnsignedChar.cs | 328 +- src/Tizen.NUI/src/internal/VideoViewSignal.cs | 82 +- src/Tizen.NUI/src/internal/ViewContainer.cs | 684 +-- src/Tizen.NUI/src/internal/ViewImpl.cs | 35 +- src/Tizen.NUI/src/internal/ViewMode.cs | 16 +- src/Tizen.NUI/src/internal/ViewRegistry.cs | 12 +- .../src/internal/ViewResourceReadySignal.cs | 175 +- src/Tizen.NUI/src/internal/ViewSignal.cs | 186 +- .../src/internal/ViewVisibilityChangedSignal.cs | 183 +- src/Tizen.NUI/src/internal/ViewWrapper.cs | 41 +- src/Tizen.NUI/src/internal/ViewWrapperImpl.cs | 37 +- src/Tizen.NUI/src/internal/VisibilityChangeType.cs | 12 +- src/Tizen.NUI/src/internal/VoidSignal.cs | 185 +- src/Tizen.NUI/src/internal/WheelSignal.cs | 186 +- .../src/internal/WindowFocusSignalType.cs | 63 +- src/Tizen.NUI/src/internal/doublep.cs | 170 +- src/Tizen.NUI/src/internal/floatp.cs | 171 +- src/Tizen.NUI/src/internal/intp.cs | 171 +- src/Tizen.NUI/src/internal/uintp.cs | 172 +- src/Tizen.NUI/src/internal/ushortp.cs | 171 +- src/Tizen.NUI/src/public/AlphaFunction.cs | 62 +- src/Tizen.NUI/src/public/Animation.cs | 33 +- .../src/public/BaseComponents/ImageView.cs | 102 +- .../src/public/BaseComponents/TextEditor.cs | 163 +- .../src/public/BaseComponents/TextField.cs | 160 +- .../src/public/BaseComponents/TextLabel.cs | 95 +- src/Tizen.NUI/src/public/BaseComponents/View.cs | 49 +- src/Tizen.NUI/src/public/Color.cs | 61 +- src/Tizen.NUI/src/public/CustomView/Spin.cs | 2 +- src/Tizen.NUI/src/public/Degree.cs | 63 +- src/Tizen.NUI/src/public/FlexContainer.cs | 161 +- src/Tizen.NUI/src/public/FocusManager.cs | 33 +- src/Tizen.NUI/src/public/Gesture.cs | 61 +- src/Tizen.NUI/src/public/Hover.cs | 61 +- src/Tizen.NUI/src/public/Key.cs | 61 +- src/Tizen.NUI/src/public/KeyFrames.cs | 33 +- src/Tizen.NUI/src/public/Layer.cs | 97 +- src/Tizen.NUI/src/public/LongPressGesture.cs | 33 +- src/Tizen.NUI/src/public/NUIApplication.cs | 0 src/Tizen.NUI/src/public/NUIConstants.cs | 6 + src/Tizen.NUI/src/public/PanGesture.cs | 33 +- src/Tizen.NUI/src/public/Path.cs | 97 +- src/Tizen.NUI/src/public/PinchGesture.cs | 33 +- src/Tizen.NUI/src/public/Position.cs | 61 +- src/Tizen.NUI/src/public/Position2D.cs | 614 +-- src/Tizen.NUI/src/public/Property.cs | 317 +- src/Tizen.NUI/src/public/Radian.cs | 61 +- src/Tizen.NUI/src/public/Rectangle.cs | 61 +- src/Tizen.NUI/src/public/RelativeVector2.cs | 61 +- src/Tizen.NUI/src/public/RelativeVector3.cs | 61 +- src/Tizen.NUI/src/public/RelativeVector4.cs | 61 +- src/Tizen.NUI/src/public/RelayoutContainer.cs | 61 +- src/Tizen.NUI/src/public/Rotation.cs | 61 +- src/Tizen.NUI/src/public/Size2D.cs | 61 +- src/Tizen.NUI/src/public/StyleManager.cs | 33 +- src/Tizen.NUI/src/public/TableView.cs | 225 +- src/Tizen.NUI/src/public/TapGesture.cs | 33 +- src/Tizen.NUI/src/public/Timer.cs | 33 +- src/Tizen.NUI/src/public/Touch.cs | 33 +- .../src/public/UIComponents/CheckBoxButton.cs | 33 +- .../src/public/UIComponents/PushButton.cs | 97 +- src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs | 97 +- src/Tizen.NUI/src/public/Vector2.cs | 61 +- src/Tizen.NUI/src/public/Vector3.cs | 61 +- src/Tizen.NUI/src/public/Vector4.cs | 61 +- src/Tizen.NUI/src/public/VideoView.cs | 97 +- src/Tizen.NUI/src/public/VisualBase.cs | 34 +- src/Tizen.NUI/src/public/VisualFactory.cs | 33 +- src/Tizen.NUI/src/public/Wheel.cs | 61 +- src/Tizen.NUI/src/public/Window.cs | 44 +- 296 files changed, 32969 insertions(+), 22173 deletions(-) mode change 100644 => 100755 src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AccessibilityManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Alignment.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AngleAxis.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AngleThresholdPair.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Animatable.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AnimationSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Any.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ApplicationControlSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ApplicationExtensions.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ApplicationSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/AsyncImageLoader.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/BaseHandle.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/BaseObject.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/BlendEquationType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/BlendFactorType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/BlendModeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/BufferImage.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Builder.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Button.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ButtonSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Camera.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ClampState.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ClampState2D.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ConnectionTracker.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ControlKeySignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ControlOrientationType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/CustomActor.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/CustomActorImpl.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DaliEnumConstants.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DaliEventHandler.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DaliException.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DefaultRuler.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DepthFunctionType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DepthTestModeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DepthWriteModeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DirectionBias.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DirectionType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DisposeQueue.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/DragAndDropDetector.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/EncodedBufferImage.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/EventThreadCallback.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FaceCullingModeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FilterModeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FixedRuler.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FloatSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FocusChangedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FrameBuffer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/FrameBufferImage.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/GaussianBlurView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Geometry.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/GestureDetector.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/HoverSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Image.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ImageSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ImfManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Item.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ItemContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ItemFactory.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ItemIdContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ItemLayout.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ItemRange.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ItemView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/KeyEventSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/KeyInputFocusManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/LinearConstrainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/LoadingState.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/LongPressGestureDetector.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Matrix.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Matrix3.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Meta.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Model3dView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/NDalic.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/NativeImage.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/NativeImageInterface.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/NinePatchImage.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Object.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ObjectRegistry.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PaddingType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PageFactory.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PagePanSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PageTurnPortraitView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PageTurnSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PageTurnView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PanGestureDetector.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PathConstrainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PinchGestureDetector.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PixelData.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PixelFormat.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Popup.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PositionInheritanceMode.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ProgressBar.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyBuffer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyCondition.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyNotification.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyNotifySignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyRangeManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyRanges.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/PropertyRegistration.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RadioButton.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RefObject.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RenderBufferFormat.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RenderModeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RenderTask.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RenderTaskList.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RenderTaskSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Renderer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RenderingType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ResourceImage.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ResourceImageSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Ruler.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RulerDomain.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/RulerPtr.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Sampler.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ScrollView.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ScrollViewEffect.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ScrollViewPagePathEffect.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Scrollable.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ScrollableSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Shader.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SignalConnectorType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SignalObserver.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Size.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Slider.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SlotObserver.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/SnapType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/StageWheelSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/StencilFunctionType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/StencilOperationType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/StringValuePair.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/StyleChangedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TapGestureDetector.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TextEditorSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TextFieldSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Texture.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TextureSet.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TextureType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TimePeriod.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TimerSignalType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ToggleButton.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TooltipPositionType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TouchDataSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TouchPoint.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TouchPointContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TouchSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TransitionData.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Type.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TypeAction.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TypeInfo.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TypeRegistration.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/TypeRegistry.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/Uint16Pair.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VectorBase.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VectorFloat.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VectorInteger.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VectorUint16Pair.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VectorUnsignedChar.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VideoViewSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewImpl.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewMode.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewRegistry.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewWrapper.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ViewWrapperImpl.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VisibilityChangeType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/VoidSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/WheelSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/WindowFocusSignalType.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/doublep.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/floatp.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/intp.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/uintp.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/ushortp.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/AlphaFunction.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/BaseComponents/ImageView.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/BaseComponents/TextField.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Color.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/CustomView/Spin.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Degree.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/FlexContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/FocusManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Gesture.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Hover.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Key.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/KeyFrames.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/LongPressGesture.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/NUIApplication.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/PanGesture.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Path.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/PinchGesture.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Position.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Position2D.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Property.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Radian.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Rectangle.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/RelativeVector2.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/RelativeVector3.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/RelativeVector4.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/RelayoutContainer.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Rotation.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Size2D.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/StyleManager.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/TableView.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/TapGesture.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Timer.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Touch.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/UIComponents/PushButton.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Vector2.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Vector3.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Vector4.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/VideoView.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/VisualBase.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/VisualFactory.cs mode change 100644 => 100755 src/Tizen.NUI/src/public/Wheel.cs diff --git a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs old mode 100644 new mode 100755 index 55652bd..83cc10f --- a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs @@ -8,82 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -internal class AccessibilityActionSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class AccessibilityActionSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal AccessibilityActionSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AccessibilityActionSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityActionSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityActionSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~AccessibilityActionSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~AccessibilityActionSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AccessibilityActionSignal(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AccessibilityActionSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public bool Empty() { - bool ret = NDalicPINVOKE.AccessibilityActionSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.AccessibilityActionSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.AccessibilityActionSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.AccessibilityActionSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.AccessibilityActionSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.AccessibilityActionSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.AccessibilityActionSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.AccessibilityActionSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public bool Emit(AccessibilityManager arg) { - bool ret = NDalicPINVOKE.AccessibilityActionSignal_Emit(swigCPtr, AccessibilityManager.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Emit(AccessibilityManager arg) + { + bool ret = NDalicPINVOKE.AccessibilityActionSignal_Emit(swigCPtr, AccessibilityManager.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public AccessibilityActionSignal() : this(NDalicPINVOKE.new_AccessibilityActionSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public AccessibilityActionSignal() : this(NDalicPINVOKE.new_AccessibilityActionSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs old mode 100644 new mode 100755 index d42b2eb..36b26fd --- a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs @@ -8,81 +8,133 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class AccessibilityFocusOvershotSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal AccessibilityFocusOvershotSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityFocusOvershotSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~AccessibilityFocusOvershotSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } +namespace Tizen.NUI +{ + using Tizen.NUI.BaseComponents; + internal class AccessibilityFocusOvershotSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AccessibilityFocusOvershotSignal(swigCPtr); + internal AccessibilityFocusOvershotSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityFocusOvershotSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.AccessibilityFocusOvershotSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.AccessibilityFocusOvershotSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + ~AccessibilityFocusOvershotSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.AccessibilityFocusOvershotSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.AccessibilityFocusOvershotSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, AccessibilityManager.FocusOvershotDirection arg2) { - NDalicPINVOKE.AccessibilityFocusOvershotSignal_Emit(swigCPtr, View.getCPtr(arg1), (int)arg2); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public AccessibilityFocusOvershotSignal() : this(NDalicPINVOKE.new_AccessibilityFocusOvershotSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AccessibilityFocusOvershotSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.AccessibilityFocusOvershotSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.AccessibilityFocusOvershotSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.AccessibilityFocusOvershotSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.AccessibilityFocusOvershotSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, AccessibilityManager.FocusOvershotDirection arg2) + { + NDalicPINVOKE.AccessibilityFocusOvershotSignal_Emit(swigCPtr, View.getCPtr(arg1), (int)arg2); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public AccessibilityFocusOvershotSignal() : this(NDalicPINVOKE.new_AccessibilityFocusOvershotSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/AccessibilityManager.cs b/src/Tizen.NUI/src/internal/AccessibilityManager.cs old mode 100644 new mode 100755 index 076d336..f2a9ed3 --- a/src/Tizen.NUI/src/internal/AccessibilityManager.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityManager.cs @@ -8,2634 +8,2710 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using System; using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; -internal class AccessibilityManager : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal AccessibilityManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.AccessibilityManager_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityManager obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AccessibilityManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - /** - * @brief Event arguments that passed via StatusChanged signal - * - */ - public class StatusChangedEventArgs : EventArgs + internal class AccessibilityManager : BaseHandle { - private AccessibilityManager _accessibilityManager; + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + internal AccessibilityManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.AccessibilityManager_SWIGUpcast(cPtr), cMemoryOwn) { - _accessibilityManager = value; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - } - } - /** - * @brief Event arguments that passed via ActionNext signal - * - */ - public class ActionNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityManager obj) { - _accessibilityManager = value; + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - } - } - - /** - * @brief Event arguments that passed via ActionPrevious signal - * - */ - public class ActionPreviousEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get + protected override void Dispose(DisposeTypes type) { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionActivate signal - * - */ - public class ActionActivateEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + if (disposed) + { + return; + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. - /** - * @brief Event arguments that passed via ActionRead signal - * - */ - public class ActionReadEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - /** - * @brief Event arguments that passed via ActionOver signal - * - */ - public class ActionOverEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AccessibilityManager(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; + base.Dispose(type); } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadNext signal - * - */ - public class ActionReadNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get + /** + * @brief Event arguments that passed via StatusChanged signal + * + */ + public class StatusChangedEventArgs : EventArgs { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadPrevious signal - * - */ - public class ActionReadPreviousEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionNext signal + * + */ + public class ActionNextEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPrevious signal + * + */ + public class ActionPreviousEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionActivate signal + * + */ + public class ActionActivateEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionRead signal + * + */ + public class ActionReadEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionOver signal + * + */ + public class ActionOverEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadNext signal + * + */ + public class ActionReadNextEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadPrevious signal + * + */ + public class ActionReadPreviousEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionUp signal + * + */ + public class ActionUpEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionDown signal + * + */ + public class ActionDownEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionClearFocus signal + * + */ + public class ActionClearFocusEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionBack signal + * + */ + public class ActionBackEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionScrollUp signal + * + */ + public class ActionScrollUpEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionScrollDown signal + * + */ + public class ActionScrollDownEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageLeft signal + * + */ + public class ActionPageLeftEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageRight signal + * + */ + public class ActionPageRightEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageUp signal + * + */ + public class ActionPageUpEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageDown signal + * + */ + public class ActionPageDownEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionMoveToFirst signal + * + */ + public class ActionMoveToFirstEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionMoveToLast signal + * + */ + public class ActionMoveToLastEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadFromTop signal + * + */ + public class ActionReadFromTopEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadFromNext signal + * + */ + public class ActionReadFromNextEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionZoom signal + * + */ + public class ActionZoomEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadIndicatorInformation signal + * + */ + public class ActionReadIndicatorInformationEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadPauseResume signal + * + */ + public class ActionReadPauseResumeEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionStartStop signal + * + */ + public class ActionStartStopEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionScroll signal + * + */ + /* + // To be replaced by a new event that takes Touch + public class ActionScrollEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + private TouchEvent _touchEvent; + + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + + public TouchEvent TouchEvent + { + get + { + return _touchEvent; + } + set + { + _touchEvent = value; + } + } + } + */ + + /** + * @brief Event arguments that passed via ActionPageUp signal + * + */ + public class FocusChangedEventArgs : EventArgs + { + private View _viewCurrent; + private View _viewNext; + + public View ViewCurrent + { + get + { + return _viewCurrent; + } + set + { + _viewCurrent = value; + } + } + + public View ViewNext + { + get + { + return _viewNext; + } + set + { + _viewNext = value; + } + } } - } - } - /** - * @brief Event arguments that passed via ActionUp signal - * - */ - public class ActionUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - public AccessibilityManager AccessibilityManager - { - get + /** + * @brief Event arguments that passed via FocusedViewActivated signal + * + */ + public class FocusedViewActivatedEventArgs : EventArgs { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } + private View _view; - /** - * @brief Event arguments that passed via ActionDown signal - * - */ - public class ActionDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionClearFocus signal - * - */ - public class ActionClearFocusEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + /** + * @brief Event arguments that passed via FocusOvershot signal + * + */ + public class FocusOvershotEventArgs : EventArgs + { + private View _currentFocusedView; + private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection; + + public View CurrentFocusedView + { + get + { + return _currentFocusedView; + } + set + { + _currentFocusedView = value; + } + } + + public AccessibilityManager.FocusOvershotDirection FocusOvershotDirection + { + get + { + return _focusOvershotDirection; + } + set + { + _focusOvershotDirection = value; + } + } + } + + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; + private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; + private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; + private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; + private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; + private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; + private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; + private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; + private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; + private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; + private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; + private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; + private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; + private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; + private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; + private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; + private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; + private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; + private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; + private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; + private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; + private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; + private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; + private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadIndicatorInformationEventHandler; + private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; + private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionStartStopEventHandler; + private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate; + + /* + // To be replaced by a new event that takes Touch + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent); + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; + private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; + */ + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2); + private DaliEventHandler _accessibilityManagerFocusChangedEventHandler; + private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view); + private DaliEventHandler _accessibilityManagerFocusedViewActivatedEventHandler; + private FocusedViewActivatedEventCallbackDelegate _accessibilityManagerFocusedViewActivatedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction); + private DaliEventHandler _accessibilityManagerFocusOvershotEventHandler; + private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate; + + public event DaliEventHandlerWithReturnType StatusChanged + { + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerStatusChangedEventHandler == null) + { + _accessibilityManagerStatusChangedEventHandler += value; + + _accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged); + this.StatusChangedSignal().Connect(_accessibilityManagerStatusChangedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerStatusChangedEventHandler != null) + { + this.StatusChangedSignal().Disconnect(_accessibilityManagerStatusChangedEventCallbackDelegate); + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + _accessibilityManagerStatusChangedEventHandler -= value; + } + } } - } - } - - /** - * @brief Event arguments that passed via ActionBack signal - * - */ - public class ActionBackEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + // Callback for AccessibilityManager StatusChangedSignal + private bool OnStatusChanged(IntPtr data) { - _accessibilityManager = value; - } - } - } + StatusChangedEventArgs e = new StatusChangedEventArgs(); - /** - * @brief Event arguments that passed via ActionScrollUp signal - * - */ - public class ActionScrollUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + // Populate all members of "e" (StatusChangedEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + if (_accessibilityManagerStatusChangedEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerStatusChangedEventHandler(this, e); + } + return false; } - } - } - /** - * @brief Event arguments that passed via ActionScrollDown signal - * - */ - public class ActionScrollDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + public event DaliEventHandlerWithReturnType ActionNext { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageLeft signal - * - */ - public class ActionPageLeftEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionNextEventHandler == null) + { + _accessibilityManagerActionNextEventHandler += value; + + _accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext); + this.ActionNextSignal().Connect(_accessibilityManagerActionNextEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionNextEventHandler != null) + { + this.ActionNextSignal().Disconnect(_accessibilityManagerActionNextEventCallbackDelegate); + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; + _accessibilityManagerActionNextEventHandler -= value; + } + } } - set - { - _accessibilityManager = value; - } - } - } - /** - * @brief Event arguments that passed via ActionPageRight signal - * - */ - public class ActionPageRightEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + // Callback for AccessibilityManager ActionNextSignal + private bool OnActionNext(IntPtr data) { - _accessibilityManager = value; - } - } - } + ActionNextEventArgs e = new ActionNextEventArgs(); - /** - * @brief Event arguments that passed via ActionPageUp signal - * - */ - public class ActionPageUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + // Populate all members of "e" (ActionNextEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + if (_accessibilityManagerActionNextEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionNextEventHandler(this, e); + } + return false; } - } - } - - /** - * @brief Event arguments that passed via ActionPageDown signal - * - */ - public class ActionPageDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get + public event DaliEventHandlerWithReturnType ActionPrevious { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionMoveToFirst signal - * - */ - public class ActionMoveToFirstEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionPreviousEventHandler == null) + { + _accessibilityManagerActionPreviousEventHandler += value; + + _accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious); + this.ActionPreviousSignal().Connect(_accessibilityManagerActionPreviousEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionPreviousEventHandler != null) + { + this.ActionPreviousSignal().Disconnect(_accessibilityManagerActionPreviousEventCallbackDelegate); + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + _accessibilityManagerActionPreviousEventHandler -= value; + } + } } - } - } - - /** - * @brief Event arguments that passed via ActionMoveToLast signal - * - */ - public class ActionMoveToLastEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get + // Callback for AccessibilityManager ActionPreviousSignal + private bool OnActionPrevious(IntPtr data) { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } + ActionPreviousEventArgs e = new ActionPreviousEventArgs(); - /** - * @brief Event arguments that passed via ActionReadFromTop signal - * - */ - public class ActionReadFromTopEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + // Populate all members of "e" (ActionPreviousEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + if (_accessibilityManagerActionPreviousEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPreviousEventHandler(this, e); + } + return false; } - } - } - /** - * @brief Event arguments that passed via ActionReadFromNext signal - * - */ - public class ActionReadFromNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + public event DaliEventHandlerWithReturnType ActionActivate { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionZoom signal - * - */ - public class ActionZoomEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionActivateEventHandler == null) + { + _accessibilityManagerActionActivateEventHandler += value; + + _accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate); + this.ActionActivateSignal().Connect(_accessibilityManagerActionActivateEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionActivateEventHandler != null) + { + this.ActionActivateSignal().Disconnect(_accessibilityManagerActionActivateEventCallbackDelegate); + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; + _accessibilityManagerActionActivateEventHandler -= value; + } + } } - set - { - _accessibilityManager = value; - } - } - } - /** - * @brief Event arguments that passed via ActionReadIndicatorInformation signal - * - */ - public class ActionReadIndicatorInformationEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set + // Callback for AccessibilityManager ActionActivateSignal + private bool OnActionActivate(IntPtr data) { - _accessibilityManager = value; - } - } - } + ActionActivateEventArgs e = new ActionActivateEventArgs(); - /** - * @brief Event arguments that passed via ActionReadPauseResume signal - * - */ - public class ActionReadPauseResumeEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; + // Populate all members of "e" (ActionActivateEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + if (_accessibilityManagerActionActivateEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionActivateEventHandler(this, e); + } + return false; } - } - } - - /** - * @brief Event arguments that passed via ActionStartStop signal - * - */ - public class ActionStartStopEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - public AccessibilityManager AccessibilityManager - { - get + public event DaliEventHandlerWithReturnType ActionRead { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionScroll signal - * - */ -/* - // To be replaced by a new event that takes Touch - public class ActionScrollEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - private TouchEvent _touchEvent; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadEventHandler == null) + { + _accessibilityManagerActionReadEventHandler += value; + + _accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead); + this.ActionReadSignal().Connect(_accessibilityManagerActionReadEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadEventHandler != null) + { + this.ActionReadSignal().Disconnect(_accessibilityManagerActionReadEventCallbackDelegate); + } - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; + _accessibilityManagerActionReadEventHandler -= value; + } + } } - } - public TouchEvent TouchEvent - { - get + // Callback for AccessibilityManager ActionReadSignal + private bool OnActionRead(IntPtr data) { - return _touchEvent; - } - set - { - _touchEvent = value; - } - } - } -*/ + ActionReadEventArgs e = new ActionReadEventArgs(); - /** - * @brief Event arguments that passed via ActionPageUp signal - * - */ - public class FocusChangedEventArgs : EventArgs - { - private View _viewCurrent; - private View _viewNext; + // Populate all members of "e" (ActionReadEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - public View ViewCurrent + if (_accessibilityManagerActionReadEventHandler != null) { - get - { - return _viewCurrent; + //here we send all data to user event handlers + return _accessibilityManagerActionReadEventHandler(this, e); + } + return false; } - set - { - _viewCurrent = value; - } - } - public View ViewNext - { - get - { - return _viewNext; - } - set + public event DaliEventHandlerWithReturnType ActionOver { - _viewNext = value; - } - } - } - - /** - * @brief Event arguments that passed via FocusedViewActivated signal - * - */ - public class FocusedViewActivatedEventArgs : EventArgs - { - private View _view; - - - public View View + add { - get - { - return _view; - } - set - { - _view = value; - } - } - } - - /** - * @brief Event arguments that passed via FocusOvershot signal - * - */ - public class FocusOvershotEventArgs : EventArgs - { - private View _currentFocusedView; - private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection; - - public View CurrentFocusedView + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionOverEventHandler == null) + { + _accessibilityManagerActionOverEventHandler += value; + + _accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver); + this.ActionOverSignal().Connect(_accessibilityManagerActionOverEventCallbackDelegate); + } + } + } + + remove { - get - { - return _currentFocusedView; - } - set - { - _currentFocusedView = value; - } - } + lock (this) + { + if (_accessibilityManagerActionOverEventHandler != null) + { + this.ActionOverSignal().Disconnect(_accessibilityManagerActionOverEventCallbackDelegate); + } - public AccessibilityManager.FocusOvershotDirection FocusOvershotDirection - { - get - { - return _focusOvershotDirection; + _accessibilityManagerActionOverEventHandler -= value; + } + } } - set - { - _focusOvershotDirection = value; - } - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; - private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; - private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; - private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; - private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; - private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; - private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; - private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; - private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; - private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; - private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; - private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; - private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; - private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; - private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; - private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; - private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; - private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; - private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; - private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; - private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; - private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; - private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; - private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadIndicatorInformationEventHandler; - private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; - private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionStartStopEventHandler; - private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate; - -/* - // To be replaced by a new event that takes Touch - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; - private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; -*/ - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2); - private DaliEventHandler _accessibilityManagerFocusChangedEventHandler; - private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view); - private DaliEventHandler _accessibilityManagerFocusedViewActivatedEventHandler; - private FocusedViewActivatedEventCallbackDelegate _accessibilityManagerFocusedViewActivatedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction); - private DaliEventHandler _accessibilityManagerFocusOvershotEventHandler; - private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate; - - public event DaliEventHandlerWithReturnType StatusChanged - { - add - { - lock(this) + // Callback for AccessibilityManager ActionOverSignal + private bool OnActionOver(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerStatusChangedEventHandler == null) - { - _accessibilityManagerStatusChangedEventHandler += value; - - _accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged); - this.StatusChangedSignal().Connect(_accessibilityManagerStatusChangedEventCallbackDelegate); - } - } - } + ActionOverEventArgs e = new ActionOverEventArgs(); - remove - { - lock(this) - { - if (_accessibilityManagerStatusChangedEventHandler != null) - { - this.StatusChangedSignal().Disconnect(_accessibilityManagerStatusChangedEventCallbackDelegate); - } + // Populate all members of "e" (ActionOverEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerStatusChangedEventHandler -= value; + if (_accessibilityManagerActionOverEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionOverEventHandler(this, e); + } + return false; } - } - } - - // Callback for AccessibilityManager StatusChangedSignal - private bool OnStatusChanged(IntPtr data) - { - StatusChangedEventArgs e = new StatusChangedEventArgs(); - - // Populate all members of "e" (StatusChangedEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerStatusChangedEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerStatusChangedEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionNext - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionReadNext { - // Restricted to only one listener - if (_accessibilityManagerActionNextEventHandler == null) - { - _accessibilityManagerActionNextEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadNextEventHandler == null) + { + _accessibilityManagerActionReadNextEventHandler += value; + + _accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext); + this.ActionReadNextSignal().Connect(_accessibilityManagerActionReadNextEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadNextEventHandler != null) + { + this.ActionReadNextSignal().Disconnect(_accessibilityManagerActionReadNextEventCallbackDelegate); + } - _accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext); - this.ActionNextSignal().Connect(_accessibilityManagerActionNextEventCallbackDelegate); - } + _accessibilityManagerActionReadNextEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionReadNextSignal + private bool OnActionReadNext(IntPtr data) { - if (_accessibilityManagerActionNextEventHandler != null) - { - this.ActionNextSignal().Disconnect(_accessibilityManagerActionNextEventCallbackDelegate); - } + ActionReadNextEventArgs e = new ActionReadNextEventArgs(); - _accessibilityManagerActionNextEventHandler -= value; - } - } - } + // Populate all members of "e" (ActionReadNextEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - // Callback for AccessibilityManager ActionNextSignal - private bool OnActionNext(IntPtr data) - { - ActionNextEventArgs e = new ActionNextEventArgs(); - - // Populate all members of "e" (ActionNextEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + if (_accessibilityManagerActionReadNextEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadNextEventHandler(this, e); + } + return false; + } - if (_accessibilityManagerActionNextEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionNextEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionPrevious - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionReadPrevious { - // Restricted to only one listener - if (_accessibilityManagerActionPreviousEventHandler == null) - { - _accessibilityManagerActionPreviousEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadPreviousEventHandler == null) + { + _accessibilityManagerActionReadPreviousEventHandler += value; + + _accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious); + this.ActionReadPreviousSignal().Connect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadPreviousEventHandler != null) + { + this.ActionReadPreviousSignal().Disconnect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); + } - _accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious); - this.ActionPreviousSignal().Connect(_accessibilityManagerActionPreviousEventCallbackDelegate); - } + _accessibilityManagerActionReadPreviousEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionReadPreviousSignal + private bool OnActionReadPrevious(IntPtr data) { - if (_accessibilityManagerActionPreviousEventHandler != null) - { - this.ActionPreviousSignal().Disconnect(_accessibilityManagerActionPreviousEventCallbackDelegate); - } - - _accessibilityManagerActionPreviousEventHandler -= value; - } - } - } - - // Callback for AccessibilityManager ActionPreviousSignal - private bool OnActionPrevious(IntPtr data) - { - ActionPreviousEventArgs e = new ActionPreviousEventArgs(); - - // Populate all members of "e" (ActionPreviousEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionPreviousEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPreviousEventHandler(this, e); - } - return false; - } + ActionReadPreviousEventArgs e = new ActionReadPreviousEventArgs(); - public event DaliEventHandlerWithReturnType ActionActivate - { - add - { - lock(this) - { - // Restricted to only one listener - if (_accessibilityManagerActionActivateEventHandler == null) - { - _accessibilityManagerActionActivateEventHandler += value; + // Populate all members of "e" (ActionReadPreviousEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate); - this.ActionActivateSignal().Connect(_accessibilityManagerActionActivateEventCallbackDelegate); - } + if (_accessibilityManagerActionReadPreviousEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadPreviousEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionUp { - if (_accessibilityManagerActionActivateEventHandler != null) - { - this.ActionActivateSignal().Disconnect(_accessibilityManagerActionActivateEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionUpEventHandler == null) + { + _accessibilityManagerActionUpEventHandler += value; + + _accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp); + this.ActionUpSignal().Connect(_accessibilityManagerActionUpEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionUpEventHandler != null) + { + this.ActionUpSignal().Disconnect(_accessibilityManagerActionUpEventCallbackDelegate); + } - _accessibilityManagerActionActivateEventHandler -= value; + _accessibilityManagerActionUpEventHandler -= value; + } + } } - } - } - - // Callback for AccessibilityManager ActionActivateSignal - private bool OnActionActivate(IntPtr data) - { - ActionActivateEventArgs e = new ActionActivateEventArgs(); - - // Populate all members of "e" (ActionActivateEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionActivateEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionActivateEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionRead - { - add - { - lock(this) + // Callback for AccessibilityManager ActionUpSignal + private bool OnActionUp(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionReadEventHandler == null) - { - _accessibilityManagerActionReadEventHandler += value; - - _accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead); - this.ActionReadSignal().Connect(_accessibilityManagerActionReadEventCallbackDelegate); - } - } - } + ActionUpEventArgs e = new ActionUpEventArgs(); - remove - { - lock(this) - { - if (_accessibilityManagerActionReadEventHandler != null) - { - this.ActionReadSignal().Disconnect(_accessibilityManagerActionReadEventCallbackDelegate); - } + // Populate all members of "e" (ActionUpEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionReadEventHandler -= value; + if (_accessibilityManagerActionUpEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionUpEventHandler(this, e); + } + return false; } - } - } - - // Callback for AccessibilityManager ActionReadSignal - private bool OnActionRead(IntPtr data) - { - ActionReadEventArgs e = new ActionReadEventArgs(); - - // Populate all members of "e" (ActionReadEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionOver - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionDown { - // Restricted to only one listener - if (_accessibilityManagerActionOverEventHandler == null) - { - _accessibilityManagerActionOverEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionDownEventHandler == null) + { + _accessibilityManagerActionDownEventHandler += value; + + _accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown); + this.ActionDownSignal().Connect(_accessibilityManagerActionDownEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionDownEventHandler != null) + { + this.ActionDownSignal().Disconnect(_accessibilityManagerActionDownEventCallbackDelegate); + } - _accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver); - this.ActionOverSignal().Connect(_accessibilityManagerActionOverEventCallbackDelegate); - } + _accessibilityManagerActionDownEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionDownSignal + private bool OnActionDown(IntPtr data) { - if (_accessibilityManagerActionOverEventHandler != null) - { - this.ActionOverSignal().Disconnect(_accessibilityManagerActionOverEventCallbackDelegate); - } - - _accessibilityManagerActionOverEventHandler -= value; - } - } - } - - // Callback for AccessibilityManager ActionOverSignal - private bool OnActionOver(IntPtr data) - { - ActionOverEventArgs e = new ActionOverEventArgs(); - - // Populate all members of "e" (ActionOverEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionOverEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionOverEventHandler(this, e); - } - return false; - } + ActionDownEventArgs e = new ActionDownEventArgs(); - public event DaliEventHandlerWithReturnType ActionReadNext - { - add - { - lock(this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadNextEventHandler == null) - { - _accessibilityManagerActionReadNextEventHandler += value; + // Populate all members of "e" (ActionDownEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext); - this.ActionReadNextSignal().Connect(_accessibilityManagerActionReadNextEventCallbackDelegate); - } + if (_accessibilityManagerActionDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionDownEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionClearFocus { - if (_accessibilityManagerActionReadNextEventHandler != null) - { - this.ActionReadNextSignal().Disconnect(_accessibilityManagerActionReadNextEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionClearFocusEventHandler == null) + { + _accessibilityManagerActionClearFocusEventHandler += value; + + _accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus); + this.ActionClearFocusSignal().Connect(_accessibilityManagerActionClearFocusEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionClearFocusEventHandler != null) + { + this.ActionClearFocusSignal().Disconnect(_accessibilityManagerActionClearFocusEventCallbackDelegate); + } - _accessibilityManagerActionReadNextEventHandler -= value; + _accessibilityManagerActionClearFocusEventHandler -= value; + } + } } - } - } - - // Callback for AccessibilityManager ActionReadNextSignal - private bool OnActionReadNext(IntPtr data) - { - ActionReadNextEventArgs e = new ActionReadNextEventArgs(); - - // Populate all members of "e" (ActionReadNextEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadNextEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadNextEventHandler(this, e); - } - return false; - } - - public event DaliEventHandlerWithReturnType ActionReadPrevious - { - add - { - lock(this) + // Callback for AccessibilityManager ActionClearFocusSignal + private bool OnActionClearFocus(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionReadPreviousEventHandler == null) - { - _accessibilityManagerActionReadPreviousEventHandler += value; + ActionClearFocusEventArgs e = new ActionClearFocusEventArgs(); + + // Populate all members of "e" (ActionClearFocusEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious); - this.ActionReadPreviousSignal().Connect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); - } + if (_accessibilityManagerActionClearFocusEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionClearFocusEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionBack { - if (_accessibilityManagerActionReadPreviousEventHandler != null) - { - this.ActionReadPreviousSignal().Disconnect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionBackEventHandler == null) + { + _accessibilityManagerActionBackEventHandler += value; + + _accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack); + this.ActionBackSignal().Connect(_accessibilityManagerActionBackEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionBackEventHandler != null) + { + this.ActionBackSignal().Disconnect(_accessibilityManagerActionBackEventCallbackDelegate); + } - _accessibilityManagerActionReadPreviousEventHandler -= value; + _accessibilityManagerActionBackEventHandler -= value; + } + } } - } - } - - // Callback for AccessibilityManager ActionReadPreviousSignal - private bool OnActionReadPrevious(IntPtr data) - { - ActionReadPreviousEventArgs e = new ActionReadPreviousEventArgs(); - - // Populate all members of "e" (ActionReadPreviousEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadPreviousEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadPreviousEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionUp - { - add - { - lock(this) + // Callback for AccessibilityManager ActionBackSignal + private bool OnActionBack(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionUpEventHandler == null) - { - _accessibilityManagerActionUpEventHandler += value; + ActionBackEventArgs e = new ActionBackEventArgs(); + + // Populate all members of "e" (ActionBackEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp); - this.ActionUpSignal().Connect(_accessibilityManagerActionUpEventCallbackDelegate); - } + if (_accessibilityManagerActionBackEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionBackEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionScrollUp { - if (_accessibilityManagerActionUpEventHandler != null) - { - this.ActionUpSignal().Disconnect(_accessibilityManagerActionUpEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionScrollUpEventHandler == null) + { + _accessibilityManagerActionScrollUpEventHandler += value; + + _accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp); + this.ActionScrollUpSignal().Connect(_accessibilityManagerActionScrollUpEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionScrollUpEventHandler != null) + { + this.ActionScrollUpSignal().Disconnect(_accessibilityManagerActionScrollUpEventCallbackDelegate); + } - _accessibilityManagerActionUpEventHandler -= value; + _accessibilityManagerActionScrollUpEventHandler -= value; + } + } } - } - } - // Callback for AccessibilityManager ActionUpSignal - private bool OnActionUp(IntPtr data) - { - ActionUpEventArgs e = new ActionUpEventArgs(); + // Callback for AccessibilityManager ActionScrollUpSignal + private bool OnActionScrollUp(IntPtr data) + { + ActionScrollUpEventArgs e = new ActionScrollUpEventArgs(); - // Populate all members of "e" (ActionUpEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + // Populate all members of "e" (ActionScrollUpEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - if (_accessibilityManagerActionUpEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionUpEventHandler(this, e); - } - return false; - } + if (_accessibilityManagerActionScrollUpEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionScrollUpEventHandler(this, e); + } + return false; + } - public event DaliEventHandlerWithReturnType ActionDown - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionScrollDown { - // Restricted to only one listener - if (_accessibilityManagerActionDownEventHandler == null) - { - _accessibilityManagerActionDownEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionScrollDownEventHandler == null) + { + _accessibilityManagerActionScrollDownEventHandler += value; + + _accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown); + this.ActionScrollDownSignal().Connect(_accessibilityManagerActionScrollDownEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionScrollDownEventHandler != null) + { + this.ActionScrollDownSignal().Disconnect(_accessibilityManagerActionScrollDownEventCallbackDelegate); + } - _accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown); - this.ActionDownSignal().Connect(_accessibilityManagerActionDownEventCallbackDelegate); - } + _accessibilityManagerActionScrollDownEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionScrollDownSignal + private bool OnActionScrollDown(IntPtr data) { - if (_accessibilityManagerActionDownEventHandler != null) - { - this.ActionDownSignal().Disconnect(_accessibilityManagerActionDownEventCallbackDelegate); - } + ActionScrollDownEventArgs e = new ActionScrollDownEventArgs(); + + // Populate all members of "e" (ActionScrollDownEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionDownEventHandler -= value; + if (_accessibilityManagerActionScrollDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionScrollDownEventHandler(this, e); + } + return false; } - } - } - // Callback for AccessibilityManager ActionDownSignal - private bool OnActionDown(IntPtr data) - { - ActionDownEventArgs e = new ActionDownEventArgs(); - // Populate all members of "e" (ActionDownEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public event DaliEventHandlerWithReturnType ActionPageLeft + { + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionPageLeftEventHandler == null) + { + _accessibilityManagerActionPageLeftEventHandler += value; + + _accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft); + this.ActionPageLeftSignal().Connect(_accessibilityManagerActionPageLeftEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionPageLeftEventHandler != null) + { + this.ActionPageLeftSignal().Disconnect(_accessibilityManagerActionPageLeftEventCallbackDelegate); + } - if (_accessibilityManagerActionDownEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionDownEventHandler(this, e); - } - return false; - } + _accessibilityManagerActionPageLeftEventHandler -= value; + } + } + } - public event DaliEventHandlerWithReturnType ActionClearFocus - { - add - { - lock(this) + // Callback for AccessibilityManager ActionPageLeftSignal + private bool OnActionPageLeft(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionClearFocusEventHandler == null) - { - _accessibilityManagerActionClearFocusEventHandler += value; + ActionPageLeftEventArgs e = new ActionPageLeftEventArgs(); + + // Populate all members of "e" (ActionPageLeftEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus); - this.ActionClearFocusSignal().Connect(_accessibilityManagerActionClearFocusEventCallbackDelegate); - } + if (_accessibilityManagerActionPageLeftEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageLeftEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionPageRight { - if (_accessibilityManagerActionClearFocusEventHandler != null) - { - this.ActionClearFocusSignal().Disconnect(_accessibilityManagerActionClearFocusEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionPageRightEventHandler == null) + { + _accessibilityManagerActionPageRightEventHandler += value; + + _accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight); + this.ActionPageRightSignal().Connect(_accessibilityManagerActionPageRightEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionPageRightEventHandler != null) + { + this.ActionPageRightSignal().Disconnect(_accessibilityManagerActionPageRightEventCallbackDelegate); + } - _accessibilityManagerActionClearFocusEventHandler -= value; + _accessibilityManagerActionPageRightEventHandler -= value; + } + } } - } - } - // Callback for AccessibilityManager ActionClearFocusSignal - private bool OnActionClearFocus(IntPtr data) - { - ActionClearFocusEventArgs e = new ActionClearFocusEventArgs(); + // Callback for AccessibilityManager ActionPageRightSignal + private bool OnActionPageRight(IntPtr data) + { + ActionPageRightEventArgs e = new ActionPageRightEventArgs(); - // Populate all members of "e" (ActionClearFocusEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + // Populate all members of "e" (ActionPageRightEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - if (_accessibilityManagerActionClearFocusEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionClearFocusEventHandler(this, e); - } - return false; - } + if (_accessibilityManagerActionPageRightEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageRightEventHandler(this, e); + } + return false; + } - public event DaliEventHandlerWithReturnType ActionBack - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionPageUp { - // Restricted to only one listener - if (_accessibilityManagerActionBackEventHandler == null) - { - _accessibilityManagerActionBackEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionPageUpEventHandler == null) + { + _accessibilityManagerActionPageUpEventHandler += value; + + _accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp); + this.ActionPageUpSignal().Connect(_accessibilityManagerActionPageUpEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionPageUpEventHandler != null) + { + this.ActionPageUpSignal().Disconnect(_accessibilityManagerActionPageUpEventCallbackDelegate); + } - _accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack); - this.ActionBackSignal().Connect(_accessibilityManagerActionBackEventCallbackDelegate); - } + _accessibilityManagerActionPageUpEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionPageUpSignal + private bool OnActionPageUp(IntPtr data) { - if (_accessibilityManagerActionBackEventHandler != null) - { - this.ActionBackSignal().Disconnect(_accessibilityManagerActionBackEventCallbackDelegate); - } + ActionPageUpEventArgs e = new ActionPageUpEventArgs(); - _accessibilityManagerActionBackEventHandler -= value; - } - } - } - - // Callback for AccessibilityManager ActionBackSignal - private bool OnActionBack(IntPtr data) - { - ActionBackEventArgs e = new ActionBackEventArgs(); + // Populate all members of "e" (ActionPageUpEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - // Populate all members of "e" (ActionBackEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + if (_accessibilityManagerActionPageUpEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageUpEventHandler(this, e); + } + return false; + } - if (_accessibilityManagerActionBackEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionBackEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionScrollUp - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionPageDown { - // Restricted to only one listener - if (_accessibilityManagerActionScrollUpEventHandler == null) - { - _accessibilityManagerActionScrollUpEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionPageDownEventHandler == null) + { + _accessibilityManagerActionPageDownEventHandler += value; + + _accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown); + this.ActionPageDownSignal().Connect(_accessibilityManagerActionPageDownEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionPageDownEventHandler != null) + { + this.ActionPageDownSignal().Disconnect(_accessibilityManagerActionPageDownEventCallbackDelegate); + } - _accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp); - this.ActionScrollUpSignal().Connect(_accessibilityManagerActionScrollUpEventCallbackDelegate); - } + _accessibilityManagerActionPageDownEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionPageDownSignal + private bool OnActionPageDown(IntPtr data) { - if (_accessibilityManagerActionScrollUpEventHandler != null) - { - this.ActionScrollUpSignal().Disconnect(_accessibilityManagerActionScrollUpEventCallbackDelegate); - } + ActionPageDownEventArgs e = new ActionPageDownEventArgs(); - _accessibilityManagerActionScrollUpEventHandler -= value; + // Populate all members of "e" (ActionPageDownEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + + if (_accessibilityManagerActionPageDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageDownEventHandler(this, e); + } + return false; } - } - } - // Callback for AccessibilityManager ActionScrollUpSignal - private bool OnActionScrollUp(IntPtr data) - { - ActionScrollUpEventArgs e = new ActionScrollUpEventArgs(); - // Populate all members of "e" (ActionScrollUpEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public event DaliEventHandlerWithReturnType ActionMoveToFirst + { + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionMoveToFirstEventHandler == null) + { + _accessibilityManagerActionMoveToFirstEventHandler += value; + + _accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst); + this.ActionMoveToFirstSignal().Connect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionMoveToFirstEventHandler != null) + { + this.ActionMoveToFirstSignal().Disconnect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); + } - if (_accessibilityManagerActionScrollUpEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionScrollUpEventHandler(this, e); - } - return false; - } + _accessibilityManagerActionMoveToFirstEventHandler -= value; + } + } + } - public event DaliEventHandlerWithReturnType ActionScrollDown - { - add - { - lock(this) + // Callback for AccessibilityManager ActionMoveToFirstSignal + private bool OnActionMoveToFirst(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionScrollDownEventHandler == null) - { - _accessibilityManagerActionScrollDownEventHandler += value; + ActionMoveToFirstEventArgs e = new ActionMoveToFirstEventArgs(); - _accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown); - this.ActionScrollDownSignal().Connect(_accessibilityManagerActionScrollDownEventCallbackDelegate); - } + // Populate all members of "e" (ActionMoveToFirstEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + + if (_accessibilityManagerActionMoveToFirstEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionMoveToFirstEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionMoveToLast { - if (_accessibilityManagerActionScrollDownEventHandler != null) - { - this.ActionScrollDownSignal().Disconnect(_accessibilityManagerActionScrollDownEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionMoveToLastEventHandler == null) + { + _accessibilityManagerActionMoveToLastEventHandler += value; + + _accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast); + this.ActionMoveToLastSignal().Connect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionMoveToLastEventHandler != null) + { + this.ActionMoveToLastSignal().Disconnect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); + } - _accessibilityManagerActionScrollDownEventHandler -= value; + _accessibilityManagerActionMoveToLastEventHandler -= value; + } + } } - } - } - - // Callback for AccessibilityManager ActionScrollDownSignal - private bool OnActionScrollDown(IntPtr data) - { - ActionScrollDownEventArgs e = new ActionScrollDownEventArgs(); - // Populate all members of "e" (ActionScrollDownEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + // Callback for AccessibilityManager ActionMoveToLastSignal + private bool OnActionMoveToLast(IntPtr data) + { + ActionMoveToLastEventArgs e = new ActionMoveToLastEventArgs(); - if (_accessibilityManagerActionScrollDownEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionScrollDownEventHandler(this, e); - } - return false; - } + // Populate all members of "e" (ActionMoveToLastEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + if (_accessibilityManagerActionMoveToLastEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionMoveToLastEventHandler(this, e); + } + return false; + } - public event DaliEventHandlerWithReturnType ActionPageLeft - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionReadFromTop { - // Restricted to only one listener - if (_accessibilityManagerActionPageLeftEventHandler == null) - { - _accessibilityManagerActionPageLeftEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadFromTopEventHandler == null) + { + _accessibilityManagerActionReadFromTopEventHandler += value; + + _accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop); + this.ActionReadFromTopSignal().Connect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadFromTopEventHandler != null) + { + this.ActionReadFromTopSignal().Disconnect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); + } - _accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft); - this.ActionPageLeftSignal().Connect(_accessibilityManagerActionPageLeftEventCallbackDelegate); - } + _accessibilityManagerActionReadFromTopEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionReadFromTopSignal + private bool OnActionReadFromTop(IntPtr data) { - if (_accessibilityManagerActionPageLeftEventHandler != null) - { - this.ActionPageLeftSignal().Disconnect(_accessibilityManagerActionPageLeftEventCallbackDelegate); - } + ActionReadFromTopEventArgs e = new ActionReadFromTopEventArgs(); - _accessibilityManagerActionPageLeftEventHandler -= value; - } - } - } + // Populate all members of "e" (ActionReadFromTopEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - // Callback for AccessibilityManager ActionPageLeftSignal - private bool OnActionPageLeft(IntPtr data) - { - ActionPageLeftEventArgs e = new ActionPageLeftEventArgs(); + if (_accessibilityManagerActionReadFromTopEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadFromTopEventHandler(this, e); + } + return false; + } - // Populate all members of "e" (ActionPageLeftEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public event DaliEventHandlerWithReturnType ActionReadFromNext + { + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadFromNextEventHandler == null) + { + _accessibilityManagerActionReadFromNextEventHandler += value; + + _accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext); + this.ActionReadFromNextSignal().Connect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadFromNextEventHandler != null) + { + this.ActionReadFromNextSignal().Disconnect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); + } - if (_accessibilityManagerActionPageLeftEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageLeftEventHandler(this, e); - } - return false; - } + _accessibilityManagerActionReadFromNextEventHandler -= value; + } + } + } - public event DaliEventHandlerWithReturnType ActionPageRight - { - add - { - lock(this) + // Callback for AccessibilityManager ActionReadFromNextSignal + private bool OnActionReadFromNext(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionPageRightEventHandler == null) - { - _accessibilityManagerActionPageRightEventHandler += value; + ActionReadFromNextEventArgs e = new ActionReadFromNextEventArgs(); + + // Populate all members of "e" (ActionReadFromNextEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - _accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight); - this.ActionPageRightSignal().Connect(_accessibilityManagerActionPageRightEventCallbackDelegate); - } + if (_accessibilityManagerActionReadFromNextEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadFromNextEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionZoom { - if (_accessibilityManagerActionPageRightEventHandler != null) - { - this.ActionPageRightSignal().Disconnect(_accessibilityManagerActionPageRightEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionZoomEventHandler == null) + { + _accessibilityManagerActionZoomEventHandler += value; + + _accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom); + this.ActionZoomSignal().Connect(_accessibilityManagerActionZoomEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionZoomEventHandler != null) + { + this.ActionZoomSignal().Disconnect(_accessibilityManagerActionZoomEventCallbackDelegate); + } - _accessibilityManagerActionPageRightEventHandler -= value; + _accessibilityManagerActionZoomEventHandler -= value; + } + } } - } - } - // Callback for AccessibilityManager ActionPageRightSignal - private bool OnActionPageRight(IntPtr data) - { - ActionPageRightEventArgs e = new ActionPageRightEventArgs(); + // Callback for AccessibilityManager ActionZoomSignal + private bool OnActionZoom(IntPtr data) + { + ActionZoomEventArgs e = new ActionZoomEventArgs(); - // Populate all members of "e" (ActionPageRightEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + // Populate all members of "e" (ActionZoomEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - if (_accessibilityManagerActionPageRightEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageRightEventHandler(this, e); - } - return false; - } + if (_accessibilityManagerActionZoomEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionZoomEventHandler(this, e); + } + return false; + } - public event DaliEventHandlerWithReturnType ActionPageUp - { - add - { - lock(this) + public event DaliEventHandlerWithReturnType ActionReadIndicatorInformation { - // Restricted to only one listener - if (_accessibilityManagerActionPageUpEventHandler == null) - { - _accessibilityManagerActionPageUpEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadIndicatorInformationEventHandler == null) + { + _accessibilityManagerActionReadIndicatorInformationEventHandler += value; + + _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate = new ActionReadIndicatorInformationEventCallbackDelegate(OnActionReadIndicatorInformation); + this.ActionReadIndicatorInformationSignal().Connect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) + { + this.ActionReadIndicatorInformationSignal().Disconnect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate); + } - _accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp); - this.ActionPageUpSignal().Connect(_accessibilityManagerActionPageUpEventCallbackDelegate); - } + _accessibilityManagerActionReadIndicatorInformationEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager ActionReadIndicatorInformationSignal + private bool OnActionReadIndicatorInformation(IntPtr data) { - if (_accessibilityManagerActionPageUpEventHandler != null) - { - this.ActionPageUpSignal().Disconnect(_accessibilityManagerActionPageUpEventCallbackDelegate); - } - - _accessibilityManagerActionPageUpEventHandler -= value; - } - } - } + ActionReadIndicatorInformationEventArgs e = new ActionReadIndicatorInformationEventArgs(); - // Callback for AccessibilityManager ActionPageUpSignal - private bool OnActionPageUp(IntPtr data) - { - ActionPageUpEventArgs e = new ActionPageUpEventArgs(); + // Populate all members of "e" (ActionReadIndicatorInformationEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - // Populate all members of "e" (ActionPageUpEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadIndicatorInformationEventHandler(this, e); + } + return false; + } - if (_accessibilityManagerActionPageUpEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageUpEventHandler(this, e); - } - return false; - } + public event DaliEventHandlerWithReturnType ActionReadPauseResume + { + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionReadPauseResumeEventHandler == null) + { + _accessibilityManagerActionReadPauseResumeEventHandler += value; + + _accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume); + this.ActionReadPauseResumeSignal().Connect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionReadPauseResumeEventHandler != null) + { + this.ActionReadPauseResumeSignal().Disconnect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); + } + _accessibilityManagerActionReadPauseResumeEventHandler -= value; + } + } + } - public event DaliEventHandlerWithReturnType ActionPageDown - { - add - { - lock(this) + // Callback for AccessibilityManager ActionReadPauseResumeSignal + private bool OnActionReadPauseResume(IntPtr data) { - // Restricted to only one listener - if (_accessibilityManagerActionPageDownEventHandler == null) - { - _accessibilityManagerActionPageDownEventHandler += value; + ActionReadPauseResumeEventArgs e = new ActionReadPauseResumeEventArgs(); - _accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown); - this.ActionPageDownSignal().Connect(_accessibilityManagerActionPageDownEventCallbackDelegate); - } + // Populate all members of "e" (ActionReadPauseResumeEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + + if (_accessibilityManagerActionReadPauseResumeEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadPauseResumeEventHandler(this, e); + } + return false; } - } - remove - { - lock(this) + public event DaliEventHandlerWithReturnType ActionStartStop { - if (_accessibilityManagerActionPageDownEventHandler != null) - { - this.ActionPageDownSignal().Disconnect(_accessibilityManagerActionPageDownEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerActionStartStopEventHandler == null) + { + _accessibilityManagerActionStartStopEventHandler += value; + + _accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop); + this.ActionStartStopSignal().Connect(_accessibilityManagerActionStartStopEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerActionStartStopEventHandler != null) + { + this.ActionStartStopSignal().Disconnect(_accessibilityManagerActionStartStopEventCallbackDelegate); + } - _accessibilityManagerActionPageDownEventHandler -= value; + _accessibilityManagerActionStartStopEventHandler -= value; + } + } } - } - } - // Callback for AccessibilityManager ActionPageDownSignal - private bool OnActionPageDown(IntPtr data) - { - ActionPageDownEventArgs e = new ActionPageDownEventArgs(); + // Callback for AccessibilityManager ActionStartStopSignal + private bool OnActionStartStop(IntPtr data) + { + ActionStartStopEventArgs e = new ActionStartStopEventArgs(); - // Populate all members of "e" (ActionPageDownEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + // Populate all members of "e" (ActionStartStopEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - if (_accessibilityManagerActionPageDownEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageDownEventHandler(this, e); - } - return false; - } + if (_accessibilityManagerActionStartStopEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionStartStopEventHandler(this, e); + } + return false; + } + /* + // To be replaced by a new event that takes Touch + public event DaliEventHandlerWithReturnType ActionScroll + { + add + { + lock(this) + { + // Restricted to only one listener + if (_accessibilityManagerActionScrollEventHandler == null) + { + _accessibilityManagerActionScrollEventHandler += value; + + _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll); + this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_accessibilityManagerActionScrollEventHandler != null) + { + this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate); + } + + _accessibilityManagerActionScrollEventHandler -= value; + } + } + } + + // Callback for AccessibilityManager ActionScrollSignal + private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent) + { + ActionScrollEventArgs e = new ActionScrollEventArgs(); - public event DaliEventHandlerWithReturnType ActionMoveToFirst - { - add - { - lock(this) - { - // Restricted to only one listener - if (_accessibilityManagerActionMoveToFirstEventHandler == null) - { - _accessibilityManagerActionMoveToFirstEventHandler += value; + // Populate all members of "e" (ActionScrollEventArgs) with real data + e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager); + e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent); - _accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst); - this.ActionMoveToFirstSignal().Connect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); - } - } - } + if (_accessibilityManagerActionScrollEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionScrollEventHandler(this, e); + } + return false; + } + */ - remove - { - lock(this) + public event DaliEventHandler FocusChanged { - if (_accessibilityManagerActionMoveToFirstEventHandler != null) - { - this.ActionMoveToFirstSignal().Disconnect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerFocusChangedEventHandler == null) + { + _accessibilityManagerFocusChangedEventHandler += value; + + _accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged); + this.FocusChangedSignal().Connect(_accessibilityManagerFocusChangedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerFocusChangedEventHandler != null) + { + this.FocusChangedSignal().Disconnect(_accessibilityManagerFocusChangedEventCallbackDelegate); + } - _accessibilityManagerActionMoveToFirstEventHandler -= value; + _accessibilityManagerFocusChangedEventHandler -= value; + } + } } - } - } - // Callback for AccessibilityManager ActionMoveToFirstSignal - private bool OnActionMoveToFirst(IntPtr data) - { - ActionMoveToFirstEventArgs e = new ActionMoveToFirstEventArgs(); + // Callback for AccessibilityManager FocusChangedSignal + private void OnFocusChanged(IntPtr view1, IntPtr view2) + { + FocusChangedEventArgs e = new FocusChangedEventArgs(); - // Populate all members of "e" (ActionMoveToFirstEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + // Populate all members of "e" (FocusChangedEventArgs) with real data + e.ViewCurrent = View.GetViewFromPtr(view1); + e.ViewNext = View.GetViewFromPtr(view2); - if (_accessibilityManagerActionMoveToFirstEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionMoveToFirstEventHandler(this, e); - } - return false; - } + if (_accessibilityManagerFocusChangedEventHandler != null) + { + //here we send all data to user event handlers + _accessibilityManagerFocusChangedEventHandler(this, e); + } + } - public event DaliEventHandlerWithReturnType ActionMoveToLast - { - add - { - lock(this) + public event DaliEventHandler FocusedViewActivated { - // Restricted to only one listener - if (_accessibilityManagerActionMoveToLastEventHandler == null) - { - _accessibilityManagerActionMoveToLastEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerFocusedViewActivatedEventHandler == null) + { + _accessibilityManagerFocusedViewActivatedEventHandler += value; + + _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); + this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerFocusedViewActivatedEventHandler != null) + { + this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); + } - _accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast); - this.ActionMoveToLastSignal().Connect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); - } + _accessibilityManagerFocusedViewActivatedEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager FocusedViewActivatedSignal + private void OnFocusedViewActivated(IntPtr view) { - if (_accessibilityManagerActionMoveToLastEventHandler != null) - { - this.ActionMoveToLastSignal().Disconnect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); - } + FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs(); - _accessibilityManagerActionMoveToLastEventHandler -= value; - } - } - } - - // Callback for AccessibilityManager ActionMoveToLastSignal - private bool OnActionMoveToLast(IntPtr data) - { - ActionMoveToLastEventArgs e = new ActionMoveToLastEventArgs(); + // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data + e.View = View.GetViewFromPtr(view); - // Populate all members of "e" (ActionMoveToLastEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + if (_accessibilityManagerFocusedViewActivatedEventHandler != null) + { + //here we send all data to user event handlers + _accessibilityManagerFocusedViewActivatedEventHandler(this, e); + } + } - if (_accessibilityManagerActionMoveToLastEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionMoveToLastEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionReadFromTop - { - add - { - lock(this) + public event DaliEventHandler FocusOvershot { - // Restricted to only one listener - if (_accessibilityManagerActionReadFromTopEventHandler == null) - { - _accessibilityManagerActionReadFromTopEventHandler += value; + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerFocusOvershotEventHandler == null) + { + _accessibilityManagerFocusOvershotEventHandler += value; + + _accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot); + this.FocusOvershotSignal().Connect(_accessibilityManagerFocusOvershotEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerFocusOvershotEventHandler != null) + { + this.FocusOvershotSignal().Disconnect(_accessibilityManagerFocusOvershotEventCallbackDelegate); + } - _accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop); - this.ActionReadFromTopSignal().Connect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); - } + _accessibilityManagerFocusOvershotEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for AccessibilityManager FocusOvershotSignal + private void OnFocusOvershot(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction) { - if (_accessibilityManagerActionReadFromTopEventHandler != null) - { - this.ActionReadFromTopSignal().Disconnect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); - } + FocusOvershotEventArgs e = new FocusOvershotEventArgs(); - _accessibilityManagerActionReadFromTopEventHandler -= value; + // Populate all members of "e" (FocusOvershotEventArgs) with real data + e.CurrentFocusedView = View.GetViewFromPtr(currentFocusedView); + e.FocusOvershotDirection = direction; + + if (_accessibilityManagerFocusOvershotEventHandler != null) + { + //here we send all data to user event handlers + _accessibilityManagerFocusOvershotEventHandler(this, e); + } } - } - } - // Callback for AccessibilityManager ActionReadFromTopSignal - private bool OnActionReadFromTop(IntPtr data) - { - ActionReadFromTopEventArgs e = new ActionReadFromTopEventArgs(); - // Populate all members of "e" (ActionReadFromTopEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public static AccessibilityManager GetAccessibilityManagerFromPtr(global::System.IntPtr cPtr) + { + AccessibilityManager ret = new AccessibilityManager(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerActionReadFromTopEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadFromTopEventHandler(this, e); - } - return false; - } - public event DaliEventHandlerWithReturnType ActionReadFromNext - { - add - { - lock(this) + public AccessibilityManager() : this(NDalicPINVOKE.new_AccessibilityManager(), true) { - // Restricted to only one listener - if (_accessibilityManagerActionReadFromNextEventHandler == null) - { - _accessibilityManagerActionReadFromNextEventHandler += value; - - _accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext); - this.ActionReadFromNextSignal().Connect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); - } + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - remove - { - lock(this) + public static AccessibilityManager Get() { - if (_accessibilityManagerActionReadFromNextEventHandler != null) - { - this.ActionReadFromNextSignal().Disconnect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); - } - - _accessibilityManagerActionReadFromNextEventHandler -= value; + AccessibilityManager ret = new AccessibilityManager(NDalicPINVOKE.AccessibilityManager_Get(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - - // Callback for AccessibilityManager ActionReadFromNextSignal - private bool OnActionReadFromNext(IntPtr data) - { - ActionReadFromNextEventArgs e = new ActionReadFromNextEventArgs(); - - // Populate all members of "e" (ActionReadFromNextEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - if (_accessibilityManagerActionReadFromNextEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadFromNextEventHandler(this, e); - } - return false; - } - - public event DaliEventHandlerWithReturnType ActionZoom - { - add - { - lock(this) + public void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text) { - // Restricted to only one listener - if (_accessibilityManagerActionZoomEventHandler == null) - { - _accessibilityManagerActionZoomEventHandler += value; + NDalicPINVOKE.AccessibilityManager_SetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type, text); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom); - this.ActionZoomSignal().Connect(_accessibilityManagerActionZoomEventCallbackDelegate); - } + public string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type) + { + string ret = NDalicPINVOKE.AccessibilityManager_GetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public void SetFocusOrder(View view, uint order) { - if (_accessibilityManagerActionZoomEventHandler != null) - { - this.ActionZoomSignal().Disconnect(_accessibilityManagerActionZoomEventCallbackDelegate); - } + NDalicPINVOKE.AccessibilityManager_SetFocusOrder(swigCPtr, View.getCPtr(view), order); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _accessibilityManagerActionZoomEventHandler -= value; + public uint GetFocusOrder(View view) + { + uint ret = NDalicPINVOKE.AccessibilityManager_GetFocusOrder(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager ActionZoomSignal - private bool OnActionZoom(IntPtr data) - { - ActionZoomEventArgs e = new ActionZoomEventArgs(); + public uint GenerateNewFocusOrder() + { + uint ret = NDalicPINVOKE.AccessibilityManager_GenerateNewFocusOrder(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - // Populate all members of "e" (ActionZoomEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public View GetViewByFocusOrder(uint order) + { + View ret = new View(NDalicPINVOKE.AccessibilityManager_GetActorByFocusOrder(swigCPtr, order), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerActionZoomEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionZoomEventHandler(this, e); - } - return false; - } + public bool SetCurrentFocusView(View view) + { + bool ret = NDalicPINVOKE.AccessibilityManager_SetCurrentFocusActor(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public event DaliEventHandlerWithReturnType ActionReadIndicatorInformation - { - add - { - lock(this) + public View GetCurrentFocusView() { - // Restricted to only one listener - if (_accessibilityManagerActionReadIndicatorInformationEventHandler == null) - { - _accessibilityManagerActionReadIndicatorInformationEventHandler += value; + View ret = new View(NDalicPINVOKE.AccessibilityManager_GetCurrentFocusActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate = new ActionReadIndicatorInformationEventCallbackDelegate(OnActionReadIndicatorInformation); - this.ActionReadIndicatorInformationSignal().Connect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate); - } + public View GetCurrentFocusGroup() + { + View ret = new View(NDalicPINVOKE.AccessibilityManager_GetCurrentFocusGroup(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public uint GetCurrentFocusOrder() { - if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) - { - this.ActionReadIndicatorInformationSignal().Disconnect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate); - } + uint ret = NDalicPINVOKE.AccessibilityManager_GetCurrentFocusOrder(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerActionReadIndicatorInformationEventHandler -= value; + public bool MoveFocusForward() + { + bool ret = NDalicPINVOKE.AccessibilityManager_MoveFocusForward(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager ActionReadIndicatorInformationSignal - private bool OnActionReadIndicatorInformation(IntPtr data) - { - ActionReadIndicatorInformationEventArgs e = new ActionReadIndicatorInformationEventArgs(); + public bool MoveFocusBackward() + { + bool ret = NDalicPINVOKE.AccessibilityManager_MoveFocusBackward(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - // Populate all members of "e" (ActionReadIndicatorInformationEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public void ClearFocus() + { + NDalicPINVOKE.AccessibilityManager_ClearFocus(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadIndicatorInformationEventHandler(this, e); - } - return false; - } + public new void Reset() + { + NDalicPINVOKE.AccessibilityManager_Reset(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public event DaliEventHandlerWithReturnType ActionReadPauseResume - { - add - { - lock(this) + public void SetFocusGroup(View view, bool isFocusGroup) { - // Restricted to only one listener - if (_accessibilityManagerActionReadPauseResumeEventHandler == null) - { - _accessibilityManagerActionReadPauseResumeEventHandler += value; + NDalicPINVOKE.AccessibilityManager_SetFocusGroup(swigCPtr, View.getCPtr(view), isFocusGroup); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume); - this.ActionReadPauseResumeSignal().Connect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); - } + public bool IsFocusGroup(View view) + { + bool ret = NDalicPINVOKE.AccessibilityManager_IsFocusGroup(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public void SetGroupMode(bool enabled) { - if (_accessibilityManagerActionReadPauseResumeEventHandler != null) - { - this.ActionReadPauseResumeSignal().Disconnect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); - } + NDalicPINVOKE.AccessibilityManager_SetGroupMode(swigCPtr, enabled); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _accessibilityManagerActionReadPauseResumeEventHandler -= value; + public bool GetGroupMode() + { + bool ret = NDalicPINVOKE.AccessibilityManager_GetGroupMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager ActionReadPauseResumeSignal - private bool OnActionReadPauseResume(IntPtr data) - { - ActionReadPauseResumeEventArgs e = new ActionReadPauseResumeEventArgs(); + public void SetWrapMode(bool wrapped) + { + NDalicPINVOKE.AccessibilityManager_SetWrapMode(swigCPtr, wrapped); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - // Populate all members of "e" (ActionReadPauseResumeEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public bool GetWrapMode() + { + bool ret = NDalicPINVOKE.AccessibilityManager_GetWrapMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerActionReadPauseResumeEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadPauseResumeEventHandler(this, e); - } - return false; - } + public void SetFocusIndicatorView(View indicator) + { + NDalicPINVOKE.AccessibilityManager_SetFocusIndicatorActor(swigCPtr, View.getCPtr(indicator)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public event DaliEventHandlerWithReturnType ActionStartStop - { - add - { - lock(this) + public View GetFocusIndicatorView() { - // Restricted to only one listener - if (_accessibilityManagerActionStartStopEventHandler == null) - { - _accessibilityManagerActionStartStopEventHandler += value; + View ret = new View(NDalicPINVOKE.AccessibilityManager_GetFocusIndicatorActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop); - this.ActionStartStopSignal().Connect(_accessibilityManagerActionStartStopEventCallbackDelegate); - } + public View GetFocusGroup(View view) + { + View ret = new View(NDalicPINVOKE.AccessibilityManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public Vector2 GetReadPosition() { - if (_accessibilityManagerActionStartStopEventHandler != null) - { - this.ActionStartStopSignal().Disconnect(_accessibilityManagerActionStartStopEventCallbackDelegate); - } + Vector2 ret = new Vector2(NDalicPINVOKE.AccessibilityManager_GetReadPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerActionStartStopEventHandler -= value; + public FocusChangedSignal FocusChangedSignal() + { + FocusChangedSignal ret = new FocusChangedSignal(NDalicPINVOKE.AccessibilityManager_FocusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager ActionStartStopSignal - private bool OnActionStartStop(IntPtr data) - { - ActionStartStopEventArgs e = new ActionStartStopEventArgs(); + public AccessibilityFocusOvershotSignal FocusOvershotSignal() + { + AccessibilityFocusOvershotSignal ret = new AccessibilityFocusOvershotSignal(NDalicPINVOKE.AccessibilityManager_FocusOvershotSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - // Populate all members of "e" (ActionStartStopEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); + public ViewSignal FocusedViewActivatedSignal() + { + ViewSignal ret = new ViewSignal(NDalicPINVOKE.AccessibilityManager_FocusedActorActivatedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerActionStartStopEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionStartStopEventHandler(this, e); - } - return false; - } + public AccessibilityActionSignal StatusChangedSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_StatusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -/* - // To be replaced by a new event that takes Touch - public event DaliEventHandlerWithReturnType ActionScroll - { - add - { - lock(this) + public AccessibilityActionSignal ActionNextSignal() { - // Restricted to only one listener - if (_accessibilityManagerActionScrollEventHandler == null) - { - _accessibilityManagerActionScrollEventHandler += value; + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionNextSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll); - this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate); - } + public AccessibilityActionSignal ActionPreviousSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPreviousSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public AccessibilityActionSignal ActionActivateSignal() { - if (_accessibilityManagerActionScrollEventHandler != null) - { - this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate); - } + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionActivateSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerActionScrollEventHandler -= value; + public AccessibilityActionSignal ActionReadSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager ActionScrollSignal - private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent) - { - ActionScrollEventArgs e = new ActionScrollEventArgs(); - - // Populate all members of "e" (ActionScrollEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager); - e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent); - - if (_accessibilityManagerActionScrollEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionScrollEventHandler(this, e); - } - return false; - } -*/ + public AccessibilityActionSignal ActionOverSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionOverSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public event DaliEventHandler FocusChanged - { - add - { - lock(this) + public AccessibilityActionSignal ActionReadNextSignal() { - // Restricted to only one listener - if (_accessibilityManagerFocusChangedEventHandler == null) - { - _accessibilityManagerFocusChangedEventHandler += value; + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadNextSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged); - this.FocusChangedSignal().Connect(_accessibilityManagerFocusChangedEventCallbackDelegate); - } + public AccessibilityActionSignal ActionReadPreviousSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadPreviousSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public AccessibilityActionSignal ActionUpSignal() { - if (_accessibilityManagerFocusChangedEventHandler != null) - { - this.FocusChangedSignal().Disconnect(_accessibilityManagerFocusChangedEventCallbackDelegate); - } + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionUpSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerFocusChangedEventHandler -= value; + public AccessibilityActionSignal ActionDownSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionDownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager FocusChangedSignal - private void OnFocusChanged(IntPtr view1, IntPtr view2) - { - FocusChangedEventArgs e = new FocusChangedEventArgs(); + public AccessibilityActionSignal ActionClearFocusSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionClearFocusSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - // Populate all members of "e" (FocusChangedEventArgs) with real data - e.ViewCurrent = View.GetViewFromPtr(view1); - e.ViewNext = View.GetViewFromPtr(view2); + public AccessibilityActionSignal ActionBackSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionBackSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerFocusChangedEventHandler != null) - { - //here we send all data to user event handlers - _accessibilityManagerFocusChangedEventHandler(this, e); - } - } + public AccessibilityActionSignal ActionScrollUpSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionScrollUpSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public event DaliEventHandler FocusedViewActivated - { - add - { - lock(this) + public AccessibilityActionSignal ActionScrollDownSignal() { - // Restricted to only one listener - if (_accessibilityManagerFocusedViewActivatedEventHandler == null) - { - _accessibilityManagerFocusedViewActivatedEventHandler += value; + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionScrollDownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); - this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); - } + public AccessibilityActionSignal ActionPageLeftSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageLeftSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public AccessibilityActionSignal ActionPageRightSignal() { - if (_accessibilityManagerFocusedViewActivatedEventHandler != null) - { - this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); - } + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageRightSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerFocusedViewActivatedEventHandler -= value; + public AccessibilityActionSignal ActionPageUpSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageUpSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager FocusedViewActivatedSignal - private void OnFocusedViewActivated(IntPtr view) - { - FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs(); + public AccessibilityActionSignal ActionPageDownSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageDownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data - e.View = View.GetViewFromPtr(view); + public AccessibilityActionSignal ActionMoveToFirstSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionMoveToFirstSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerFocusedViewActivatedEventHandler != null) - { - //here we send all data to user event handlers - _accessibilityManagerFocusedViewActivatedEventHandler(this, e); - } - } + public AccessibilityActionSignal ActionMoveToLastSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionMoveToLastSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public AccessibilityActionSignal ActionReadFromTopSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadFromTopSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public event DaliEventHandler FocusOvershot - { - add - { - lock(this) + public AccessibilityActionSignal ActionReadFromNextSignal() { - // Restricted to only one listener - if (_accessibilityManagerFocusOvershotEventHandler == null) - { - _accessibilityManagerFocusOvershotEventHandler += value; + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadFromNextSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot); - this.FocusOvershotSignal().Connect(_accessibilityManagerFocusOvershotEventCallbackDelegate); - } + public AccessibilityActionSignal ActionZoomSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionZoomSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + public AccessibilityActionSignal ActionReadIndicatorInformationSignal() { - if (_accessibilityManagerFocusOvershotEventHandler != null) - { - this.FocusOvershotSignal().Disconnect(_accessibilityManagerFocusOvershotEventCallbackDelegate); - } + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadIndicatorInformationSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - _accessibilityManagerFocusOvershotEventHandler -= value; + public AccessibilityActionSignal ActionReadPauseResumeSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadPauseResumeSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - // Callback for AccessibilityManager FocusOvershotSignal - private void OnFocusOvershot(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction) - { - FocusOvershotEventArgs e = new FocusOvershotEventArgs(); + public AccessibilityActionSignal ActionStartStopSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionStartStopSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - // Populate all members of "e" (FocusOvershotEventArgs) with real data - e.CurrentFocusedView = View.GetViewFromPtr(currentFocusedView); - e.FocusOvershotDirection = direction; + public SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ActionScrollSignal() + { + SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(NDalicPINVOKE.AccessibilityManager_ActionScrollSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - if (_accessibilityManagerFocusOvershotEventHandler != null) - { - //here we send all data to user event handlers - _accessibilityManagerFocusOvershotEventHandler(this, e); - } - } + public enum AccessibilityAttribute + { + ACCESSIBILITY_LABEL = 0, + ACCESSIBILITY_TRAIT, + ACCESSIBILITY_VALUE, + ACCESSIBILITY_HINT, + ACCESSIBILITY_ATTRIBUTE_NUM + } + public enum FocusOvershotDirection + { + OVERSHOT_PREVIOUS = -1, + OVERSHOT_NEXT = 1 + } - public static AccessibilityManager GetAccessibilityManagerFromPtr(global::System.IntPtr cPtr) { - AccessibilityManager ret = new AccessibilityManager(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } - - public AccessibilityManager() : this(NDalicPINVOKE.new_AccessibilityManager(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static AccessibilityManager Get() { - AccessibilityManager ret = new AccessibilityManager(NDalicPINVOKE.AccessibilityManager_Get(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text) { - NDalicPINVOKE.AccessibilityManager_SetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type, text); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type) { - string ret = NDalicPINVOKE.AccessibilityManager_GetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFocusOrder(View view, uint order) { - NDalicPINVOKE.AccessibilityManager_SetFocusOrder(swigCPtr, View.getCPtr(view), order); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetFocusOrder(View view) { - uint ret = NDalicPINVOKE.AccessibilityManager_GetFocusOrder(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GenerateNewFocusOrder() { - uint ret = NDalicPINVOKE.AccessibilityManager_GenerateNewFocusOrder(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetViewByFocusOrder(uint order) { - View ret = new View(NDalicPINVOKE.AccessibilityManager_GetActorByFocusOrder(swigCPtr, order), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool SetCurrentFocusView(View view) { - bool ret = NDalicPINVOKE.AccessibilityManager_SetCurrentFocusActor(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetCurrentFocusView() { - View ret = new View(NDalicPINVOKE.AccessibilityManager_GetCurrentFocusActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetCurrentFocusGroup() { - View ret = new View(NDalicPINVOKE.AccessibilityManager_GetCurrentFocusGroup(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetCurrentFocusOrder() { - uint ret = NDalicPINVOKE.AccessibilityManager_GetCurrentFocusOrder(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool MoveFocusForward() { - bool ret = NDalicPINVOKE.AccessibilityManager_MoveFocusForward(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool MoveFocusBackward() { - bool ret = NDalicPINVOKE.AccessibilityManager_MoveFocusBackward(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void ClearFocus() { - NDalicPINVOKE.AccessibilityManager_ClearFocus(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new void Reset() { - NDalicPINVOKE.AccessibilityManager_Reset(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetFocusGroup(View view, bool isFocusGroup) { - NDalicPINVOKE.AccessibilityManager_SetFocusGroup(swigCPtr, View.getCPtr(view), isFocusGroup); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool IsFocusGroup(View view) { - bool ret = NDalicPINVOKE.AccessibilityManager_IsFocusGroup(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetGroupMode(bool enabled) { - NDalicPINVOKE.AccessibilityManager_SetGroupMode(swigCPtr, enabled); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetGroupMode() { - bool ret = NDalicPINVOKE.AccessibilityManager_GetGroupMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetWrapMode(bool wrapped) { - NDalicPINVOKE.AccessibilityManager_SetWrapMode(swigCPtr, wrapped); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetWrapMode() { - bool ret = NDalicPINVOKE.AccessibilityManager_GetWrapMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFocusIndicatorView(View indicator) { - NDalicPINVOKE.AccessibilityManager_SetFocusIndicatorActor(swigCPtr, View.getCPtr(indicator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetFocusIndicatorView() { - View ret = new View(NDalicPINVOKE.AccessibilityManager_GetFocusIndicatorActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetFocusGroup(View view) { - View ret = new View(NDalicPINVOKE.AccessibilityManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector2 GetReadPosition() { - Vector2 ret = new Vector2(NDalicPINVOKE.AccessibilityManager_GetReadPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public FocusChangedSignal FocusChangedSignal() { - FocusChangedSignal ret = new FocusChangedSignal(NDalicPINVOKE.AccessibilityManager_FocusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityFocusOvershotSignal FocusOvershotSignal() { - AccessibilityFocusOvershotSignal ret = new AccessibilityFocusOvershotSignal(NDalicPINVOKE.AccessibilityManager_FocusOvershotSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ViewSignal FocusedViewActivatedSignal() { - ViewSignal ret = new ViewSignal(NDalicPINVOKE.AccessibilityManager_FocusedActorActivatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal StatusChangedSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_StatusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionNextSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionNextSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPreviousSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPreviousSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionActivateSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionActivateSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionOverSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionOverSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadNextSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadNextSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadPreviousSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadPreviousSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionUpSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionUpSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionDownSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionDownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionClearFocusSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionClearFocusSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionBackSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionBackSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionScrollUpSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionScrollUpSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionScrollDownSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionScrollDownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageLeftSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageLeftSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageRightSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageRightSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageUpSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageUpSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageDownSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionPageDownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionMoveToFirstSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionMoveToFirstSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionMoveToLastSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionMoveToLastSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadFromTopSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadFromTopSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadFromNextSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadFromNextSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionZoomSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionZoomSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadIndicatorInformationSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadIndicatorInformationSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadPauseResumeSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionReadPauseResumeSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionStartStopSignal() { - AccessibilityActionSignal ret = new AccessibilityActionSignal(NDalicPINVOKE.AccessibilityManager_ActionStartStopSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ActionScrollSignal() { - SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(NDalicPINVOKE.AccessibilityManager_ActionScrollSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum AccessibilityAttribute { - ACCESSIBILITY_LABEL = 0, - ACCESSIBILITY_TRAIT, - ACCESSIBILITY_VALUE, - ACCESSIBILITY_HINT, - ACCESSIBILITY_ATTRIBUTE_NUM - } - - public enum FocusOvershotDirection { - OVERSHOT_PREVIOUS = -1, - OVERSHOT_NEXT = 1 - } - -} - } diff --git a/src/Tizen.NUI/src/internal/Alignment.cs b/src/Tizen.NUI/src/internal/Alignment.cs old mode 100644 new mode 100755 index b63920d..60bd41e --- a/src/Tizen.NUI/src/internal/Alignment.cs +++ b/src/Tizen.NUI/src/internal/Alignment.cs @@ -26,213 +26,308 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -internal class Alignment : View { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Alignment : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Alignment_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; - } + internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Alignment_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + // By default, we do not want the position to use the anchor point + PositionUsesAnchorPoint = false; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Alignment obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Alignment(swigCPtr); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Alignment(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public class Padding : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Padding() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Alignment_Padding(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Padding(float l, float r, float t, float b) : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_1(l, r, t, b), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float left { - set { - NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float right { - set { - NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float top { - set { - NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float bottom { - set { - NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - } - - public Alignment (Alignment.Type horizontal, Alignment.Type vertical) : this (NDalicPINVOKE.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Alignment (Alignment.Type horizontal) : this (NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Alignment () : this (NDalicPINVOKE.Alignment_New__SWIG_2(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new static Alignment DownCast(BaseHandle handle) { - Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAlignmentType(Alignment.Type type) { - NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Alignment.Type GetAlignmentType() { - Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScaling(Alignment.Scaling scaling) { - NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Alignment.Scaling GetScaling() { - Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetPadding(Alignment.Padding padding) { - NDalicPINVOKE.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Alignment.Padding GetPadding() { - Alignment.Padding ret = new Alignment.Padding(NDalicPINVOKE.Alignment_GetPadding(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Alignment Assign(Alignment alignment) { - Alignment ret = new Alignment(NDalicPINVOKE.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum Type { - HorizontalLeft = 1, - HorizontalCenter = 2, - HorizontalRight = 4, - VerticalTop = 8, - VerticalCenter = 16, - VerticalBottom = 32 - } - - public enum Scaling { - ScaleNone, - ScaleToFill, - ScaleToFitKeepAspect, - ScaleToFillKeepAspect, - ShrinkToFit, - ShrinkToFitKeepAspect - } -} + public class Padding : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Padding(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Padding obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Padding() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Alignment_Padding(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Padding() : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Padding(float l, float r, float t, float b) : this(NDalicPINVOKE.new_Alignment_Padding__SWIG_1(l, r, t, b), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float left + { + set + { + NDalicPINVOKE.Alignment_Padding_left_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Alignment_Padding_left_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float right + { + set + { + NDalicPINVOKE.Alignment_Padding_right_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Alignment_Padding_right_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float top + { + set + { + NDalicPINVOKE.Alignment_Padding_top_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Alignment_Padding_top_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float bottom + { + set + { + NDalicPINVOKE.Alignment_Padding_bottom_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Alignment_Padding_bottom_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } + + public Alignment(Alignment.Type horizontal, Alignment.Type vertical) : this(NDalicPINVOKE.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Alignment(Alignment.Type horizontal) : this(NDalicPINVOKE.Alignment_New__SWIG_1((int)horizontal), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Alignment() : this(NDalicPINVOKE.Alignment_New__SWIG_2(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Alignment(Alignment alignment) : this(NDalicPINVOKE.new_Alignment__SWIG_1(Alignment.getCPtr(alignment)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new static Alignment DownCast(BaseHandle handle) + { + Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAlignmentType(Alignment.Type type) + { + NDalicPINVOKE.Alignment_SetAlignmentType(swigCPtr, (int)type); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Alignment.Type GetAlignmentType() + { + Alignment.Type ret = (Alignment.Type)NDalicPINVOKE.Alignment_GetAlignmentType(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScaling(Alignment.Scaling scaling) + { + NDalicPINVOKE.Alignment_SetScaling(swigCPtr, (int)scaling); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Alignment.Scaling GetScaling() + { + Alignment.Scaling ret = (Alignment.Scaling)NDalicPINVOKE.Alignment_GetScaling(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetPadding(Alignment.Padding padding) + { + NDalicPINVOKE.Alignment_SetPadding(swigCPtr, Alignment.Padding.getCPtr(padding)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Alignment.Padding GetPadding() + { + Alignment.Padding ret = new Alignment.Padding(NDalicPINVOKE.Alignment_GetPadding(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Alignment Assign(Alignment alignment) + { + Alignment ret = new Alignment(NDalicPINVOKE.Alignment_Assign(swigCPtr, Alignment.getCPtr(alignment)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum Type + { + HorizontalLeft = 1, + HorizontalCenter = 2, + HorizontalRight = 4, + VerticalTop = 8, + VerticalCenter = 16, + VerticalBottom = 32 + } + + public enum Scaling + { + ScaleNone, + ScaleToFill, + ScaleToFitKeepAspect, + ScaleToFillKeepAspect, + ShrinkToFit, + ShrinkToFitKeepAspect + } + + } } diff --git a/src/Tizen.NUI/src/internal/AngleAxis.cs b/src/Tizen.NUI/src/internal/AngleAxis.cs old mode 100644 new mode 100755 index c8c2d04..28eba70 --- a/src/Tizen.NUI/src/internal/AngleAxis.cs +++ b/src/Tizen.NUI/src/internal/AngleAxis.cs @@ -8,78 +8,133 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class AngleAxis : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class AngleAxis : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal AngleAxis(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AngleAxis(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AngleAxis obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AngleAxis obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~AngleAxis() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~AngleAxis() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AngleAxis(swigCPtr); + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public AngleAxis() : this(NDalicPINVOKE.new_AngleAxis__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public AngleAxis(Radian initialAngle, Vector3 initialAxis) : this(NDalicPINVOKE.new_AngleAxis__SWIG_1(Radian.getCPtr(initialAngle), Vector3.getCPtr(initialAxis)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Radian angle { - set { - NDalicPINVOKE.AngleAxis_angle_set(swigCPtr, Radian.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AngleAxis_angle_get(swigCPtr); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Vector3 axis { - set { - NDalicPINVOKE.AngleAxis_axis_set(swigCPtr, Vector3.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AngleAxis_axis_get(swigCPtr); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AngleAxis(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public AngleAxis() : this(NDalicPINVOKE.new_AngleAxis__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public AngleAxis(Radian initialAngle, Vector3 initialAxis) : this(NDalicPINVOKE.new_AngleAxis__SWIG_1(Radian.getCPtr(initialAngle), Vector3.getCPtr(initialAxis)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Radian angle + { + set + { + NDalicPINVOKE.AngleAxis_angle_set(swigCPtr, Radian.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AngleAxis_angle_get(swigCPtr); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Vector3 axis + { + set + { + NDalicPINVOKE.AngleAxis_axis_set(swigCPtr, Vector3.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AngleAxis_axis_get(swigCPtr); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/AngleThresholdPair.cs b/src/Tizen.NUI/src/internal/AngleThresholdPair.cs old mode 100644 new mode 100755 index 38165cf..5ff5178 --- a/src/Tizen.NUI/src/internal/AngleThresholdPair.cs +++ b/src/Tizen.NUI/src/internal/AngleThresholdPair.cs @@ -8,81 +8,137 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class AngleThresholdPair : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class AngleThresholdPair : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal AngleThresholdPair(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AngleThresholdPair(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AngleThresholdPair obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AngleThresholdPair obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~AngleThresholdPair() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~AngleThresholdPair() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AngleThresholdPair(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public AngleThresholdPair() : this(NDalicPINVOKE.new_AngleThresholdPair__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public AngleThresholdPair(Radian t, Radian u) : this(NDalicPINVOKE.new_AngleThresholdPair__SWIG_1(Radian.getCPtr(t), Radian.getCPtr(u)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public AngleThresholdPair(AngleThresholdPair p) : this(NDalicPINVOKE.new_AngleThresholdPair__SWIG_2(AngleThresholdPair.getCPtr(p)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Radian first { - set { - NDalicPINVOKE.AngleThresholdPair_first_set(swigCPtr, Radian.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AngleThresholdPair_first_get(swigCPtr); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Radian second { - set { - NDalicPINVOKE.AngleThresholdPair_second_set(swigCPtr, Radian.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AngleThresholdPair_second_get(swigCPtr); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AngleThresholdPair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public AngleThresholdPair() : this(NDalicPINVOKE.new_AngleThresholdPair__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public AngleThresholdPair(Radian t, Radian u) : this(NDalicPINVOKE.new_AngleThresholdPair__SWIG_1(Radian.getCPtr(t), Radian.getCPtr(u)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public AngleThresholdPair(AngleThresholdPair p) : this(NDalicPINVOKE.new_AngleThresholdPair__SWIG_2(AngleThresholdPair.getCPtr(p)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Radian first + { + set + { + NDalicPINVOKE.AngleThresholdPair_first_set(swigCPtr, Radian.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AngleThresholdPair_first_get(swigCPtr); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Radian second + { + set + { + NDalicPINVOKE.AngleThresholdPair_second_set(swigCPtr, Radian.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AngleThresholdPair_second_get(swigCPtr); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/Animatable.cs b/src/Tizen.NUI/src/internal/Animatable.cs old mode 100644 new mode 100755 index 2eb0077..7e5ee28 --- a/src/Tizen.NUI/src/internal/Animatable.cs +++ b/src/Tizen.NUI/src/internal/Animatable.cs @@ -14,164 +14,196 @@ * */ -namespace Tizen.NUI +namespace Tizen.NUI { -public class Animatable : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class Animatable : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Animatable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Animatable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animatable obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animatable obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~Animatable() { - DisposeQueue.Instance.Add(this); - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Handle(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Handle(swigCPtr); + public Animatable() : this(NDalicPINVOKE.Handle_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Animatable(Animatable handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Animatable.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public Animatable () : this (NDalicPINVOKE.Handle_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Animatable(Animatable handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Animatable.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Supports(Animatable.Capability capability) { - bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetPropertyCount() { - uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetPropertyName(int index) { - string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int GetPropertyIndex(string name) { - int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsPropertyWritable(int index) { - bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsPropertyAnimatable(int index) { - bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsPropertyAConstraintInput(int index) { - bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyType GetPropertyType(int index) { - PropertyType ret = (PropertyType)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetProperty(int index, PropertyValue propertyValue) - { - Tizen.NUI.Object.SetProperty( swigCPtr, index, propertyValue ); - } - - public int RegisterProperty(string name, PropertyValue propertyValue) { - int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, PropertyValue.getCPtr(propertyValue)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int RegisterProperty(string name, PropertyValue propertyValue, PropertyAccessMode accessMode) { - int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, PropertyValue.getCPtr(propertyValue), (int)accessMode); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyValue GetProperty(int index) - { - PropertyValue ret = Tizen.NUI.Object.GetProperty( swigCPtr, index ); - return ret; - } - - internal void GetPropertyIndices(VectorInteger indices) { - NDalicPINVOKE.Handle_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) { - PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) { - PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void RemovePropertyNotification(PropertyNotification propertyNotification) { - NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemovePropertyNotifications() { - NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveConstraints() { - NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveConstraints(uint tag) { - NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum Capability { - DYNAMIC_PROPERTIES = 0x01 - } -} + public bool Supports(Animatable.Capability capability) + { + bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetPropertyCount() + { + uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetPropertyName(int index) + { + string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int GetPropertyIndex(string name) + { + int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsPropertyWritable(int index) + { + bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsPropertyAnimatable(int index) + { + bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsPropertyAConstraintInput(int index) + { + bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyType GetPropertyType(int index) + { + PropertyType ret = (PropertyType)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetProperty(int index, PropertyValue propertyValue) + { + Tizen.NUI.Object.SetProperty(swigCPtr, index, propertyValue); + } + + public int RegisterProperty(string name, PropertyValue propertyValue) + { + int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, PropertyValue.getCPtr(propertyValue)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int RegisterProperty(string name, PropertyValue propertyValue, PropertyAccessMode accessMode) + { + int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, PropertyValue.getCPtr(propertyValue), (int)accessMode); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyValue GetProperty(int index) + { + PropertyValue ret = Tizen.NUI.Object.GetProperty(swigCPtr, index); + return ret; + } + + internal void GetPropertyIndices(VectorInteger indices) + { + NDalicPINVOKE.Handle_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) + { + PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) + { + PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void RemovePropertyNotification(PropertyNotification propertyNotification) + { + NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemovePropertyNotifications() + { + NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveConstraints() + { + NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveConstraints(uint tag) + { + NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Capability + { + DYNAMIC_PROPERTIES = 0x01 + } + + } } diff --git a/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs b/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs old mode 100644 new mode 100755 index 02ece7e..5803bb6 --- a/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs +++ b/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs @@ -8,48 +8,96 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class AnimatablePropertyComponentRegistration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class AnimatablePropertyComponentRegistration : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal AnimatablePropertyComponentRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AnimatablePropertyComponentRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnimatablePropertyComponentRegistration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnimatablePropertyComponentRegistration obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~AnimatablePropertyComponentRegistration() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~AnimatablePropertyComponentRegistration() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AnimatablePropertyComponentRegistration(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public AnimatablePropertyComponentRegistration(TypeRegistration registered, string name, int index, int baseIndex, uint componentIndex) : this(NDalicPINVOKE.new_AnimatablePropertyComponentRegistration(TypeRegistration.getCPtr(registered), name, index, baseIndex, componentIndex), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AnimatablePropertyComponentRegistration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public AnimatablePropertyComponentRegistration(TypeRegistration registered, string name, int index, int baseIndex, uint componentIndex) : this(NDalicPINVOKE.new_AnimatablePropertyComponentRegistration(TypeRegistration.getCPtr(registered), name, index, baseIndex, componentIndex), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs b/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs old mode 100644 new mode 100755 index a255152..8841456 --- a/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs @@ -8,52 +8,101 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class AnimatablePropertyRegistration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class AnimatablePropertyRegistration : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal AnimatablePropertyRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AnimatablePropertyRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnimatablePropertyRegistration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnimatablePropertyRegistration obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~AnimatablePropertyRegistration() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~AnimatablePropertyRegistration() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AnimatablePropertyRegistration(swigCPtr); + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public AnimatablePropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type) : this(NDalicPINVOKE.new_AnimatablePropertyRegistration__SWIG_0(TypeRegistration.getCPtr(registered), name, index, (int)type), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. - public AnimatablePropertyRegistration(TypeRegistration registered, string name, int index, PropertyValue value) : this(NDalicPINVOKE.new_AnimatablePropertyRegistration__SWIG_1(TypeRegistration.getCPtr(registered), name, index, PropertyValue.getCPtr(value)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + } -} + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AnimatablePropertyRegistration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public AnimatablePropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type) : this(NDalicPINVOKE.new_AnimatablePropertyRegistration__SWIG_0(TypeRegistration.getCPtr(registered), name, index, (int)type), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public AnimatablePropertyRegistration(TypeRegistration registered, string name, int index, PropertyValue value) : this(NDalicPINVOKE.new_AnimatablePropertyRegistration__SWIG_1(TypeRegistration.getCPtr(registered), name, index, PropertyValue.getCPtr(value)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/AnimationSignal.cs b/src/Tizen.NUI/src/internal/AnimationSignal.cs old mode 100644 new mode 100755 index 4aab716..ba2a002 --- a/src/Tizen.NUI/src/internal/AnimationSignal.cs +++ b/src/Tizen.NUI/src/internal/AnimationSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class AnimationSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class AnimationSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal AnimationSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AnimationSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnimationSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnimationSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~AnimationSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~AnimationSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AnimationSignal(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AnimationSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public bool Empty() { - bool ret = NDalicPINVOKE.AnimationSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.AnimationSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.AnimationSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.AnimationSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.AnimationSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.AnimationSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.AnimationSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.AnimationSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(Animation arg) { - NDalicPINVOKE.AnimationSignal_Emit(swigCPtr, Animation.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(Animation arg) + { + NDalicPINVOKE.AnimationSignal_Emit(swigCPtr, Animation.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public AnimationSignal() : this(NDalicPINVOKE.new_AnimationSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public AnimationSignal() : this(NDalicPINVOKE.new_AnimationSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/Any.cs b/src/Tizen.NUI/src/internal/Any.cs old mode 100644 new mode 100755 index 1c07d35..cdf065a --- a/src/Tizen.NUI/src/internal/Any.cs +++ b/src/Tizen.NUI/src/internal/Any.cs @@ -8,169 +8,281 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Any : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class Any : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal Any(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Any(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Any obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Any obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~Any() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~Any() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Any(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public Any() : this(NDalicPINVOKE.new_Any__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void AssertAlways(string assertMessage) { - NDalicPINVOKE.Any_AssertAlways(assertMessage); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Any(Any any) : this(NDalicPINVOKE.new_Any__SWIG_2(Any.getCPtr(any)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Any Assign(Any any) { - Any ret = new Any(NDalicPINVOKE.Any_Assign(swigCPtr, Any.getCPtr(any)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_std__type_info GetType() { - SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(NDalicPINVOKE.Any_GetType(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Empty() { - bool ret = NDalicPINVOKE.Any_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public class AnyContainerBase : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal AnyContainerBase(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnyContainerBase obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~AnyContainerBase() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Any_AnyContainerBase(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Any(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - global::System.GC.SuppressFinalize(this); - } - } - - public AnyContainerBase(SWIGTYPE_p_std__type_info type, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc) : this(NDalicPINVOKE.new_Any_AnyContainerBase(SWIGTYPE_p_std__type_info.getCPtr(type), SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(cloneFunc), SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(deleteFunc)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_std__type_info GetType() { - SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(NDalicPINVOKE.Any_AnyContainerBase_GetType(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_std__type_info mType { - get { - SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(NDalicPINVOKE.Any_AnyContainerBase_mType_get(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase mCloneFunc { - set { - NDalicPINVOKE.Any_AnyContainerBase_mCloneFunc_set(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.Any_AnyContainerBase_mCloneFunc_get(swigCPtr); - SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void mDeleteFunc { - set { - NDalicPINVOKE.Any_AnyContainerBase_mDeleteFunc_set(swigCPtr, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.Any_AnyContainerBase_mDeleteFunc_get(swigCPtr); - SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - } - - public Any.AnyContainerBase mContainer { - set { - NDalicPINVOKE.Any_mContainer_set(swigCPtr, Any.AnyContainerBase.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.Any_mContainer_get(swigCPtr); - Any.AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new Any.AnyContainerBase(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + + public Any() : this(NDalicPINVOKE.new_Any__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void AssertAlways(string assertMessage) + { + NDalicPINVOKE.Any_AssertAlways(assertMessage); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Any(Any any) : this(NDalicPINVOKE.new_Any__SWIG_2(Any.getCPtr(any)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Any Assign(Any any) + { + Any ret = new Any(NDalicPINVOKE.Any_Assign(swigCPtr, Any.getCPtr(any)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_std__type_info GetType() + { + SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(NDalicPINVOKE.Any_GetType(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.Any_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public class AnyContainerBase : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal AnyContainerBase(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnyContainerBase obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~AnyContainerBase() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Any_AnyContainerBase(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public AnyContainerBase(SWIGTYPE_p_std__type_info type, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc) : this(NDalicPINVOKE.new_Any_AnyContainerBase(SWIGTYPE_p_std__type_info.getCPtr(type), SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(cloneFunc), SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(deleteFunc)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_std__type_info GetType() + { + SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(NDalicPINVOKE.Any_AnyContainerBase_GetType(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_std__type_info mType + { + get + { + SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(NDalicPINVOKE.Any_AnyContainerBase_mType_get(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase mCloneFunc + { + set + { + NDalicPINVOKE.Any_AnyContainerBase_mCloneFunc_set(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Any_AnyContainerBase_mCloneFunc_get(swigCPtr); + SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void mDeleteFunc + { + set + { + NDalicPINVOKE.Any_AnyContainerBase_mDeleteFunc_set(swigCPtr, SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Any_AnyContainerBase_mDeleteFunc_get(swigCPtr); + SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } + + public Any.AnyContainerBase mContainer + { + set + { + NDalicPINVOKE.Any_mContainer_set(swigCPtr, Any.AnyContainerBase.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Any_mContainer_get(swigCPtr); + Any.AnyContainerBase ret = (cPtr == global::System.IntPtr.Zero) ? null : new Any.AnyContainerBase(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 885de01..422857d 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -321,28 +321,36 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Application(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Application(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } private static void LOG(string str) @@ -1054,7 +1062,7 @@ namespace Tizen.NUI #endif this.InitSignal().Connect(initializeCallback); #if DEBUG_ON - Tizen.Log.Debug("NUI", "InitSignal connection count = " + InitSignal().GetConnectionCount() ); + Tizen.Log.Debug("NUI", "InitSignal connection count = " + InitSignal().GetConnectionCount()); #endif } @@ -1079,16 +1087,16 @@ namespace Tizen.NUI try { - if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3)) - { - if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3) + if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3)) { + if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3) + { //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3); + } } - } - else - { + else + { //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3); } @@ -1099,7 +1107,7 @@ namespace Tizen.NUI Tizen.Log.Fatal("NUI", "Dali native version is very old! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease); Tizen.Log.Fatal("NUI", "exception occured! =" + exc.Message); } - LOG(" Dali native version="+ver1 + "." + ver2 + "." + ver3 + " NUI version=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease); + LOG(" Dali native version=" + ver1 + "." + ver2 + "." + ver3 + " NUI version=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease); } LOG(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! "); diff --git a/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs b/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs old mode 100644 new mode 100755 index b4808fa..ce6e2e3 --- a/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs +++ b/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs @@ -27,35 +27,73 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~ApplicationControlSignal() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ApplicationControlSignal(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ApplicationControlSignal(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } + public bool Empty() { bool ret = NDalicPINVOKE.ApplicationControlSignal_Empty(swigCPtr); diff --git a/src/Tizen.NUI/src/internal/ApplicationExtensions.cs b/src/Tizen.NUI/src/internal/ApplicationExtensions.cs old mode 100644 new mode 100755 index 5eced8d..8dd3e3b --- a/src/Tizen.NUI/src/internal/ApplicationExtensions.cs +++ b/src/Tizen.NUI/src/internal/ApplicationExtensions.cs @@ -8,77 +8,131 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { - -internal class ApplicationExtensions : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ApplicationExtensions(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } +namespace Tizen.NUI +{ + + internal class ApplicationExtensions : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ApplicationExtensions(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ApplicationExtensions obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ApplicationExtensions obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ApplicationExtensions() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ApplicationExtensions() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ApplicationExtensions(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ApplicationExtensions(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public ApplicationExtensions() : this(NDalicPINVOKE.new_ApplicationExtensions__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ApplicationExtensions() : this(NDalicPINVOKE.new_ApplicationExtensions__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public ApplicationExtensions(Application application) : this(NDalicPINVOKE.new_ApplicationExtensions__SWIG_1(Application.getCPtr(application)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ApplicationExtensions(Application application) : this(NDalicPINVOKE.new_ApplicationExtensions__SWIG_1(Application.getCPtr(application)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Init() { - NDalicPINVOKE.ApplicationExtensions_Init(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Init() + { + NDalicPINVOKE.ApplicationExtensions_Init(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Terminate() { - NDalicPINVOKE.ApplicationExtensions_Terminate(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Terminate() + { + NDalicPINVOKE.ApplicationExtensions_Terminate(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Pause() { - NDalicPINVOKE.ApplicationExtensions_Pause(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Pause() + { + NDalicPINVOKE.ApplicationExtensions_Pause(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Resume() { - NDalicPINVOKE.ApplicationExtensions_Resume(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Resume() + { + NDalicPINVOKE.ApplicationExtensions_Resume(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void LanguageChange() { - NDalicPINVOKE.ApplicationExtensions_LanguageChange(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void LanguageChange() + { + NDalicPINVOKE.ApplicationExtensions_LanguageChange(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/ApplicationSignal.cs b/src/Tizen.NUI/src/internal/ApplicationSignal.cs old mode 100644 new mode 100755 index d81c540..0187de8 --- a/src/Tizen.NUI/src/internal/ApplicationSignal.cs +++ b/src/Tizen.NUI/src/internal/ApplicationSignal.cs @@ -27,35 +27,73 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~ApplicationSignal() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ApplicationSignal(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ApplicationSignal(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } + public bool Empty() { bool ret = NDalicPINVOKE.ApplicationSignal_Empty(swigCPtr); diff --git a/src/Tizen.NUI/src/internal/AsyncImageLoader.cs b/src/Tizen.NUI/src/internal/AsyncImageLoader.cs old mode 100644 new mode 100755 index 1f377a4..62728a0 --- a/src/Tizen.NUI/src/internal/AsyncImageLoader.cs +++ b/src/Tizen.NUI/src/internal/AsyncImageLoader.cs @@ -24,98 +24,125 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class AsyncImageLoader : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class AsyncImageLoader : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal AsyncImageLoader(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.AsyncImageLoader_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal AsyncImageLoader(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.AsyncImageLoader_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AsyncImageLoader obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AsyncImageLoader obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_AsyncImageLoader(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public AsyncImageLoader() : this(NDalicPINVOKE.AsyncImageLoader_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_AsyncImageLoader(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public AsyncImageLoader () : this (NDalicPINVOKE.AsyncImageLoader_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public AsyncImageLoader(AsyncImageLoader handle) : this(NDalicPINVOKE.new_AsyncImageLoader__SWIG_1(AsyncImageLoader.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public AsyncImageLoader Assign(AsyncImageLoader handle) { - AsyncImageLoader ret = new AsyncImageLoader(NDalicPINVOKE.AsyncImageLoader_Assign(swigCPtr, AsyncImageLoader.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static AsyncImageLoader DownCast(BaseHandle handle) { - AsyncImageLoader ret = new AsyncImageLoader(NDalicPINVOKE.AsyncImageLoader_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Load(string url) { - uint ret = NDalicPINVOKE.AsyncImageLoader_Load__SWIG_0(swigCPtr, url); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Load(string url, Uint16Pair dimensions) { - uint ret = NDalicPINVOKE.AsyncImageLoader_Load__SWIG_1(swigCPtr, url, Uint16Pair.getCPtr(dimensions)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Load(string url, Uint16Pair dimensions, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) { - uint ret = NDalicPINVOKE.AsyncImageLoader_Load__SWIG_2(swigCPtr, url, Uint16Pair.getCPtr(dimensions), (int)fittingMode, (int)samplingMode, orientationCorrection); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Cancel(uint loadingTaskId) { - bool ret = NDalicPINVOKE.AsyncImageLoader_Cancel(swigCPtr, loadingTaskId); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void CancelAll() { - NDalicPINVOKE.AsyncImageLoader_CancelAll(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t ImageLoadedSignal() { - SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t(NDalicPINVOKE.AsyncImageLoader_ImageLoadedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AsyncImageLoader(SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader impl) : this(NDalicPINVOKE.new_AsyncImageLoader__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.getCPtr(impl)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public AsyncImageLoader(AsyncImageLoader handle) : this(NDalicPINVOKE.new_AsyncImageLoader__SWIG_1(AsyncImageLoader.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public AsyncImageLoader Assign(AsyncImageLoader handle) + { + AsyncImageLoader ret = new AsyncImageLoader(NDalicPINVOKE.AsyncImageLoader_Assign(swigCPtr, AsyncImageLoader.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static AsyncImageLoader DownCast(BaseHandle handle) + { + AsyncImageLoader ret = new AsyncImageLoader(NDalicPINVOKE.AsyncImageLoader_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Load(string url) + { + uint ret = NDalicPINVOKE.AsyncImageLoader_Load__SWIG_0(swigCPtr, url); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Load(string url, Uint16Pair dimensions) + { + uint ret = NDalicPINVOKE.AsyncImageLoader_Load__SWIG_1(swigCPtr, url, Uint16Pair.getCPtr(dimensions)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Load(string url, Uint16Pair dimensions, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) + { + uint ret = NDalicPINVOKE.AsyncImageLoader_Load__SWIG_2(swigCPtr, url, Uint16Pair.getCPtr(dimensions), (int)fittingMode, (int)samplingMode, orientationCorrection); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Cancel(uint loadingTaskId) + { + bool ret = NDalicPINVOKE.AsyncImageLoader_Cancel(swigCPtr, loadingTaskId); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void CancelAll() + { + NDalicPINVOKE.AsyncImageLoader_CancelAll(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t ImageLoadedSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t(NDalicPINVOKE.AsyncImageLoader_ImageLoadedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public AsyncImageLoader(SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader impl) : this(NDalicPINVOKE.new_AsyncImageLoader__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.getCPtr(impl)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/BaseHandle.cs b/src/Tizen.NUI/src/internal/BaseHandle.cs old mode 100644 new mode 100755 index f394ae1..75afbf1 --- a/src/Tizen.NUI/src/internal/BaseHandle.cs +++ b/src/Tizen.NUI/src/internal/BaseHandle.cs @@ -8,246 +8,307 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class BaseHandle : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class BaseHandle : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal BaseHandle(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal BaseHandle(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseHandle obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseHandle obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~BaseHandle() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~BaseHandle() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_BaseHandle(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_BaseHandle(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - // Returns the bool value true to indicate that an operand is true and returns false otherwise. - public static bool operator true(BaseHandle handle) - { - // if the C# object is null, return false - if( BaseHandle.ReferenceEquals( handle, null ) ) - { - return false; - } - // returns true if the handle has a body, false otherwise - return handle.HasBody(); - } - - // Returns the bool false to indicate that an operand is false and returns true otherwise. - public static bool operator false(BaseHandle handle) - { - // if the C# object is null, return true - if( BaseHandle.ReferenceEquals( handle, null ) ) - { - return true; - } - return !handle.HasBody(); - } - - // Explicit conversion from Handle to bool. - public static explicit operator bool(BaseHandle handle) - { - // if the C# object is null, return false - if( BaseHandle.ReferenceEquals( handle, null ) ) - { - return false; - } - // returns true if the handle has a body, false otherwise - return handle.HasBody(); - } - - // Equality operator - public static bool operator == (BaseHandle x, BaseHandle y) - { - // if the C# objects are the same return true - if( BaseHandle.ReferenceEquals( x, y ) ) - { - return true; - } - if ( !BaseHandle.ReferenceEquals( x, null ) && !BaseHandle.ReferenceEquals( y, null ) ) - { - // drop into native code to see if both handles point to the same body - return x.IsEqual( y) ; - } + // Returns the bool value true to indicate that an operand is true and returns false otherwise. + public static bool operator true(BaseHandle handle) + { + // if the C# object is null, return false + if (BaseHandle.ReferenceEquals(handle, null)) + { + return false; + } + // returns true if the handle has a body, false otherwise + return handle.HasBody(); + } - if (BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) - { - if (y.HasBody()) return false; - else return true; - } - if (!BaseHandle.ReferenceEquals(x, null) && BaseHandle.ReferenceEquals(y, null)) - { - if (x.HasBody()) return false; - else return true; - } + // Returns the bool false to indicate that an operand is false and returns true otherwise. + public static bool operator false(BaseHandle handle) + { + // if the C# object is null, return true + if (BaseHandle.ReferenceEquals(handle, null)) + { + return true; + } + return !handle.HasBody(); + } - return false; - } - - // Inequality operator. Returns Null if either operand is Null - public static bool operator !=(BaseHandle x, BaseHandle y) - { - return !(x==y); - } - - // Logical AND operator for && - // It's possible when doing a && this function (opBitwiseAnd) is never called due - // to short circuiting. E.g. - // If you perform x && y What actually is called is - // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) ) - // - public static BaseHandle operator &(BaseHandle x, BaseHandle y) - { - if( x == y ) - { - return x; - } - return null; - } - - // Logical OR operator for || - // It's possible when doing a || this function (opBitwiseOr) is never called due - // to short circuiting. E.g. - // If you perform x || y What actually is called is - // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) ) - public static BaseHandle operator |(BaseHandle x, BaseHandle y) - { - if ( !BaseHandle.ReferenceEquals( x, null ) || !BaseHandle.ReferenceEquals( y, null ) ) - { - if( x.HasBody() ) - { - return x; - } - if( y.HasBody() ) - { - return y; - } - return null; - } - return null; - } - - // Logical ! operator - public static bool operator !(BaseHandle x) - { - // if the C# object is null, return true - if( BaseHandle.ReferenceEquals( x, null ) ) - { - return true; - } - if( x.HasBody() ) - { - return false; - } - return true; - } - - - internal BaseHandle(BaseObject handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_0(BaseObject.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BaseHandle Assign(BaseHandle rhs) { - BaseHandle ret = new BaseHandle(NDalicPINVOKE.BaseHandle_Assign(swigCPtr, BaseHandle.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool DoAction(string actionName, PropertyMap attributes) { - bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetTypeName() { - string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool GetTypeInfo(TypeInfo info) { - bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal BaseObject GetBaseObject() { - BaseObject ret = new BaseObject(NDalicPINVOKE.BaseHandle_GetBaseObject__SWIG_0(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reset() { - NDalicPINVOKE.BaseHandle_Reset(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool EqualTo(BaseHandle rhs) { - bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool NotEqualTo(BaseHandle rhs) { - bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal RefObject GetObjectPtr() { - global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr); - RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool HasBody() { - bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsEqual(BaseHandle rhs) { - bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + // Explicit conversion from Handle to bool. + public static explicit operator bool(BaseHandle handle) + { + // if the C# object is null, return false + if (BaseHandle.ReferenceEquals(handle, null)) + { + return false; + } + // returns true if the handle has a body, false otherwise + return handle.HasBody(); + } -} + // Equality operator + public static bool operator ==(BaseHandle x, BaseHandle y) + { + // if the C# objects are the same return true + if (BaseHandle.ReferenceEquals(x, y)) + { + return true; + } + if (!BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) + { + // drop into native code to see if both handles point to the same body + return x.IsEqual(y); + } + + if (BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) + { + if (y.HasBody()) return false; + else return true; + } + if (!BaseHandle.ReferenceEquals(x, null) && BaseHandle.ReferenceEquals(y, null)) + { + if (x.HasBody()) return false; + else return true; + } + + return false; + } + + // Inequality operator. Returns Null if either operand is Null + public static bool operator !=(BaseHandle x, BaseHandle y) + { + return !(x == y); + } + + // Logical AND operator for && + // It's possible when doing a && this function (opBitwiseAnd) is never called due + // to short circuiting. E.g. + // If you perform x && y What actually is called is + // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) ) + // + public static BaseHandle operator &(BaseHandle x, BaseHandle y) + { + if (x == y) + { + return x; + } + return null; + } + + // Logical OR operator for || + // It's possible when doing a || this function (opBitwiseOr) is never called due + // to short circuiting. E.g. + // If you perform x || y What actually is called is + // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) ) + public static BaseHandle operator |(BaseHandle x, BaseHandle y) + { + if (!BaseHandle.ReferenceEquals(x, null) || !BaseHandle.ReferenceEquals(y, null)) + { + if (x.HasBody()) + { + return x; + } + if (y.HasBody()) + { + return y; + } + return null; + } + return null; + } + + // Logical ! operator + public static bool operator !(BaseHandle x) + { + // if the C# object is null, return true + if (BaseHandle.ReferenceEquals(x, null)) + { + return true; + } + if (x.HasBody()) + { + return false; + } + return true; + } + + + internal BaseHandle(BaseObject handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_0(BaseObject.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BaseHandle Assign(BaseHandle rhs) + { + BaseHandle ret = new BaseHandle(NDalicPINVOKE.BaseHandle_Assign(swigCPtr, BaseHandle.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool DoAction(string actionName, PropertyMap attributes) + { + bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetTypeName() + { + string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool GetTypeInfo(TypeInfo info) + { + bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal BaseObject GetBaseObject() + { + BaseObject ret = new BaseObject(NDalicPINVOKE.BaseHandle_GetBaseObject__SWIG_0(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reset() + { + NDalicPINVOKE.BaseHandle_Reset(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool EqualTo(BaseHandle rhs) + { + bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool NotEqualTo(BaseHandle rhs) + { + bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal RefObject GetObjectPtr() + { + global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr); + RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool HasBody() + { + bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsEqual(BaseHandle rhs) + { + bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/BaseObject.cs b/src/Tizen.NUI/src/internal/BaseObject.cs old mode 100644 new mode 100755 index c2beec3..d617f5e --- a/src/Tizen.NUI/src/internal/BaseObject.cs +++ b/src/Tizen.NUI/src/internal/BaseObject.cs @@ -8,58 +8,84 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class BaseObject : RefObject { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class BaseObject : RefObject + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal BaseObject(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.BaseObject_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal BaseObject(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.BaseObject_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseObject obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //you can override it to clean-up your own resources. + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseObject obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + } - public override void Dispose() { + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public bool DoAction(string actionName, PropertyMap attributes) { - bool ret = NDalicPINVOKE.BaseObject_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetTypeName() { - string ret = NDalicPINVOKE.BaseObject_GetTypeName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool GetTypeInfo(TypeInfo info) { - bool ret = NDalicPINVOKE.BaseObject_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal bool DoConnectSignal(ConnectionTrackerInterface connectionTracker, string signalName, SWIGTYPE_p_FunctorDelegate functorDelegate) { - bool ret = NDalicPINVOKE.BaseObject_DoConnectSignal(swigCPtr, ConnectionTrackerInterface.getCPtr(connectionTracker), signalName, SWIGTYPE_p_FunctorDelegate.getCPtr(functorDelegate)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public bool DoAction(string actionName, PropertyMap attributes) + { + bool ret = NDalicPINVOKE.BaseObject_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetTypeName() + { + string ret = NDalicPINVOKE.BaseObject_GetTypeName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool GetTypeInfo(TypeInfo info) + { + bool ret = NDalicPINVOKE.BaseObject_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal bool DoConnectSignal(ConnectionTrackerInterface connectionTracker, string signalName, SWIGTYPE_p_FunctorDelegate functorDelegate) + { + bool ret = NDalicPINVOKE.BaseObject_DoConnectSignal(swigCPtr, ConnectionTrackerInterface.getCPtr(connectionTracker), signalName, SWIGTYPE_p_FunctorDelegate.getCPtr(functorDelegate)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/BlendEquationType.cs b/src/Tizen.NUI/src/internal/BlendEquationType.cs old mode 100644 new mode 100755 index 0aeb0e4..7d72d8c --- a/src/Tizen.NUI/src/internal/BlendEquationType.cs +++ b/src/Tizen.NUI/src/internal/BlendEquationType.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum BlendEquationType { - ADD = 0x8006, - SUBTRACT = 0x800A, - REVERSE_SUBTRACT = 0x800B -} + internal enum BlendEquationType + { + ADD = 0x8006, + SUBTRACT = 0x800A, + REVERSE_SUBTRACT = 0x800B + } } diff --git a/src/Tizen.NUI/src/internal/BlendFactorType.cs b/src/Tizen.NUI/src/internal/BlendFactorType.cs old mode 100644 new mode 100755 index c0dc86b..2346ee6 --- a/src/Tizen.NUI/src/internal/BlendFactorType.cs +++ b/src/Tizen.NUI/src/internal/BlendFactorType.cs @@ -8,24 +8,26 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum BlendFactorType { - ZERO = 0, - ONE = 1, - SRC_COLOR = 0x0300, - ONE_MINUS_SRC_COLOR = 0x0301, - SRC_ALPHA = 0x0302, - ONE_MINUS_SRC_ALPHA = 0x0303, - DST_ALPHA = 0x0304, - ONE_MINUS_DST_ALPHA = 0x0305, - DST_COLOR = 0x0306, - ONE_MINUS_DST_COLOR = 0x0307, - SRC_ALPHA_SATURATE = 0x0308, - CONSTANT_COLOR = 0x8001, - ONE_MINUS_CONSTANT_COLOR = 0x8002, - CONSTANT_ALPHA = 0x8003, - ONE_MINUS_CONSTANT_ALPHA = 0x8004 -} + internal enum BlendFactorType + { + ZERO = 0, + ONE = 1, + SRC_COLOR = 0x0300, + ONE_MINUS_SRC_COLOR = 0x0301, + SRC_ALPHA = 0x0302, + ONE_MINUS_SRC_ALPHA = 0x0303, + DST_ALPHA = 0x0304, + ONE_MINUS_DST_ALPHA = 0x0305, + DST_COLOR = 0x0306, + ONE_MINUS_DST_COLOR = 0x0307, + SRC_ALPHA_SATURATE = 0x0308, + CONSTANT_COLOR = 0x8001, + ONE_MINUS_CONSTANT_COLOR = 0x8002, + CONSTANT_ALPHA = 0x8003, + ONE_MINUS_CONSTANT_ALPHA = 0x8004 + } } diff --git a/src/Tizen.NUI/src/internal/BlendModeType.cs b/src/Tizen.NUI/src/internal/BlendModeType.cs old mode 100644 new mode 100755 index 6ff903f..75d85fb --- a/src/Tizen.NUI/src/internal/BlendModeType.cs +++ b/src/Tizen.NUI/src/internal/BlendModeType.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum BlendModeType { - OFF, - AUTO, - ON -} + internal enum BlendModeType + { + OFF, + AUTO, + ON + } } diff --git a/src/Tizen.NUI/src/internal/BufferImage.cs b/src/Tizen.NUI/src/internal/BufferImage.cs old mode 100644 new mode 100755 index 0971310..eb1f68c --- a/src/Tizen.NUI/src/internal/BufferImage.cs +++ b/src/Tizen.NUI/src/internal/BufferImage.cs @@ -24,123 +24,157 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class BufferImage : Image { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class BufferImage : Image + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal BufferImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.BufferImage_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal BufferImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.BufferImage_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BufferImage obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BufferImage obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_BufferImage(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_BufferImage(swigCPtr); + public BufferImage(uint width, uint height, PixelFormat pixelformat) : this(NDalicPINVOKE.BufferImage_New__SWIG_0(width, height, (int)pixelformat), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public BufferImage (uint width, uint height, PixelFormat pixelformat) : this (NDalicPINVOKE.BufferImage_New__SWIG_0(width, height, (int)pixelformat), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public BufferImage (uint width, uint height) : this (NDalicPINVOKE.BufferImage_New__SWIG_1(width, height), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public BufferImage (byte[] pixelBuffer, uint width, uint height, PixelFormat pixelFormat, uint stride) : this (NDalicPINVOKE.BufferImage_New__SWIG_2(pixelBuffer, width, height, (int)pixelFormat, stride), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public BufferImage (byte[] pixelBuffer, uint width, uint height, PixelFormat pixelFormat) : this (NDalicPINVOKE.BufferImage_New__SWIG_3(pixelBuffer, width, height, (int)pixelFormat), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public BufferImage (byte[] pixelBuffer, uint width, uint height) : this (NDalicPINVOKE.BufferImage_New__SWIG_4(pixelBuffer, width, height), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public new static BufferImage DownCast(BaseHandle handle) { - BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BufferImage(BufferImage handle) : this(NDalicPINVOKE.new_BufferImage__SWIG_1(BufferImage.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BufferImage Assign(BufferImage rhs) { - BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_Assign(swigCPtr, BufferImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static BufferImage WHITE() { - BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_WHITE(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_char GetBuffer() { - global::System.IntPtr cPtr = NDalicPINVOKE.BufferImage_GetBuffer(swigCPtr); - SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetBufferSize() { - uint ret = NDalicPINVOKE.BufferImage_GetBufferSize(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetBufferStride() { - uint ret = NDalicPINVOKE.BufferImage_GetBufferStride(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PixelFormat GetPixelFormat() { - PixelFormat ret = (PixelFormat)NDalicPINVOKE.BufferImage_GetPixelFormat(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Update() { - NDalicPINVOKE.BufferImage_Update__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Update(SWIGTYPE_p_Dali__RectT_unsigned_int_t updateArea) { - NDalicPINVOKE.BufferImage_Update__SWIG_1(swigCPtr, SWIGTYPE_p_Dali__RectT_unsigned_int_t.getCPtr(updateArea)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool IsDataExternal() { - bool ret = NDalicPINVOKE.BufferImage_IsDataExternal(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public BufferImage(uint width, uint height) : this(NDalicPINVOKE.BufferImage_New__SWIG_1(width, height), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -} + } + public BufferImage(byte[] pixelBuffer, uint width, uint height, PixelFormat pixelFormat, uint stride) : this(NDalicPINVOKE.BufferImage_New__SWIG_2(pixelBuffer, width, height, (int)pixelFormat, stride), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public BufferImage(byte[] pixelBuffer, uint width, uint height, PixelFormat pixelFormat) : this(NDalicPINVOKE.BufferImage_New__SWIG_3(pixelBuffer, width, height, (int)pixelFormat), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public BufferImage(byte[] pixelBuffer, uint width, uint height) : this(NDalicPINVOKE.BufferImage_New__SWIG_4(pixelBuffer, width, height), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public new static BufferImage DownCast(BaseHandle handle) + { + BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public BufferImage(BufferImage handle) : this(NDalicPINVOKE.new_BufferImage__SWIG_1(BufferImage.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BufferImage Assign(BufferImage rhs) + { + BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_Assign(swigCPtr, BufferImage.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static BufferImage WHITE() + { + BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_WHITE(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_char GetBuffer() + { + global::System.IntPtr cPtr = NDalicPINVOKE.BufferImage_GetBuffer(swigCPtr); + SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetBufferSize() + { + uint ret = NDalicPINVOKE.BufferImage_GetBufferSize(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetBufferStride() + { + uint ret = NDalicPINVOKE.BufferImage_GetBufferStride(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PixelFormat GetPixelFormat() + { + PixelFormat ret = (PixelFormat)NDalicPINVOKE.BufferImage_GetPixelFormat(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Update() + { + NDalicPINVOKE.BufferImage_Update__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Update(SWIGTYPE_p_Dali__RectT_unsigned_int_t updateArea) + { + NDalicPINVOKE.BufferImage_Update__SWIG_1(swigCPtr, SWIGTYPE_p_Dali__RectT_unsigned_int_t.getCPtr(updateArea)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool IsDataExternal() + { + bool ret = NDalicPINVOKE.BufferImage_IsDataExternal(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/Builder.cs b/src/Tizen.NUI/src/internal/Builder.cs old mode 100644 new mode 100755 index 37ae1ce..6e5a521 --- a/src/Tizen.NUI/src/internal/Builder.cs +++ b/src/Tizen.NUI/src/internal/Builder.cs @@ -24,260 +24,303 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using System; using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; -public class Builder : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class Builder : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Builder(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Builder_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Builder(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Builder_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Builder obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Builder(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Builder obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Builder(swigCPtr); + public class QuitEventArgs : EventArgs + { } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void QuitEventCallbackDelegate(); + private DaliEventHandler _builderQuitEventHandler; + private QuitEventCallbackDelegate _builderQuitEventCallbackDelegate; + public event DaliEventHandler Quit + { + add + { + lock (this) + { + // Restricted to only one listener + if (_builderQuitEventHandler == null) + { + _builderQuitEventHandler += value; + + _builderQuitEventCallbackDelegate = new QuitEventCallbackDelegate(OnQuit); + this.QuitSignal().Connect(_builderQuitEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_builderQuitEventHandler != null) + { + this.QuitSignal().Disconnect(_builderQuitEventCallbackDelegate); + } + + _builderQuitEventHandler -= value; + } + } + } - public class QuitEventArgs : EventArgs - { - } + // Callback for Builder QuitSignal + private void OnQuit() + { + QuitEventArgs e = new QuitEventArgs(); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void QuitEventCallbackDelegate(); - private DaliEventHandler _builderQuitEventHandler; - private QuitEventCallbackDelegate _builderQuitEventCallbackDelegate; + if (_builderQuitEventHandler != null) + { + //here we send all data to user event handlers + _builderQuitEventHandler(this, e); + } + } - public event DaliEventHandler Quit - { - add - { - lock(this) + /// + public void LoadFromFile(string fileName) { - // Restricted to only one listener - if (_builderQuitEventHandler == null) - { - _builderQuitEventHandler += value; + try + { + string json = System.IO.File.ReadAllText(fileName); + if (json.Length > 0) + { + LoadFromString(json); + } + else + { + throw new global::System.InvalidOperationException("Failed to load file " + fileName); + + } + } + catch (System.Exception e) + { + throw new global::System.InvalidOperationException("Failed to parse " + fileName); + } + } + + + + public Builder() : this(NDalicPINVOKE.Builder_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - _builderQuitEventCallbackDelegate = new QuitEventCallbackDelegate(OnQuit); - this.QuitSignal().Connect(_builderQuitEventCallbackDelegate); - } } - } + public void LoadFromString(string data, Builder.UIFormat format) + { + NDalicPINVOKE.Builder_LoadFromString__SWIG_0(swigCPtr, data, (int)format); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - remove - { - lock(this) + public void LoadFromString(string data) { - if (_builderQuitEventHandler != null) - { - this.QuitSignal().Disconnect(_builderQuitEventCallbackDelegate); - } + NDalicPINVOKE.Builder_LoadFromString__SWIG_1(swigCPtr, data); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _builderQuitEventHandler -= value; + public void AddConstants(PropertyMap map) + { + NDalicPINVOKE.Builder_AddConstants(swigCPtr, PropertyMap.getCPtr(map)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } - // Callback for Builder QuitSignal - private void OnQuit() - { - QuitEventArgs e = new QuitEventArgs(); + public void AddConstant(string key, PropertyValue value) + { + NDalicPINVOKE.Builder_AddConstant(swigCPtr, key, PropertyValue.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - if (_builderQuitEventHandler != null) - { - //here we send all data to user event handlers - _builderQuitEventHandler(this, e); - } - } + public PropertyMap GetConstants() + { + PropertyMap ret = new PropertyMap(NDalicPINVOKE.Builder_GetConstants(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - /// - public void LoadFromFile( string fileName ) - { - try - { - string json = System.IO.File.ReadAllText( fileName ); - if( json.Length > 0 ) - { - LoadFromString( json ); - } - else - { - throw new global::System.InvalidOperationException("Failed to load file " +fileName); - - } - } - catch ( System.Exception e) - { - throw new global::System.InvalidOperationException("Failed to parse " +fileName); - } - } - - - - public Builder () : this (NDalicPINVOKE.Builder_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public void LoadFromString(string data, Builder.UIFormat format) { - NDalicPINVOKE.Builder_LoadFromString__SWIG_0(swigCPtr, data, (int)format); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void LoadFromString(string data) { - NDalicPINVOKE.Builder_LoadFromString__SWIG_1(swigCPtr, data); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddConstants(PropertyMap map) { - NDalicPINVOKE.Builder_AddConstants(swigCPtr, PropertyMap.getCPtr(map)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddConstant(string key, PropertyValue value) { - NDalicPINVOKE.Builder_AddConstant(swigCPtr, key, PropertyValue.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PropertyMap GetConstants() { - PropertyMap ret = new PropertyMap(NDalicPINVOKE.Builder_GetConstants(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyValue GetConstant(string key) { - PropertyValue ret = new PropertyValue(NDalicPINVOKE.Builder_GetConstant(swigCPtr, key), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Animation CreateAnimation(string animationName) { - Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_0(swigCPtr, animationName), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Animation CreateAnimation(string animationName, PropertyMap map) { - Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_1(swigCPtr, animationName, PropertyMap.getCPtr(map)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Animation CreateAnimation(string animationName, View sourceActor) { - Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_2(swigCPtr, animationName, View.getCPtr(sourceActor)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Animation CreateAnimation(string animationName, PropertyMap map, View sourceActor) { - Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_3(swigCPtr, animationName, PropertyMap.getCPtr(map), View.getCPtr(sourceActor)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BaseHandle Create(string templateName) { - BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_0(swigCPtr, templateName), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BaseHandle Create(string templateName, PropertyMap map) { - BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_1(swigCPtr, templateName, PropertyMap.getCPtr(map)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BaseHandle CreateFromJson(string json) { - BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_CreateFromJson(swigCPtr, json), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool ApplyStyle(string styleName, Animatable handle) { - bool ret = NDalicPINVOKE.Builder_ApplyStyle(swigCPtr, styleName, Animatable.getCPtr(handle)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool ApplyFromJson(Animatable handle, string json) { - bool ret = NDalicPINVOKE.Builder_ApplyFromJson(swigCPtr, Animatable.getCPtr(handle), json); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void AddViews(View toActor) { - NDalicPINVOKE.Builder_AddActors__SWIG_0(swigCPtr, View.getCPtr(toActor)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddViews(string sectionName, View toActor) { - NDalicPINVOKE.Builder_AddActors__SWIG_1(swigCPtr, sectionName, View.getCPtr(toActor)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void CreateRenderTask(string name) { - NDalicPINVOKE.Builder_CreateRenderTask(swigCPtr, name); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal FrameBufferImage GetFrameBufferImage(string name) { - FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.Builder_GetFrameBufferImage(swigCPtr, name), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Path GetPath(string name) { - Path ret = new Path(NDalicPINVOKE.Builder_GetPath(swigCPtr, name), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal PathConstrainer GetPathConstrainer(string pathConstrainerName) { - PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.Builder_GetPathConstrainer(swigCPtr, pathConstrainerName), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal LinearConstrainer GetLinearConstrainer(string linearConstrainerName) { - LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.Builder_GetLinearConstrainer(swigCPtr, linearConstrainerName), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal QuitSignal() { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.Builder_QuitSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum UIFormat { - JSON - } + public PropertyValue GetConstant(string key) + { + PropertyValue ret = new PropertyValue(NDalicPINVOKE.Builder_GetConstant(swigCPtr, key), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + public Animation CreateAnimation(string animationName) + { + Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_0(swigCPtr, animationName), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Animation CreateAnimation(string animationName, PropertyMap map) + { + Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_1(swigCPtr, animationName, PropertyMap.getCPtr(map)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Animation CreateAnimation(string animationName, View sourceActor) + { + Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_2(swigCPtr, animationName, View.getCPtr(sourceActor)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Animation CreateAnimation(string animationName, PropertyMap map, View sourceActor) + { + Animation ret = new Animation(NDalicPINVOKE.Builder_CreateAnimation__SWIG_3(swigCPtr, animationName, PropertyMap.getCPtr(map), View.getCPtr(sourceActor)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public BaseHandle Create(string templateName) + { + BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_0(swigCPtr, templateName), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public BaseHandle Create(string templateName, PropertyMap map) + { + BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_1(swigCPtr, templateName, PropertyMap.getCPtr(map)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public BaseHandle CreateFromJson(string json) + { + BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_CreateFromJson(swigCPtr, json), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool ApplyStyle(string styleName, Animatable handle) + { + bool ret = NDalicPINVOKE.Builder_ApplyStyle(swigCPtr, styleName, Animatable.getCPtr(handle)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool ApplyFromJson(Animatable handle, string json) + { + bool ret = NDalicPINVOKE.Builder_ApplyFromJson(swigCPtr, Animatable.getCPtr(handle), json); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void AddViews(View toActor) + { + NDalicPINVOKE.Builder_AddActors__SWIG_0(swigCPtr, View.getCPtr(toActor)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddViews(string sectionName, View toActor) + { + NDalicPINVOKE.Builder_AddActors__SWIG_1(swigCPtr, sectionName, View.getCPtr(toActor)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void CreateRenderTask(string name) + { + NDalicPINVOKE.Builder_CreateRenderTask(swigCPtr, name); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal FrameBufferImage GetFrameBufferImage(string name) + { + FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.Builder_GetFrameBufferImage(swigCPtr, name), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Path GetPath(string name) + { + Path ret = new Path(NDalicPINVOKE.Builder_GetPath(swigCPtr, name), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal PathConstrainer GetPathConstrainer(string pathConstrainerName) + { + PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.Builder_GetPathConstrainer(swigCPtr, pathConstrainerName), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal LinearConstrainer GetLinearConstrainer(string linearConstrainerName) + { + LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.Builder_GetLinearConstrainer(swigCPtr, linearConstrainerName), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal QuitSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.Builder_QuitSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum UIFormat + { + JSON + } + + } } diff --git a/src/Tizen.NUI/src/internal/Button.cs b/src/Tizen.NUI/src/internal/Button.cs old mode 100644 new mode 100755 index de51409..51a416c --- a/src/Tizen.NUI/src/internal/Button.cs +++ b/src/Tizen.NUI/src/internal/Button.cs @@ -55,28 +55,39 @@ namespace Tizen.NUI.UIComponents /// /// To make Button instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Button(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Button(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } @@ -508,31 +519,69 @@ namespace Tizen.NUI.UIComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Button_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Button_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } internal static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get(); diff --git a/src/Tizen.NUI/src/internal/ButtonSignal.cs b/src/Tizen.NUI/src/internal/ButtonSignal.cs old mode 100644 new mode 100755 index ba23fd6..c500b2a --- a/src/Tizen.NUI/src/internal/ButtonSignal.cs +++ b/src/Tizen.NUI/src/internal/ButtonSignal.cs @@ -8,82 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ButtonSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ButtonSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ButtonSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ButtonSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ButtonSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ButtonSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ButtonSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ButtonSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ButtonSignal(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ButtonSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public bool Empty() { - bool ret = NDalicPINVOKE.ButtonSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ButtonSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ButtonSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ButtonSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ButtonSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ButtonSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ButtonSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ButtonSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public bool Emit(Tizen.NUI.UIComponents.Button arg) { - bool ret = NDalicPINVOKE.ButtonSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.Button.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Emit(Tizen.NUI.UIComponents.Button arg) + { + bool ret = NDalicPINVOKE.ButtonSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.Button.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public ButtonSignal() : this(NDalicPINVOKE.new_ButtonSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ButtonSignal() : this(NDalicPINVOKE.new_ButtonSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/Camera.cs b/src/Tizen.NUI/src/internal/Camera.cs old mode 100644 new mode 100755 index 4de8ad3..26dbf69 --- a/src/Tizen.NUI/src/internal/Camera.cs +++ b/src/Tizen.NUI/src/internal/Camera.cs @@ -24,398 +24,487 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class Camera : Animatable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class Camera : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Camera(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CameraActor_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Camera obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal Camera(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CameraActor_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_CameraActor(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Camera obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~Camera() { - DisposeQueue.Instance.Add(this); - } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_CameraActor_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int TYPE = NDalicPINVOKE.CameraActor_Property_TYPE_get(); + public static readonly int PROJECTION_MODE = NDalicPINVOKE.CameraActor_Property_PROJECTION_MODE_get(); + public static readonly int FIELD_OF_VIEW = NDalicPINVOKE.CameraActor_Property_FIELD_OF_VIEW_get(); + public static readonly int ASPECT_RATIO = NDalicPINVOKE.CameraActor_Property_ASPECT_RATIO_get(); + public static readonly int NEAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_NEAR_PLANE_DISTANCE_get(); + public static readonly int FAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_FAR_PLANE_DISTANCE_get(); + public static readonly int LEFT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_LEFT_PLANE_DISTANCE_get(); + public static readonly int RIGHT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_RIGHT_PLANE_DISTANCE_get(); + public static readonly int TOP_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_TOP_PLANE_DISTANCE_get(); + public static readonly int BOTTOM_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_BOTTOM_PLANE_DISTANCE_get(); + public static readonly int TARGET_POSITION = NDalicPINVOKE.CameraActor_Property_TARGET_POSITION_get(); + public static readonly int PROJECTION_MATRIX = NDalicPINVOKE.CameraActor_Property_PROJECTION_MATRIX_get(); + public static readonly int VIEW_MATRIX = NDalicPINVOKE.CameraActor_Property_VIEW_MATRIX_get(); + public static readonly int INVERT_Y_AXIS = NDalicPINVOKE.CameraActor_Property_INVERT_Y_AXIS_get(); - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_CameraActor(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public Camera() : this(NDalicPINVOKE.CameraActor_New__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_CameraActor_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int TYPE = NDalicPINVOKE.CameraActor_Property_TYPE_get(); - public static readonly int PROJECTION_MODE = NDalicPINVOKE.CameraActor_Property_PROJECTION_MODE_get(); - public static readonly int FIELD_OF_VIEW = NDalicPINVOKE.CameraActor_Property_FIELD_OF_VIEW_get(); - public static readonly int ASPECT_RATIO = NDalicPINVOKE.CameraActor_Property_ASPECT_RATIO_get(); - public static readonly int NEAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_NEAR_PLANE_DISTANCE_get(); - public static readonly int FAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_FAR_PLANE_DISTANCE_get(); - public static readonly int LEFT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_LEFT_PLANE_DISTANCE_get(); - public static readonly int RIGHT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_RIGHT_PLANE_DISTANCE_get(); - public static readonly int TOP_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_TOP_PLANE_DISTANCE_get(); - public static readonly int BOTTOM_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_BOTTOM_PLANE_DISTANCE_get(); - public static readonly int TARGET_POSITION = NDalicPINVOKE.CameraActor_Property_TARGET_POSITION_get(); - public static readonly int PROJECTION_MATRIX = NDalicPINVOKE.CameraActor_Property_PROJECTION_MATRIX_get(); - public static readonly int VIEW_MATRIX = NDalicPINVOKE.CameraActor_Property_VIEW_MATRIX_get(); - public static readonly int INVERT_Y_AXIS = NDalicPINVOKE.CameraActor_Property_INVERT_Y_AXIS_get(); - - } - - public Camera () : this (NDalicPINVOKE.CameraActor_New__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Camera (Vector2 size) : this (NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(size)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public new static Camera DownCast(BaseHandle handle) { - Camera ret = new Camera(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Camera(Camera copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(Camera.getCPtr(copy)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Camera Assign(Camera rhs) { - Camera ret = new Camera(NDalicPINVOKE.CameraActor_Assign(swigCPtr, Camera.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetType(CameraType type) { - NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public CameraType GetType() { - CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetProjectionMode(ProjectionMode mode) { - NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ProjectionMode GetProjectionMode() { - ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFieldOfView(float fieldOfView) { - NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetFieldOfView() { - float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAspectRatio(float aspectRatio) { - NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetAspectRatio() { - float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetNearClippingPlane(float nearClippingPlane) { - NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetNearClippingPlane() { - float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFarClippingPlane(float farClippingPlane) { - NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetFarClippingPlane() { - float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetTargetPosition(Vector3 targetPosition) { - NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector3 GetTargetPosition() { - Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetInvertYAxis(bool invertYAxis) { - NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetInvertYAxis() { - bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetPerspectiveProjection(Vector2 size) { - NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetOrthographicProjection(Vector2 size) { - NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far) { - NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string Type - { - get - { - string temp; - GetProperty( Camera.Property.TYPE).Get( out temp ); - return temp; - } - set - { - SetProperty( Camera.Property.TYPE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public string ProjectionMode - { - get - { - string temp; - GetProperty( Camera.Property.PROJECTION_MODE).Get( out temp ); - return temp; - } - set - { - SetProperty( Camera.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float FieldOfView - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.FIELD_OF_VIEW).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.FIELD_OF_VIEW, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float AspectRatio - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.ASPECT_RATIO).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.ASPECT_RATIO, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float NearPlaneDistance - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.NEAR_PLANE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.NEAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float FarPlaneDistance - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.FAR_PLANE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.FAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float LeftPlaneDistance - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.LEFT_PLANE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.LEFT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float RightPlaneDistance - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.RIGHT_PLANE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.RIGHT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float TopPlaneDistance - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.TOP_PLANE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.TOP_PLANE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float BottomPlaneDistance - { - get - { - float temp = 0.0f; - GetProperty( Camera.Property.BOTTOM_PLANE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.BOTTOM_PLANE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector3 TargetPosition - { - get - { - Vector3 temp = new Vector3(0.0f,0.0f,0.0f); - GetProperty( Camera.Property.TARGET_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( Camera.Property.TARGET_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } - internal Matrix ProjectionMatrix - { - get - { - Matrix temp = new Matrix(); - GetProperty( Camera.Property.PROJECTION_MATRIX).Get( temp ); - return temp; - } -} internal Matrix ViewMatrix - { - get - { - Matrix temp = new Matrix(); - GetProperty( Camera.Property.VIEW_MATRIX).Get( temp ); - return temp; - } -} public bool InvertYAxis - { - get - { - bool temp = false; - GetProperty( Camera.Property.INVERT_Y_AXIS).Get( ref temp ); - return temp; - } - set - { - SetProperty( Camera.Property.INVERT_Y_AXIS, new Tizen.NUI.PropertyValue( value ) ); - } - } + } + public Camera(Vector2 size) : this(NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(size)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -} + } + public new static Camera DownCast(BaseHandle handle) + { + Camera ret = new Camera(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Camera(Camera copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(Camera.getCPtr(copy)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Camera Assign(Camera rhs) + { + Camera ret = new Camera(NDalicPINVOKE.CameraActor_Assign(swigCPtr, Camera.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetType(CameraType type) + { + NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public CameraType GetType() + { + CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetProjectionMode(ProjectionMode mode) + { + NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ProjectionMode GetProjectionMode() + { + ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFieldOfView(float fieldOfView) + { + NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetFieldOfView() + { + float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAspectRatio(float aspectRatio) + { + NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetAspectRatio() + { + float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetNearClippingPlane(float nearClippingPlane) + { + NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetNearClippingPlane() + { + float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFarClippingPlane(float farClippingPlane) + { + NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetFarClippingPlane() + { + float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetTargetPosition(Vector3 targetPosition) + { + NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector3 GetTargetPosition() + { + Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetInvertYAxis(bool invertYAxis) + { + NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetInvertYAxis() + { + bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetPerspectiveProjection(Vector2 size) + { + NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetOrthographicProjection(Vector2 size) + { + NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far) + { + NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public string Type + { + get + { + string temp; + GetProperty(Camera.Property.TYPE).Get(out temp); + return temp; + } + set + { + SetProperty(Camera.Property.TYPE, new Tizen.NUI.PropertyValue(value)); + } + } + public string ProjectionMode + { + get + { + string temp; + GetProperty(Camera.Property.PROJECTION_MODE).Get(out temp); + return temp; + } + set + { + SetProperty(Camera.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue(value)); + } + } + public float FieldOfView + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.FIELD_OF_VIEW).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.FIELD_OF_VIEW, new Tizen.NUI.PropertyValue(value)); + } + } + public float AspectRatio + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.ASPECT_RATIO).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.ASPECT_RATIO, new Tizen.NUI.PropertyValue(value)); + } + } + public float NearPlaneDistance + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.NEAR_PLANE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.NEAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public float FarPlaneDistance + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.FAR_PLANE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.FAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public float LeftPlaneDistance + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.LEFT_PLANE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.LEFT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public float RightPlaneDistance + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.RIGHT_PLANE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.RIGHT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public float TopPlaneDistance + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.TOP_PLANE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.TOP_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public float BottomPlaneDistance + { + get + { + float temp = 0.0f; + GetProperty(Camera.Property.BOTTOM_PLANE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.BOTTOM_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector3 TargetPosition + { + get + { + Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); + GetProperty(Camera.Property.TARGET_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(Camera.Property.TARGET_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + internal Matrix ProjectionMatrix + { + get + { + Matrix temp = new Matrix(); + GetProperty(Camera.Property.PROJECTION_MATRIX).Get(temp); + return temp; + } + } + internal Matrix ViewMatrix + { + get + { + Matrix temp = new Matrix(); + GetProperty(Camera.Property.VIEW_MATRIX).Get(temp); + return temp; + } + } + public bool InvertYAxis + { + get + { + bool temp = false; + GetProperty(Camera.Property.INVERT_Y_AXIS).Get(ref temp); + return temp; + } + set + { + SetProperty(Camera.Property.INVERT_Y_AXIS, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs b/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs old mode 100644 new mode 100755 index ceaea76..b8f67d0 --- a/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs @@ -8,48 +8,96 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ChildPropertyRegistration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ChildPropertyRegistration : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ChildPropertyRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ChildPropertyRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ChildPropertyRegistration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ChildPropertyRegistration obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ChildPropertyRegistration() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~ChildPropertyRegistration() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ChildPropertyRegistration(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public ChildPropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type) : this(NDalicPINVOKE.new_ChildPropertyRegistration(TypeRegistration.getCPtr(registered), name, index, (int)type), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ChildPropertyRegistration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public ChildPropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type) : this(NDalicPINVOKE.new_ChildPropertyRegistration(TypeRegistration.getCPtr(registered), name, index, (int)type), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ClampState.cs b/src/Tizen.NUI/src/internal/ClampState.cs old mode 100644 new mode 100755 index 0aafcc9..bcb760a --- a/src/Tizen.NUI/src/internal/ClampState.cs +++ b/src/Tizen.NUI/src/internal/ClampState.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum ClampState { - NotClamped, - ClampedToMin, - ClampedToMax -} + internal enum ClampState + { + NotClamped, + ClampedToMin, + ClampedToMax + } } diff --git a/src/Tizen.NUI/src/internal/ClampState2D.cs b/src/Tizen.NUI/src/internal/ClampState2D.cs old mode 100644 new mode 100755 index 17a48e2..1ebf1ba --- a/src/Tizen.NUI/src/internal/ClampState2D.cs +++ b/src/Tizen.NUI/src/internal/ClampState2D.cs @@ -8,72 +8,132 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ClampState2D : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ClampState2D : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ClampState2D(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ClampState2D(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ClampState2D obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ClampState2D obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ClampState2D() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected enum DisposeTypes + { + Explicit, //Called By User + Implicit, //Called by DisposeQueue + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ClampState2D(swigCPtr); + ~ClampState2D() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public ClampState x { - set { - NDalicPINVOKE.ClampState2D_x_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_x_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public ClampState y { - set { - NDalicPINVOKE.ClampState2D_y_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_y_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public ClampState2D() : this(NDalicPINVOKE.new_ClampState2D(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ClampState2D(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public ClampState x + { + set + { + NDalicPINVOKE.ClampState2D_x_set(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_x_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public ClampState y + { + set + { + NDalicPINVOKE.ClampState2D_y_set(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_y_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public ClampState2D() : this(NDalicPINVOKE.new_ClampState2D(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ConnectionTracker.cs b/src/Tizen.NUI/src/internal/ConnectionTracker.cs old mode 100644 new mode 100755 index fe593dd..b7806e0 --- a/src/Tizen.NUI/src/internal/ConnectionTracker.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTracker.cs @@ -8,60 +8,80 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ConnectionTracker : ConnectionTrackerInterface { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class ConnectionTracker : ConnectionTrackerInterface + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ConnectionTracker(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ConnectionTracker_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ConnectionTracker(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ConnectionTracker_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionTracker obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionTracker obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ConnectionTracker(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } - public void DisconnectAll() { - NDalicPINVOKE.ConnectionTracker_DisconnectAll(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) { - NDalicPINVOKE.ConnectionTracker_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ConnectionTracker(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - public virtual void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) { - NDalicPINVOKE.ConnectionTracker_SignalDisconnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + base.Dispose(type); + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ConnectionTracker_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public void DisconnectAll() + { + NDalicPINVOKE.ConnectionTracker_DisconnectAll(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) + { + NDalicPINVOKE.ConnectionTracker_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) + { + NDalicPINVOKE.ConnectionTracker_SignalDisconnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ConnectionTracker_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs old mode 100644 new mode 100755 index d12ed23..c8f952e --- a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs @@ -8,44 +8,62 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class ConnectionTrackerInterface : SignalObserver { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class ConnectionTrackerInterface : SignalObserver + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ConnectionTrackerInterface_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ConnectionTrackerInterface_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionTrackerInterface obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionTrackerInterface obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ConnectionTrackerInterface(swigCPtr); + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ConnectionTrackerInterface(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_CallbackBase callback) { - NDalicPINVOKE.ConnectionTrackerInterface_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_CallbackBase.getCPtr(callback)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_CallbackBase callback) + { + NDalicPINVOKE.ConnectionTrackerInterface_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_CallbackBase.getCPtr(callback)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/ControlKeySignal.cs b/src/Tizen.NUI/src/internal/ControlKeySignal.cs old mode 100644 new mode 100755 index 922b438..644398b --- a/src/Tizen.NUI/src/internal/ControlKeySignal.cs +++ b/src/Tizen.NUI/src/internal/ControlKeySignal.cs @@ -10,82 +10,136 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ControlKeySignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ControlKeySignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ControlKeySignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ControlKeySignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ControlKeySignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ControlKeySignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ControlKeySignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ControlKeySignal(swigCPtr); + ~ControlKeySignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ControlKeySignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ControlKeySignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ControlKeySignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ControlKeySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ControlKeySignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ControlKeySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ControlKeySignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public bool Emit(View arg1, Key arg2) { - bool ret = NDalicPINVOKE.ControlKeySignal_Emit(swigCPtr, View.getCPtr(arg1), Key.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ControlKeySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public ControlKeySignal() : this(NDalicPINVOKE.new_ControlKeySignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ControlKeySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public bool Emit(View arg1, Key arg2) + { + bool ret = NDalicPINVOKE.ControlKeySignal_Emit(swigCPtr, View.getCPtr(arg1), Key.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ControlKeySignal() : this(NDalicPINVOKE.new_ControlKeySignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ControlOrientationType.cs b/src/Tizen.NUI/src/internal/ControlOrientationType.cs old mode 100644 new mode 100755 index c44fd9f..6fac6b7 --- a/src/Tizen.NUI/src/internal/ControlOrientationType.cs +++ b/src/Tizen.NUI/src/internal/ControlOrientationType.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public enum ControlOrientationType { - Up, - Left, - Down, - Right -} + public enum ControlOrientationType + { + Up, + Left, + Down, + Right + } } diff --git a/src/Tizen.NUI/src/internal/CustomActor.cs b/src/Tizen.NUI/src/internal/CustomActor.cs old mode 100644 new mode 100755 index c2a1902..27b1dde --- a/src/Tizen.NUI/src/internal/CustomActor.cs +++ b/src/Tizen.NUI/src/internal/CustomActor.cs @@ -8,68 +8,91 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class CustomActor : Animatable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class CustomActor : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal CustomActor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CustomActor_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal CustomActor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CustomActor_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomActor obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomActor obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_CustomActor(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } - public CustomActor() : this(NDalicPINVOKE.new_CustomActor__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public new static CustomActor DownCast(BaseHandle handle) { - CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActor_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_CustomActor(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - public CustomActorImpl GetImplementation() { - CustomActorImpl ret = new CustomActorImpl(NDalicPINVOKE.CustomActor_GetImplementation(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + base.Dispose(type); + } - public CustomActor(CustomActorImpl implementation) : this(NDalicPINVOKE.new_CustomActor__SWIG_1(CustomActorImpl.getCPtr(implementation)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public CustomActor() : this(NDalicPINVOKE.new_CustomActor__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public CustomActor(CustomActor copy) : this(NDalicPINVOKE.new_CustomActor__SWIG_2(CustomActor.getCPtr(copy)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public new static CustomActor DownCast(BaseHandle handle) + { + CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActor_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public CustomActor Assign(CustomActor rhs) { - CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActor_Assign(swigCPtr, CustomActor.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public CustomActorImpl GetImplementation() + { + CustomActorImpl ret = new CustomActorImpl(NDalicPINVOKE.CustomActor_GetImplementation(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + public CustomActor(CustomActorImpl implementation) : this(NDalicPINVOKE.new_CustomActor__SWIG_1(CustomActorImpl.getCPtr(implementation)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public CustomActor(CustomActor copy) : this(NDalicPINVOKE.new_CustomActor__SWIG_2(CustomActor.getCPtr(copy)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public CustomActor Assign(CustomActor rhs) + { + CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActor_Assign(swigCPtr, CustomActor.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/CustomActorImpl.cs b/src/Tizen.NUI/src/internal/CustomActorImpl.cs old mode 100644 new mode 100755 index 86584df..4bdf93e --- a/src/Tizen.NUI/src/internal/CustomActorImpl.cs +++ b/src/Tizen.NUI/src/internal/CustomActorImpl.cs @@ -8,179 +8,226 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - public class CustomActorImpl : RefObject { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class CustomActorImpl : RefObject + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal CustomActorImpl(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CustomActorImpl_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal CustomActorImpl(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CustomActorImpl_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomActorImpl obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomActorImpl obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); + internal CustomActor Self() + { + CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActorImpl_Self(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - internal CustomActor Self() { - CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActorImpl_Self(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void OnStageConnection(int depth) { - NDalicPINVOKE.CustomActorImpl_OnStageConnection(swigCPtr, depth); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnStageDisconnection() { - NDalicPINVOKE.CustomActorImpl_OnStageDisconnection(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnChildAdd(View child) { - NDalicPINVOKE.CustomActorImpl_OnChildAdd(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnChildRemove(View child) { - NDalicPINVOKE.CustomActorImpl_OnChildRemove(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnPropertySet(int index, PropertyValue propertyValue) { - NDalicPINVOKE.CustomActorImpl_OnPropertySet(swigCPtr, index, PropertyValue.getCPtr(propertyValue)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnSizeSet(Vector3 targetSize) { - NDalicPINVOKE.CustomActorImpl_OnSizeSet(swigCPtr, Vector3.getCPtr(targetSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnSizeAnimation(Animation animation, Vector3 targetSize) { - NDalicPINVOKE.CustomActorImpl_OnSizeAnimation(swigCPtr, Animation.getCPtr(animation), Vector3.getCPtr(targetSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal virtual bool OnTouchEvent(SWIGTYPE_p_Dali__TouchEvent arg0) { - bool ret = NDalicPINVOKE.CustomActorImpl_OnTouchEvent(swigCPtr, SWIGTYPE_p_Dali__TouchEvent.getCPtr(arg0)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual bool OnHoverEvent(Hover arg0) { - bool ret = NDalicPINVOKE.CustomActorImpl_OnHoverEvent(swigCPtr, Hover.getCPtr(arg0)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual bool OnKeyEvent(Key arg0) { - bool ret = NDalicPINVOKE.CustomActorImpl_OnKeyEvent(swigCPtr, Key.getCPtr(arg0)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual bool OnWheelEvent(Wheel arg0) { - bool ret = NDalicPINVOKE.CustomActorImpl_OnWheelEvent(swigCPtr, Wheel.getCPtr(arg0)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void OnRelayout(Vector2 size, RelayoutContainer container) { - NDalicPINVOKE.CustomActorImpl_OnRelayout(swigCPtr, Vector2.getCPtr(size), RelayoutContainer.getCPtr(container)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnSetResizePolicy(ResizePolicyType policy, DimensionType dimension) { - NDalicPINVOKE.CustomActorImpl_OnSetResizePolicy(swigCPtr, (int)policy, (int)dimension); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual Vector3 GetNaturalSize() { - Vector3 ret = new Vector3(NDalicPINVOKE.CustomActorImpl_GetNaturalSize(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float CalculateChildSize(View child, DimensionType dimension) { - float ret = NDalicPINVOKE.CustomActorImpl_CalculateChildSize(swigCPtr, View.getCPtr(child), (int)dimension); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetHeightForWidth(float width) { - float ret = NDalicPINVOKE.CustomActorImpl_GetHeightForWidth(swigCPtr, width); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetWidthForHeight(float height) { - float ret = NDalicPINVOKE.CustomActorImpl_GetWidthForHeight(swigCPtr, height); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual bool RelayoutDependentOnChildren(DimensionType dimension) { - bool ret = NDalicPINVOKE.CustomActorImpl_RelayoutDependentOnChildren__SWIG_0(swigCPtr, (int)dimension); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual bool RelayoutDependentOnChildren() { - bool ret = NDalicPINVOKE.CustomActorImpl_RelayoutDependentOnChildren__SWIG_1(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void OnCalculateRelayoutSize(DimensionType dimension) { - NDalicPINVOKE.CustomActorImpl_OnCalculateRelayoutSize(swigCPtr, (int)dimension); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual void OnLayoutNegotiated(float size, DimensionType dimension) { - NDalicPINVOKE.CustomActorImpl_OnLayoutNegotiated(swigCPtr, size, (int)dimension); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool RequiresTouchEvents() { - bool ret = NDalicPINVOKE.CustomActorImpl_RequiresTouchEvents(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool RequiresHoverEvents() { - bool ret = NDalicPINVOKE.CustomActorImpl_RequiresHoverEvents(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool RequiresWheelEvents() { - bool ret = NDalicPINVOKE.CustomActorImpl_RequiresWheelEvents(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsRelayoutEnabled() { - bool ret = NDalicPINVOKE.CustomActorImpl_IsRelayoutEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public virtual void OnStageConnection(int depth) + { + NDalicPINVOKE.CustomActorImpl_OnStageConnection(swigCPtr, depth); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnStageDisconnection() + { + NDalicPINVOKE.CustomActorImpl_OnStageDisconnection(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnChildAdd(View child) + { + NDalicPINVOKE.CustomActorImpl_OnChildAdd(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnChildRemove(View child) + { + NDalicPINVOKE.CustomActorImpl_OnChildRemove(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnPropertySet(int index, PropertyValue propertyValue) + { + NDalicPINVOKE.CustomActorImpl_OnPropertySet(swigCPtr, index, PropertyValue.getCPtr(propertyValue)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnSizeSet(Vector3 targetSize) + { + NDalicPINVOKE.CustomActorImpl_OnSizeSet(swigCPtr, Vector3.getCPtr(targetSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnSizeAnimation(Animation animation, Vector3 targetSize) + { + NDalicPINVOKE.CustomActorImpl_OnSizeAnimation(swigCPtr, Animation.getCPtr(animation), Vector3.getCPtr(targetSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal virtual bool OnTouchEvent(SWIGTYPE_p_Dali__TouchEvent arg0) + { + bool ret = NDalicPINVOKE.CustomActorImpl_OnTouchEvent(swigCPtr, SWIGTYPE_p_Dali__TouchEvent.getCPtr(arg0)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual bool OnHoverEvent(Hover arg0) + { + bool ret = NDalicPINVOKE.CustomActorImpl_OnHoverEvent(swigCPtr, Hover.getCPtr(arg0)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual bool OnKeyEvent(Key arg0) + { + bool ret = NDalicPINVOKE.CustomActorImpl_OnKeyEvent(swigCPtr, Key.getCPtr(arg0)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual bool OnWheelEvent(Wheel arg0) + { + bool ret = NDalicPINVOKE.CustomActorImpl_OnWheelEvent(swigCPtr, Wheel.getCPtr(arg0)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void OnRelayout(Vector2 size, RelayoutContainer container) + { + NDalicPINVOKE.CustomActorImpl_OnRelayout(swigCPtr, Vector2.getCPtr(size), RelayoutContainer.getCPtr(container)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnSetResizePolicy(ResizePolicyType policy, DimensionType dimension) + { + NDalicPINVOKE.CustomActorImpl_OnSetResizePolicy(swigCPtr, (int)policy, (int)dimension); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual Vector3 GetNaturalSize() + { + Vector3 ret = new Vector3(NDalicPINVOKE.CustomActorImpl_GetNaturalSize(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float CalculateChildSize(View child, DimensionType dimension) + { + float ret = NDalicPINVOKE.CustomActorImpl_CalculateChildSize(swigCPtr, View.getCPtr(child), (int)dimension); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetHeightForWidth(float width) + { + float ret = NDalicPINVOKE.CustomActorImpl_GetHeightForWidth(swigCPtr, width); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetWidthForHeight(float height) + { + float ret = NDalicPINVOKE.CustomActorImpl_GetWidthForHeight(swigCPtr, height); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual bool RelayoutDependentOnChildren(DimensionType dimension) + { + bool ret = NDalicPINVOKE.CustomActorImpl_RelayoutDependentOnChildren__SWIG_0(swigCPtr, (int)dimension); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual bool RelayoutDependentOnChildren() + { + bool ret = NDalicPINVOKE.CustomActorImpl_RelayoutDependentOnChildren__SWIG_1(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void OnCalculateRelayoutSize(DimensionType dimension) + { + NDalicPINVOKE.CustomActorImpl_OnCalculateRelayoutSize(swigCPtr, (int)dimension); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual void OnLayoutNegotiated(float size, DimensionType dimension) + { + NDalicPINVOKE.CustomActorImpl_OnLayoutNegotiated(swigCPtr, size, (int)dimension); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool RequiresTouchEvents() + { + bool ret = NDalicPINVOKE.CustomActorImpl_RequiresTouchEvents(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool RequiresHoverEvents() + { + bool ret = NDalicPINVOKE.CustomActorImpl_RequiresHoverEvents(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool RequiresWheelEvents() + { + bool ret = NDalicPINVOKE.CustomActorImpl_RequiresWheelEvents(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsRelayoutEnabled() + { + bool ret = NDalicPINVOKE.CustomActorImpl_IsRelayoutEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs old mode 100644 new mode 100755 index ab7f7ab..850be0f --- a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs +++ b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs @@ -15,65 +15,118 @@ using System.Reflection; using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class CustomAlgorithmInterface : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } -internal class CustomAlgorithmInterface : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~CustomAlgorithmInterface() { - DisposeQueue.Instance.Add(this); - } + ~CustomAlgorithmInterface() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public virtual View GetNextFocusableView(View current, View proposed, View.FocusDirection direction) { - View ret = new View(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, View.getCPtr(current), View.getCPtr(proposed), (int)direction), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - SwigDirectorConnect(); - } + public virtual View GetNextFocusableView(View current, View proposed, View.FocusDirection direction) + { + View ret = new View(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, View.getCPtr(current), View.getCPtr(proposed), (int)direction), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - private void SwigDirectorConnect() { - if (SwigDerivedClassHasMethod("GetNextFocusableView", swigMethodTypes0)) - swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableView); - NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0); - } + public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + SwigDirectorConnect(); + } + + private void SwigDirectorConnect() + { + if (SwigDerivedClassHasMethod("GetNextFocusableView", swigMethodTypes0)) + swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableView); + NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0); + } #if DOT_NET_CORE - private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { - global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes); - bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface)); - return hasDerivedMethod && (methodInfo != null); - } + private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) + { + global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes); + bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface)); + return hasDerivedMethod && (methodInfo != null); + } #else private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null); @@ -82,15 +135,16 @@ internal class CustomAlgorithmInterface : global::System.IDisposable { } #endif - private global::System.IntPtr SwigDirectorGetNextFocusableView(global::System.IntPtr current, global::System.IntPtr proposed, int direction) { - return View.getCPtr(GetNextFocusableView(new View(current, true), new View(proposed, true), (View.FocusDirection)direction)).Handle; - } + private global::System.IntPtr SwigDirectorGetNextFocusableView(global::System.IntPtr current, global::System.IntPtr proposed, int direction) + { + return View.getCPtr(GetNextFocusableView(new View(current, true), new View(proposed, true), (View.FocusDirection)direction)).Handle; + } - public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction); + public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction); - private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0; + private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0; - private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(View), typeof(View), typeof(View.FocusDirection) }; -} + private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(View), typeof(View), typeof(View.FocusDirection) }; + } } diff --git a/src/Tizen.NUI/src/internal/DaliEnumConstants.cs b/src/Tizen.NUI/src/internal/DaliEnumConstants.cs old mode 100644 new mode 100755 index 7b56c45..8c154b4 --- a/src/Tizen.NUI/src/internal/DaliEnumConstants.cs +++ b/src/Tizen.NUI/src/internal/DaliEnumConstants.cs @@ -17,61 +17,62 @@ using System; namespace Tizen.NUI { - namespace Constants - { - public enum TextureType - { - Texture2D = Tizen.NUI.TextureType.TEXTURE_2D, ///< One 2D image @SINCE_1_1.43 - TextureCube = Tizen.NUI.TextureType.TEXTURE_CUBE ///< Six 2D images arranged in a cube-shape @SINCE_1_1.43 - } - public enum ViewMode + namespace Constants { - Mono = Tizen.NUI.ViewMode.MONO, ///< Monoscopic (single camera). This is the default @SINCE_1_0.0 - StereoHorizontal = Tizen.NUI.ViewMode.STEREO_HORIZONTAL, ///< Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides. @SINCE_1_0.0 - StereoVertical = Tizen.NUI.ViewMode.STEREO_VERTICAL, ///< Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom. @SINCE_1_0.0 - StereoInterlaced = Tizen.NUI.ViewMode.STEREO_INTERLACED ///< @DEPRECATED_1_1.19 @brief Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames. @SINCE_1_0.0 - } + public enum TextureType + { + Texture2D = Tizen.NUI.TextureType.TEXTURE_2D, ///< One 2D image @SINCE_1_1.43 + TextureCube = Tizen.NUI.TextureType.TEXTURE_CUBE ///< Six 2D images arranged in a cube-shape @SINCE_1_1.43 + } - public struct Direction - { - public enum Type - { - LeftToRight = Tizen.NUI.DirectionType.LEFT_TO_RIGHT, - RightToLeft = Tizen.NUI.DirectionType.RIGHT_TO_LEFT - } - } + public enum ViewMode + { + Mono = Tizen.NUI.ViewMode.MONO, ///< Monoscopic (single camera). This is the default @SINCE_1_0.0 + StereoHorizontal = Tizen.NUI.ViewMode.STEREO_HORIZONTAL, ///< Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides. @SINCE_1_0.0 + StereoVertical = Tizen.NUI.ViewMode.STEREO_VERTICAL, ///< Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom. @SINCE_1_0.0 + StereoInterlaced = Tizen.NUI.ViewMode.STEREO_INTERLACED ///< @DEPRECATED_1_1.19 @brief Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames. @SINCE_1_0.0 + } + public struct Direction + { + public enum Type + { + LeftToRight = Tizen.NUI.DirectionType.LEFT_TO_RIGHT, + RightToLeft = Tizen.NUI.DirectionType.RIGHT_TO_LEFT + } + } - public struct Tooltip - { - public struct Property - { - public static readonly int Content = NDalic.TOOLTIP_CONTENT; - public static readonly int Layout = NDalic.TOOLTIP_LAYOUT; - public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME; - public static readonly int Background = NDalic.TOOLTIP_BACKGROUND; - public static readonly int Tail = NDalic.TOOLTIP_TAIL; - public static readonly int Position = NDalic.TOOLTIP_POSITION; - public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET; - public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD; - public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT; - } - public struct BackgroundProperty - { - public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL; - public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER; - } + public struct Tooltip + { + public struct Property + { + public static readonly int Content = NDalic.TOOLTIP_CONTENT; + public static readonly int Layout = NDalic.TOOLTIP_LAYOUT; + public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME; + public static readonly int Background = NDalic.TOOLTIP_BACKGROUND; + public static readonly int Tail = NDalic.TOOLTIP_TAIL; + public static readonly int Position = NDalic.TOOLTIP_POSITION; + public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET; + public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD; + public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT; + } + + public struct BackgroundProperty + { + public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL; + public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER; + } - public struct TailProperty - { - public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY; - public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL; - public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL; - } - } - } // namespace Constants + public struct TailProperty + { + public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY; + public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL; + public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL; + } + } + } // namespace Constants } // namesapce Dali diff --git a/src/Tizen.NUI/src/internal/DaliEventHandler.cs b/src/Tizen.NUI/src/internal/DaliEventHandler.cs old mode 100644 new mode 100755 index d384ed4..45f5c7d --- a/src/Tizen.NUI/src/internal/DaliEventHandler.cs +++ b/src/Tizen.NUI/src/internal/DaliEventHandler.cs @@ -14,13 +14,14 @@ * limitations under the License. * */ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using System; using System.Runtime.InteropServices; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate R DaliEventHandlerWithReturnType(T source, U e); + public delegate R DaliEventHandlerWithReturnType(T source, U e); [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate void EventCallbackDelegateType0(); diff --git a/src/Tizen.NUI/src/internal/DaliException.cs b/src/Tizen.NUI/src/internal/DaliException.cs old mode 100644 new mode 100755 index 60fc1d4..2389308 --- a/src/Tizen.NUI/src/internal/DaliException.cs +++ b/src/Tizen.NUI/src/internal/DaliException.cs @@ -8,72 +8,126 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class DaliException : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class DaliException : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal DaliException(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal DaliException(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DaliException obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DaliException obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~DaliException() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_DaliException(swigCPtr); + ~DaliException() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public DaliException(string location, string condition) : this(NDalicPINVOKE.new_DaliException(location, condition), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string location { - set { - NDalicPINVOKE.DaliException_location_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - string ret = NDalicPINVOKE.DaliException_location_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public string condition { - set { - NDalicPINVOKE.DaliException_condition_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - string ret = NDalicPINVOKE.DaliException_condition_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_DaliException(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public DaliException(string location, string condition) : this(NDalicPINVOKE.new_DaliException(location, condition), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public string location + { + set + { + NDalicPINVOKE.DaliException_location_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + string ret = NDalicPINVOKE.DaliException_location_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public string condition + { + set + { + NDalicPINVOKE.DaliException_condition_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + string ret = NDalicPINVOKE.DaliException_condition_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs b/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs old mode 100644 new mode 100755 index d9115f9..1ab2697 --- a/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs +++ b/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs @@ -8,35 +8,37 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public enum DefaultItemLayoutProperty { - TYPE = 0, - ITEM_SIZE, - ORIENTATION, - GRID_COLUMN_NUMBER, - GRID_ROW_SPACING, - GRID_COLUMN_SPACING, - GRID_TOP_MARGIN, - GRID_BOTTOM_MARGIN, - GRID_SIDE_MARGIN, - GRID_SCROLL_SPEED_FACTOR, - GRID_MAXIMUM_SWIPE_SPEED, - GRID_ITEM_FLICK_ANIMATION_DURATION, - DEPTH_COLUMN_NUMBER, - DEPTH_ROW_NUMBER, - DEPTH_ROW_SPACING, - DEPTH_SCROLL_SPEED_FACTOR, - DEPTH_MAXIMUM_SWIPE_SPEED, - DEPTH_ITEM_FLICK_ANIMATION_DURATION, - DEPTH_TILT_ANGLE, - DEPTH_ITEM_TILT_ANGLE, - SPIRAL_ITEM_SPACING, - SPIRAL_SCROLL_SPEED_FACTOR, - SPIRAL_MAXIMUM_SWIPE_SPEED, - SPIRAL_ITEM_FLICK_ANIMATION_DURATION, - SPIRAL_REVOLUTION_DISTANCE, - SPIRAL_TOP_ITEM_ALIGNMENT -} + public enum DefaultItemLayoutProperty + { + TYPE = 0, + ITEM_SIZE, + ORIENTATION, + GRID_COLUMN_NUMBER, + GRID_ROW_SPACING, + GRID_COLUMN_SPACING, + GRID_TOP_MARGIN, + GRID_BOTTOM_MARGIN, + GRID_SIDE_MARGIN, + GRID_SCROLL_SPEED_FACTOR, + GRID_MAXIMUM_SWIPE_SPEED, + GRID_ITEM_FLICK_ANIMATION_DURATION, + DEPTH_COLUMN_NUMBER, + DEPTH_ROW_NUMBER, + DEPTH_ROW_SPACING, + DEPTH_SCROLL_SPEED_FACTOR, + DEPTH_MAXIMUM_SWIPE_SPEED, + DEPTH_ITEM_FLICK_ANIMATION_DURATION, + DEPTH_TILT_ANGLE, + DEPTH_ITEM_TILT_ANGLE, + SPIRAL_ITEM_SPACING, + SPIRAL_SCROLL_SPEED_FACTOR, + SPIRAL_MAXIMUM_SWIPE_SPEED, + SPIRAL_ITEM_FLICK_ANIMATION_DURATION, + SPIRAL_REVOLUTION_DISTANCE, + SPIRAL_TOP_ITEM_ALIGNMENT + } } diff --git a/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs b/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs old mode 100644 new mode 100755 index f1665f6..18f06dc --- a/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs +++ b/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public enum DefaultItemLayoutType { - DEPTH, - GRID, - LIST, - SPIRAL -} + public enum DefaultItemLayoutType + { + DEPTH, + GRID, + LIST, + SPIRAL + } } diff --git a/src/Tizen.NUI/src/internal/DefaultRuler.cs b/src/Tizen.NUI/src/internal/DefaultRuler.cs old mode 100644 new mode 100755 index df4c6ff..dfb5163 --- a/src/Tizen.NUI/src/internal/DefaultRuler.cs +++ b/src/Tizen.NUI/src/internal/DefaultRuler.cs @@ -8,67 +8,88 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class DefaultRuler : Ruler { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class DefaultRuler : Ruler + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal DefaultRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.DefaultRuler_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal DefaultRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.DefaultRuler_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DefaultRuler obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DefaultRuler obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_DefaultRuler(swigCPtr); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_DefaultRuler(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public DefaultRuler() : this(NDalicPINVOKE.new_DefaultRuler(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public override float Snap(float x, float bias) { - float ret = NDalicPINVOKE.DefaultRuler_Snap(swigCPtr, x, bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override float GetPositionFromPage(uint page, out uint volume, bool wrap) { - float ret = NDalicPINVOKE.DefaultRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override uint GetPageFromPosition(float position, bool wrap) { - uint ret = NDalicPINVOKE.DefaultRuler_GetPageFromPosition(swigCPtr, position, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override uint GetTotalPages() { - uint ret = NDalicPINVOKE.DefaultRuler_GetTotalPages(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public DefaultRuler() : this(NDalicPINVOKE.new_DefaultRuler(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public override float Snap(float x, float bias) + { + float ret = NDalicPINVOKE.DefaultRuler_Snap(swigCPtr, x, bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override float GetPositionFromPage(uint page, out uint volume, bool wrap) + { + float ret = NDalicPINVOKE.DefaultRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override uint GetPageFromPosition(float position, bool wrap) + { + uint ret = NDalicPINVOKE.DefaultRuler_GetPageFromPosition(swigCPtr, position, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override uint GetTotalPages() + { + uint ret = NDalicPINVOKE.DefaultRuler_GetTotalPages(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/DepthFunctionType.cs b/src/Tizen.NUI/src/internal/DepthFunctionType.cs old mode 100644 new mode 100755 index 7afd7c7..b69c693 --- a/src/Tizen.NUI/src/internal/DepthFunctionType.cs +++ b/src/Tizen.NUI/src/internal/DepthFunctionType.cs @@ -8,17 +8,19 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum DepthFunctionType { - NEVER, - ALWAYS, - LESS, - GREATER, - EQUAL, - NOT_EQUAL, - LESS_EQUAL, - GREATER_EQUAL -} + internal enum DepthFunctionType + { + NEVER, + ALWAYS, + LESS, + GREATER, + EQUAL, + NOT_EQUAL, + LESS_EQUAL, + GREATER_EQUAL + } } diff --git a/src/Tizen.NUI/src/internal/DepthTestModeType.cs b/src/Tizen.NUI/src/internal/DepthTestModeType.cs old mode 100644 new mode 100755 index 063abd8..9a7a426 --- a/src/Tizen.NUI/src/internal/DepthTestModeType.cs +++ b/src/Tizen.NUI/src/internal/DepthTestModeType.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum DepthTestModeType { - OFF, - AUTO, - ON -} + internal enum DepthTestModeType + { + OFF, + AUTO, + ON + } } diff --git a/src/Tizen.NUI/src/internal/DepthWriteModeType.cs b/src/Tizen.NUI/src/internal/DepthWriteModeType.cs old mode 100644 new mode 100755 index 8d52864..be1bcea --- a/src/Tizen.NUI/src/internal/DepthWriteModeType.cs +++ b/src/Tizen.NUI/src/internal/DepthWriteModeType.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum DepthWriteModeType { - OFF, - AUTO, - ON -} + internal enum DepthWriteModeType + { + OFF, + AUTO, + ON + } } diff --git a/src/Tizen.NUI/src/internal/DirectionBias.cs b/src/Tizen.NUI/src/internal/DirectionBias.cs old mode 100644 new mode 100755 index 67dd599..da74cb2 --- a/src/Tizen.NUI/src/internal/DirectionBias.cs +++ b/src/Tizen.NUI/src/internal/DirectionBias.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public enum DirectionBias { - DirectionBiasLeft = -1, - DirectionBiasNone = 0, - DirectionBiasRight = 1 -} + public enum DirectionBias + { + DirectionBiasLeft = -1, + DirectionBiasNone = 0, + DirectionBiasRight = 1 + } } diff --git a/src/Tizen.NUI/src/internal/DirectionType.cs b/src/Tizen.NUI/src/internal/DirectionType.cs old mode 100644 new mode 100755 index eae981f..6509fc2 --- a/src/Tizen.NUI/src/internal/DirectionType.cs +++ b/src/Tizen.NUI/src/internal/DirectionType.cs @@ -8,11 +8,13 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum DirectionType { - LEFT_TO_RIGHT = 0, - RIGHT_TO_LEFT -} + internal enum DirectionType + { + LEFT_TO_RIGHT = 0, + RIGHT_TO_LEFT + } } diff --git a/src/Tizen.NUI/src/internal/DisposeQueue.cs b/src/Tizen.NUI/src/internal/DisposeQueue.cs old mode 100644 new mode 100755 index 521076e..7c06194 --- a/src/Tizen.NUI/src/internal/DisposeQueue.cs +++ b/src/Tizen.NUI/src/internal/DisposeQueue.cs @@ -42,7 +42,7 @@ namespace Tizen.NUI public void Add(IDisposable disposable) { - lock(_listLock) + lock (_listLock) { _disposables.Add(disposable); } @@ -55,7 +55,7 @@ namespace Tizen.NUI private void ProcessDisposables() { - lock(_listLock) + lock (_listLock) { foreach (IDisposable disposable in _disposables) { diff --git a/src/Tizen.NUI/src/internal/DragAndDropDetector.cs b/src/Tizen.NUI/src/internal/DragAndDropDetector.cs old mode 100644 new mode 100755 index 2d87f9c..ca28d23 --- a/src/Tizen.NUI/src/internal/DragAndDropDetector.cs +++ b/src/Tizen.NUI/src/internal/DragAndDropDetector.cs @@ -8,79 +8,103 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class DragAndDropDetector : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class DragAndDropDetector : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal DragAndDropDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.DragAndDropDetector_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal DragAndDropDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.DragAndDropDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DragAndDropDetector obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DragAndDropDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_DragAndDropDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_DragAndDropDetector(swigCPtr); + public DragAndDropDetector() : this(NDalicPINVOKE.new_DragAndDropDetector(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public DragAndDropDetector() : this(NDalicPINVOKE.new_DragAndDropDetector(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string GetContent() { - string ret = NDalicPINVOKE.DragAndDropDetector_GetContent(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector2 GetCurrentScreenPosition() { - Vector2 ret = new Vector2(NDalicPINVOKE.DragAndDropDetector_GetCurrentScreenPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t EnteredSignal() { - SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_EnteredSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ExitedSignal() { - SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_ExitedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t MovedSignal() { - SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_MovedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t DroppedSignal() { - SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_DroppedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public string GetContent() + { + string ret = NDalicPINVOKE.DragAndDropDetector_GetContent(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Vector2 GetCurrentScreenPosition() + { + Vector2 ret = new Vector2(NDalicPINVOKE.DragAndDropDetector_GetCurrentScreenPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t EnteredSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_EnteredSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ExitedSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_ExitedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t MovedSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_MovedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t DroppedSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(NDalicPINVOKE.DragAndDropDetector_DroppedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/EncodedBufferImage.cs b/src/Tizen.NUI/src/internal/EncodedBufferImage.cs old mode 100644 new mode 100755 index 49be04f..f244627 --- a/src/Tizen.NUI/src/internal/EncodedBufferImage.cs +++ b/src/Tizen.NUI/src/internal/EncodedBufferImage.cs @@ -24,67 +24,89 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class EncodedBufferImage : Image { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class EncodedBufferImage : Image + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal EncodedBufferImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.EncodedBufferImage_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal EncodedBufferImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.EncodedBufferImage_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(EncodedBufferImage obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(EncodedBufferImage obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_EncodedBufferImage(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } - public EncodedBufferImage (SWIGTYPE_p_uint8_t encodedImage, uint encodedImageByteCount) : this (NDalicPINVOKE.EncodedBufferImage_New__SWIG_0(SWIGTYPE_p_uint8_t.getCPtr(encodedImage), encodedImageByteCount), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - } - public EncodedBufferImage (SWIGTYPE_p_uint8_t encodedImage, uint encodedImageByteCount, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) : this (NDalicPINVOKE.EncodedBufferImage_New__SWIG_1(SWIGTYPE_p_uint8_t.getCPtr(encodedImage), encodedImageByteCount, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode, orientationCorrection), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_EncodedBufferImage(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - } - public EncodedBufferImage (SWIGTYPE_p_uint8_t encodedImage, uint encodedImageByteCount, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode) : this (NDalicPINVOKE.EncodedBufferImage_New__SWIG_2(SWIGTYPE_p_uint8_t.getCPtr(encodedImage), encodedImageByteCount, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + base.Dispose(type); + } - } - public new static EncodedBufferImage DownCast(BaseHandle handle) { - EncodedBufferImage ret = new EncodedBufferImage(NDalicPINVOKE.EncodedBufferImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public EncodedBufferImage(SWIGTYPE_p_uint8_t encodedImage, uint encodedImageByteCount) : this(NDalicPINVOKE.EncodedBufferImage_New__SWIG_0(SWIGTYPE_p_uint8_t.getCPtr(encodedImage), encodedImageByteCount), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - public EncodedBufferImage(EncodedBufferImage handle) : this(NDalicPINVOKE.new_EncodedBufferImage__SWIG_1(EncodedBufferImage.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + } + public EncodedBufferImage(SWIGTYPE_p_uint8_t encodedImage, uint encodedImageByteCount, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) : this(NDalicPINVOKE.EncodedBufferImage_New__SWIG_1(SWIGTYPE_p_uint8_t.getCPtr(encodedImage), encodedImageByteCount, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode, orientationCorrection), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - public EncodedBufferImage Assign(EncodedBufferImage rhs) { - EncodedBufferImage ret = new EncodedBufferImage(NDalicPINVOKE.EncodedBufferImage_Assign(swigCPtr, EncodedBufferImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + } + public EncodedBufferImage(SWIGTYPE_p_uint8_t encodedImage, uint encodedImageByteCount, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode) : this(NDalicPINVOKE.EncodedBufferImage_New__SWIG_2(SWIGTYPE_p_uint8_t.getCPtr(encodedImage), encodedImageByteCount, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -} + } + public new static EncodedBufferImage DownCast(BaseHandle handle) + { + EncodedBufferImage ret = new EncodedBufferImage(NDalicPINVOKE.EncodedBufferImage_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public EncodedBufferImage(EncodedBufferImage handle) : this(NDalicPINVOKE.new_EncodedBufferImage__SWIG_1(EncodedBufferImage.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public EncodedBufferImage Assign(EncodedBufferImage rhs) + { + EncodedBufferImage ret = new EncodedBufferImage(NDalicPINVOKE.EncodedBufferImage_Assign(swigCPtr, EncodedBufferImage.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/EventThreadCallback.cs b/src/Tizen.NUI/src/internal/EventThreadCallback.cs old mode 100644 new mode 100755 index 15e18ab..c234de8 --- a/src/Tizen.NUI/src/internal/EventThreadCallback.cs +++ b/src/Tizen.NUI/src/internal/EventThreadCallback.cs @@ -35,32 +35,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~EventThreadCallback() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_EventThreadCallback(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_EventThreadCallback(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public EventThreadCallback(CallbackDelegate func) : this(NDalicManualPINVOKE.new_EventThreadCallback(func), true) diff --git a/src/Tizen.NUI/src/internal/FaceCullingModeType.cs b/src/Tizen.NUI/src/internal/FaceCullingModeType.cs old mode 100644 new mode 100755 index 0829e12..ce6c191 --- a/src/Tizen.NUI/src/internal/FaceCullingModeType.cs +++ b/src/Tizen.NUI/src/internal/FaceCullingModeType.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum FaceCullingModeType { - NONE, - FRONT, - BACK, - FRONT_AND_BACK -} + internal enum FaceCullingModeType + { + NONE, + FRONT, + BACK, + FRONT_AND_BACK + } } diff --git a/src/Tizen.NUI/src/internal/FilterModeType.cs b/src/Tizen.NUI/src/internal/FilterModeType.cs old mode 100644 new mode 100755 index 82da30c..5401232 --- a/src/Tizen.NUI/src/internal/FilterModeType.cs +++ b/src/Tizen.NUI/src/internal/FilterModeType.cs @@ -8,17 +8,19 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum FilterModeType { - NONE = 0, - DEFAULT, - NEAREST, - LINEAR, - NEAREST_MIPMAP_NEAREST, - LINEAR_MIPMAP_NEAREST, - NEAREST_MIPMAP_LINEAR, - LINEAR_MIPMAP_LINEAR -} + internal enum FilterModeType + { + NONE = 0, + DEFAULT, + NEAREST, + LINEAR, + NEAREST_MIPMAP_NEAREST, + LINEAR_MIPMAP_NEAREST, + NEAREST_MIPMAP_LINEAR, + LINEAR_MIPMAP_LINEAR + } } diff --git a/src/Tizen.NUI/src/internal/FixedRuler.cs b/src/Tizen.NUI/src/internal/FixedRuler.cs old mode 100644 new mode 100755 index cdadc72..eddb0d5 --- a/src/Tizen.NUI/src/internal/FixedRuler.cs +++ b/src/Tizen.NUI/src/internal/FixedRuler.cs @@ -8,70 +8,93 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class FixedRuler : Ruler { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class FixedRuler : Ruler + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal FixedRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FixedRuler_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal FixedRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FixedRuler_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FixedRuler obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FixedRuler obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FixedRuler(swigCPtr); + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FixedRuler(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public FixedRuler(float spacing) : this(NDalicPINVOKE.new_FixedRuler__SWIG_0(spacing), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public FixedRuler() : this(NDalicPINVOKE.new_FixedRuler__SWIG_1(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public override float Snap(float x, float bias) { - float ret = NDalicPINVOKE.FixedRuler_Snap(swigCPtr, x, bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override float GetPositionFromPage(uint page, out uint volume, bool wrap) { - float ret = NDalicPINVOKE.FixedRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override uint GetPageFromPosition(float position, bool wrap) { - uint ret = NDalicPINVOKE.FixedRuler_GetPageFromPosition(swigCPtr, position, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public override uint GetTotalPages() { - uint ret = NDalicPINVOKE.FixedRuler_GetTotalPages(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public FixedRuler(float spacing) : this(NDalicPINVOKE.new_FixedRuler__SWIG_0(spacing), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public FixedRuler() : this(NDalicPINVOKE.new_FixedRuler__SWIG_1(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public override float Snap(float x, float bias) + { + float ret = NDalicPINVOKE.FixedRuler_Snap(swigCPtr, x, bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override float GetPositionFromPage(uint page, out uint volume, bool wrap) + { + float ret = NDalicPINVOKE.FixedRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override uint GetPageFromPosition(float position, bool wrap) + { + uint ret = NDalicPINVOKE.FixedRuler_GetPageFromPosition(swigCPtr, position, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public override uint GetTotalPages() + { + uint ret = NDalicPINVOKE.FixedRuler_GetTotalPages(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/FloatSignal.cs b/src/Tizen.NUI/src/internal/FloatSignal.cs old mode 100644 new mode 100755 index 9250cbe..f2959db --- a/src/Tizen.NUI/src/internal/FloatSignal.cs +++ b/src/Tizen.NUI/src/internal/FloatSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class FloatSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class FloatSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal FloatSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal FloatSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FloatSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FloatSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~FloatSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FloatSignal(swigCPtr); + ~FloatSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.FloatSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FloatSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.FloatSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.FloatSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.FloatSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.FloatSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.FloatSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(float arg) { - NDalicPINVOKE.FloatSignal_Emit(swigCPtr, arg); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.FloatSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public FloatSignal() : this(NDalicPINVOKE.new_FloatSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.FloatSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(float arg) + { + NDalicPINVOKE.FloatSignal_Emit(swigCPtr, arg); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public FloatSignal() : this(NDalicPINVOKE.new_FloatSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/FocusChangedSignal.cs b/src/Tizen.NUI/src/internal/FocusChangedSignal.cs old mode 100644 new mode 100755 index 2999be4..a1edbee --- a/src/Tizen.NUI/src/internal/FocusChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/FocusChangedSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class FocusChangedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal FocusChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FocusChangedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~FocusChangedSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class FocusChangedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FocusChangedSignal(swigCPtr); + internal FocusChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FocusChangedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.FocusChangedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.FocusChangedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.FocusChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~FocusChangedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.FocusChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, View arg2) { - NDalicPINVOKE.FocusChangedSignal_Emit(swigCPtr, View.getCPtr(arg1), View.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public FocusChangedSignal() : this(NDalicPINVOKE.new_FocusChangedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FocusChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.FocusChangedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.FocusChangedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.FocusChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.FocusChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, View arg2) + { + NDalicPINVOKE.FocusChangedSignal_Emit(swigCPtr, View.getCPtr(arg1), View.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public FocusChangedSignal() : this(NDalicPINVOKE.new_FocusChangedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs b/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs old mode 100644 new mode 100755 index 5c75f02..667744d --- a/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class FocusGroupChangedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal FocusGroupChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FocusGroupChangedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~FocusGroupChangedSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class FocusGroupChangedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FocusGroupChangedSignal(swigCPtr); + internal FocusGroupChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FocusGroupChangedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.FocusGroupChangedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.FocusGroupChangedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.FocusGroupChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~FocusGroupChangedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.FocusGroupChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, bool arg2) { - NDalicPINVOKE.FocusGroupChangedSignal_Emit(swigCPtr, View.getCPtr(arg1), arg2); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public FocusGroupChangedSignal() : this(NDalicPINVOKE.new_FocusGroupChangedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FocusGroupChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.FocusGroupChangedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.FocusGroupChangedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.FocusGroupChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.FocusGroupChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, bool arg2) + { + NDalicPINVOKE.FocusGroupChangedSignal_Emit(swigCPtr, View.getCPtr(arg1), arg2); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public FocusGroupChangedSignal() : this(NDalicPINVOKE.new_FocusGroupChangedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/FrameBuffer.cs b/src/Tizen.NUI/src/internal/FrameBuffer.cs old mode 100644 new mode 100755 index 7a8cbd0..79240c1 --- a/src/Tizen.NUI/src/internal/FrameBuffer.cs +++ b/src/Tizen.NUI/src/internal/FrameBuffer.cs @@ -24,123 +24,195 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class FrameBuffer : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class FrameBuffer : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal FrameBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FrameBuffer_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal FrameBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FrameBuffer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FrameBuffer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FrameBuffer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FrameBuffer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public class Attachment : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Attachment(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Attachment obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Attachment() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FrameBuffer_Attachment(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Attachment() : this(NDalicPINVOKE.new_FrameBuffer_Attachment(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Mask + { + NONE = 0, + DEPTH = 1 << 0, + STENCIL = 1 << 1, + DEPTH_STENCIL = DEPTH | STENCIL + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FrameBuffer(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public FrameBuffer(uint width, uint height, uint attachments) : this(NDalicPINVOKE.FrameBuffer_New(width, height, attachments), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - public class Attachment : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Attachment(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Attachment obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Attachment() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FrameBuffer_Attachment(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - global::System.GC.SuppressFinalize(this); - } - } - - public Attachment() : this(NDalicPINVOKE.new_FrameBuffer_Attachment(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum Mask { - NONE = 0, - DEPTH = 1 << 0, - STENCIL = 1 << 1, - DEPTH_STENCIL = DEPTH|STENCIL - } - - } - - public FrameBuffer (uint width, uint height, uint attachments) : this (NDalicPINVOKE.FrameBuffer_New(width, height, attachments), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public FrameBuffer(FrameBuffer handle) : this(NDalicPINVOKE.new_FrameBuffer__SWIG_1(FrameBuffer.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static FrameBuffer DownCast(BaseHandle handle) { - FrameBuffer ret = new FrameBuffer(NDalicPINVOKE.FrameBuffer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public FrameBuffer Assign(FrameBuffer handle) { - FrameBuffer ret = new FrameBuffer(NDalicPINVOKE.FrameBuffer_Assign(swigCPtr, FrameBuffer.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void AttachColorTexture(Texture texture) { - NDalicPINVOKE.FrameBuffer_AttachColorTexture__SWIG_0(swigCPtr, Texture.getCPtr(texture)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AttachColorTexture(Texture texture, uint mipmapLevel, uint layer) { - NDalicPINVOKE.FrameBuffer_AttachColorTexture__SWIG_1(swigCPtr, Texture.getCPtr(texture), mipmapLevel, layer); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Texture GetColorTexture() { - Texture ret = new Texture(NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public FrameBuffer(FrameBuffer handle) : this(NDalicPINVOKE.new_FrameBuffer__SWIG_1(FrameBuffer.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public static FrameBuffer DownCast(BaseHandle handle) + { + FrameBuffer ret = new FrameBuffer(NDalicPINVOKE.FrameBuffer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public FrameBuffer Assign(FrameBuffer handle) + { + FrameBuffer ret = new FrameBuffer(NDalicPINVOKE.FrameBuffer_Assign(swigCPtr, FrameBuffer.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void AttachColorTexture(Texture texture) + { + NDalicPINVOKE.FrameBuffer_AttachColorTexture__SWIG_0(swigCPtr, Texture.getCPtr(texture)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AttachColorTexture(Texture texture, uint mipmapLevel, uint layer) + { + NDalicPINVOKE.FrameBuffer_AttachColorTexture__SWIG_1(swigCPtr, Texture.getCPtr(texture), mipmapLevel, layer); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Texture GetColorTexture() + { + Texture ret = new Texture(NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/FrameBufferImage.cs b/src/Tizen.NUI/src/internal/FrameBufferImage.cs old mode 100644 new mode 100755 index dfb6178..aeb69a5 --- a/src/Tizen.NUI/src/internal/FrameBufferImage.cs +++ b/src/Tizen.NUI/src/internal/FrameBufferImage.cs @@ -24,79 +24,106 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class FrameBufferImage : Image { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class FrameBufferImage : Image + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal FrameBufferImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FrameBufferImage_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FrameBufferImage obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal FrameBufferImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FrameBufferImage_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FrameBufferImage obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_FrameBufferImage(swigCPtr); + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_FrameBufferImage(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public FrameBufferImage (uint width, uint height, PixelFormat pixelFormat, RenderBufferFormat bufferFormat) : this (NDalicPINVOKE.FrameBufferImage_New__SWIG_0(width, height, (int)pixelFormat, (int)bufferFormat), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + public FrameBufferImage(uint width, uint height, PixelFormat pixelFormat, RenderBufferFormat bufferFormat) : this(NDalicPINVOKE.FrameBufferImage_New__SWIG_0(width, height, (int)pixelFormat, (int)bufferFormat), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public FrameBufferImage (uint width, uint height, PixelFormat pixelFormat) : this (NDalicPINVOKE.FrameBufferImage_New__SWIG_1(width, height, (int)pixelFormat), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public FrameBufferImage(uint width, uint height, PixelFormat pixelFormat) : this(NDalicPINVOKE.FrameBufferImage_New__SWIG_1(width, height, (int)pixelFormat), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public FrameBufferImage (uint width, uint height) : this (NDalicPINVOKE.FrameBufferImage_New__SWIG_2(width, height), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public FrameBufferImage(uint width, uint height) : this(NDalicPINVOKE.FrameBufferImage_New__SWIG_2(width, height), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public FrameBufferImage (uint width) : this (NDalicPINVOKE.FrameBufferImage_New__SWIG_3(width), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public FrameBufferImage(uint width) : this(NDalicPINVOKE.FrameBufferImage_New__SWIG_3(width), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public FrameBufferImage () : this (NDalicPINVOKE.FrameBufferImage_New__SWIG_4(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public FrameBufferImage() : this(NDalicPINVOKE.FrameBufferImage_New__SWIG_4(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public FrameBufferImage (NativeImageInterface image) : this (NDalicPINVOKE.FrameBufferImage_New__SWIG_5(NativeImageInterface.getCPtr(image)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public FrameBufferImage(NativeImageInterface image) : this(NDalicPINVOKE.FrameBufferImage_New__SWIG_5(NativeImageInterface.getCPtr(image)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public new static FrameBufferImage DownCast(BaseHandle handle) { - FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.FrameBufferImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + } + public new static FrameBufferImage DownCast(BaseHandle handle) + { + FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.FrameBufferImage_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public FrameBufferImage(FrameBufferImage handle) : this(NDalicPINVOKE.new_FrameBufferImage__SWIG_1(FrameBufferImage.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public FrameBufferImage(FrameBufferImage handle) : this(NDalicPINVOKE.new_FrameBufferImage__SWIG_1(FrameBufferImage.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public FrameBufferImage Assign(FrameBufferImage rhs) { - FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.FrameBufferImage_Assign(swigCPtr, FrameBufferImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public FrameBufferImage Assign(FrameBufferImage rhs) + { + FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.FrameBufferImage_Assign(swigCPtr, FrameBufferImage.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + } } diff --git a/src/Tizen.NUI/src/internal/GaussianBlurView.cs b/src/Tizen.NUI/src/internal/GaussianBlurView.cs old mode 100644 new mode 100755 index 3bdb410..3eb587a --- a/src/Tizen.NUI/src/internal/GaussianBlurView.cs +++ b/src/Tizen.NUI/src/internal/GaussianBlurView.cs @@ -26,209 +26,246 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + using System; + using System.Runtime.InteropServices; + -using System; -using System.Runtime.InteropServices; + internal class GaussianBlurView : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal GaussianBlurView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GaussianBlurView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + // By default, we do not want the position to use the anchor point + PositionUsesAnchorPoint = false; + } - internal class GaussianBlurView : View { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal GaussianBlurView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GaussianBlurView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_GaussianBlurView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_GaussianBlurView(swigCPtr); + public class FinishedEventArgs : EventArgs + { + private GaussianBlurView _gaussianBlurView; + + public GaussianBlurView GaussianBlurView + { + get + { + return _gaussianBlurView; + } + set + { + _gaussianBlurView = value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FinishedEventCallbackDelegate(IntPtr application); + private DaliEventHandler _gaussianFinishedEventHandler; + private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate; + public event DaliEventHandler Finished + { + add + { + lock (this) + { + // Restricted to only one listener + if (_gaussianFinishedEventHandler == null) + { + _gaussianFinishedEventHandler += value; + + _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished); + this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_gaussianFinishedEventHandler != null) + { + this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate); + } + + _gaussianFinishedEventHandler -= value; + } + } + } + // Callback for GaussianBlurView FinishedSignal + private void OnFinished(IntPtr data) + { + FinishedEventArgs e = new FinishedEventArgs(); -public class FinishedEventArgs : EventArgs -{ - private GaussianBlurView _gaussianBlurView; - - public GaussianBlurView GaussianBlurView - { - get - { - return _gaussianBlurView; - } - set - { - _gaussianBlurView = value; - } - } -} + // Populate all members of "e" (FinishedEventArgs) with real data + e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FinishedEventCallbackDelegate(IntPtr application); - private DaliEventHandler _gaussianFinishedEventHandler; - private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate; - - public event DaliEventHandler Finished - { - add - { - lock(this) - { - // Restricted to only one listener - if (_gaussianFinishedEventHandler == null) - { - _gaussianFinishedEventHandler += value; - - _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished); - this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_gaussianFinishedEventHandler != null) - { - this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate); - } - - _gaussianFinishedEventHandler -= value; - } - } - } - - // Callback for GaussianBlurView FinishedSignal - private void OnFinished(IntPtr data) - { - FinishedEventArgs e = new FinishedEventArgs(); - - // Populate all members of "e" (FinishedEventArgs) with real data - e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data); - - if (_gaussianFinishedEventHandler != null) - { - //here we send all data to user event handlers - _gaussianFinishedEventHandler(this, e); - } - } - - public static GaussianBlurView GetGaussianBlurViewFromPtr(global::System.IntPtr cPtr) { - GaussianBlurView ret = new GaussianBlurView(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public GaussianBlurView () : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public GaussianBlurView (uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale, bool blurUserImage) : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_1(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale, blurUserImage), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public GaussianBlurView (uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale) : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_2(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public GaussianBlurView(GaussianBlurView handle) : this(NDalicPINVOKE.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public GaussianBlurView Assign(GaussianBlurView ZoomView) { - GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_Assign(swigCPtr, GaussianBlurView.getCPtr(ZoomView)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static GaussianBlurView DownCast(BaseHandle handle) { - GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new void Add(View child) { - NDalicPINVOKE.GaussianBlurView_Add(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new void Remove(View child) { - NDalicPINVOKE.GaussianBlurView_Remove(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Activate() { - NDalicPINVOKE.GaussianBlurView_Activate(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ActivateOnce() { - NDalicPINVOKE.GaussianBlurView_ActivateOnce(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Deactivate() { - NDalicPINVOKE.GaussianBlurView_Deactivate(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget) { - NDalicPINVOKE.GaussianBlurView_SetUserImageAndOutputRenderTarget(swigCPtr, Image.getCPtr(inputImage), FrameBufferImage.getCPtr(outputRenderTarget)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int GetBlurStrengthPropertyIndex() { - int ret = NDalicPINVOKE.GaussianBlurView_GetBlurStrengthPropertyIndex(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public FrameBufferImage GetBlurredRenderTarget() { - FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.GaussianBlurView_GetBlurredRenderTarget(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new void SetBackgroundColor(Vector4 color) { - NDalicPINVOKE.GaussianBlurView_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new Vector4 GetBackgroundColor() { - Vector4 ret = new Vector4(NDalicPINVOKE.GaussianBlurView_GetBackgroundColor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public GaussianBlurViewSignal FinishedSignal() { - GaussianBlurViewSignal ret = new GaussianBlurViewSignal(NDalicPINVOKE.GaussianBlurView_FinishedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + if (_gaussianFinishedEventHandler != null) + { + //here we send all data to user event handlers + _gaussianFinishedEventHandler(this, e); + } + } -} + public static GaussianBlurView GetGaussianBlurViewFromPtr(global::System.IntPtr cPtr) + { + GaussianBlurView ret = new GaussianBlurView(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + public GaussianBlurView() : this(NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public GaussianBlurView(uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale, bool blurUserImage) : this(NDalicPINVOKE.GaussianBlurView_New__SWIG_1(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale, blurUserImage), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public GaussianBlurView(uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale) : this(NDalicPINVOKE.GaussianBlurView_New__SWIG_2(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public GaussianBlurView(GaussianBlurView handle) : this(NDalicPINVOKE.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public GaussianBlurView Assign(GaussianBlurView ZoomView) + { + GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_Assign(swigCPtr, GaussianBlurView.getCPtr(ZoomView)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static GaussianBlurView DownCast(BaseHandle handle) + { + GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new void Add(View child) + { + NDalicPINVOKE.GaussianBlurView_Add(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new void Remove(View child) + { + NDalicPINVOKE.GaussianBlurView_Remove(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Activate() + { + NDalicPINVOKE.GaussianBlurView_Activate(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ActivateOnce() + { + NDalicPINVOKE.GaussianBlurView_ActivateOnce(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Deactivate() + { + NDalicPINVOKE.GaussianBlurView_Deactivate(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget) + { + NDalicPINVOKE.GaussianBlurView_SetUserImageAndOutputRenderTarget(swigCPtr, Image.getCPtr(inputImage), FrameBufferImage.getCPtr(outputRenderTarget)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int GetBlurStrengthPropertyIndex() + { + int ret = NDalicPINVOKE.GaussianBlurView_GetBlurStrengthPropertyIndex(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public FrameBufferImage GetBlurredRenderTarget() + { + FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.GaussianBlurView_GetBlurredRenderTarget(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new void SetBackgroundColor(Vector4 color) + { + NDalicPINVOKE.GaussianBlurView_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new Vector4 GetBackgroundColor() + { + Vector4 ret = new Vector4(NDalicPINVOKE.GaussianBlurView_GetBackgroundColor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public GaussianBlurViewSignal FinishedSignal() + { + GaussianBlurViewSignal ret = new GaussianBlurViewSignal(NDalicPINVOKE.GaussianBlurView_FinishedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs b/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs old mode 100644 new mode 100755 index eab9881..ab19d51 --- a/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs +++ b/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class GaussianBlurViewSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class GaussianBlurViewSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal GaussianBlurViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal GaussianBlurViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurViewSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurViewSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~GaussianBlurViewSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_GaussianBlurViewSignal(swigCPtr); + ~GaussianBlurViewSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.GaussianBlurViewSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_GaussianBlurViewSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.GaussianBlurViewSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.GaussianBlurViewSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.GaussianBlurViewSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.GaussianBlurViewSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.GaussianBlurViewSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(GaussianBlurView arg) { - NDalicPINVOKE.GaussianBlurViewSignal_Emit(swigCPtr, GaussianBlurView.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.GaussianBlurViewSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public GaussianBlurViewSignal() : this(NDalicPINVOKE.new_GaussianBlurViewSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.GaussianBlurViewSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(GaussianBlurView arg) + { + NDalicPINVOKE.GaussianBlurViewSignal_Emit(swigCPtr, GaussianBlurView.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public GaussianBlurViewSignal() : this(NDalicPINVOKE.new_GaussianBlurViewSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Geometry.cs b/src/Tizen.NUI/src/internal/Geometry.cs old mode 100644 new mode 100755 index 6f1e427..f070d1c --- a/src/Tizen.NUI/src/internal/Geometry.cs +++ b/src/Tizen.NUI/src/internal/Geometry.cs @@ -24,102 +24,129 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Geometry : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Geometry : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Geometry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Geometry_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Geometry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Geometry_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Geometry obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Geometry obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Geometry(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public Geometry() : this(NDalicPINVOKE.Geometry_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Geometry(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public Geometry () : this (NDalicPINVOKE.Geometry_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Geometry(Geometry handle) : this(NDalicPINVOKE.new_Geometry__SWIG_1(Geometry.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static Geometry DownCast(BaseHandle handle) { - Geometry ret = new Geometry(NDalicPINVOKE.Geometry_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Geometry Assign(Geometry handle) { - Geometry ret = new Geometry(NDalicPINVOKE.Geometry_Assign(swigCPtr, Geometry.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint AddVertexBuffer(PropertyBuffer vertexBuffer) { - uint ret = NDalicPINVOKE.Geometry_AddVertexBuffer(swigCPtr, PropertyBuffer.getCPtr(vertexBuffer)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetNumberOfVertexBuffers() { - uint ret = NDalicPINVOKE.Geometry_GetNumberOfVertexBuffers(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void RemoveVertexBuffer(uint index) { - NDalicPINVOKE.Geometry_RemoveVertexBuffer(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetIndexBuffer(ushort[] indices, uint count) { - NDalicPINVOKE.Geometry_SetIndexBuffer(swigCPtr, indices, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetType(Geometry.Type geometryType) { - NDalicPINVOKE.Geometry_SetType(swigCPtr, (int)geometryType); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Geometry.Type GetType() { - Geometry.Type ret = (Geometry.Type)NDalicPINVOKE.Geometry_GetType(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum Type { - POINTS, - LINES, - LINE_LOOP, - LINE_STRIP, - TRIANGLES, - TRIANGLE_FAN, - TRIANGLE_STRIP - } + public Geometry(Geometry handle) : this(NDalicPINVOKE.new_Geometry__SWIG_1(Geometry.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public static Geometry DownCast(BaseHandle handle) + { + Geometry ret = new Geometry(NDalicPINVOKE.Geometry_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Geometry Assign(Geometry handle) + { + Geometry ret = new Geometry(NDalicPINVOKE.Geometry_Assign(swigCPtr, Geometry.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint AddVertexBuffer(PropertyBuffer vertexBuffer) + { + uint ret = NDalicPINVOKE.Geometry_AddVertexBuffer(swigCPtr, PropertyBuffer.getCPtr(vertexBuffer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetNumberOfVertexBuffers() + { + uint ret = NDalicPINVOKE.Geometry_GetNumberOfVertexBuffers(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void RemoveVertexBuffer(uint index) + { + NDalicPINVOKE.Geometry_RemoveVertexBuffer(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetIndexBuffer(ushort[] indices, uint count) + { + NDalicPINVOKE.Geometry_SetIndexBuffer(swigCPtr, indices, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetType(Geometry.Type geometryType) + { + NDalicPINVOKE.Geometry_SetType(swigCPtr, (int)geometryType); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Geometry.Type GetType() + { + Geometry.Type ret = (Geometry.Type)NDalicPINVOKE.Geometry_GetType(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum Type + { + POINTS, + LINES, + LINE_LOOP, + LINE_STRIP, + TRIANGLES, + TRIANGLE_FAN, + TRIANGLE_STRIP + } + + } } diff --git a/src/Tizen.NUI/src/internal/GestureDetector.cs b/src/Tizen.NUI/src/internal/GestureDetector.cs old mode 100644 new mode 100755 index 9ce4627..28f84bf --- a/src/Tizen.NUI/src/internal/GestureDetector.cs +++ b/src/Tizen.NUI/src/internal/GestureDetector.cs @@ -8,86 +8,111 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - public class GestureDetector : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal GestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GestureDetector_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GestureDetector obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } +namespace Tizen.NUI +{ + using Tizen.NUI.BaseComponents; + public class GestureDetector : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal GestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GestureDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_GestureDetector(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GestureDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public GestureDetector() : this(NDalicPINVOKE.new_GestureDetector__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new static GestureDetector DownCast(BaseHandle handle) { - GestureDetector ret = new GestureDetector(NDalicPINVOKE.GestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public GestureDetector(GestureDetector handle) : this(NDalicPINVOKE.new_GestureDetector__SWIG_1(GestureDetector.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public GestureDetector Assign(GestureDetector rhs) { - GestureDetector ret = new GestureDetector(NDalicPINVOKE.GestureDetector_Assign(swigCPtr, GestureDetector.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Attach(View view) { - NDalicPINVOKE.GestureDetector_Attach(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Detach(View view) { - NDalicPINVOKE.GestureDetector_Detach(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void DetachAll() { - NDalicPINVOKE.GestureDetector_DetachAll(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetAttachedActorCount() { - uint ret = NDalicPINVOKE.GestureDetector_GetAttachedActorCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetAttachedActor(uint index) { - View ret = new View(NDalicPINVOKE.GestureDetector_GetAttachedActor(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_GestureDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public GestureDetector() : this(NDalicPINVOKE.new_GestureDetector__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new static GestureDetector DownCast(BaseHandle handle) + { + GestureDetector ret = new GestureDetector(NDalicPINVOKE.GestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public GestureDetector(GestureDetector handle) : this(NDalicPINVOKE.new_GestureDetector__SWIG_1(GestureDetector.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public GestureDetector Assign(GestureDetector rhs) + { + GestureDetector ret = new GestureDetector(NDalicPINVOKE.GestureDetector_Assign(swigCPtr, GestureDetector.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Attach(View view) + { + NDalicPINVOKE.GestureDetector_Attach(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Detach(View view) + { + NDalicPINVOKE.GestureDetector_Detach(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void DetachAll() + { + NDalicPINVOKE.GestureDetector_DetachAll(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetAttachedActorCount() + { + uint ret = NDalicPINVOKE.GestureDetector_GetAttachedActorCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public View GetAttachedActor(uint index) + { + View ret = new View(NDalicPINVOKE.GestureDetector_GetAttachedActor(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/HoverSignal.cs b/src/Tizen.NUI/src/internal/HoverSignal.cs old mode 100644 new mode 100755 index 8be4e0c..4da4f54 --- a/src/Tizen.NUI/src/internal/HoverSignal.cs +++ b/src/Tizen.NUI/src/internal/HoverSignal.cs @@ -8,83 +8,137 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; -internal class HoverSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class HoverSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal HoverSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal HoverSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(HoverSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(HoverSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~HoverSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ActorHoverSignal(swigCPtr); + ~HoverSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ActorHoverSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ActorHoverSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ActorHoverSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorHoverSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ActorHoverSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorHoverSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ActorHoverSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public bool Emit(View arg1, Hover arg2) { - bool ret = NDalicPINVOKE.ActorHoverSignal_Emit(swigCPtr, View.getCPtr(arg1), Hover.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorHoverSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public HoverSignal() : this(NDalicPINVOKE.new_ActorHoverSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorHoverSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public bool Emit(View arg1, Hover arg2) + { + bool ret = NDalicPINVOKE.ActorHoverSignal_Emit(swigCPtr, View.getCPtr(arg1), Hover.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public HoverSignal() : this(NDalicPINVOKE.new_ActorHoverSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Image.cs b/src/Tizen.NUI/src/internal/Image.cs old mode 100644 new mode 100755 index d1001c6..b133b54 --- a/src/Tizen.NUI/src/internal/Image.cs +++ b/src/Tizen.NUI/src/internal/Image.cs @@ -8,171 +8,195 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + using System; + using System.Runtime.InteropServices; + -using System; -using System.Runtime.InteropServices; + internal class Image : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal Image(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Image_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class Image : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Image obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal Image(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Image_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Image(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Image obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Image(swigCPtr); + /** + * @brief Event arguments that passed via Uploaded signal + * + */ + public class UploadedEventArgs : EventArgs + { + private Image _image; + /** + * @brief Image - is the image data that gets uploaded to GL. + * + */ + public Image Image + { + get + { + return _image; + } + set + { + _image = value; + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void UploadedEventCallbackDelegate(IntPtr image); + private DaliEventHandler _imageUploadedEventHandler; + private UploadedEventCallbackDelegate _imageUploadedEventCallbackDelegate; + + /** + * @brief Event for Uploaded signal which can be used to subscribe/unsubscribe the event handler + * (in the type of UploadedEventHandler-DaliEventHandler) + * provided by the user. Uploaded signal is emitted when the image data gets uploaded to GL. + */ + public event DaliEventHandler Uploaded + { + add + { + lock (this) + { + // Restricted to only one listener + if (_imageUploadedEventHandler == null) + { + _imageUploadedEventHandler += value; + + _imageUploadedEventCallbackDelegate = new UploadedEventCallbackDelegate(OnUploaded); + this.UploadedSignal().Connect(_imageUploadedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_imageUploadedEventHandler != null) + { + this.UploadedSignal().Disconnect(_imageUploadedEventCallbackDelegate); + } + + _imageUploadedEventHandler -= value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + // Callback for Image UploadedSignal + private void OnUploaded(IntPtr data) + { + UploadedEventArgs e = new UploadedEventArgs(); + // Populate all members of "e" (UploadedEventArgs) with real data + e.Image = Image.GetImageFromPtr(data); + if (_imageUploadedEventHandler != null) + { + //here we send all data to user event handlers + _imageUploadedEventHandler(this, e); + } + } -/** - * @brief Event arguments that passed via Uploaded signal - * - */ -public class UploadedEventArgs : EventArgs -{ - private Image _image; - /** - * @brief Image - is the image data that gets uploaded to GL. - * - */ - public Image Image - { - get - { - return _image; - } - set - { - _image = value; - } - } -} - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void UploadedEventCallbackDelegate(IntPtr image); - private DaliEventHandler _imageUploadedEventHandler; - private UploadedEventCallbackDelegate _imageUploadedEventCallbackDelegate; - - /** - * @brief Event for Uploaded signal which can be used to subscribe/unsubscribe the event handler - * (in the type of UploadedEventHandler-DaliEventHandler) - * provided by the user. Uploaded signal is emitted when the image data gets uploaded to GL. - */ - public event DaliEventHandler Uploaded - { - add - { - lock(this) + public static Image GetImageFromPtr(global::System.IntPtr cPtr) { - // Restricted to only one listener - if (_imageUploadedEventHandler == null) - { - _imageUploadedEventHandler += value; - - _imageUploadedEventCallbackDelegate = new UploadedEventCallbackDelegate(OnUploaded); - this.UploadedSignal().Connect(_imageUploadedEventCallbackDelegate); - } + Image ret = new Image(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + + public Image() : this(NDalicPINVOKE.new_Image__SWIG_0(), true) { - if (_imageUploadedEventHandler != null) - { - this.UploadedSignal().Disconnect(_imageUploadedEventCallbackDelegate); - } + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _imageUploadedEventHandler -= value; + public Image(Image handle) : this(NDalicPINVOKE.new_Image__SWIG_1(Image.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } - - // Callback for Image UploadedSignal - private void OnUploaded(IntPtr data) - { - UploadedEventArgs e = new UploadedEventArgs(); - - // Populate all members of "e" (UploadedEventArgs) with real data - e.Image = Image.GetImageFromPtr(data); - - if (_imageUploadedEventHandler != null) - { - //here we send all data to user event handlers - _imageUploadedEventHandler(this, e); - } - } - - -public static Image GetImageFromPtr(global::System.IntPtr cPtr) { - Image ret = new Image(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public Image() : this(NDalicPINVOKE.new_Image__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Image(Image handle) : this(NDalicPINVOKE.new_Image__SWIG_1(Image.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Image Assign(Image rhs) { - Image ret = new Image(NDalicPINVOKE.Image_Assign(swigCPtr, Image.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Image DownCast(BaseHandle handle) { - Image ret = new Image(NDalicPINVOKE.Image_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetWidth() { - uint ret = NDalicPINVOKE.Image_GetWidth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetHeight() { - uint ret = NDalicPINVOKE.Image_GetHeight(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ImageSignal UploadedSignal() { - ImageSignal ret = new ImageSignal(NDalicPINVOKE.Image_UploadedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public Image Assign(Image rhs) + { + Image ret = new Image(NDalicPINVOKE.Image_Assign(swigCPtr, Image.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Image DownCast(BaseHandle handle) + { + Image ret = new Image(NDalicPINVOKE.Image_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetWidth() + { + uint ret = NDalicPINVOKE.Image_GetWidth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetHeight() + { + uint ret = NDalicPINVOKE.Image_GetHeight(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ImageSignal UploadedSignal() + { + ImageSignal ret = new ImageSignal(NDalicPINVOKE.Image_UploadedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/ImageSignal.cs b/src/Tizen.NUI/src/internal/ImageSignal.cs old mode 100644 new mode 100755 index b9050ed..078d989 --- a/src/Tizen.NUI/src/internal/ImageSignal.cs +++ b/src/Tizen.NUI/src/internal/ImageSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ImageSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ImageSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ImageSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ImageSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImageSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImageSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ImageSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ImageSignal(swigCPtr); + ~ImageSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ImageSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ImageSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ImageSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ImageSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ImageSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ImageSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ImageSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(Image arg) { - NDalicPINVOKE.ImageSignal_Emit(swigCPtr, Image.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ImageSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public ImageSignal() : this(NDalicPINVOKE.new_ImageSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ImageSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(Image arg) + { + NDalicPINVOKE.ImageSignal_Emit(swigCPtr, Image.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ImageSignal() : this(NDalicPINVOKE.new_ImageSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ImfManager.cs b/src/Tizen.NUI/src/internal/ImfManager.cs old mode 100644 new mode 100755 index b09c830..3f6f011 --- a/src/Tizen.NUI/src/internal/ImfManager.cs +++ b/src/Tizen.NUI/src/internal/ImfManager.cs @@ -28,27 +28,36 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - ~ImfManager() + protected override void Dispose(DisposeTypes type) { - Dispose(); - } + if (disposed) + { + return; + } - public override void Dispose() - { - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfManager(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } public class ImfEventData : global::System.IDisposable @@ -67,31 +76,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ImfEventData() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true) @@ -182,31 +230,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ImfCallbackData() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true) @@ -570,7 +657,7 @@ namespace Tizen.NUI private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data); private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback; - + private event EventHandler _imfManagerEventReceivedEventHandler; public event EventHandler ImfManagerEventReceived { @@ -844,31 +931,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ActivatedSignalType() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ActivatedSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ActivatedSignalType(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public bool Empty() @@ -933,31 +1059,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ImfEventSignalType() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - public virtual void Dispose() + protected virtual void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfEventSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfEventSignalType(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public bool Empty() @@ -1022,31 +1187,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~StatusSignalType() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_StatusSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_StatusSignalType(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public bool Empty() @@ -1111,31 +1315,70 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ImfVoidSignalType() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfVoidSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfVoidSignalType(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public bool Empty() diff --git a/src/Tizen.NUI/src/internal/Item.cs b/src/Tizen.NUI/src/internal/Item.cs old mode 100644 new mode 100755 index 5f15536..32022ea --- a/src/Tizen.NUI/src/internal/Item.cs +++ b/src/Tizen.NUI/src/internal/Item.cs @@ -8,80 +8,137 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - public class Item : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Item(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Item obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Item() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public class Item : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Item(swigCPtr); + internal Item(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Item() : this(NDalicPINVOKE.new_Item__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Item(uint t, View u) : this(NDalicPINVOKE.new_Item__SWIG_1(t, View.getCPtr(u)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Item(Item p) : this(NDalicPINVOKE.new_Item__SWIG_2(Item.getCPtr(p)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint first { - set { - NDalicPINVOKE.Item_first_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - uint ret = NDalicPINVOKE.Item_first_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public View second { - set { - NDalicPINVOKE.Item_second_set(swigCPtr, View.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.Item_second_get(swigCPtr); - View ret = (cPtr == global::System.IntPtr.Zero) ? null : new View(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Item obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Item() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Item(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Item() : this(NDalicPINVOKE.new_Item__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Item(uint t, View u) : this(NDalicPINVOKE.new_Item__SWIG_1(t, View.getCPtr(u)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Item(Item p) : this(NDalicPINVOKE.new_Item__SWIG_2(Item.getCPtr(p)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint first + { + set + { + NDalicPINVOKE.Item_first_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + uint ret = NDalicPINVOKE.Item_first_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public View second + { + set + { + NDalicPINVOKE.Item_second_set(swigCPtr, View.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Item_second_get(swigCPtr); + View ret = (cPtr == global::System.IntPtr.Zero) ? null : new View(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/ItemContainer.cs b/src/Tizen.NUI/src/internal/ItemContainer.cs old mode 100644 new mode 100755 index 98d7ff9..e6d59f5 --- a/src/Tizen.NUI/src/internal/ItemContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemContainer.cs @@ -8,313 +8,412 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ public class ItemContainer : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ItemContainer(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemContainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~ItemContainer() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ItemContainer(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemContainer(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemContainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public ItemContainer(global::System.Collections.ICollection c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (Item element in c) { - this.Add(element); - } - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public bool IsFixedSize { - get { - return false; - } - } - public bool IsReadOnly { - get { - return false; - } - } + ~ItemContainer() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public Item this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemContainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public int Count { - get { - return (int)size(); - } - } + public ItemContainer(global::System.Collections.ICollection c) : this() + { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (Item element in c) + { + this.Add(element); + } + } - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(Item[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(Item[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, Item[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new ItemContainerEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new ItemContainerEnumerator(this); - } - - public ItemContainerEnumerator GetEnumerator() { - return new ItemContainerEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class ItemContainerEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private ItemContainer collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public ItemContainerEnumerator(ItemContainer collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } + public bool IsFixedSize + { + get + { + return false; + } + } - // Type-safe iterator Current - public Item Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (Item)currentObject; - } - } + public bool IsReadOnly + { + get + { + return false; + } + } - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } + public Item this[int index] + { + get + { + return getitem(index); + } + set + { + setitem(index, value); + } + } - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } + public int Capacity + { + get + { + return (int)capacity(); + } + set + { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } + public int Count + { + get + { + return (int)size(); + } + } - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - NDalicPINVOKE.ItemContainer_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(Item x) { - NDalicPINVOKE.ItemContainer_Add(swigCPtr, Item.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = NDalicPINVOKE.ItemContainer_size(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = NDalicPINVOKE.ItemContainer_capacity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - NDalicPINVOKE.ItemContainer_reserve(swigCPtr, n); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemContainer() : this(NDalicPINVOKE.new_ItemContainer__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemContainer(ItemContainer other) : this(NDalicPINVOKE.new_ItemContainer__SWIG_1(ItemContainer.getCPtr(other)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemContainer(int capacity) : this(NDalicPINVOKE.new_ItemContainer__SWIG_2(capacity), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private Item getitemcopy(int index) { - Item ret = new Item(NDalicPINVOKE.ItemContainer_getitemcopy(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Item getitem(int index) { - Item ret = new Item(NDalicPINVOKE.ItemContainer_getitem(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, Item val) { - NDalicPINVOKE.ItemContainer_setitem(swigCPtr, index, Item.getCPtr(val)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(ItemContainer values) { - NDalicPINVOKE.ItemContainer_AddRange(swigCPtr, ItemContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemContainer GetRange(int index, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.ItemContainer_GetRange(swigCPtr, index, count); - ItemContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, Item x) { - NDalicPINVOKE.ItemContainer_Insert(swigCPtr, index, Item.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, ItemContainer values) { - NDalicPINVOKE.ItemContainer_InsertRange(swigCPtr, index, ItemContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - NDalicPINVOKE.ItemContainer_RemoveAt(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - NDalicPINVOKE.ItemContainer_RemoveRange(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static ItemContainer Repeat(Item value, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.ItemContainer_Repeat(Item.getCPtr(value), count); - ItemContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - NDalicPINVOKE.ItemContainer_Reverse__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - NDalicPINVOKE.ItemContainer_Reverse__SWIG_1(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, ItemContainer values) { - NDalicPINVOKE.ItemContainer_SetRange(swigCPtr, index, ItemContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public bool IsSynchronized + { + get + { + return false; + } + } -} + public void CopyTo(Item[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(Item[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, Item[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index + count > this.Count || arrayIndex + count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i = 0; i < count; i++) + array.SetValue(getitemcopy(index + i), arrayIndex + i); + } + + global::System.Collections.Generic.IEnumerator global::System.Collections.Generic.IEnumerable.GetEnumerator() + { + return new ItemContainerEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() + { + return new ItemContainerEnumerator(this); + } + + public ItemContainerEnumerator GetEnumerator() + { + return new ItemContainerEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class ItemContainerEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private ItemContainer collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public ItemContainerEnumerator(ItemContainer collection) + { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public Item Current + { + get + { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (Item)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current + { + get + { + return Current; + } + } + + public bool MoveNext() + { + int size = collectionRef.Count; + bool moveOkay = (currentIndex + 1 < size) && (size == currentSize); + if (moveOkay) + { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } + else + { + currentObject = null; + } + return moveOkay; + } + + public void Reset() + { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) + { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() + { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() + { + NDalicPINVOKE.ItemContainer_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(Item x) + { + NDalicPINVOKE.ItemContainer_Add(swigCPtr, Item.getCPtr(x)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() + { + uint ret = NDalicPINVOKE.ItemContainer_size(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() + { + uint ret = NDalicPINVOKE.ItemContainer_capacity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) + { + NDalicPINVOKE.ItemContainer_reserve(swigCPtr, n); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemContainer() : this(NDalicPINVOKE.new_ItemContainer__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemContainer(ItemContainer other) : this(NDalicPINVOKE.new_ItemContainer__SWIG_1(ItemContainer.getCPtr(other)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemContainer(int capacity) : this(NDalicPINVOKE.new_ItemContainer__SWIG_2(capacity), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private Item getitemcopy(int index) + { + Item ret = new Item(NDalicPINVOKE.ItemContainer_getitemcopy(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Item getitem(int index) + { + Item ret = new Item(NDalicPINVOKE.ItemContainer_getitem(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, Item val) + { + NDalicPINVOKE.ItemContainer_setitem(swigCPtr, index, Item.getCPtr(val)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(ItemContainer values) + { + NDalicPINVOKE.ItemContainer_AddRange(swigCPtr, ItemContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemContainer GetRange(int index, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ItemContainer_GetRange(swigCPtr, index, count); + ItemContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, Item x) + { + NDalicPINVOKE.ItemContainer_Insert(swigCPtr, index, Item.getCPtr(x)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, ItemContainer values) + { + NDalicPINVOKE.ItemContainer_InsertRange(swigCPtr, index, ItemContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) + { + NDalicPINVOKE.ItemContainer_RemoveAt(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) + { + NDalicPINVOKE.ItemContainer_RemoveRange(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static ItemContainer Repeat(Item value, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ItemContainer_Repeat(Item.getCPtr(value), count); + ItemContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() + { + NDalicPINVOKE.ItemContainer_Reverse__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) + { + NDalicPINVOKE.ItemContainer_Reverse__SWIG_1(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, ItemContainer values) + { + NDalicPINVOKE.ItemContainer_SetRange(swigCPtr, index, ItemContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ItemFactory.cs b/src/Tizen.NUI/src/internal/ItemFactory.cs old mode 100644 new mode 100755 index 47e6aea..c319f7f --- a/src/Tizen.NUI/src/internal/ItemFactory.cs +++ b/src/Tizen.NUI/src/internal/ItemFactory.cs @@ -32,34 +32,71 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ItemFactory() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemFactory(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemFactory(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } + disposed = true; + } public virtual uint GetNumberOfItems() { diff --git a/src/Tizen.NUI/src/internal/ItemIdContainer.cs b/src/Tizen.NUI/src/internal/ItemIdContainer.cs old mode 100644 new mode 100755 index adcb579..d21e712 --- a/src/Tizen.NUI/src/internal/ItemIdContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemIdContainer.cs @@ -8,338 +8,440 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ public class ItemIdContainer : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IList - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ItemIdContainer(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemIdContainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~ItemIdContainer() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ItemIdContainer(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemIdContainer(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemIdContainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public ItemIdContainer(global::System.Collections.ICollection c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (uint element in c) { - this.Add(element); - } - } - public bool IsFixedSize { - get { - return false; - } - } + ~ItemIdContainer() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public bool IsReadOnly { - get { - return false; - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public uint this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemIdContainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } + public ItemIdContainer(global::System.Collections.ICollection c) : this() + { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (uint element in c) + { + this.Add(element); + } + } - public int Count { - get { - return (int)size(); - } - } + public bool IsFixedSize + { + get + { + return false; + } + } - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(uint[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(uint[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, uint[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new ItemIdContainerEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new ItemIdContainerEnumerator(this); - } - - public ItemIdContainerEnumerator GetEnumerator() { - return new ItemIdContainerEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class ItemIdContainerEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private ItemIdContainer collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public ItemIdContainerEnumerator(ItemIdContainer collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } + public bool IsReadOnly + { + get + { + return false; + } + } - // Type-safe iterator Current - public uint Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (uint)currentObject; - } - } + public uint this[int index] + { + get + { + return getitem(index); + } + set + { + setitem(index, value); + } + } - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } + public int Capacity + { + get + { + return (int)capacity(); + } + set + { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } + public int Count + { + get + { + return (int)size(); + } + } - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } + public bool IsSynchronized + { + get + { + return false; + } + } - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - NDalicPINVOKE.ItemIdContainer_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(uint x) { - NDalicPINVOKE.ItemIdContainer_Add(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = NDalicPINVOKE.ItemIdContainer_size(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = NDalicPINVOKE.ItemIdContainer_capacity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - NDalicPINVOKE.ItemIdContainer_reserve(swigCPtr, n); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemIdContainer() : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemIdContainer(ItemIdContainer other) : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_1(ItemIdContainer.getCPtr(other)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemIdContainer(int capacity) : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_2(capacity), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint getitemcopy(int index) { - uint ret = NDalicPINVOKE.ItemIdContainer_getitemcopy(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint getitem(int index) { - uint ret = NDalicPINVOKE.ItemIdContainer_getitem(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, uint val) { - NDalicPINVOKE.ItemIdContainer_setitem(swigCPtr, index, val); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(ItemIdContainer values) { - NDalicPINVOKE.ItemIdContainer_AddRange(swigCPtr, ItemIdContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemIdContainer GetRange(int index, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.ItemIdContainer_GetRange(swigCPtr, index, count); - ItemIdContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemIdContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, uint x) { - NDalicPINVOKE.ItemIdContainer_Insert(swigCPtr, index, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, ItemIdContainer values) { - NDalicPINVOKE.ItemIdContainer_InsertRange(swigCPtr, index, ItemIdContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - NDalicPINVOKE.ItemIdContainer_RemoveAt(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - NDalicPINVOKE.ItemIdContainer_RemoveRange(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static ItemIdContainer Repeat(uint value, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.ItemIdContainer_Repeat(value, count); - ItemIdContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemIdContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - NDalicPINVOKE.ItemIdContainer_Reverse__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - NDalicPINVOKE.ItemIdContainer_Reverse__SWIG_1(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, ItemIdContainer values) { - NDalicPINVOKE.ItemIdContainer_SetRange(swigCPtr, index, ItemIdContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Contains(uint value) { - bool ret = NDalicPINVOKE.ItemIdContainer_Contains(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int IndexOf(uint value) { - int ret = NDalicPINVOKE.ItemIdContainer_IndexOf(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int LastIndexOf(uint value) { - int ret = NDalicPINVOKE.ItemIdContainer_LastIndexOf(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Remove(uint value) { - bool ret = NDalicPINVOKE.ItemIdContainer_Remove(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public void CopyTo(uint[] array) + { + CopyTo(0, array, 0, this.Count); + } -} + public void CopyTo(uint[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, uint[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index + count > this.Count || arrayIndex + count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i = 0; i < count; i++) + array.SetValue(getitemcopy(index + i), arrayIndex + i); + } + + global::System.Collections.Generic.IEnumerator global::System.Collections.Generic.IEnumerable.GetEnumerator() + { + return new ItemIdContainerEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() + { + return new ItemIdContainerEnumerator(this); + } + + public ItemIdContainerEnumerator GetEnumerator() + { + return new ItemIdContainerEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class ItemIdContainerEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private ItemIdContainer collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public ItemIdContainerEnumerator(ItemIdContainer collection) + { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public uint Current + { + get + { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (uint)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current + { + get + { + return Current; + } + } + + public bool MoveNext() + { + int size = collectionRef.Count; + bool moveOkay = (currentIndex + 1 < size) && (size == currentSize); + if (moveOkay) + { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } + else + { + currentObject = null; + } + return moveOkay; + } + + public void Reset() + { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) + { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() + { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() + { + NDalicPINVOKE.ItemIdContainer_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(uint x) + { + NDalicPINVOKE.ItemIdContainer_Add(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() + { + uint ret = NDalicPINVOKE.ItemIdContainer_size(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() + { + uint ret = NDalicPINVOKE.ItemIdContainer_capacity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) + { + NDalicPINVOKE.ItemIdContainer_reserve(swigCPtr, n); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemIdContainer() : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemIdContainer(ItemIdContainer other) : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_1(ItemIdContainer.getCPtr(other)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemIdContainer(int capacity) : this(NDalicPINVOKE.new_ItemIdContainer__SWIG_2(capacity), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint getitemcopy(int index) + { + uint ret = NDalicPINVOKE.ItemIdContainer_getitemcopy(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint getitem(int index) + { + uint ret = NDalicPINVOKE.ItemIdContainer_getitem(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, uint val) + { + NDalicPINVOKE.ItemIdContainer_setitem(swigCPtr, index, val); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(ItemIdContainer values) + { + NDalicPINVOKE.ItemIdContainer_AddRange(swigCPtr, ItemIdContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemIdContainer GetRange(int index, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ItemIdContainer_GetRange(swigCPtr, index, count); + ItemIdContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemIdContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, uint x) + { + NDalicPINVOKE.ItemIdContainer_Insert(swigCPtr, index, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, ItemIdContainer values) + { + NDalicPINVOKE.ItemIdContainer_InsertRange(swigCPtr, index, ItemIdContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) + { + NDalicPINVOKE.ItemIdContainer_RemoveAt(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) + { + NDalicPINVOKE.ItemIdContainer_RemoveRange(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static ItemIdContainer Repeat(uint value, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ItemIdContainer_Repeat(value, count); + ItemIdContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ItemIdContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() + { + NDalicPINVOKE.ItemIdContainer_Reverse__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) + { + NDalicPINVOKE.ItemIdContainer_Reverse__SWIG_1(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, ItemIdContainer values) + { + NDalicPINVOKE.ItemIdContainer_SetRange(swigCPtr, index, ItemIdContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Contains(uint value) + { + bool ret = NDalicPINVOKE.ItemIdContainer_Contains(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int IndexOf(uint value) + { + int ret = NDalicPINVOKE.ItemIdContainer_IndexOf(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int LastIndexOf(uint value) + { + int ret = NDalicPINVOKE.ItemIdContainer_LastIndexOf(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Remove(uint value) + { + bool ret = NDalicPINVOKE.ItemIdContainer_Remove(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/ItemLayout.cs b/src/Tizen.NUI/src/internal/ItemLayout.cs old mode 100644 new mode 100755 index 188dc6d..2bd2374 --- a/src/Tizen.NUI/src/internal/ItemLayout.cs +++ b/src/Tizen.NUI/src/internal/ItemLayout.cs @@ -10,155 +10,196 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class ItemLayout : RefObject { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class ItemLayout : RefObject + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ItemLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemLayout_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ItemLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemLayout_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemLayout obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemLayout obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemLayout(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemLayout(swigCPtr); + public void SetOrientation(ControlOrientationType orientation) + { + NDalicPINVOKE.ItemLayout_SetOrientation(swigCPtr, (int)orientation); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public void SetOrientation(ControlOrientationType orientation) { - NDalicPINVOKE.ItemLayout_SetOrientation(swigCPtr, (int)orientation); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ControlOrientationType GetOrientation() { - ControlOrientationType ret = (ControlOrientationType)NDalicPINVOKE.ItemLayout_GetOrientation(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetLayoutProperties(PropertyMap properties) { - NDalicPINVOKE.ItemLayout_SetLayoutProperties(swigCPtr, PropertyMap.getCPtr(properties)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PropertyMap GetLayoutProperties() { - PropertyMap ret = new PropertyMap(NDalicPINVOKE.ItemLayout_GetLayoutProperties(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void GetItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize) { - NDalicPINVOKE.ItemLayout_GetItemSize(swigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetItemSize(Vector3 itemSize) { - NDalicPINVOKE.ItemLayout_SetItemSize(swigCPtr, Vector3.getCPtr(itemSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual float GetMinimumLayoutPosition(uint numberOfItems, Vector3 layoutSize) { - float ret = NDalicPINVOKE.ItemLayout_GetMinimumLayoutPosition(swigCPtr, numberOfItems, Vector3.getCPtr(layoutSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetClosestAnchorPosition(float layoutPosition) { - float ret = NDalicPINVOKE.ItemLayout_GetClosestAnchorPosition(swigCPtr, layoutPosition); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetItemScrollToPosition(uint itemId) { - float ret = NDalicPINVOKE.ItemLayout_GetItemScrollToPosition(swigCPtr, itemId); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual ItemRange GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) { - ItemRange ret = new ItemRange(NDalicPINVOKE.ItemLayout_GetItemsWithinArea(swigCPtr, firstItemPosition, Vector3.getCPtr(layoutSize)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetClosestOnScreenLayoutPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize) { - float ret = NDalicPINVOKE.ItemLayout_GetClosestOnScreenLayoutPosition(swigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual uint GetReserveItemCount(Vector3 layoutSize) { - uint ret = NDalicPINVOKE.ItemLayout_GetReserveItemCount(swigCPtr, Vector3.getCPtr(layoutSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void GetDefaultItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize) { - NDalicPINVOKE.ItemLayout_GetDefaultItemSize(swigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual Degree GetScrollDirection() { - Degree ret = new Degree(NDalicPINVOKE.ItemLayout_GetScrollDirection(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetScrollSpeedFactor() { - float ret = NDalicPINVOKE.ItemLayout_GetScrollSpeedFactor(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetMaximumSwipeSpeed() { - float ret = NDalicPINVOKE.ItemLayout_GetMaximumSwipeSpeed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetItemFlickAnimationDuration() { - float ret = NDalicPINVOKE.ItemLayout_GetItemFlickAnimationDuration(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual int GetNextFocusItemID(int itemID, int maxItems, View.FocusDirection direction, bool loopEnabled) { - int ret = NDalicPINVOKE.ItemLayout_GetNextFocusItemID(swigCPtr, itemID, maxItems, (int)direction, loopEnabled); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetFlickSpeedFactor() { - float ret = NDalicPINVOKE.ItemLayout_GetFlickSpeedFactor(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void ApplyConstraints(View view, int itemId, Vector3 layoutSize, View itemView) { - NDalicPINVOKE.ItemLayout_ApplyConstraints(swigCPtr, View.getCPtr(view), itemId, Vector3.getCPtr(layoutSize), View.getCPtr(itemView)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual Vector3 GetItemPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize) { - Vector3 ret = new Vector3(NDalicPINVOKE.ItemLayout_GetItemPosition(swigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public ControlOrientationType GetOrientation() + { + ControlOrientationType ret = (ControlOrientationType)NDalicPINVOKE.ItemLayout_GetOrientation(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetLayoutProperties(PropertyMap properties) + { + NDalicPINVOKE.ItemLayout_SetLayoutProperties(swigCPtr, PropertyMap.getCPtr(properties)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PropertyMap GetLayoutProperties() + { + PropertyMap ret = new PropertyMap(NDalicPINVOKE.ItemLayout_GetLayoutProperties(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void GetItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize) + { + NDalicPINVOKE.ItemLayout_GetItemSize(swigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetItemSize(Vector3 itemSize) + { + NDalicPINVOKE.ItemLayout_SetItemSize(swigCPtr, Vector3.getCPtr(itemSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual float GetMinimumLayoutPosition(uint numberOfItems, Vector3 layoutSize) + { + float ret = NDalicPINVOKE.ItemLayout_GetMinimumLayoutPosition(swigCPtr, numberOfItems, Vector3.getCPtr(layoutSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetClosestAnchorPosition(float layoutPosition) + { + float ret = NDalicPINVOKE.ItemLayout_GetClosestAnchorPosition(swigCPtr, layoutPosition); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetItemScrollToPosition(uint itemId) + { + float ret = NDalicPINVOKE.ItemLayout_GetItemScrollToPosition(swigCPtr, itemId); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual ItemRange GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) + { + ItemRange ret = new ItemRange(NDalicPINVOKE.ItemLayout_GetItemsWithinArea(swigCPtr, firstItemPosition, Vector3.getCPtr(layoutSize)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetClosestOnScreenLayoutPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize) + { + float ret = NDalicPINVOKE.ItemLayout_GetClosestOnScreenLayoutPosition(swigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual uint GetReserveItemCount(Vector3 layoutSize) + { + uint ret = NDalicPINVOKE.ItemLayout_GetReserveItemCount(swigCPtr, Vector3.getCPtr(layoutSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void GetDefaultItemSize(uint itemId, Vector3 layoutSize, Vector3 itemSize) + { + NDalicPINVOKE.ItemLayout_GetDefaultItemSize(swigCPtr, itemId, Vector3.getCPtr(layoutSize), Vector3.getCPtr(itemSize)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual Degree GetScrollDirection() + { + Degree ret = new Degree(NDalicPINVOKE.ItemLayout_GetScrollDirection(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetScrollSpeedFactor() + { + float ret = NDalicPINVOKE.ItemLayout_GetScrollSpeedFactor(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetMaximumSwipeSpeed() + { + float ret = NDalicPINVOKE.ItemLayout_GetMaximumSwipeSpeed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetItemFlickAnimationDuration() + { + float ret = NDalicPINVOKE.ItemLayout_GetItemFlickAnimationDuration(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual int GetNextFocusItemID(int itemID, int maxItems, View.FocusDirection direction, bool loopEnabled) + { + int ret = NDalicPINVOKE.ItemLayout_GetNextFocusItemID(swigCPtr, itemID, maxItems, (int)direction, loopEnabled); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetFlickSpeedFactor() + { + float ret = NDalicPINVOKE.ItemLayout_GetFlickSpeedFactor(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void ApplyConstraints(View view, int itemId, Vector3 layoutSize, View itemView) + { + NDalicPINVOKE.ItemLayout_ApplyConstraints(swigCPtr, View.getCPtr(view), itemId, Vector3.getCPtr(layoutSize), View.getCPtr(itemView)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual Vector3 GetItemPosition(int itemID, float currentLayoutPosition, Vector3 layoutSize) + { + Vector3 ret = new Vector3(NDalicPINVOKE.ItemLayout_GetItemPosition(swigCPtr, itemID, currentLayoutPosition, Vector3.getCPtr(layoutSize)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/ItemRange.cs b/src/Tizen.NUI/src/internal/ItemRange.cs old mode 100644 new mode 100755 index 51e8679..9fe58c4 --- a/src/Tizen.NUI/src/internal/ItemRange.cs +++ b/src/Tizen.NUI/src/internal/ItemRange.cs @@ -8,94 +8,153 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + public class ItemRange : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ItemRange(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - public class ItemRange : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemRange obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal ItemRange(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemRange obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~ItemRange() { - DisposeQueue.Instance.Add(this); - } + ~ItemRange() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemRange(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemRange(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public ItemRange(uint beginItem, uint endItem) : this(NDalicPINVOKE.new_ItemRange__SWIG_0(beginItem, endItem), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemRange(ItemRange copy) : this(NDalicPINVOKE.new_ItemRange__SWIG_1(ItemRange.getCPtr(copy)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemRange Assign(ItemRange range) { - ItemRange ret = new ItemRange(NDalicPINVOKE.ItemRange_Assign(swigCPtr, ItemRange.getCPtr(range)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Within(uint itemId) { - bool ret = NDalicPINVOKE.ItemRange_Within(swigCPtr, itemId); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ItemRange Intersection(ItemRange second) { - ItemRange ret = new ItemRange(NDalicPINVOKE.ItemRange_Intersection(swigCPtr, ItemRange.getCPtr(second)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint begin { - set { - NDalicPINVOKE.ItemRange_begin_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - uint ret = NDalicPINVOKE.ItemRange_begin_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public uint end { - set { - NDalicPINVOKE.ItemRange_end_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - uint ret = NDalicPINVOKE.ItemRange_end_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + + public ItemRange(uint beginItem, uint endItem) : this(NDalicPINVOKE.new_ItemRange__SWIG_0(beginItem, endItem), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemRange(ItemRange copy) : this(NDalicPINVOKE.new_ItemRange__SWIG_1(ItemRange.getCPtr(copy)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ItemRange Assign(ItemRange range) + { + ItemRange ret = new ItemRange(NDalicPINVOKE.ItemRange_Assign(swigCPtr, ItemRange.getCPtr(range)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Within(uint itemId) + { + bool ret = NDalicPINVOKE.ItemRange_Within(swigCPtr, itemId); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ItemRange Intersection(ItemRange second) + { + ItemRange ret = new ItemRange(NDalicPINVOKE.ItemRange_Intersection(swigCPtr, ItemRange.getCPtr(second)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint begin + { + set + { + NDalicPINVOKE.ItemRange_begin_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + uint ret = NDalicPINVOKE.ItemRange_begin_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public uint end + { + set + { + NDalicPINVOKE.ItemRange_end_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + uint ret = NDalicPINVOKE.ItemRange_end_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/ItemView.cs b/src/Tizen.NUI/src/internal/ItemView.cs old mode 100644 new mode 100755 index f3defdc..b29dd55 --- a/src/Tizen.NUI/src/internal/ItemView.cs +++ b/src/Tizen.NUI/src/internal/ItemView.cs @@ -26,482 +26,586 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; - public class ItemView : Scrollable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class ItemView : Scrollable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ItemView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ItemView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ItemView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ItemView() { - DisposeQueue.Instance.Add(this); - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public Tizen.NUI.PropertyArray Layout + { + get + { + Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); + GetProperty(ItemView.Property.LAYOUT).Get(temp); + return temp; + } + set + { + SetProperty(ItemView.Property.LAYOUT, new Tizen.NUI.PropertyValue(value)); + } + } + + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ItemView_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public static readonly int LAYOUT = NDalicManualPINVOKE.ItemView_Property_LAYOUT_get(); + + public Property() : this(NDalicPINVOKE.new_ItemView_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int MINIMUM_SWIPE_SPEED = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_SPEED_get(); + public static readonly int MINIMUM_SWIPE_DISTANCE = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_DISTANCE_get(); + public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ItemView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); + public static readonly int SNAP_TO_ITEM_ENABLED = NDalicPINVOKE.ItemView_Property_SNAP_TO_ITEM_ENABLED_get(); + public static readonly int REFRESH_INTERVAL = NDalicPINVOKE.ItemView_Property_REFRESH_INTERVAL_get(); + public static readonly int LAYOUT_POSITION = NDalicPINVOKE.ItemView_Property_LAYOUT_POSITION_get(); + public static readonly int SCROLL_SPEED = NDalicPINVOKE.ItemView_Property_SCROLL_SPEED_get(); + public static readonly int OVERSHOOT = NDalicPINVOKE.ItemView_Property_OVERSHOOT_get(); + public static readonly int SCROLL_DIRECTION = NDalicPINVOKE.ItemView_Property_SCROLL_DIRECTION_get(); + public static readonly int LAYOUT_ORIENTATION = NDalicPINVOKE.ItemView_Property_LAYOUT_ORIENTATION_get(); + public static readonly int SCROLL_CONTENT_SIZE = NDalicPINVOKE.ItemView_Property_SCROLL_CONTENT_SIZE_get(); - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemView(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public ItemView(ItemFactory factory) : this(NDalicPINVOKE.ItemView_New(ItemFactory.getCPtr(factory)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - public Tizen.NUI.PropertyArray Layout - { - get - { - Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); - GetProperty( ItemView.Property.LAYOUT).Get( temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.LAYOUT, new Tizen.NUI.PropertyValue( value ) ); - } - } - - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ItemView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public static readonly int LAYOUT = NDalicManualPINVOKE.ItemView_Property_LAYOUT_get(); - - public Property() : this(NDalicPINVOKE.new_ItemView_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int MINIMUM_SWIPE_SPEED = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_SPEED_get(); - public static readonly int MINIMUM_SWIPE_DISTANCE = NDalicPINVOKE.ItemView_Property_MINIMUM_SWIPE_DISTANCE_get(); - public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ItemView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); - public static readonly int SNAP_TO_ITEM_ENABLED = NDalicPINVOKE.ItemView_Property_SNAP_TO_ITEM_ENABLED_get(); - public static readonly int REFRESH_INTERVAL = NDalicPINVOKE.ItemView_Property_REFRESH_INTERVAL_get(); - public static readonly int LAYOUT_POSITION = NDalicPINVOKE.ItemView_Property_LAYOUT_POSITION_get(); - public static readonly int SCROLL_SPEED = NDalicPINVOKE.ItemView_Property_SCROLL_SPEED_get(); - public static readonly int OVERSHOOT = NDalicPINVOKE.ItemView_Property_OVERSHOOT_get(); - public static readonly int SCROLL_DIRECTION = NDalicPINVOKE.ItemView_Property_SCROLL_DIRECTION_get(); - public static readonly int LAYOUT_ORIENTATION = NDalicPINVOKE.ItemView_Property_LAYOUT_ORIENTATION_get(); - public static readonly int SCROLL_CONTENT_SIZE = NDalicPINVOKE.ItemView_Property_SCROLL_CONTENT_SIZE_get(); - - } - - public ItemView (ItemFactory factory) : this (NDalicPINVOKE.ItemView_New(ItemFactory.getCPtr(factory)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ItemView(ItemView itemView) : this(NDalicPINVOKE.new_ItemView__SWIG_1(ItemView.getCPtr(itemView)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ItemView Assign(ItemView itemView) { - ItemView ret = new ItemView(NDalicPINVOKE.ItemView_Assign(swigCPtr, ItemView.getCPtr(itemView)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ItemView DownCast(BaseHandle handle) { - ItemView ret = new ItemView(NDalicPINVOKE.ItemView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetLayoutCount() { - uint ret = NDalicPINVOKE.ItemView_GetLayoutCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void AddLayout(ItemLayout layout) { - NDalicPINVOKE.ItemView_AddLayout(swigCPtr, ItemLayout.getCPtr(layout)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveLayout(uint layoutIndex) { - NDalicPINVOKE.ItemView_RemoveLayout(swigCPtr, layoutIndex); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetLayout(uint layoutIndex) { - SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetLayout(swigCPtr, layoutIndex), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetActiveLayout() { - SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetActiveLayout(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float GetCurrentLayoutPosition(uint itemId) { - float ret = NDalicPINVOKE.ItemView_GetCurrentLayoutPosition(swigCPtr, itemId); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void ActivateLayout(uint layoutIndex, Vector3 targetSize, float durationSeconds) { - NDalicPINVOKE.ItemView_ActivateLayout(swigCPtr, layoutIndex, Vector3.getCPtr(targetSize), durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void DeactivateCurrentLayout() { - NDalicPINVOKE.ItemView_DeactivateCurrentLayout(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetMinimumSwipeSpeed(float speed) { - NDalicPINVOKE.ItemView_SetMinimumSwipeSpeed(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetMinimumSwipeSpeed() { - float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeSpeed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMinimumSwipeDistance(float distance) { - NDalicPINVOKE.ItemView_SetMinimumSwipeDistance(swigCPtr, distance); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetMinimumSwipeDistance() { - float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeDistance(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetWheelScrollDistanceStep(float step) { - NDalicPINVOKE.ItemView_SetWheelScrollDistanceStep(swigCPtr, step); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetWheelScrollDistanceStep() { - float ret = NDalicPINVOKE.ItemView_GetWheelScrollDistanceStep(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAnchoring(bool enabled) { - NDalicPINVOKE.ItemView_SetAnchoring(swigCPtr, enabled); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetAnchoring() { - bool ret = NDalicPINVOKE.ItemView_GetAnchoring(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAnchoringDuration(float durationSeconds) { - NDalicPINVOKE.ItemView_SetAnchoringDuration(swigCPtr, durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetAnchoringDuration() { - float ret = NDalicPINVOKE.ItemView_GetAnchoringDuration(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void ScrollToItem(uint itemId, float durationSeconds) { - NDalicPINVOKE.ItemView_ScrollToItem(swigCPtr, itemId, durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRefreshInterval(float intervalLayoutPositions) { - NDalicPINVOKE.ItemView_SetRefreshInterval(swigCPtr, intervalLayoutPositions); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetRefreshInterval() { - float ret = NDalicPINVOKE.ItemView_GetRefreshInterval(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Refresh() { - NDalicPINVOKE.ItemView_Refresh(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetItem(uint itemId) { - View ret = new View(NDalicPINVOKE.ItemView_GetItem(swigCPtr, itemId), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetItemId(View view) { - uint ret = NDalicPINVOKE.ItemView_GetItemId(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void InsertItem(Item newItem, float durationSeconds) { - NDalicPINVOKE.ItemView_InsertItem(swigCPtr, Item.getCPtr(newItem), durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertItems(ItemContainer newItems, float durationSeconds) { - NDalicPINVOKE.ItemView_InsertItems(swigCPtr, ItemContainer.getCPtr(newItems), durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveItem(uint itemId, float durationSeconds) { - NDalicPINVOKE.ItemView_RemoveItem(swigCPtr, itemId, durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveItems(ItemIdContainer itemIds, float durationSeconds) { - NDalicPINVOKE.ItemView_RemoveItems(swigCPtr, ItemIdContainer.getCPtr(itemIds), durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ReplaceItem(Item replacementItem, float durationSeconds) { - NDalicPINVOKE.ItemView_ReplaceItem(swigCPtr, Item.getCPtr(replacementItem), durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ReplaceItems(ItemContainer replacementItems, float durationSeconds) { - NDalicPINVOKE.ItemView_ReplaceItems(swigCPtr, ItemContainer.getCPtr(replacementItems), durationSeconds); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetItemsParentOrigin(Vector3 parentOrigin) { - NDalicPINVOKE.ItemView_SetItemsParentOrigin(swigCPtr, Vector3.getCPtr(parentOrigin)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector3 GetItemsParentOrigin() { - Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsParentOrigin(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetItemsAnchorPoint(Vector3 anchorPoint) { - NDalicPINVOKE.ItemView_SetItemsAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector3 GetItemsAnchorPoint() { - Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsAnchorPoint(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void GetItemsRange(ItemRange range) { - NDalicPINVOKE.ItemView_GetItemsRange(swigCPtr, ItemRange.getCPtr(range)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VoidSignal LayoutActivatedSignal() { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.ItemView_LayoutActivatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000, - ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000 - } - - public float MinimumSwipeSpeed - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.MINIMUM_SWIPE_SPEED).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.MINIMUM_SWIPE_SPEED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float MinimumSwipeDistance - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.MINIMUM_SWIPE_DISTANCE).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.MINIMUM_SWIPE_DISTANCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float WheelScrollDistanceStep - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool SnapToItemEnabled - { - get - { - bool temp = false; - GetProperty( ItemView.Property.SNAP_TO_ITEM_ENABLED).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.SNAP_TO_ITEM_ENABLED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float RefreshInterval - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.REFRESH_INTERVAL).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.REFRESH_INTERVAL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float LayoutPosition - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.LAYOUT_POSITION).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.LAYOUT_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float ScrollSpeed - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.SCROLL_SPEED).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float Overshoot - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.OVERSHOOT).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.OVERSHOOT, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollDirection - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ItemView.Property.SCROLL_DIRECTION).Get( temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.SCROLL_DIRECTION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int LayoutOrientation - { - get - { - int temp = 0; - GetProperty( ItemView.Property.LAYOUT_ORIENTATION).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.LAYOUT_ORIENTATION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float ScrollContentSize - { - get - { - float temp = 0.0f; - GetProperty( ItemView.Property.SCROLL_CONTENT_SIZE).Get( ref temp ); - return temp; - } - set - { - SetProperty( ItemView.Property.SCROLL_CONTENT_SIZE, new Tizen.NUI.PropertyValue( value ) ); - } - } + } + public ItemView(ItemView itemView) : this(NDalicPINVOKE.new_ItemView__SWIG_1(ItemView.getCPtr(itemView)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public ItemView Assign(ItemView itemView) + { + ItemView ret = new ItemView(NDalicPINVOKE.ItemView_Assign(swigCPtr, ItemView.getCPtr(itemView)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static ItemView DownCast(BaseHandle handle) + { + ItemView ret = new ItemView(NDalicPINVOKE.ItemView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetLayoutCount() + { + uint ret = NDalicPINVOKE.ItemView_GetLayoutCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void AddLayout(ItemLayout layout) + { + NDalicPINVOKE.ItemView_AddLayout(swigCPtr, ItemLayout.getCPtr(layout)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveLayout(uint layoutIndex) + { + NDalicPINVOKE.ItemView_RemoveLayout(swigCPtr, layoutIndex); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetLayout(uint layoutIndex) + { + SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetLayout(swigCPtr, layoutIndex), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t GetActiveLayout() + { + SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.ItemView_GetActiveLayout(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float GetCurrentLayoutPosition(uint itemId) + { + float ret = NDalicPINVOKE.ItemView_GetCurrentLayoutPosition(swigCPtr, itemId); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ActivateLayout(uint layoutIndex, Vector3 targetSize, float durationSeconds) + { + NDalicPINVOKE.ItemView_ActivateLayout(swigCPtr, layoutIndex, Vector3.getCPtr(targetSize), durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void DeactivateCurrentLayout() + { + NDalicPINVOKE.ItemView_DeactivateCurrentLayout(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetMinimumSwipeSpeed(float speed) + { + NDalicPINVOKE.ItemView_SetMinimumSwipeSpeed(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetMinimumSwipeSpeed() + { + float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeSpeed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMinimumSwipeDistance(float distance) + { + NDalicPINVOKE.ItemView_SetMinimumSwipeDistance(swigCPtr, distance); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetMinimumSwipeDistance() + { + float ret = NDalicPINVOKE.ItemView_GetMinimumSwipeDistance(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetWheelScrollDistanceStep(float step) + { + NDalicPINVOKE.ItemView_SetWheelScrollDistanceStep(swigCPtr, step); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetWheelScrollDistanceStep() + { + float ret = NDalicPINVOKE.ItemView_GetWheelScrollDistanceStep(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAnchoring(bool enabled) + { + NDalicPINVOKE.ItemView_SetAnchoring(swigCPtr, enabled); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetAnchoring() + { + bool ret = NDalicPINVOKE.ItemView_GetAnchoring(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAnchoringDuration(float durationSeconds) + { + NDalicPINVOKE.ItemView_SetAnchoringDuration(swigCPtr, durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetAnchoringDuration() + { + float ret = NDalicPINVOKE.ItemView_GetAnchoringDuration(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ScrollToItem(uint itemId, float durationSeconds) + { + NDalicPINVOKE.ItemView_ScrollToItem(swigCPtr, itemId, durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRefreshInterval(float intervalLayoutPositions) + { + NDalicPINVOKE.ItemView_SetRefreshInterval(swigCPtr, intervalLayoutPositions); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetRefreshInterval() + { + float ret = NDalicPINVOKE.ItemView_GetRefreshInterval(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Refresh() + { + NDalicPINVOKE.ItemView_Refresh(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public View GetItem(uint itemId) + { + View ret = new View(NDalicPINVOKE.ItemView_GetItem(swigCPtr, itemId), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetItemId(View view) + { + uint ret = NDalicPINVOKE.ItemView_GetItemId(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void InsertItem(Item newItem, float durationSeconds) + { + NDalicPINVOKE.ItemView_InsertItem(swigCPtr, Item.getCPtr(newItem), durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertItems(ItemContainer newItems, float durationSeconds) + { + NDalicPINVOKE.ItemView_InsertItems(swigCPtr, ItemContainer.getCPtr(newItems), durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveItem(uint itemId, float durationSeconds) + { + NDalicPINVOKE.ItemView_RemoveItem(swigCPtr, itemId, durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveItems(ItemIdContainer itemIds, float durationSeconds) + { + NDalicPINVOKE.ItemView_RemoveItems(swigCPtr, ItemIdContainer.getCPtr(itemIds), durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ReplaceItem(Item replacementItem, float durationSeconds) + { + NDalicPINVOKE.ItemView_ReplaceItem(swigCPtr, Item.getCPtr(replacementItem), durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ReplaceItems(ItemContainer replacementItems, float durationSeconds) + { + NDalicPINVOKE.ItemView_ReplaceItems(swigCPtr, ItemContainer.getCPtr(replacementItems), durationSeconds); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetItemsParentOrigin(Vector3 parentOrigin) + { + NDalicPINVOKE.ItemView_SetItemsParentOrigin(swigCPtr, Vector3.getCPtr(parentOrigin)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector3 GetItemsParentOrigin() + { + Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsParentOrigin(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetItemsAnchorPoint(Vector3 anchorPoint) + { + NDalicPINVOKE.ItemView_SetItemsAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector3 GetItemsAnchorPoint() + { + Vector3 ret = new Vector3(NDalicPINVOKE.ItemView_GetItemsAnchorPoint(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void GetItemsRange(ItemRange range) + { + NDalicPINVOKE.ItemView_GetItemsRange(swigCPtr, ItemRange.getCPtr(range)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VoidSignal LayoutActivatedSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.ItemView_LayoutActivatedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, + ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, + ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 + } + + public float MinimumSwipeSpeed + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.MINIMUM_SWIPE_SPEED).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.MINIMUM_SWIPE_SPEED, new Tizen.NUI.PropertyValue(value)); + } + } + public float MinimumSwipeDistance + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.MINIMUM_SWIPE_DISTANCE).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.MINIMUM_SWIPE_DISTANCE, new Tizen.NUI.PropertyValue(value)); + } + } + public float WheelScrollDistanceStep + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue(value)); + } + } + public bool SnapToItemEnabled + { + get + { + bool temp = false; + GetProperty(ItemView.Property.SNAP_TO_ITEM_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.SNAP_TO_ITEM_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public float RefreshInterval + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.REFRESH_INTERVAL).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.REFRESH_INTERVAL, new Tizen.NUI.PropertyValue(value)); + } + } + public float LayoutPosition + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.LAYOUT_POSITION).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.LAYOUT_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public float ScrollSpeed + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.SCROLL_SPEED).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue(value)); + } + } + public float Overshoot + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.OVERSHOOT).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.OVERSHOOT, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollDirection + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ItemView.Property.SCROLL_DIRECTION).Get(temp); + return temp; + } + set + { + SetProperty(ItemView.Property.SCROLL_DIRECTION, new Tizen.NUI.PropertyValue(value)); + } + } + public int LayoutOrientation + { + get + { + int temp = 0; + GetProperty(ItemView.Property.LAYOUT_ORIENTATION).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.LAYOUT_ORIENTATION, new Tizen.NUI.PropertyValue(value)); + } + } + public float ScrollContentSize + { + get + { + float temp = 0.0f; + GetProperty(ItemView.Property.SCROLL_CONTENT_SIZE).Get(ref temp); + return temp; + } + set + { + SetProperty(ItemView.Property.SCROLL_CONTENT_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/KeyEventSignal.cs b/src/Tizen.NUI/src/internal/KeyEventSignal.cs old mode 100644 new mode 100755 index 573209a..bcfba3e --- a/src/Tizen.NUI/src/internal/KeyEventSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyEventSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class KeyEventSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class KeyEventSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal KeyEventSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal KeyEventSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyEventSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyEventSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~KeyEventSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_KeyEventSignal(swigCPtr); + ~KeyEventSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.KeyEventSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_KeyEventSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.KeyEventSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.KeyEventSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.KeyEventSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.KeyEventSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.KeyEventSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.KeyEventSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.KeyEventSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(Key arg) { - NDalicPINVOKE.KeyEventSignal_Emit(swigCPtr, Key.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(Key arg) + { + NDalicPINVOKE.KeyEventSignal_Emit(swigCPtr, Key.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public KeyEventSignal() : this(NDalicPINVOKE.new_KeyEventSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public KeyEventSignal() : this(NDalicPINVOKE.new_KeyEventSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs b/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs old mode 100644 new mode 100755 index 13213b9..03ee6cc --- a/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs +++ b/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs @@ -10,70 +10,93 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class KeyInputFocusManager : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class KeyInputFocusManager : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal KeyInputFocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.KeyInputFocusManager_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal KeyInputFocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.KeyInputFocusManager_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusManager obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusManager obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_KeyInputFocusManager(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public KeyInputFocusManager() : this(NDalicPINVOKE.new_KeyInputFocusManager(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static KeyInputFocusManager Get() + { + KeyInputFocusManager ret = new KeyInputFocusManager(NDalicPINVOKE.KeyInputFocusManager_Get(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFocus(View control) + { + NDalicPINVOKE.KeyInputFocusManager_SetFocus(swigCPtr, View.getCPtr(control)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_KeyInputFocusManager(swigCPtr); + public View GetCurrentFocusControl() + { + View ret = new View(NDalicPINVOKE.KeyInputFocusManager_GetCurrentFocusControl(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void RemoveFocus(View control) + { + NDalicPINVOKE.KeyInputFocusManager_RemoveFocus(swigCPtr, View.getCPtr(control)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t KeyInputFocusChangedSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(NDalicPINVOKE.KeyInputFocusManager_KeyInputFocusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); } - } - - public KeyInputFocusManager() : this(NDalicPINVOKE.new_KeyInputFocusManager(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static KeyInputFocusManager Get() { - KeyInputFocusManager ret = new KeyInputFocusManager(NDalicPINVOKE.KeyInputFocusManager_Get(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFocus(View control) { - NDalicPINVOKE.KeyInputFocusManager_SetFocus(swigCPtr, View.getCPtr(control)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetCurrentFocusControl() { - View ret = new View(NDalicPINVOKE.KeyInputFocusManager_GetCurrentFocusControl(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void RemoveFocus(View control) { - NDalicPINVOKE.KeyInputFocusManager_RemoveFocus(swigCPtr, View.getCPtr(control)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t KeyInputFocusChangedSignal() { - SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(NDalicPINVOKE.KeyInputFocusManager_KeyInputFocusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} } diff --git a/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs b/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs old mode 100644 new mode 100755 index e79a328..16d0b06 --- a/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs @@ -10,81 +10,134 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class KeyInputFocusSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class KeyInputFocusSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal KeyInputFocusSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal KeyInputFocusSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~KeyInputFocusSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_KeyInputFocusSignal(swigCPtr); + ~KeyInputFocusSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.KeyInputFocusSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_KeyInputFocusSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.KeyInputFocusSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.KeyInputFocusSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.KeyInputFocusSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.KeyInputFocusSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.KeyInputFocusSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.KeyInputFocusSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.KeyInputFocusSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(View arg) { - NDalicPINVOKE.KeyInputFocusSignal_Emit(swigCPtr, View.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(View arg) + { + NDalicPINVOKE.KeyInputFocusSignal_Emit(swigCPtr, View.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public KeyInputFocusSignal() : this(NDalicPINVOKE.new_KeyInputFocusSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public KeyInputFocusSignal() : this(NDalicPINVOKE.new_KeyInputFocusSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs b/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs old mode 100644 new mode 100755 index 6b1a1a5..bef6ed1 --- a/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs @@ -19,80 +19,134 @@ using Tizen.NUI.BaseComponents; using System; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -internal delegate IntPtr SwigDelegatePreFocusChangeSignal(IntPtr current, IntPtr proposed, View.FocusDirection direction); + internal delegate IntPtr SwigDelegatePreFocusChangeSignal(IntPtr current, IntPtr proposed, View.FocusDirection direction); -internal class PreFocusChangeSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class PreFocusChangeSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PreFocusChangeSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PreFocusChangeSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PreFocusChangeSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PreFocusChangeSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PreFocusChangeSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_PreFocusChangeSignal(swigCPtr); + ~PreFocusChangeSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public bool Empty() { - bool ret = NDalicManualPINVOKE.PreFocusChangeSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() { - uint ret = NDalicManualPINVOKE.PreFocusChangeSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(FocusManager.PreFocusChangeEventCallback func) { - NDalicManualPINVOKE.PreFocusChangeSignal_Connect(swigCPtr, func); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Disconnect(System.Delegate func) { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.PreFocusChangeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - public View Emit(View arg1, View arg2, View.FocusDirection arg3) { + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_PreFocusChangeSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.PreFocusChangeSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.PreFocusChangeSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(FocusManager.PreFocusChangeEventCallback func) + { + NDalicManualPINVOKE.PreFocusChangeSignal_Connect(swigCPtr, func); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.PreFocusChangeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public View Emit(View arg1, View arg2, View.FocusDirection arg3) + { View ret = new View(NDalicManualPINVOKE.PreFocusChangeSignal_Emit(swigCPtr, View.getCPtr(arg1), View.getCPtr(arg2), (int)arg3), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public PreFocusChangeSignal() : this(NDalicManualPINVOKE.new_PreFocusChangeSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PreFocusChangeSignal() : this(NDalicManualPINVOKE.new_PreFocusChangeSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/LinearConstrainer.cs b/src/Tizen.NUI/src/internal/LinearConstrainer.cs old mode 100644 new mode 100755 index bfaa2a9..34e8636 --- a/src/Tizen.NUI/src/internal/LinearConstrainer.cs +++ b/src/Tizen.NUI/src/internal/LinearConstrainer.cs @@ -24,93 +24,159 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ internal class LinearConstrainer : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal LinearConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.LinearConstrainer_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal LinearConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.LinearConstrainer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LinearConstrainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LinearConstrainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_LinearConstrainer(swigCPtr); + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_LinearConstrainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_LinearConstrainer_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + internal Property() : this(NDalicPINVOKE.new_LinearConstrainer_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal static readonly int VALUE = NDalicPINVOKE.LinearConstrainer_Property_VALUE_get(); + internal static readonly int PROGRESS = NDalicPINVOKE.LinearConstrainer_Property_PROGRESS_get(); - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_LinearConstrainer_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - global::System.GC.SuppressFinalize(this); - } - } - - internal Property() : this(NDalicPINVOKE.new_LinearConstrainer_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal static readonly int VALUE = NDalicPINVOKE.LinearConstrainer_Property_VALUE_get(); - internal static readonly int PROGRESS = NDalicPINVOKE.LinearConstrainer_Property_PROGRESS_get(); - - } - - public LinearConstrainer () : this (NDalicPINVOKE.LinearConstrainer_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public new static LinearConstrainer DownCast(BaseHandle handle) { - LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.LinearConstrainer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + + public LinearConstrainer() : this(NDalicPINVOKE.LinearConstrainer_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public new static LinearConstrainer DownCast(BaseHandle handle) + { + LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.LinearConstrainer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } internal LinearConstrainer(LinearConstrainer handle) : this(NDalicPINVOKE.new_LinearConstrainer__SWIG_1(LinearConstrainer.getCPtr(handle)), true) { @@ -124,15 +190,17 @@ namespace Tizen.NUI { return ret; } - public void Apply(Property target, Property source, Vector2 range, Vector2 wrap) { - NDalicPINVOKE.LinearConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Apply(Property target, Property source, Vector2 range, Vector2 wrap) + { + NDalicPINVOKE.LinearConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Apply(Property target, Property source, Vector2 range) { - NDalicPINVOKE.LinearConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Apply(Property target, Property source, Vector2 range) + { + NDalicPINVOKE.LinearConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } internal void Remove(Animatable target) { @@ -167,6 +235,6 @@ namespace Tizen.NUI { } } -} + } } diff --git a/src/Tizen.NUI/src/internal/LoadingState.cs b/src/Tizen.NUI/src/internal/LoadingState.cs old mode 100644 new mode 100755 index 8287828..98015ef --- a/src/Tizen.NUI/src/internal/LoadingState.cs +++ b/src/Tizen.NUI/src/internal/LoadingState.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum LoadingState { - ResourceLoading, - ResourceLoadingSucceeded, - ResourceLoadingFailed -} + internal enum LoadingState + { + ResourceLoading, + ResourceLoadingSucceeded, + ResourceLoadingFailed + } } diff --git a/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs old mode 100644 new mode 100755 index ce013a0..c4a9518 --- a/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs @@ -8,81 +8,136 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class LongPressGestureDetectedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal LongPressGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LongPressGestureDetectedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~LongPressGestureDetectedSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class LongPressGestureDetectedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_LongPressGestureDetectedSignal(swigCPtr); + internal LongPressGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LongPressGestureDetectedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.LongPressGestureDetectedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.LongPressGestureDetectedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.LongPressGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~LongPressGestureDetectedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.LongPressGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, LongPressGesture arg2) { - NDalicPINVOKE.LongPressGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), LongPressGesture.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public LongPressGestureDetectedSignal() : this(NDalicPINVOKE.new_LongPressGestureDetectedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_LongPressGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + + public bool Empty() + { + bool ret = NDalicPINVOKE.LongPressGestureDetectedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.LongPressGestureDetectedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.LongPressGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.LongPressGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, LongPressGesture arg2) + { + NDalicPINVOKE.LongPressGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), LongPressGesture.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public LongPressGestureDetectedSignal() : this(NDalicPINVOKE.new_LongPressGestureDetectedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs b/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs old mode 100644 new mode 100755 index c8fedc4..1a31ed3 --- a/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs @@ -24,192 +24,219 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { - -using System; -using System.Runtime.InteropServices; -using Tizen.NUI.BaseComponents; - -public class LongPressGestureDetector : GestureDetector { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; +namespace Tizen.NUI +{ - internal LongPressGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.LongPressGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LongPressGestureDetector obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + public class LongPressGestureDetector : GestureDetector + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal LongPressGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.LongPressGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_LongPressGestureDetector(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LongPressGestureDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } -public class DetectedEventArgs : EventArgs -{ - private View _view; - private LongPressGesture _longPressGesture; + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public View View + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - get - { - return _view; - } - set - { - _view = value; - } - } - - public LongPressGesture LongPressGesture - { - get - { - return _longPressGesture; - } - set - { - _longPressGesture = value; - } - } -} - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr longPressGesture); - private DaliEventHandler _longPressGestureEventHandler; - private DetectedCallbackDelegate _longPressGestureCallbackDelegate; + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_LongPressGestureDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public event DaliEventHandler Detected - { - add - { - lock(this) + public class DetectedEventArgs : EventArgs { - // Restricted to only one listener - if (_longPressGestureEventHandler == null) - { - _longPressGestureEventHandler += value; + private View _view; + private LongPressGesture _longPressGesture; - _longPressGestureCallbackDelegate = new DetectedCallbackDelegate(OnLongPressGestureDetected); - this.DetectedSignal().Connect(_longPressGestureCallbackDelegate); - } + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + public LongPressGesture LongPressGesture + { + get + { + return _longPressGesture; + } + set + { + _longPressGesture = value; + } + } } - } - remove - { - lock(this) - { - if (_longPressGestureEventHandler != null) - { - this.DetectedSignal().Disconnect(_longPressGestureCallbackDelegate); - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr longPressGesture); + private DaliEventHandler _longPressGestureEventHandler; + private DetectedCallbackDelegate _longPressGestureCallbackDelegate; + - _longPressGestureEventHandler -= value; + public event DaliEventHandler Detected + { + add + { + lock (this) + { + // Restricted to only one listener + if (_longPressGestureEventHandler == null) + { + _longPressGestureEventHandler += value; + + _longPressGestureCallbackDelegate = new DetectedCallbackDelegate(OnLongPressGestureDetected); + this.DetectedSignal().Connect(_longPressGestureCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_longPressGestureEventHandler != null) + { + this.DetectedSignal().Disconnect(_longPressGestureCallbackDelegate); + } + + _longPressGestureEventHandler -= value; + } + } } - } - } - private void OnLongPressGestureDetected(IntPtr actor, IntPtr longPressGesture) - { - DetectedEventArgs e = new DetectedEventArgs(); + private void OnLongPressGestureDetected(IntPtr actor, IntPtr longPressGesture) + { + DetectedEventArgs e = new DetectedEventArgs(); - // Populate all members of "e" (LongPressGestureEventArgs) with real data - e.View = View.GetViewFromPtr(actor); - e.LongPressGesture = Tizen.NUI.LongPressGesture.GetLongPressGestureFromPtr(longPressGesture); + // Populate all members of "e" (LongPressGestureEventArgs) with real data + e.View = View.GetViewFromPtr(actor); + e.LongPressGesture = Tizen.NUI.LongPressGesture.GetLongPressGestureFromPtr(longPressGesture); - if (_longPressGestureEventHandler != null) - { - //here we send all data to user event handlers - _longPressGestureEventHandler(this, e); - } + if (_longPressGestureEventHandler != null) + { + //here we send all data to user event handlers + _longPressGestureEventHandler(this, e); + } - } + } -public static LongPressGestureDetector GetLongPressGestureDetectorFromPtr(global::System.IntPtr cPtr) { - LongPressGestureDetector ret = new LongPressGestureDetector(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public static LongPressGestureDetector GetLongPressGestureDetectorFromPtr(global::System.IntPtr cPtr) + { + LongPressGestureDetector ret = new LongPressGestureDetector(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public LongPressGestureDetector () : this (NDalicPINVOKE.LongPressGestureDetector_New__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + public LongPressGestureDetector() : this(NDalicPINVOKE.LongPressGestureDetector_New__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public LongPressGestureDetector (uint touchesRequired) : this (NDalicPINVOKE.LongPressGestureDetector_New__SWIG_1(touchesRequired), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public LongPressGestureDetector(uint touchesRequired) : this(NDalicPINVOKE.LongPressGestureDetector_New__SWIG_1(touchesRequired), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public LongPressGestureDetector (uint minTouches, uint maxTouches) : this (NDalicPINVOKE.LongPressGestureDetector_New__SWIG_2(minTouches, maxTouches), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public LongPressGestureDetector(uint minTouches, uint maxTouches) : this(NDalicPINVOKE.LongPressGestureDetector_New__SWIG_2(minTouches, maxTouches), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public new static LongPressGestureDetector DownCast(BaseHandle handle) { - LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.LongPressGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + } + public new static LongPressGestureDetector DownCast(BaseHandle handle) + { + LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.LongPressGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public LongPressGestureDetector(LongPressGestureDetector handle) : this(NDalicPINVOKE.new_LongPressGestureDetector__SWIG_1(LongPressGestureDetector.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public LongPressGestureDetector(LongPressGestureDetector handle) : this(NDalicPINVOKE.new_LongPressGestureDetector__SWIG_1(LongPressGestureDetector.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public LongPressGestureDetector Assign(LongPressGestureDetector rhs) { - LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.LongPressGestureDetector_Assign(swigCPtr, LongPressGestureDetector.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public LongPressGestureDetector Assign(LongPressGestureDetector rhs) + { + LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.LongPressGestureDetector_Assign(swigCPtr, LongPressGestureDetector.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void SetTouchesRequired(uint touches) { - NDalicPINVOKE.LongPressGestureDetector_SetTouchesRequired__SWIG_0(swigCPtr, touches); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetTouchesRequired(uint touches) + { + NDalicPINVOKE.LongPressGestureDetector_SetTouchesRequired__SWIG_0(swigCPtr, touches); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void SetTouchesRequired(uint minTouches, uint maxTouches) { - NDalicPINVOKE.LongPressGestureDetector_SetTouchesRequired__SWIG_1(swigCPtr, minTouches, maxTouches); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetTouchesRequired(uint minTouches, uint maxTouches) + { + NDalicPINVOKE.LongPressGestureDetector_SetTouchesRequired__SWIG_1(swigCPtr, minTouches, maxTouches); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public uint GetMinimumTouchesRequired() { - uint ret = NDalicPINVOKE.LongPressGestureDetector_GetMinimumTouchesRequired(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetMinimumTouchesRequired() + { + uint ret = NDalicPINVOKE.LongPressGestureDetector_GetMinimumTouchesRequired(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public uint GetMaximumTouchesRequired() { - uint ret = NDalicPINVOKE.LongPressGestureDetector_GetMaximumTouchesRequired(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetMaximumTouchesRequired() + { + uint ret = NDalicPINVOKE.LongPressGestureDetector_GetMaximumTouchesRequired(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - internal LongPressGestureDetectedSignal DetectedSignal() { - LongPressGestureDetectedSignal ret = new LongPressGestureDetectedSignal(NDalicPINVOKE.LongPressGestureDetector_DetectedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + internal LongPressGestureDetectedSignal DetectedSignal() + { + LongPressGestureDetectedSignal ret = new LongPressGestureDetectedSignal(NDalicPINVOKE.LongPressGestureDetector_DetectedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + } } diff --git a/src/Tizen.NUI/src/internal/Matrix.cs b/src/Tizen.NUI/src/internal/Matrix.cs old mode 100644 new mode 100755 index 51278f2..9ae7324 --- a/src/Tizen.NUI/src/internal/Matrix.cs +++ b/src/Tizen.NUI/src/internal/Matrix.cs @@ -8,224 +8,308 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class Matrix : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Matrix(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class Matrix : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Matrix obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal Matrix(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Matrix obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - ~Matrix() { - DisposeQueue.Instance.Add(this); - } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~Matrix() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Matrix(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public static Vector4 operator*(Matrix arg1, Vector4 arg2) { - return arg1.Multiply(arg2); - } - - public Matrix() : this(NDalicPINVOKE.new_Matrix__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix(bool initialize) : this(NDalicPINVOKE.new_Matrix__SWIG_1(initialize), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix(float[] array) : this(NDalicPINVOKE.new_Matrix__SWIG_2(array), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix(Rotation rotation) : this(NDalicPINVOKE.new_Matrix__SWIG_3(Rotation.getCPtr(rotation)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix(Matrix matrix) : this(NDalicPINVOKE.new_Matrix__SWIG_4(Matrix.getCPtr(matrix)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix Assign(Matrix matrix) { - Matrix ret = new Matrix(NDalicPINVOKE.Matrix_Assign(swigCPtr, Matrix.getCPtr(matrix)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Matrix IDENTITY { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.Matrix_IDENTITY_get(); - Matrix ret = (cPtr == global::System.IntPtr.Zero) ? null : new Matrix(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public void SetIdentity() { - NDalicPINVOKE.Matrix_SetIdentity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetIdentityAndScale(Vector3 scale) { - NDalicPINVOKE.Matrix_SetIdentityAndScale(swigCPtr, Vector3.getCPtr(scale)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InvertTransform(Matrix result) { - NDalicPINVOKE.Matrix_InvertTransform(swigCPtr, Matrix.getCPtr(result)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Invert() { - bool ret = NDalicPINVOKE.Matrix_Invert(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Transpose() { - NDalicPINVOKE.Matrix_Transpose(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector3 GetXAxis() { - Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetXAxis(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector3 GetYAxis() { - Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetYAxis(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector3 GetZAxis() { - Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetZAxis(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetXAxis(Vector3 axis) { - NDalicPINVOKE.Matrix_SetXAxis(swigCPtr, Vector3.getCPtr(axis)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetYAxis(Vector3 axis) { - NDalicPINVOKE.Matrix_SetYAxis(swigCPtr, Vector3.getCPtr(axis)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetZAxis(Vector3 axis) { - NDalicPINVOKE.Matrix_SetZAxis(swigCPtr, Vector3.getCPtr(axis)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector4 GetTranslation() { - Vector4 ret = new Vector4(NDalicPINVOKE.Matrix_GetTranslation(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector3 GetTranslation3() { - Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetTranslation3(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetTranslation(Vector4 translation) { - NDalicPINVOKE.Matrix_SetTranslation__SWIG_0(swigCPtr, Vector4.getCPtr(translation)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetTranslation(Vector3 translation) { - NDalicPINVOKE.Matrix_SetTranslation__SWIG_1(swigCPtr, Vector3.getCPtr(translation)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void OrthoNormalize() { - NDalicPINVOKE.Matrix_OrthoNormalize(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_float AsFloat() { - global::System.IntPtr cPtr = NDalicPINVOKE.Matrix_AsFloat__SWIG_0(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void Multiply(Matrix result, Matrix lhs, Matrix rhs) { - NDalicPINVOKE.Matrix_Multiply__SWIG_0(Matrix.getCPtr(result), Matrix.getCPtr(lhs), Matrix.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void Multiply(Matrix result, Matrix lhs, Rotation rhs) { - NDalicPINVOKE.Matrix_Multiply__SWIG_1(Matrix.getCPtr(result), Matrix.getCPtr(lhs), Rotation.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector4 Multiply(Vector4 rhs) { - Vector4 ret = new Vector4(NDalicPINVOKE.Matrix_Multiply__SWIG_2(swigCPtr, Vector4.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool EqualTo(Matrix rhs) { - bool ret = NDalicPINVOKE.Matrix_EqualTo(swigCPtr, Matrix.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool NotEqualTo(Matrix rhs) { - bool ret = NDalicPINVOKE.Matrix_NotEqualTo(swigCPtr, Matrix.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetTransformComponents(Vector3 scale, Rotation rotation, Vector3 translation) { - NDalicPINVOKE.Matrix_SetTransformComponents(swigCPtr, Vector3.getCPtr(scale), Rotation.getCPtr(rotation), Vector3.getCPtr(translation)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetInverseTransformComponents(Vector3 scale, Rotation rotation, Vector3 translation) { - NDalicPINVOKE.Matrix_SetInverseTransformComponents__SWIG_0(swigCPtr, Vector3.getCPtr(scale), Rotation.getCPtr(rotation), Vector3.getCPtr(translation)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetInverseTransformComponents(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 translation) { - NDalicPINVOKE.Matrix_SetInverseTransformComponents__SWIG_1(swigCPtr, Vector3.getCPtr(xAxis), Vector3.getCPtr(yAxis), Vector3.getCPtr(zAxis), Vector3.getCPtr(translation)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void GetTransformComponents(Vector3 position, Rotation rotation, Vector3 scale) { - NDalicPINVOKE.Matrix_GetTransformComponents(swigCPtr, Vector3.getCPtr(position), Rotation.getCPtr(rotation), Vector3.getCPtr(scale)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Matrix(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public static Vector4 operator *(Matrix arg1, Vector4 arg2) + { + return arg1.Multiply(arg2); + } + + public Matrix() : this(NDalicPINVOKE.new_Matrix__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix(bool initialize) : this(NDalicPINVOKE.new_Matrix__SWIG_1(initialize), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix(float[] array) : this(NDalicPINVOKE.new_Matrix__SWIG_2(array), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix(Rotation rotation) : this(NDalicPINVOKE.new_Matrix__SWIG_3(Rotation.getCPtr(rotation)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix(Matrix matrix) : this(NDalicPINVOKE.new_Matrix__SWIG_4(Matrix.getCPtr(matrix)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix Assign(Matrix matrix) + { + Matrix ret = new Matrix(NDalicPINVOKE.Matrix_Assign(swigCPtr, Matrix.getCPtr(matrix)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Matrix IDENTITY + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Matrix_IDENTITY_get(); + Matrix ret = (cPtr == global::System.IntPtr.Zero) ? null : new Matrix(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public void SetIdentity() + { + NDalicPINVOKE.Matrix_SetIdentity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetIdentityAndScale(Vector3 scale) + { + NDalicPINVOKE.Matrix_SetIdentityAndScale(swigCPtr, Vector3.getCPtr(scale)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InvertTransform(Matrix result) + { + NDalicPINVOKE.Matrix_InvertTransform(swigCPtr, Matrix.getCPtr(result)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Invert() + { + bool ret = NDalicPINVOKE.Matrix_Invert(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Transpose() + { + NDalicPINVOKE.Matrix_Transpose(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector3 GetXAxis() + { + Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetXAxis(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Vector3 GetYAxis() + { + Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetYAxis(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Vector3 GetZAxis() + { + Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetZAxis(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetXAxis(Vector3 axis) + { + NDalicPINVOKE.Matrix_SetXAxis(swigCPtr, Vector3.getCPtr(axis)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetYAxis(Vector3 axis) + { + NDalicPINVOKE.Matrix_SetYAxis(swigCPtr, Vector3.getCPtr(axis)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetZAxis(Vector3 axis) + { + NDalicPINVOKE.Matrix_SetZAxis(swigCPtr, Vector3.getCPtr(axis)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector4 GetTranslation() + { + Vector4 ret = new Vector4(NDalicPINVOKE.Matrix_GetTranslation(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Vector3 GetTranslation3() + { + Vector3 ret = new Vector3(NDalicPINVOKE.Matrix_GetTranslation3(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetTranslation(Vector4 translation) + { + NDalicPINVOKE.Matrix_SetTranslation__SWIG_0(swigCPtr, Vector4.getCPtr(translation)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetTranslation(Vector3 translation) + { + NDalicPINVOKE.Matrix_SetTranslation__SWIG_1(swigCPtr, Vector3.getCPtr(translation)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void OrthoNormalize() + { + NDalicPINVOKE.Matrix_OrthoNormalize(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_float AsFloat() + { + global::System.IntPtr cPtr = NDalicPINVOKE.Matrix_AsFloat__SWIG_0(swigCPtr); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void Multiply(Matrix result, Matrix lhs, Matrix rhs) + { + NDalicPINVOKE.Matrix_Multiply__SWIG_0(Matrix.getCPtr(result), Matrix.getCPtr(lhs), Matrix.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void Multiply(Matrix result, Matrix lhs, Rotation rhs) + { + NDalicPINVOKE.Matrix_Multiply__SWIG_1(Matrix.getCPtr(result), Matrix.getCPtr(lhs), Rotation.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector4 Multiply(Vector4 rhs) + { + Vector4 ret = new Vector4(NDalicPINVOKE.Matrix_Multiply__SWIG_2(swigCPtr, Vector4.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool EqualTo(Matrix rhs) + { + bool ret = NDalicPINVOKE.Matrix_EqualTo(swigCPtr, Matrix.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool NotEqualTo(Matrix rhs) + { + bool ret = NDalicPINVOKE.Matrix_NotEqualTo(swigCPtr, Matrix.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetTransformComponents(Vector3 scale, Rotation rotation, Vector3 translation) + { + NDalicPINVOKE.Matrix_SetTransformComponents(swigCPtr, Vector3.getCPtr(scale), Rotation.getCPtr(rotation), Vector3.getCPtr(translation)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetInverseTransformComponents(Vector3 scale, Rotation rotation, Vector3 translation) + { + NDalicPINVOKE.Matrix_SetInverseTransformComponents__SWIG_0(swigCPtr, Vector3.getCPtr(scale), Rotation.getCPtr(rotation), Vector3.getCPtr(translation)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetInverseTransformComponents(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 translation) + { + NDalicPINVOKE.Matrix_SetInverseTransformComponents__SWIG_1(swigCPtr, Vector3.getCPtr(xAxis), Vector3.getCPtr(yAxis), Vector3.getCPtr(zAxis), Vector3.getCPtr(translation)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void GetTransformComponents(Vector3 position, Rotation rotation, Vector3 scale) + { + NDalicPINVOKE.Matrix_GetTransformComponents(swigCPtr, Vector3.getCPtr(position), Rotation.getCPtr(rotation), Vector3.getCPtr(scale)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Matrix3.cs b/src/Tizen.NUI/src/internal/Matrix3.cs old mode 100644 new mode 100755 index 3bb18f9..32f7364 --- a/src/Tizen.NUI/src/internal/Matrix3.cs +++ b/src/Tizen.NUI/src/internal/Matrix3.cs @@ -8,139 +8,204 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class Matrix3 : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Matrix3(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class Matrix3 : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Matrix3 obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal Matrix3(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Matrix3 obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~Matrix3() { - DisposeQueue.Instance.Add(this); - } + ~Matrix3() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Matrix3(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Matrix3(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public static Matrix3 IDENTITY { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.Matrix3_IDENTITY_get(); - Matrix3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Matrix3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Matrix3() : this(NDalicPINVOKE.new_Matrix3__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix3(Matrix3 m) : this(NDalicPINVOKE.new_Matrix3__SWIG_1(Matrix3.getCPtr(m)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix3(Matrix m) : this(NDalicPINVOKE.new_Matrix3__SWIG_2(Matrix.getCPtr(m)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix3(float s00, float s01, float s02, float s10, float s11, float s12, float s20, float s21, float s22) : this(NDalicPINVOKE.new_Matrix3__SWIG_3(s00, s01, s02, s10, s11, s12, s20, s21, s22), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Matrix3 Assign(Matrix3 matrix) { - Matrix3 ret = new Matrix3(NDalicPINVOKE.Matrix3_Assign__SWIG_0(swigCPtr, Matrix3.getCPtr(matrix)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Matrix3 Assign(Matrix matrix) { - Matrix3 ret = new Matrix3(NDalicPINVOKE.Matrix3_Assign__SWIG_1(swigCPtr, Matrix.getCPtr(matrix)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool EqualTo(Matrix3 rhs) { - bool ret = NDalicPINVOKE.Matrix3_EqualTo(swigCPtr, Matrix3.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool NotEqualTo(Matrix3 rhs) { - bool ret = NDalicPINVOKE.Matrix3_NotEqualTo(swigCPtr, Matrix3.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetIdentity() { - NDalicPINVOKE.Matrix3_SetIdentity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_float AsFloat() { - global::System.IntPtr cPtr = NDalicPINVOKE.Matrix3_AsFloat__SWIG_0(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Invert() { - bool ret = NDalicPINVOKE.Matrix3_Invert(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Transpose() { - bool ret = NDalicPINVOKE.Matrix3_Transpose(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Scale(float scale) { - NDalicPINVOKE.Matrix3_Scale(swigCPtr, scale); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float Magnitude() { - float ret = NDalicPINVOKE.Matrix3_Magnitude(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool ScaledInverseTranspose() { - bool ret = NDalicPINVOKE.Matrix3_ScaledInverseTranspose(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void Multiply(Matrix3 result, Matrix3 lhs, Matrix3 rhs) { - NDalicPINVOKE.Matrix3_Multiply(Matrix3.getCPtr(result), Matrix3.getCPtr(lhs), Matrix3.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public static Matrix3 IDENTITY + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Matrix3_IDENTITY_get(); + Matrix3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Matrix3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Matrix3() : this(NDalicPINVOKE.new_Matrix3__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix3(Matrix3 m) : this(NDalicPINVOKE.new_Matrix3__SWIG_1(Matrix3.getCPtr(m)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix3(Matrix m) : this(NDalicPINVOKE.new_Matrix3__SWIG_2(Matrix.getCPtr(m)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix3(float s00, float s01, float s02, float s10, float s11, float s12, float s20, float s21, float s22) : this(NDalicPINVOKE.new_Matrix3__SWIG_3(s00, s01, s02, s10, s11, s12, s20, s21, s22), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Matrix3 Assign(Matrix3 matrix) + { + Matrix3 ret = new Matrix3(NDalicPINVOKE.Matrix3_Assign__SWIG_0(swigCPtr, Matrix3.getCPtr(matrix)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Matrix3 Assign(Matrix matrix) + { + Matrix3 ret = new Matrix3(NDalicPINVOKE.Matrix3_Assign__SWIG_1(swigCPtr, Matrix.getCPtr(matrix)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool EqualTo(Matrix3 rhs) + { + bool ret = NDalicPINVOKE.Matrix3_EqualTo(swigCPtr, Matrix3.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool NotEqualTo(Matrix3 rhs) + { + bool ret = NDalicPINVOKE.Matrix3_NotEqualTo(swigCPtr, Matrix3.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetIdentity() + { + NDalicPINVOKE.Matrix3_SetIdentity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_float AsFloat() + { + global::System.IntPtr cPtr = NDalicPINVOKE.Matrix3_AsFloat__SWIG_0(swigCPtr); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Invert() + { + bool ret = NDalicPINVOKE.Matrix3_Invert(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Transpose() + { + bool ret = NDalicPINVOKE.Matrix3_Transpose(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Scale(float scale) + { + NDalicPINVOKE.Matrix3_Scale(swigCPtr, scale); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float Magnitude() + { + float ret = NDalicPINVOKE.Matrix3_Magnitude(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool ScaledInverseTranspose() + { + bool ret = NDalicPINVOKE.Matrix3_ScaledInverseTranspose(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void Multiply(Matrix3 result, Matrix3 lhs, Matrix3 rhs) + { + NDalicPINVOKE.Matrix3_Multiply(Matrix3.getCPtr(result), Matrix3.getCPtr(lhs), Matrix3.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Meta.cs b/src/Tizen.NUI/src/internal/Meta.cs old mode 100644 new mode 100755 index 860d90c..6fb90b3 --- a/src/Tizen.NUI/src/internal/Meta.cs +++ b/src/Tizen.NUI/src/internal/Meta.cs @@ -8,10 +8,12 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum Meta { - DIMENSION_COUNT = 2 -} + internal enum Meta + { + DIMENSION_COUNT = 2 + } } diff --git a/src/Tizen.NUI/src/internal/Model3dView.cs b/src/Tizen.NUI/src/internal/Model3dView.cs old mode 100644 new mode 100755 index 843636c..269a0d1 --- a/src/Tizen.NUI/src/internal/Model3dView.cs +++ b/src/Tizen.NUI/src/internal/Model3dView.cs @@ -26,233 +26,307 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Model3dView : View { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Model3dView : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + // By default, we do not want the position to use the anchor point + PositionUsesAnchorPoint = false; + } - internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Model3dView(swigCPtr); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Model3dView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Model3dView_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get(); + public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get(); + public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get(); + public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get(); + public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get(); + public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get(); + public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get(); + public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get(); - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Model3dView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get(); - public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get(); - public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get(); - public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get(); - public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get(); - public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get(); - public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get(); - public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get(); - - } - - public Model3dView () : this (NDalicPINVOKE.Model3dView_New__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Model3dView (string objUrl, string mtlUrl, string imagesUrl) : this (NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Model3dView Assign(Model3dView model3dView) { - Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static Model3dView DownCast(BaseHandle handle) { - Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000, - ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000 - } - - public enum IluminationTypeEnum { - DIFFUSE, - DIFFUSE_WITH_TEXTURE, - DIFFUSE_WITH_NORMAL_MAP - } - - public string GeometryUrl - { - get - { - string temp; - GetProperty( Model3dView.Property.GEOMETRY_URL).Get( out temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public string MaterialUrl - { - get - { - string temp; - GetProperty( Model3dView.Property.MATERIAL_URL).Get( out temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public string ImagesUrl - { - get - { - string temp; - GetProperty( Model3dView.Property.IMAGES_URL).Get( out temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int IlluminationType - { - get - { - int temp = 0; - GetProperty( Model3dView.Property.ILLUMINATION_TYPE).Get( ref temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public string Texture0Url - { - get - { - string temp; - GetProperty( Model3dView.Property.TEXTURE0_URL).Get( out temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public string Texture1Url - { - get - { - string temp; - GetProperty( Model3dView.Property.TEXTURE1_URL).Get( out temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public string Texture2Url - { - get - { - string temp; - GetProperty( Model3dView.Property.TEXTURE2_URL).Get( out temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector3 LightPosition - { - get - { - Vector3 temp = new Vector3(0.0f,0.0f,0.0f); - GetProperty( Model3dView.Property.LIGHT_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public Model3dView() : this(NDalicPINVOKE.Model3dView_New__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Model3dView Assign(Model3dView model3dView) + { + Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static Model3dView DownCast(BaseHandle handle) + { + Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, + ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, + ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 + } + + public enum IluminationTypeEnum + { + DIFFUSE, + DIFFUSE_WITH_TEXTURE, + DIFFUSE_WITH_NORMAL_MAP + } + + public string GeometryUrl + { + get + { + string temp; + GetProperty(Model3dView.Property.GEOMETRY_URL).Get(out temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.GEOMETRY_URL, new Tizen.NUI.PropertyValue(value)); + } + } + public string MaterialUrl + { + get + { + string temp; + GetProperty(Model3dView.Property.MATERIAL_URL).Get(out temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.MATERIAL_URL, new Tizen.NUI.PropertyValue(value)); + } + } + public string ImagesUrl + { + get + { + string temp; + GetProperty(Model3dView.Property.IMAGES_URL).Get(out temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.IMAGES_URL, new Tizen.NUI.PropertyValue(value)); + } + } + public int IlluminationType + { + get + { + int temp = 0; + GetProperty(Model3dView.Property.ILLUMINATION_TYPE).Get(ref temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.ILLUMINATION_TYPE, new Tizen.NUI.PropertyValue(value)); + } + } + public string Texture0Url + { + get + { + string temp; + GetProperty(Model3dView.Property.TEXTURE0_URL).Get(out temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.TEXTURE0_URL, new Tizen.NUI.PropertyValue(value)); + } + } + public string Texture1Url + { + get + { + string temp; + GetProperty(Model3dView.Property.TEXTURE1_URL).Get(out temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.TEXTURE1_URL, new Tizen.NUI.PropertyValue(value)); + } + } + public string Texture2Url + { + get + { + string temp; + GetProperty(Model3dView.Property.TEXTURE2_URL).Get(out temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.TEXTURE2_URL, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector3 LightPosition + { + get + { + Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); + GetProperty(Model3dView.Property.LIGHT_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/NDalic.cs b/src/Tizen.NUI/src/internal/NDalic.cs old mode 100644 new mode 100755 index c7c699c..132fb2d --- a/src/Tizen.NUI/src/internal/NDalic.cs +++ b/src/Tizen.NUI/src/internal/NDalic.cs @@ -10,1217 +10,1449 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { - - internal class NDalic { - public static uint int_to_uint(int x) { - uint ret = NDalicPINVOKE.int_to_uint(x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public static readonly int VISUAL_PROPERTY_TRANSFORM = NDalicManualPINVOKE.Visual_Property_TRANSFORM_get(); - public static readonly int VISUAL_PROPERTY_PREMULTIPLIED_ALPHA = NDalicManualPINVOKE.Visual_Property_PREMULTIPLIED_ALPHA_get(); - public static readonly int VISUAL_PROPERTY_MIX_COLOR = NDalicManualPINVOKE.Visual_Property_MIX_COLOR_get(); - public static readonly int IMAGE_VISUAL_BORDER = NDalicManualPINVOKE.Image_Visual_BORDER_get(); - - public static void DaliAssertMessage(string location, string condition) { - NDalicPINVOKE.DaliAssertMessage(location, condition); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static Vector2 Min(Vector2 a, Vector2 b) { - Vector2 ret = new Vector2(NDalicPINVOKE.Min__SWIG_0(Vector2.getCPtr(a), Vector2.getCPtr(b)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector2 Max(Vector2 a, Vector2 b) { - Vector2 ret = new Vector2(NDalicPINVOKE.Max__SWIG_0(Vector2.getCPtr(a), Vector2.getCPtr(b)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector2 Clamp(Vector2 v, float min, float max) { - Vector2 ret = new Vector2(NDalicPINVOKE.Clamp__SWIG_0(Vector2.getCPtr(v), min, max), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector3 Min(Vector3 a, Vector3 b) { - Vector3 ret = new Vector3(NDalicPINVOKE.Min__SWIG_1(Vector3.getCPtr(a), Vector3.getCPtr(b)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector3 Max(Vector3 a, Vector3 b) { - Vector3 ret = new Vector3(NDalicPINVOKE.Max__SWIG_1(Vector3.getCPtr(a), Vector3.getCPtr(b)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector3 Clamp(Vector3 v, float min, float max) { - Vector3 ret = new Vector3(NDalicPINVOKE.Clamp__SWIG_1(Vector3.getCPtr(v), min, max), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector4 Min(Vector4 a, Vector4 b) { - Vector4 ret = new Vector4(NDalicPINVOKE.Min__SWIG_2(Vector4.getCPtr(a), Vector4.getCPtr(b)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector4 Max(Vector4 a, Vector4 b) { - Vector4 ret = new Vector4(NDalicPINVOKE.Max__SWIG_2(Vector4.getCPtr(a), Vector4.getCPtr(b)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector4 Clamp(Vector4 v, float min, float max) { - Vector4 ret = new Vector4(NDalicPINVOKE.Clamp__SWIG_2(Vector4.getCPtr(v), min, max), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Radian ANGLE_360 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_360_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_315 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_315_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_270 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_270_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_225 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_225_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_180 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_180_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_135 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_135_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_120 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_120_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_90 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_90_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_60 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_60_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_45 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_45_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_30 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_30_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian ANGLE_0 { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_0_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool EqualTo(Degree lhs, Degree rhs) { - bool ret = NDalicPINVOKE.EqualTo__SWIG_5(Degree.getCPtr(lhs), Degree.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool NotEqualTo(Degree lhs, Degree rhs) { - bool ret = NDalicPINVOKE.NotEqualTo__SWIG_4(Degree.getCPtr(lhs), Degree.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Degree Clamp(Degree angle, float min, float max) { - Degree ret = new Degree(NDalicPINVOKE.Clamp__SWIG_3(Degree.getCPtr(angle), min, max), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool EqualTo(Radian lhs, Radian rhs) { - bool ret = NDalicPINVOKE.EqualTo__SWIG_6(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool NotEqualTo(Radian lhs, Radian rhs) { - bool ret = NDalicPINVOKE.NotEqualTo__SWIG_5(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool EqualTo(Radian lhs, Degree rhs) { - bool ret = NDalicPINVOKE.EqualTo__SWIG_7(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool NotEqualTo(Radian lhs, Degree rhs) { - bool ret = NDalicPINVOKE.NotEqualTo__SWIG_6(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool EqualTo(Degree lhs, Radian rhs) { - bool ret = NDalicPINVOKE.EqualTo__SWIG_8(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool NotEqualTo(Degree lhs, Radian rhs) { - bool ret = NDalicPINVOKE.NotEqualTo__SWIG_7(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool GreaterThan(Radian lhs, Radian rhs) { - bool ret = NDalicPINVOKE.GreaterThan__SWIG_0(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool GreaterThan(Radian lhs, Degree rhs) { - bool ret = NDalicPINVOKE.GreaterThan__SWIG_1(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool GreaterThan(Degree lhs, Radian rhs) { - bool ret = NDalicPINVOKE.GreaterThan__SWIG_2(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool LessThan(Radian lhs, Radian rhs) { - bool ret = NDalicPINVOKE.LessThan__SWIG_0(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool LessThan(Radian lhs, Degree rhs) { - bool ret = NDalicPINVOKE.LessThan__SWIG_1(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool LessThan(Degree lhs, Radian rhs) { - bool ret = NDalicPINVOKE.LessThan__SWIG_2(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Radian Multiply(Radian lhs, float rhs) { - Radian ret = new Radian(NDalicPINVOKE.Multiply(Radian.getCPtr(lhs), rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Radian Subtract(Radian arg0) { - Radian ret = new Radian(NDalicPINVOKE.Subtract(Radian.getCPtr(arg0)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Radian Clamp(Radian angle, float min, float max) { - Radian ret = new Radian(NDalicPINVOKE.Clamp__SWIG_4(Radian.getCPtr(angle), min, max), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static float Range(float f0, float f1) { - float ret = NDalicPINVOKE.Range(f0, f1); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static Vector4 Axis() { - Vector4 ret = new Vector4(NDalicPINVOKE.Axis(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool EqualTo(AngleAxis lhs, AngleAxis rhs) { - bool ret = NDalicPINVOKE.EqualTo__SWIG_9(AngleAxis.getCPtr(lhs), AngleAxis.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static uint NextPowerOfTwo(uint i) { - uint ret = NDalicPINVOKE.NextPowerOfTwo(i); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsPowerOfTwo(uint i) { - bool ret = NDalicPINVOKE.IsPowerOfTwo(i); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static float GetRangedEpsilon(float a, float b) { - float ret = NDalicPINVOKE.GetRangedEpsilon(a, b); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool EqualsZero(float value) { - bool ret = NDalicPINVOKE.EqualsZero(value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool Equals(float a, float b) { - bool ret = NDalicPINVOKE.Equals__SWIG_0(a, b); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool Equals(float a, float b, float epsilon) { - bool ret = NDalicPINVOKE.Equals__SWIG_1(a, b, epsilon); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static float Round(float value, int pos) { - float ret = NDalicPINVOKE.Round(value, pos); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static float WrapInDomain(float x, float start, float end) { - float ret = NDalicPINVOKE.WrapInDomain(x, start, end); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static float ShortestDistanceInDomain(float a, float b, float start, float end) { - float ret = NDalicPINVOKE.ShortestDistanceInDomain(a, b, start, end); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static string GetName(PropertyType type) { - string ret = NDalicPINVOKE.GetName((int)type); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static BaseObject GetImplementation(BaseHandle handle) { - BaseObject ret = new BaseObject(NDalicPINVOKE.GetImplementation(BaseHandle.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool LessThan(BaseHandle lhs, BaseHandle rhs) { - bool ret = NDalicPINVOKE.LessThan__SWIG_3(BaseHandle.getCPtr(lhs), BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition LessThanCondition(float arg) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition GreaterThanCondition(float arg) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition InsideCondition(float arg0, float arg1) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition OutsideCondition(float arg0, float arg1) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition StepCondition(float stepAmount, float initialValue) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition StepCondition(float stepAmount) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PropertyCondition VariableStepCondition(VectorFloat steps) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.VariableStepCondition(VectorFloat.getCPtr(steps)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static int WEIGHT { - get { - int ret = NDalicPINVOKE.WEIGHT_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool RegisterType(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); - { - bool ret = NDalicPINVOKE.RegisterType(name, SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } +namespace Tizen.NUI +{ - public static bool RegisterProperty(string objectName, string name, int index, PropertyType type, System.Delegate setFunc, System.Delegate getFunc) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(setFunc); -System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(getFunc); + internal class NDalic { - bool ret = NDalicPINVOKE.RegisterProperty(objectName, name, index, (int)type, new System.Runtime.InteropServices.HandleRef(null, ip), new System.Runtime.InteropServices.HandleRef(null, ip2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float ParentOriginTop { - get { - float ret = NDalicPINVOKE.ParentOriginTop_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float ParentOriginBottom { - get { - float ret = NDalicPINVOKE.ParentOriginBottom_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float ParentOriginLeft { - get { - float ret = NDalicPINVOKE.ParentOriginLeft_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float ParentOriginRight { - get { - float ret = NDalicPINVOKE.ParentOriginRight_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float ParentOriginMiddle { - get { - float ret = NDalicPINVOKE.ParentOriginMiddle_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginTopLeft { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginTopCenter { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginTopRight { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginCenterLeft { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginCenter { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginCenterRight { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginBottomLeft { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginBottomCenter { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 ParentOriginBottomRight { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float AnchorPointTop { - get { - float ret = NDalicPINVOKE.AnchorPointTop_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float AnchorPointBottom { - get { - float ret = NDalicPINVOKE.AnchorPointBottom_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float AnchorPointLeft { - get { - float ret = NDalicPINVOKE.AnchorPointLeft_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float AnchorPointRight { - get { - float ret = NDalicPINVOKE.AnchorPointRight_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float AnchorPointMiddle { - get { - float ret = NDalicPINVOKE.AnchorPointMiddle_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointTopLeft { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointTopCenter { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointTopRight { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointCenterLeft { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointCenter { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointCenterRight { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointBottomLeft { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointBottomCenter { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector3 AnchorPointBottomRight { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get(); - Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 BLACK { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.BLACK_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 WHITE { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.WHITE_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 RED { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.RED_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 GREEN { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.GREEN_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 BLUE { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.BLUE_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 YELLOW { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.YELLOW_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 MAGENTA { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.MAGENTA_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 CYAN { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.CYAN_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 TRANSPARENT { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.TRANSPARENT_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float MACHINE_EPSILON_0 { - get { - float ret = NDalicPINVOKE.MACHINE_EPSILON_0_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float MACHINE_EPSILON_1 { - get { - float ret = NDalicPINVOKE.MACHINE_EPSILON_1_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float MACHINE_EPSILON_10 { - get { - float ret = NDalicPINVOKE.MACHINE_EPSILON_10_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float MACHINE_EPSILON_100 { - get { - float ret = NDalicPINVOKE.MACHINE_EPSILON_100_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float MACHINE_EPSILON_1000 { - get { - float ret = NDalicPINVOKE.MACHINE_EPSILON_1000_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float MACHINE_EPSILON_10000 { - get { - float ret = NDalicPINVOKE.MACHINE_EPSILON_10000_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float PI { - get { - float ret = NDalicPINVOKE.PI_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float PI_2 { - get { - float ret = NDalicPINVOKE.PI_2_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float PI_4 { - get { - float ret = NDalicPINVOKE.PI_4_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float PI_OVER_180 { - get { - float ret = NDalicPINVOKE.PI_OVER_180_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static float ONE80_OVER_PI { - get { - float ret = NDalicPINVOKE.ONE80_OVER_PI_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static ResizePolicyType ResizePolicyDefault { - get { - ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.ResizePolicyDefault_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static PixelFormat FIRST_VALID_PIXEL_FORMAT { - get { - PixelFormat ret = (PixelFormat)NDalicPINVOKE.FIRST_VALID_PIXEL_FORMAT_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static PixelFormat LAST_VALID_PIXEL_FORMAT { - get { - PixelFormat ret = (PixelFormat)NDalicPINVOKE.LAST_VALID_PIXEL_FORMAT_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool HasAlpha(PixelFormat pixelformat) { - bool ret = NDalicPINVOKE.HasAlpha((int)pixelformat); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static uint GetBytesPerPixel(PixelFormat pixelFormat) { - uint ret = NDalicPINVOKE.GetBytesPerPixel((int)pixelFormat); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void GetAlphaOffsetAndMask(PixelFormat pixelFormat, SWIGTYPE_p_int byteOffset, SWIGTYPE_p_int bitMask) { - NDalicPINVOKE.GetAlphaOffsetAndMask((int)pixelFormat, SWIGTYPE_p_int.getCPtr(byteOffset), SWIGTYPE_p_int.getCPtr(bitMask)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static uint POSITIVE_X { - get { - uint ret = NDalicPINVOKE.POSITIVE_X_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static uint NEGATIVE_X { - get { - uint ret = NDalicPINVOKE.NEGATIVE_X_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static uint POSITIVE_Y { - get { - uint ret = NDalicPINVOKE.POSITIVE_Y_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static uint NEGATIVE_Y { - get { - uint ret = NDalicPINVOKE.NEGATIVE_Y_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static uint POSITIVE_Z { - get { - uint ret = NDalicPINVOKE.POSITIVE_Z_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static uint NEGATIVE_Z { - get { - uint ret = NDalicPINVOKE.NEGATIVE_Z_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private static string GetDeviceName(Key keyEvent) { - string ret = NDalicPINVOKE.GetDeviceName(Key.getCPtr(keyEvent)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static DeviceClassType GetDeviceClass(Key keyEvent) { - DeviceClassType ret = (DeviceClassType)NDalicPINVOKE.GetDeviceClass(Key.getCPtr(keyEvent)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void UnparentAndReset(View view) { - NDalicPINVOKE.UnparentAndReset(View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void Raise(View view) { - NDalicPINVOKE.Raise(View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void Lower(View view) { - NDalicPINVOKE.Lower(View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void RaiseToTop(View view) { - NDalicPINVOKE.RaiseToTop(View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void LowerToBottom(View view) { - NDalicPINVOKE.LowerToBottom(View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void RaiseAbove(View view, View target) { - NDalicPINVOKE.RaiseAbove(View.getCPtr(view), View.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void LowerBelow(View view, View target) { - NDalicPINVOKE.LowerBelow(View.getCPtr(view), View.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static ViewVisibilityChangedSignal VisibilityChangedSignal(View view) { - ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static FittingModeType FittingModeDefault { - get { - FittingModeType ret = (FittingModeType)NDalicPINVOKE.FittingModeDefault_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static SamplingModeType DEFAULT { - get { - SamplingModeType ret = (SamplingModeType)NDalicPINVOKE.DEFAULT_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static WindowFocusSignalType FocusChangedSignal(Window window) { - WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(Window.getCPtr(window)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void SetAcceptFocus(Window window, bool accept) { - NDalicPINVOKE.SetAcceptFocus(Window.getCPtr(window), accept); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static bool IsFocusAcceptable(Window window) { - bool ret = NDalicPINVOKE.IsFocusAcceptable(Window.getCPtr(window)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void Show(Window window) { - NDalicPINVOKE.Show(Window.getCPtr(window)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void Hide(Window window) { - NDalicPINVOKE.Hide(Window.getCPtr(window)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static bool IsVisible(Window window) { - bool ret = NDalicPINVOKE.IsVisible(Window.getCPtr(window)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static ViewImpl GetImplementation(View handle) { - ViewImpl ret = new ViewImpl(NDalicPINVOKE.GetImplementation__SWIG_0(View.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static KeyInputFocusSignal ResourceReadySignal(View control) { - KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.ResourceReadySignal(View.getCPtr(control)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsResourceReady(View control) { - bool ret = NDalicPINVOKE.IsResourceReady(View.getCPtr(control)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsVertical(ControlOrientationType orientation) { - bool ret = NDalicPINVOKE.IsVertical((int)orientation); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsHorizontal(ControlOrientationType orientation) { - bool ret = NDalicPINVOKE.IsHorizontal((int)orientation); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t NewItemLayout(DefaultItemLayoutType type) { - SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.NewItemLayout((int)type), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void MoveActorConstraint(Vector3 current, SWIGTYPE_p_PropertyInputContainer inputs) { - NDalicPINVOKE.MoveActorConstraint(Vector3.getCPtr(current), SWIGTYPE_p_PropertyInputContainer.getCPtr(inputs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static void WrapActorConstraint(Vector3 position, SWIGTYPE_p_PropertyInputContainer inputs) { - NDalicPINVOKE.WrapActorConstraint(Vector3.getCPtr(position), SWIGTYPE_p_PropertyInputContainer.getCPtr(inputs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static uint DEFAULT_RENDERING_BACKEND { - get { - uint ret = NDalicPINVOKE.DEFAULT_RENDERING_BACKEND_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static PixelData LoadImageSynchronously(string url) { - PixelData ret = new PixelData(NDalicPINVOKE.LoadImageSynchronously__SWIG_0(url), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PixelData LoadImageSynchronously(string url, Uint16Pair dimensions) { - PixelData ret = new PixelData(NDalicPINVOKE.LoadImageSynchronously__SWIG_1(url, Uint16Pair.getCPtr(dimensions)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static PixelData LoadImageSynchronously(string url, Uint16Pair dimensions, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) { - PixelData ret = new PixelData(NDalicPINVOKE.LoadImageSynchronously__SWIG_2(url, Uint16Pair.getCPtr(dimensions), (int)fittingMode, (int)samplingMode, orientationCorrection), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void SetCustomAlgorithm(SWIGTYPE_p_KeyboardFocusManager keyboardFocusManager, CustomAlgorithmInterface arg1) { - NDalicPINVOKE.SetCustomAlgorithm(SWIGTYPE_p_KeyboardFocusManager.getCPtr(keyboardFocusManager), CustomAlgorithmInterface.getCPtr(arg1)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int VISUAL_PROPERTY_TYPE = NDalicPINVOKE.VISUAL_PROPERTY_TYPE_get(); - public static readonly int VISUAL_PROPERTY_SHADER = NDalicPINVOKE.VISUAL_PROPERTY_SHADER_get(); - - public static readonly int VISUAL_SHADER_VERTEX = NDalicPINVOKE.VISUAL_SHADER_VERTEX_get(); - public static readonly int VISUAL_SHADER_FRAGMENT = NDalicPINVOKE.VISUAL_SHADER_FRAGMENT_get(); - public static readonly int VISUAL_SHADER_SUBDIVIDE_GRID_X = NDalicPINVOKE.VISUAL_SHADER_SUBDIVIDE_GRID_X_get(); - public static readonly int VISUAL_SHADER_SUBDIVIDE_GRID_Y = NDalicPINVOKE.VISUAL_SHADER_SUBDIVIDE_GRID_Y_get(); - public static readonly int VISUAL_SHADER_HINTS = NDalicPINVOKE.VISUAL_SHADER_HINTS_get(); - - public static readonly int BORDER_VISUAL_COLOR = NDalicPINVOKE.BORDER_VISUAL_COLOR_get(); - public static readonly int BORDER_VISUAL_SIZE = NDalicPINVOKE.BORDER_VISUAL_SIZE_get(); - public static readonly int BORDER_VISUAL_ANTI_ALIASING = NDalicPINVOKE.BORDER_VISUAL_ANTI_ALIASING_get(); - - public static readonly int COLOR_VISUAL_MIX_COLOR = NDalicPINVOKE.COLOR_VISUAL_MIX_COLOR_get(); - - public static readonly int GRADIENT_VISUAL_START_POSITION = NDalicPINVOKE.GRADIENT_VISUAL_START_POSITION_get(); - public static readonly int GRADIENT_VISUAL_END_POSITION = NDalicPINVOKE.GRADIENT_VISUAL_END_POSITION_get(); - public static readonly int GRADIENT_VISUAL_CENTER = NDalicPINVOKE.GRADIENT_VISUAL_CENTER_get(); - public static readonly int GRADIENT_VISUAL_RADIUS = NDalicPINVOKE.GRADIENT_VISUAL_RADIUS_get(); - public static readonly int GRADIENT_VISUAL_STOP_OFFSET = NDalicPINVOKE.GRADIENT_VISUAL_STOP_OFFSET_get(); - public static readonly int GRADIENT_VISUAL_STOP_COLOR = NDalicPINVOKE.GRADIENT_VISUAL_STOP_COLOR_get(); - public static readonly int GRADIENT_VISUAL_UNITS = NDalicPINVOKE.GRADIENT_VISUAL_UNITS_get(); - public static readonly int GRADIENT_VISUAL_SPREAD_METHOD = NDalicPINVOKE.GRADIENT_VISUAL_SPREAD_METHOD_get(); - - public static readonly int IMAGE_VISUAL_URL = NDalicPINVOKE.IMAGE_VISUAL_URL_get(); - public static readonly int IMAGE_VISUAL_FITTING_MODE = NDalicPINVOKE.IMAGE_VISUAL_FITTING_MODE_get(); - public static readonly int IMAGE_VISUAL_SAMPLING_MODE = NDalicPINVOKE.IMAGE_VISUAL_SAMPLING_MODE_get(); - public static readonly int IMAGE_VISUAL_DESIRED_WIDTH = NDalicPINVOKE.IMAGE_VISUAL_DESIRED_WIDTH_get(); - public static readonly int IMAGE_VISUAL_DESIRED_HEIGHT = NDalicPINVOKE.IMAGE_VISUAL_DESIRED_HEIGHT_get(); - public static readonly int IMAGE_VISUAL_SYNCHRONOUS_LOADING = NDalicPINVOKE.IMAGE_VISUAL_SYNCHRONOUS_LOADING_get(); - public static readonly int IMAGE_VISUAL_BORDER_ONLY = NDalicPINVOKE.IMAGE_VISUAL_BORDER_ONLY_get(); - public static readonly int IMAGE_VISUAL_PIXEL_AREA = NDalicPINVOKE.IMAGE_VISUAL_PIXEL_AREA_get(); - public static readonly int IMAGE_VISUAL_WRAP_MODE_U = NDalicPINVOKE.IMAGE_VISUAL_WRAP_MODE_U_get(); - public static readonly int IMAGE_VISUAL_WRAP_MODE_V = NDalicPINVOKE.IMAGE_VISUAL_WRAP_MODE_V_get(); - - public static readonly int MESH_VISUAL_OBJECT_URL = NDalicPINVOKE.MESH_VISUAL_OBJECT_URL_get(); - public static readonly int MESH_VISUAL_MATERIAL_URL = NDalicPINVOKE.MESH_VISUAL_MATERIAL_URL_get(); - public static readonly int MESH_VISUAL_TEXTURES_PATH = NDalicPINVOKE.MESH_VISUAL_TEXTURES_PATH_get(); - public static readonly int MESH_VISUAL_SHADING_MODE = NDalicPINVOKE.MESH_VISUAL_SHADING_MODE_get(); - public static readonly int MESH_VISUAL_USE_MIPMAPPING = NDalicPINVOKE.MESH_VISUAL_USE_MIPMAPPING_get(); - public static readonly int MESH_VISUAL_USE_SOFT_NORMALS = NDalicPINVOKE.MESH_VISUAL_USE_SOFT_NORMALS_get(); - public static readonly int MESH_VISUAL_LIGHT_POSITION = NDalicPINVOKE.MESH_VISUAL_LIGHT_POSITION_get(); - - public static readonly int PRIMITIVE_VISUAL_SHAPE = NDalicPINVOKE.PRIMITIVE_VISUAL_SHAPE_get(); - public static readonly int PRIMITIVE_VISUAL_MIX_COLOR = NDalicPINVOKE.PRIMITIVE_VISUAL_MIX_COLOR_get(); - public static readonly int PRIMITIVE_VISUAL_SLICES = NDalicPINVOKE.PRIMITIVE_VISUAL_SLICES_get(); - public static readonly int PRIMITIVE_VISUAL_STACKS = NDalicPINVOKE.PRIMITIVE_VISUAL_STACKS_get(); - public static readonly int PRIMITIVE_VISUAL_SCALE_TOP_RADIUS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS_get(); - public static readonly int PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS_get(); - public static readonly int PRIMITIVE_VISUAL_SCALE_HEIGHT = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_HEIGHT_get(); - public static readonly int PRIMITIVE_VISUAL_SCALE_RADIUS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_RADIUS_get(); - public static readonly int PRIMITIVE_VISUAL_SCALE_DIMENSIONS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_DIMENSIONS_get(); - public static readonly int PRIMITIVE_VISUAL_BEVEL_PERCENTAGE = NDalicPINVOKE.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE_get(); - public static readonly int PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS = NDalicPINVOKE.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS_get(); - public static readonly int PRIMITIVE_VISUAL_LIGHT_POSITION = NDalicPINVOKE.PRIMITIVE_VISUAL_LIGHT_POSITION_get(); - - public static readonly int TEXT_VISUAL_TEXT = NDalicPINVOKE.TEXT_VISUAL_TEXT_get(); - public static readonly int TEXT_VISUAL_FONT_FAMILY = NDalicPINVOKE.TEXT_VISUAL_FONT_FAMILY_get(); - public static readonly int TEXT_VISUAL_FONT_STYLE = NDalicPINVOKE.TEXT_VISUAL_FONT_STYLE_get(); - public static readonly int TEXT_VISUAL_POINT_SIZE = NDalicPINVOKE.TEXT_VISUAL_POINT_SIZE_get(); - public static readonly int TEXT_VISUAL_MULTI_LINE = NDalicPINVOKE.TEXT_VISUAL_MULTI_LINE_get(); - public static readonly int TEXT_VISUAL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TEXT_VISUAL_HORIZONTAL_ALIGNMENT_get(); - public static readonly int TEXT_VISUAL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TEXT_VISUAL_VERTICAL_ALIGNMENT_get(); - public static readonly int TEXT_VISUAL_TEXT_COLOR = NDalicPINVOKE.TEXT_VISUAL_TEXT_COLOR_get(); - public static readonly int TEXT_VISUAL_ENABLE_MARKUP = NDalicPINVOKE.TEXT_VISUAL_ENABLE_MARKUP_get(); - - public static readonly int TOOLTIP_CONTENT = NDalicPINVOKE.TOOLTIP_CONTENT_get(); - public static readonly int TOOLTIP_LAYOUT = NDalicPINVOKE.TOOLTIP_LAYOUT_get(); - public static readonly int TOOLTIP_WAIT_TIME = NDalicPINVOKE.TOOLTIP_WAIT_TIME_get(); - public static readonly int TOOLTIP_BACKGROUND = NDalicPINVOKE.TOOLTIP_BACKGROUND_get(); - public static readonly int TOOLTIP_TAIL = NDalicPINVOKE.TOOLTIP_TAIL_get(); - public static readonly int TOOLTIP_POSITION = NDalicPINVOKE.TOOLTIP_POSITION_get(); - public static readonly int TOOLTIP_HOVER_POINT_OFFSET = NDalicPINVOKE.TOOLTIP_HOVER_POINT_OFFSET_get(); - public static readonly int TOOLTIP_MOVEMENT_THRESHOLD = NDalicPINVOKE.TOOLTIP_MOVEMENT_THRESHOLD_get(); - public static readonly int TOOLTIP_DISAPPEAR_ON_MOVEMENT = NDalicPINVOKE.TOOLTIP_DISAPPEAR_ON_MOVEMENT_get(); - - public static readonly int TOOLTIP_BACKGROUND_VISUAL = NDalicPINVOKE.TOOLTIP_BACKGROUND_VISUAL_get(); - public static readonly int TOOLTIP_BACKGROUND_BORDER = NDalicPINVOKE.TOOLTIP_BACKGROUND_BORDER_get(); - - public static readonly int TOOLTIP_TAIL_VISIBILITY = NDalicPINVOKE.TOOLTIP_TAIL_VISIBILITY_get(); - public static readonly int TOOLTIP_TAIL_ABOVE_VISUAL = NDalicPINVOKE.TOOLTIP_TAIL_ABOVE_VISUAL_get(); - public static readonly int TOOLTIP_TAIL_BELOW_VISUAL = NDalicPINVOKE.TOOLTIP_TAIL_BELOW_VISUAL_get(); + public static uint int_to_uint(int x) + { + uint ret = NDalicPINVOKE.int_to_uint(x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + public static readonly int VISUAL_PROPERTY_TRANSFORM = NDalicManualPINVOKE.Visual_Property_TRANSFORM_get(); + public static readonly int VISUAL_PROPERTY_PREMULTIPLIED_ALPHA = NDalicManualPINVOKE.Visual_Property_PREMULTIPLIED_ALPHA_get(); + public static readonly int VISUAL_PROPERTY_MIX_COLOR = NDalicManualPINVOKE.Visual_Property_MIX_COLOR_get(); + public static readonly int IMAGE_VISUAL_BORDER = NDalicManualPINVOKE.Image_Visual_BORDER_get(); + + public static void DaliAssertMessage(string location, string condition) + { + NDalicPINVOKE.DaliAssertMessage(location, condition); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static Vector2 Min(Vector2 a, Vector2 b) + { + Vector2 ret = new Vector2(NDalicPINVOKE.Min__SWIG_0(Vector2.getCPtr(a), Vector2.getCPtr(b)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector2 Max(Vector2 a, Vector2 b) + { + Vector2 ret = new Vector2(NDalicPINVOKE.Max__SWIG_0(Vector2.getCPtr(a), Vector2.getCPtr(b)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector2 Clamp(Vector2 v, float min, float max) + { + Vector2 ret = new Vector2(NDalicPINVOKE.Clamp__SWIG_0(Vector2.getCPtr(v), min, max), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector3 Min(Vector3 a, Vector3 b) + { + Vector3 ret = new Vector3(NDalicPINVOKE.Min__SWIG_1(Vector3.getCPtr(a), Vector3.getCPtr(b)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector3 Max(Vector3 a, Vector3 b) + { + Vector3 ret = new Vector3(NDalicPINVOKE.Max__SWIG_1(Vector3.getCPtr(a), Vector3.getCPtr(b)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector3 Clamp(Vector3 v, float min, float max) + { + Vector3 ret = new Vector3(NDalicPINVOKE.Clamp__SWIG_1(Vector3.getCPtr(v), min, max), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector4 Min(Vector4 a, Vector4 b) + { + Vector4 ret = new Vector4(NDalicPINVOKE.Min__SWIG_2(Vector4.getCPtr(a), Vector4.getCPtr(b)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector4 Max(Vector4 a, Vector4 b) + { + Vector4 ret = new Vector4(NDalicPINVOKE.Max__SWIG_2(Vector4.getCPtr(a), Vector4.getCPtr(b)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector4 Clamp(Vector4 v, float min, float max) + { + Vector4 ret = new Vector4(NDalicPINVOKE.Clamp__SWIG_2(Vector4.getCPtr(v), min, max), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Radian ANGLE_360 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_360_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_315 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_315_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_270 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_270_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_225 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_225_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_180 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_180_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_135 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_135_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_120 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_120_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_90 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_90_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_60 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_60_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_45 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_45_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_30 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_30_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian ANGLE_0 + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ANGLE_0_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool EqualTo(Degree lhs, Degree rhs) + { + bool ret = NDalicPINVOKE.EqualTo__SWIG_5(Degree.getCPtr(lhs), Degree.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool NotEqualTo(Degree lhs, Degree rhs) + { + bool ret = NDalicPINVOKE.NotEqualTo__SWIG_4(Degree.getCPtr(lhs), Degree.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Degree Clamp(Degree angle, float min, float max) + { + Degree ret = new Degree(NDalicPINVOKE.Clamp__SWIG_3(Degree.getCPtr(angle), min, max), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool EqualTo(Radian lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.EqualTo__SWIG_6(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool NotEqualTo(Radian lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.NotEqualTo__SWIG_5(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool EqualTo(Radian lhs, Degree rhs) + { + bool ret = NDalicPINVOKE.EqualTo__SWIG_7(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool NotEqualTo(Radian lhs, Degree rhs) + { + bool ret = NDalicPINVOKE.NotEqualTo__SWIG_6(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool EqualTo(Degree lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.EqualTo__SWIG_8(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool NotEqualTo(Degree lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.NotEqualTo__SWIG_7(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool GreaterThan(Radian lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.GreaterThan__SWIG_0(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool GreaterThan(Radian lhs, Degree rhs) + { + bool ret = NDalicPINVOKE.GreaterThan__SWIG_1(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool GreaterThan(Degree lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.GreaterThan__SWIG_2(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool LessThan(Radian lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.LessThan__SWIG_0(Radian.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool LessThan(Radian lhs, Degree rhs) + { + bool ret = NDalicPINVOKE.LessThan__SWIG_1(Radian.getCPtr(lhs), Degree.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool LessThan(Degree lhs, Radian rhs) + { + bool ret = NDalicPINVOKE.LessThan__SWIG_2(Degree.getCPtr(lhs), Radian.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Radian Multiply(Radian lhs, float rhs) + { + Radian ret = new Radian(NDalicPINVOKE.Multiply(Radian.getCPtr(lhs), rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Radian Subtract(Radian arg0) + { + Radian ret = new Radian(NDalicPINVOKE.Subtract(Radian.getCPtr(arg0)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Radian Clamp(Radian angle, float min, float max) + { + Radian ret = new Radian(NDalicPINVOKE.Clamp__SWIG_4(Radian.getCPtr(angle), min, max), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static float Range(float f0, float f1) + { + float ret = NDalicPINVOKE.Range(f0, f1); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static Vector4 Axis() + { + Vector4 ret = new Vector4(NDalicPINVOKE.Axis(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool EqualTo(AngleAxis lhs, AngleAxis rhs) + { + bool ret = NDalicPINVOKE.EqualTo__SWIG_9(AngleAxis.getCPtr(lhs), AngleAxis.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static uint NextPowerOfTwo(uint i) + { + uint ret = NDalicPINVOKE.NextPowerOfTwo(i); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool IsPowerOfTwo(uint i) + { + bool ret = NDalicPINVOKE.IsPowerOfTwo(i); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static float GetRangedEpsilon(float a, float b) + { + float ret = NDalicPINVOKE.GetRangedEpsilon(a, b); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool EqualsZero(float value) + { + bool ret = NDalicPINVOKE.EqualsZero(value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool Equals(float a, float b) + { + bool ret = NDalicPINVOKE.Equals__SWIG_0(a, b); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool Equals(float a, float b, float epsilon) + { + bool ret = NDalicPINVOKE.Equals__SWIG_1(a, b, epsilon); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static float Round(float value, int pos) + { + float ret = NDalicPINVOKE.Round(value, pos); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static float WrapInDomain(float x, float start, float end) + { + float ret = NDalicPINVOKE.WrapInDomain(x, start, end); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static float ShortestDistanceInDomain(float a, float b, float start, float end) + { + float ret = NDalicPINVOKE.ShortestDistanceInDomain(a, b, start, end); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static string GetName(PropertyType type) + { + string ret = NDalicPINVOKE.GetName((int)type); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static BaseObject GetImplementation(BaseHandle handle) + { + BaseObject ret = new BaseObject(NDalicPINVOKE.GetImplementation(BaseHandle.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool LessThan(BaseHandle lhs, BaseHandle rhs) + { + bool ret = NDalicPINVOKE.LessThan__SWIG_3(BaseHandle.getCPtr(lhs), BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition LessThanCondition(float arg) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.LessThanCondition(arg), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition GreaterThanCondition(float arg) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.GreaterThanCondition(arg), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition InsideCondition(float arg0, float arg1) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.InsideCondition(arg0, arg1), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition OutsideCondition(float arg0, float arg1) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.OutsideCondition(arg0, arg1), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition StepCondition(float stepAmount, float initialValue) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_0(stepAmount, initialValue), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition StepCondition(float stepAmount) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.StepCondition__SWIG_1(stepAmount), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PropertyCondition VariableStepCondition(VectorFloat steps) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.VariableStepCondition(VectorFloat.getCPtr(steps)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static int WEIGHT + { + get + { + int ret = NDalicPINVOKE.WEIGHT_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool RegisterType(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); + { + bool ret = NDalicPINVOKE.RegisterType(name, SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool RegisterProperty(string objectName, string name, int index, PropertyType type, System.Delegate setFunc, System.Delegate getFunc) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(setFunc); + System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(getFunc); + { + bool ret = NDalicPINVOKE.RegisterProperty(objectName, name, index, (int)type, new System.Runtime.InteropServices.HandleRef(null, ip), new System.Runtime.InteropServices.HandleRef(null, ip2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float ParentOriginTop + { + get + { + float ret = NDalicPINVOKE.ParentOriginTop_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float ParentOriginBottom + { + get + { + float ret = NDalicPINVOKE.ParentOriginBottom_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float ParentOriginLeft + { + get + { + float ret = NDalicPINVOKE.ParentOriginLeft_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float ParentOriginRight + { + get + { + float ret = NDalicPINVOKE.ParentOriginRight_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float ParentOriginMiddle + { + get + { + float ret = NDalicPINVOKE.ParentOriginMiddle_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginTopLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginTopCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginTopRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginCenterLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginCenterRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginBottomLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginBottomCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 ParentOriginBottomRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float AnchorPointTop + { + get + { + float ret = NDalicPINVOKE.AnchorPointTop_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float AnchorPointBottom + { + get + { + float ret = NDalicPINVOKE.AnchorPointBottom_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float AnchorPointLeft + { + get + { + float ret = NDalicPINVOKE.AnchorPointLeft_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float AnchorPointRight + { + get + { + float ret = NDalicPINVOKE.AnchorPointRight_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float AnchorPointMiddle + { + get + { + float ret = NDalicPINVOKE.AnchorPointMiddle_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointTopLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointTopCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointTopRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointCenterLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointCenterRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointBottomLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointBottomCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector3 AnchorPointBottomRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get(); + Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 BLACK + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.BLACK_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 WHITE + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.WHITE_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 RED + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.RED_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 GREEN + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.GREEN_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 BLUE + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.BLUE_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 YELLOW + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.YELLOW_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 MAGENTA + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.MAGENTA_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 CYAN + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.CYAN_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 TRANSPARENT + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.TRANSPARENT_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float MACHINE_EPSILON_0 + { + get + { + float ret = NDalicPINVOKE.MACHINE_EPSILON_0_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float MACHINE_EPSILON_1 + { + get + { + float ret = NDalicPINVOKE.MACHINE_EPSILON_1_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float MACHINE_EPSILON_10 + { + get + { + float ret = NDalicPINVOKE.MACHINE_EPSILON_10_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float MACHINE_EPSILON_100 + { + get + { + float ret = NDalicPINVOKE.MACHINE_EPSILON_100_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float MACHINE_EPSILON_1000 + { + get + { + float ret = NDalicPINVOKE.MACHINE_EPSILON_1000_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float MACHINE_EPSILON_10000 + { + get + { + float ret = NDalicPINVOKE.MACHINE_EPSILON_10000_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float PI + { + get + { + float ret = NDalicPINVOKE.PI_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float PI_2 + { + get + { + float ret = NDalicPINVOKE.PI_2_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float PI_4 + { + get + { + float ret = NDalicPINVOKE.PI_4_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float PI_OVER_180 + { + get + { + float ret = NDalicPINVOKE.PI_OVER_180_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static float ONE80_OVER_PI + { + get + { + float ret = NDalicPINVOKE.ONE80_OVER_PI_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static ResizePolicyType ResizePolicyDefault + { + get + { + ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.ResizePolicyDefault_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static PixelFormat FIRST_VALID_PIXEL_FORMAT + { + get + { + PixelFormat ret = (PixelFormat)NDalicPINVOKE.FIRST_VALID_PIXEL_FORMAT_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static PixelFormat LAST_VALID_PIXEL_FORMAT + { + get + { + PixelFormat ret = (PixelFormat)NDalicPINVOKE.LAST_VALID_PIXEL_FORMAT_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool HasAlpha(PixelFormat pixelformat) + { + bool ret = NDalicPINVOKE.HasAlpha((int)pixelformat); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static uint GetBytesPerPixel(PixelFormat pixelFormat) + { + uint ret = NDalicPINVOKE.GetBytesPerPixel((int)pixelFormat); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void GetAlphaOffsetAndMask(PixelFormat pixelFormat, SWIGTYPE_p_int byteOffset, SWIGTYPE_p_int bitMask) + { + NDalicPINVOKE.GetAlphaOffsetAndMask((int)pixelFormat, SWIGTYPE_p_int.getCPtr(byteOffset), SWIGTYPE_p_int.getCPtr(bitMask)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static uint POSITIVE_X + { + get + { + uint ret = NDalicPINVOKE.POSITIVE_X_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static uint NEGATIVE_X + { + get + { + uint ret = NDalicPINVOKE.NEGATIVE_X_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static uint POSITIVE_Y + { + get + { + uint ret = NDalicPINVOKE.POSITIVE_Y_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static uint NEGATIVE_Y + { + get + { + uint ret = NDalicPINVOKE.NEGATIVE_Y_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static uint POSITIVE_Z + { + get + { + uint ret = NDalicPINVOKE.POSITIVE_Z_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static uint NEGATIVE_Z + { + get + { + uint ret = NDalicPINVOKE.NEGATIVE_Z_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private static string GetDeviceName(Key keyEvent) + { + string ret = NDalicPINVOKE.GetDeviceName(Key.getCPtr(keyEvent)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static DeviceClassType GetDeviceClass(Key keyEvent) + { + DeviceClassType ret = (DeviceClassType)NDalicPINVOKE.GetDeviceClass(Key.getCPtr(keyEvent)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void UnparentAndReset(View view) + { + NDalicPINVOKE.UnparentAndReset(View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void Raise(View view) + { + NDalicPINVOKE.Raise(View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void Lower(View view) + { + NDalicPINVOKE.Lower(View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void RaiseToTop(View view) + { + NDalicPINVOKE.RaiseToTop(View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void LowerToBottom(View view) + { + NDalicPINVOKE.LowerToBottom(View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void RaiseAbove(View view, View target) + { + NDalicPINVOKE.RaiseAbove(View.getCPtr(view), View.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void LowerBelow(View view, View target) + { + NDalicPINVOKE.LowerBelow(View.getCPtr(view), View.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static ViewVisibilityChangedSignal VisibilityChangedSignal(View view) + { + ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static FittingModeType FittingModeDefault + { + get + { + FittingModeType ret = (FittingModeType)NDalicPINVOKE.FittingModeDefault_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static SamplingModeType DEFAULT + { + get + { + SamplingModeType ret = (SamplingModeType)NDalicPINVOKE.DEFAULT_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static WindowFocusSignalType FocusChangedSignal(Window window) + { + WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(Window.getCPtr(window)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void SetAcceptFocus(Window window, bool accept) + { + NDalicPINVOKE.SetAcceptFocus(Window.getCPtr(window), accept); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static bool IsFocusAcceptable(Window window) + { + bool ret = NDalicPINVOKE.IsFocusAcceptable(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void Show(Window window) + { + NDalicPINVOKE.Show(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void Hide(Window window) + { + NDalicPINVOKE.Hide(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static bool IsVisible(Window window) + { + bool ret = NDalicPINVOKE.IsVisible(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static ViewImpl GetImplementation(View handle) + { + ViewImpl ret = new ViewImpl(NDalicPINVOKE.GetImplementation__SWIG_0(View.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static KeyInputFocusSignal ResourceReadySignal(View control) + { + KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.ResourceReadySignal(View.getCPtr(control)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool IsResourceReady(View control) + { + bool ret = NDalicPINVOKE.IsResourceReady(View.getCPtr(control)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool IsVertical(ControlOrientationType orientation) + { + bool ret = NDalicPINVOKE.IsVertical((int)orientation); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool IsHorizontal(ControlOrientationType orientation) + { + bool ret = NDalicPINVOKE.IsHorizontal((int)orientation); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t NewItemLayout(DefaultItemLayoutType type) + { + SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t ret = new SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(NDalicPINVOKE.NewItemLayout((int)type), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void MoveActorConstraint(Vector3 current, SWIGTYPE_p_PropertyInputContainer inputs) + { + NDalicPINVOKE.MoveActorConstraint(Vector3.getCPtr(current), SWIGTYPE_p_PropertyInputContainer.getCPtr(inputs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void WrapActorConstraint(Vector3 position, SWIGTYPE_p_PropertyInputContainer inputs) + { + NDalicPINVOKE.WrapActorConstraint(Vector3.getCPtr(position), SWIGTYPE_p_PropertyInputContainer.getCPtr(inputs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static uint DEFAULT_RENDERING_BACKEND + { + get + { + uint ret = NDalicPINVOKE.DEFAULT_RENDERING_BACKEND_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static PixelData LoadImageSynchronously(string url) + { + PixelData ret = new PixelData(NDalicPINVOKE.LoadImageSynchronously__SWIG_0(url), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PixelData LoadImageSynchronously(string url, Uint16Pair dimensions) + { + PixelData ret = new PixelData(NDalicPINVOKE.LoadImageSynchronously__SWIG_1(url, Uint16Pair.getCPtr(dimensions)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static PixelData LoadImageSynchronously(string url, Uint16Pair dimensions, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) + { + PixelData ret = new PixelData(NDalicPINVOKE.LoadImageSynchronously__SWIG_2(url, Uint16Pair.getCPtr(dimensions), (int)fittingMode, (int)samplingMode, orientationCorrection), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void SetCustomAlgorithm(SWIGTYPE_p_KeyboardFocusManager keyboardFocusManager, CustomAlgorithmInterface arg1) + { + NDalicPINVOKE.SetCustomAlgorithm(SWIGTYPE_p_KeyboardFocusManager.getCPtr(keyboardFocusManager), CustomAlgorithmInterface.getCPtr(arg1)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int VISUAL_PROPERTY_TYPE = NDalicPINVOKE.VISUAL_PROPERTY_TYPE_get(); + public static readonly int VISUAL_PROPERTY_SHADER = NDalicPINVOKE.VISUAL_PROPERTY_SHADER_get(); + + public static readonly int VISUAL_SHADER_VERTEX = NDalicPINVOKE.VISUAL_SHADER_VERTEX_get(); + public static readonly int VISUAL_SHADER_FRAGMENT = NDalicPINVOKE.VISUAL_SHADER_FRAGMENT_get(); + public static readonly int VISUAL_SHADER_SUBDIVIDE_GRID_X = NDalicPINVOKE.VISUAL_SHADER_SUBDIVIDE_GRID_X_get(); + public static readonly int VISUAL_SHADER_SUBDIVIDE_GRID_Y = NDalicPINVOKE.VISUAL_SHADER_SUBDIVIDE_GRID_Y_get(); + public static readonly int VISUAL_SHADER_HINTS = NDalicPINVOKE.VISUAL_SHADER_HINTS_get(); + + public static readonly int BORDER_VISUAL_COLOR = NDalicPINVOKE.BORDER_VISUAL_COLOR_get(); + public static readonly int BORDER_VISUAL_SIZE = NDalicPINVOKE.BORDER_VISUAL_SIZE_get(); + public static readonly int BORDER_VISUAL_ANTI_ALIASING = NDalicPINVOKE.BORDER_VISUAL_ANTI_ALIASING_get(); + + public static readonly int COLOR_VISUAL_MIX_COLOR = NDalicPINVOKE.COLOR_VISUAL_MIX_COLOR_get(); + + public static readonly int GRADIENT_VISUAL_START_POSITION = NDalicPINVOKE.GRADIENT_VISUAL_START_POSITION_get(); + public static readonly int GRADIENT_VISUAL_END_POSITION = NDalicPINVOKE.GRADIENT_VISUAL_END_POSITION_get(); + public static readonly int GRADIENT_VISUAL_CENTER = NDalicPINVOKE.GRADIENT_VISUAL_CENTER_get(); + public static readonly int GRADIENT_VISUAL_RADIUS = NDalicPINVOKE.GRADIENT_VISUAL_RADIUS_get(); + public static readonly int GRADIENT_VISUAL_STOP_OFFSET = NDalicPINVOKE.GRADIENT_VISUAL_STOP_OFFSET_get(); + public static readonly int GRADIENT_VISUAL_STOP_COLOR = NDalicPINVOKE.GRADIENT_VISUAL_STOP_COLOR_get(); + public static readonly int GRADIENT_VISUAL_UNITS = NDalicPINVOKE.GRADIENT_VISUAL_UNITS_get(); + public static readonly int GRADIENT_VISUAL_SPREAD_METHOD = NDalicPINVOKE.GRADIENT_VISUAL_SPREAD_METHOD_get(); + + public static readonly int IMAGE_VISUAL_URL = NDalicPINVOKE.IMAGE_VISUAL_URL_get(); + public static readonly int IMAGE_VISUAL_FITTING_MODE = NDalicPINVOKE.IMAGE_VISUAL_FITTING_MODE_get(); + public static readonly int IMAGE_VISUAL_SAMPLING_MODE = NDalicPINVOKE.IMAGE_VISUAL_SAMPLING_MODE_get(); + public static readonly int IMAGE_VISUAL_DESIRED_WIDTH = NDalicPINVOKE.IMAGE_VISUAL_DESIRED_WIDTH_get(); + public static readonly int IMAGE_VISUAL_DESIRED_HEIGHT = NDalicPINVOKE.IMAGE_VISUAL_DESIRED_HEIGHT_get(); + public static readonly int IMAGE_VISUAL_SYNCHRONOUS_LOADING = NDalicPINVOKE.IMAGE_VISUAL_SYNCHRONOUS_LOADING_get(); + public static readonly int IMAGE_VISUAL_BORDER_ONLY = NDalicPINVOKE.IMAGE_VISUAL_BORDER_ONLY_get(); + public static readonly int IMAGE_VISUAL_PIXEL_AREA = NDalicPINVOKE.IMAGE_VISUAL_PIXEL_AREA_get(); + public static readonly int IMAGE_VISUAL_WRAP_MODE_U = NDalicPINVOKE.IMAGE_VISUAL_WRAP_MODE_U_get(); + public static readonly int IMAGE_VISUAL_WRAP_MODE_V = NDalicPINVOKE.IMAGE_VISUAL_WRAP_MODE_V_get(); + + public static readonly int MESH_VISUAL_OBJECT_URL = NDalicPINVOKE.MESH_VISUAL_OBJECT_URL_get(); + public static readonly int MESH_VISUAL_MATERIAL_URL = NDalicPINVOKE.MESH_VISUAL_MATERIAL_URL_get(); + public static readonly int MESH_VISUAL_TEXTURES_PATH = NDalicPINVOKE.MESH_VISUAL_TEXTURES_PATH_get(); + public static readonly int MESH_VISUAL_SHADING_MODE = NDalicPINVOKE.MESH_VISUAL_SHADING_MODE_get(); + public static readonly int MESH_VISUAL_USE_MIPMAPPING = NDalicPINVOKE.MESH_VISUAL_USE_MIPMAPPING_get(); + public static readonly int MESH_VISUAL_USE_SOFT_NORMALS = NDalicPINVOKE.MESH_VISUAL_USE_SOFT_NORMALS_get(); + public static readonly int MESH_VISUAL_LIGHT_POSITION = NDalicPINVOKE.MESH_VISUAL_LIGHT_POSITION_get(); + + public static readonly int PRIMITIVE_VISUAL_SHAPE = NDalicPINVOKE.PRIMITIVE_VISUAL_SHAPE_get(); + public static readonly int PRIMITIVE_VISUAL_MIX_COLOR = NDalicPINVOKE.PRIMITIVE_VISUAL_MIX_COLOR_get(); + public static readonly int PRIMITIVE_VISUAL_SLICES = NDalicPINVOKE.PRIMITIVE_VISUAL_SLICES_get(); + public static readonly int PRIMITIVE_VISUAL_STACKS = NDalicPINVOKE.PRIMITIVE_VISUAL_STACKS_get(); + public static readonly int PRIMITIVE_VISUAL_SCALE_TOP_RADIUS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS_get(); + public static readonly int PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS_get(); + public static readonly int PRIMITIVE_VISUAL_SCALE_HEIGHT = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_HEIGHT_get(); + public static readonly int PRIMITIVE_VISUAL_SCALE_RADIUS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_RADIUS_get(); + public static readonly int PRIMITIVE_VISUAL_SCALE_DIMENSIONS = NDalicPINVOKE.PRIMITIVE_VISUAL_SCALE_DIMENSIONS_get(); + public static readonly int PRIMITIVE_VISUAL_BEVEL_PERCENTAGE = NDalicPINVOKE.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE_get(); + public static readonly int PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS = NDalicPINVOKE.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS_get(); + public static readonly int PRIMITIVE_VISUAL_LIGHT_POSITION = NDalicPINVOKE.PRIMITIVE_VISUAL_LIGHT_POSITION_get(); + + public static readonly int TEXT_VISUAL_TEXT = NDalicPINVOKE.TEXT_VISUAL_TEXT_get(); + public static readonly int TEXT_VISUAL_FONT_FAMILY = NDalicPINVOKE.TEXT_VISUAL_FONT_FAMILY_get(); + public static readonly int TEXT_VISUAL_FONT_STYLE = NDalicPINVOKE.TEXT_VISUAL_FONT_STYLE_get(); + public static readonly int TEXT_VISUAL_POINT_SIZE = NDalicPINVOKE.TEXT_VISUAL_POINT_SIZE_get(); + public static readonly int TEXT_VISUAL_MULTI_LINE = NDalicPINVOKE.TEXT_VISUAL_MULTI_LINE_get(); + public static readonly int TEXT_VISUAL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TEXT_VISUAL_HORIZONTAL_ALIGNMENT_get(); + public static readonly int TEXT_VISUAL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TEXT_VISUAL_VERTICAL_ALIGNMENT_get(); + public static readonly int TEXT_VISUAL_TEXT_COLOR = NDalicPINVOKE.TEXT_VISUAL_TEXT_COLOR_get(); + public static readonly int TEXT_VISUAL_ENABLE_MARKUP = NDalicPINVOKE.TEXT_VISUAL_ENABLE_MARKUP_get(); + + public static readonly int TOOLTIP_CONTENT = NDalicPINVOKE.TOOLTIP_CONTENT_get(); + public static readonly int TOOLTIP_LAYOUT = NDalicPINVOKE.TOOLTIP_LAYOUT_get(); + public static readonly int TOOLTIP_WAIT_TIME = NDalicPINVOKE.TOOLTIP_WAIT_TIME_get(); + public static readonly int TOOLTIP_BACKGROUND = NDalicPINVOKE.TOOLTIP_BACKGROUND_get(); + public static readonly int TOOLTIP_TAIL = NDalicPINVOKE.TOOLTIP_TAIL_get(); + public static readonly int TOOLTIP_POSITION = NDalicPINVOKE.TOOLTIP_POSITION_get(); + public static readonly int TOOLTIP_HOVER_POINT_OFFSET = NDalicPINVOKE.TOOLTIP_HOVER_POINT_OFFSET_get(); + public static readonly int TOOLTIP_MOVEMENT_THRESHOLD = NDalicPINVOKE.TOOLTIP_MOVEMENT_THRESHOLD_get(); + public static readonly int TOOLTIP_DISAPPEAR_ON_MOVEMENT = NDalicPINVOKE.TOOLTIP_DISAPPEAR_ON_MOVEMENT_get(); + + public static readonly int TOOLTIP_BACKGROUND_VISUAL = NDalicPINVOKE.TOOLTIP_BACKGROUND_VISUAL_get(); + public static readonly int TOOLTIP_BACKGROUND_BORDER = NDalicPINVOKE.TOOLTIP_BACKGROUND_BORDER_get(); + + public static readonly int TOOLTIP_TAIL_VISIBILITY = NDalicPINVOKE.TOOLTIP_TAIL_VISIBILITY_get(); + public static readonly int TOOLTIP_TAIL_ABOVE_VISUAL = NDalicPINVOKE.TOOLTIP_TAIL_ABOVE_VISUAL_get(); + public static readonly int TOOLTIP_TAIL_BELOW_VISUAL = NDalicPINVOKE.TOOLTIP_TAIL_BELOW_VISUAL_get(); -} + } } diff --git a/src/Tizen.NUI/src/internal/NativeImage.cs b/src/Tizen.NUI/src/internal/NativeImage.cs old mode 100644 new mode 100755 index b157cb3..d0fad0c --- a/src/Tizen.NUI/src/internal/NativeImage.cs +++ b/src/Tizen.NUI/src/internal/NativeImage.cs @@ -24,76 +24,100 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class NativeImage : Image { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class NativeImage : Image + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal NativeImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NativeImage_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal NativeImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NativeImage_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NativeImage obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NativeImage obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_NativeImage(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_NativeImage(swigCPtr); + public NativeImage(NativeImageInterface nativeImageInterface) : this(NDalicPINVOKE.NativeImage_New(NativeImageInterface.getCPtr(nativeImageInterface)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public NativeImage(NativeImage handle) : this(NDalicPINVOKE.new_NativeImage__SWIG_1(NativeImage.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public NativeImage (NativeImageInterface nativeImageInterface) : this (NDalicPINVOKE.NativeImage_New(NativeImageInterface.getCPtr(nativeImageInterface)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public NativeImage(NativeImage handle) : this(NDalicPINVOKE.new_NativeImage__SWIG_1(NativeImage.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public NativeImage Assign(NativeImage rhs) { - NativeImage ret = new NativeImage(NDalicPINVOKE.NativeImage_Assign(swigCPtr, NativeImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void CreateGlTexture() { - NDalicPINVOKE.NativeImage_CreateGlTexture(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new static NativeImage DownCast(BaseHandle handle) { - NativeImage ret = new NativeImage(NDalicPINVOKE.NativeImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetCustomFragmentPreFix() { - string ret = NDalicPINVOKE.NativeImage_GetCustomFragmentPreFix(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetCustomSamplerTypename() { - string ret = NDalicPINVOKE.NativeImage_GetCustomSamplerTypename(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public NativeImage Assign(NativeImage rhs) + { + NativeImage ret = new NativeImage(NDalicPINVOKE.NativeImage_Assign(swigCPtr, NativeImage.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void CreateGlTexture() + { + NDalicPINVOKE.NativeImage_CreateGlTexture(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new static NativeImage DownCast(BaseHandle handle) + { + NativeImage ret = new NativeImage(NDalicPINVOKE.NativeImage_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetCustomFragmentPreFix() + { + string ret = NDalicPINVOKE.NativeImage_GetCustomFragmentPreFix(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetCustomSamplerTypename() + { + string ret = NDalicPINVOKE.NativeImage_GetCustomSamplerTypename(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/NativeImageInterface.cs b/src/Tizen.NUI/src/internal/NativeImageInterface.cs old mode 100644 new mode 100755 index c2bbd0f..3369872 --- a/src/Tizen.NUI/src/internal/NativeImageInterface.cs +++ b/src/Tizen.NUI/src/internal/NativeImageInterface.cs @@ -8,74 +8,103 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class NativeImageInterface : RefObject { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class NativeImageInterface : RefObject + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal NativeImageInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NativeImageInterface_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal NativeImageInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NativeImageInterface_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NativeImageInterface obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NativeImageInterface obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public override void Dispose() { - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public virtual bool GlExtensionCreate() { - bool ret = NDalicPINVOKE.NativeImageInterface_GlExtensionCreate(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void GlExtensionDestroy() { - NDalicPINVOKE.NativeImageInterface_GlExtensionDestroy(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual uint TargetTexture() { - uint ret = NDalicPINVOKE.NativeImageInterface_TargetTexture(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual void PrepareTexture() { - NDalicPINVOKE.NativeImageInterface_PrepareTexture(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public virtual uint GetWidth() { - uint ret = NDalicPINVOKE.NativeImageInterface_GetWidth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual uint GetHeight() { - uint ret = NDalicPINVOKE.NativeImageInterface_GetHeight(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual bool RequiresBlending() { - bool ret = NDalicPINVOKE.NativeImageInterface_RequiresBlending(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public virtual bool GlExtensionCreate() + { + bool ret = NDalicPINVOKE.NativeImageInterface_GlExtensionCreate(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void GlExtensionDestroy() + { + NDalicPINVOKE.NativeImageInterface_GlExtensionDestroy(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual uint TargetTexture() + { + uint ret = NDalicPINVOKE.NativeImageInterface_TargetTexture(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual void PrepareTexture() + { + NDalicPINVOKE.NativeImageInterface_PrepareTexture(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public virtual uint GetWidth() + { + uint ret = NDalicPINVOKE.NativeImageInterface_GetWidth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual uint GetHeight() + { + uint ret = NDalicPINVOKE.NativeImageInterface_GetHeight(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual bool RequiresBlending() + { + bool ret = NDalicPINVOKE.NativeImageInterface_RequiresBlending(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/NinePatchImage.cs b/src/Tizen.NUI/src/internal/NinePatchImage.cs old mode 100644 new mode 100755 index b26442e..23d4b7a --- a/src/Tizen.NUI/src/internal/NinePatchImage.cs +++ b/src/Tizen.NUI/src/internal/NinePatchImage.cs @@ -24,95 +24,123 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class NinePatchImage : ResourceImage { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class NinePatchImage : ResourceImage + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal NinePatchImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NinePatchImage_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal NinePatchImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NinePatchImage_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NinePatchImage obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NinePatchImage obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_NinePatchImage(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + public NinePatchImage(string filename) : this(NDalicPINVOKE.NinePatchImage_New(filename), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_NinePatchImage(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public NinePatchImage (string filename) : this (NDalicPINVOKE.NinePatchImage_New(filename), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public new static NinePatchImage DownCast(BaseHandle handle) { - NinePatchImage ret = new NinePatchImage(NDalicPINVOKE.NinePatchImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public NinePatchImage(NinePatchImage handle) : this(NDalicPINVOKE.new_NinePatchImage__SWIG_1(NinePatchImage.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public NinePatchImage Assign(NinePatchImage rhs) { - NinePatchImage ret = new NinePatchImage(NDalicPINVOKE.NinePatchImage_Assign(swigCPtr, NinePatchImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector4 GetStretchBorders() { - Vector4 ret = new Vector4(NDalicPINVOKE.NinePatchImage_GetStretchBorders(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public VectorUint16Pair GetStretchPixelsX() { - VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.NinePatchImage_GetStretchPixelsX(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public VectorUint16Pair GetStretchPixelsY() { - VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.NinePatchImage_GetStretchPixelsY(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Rectangle GetChildRectangle() { - Rectangle ret = new Rectangle(NDalicPINVOKE.NinePatchImage_GetChildRectangle(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BufferImage CreateCroppedBufferImage() { - BufferImage ret = new BufferImage(NDalicPINVOKE.NinePatchImage_CreateCroppedBufferImage(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsNinePatchUrl(string url) { - bool ret = NDalicPINVOKE.NinePatchImage_IsNinePatchUrl(url); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public new static NinePatchImage DownCast(BaseHandle handle) + { + NinePatchImage ret = new NinePatchImage(NDalicPINVOKE.NinePatchImage_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + public NinePatchImage(NinePatchImage handle) : this(NDalicPINVOKE.new_NinePatchImage__SWIG_1(NinePatchImage.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public NinePatchImage Assign(NinePatchImage rhs) + { + NinePatchImage ret = new NinePatchImage(NDalicPINVOKE.NinePatchImage_Assign(swigCPtr, NinePatchImage.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Vector4 GetStretchBorders() + { + Vector4 ret = new Vector4(NDalicPINVOKE.NinePatchImage_GetStretchBorders(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public VectorUint16Pair GetStretchPixelsX() + { + VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.NinePatchImage_GetStretchPixelsX(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public VectorUint16Pair GetStretchPixelsY() + { + VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.NinePatchImage_GetStretchPixelsY(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Rectangle GetChildRectangle() + { + Rectangle ret = new Rectangle(NDalicPINVOKE.NinePatchImage_GetChildRectangle(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public BufferImage CreateCroppedBufferImage() + { + BufferImage ret = new BufferImage(NDalicPINVOKE.NinePatchImage_CreateCroppedBufferImage(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static bool IsNinePatchUrl(string url) + { + bool ret = NDalicPINVOKE.NinePatchImage_IsNinePatchUrl(url); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/Object.cs b/src/Tizen.NUI/src/internal/Object.cs old mode 100644 new mode 100755 index 54bc5af..37f15ec --- a/src/Tizen.NUI/src/internal/Object.cs +++ b/src/Tizen.NUI/src/internal/Object.cs @@ -22,19 +22,20 @@ namespace Tizen.NUI { -public static class Object -{ - public static PropertyValue GetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index) { - PropertyValue ret = new PropertyValue(NDalicPINVOKE.Handle_GetProperty(handle, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public static class Object + { + public static PropertyValue GetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index) + { + PropertyValue ret = new PropertyValue(NDalicPINVOKE.Handle_GetProperty(handle, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public static void SetProperty( global::System.Runtime.InteropServices.HandleRef handle, int index, PropertyValue propertyValue) - { - NDalicPINVOKE.Handle_SetProperty(handle, index, PropertyValue.getCPtr(propertyValue)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public static void SetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index, PropertyValue propertyValue) + { + NDalicPINVOKE.Handle_SetProperty(handle, index, PropertyValue.getCPtr(propertyValue)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } } diff --git a/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs b/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs old mode 100644 new mode 100755 index ab65573..c2de796 --- a/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs +++ b/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ObjectCreatedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ObjectCreatedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ObjectCreatedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ObjectCreatedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectCreatedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectCreatedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ObjectCreatedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ObjectCreatedSignal(swigCPtr); + ~ObjectCreatedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ObjectCreatedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ObjectCreatedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ObjectCreatedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ObjectCreatedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ObjectCreatedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ObjectCreatedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ObjectCreatedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(BaseHandle arg) { - NDalicPINVOKE.ObjectCreatedSignal_Emit(swigCPtr, BaseHandle.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ObjectCreatedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public ObjectCreatedSignal() : this(NDalicPINVOKE.new_ObjectCreatedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ObjectCreatedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(BaseHandle arg) + { + NDalicPINVOKE.ObjectCreatedSignal_Emit(swigCPtr, BaseHandle.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ObjectCreatedSignal() : this(NDalicPINVOKE.new_ObjectCreatedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs b/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs old mode 100644 new mode 100755 index 4568a93..8bb5b2b --- a/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs +++ b/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ObjectDestroyedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ObjectDestroyedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ObjectDestroyedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ObjectDestroyedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectDestroyedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectDestroyedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ObjectDestroyedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ObjectDestroyedSignal(swigCPtr); + ~ObjectDestroyedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ObjectDestroyedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ObjectDestroyedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ObjectDestroyedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ObjectDestroyedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ObjectDestroyedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ObjectDestroyedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ObjectDestroyedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(RefObject arg) { - NDalicPINVOKE.ObjectDestroyedSignal_Emit(swigCPtr, RefObject.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ObjectDestroyedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public ObjectDestroyedSignal() : this(NDalicPINVOKE.new_ObjectDestroyedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ObjectDestroyedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(RefObject arg) + { + NDalicPINVOKE.ObjectDestroyedSignal_Emit(swigCPtr, RefObject.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ObjectDestroyedSignal() : this(NDalicPINVOKE.new_ObjectDestroyedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ObjectRegistry.cs b/src/Tizen.NUI/src/internal/ObjectRegistry.cs old mode 100644 new mode 100755 index a847239..8b35cd1 --- a/src/Tizen.NUI/src/internal/ObjectRegistry.cs +++ b/src/Tizen.NUI/src/internal/ObjectRegistry.cs @@ -8,209 +8,229 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; - internal class ObjectRegistry : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class ObjectRegistry : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ObjectRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ObjectRegistry_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ObjectRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ObjectRegistry_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectRegistry obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ObjectRegistry obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ObjectRegistry(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ObjectRegistry(swigCPtr); + public class ObjectCreatedEventArgs : EventArgs + { + private BaseHandle _baseHandle; + + public BaseHandle BaseHandle + { + get + { + return _baseHandle; + } + set + { + _baseHandle = value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public class ObjectDestroyedEventArgs : EventArgs + { + private RefObject _refObject; + + public RefObject RefObject + { + get + { + return _refObject; + } + set + { + _refObject = value; + } + } + } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void ObjectCreatedEventCallbackDelegate(IntPtr baseHandle); + private DaliEventHandler _objectRegistryObjectCreatedEventHandler; + private ObjectCreatedEventCallbackDelegate _objectRegistryObjectCreatedEventCallbackDelegate; -public class ObjectCreatedEventArgs : EventArgs -{ - private BaseHandle _baseHandle; - - public BaseHandle BaseHandle - { - get - { - return _baseHandle; - } - set - { - _baseHandle = value; - } - } -} + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void ObjectDestroyedEventCallbackDelegate(IntPtr fefObject); + private DaliEventHandler _objectRegistryObjectDestroyedEventHandler; + private ObjectDestroyedEventCallbackDelegate _objectRegistryObjectDestroyedEventCallbackDelegate; -public class ObjectDestroyedEventArgs : EventArgs -{ - private RefObject _refObject; - - public RefObject RefObject - { - get - { - return _refObject; - } - set - { - _refObject = value; - } - } -} + public event DaliEventHandler ObjectCreated + { + add + { + lock (this) + { + // Restricted to only one listener + if (_objectRegistryObjectCreatedEventHandler == null) + { + _objectRegistryObjectCreatedEventHandler += value; + + _objectRegistryObjectCreatedEventCallbackDelegate = new ObjectCreatedEventCallbackDelegate(OnObjectCreated); + this.ObjectCreatedSignal().Connect(_objectRegistryObjectCreatedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_objectRegistryObjectCreatedEventHandler != null) + { + this.ObjectCreatedSignal().Disconnect(_objectRegistryObjectCreatedEventCallbackDelegate); + } + + _objectRegistryObjectCreatedEventHandler -= value; + } + } + } + // Callback for ObjectRegistry ObjectCreatedSignal + private void OnObjectCreated(IntPtr baseHandle) + { + ObjectCreatedEventArgs e = new ObjectCreatedEventArgs(); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ObjectCreatedEventCallbackDelegate(IntPtr baseHandle); - private DaliEventHandler _objectRegistryObjectCreatedEventHandler; - private ObjectCreatedEventCallbackDelegate _objectRegistryObjectCreatedEventCallbackDelegate; + // Populate all members of "e" (ObjectCreatedEventArgs) with real data + //e.BaseHandle = BaseHandle.GetBaseHandleFromPtr(baseHandle); //GetBaseHandleFromPtr() is not present in BaseHandle.cs. Not sure what is the reason? - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ObjectDestroyedEventCallbackDelegate(IntPtr fefObject); - private DaliEventHandler _objectRegistryObjectDestroyedEventHandler; - private ObjectDestroyedEventCallbackDelegate _objectRegistryObjectDestroyedEventCallbackDelegate; + if (_objectRegistryObjectCreatedEventHandler != null) + { + //here we send all data to user event handlers + _objectRegistryObjectCreatedEventHandler(this, e); + } + } - public event DaliEventHandler ObjectCreated - { - add - { - lock(this) + public event DaliEventHandler ObjectDestroyed { - // Restricted to only one listener - if (_objectRegistryObjectCreatedEventHandler == null) - { - _objectRegistryObjectCreatedEventHandler += value; - - _objectRegistryObjectCreatedEventCallbackDelegate = new ObjectCreatedEventCallbackDelegate(OnObjectCreated); - this.ObjectCreatedSignal().Connect(_objectRegistryObjectCreatedEventCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_objectRegistryObjectDestroyedEventHandler == null) + { + _objectRegistryObjectDestroyedEventHandler += value; + + _objectRegistryObjectDestroyedEventCallbackDelegate = new ObjectDestroyedEventCallbackDelegate(OnObjectDestroyed); + this.ObjectDestroyedSignal().Connect(_objectRegistryObjectDestroyedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_objectRegistryObjectDestroyedEventHandler != null) + { + this.ObjectDestroyedSignal().Disconnect(_objectRegistryObjectDestroyedEventCallbackDelegate); + } + + _objectRegistryObjectDestroyedEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for ObjectRegistry ObjectDestroyedSignal + private void OnObjectDestroyed(IntPtr refObject) { - if (_objectRegistryObjectCreatedEventHandler != null) - { - this.ObjectCreatedSignal().Disconnect(_objectRegistryObjectCreatedEventCallbackDelegate); - } + ObjectDestroyedEventArgs e = new ObjectDestroyedEventArgs(); + + // Populate all members of "e" (ObjectDestroyedEventArgs) with real data + e.RefObject = RefObject.GetRefObjectFromPtr(refObject); - _objectRegistryObjectCreatedEventHandler -= value; + if (_objectRegistryObjectDestroyedEventHandler != null) + { + //here we send all data to user event handlers + _objectRegistryObjectDestroyedEventHandler(this, e); + } } - } - } - - // Callback for ObjectRegistry ObjectCreatedSignal - private void OnObjectCreated(IntPtr baseHandle) - { - ObjectCreatedEventArgs e = new ObjectCreatedEventArgs(); - - // Populate all members of "e" (ObjectCreatedEventArgs) with real data - //e.BaseHandle = BaseHandle.GetBaseHandleFromPtr(baseHandle); //GetBaseHandleFromPtr() is not present in BaseHandle.cs. Not sure what is the reason? - - if (_objectRegistryObjectCreatedEventHandler != null) - { - //here we send all data to user event handlers - _objectRegistryObjectCreatedEventHandler(this, e); - } - } - - public event DaliEventHandler ObjectDestroyed - { - add - { - lock(this) + + + public ObjectRegistry() : this(NDalicPINVOKE.new_ObjectRegistry__SWIG_0(), true) { - // Restricted to only one listener - if (_objectRegistryObjectDestroyedEventHandler == null) - { - _objectRegistryObjectDestroyedEventHandler += value; - - _objectRegistryObjectDestroyedEventCallbackDelegate = new ObjectDestroyedEventCallbackDelegate(OnObjectDestroyed); - this.ObjectDestroyedSignal().Connect(_objectRegistryObjectDestroyedEventCallbackDelegate); - } + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - remove - { - lock(this) + public ObjectRegistry(ObjectRegistry handle) : this(NDalicPINVOKE.new_ObjectRegistry__SWIG_1(ObjectRegistry.getCPtr(handle)), true) { - if (_objectRegistryObjectDestroyedEventHandler != null) - { - this.ObjectDestroyedSignal().Disconnect(_objectRegistryObjectDestroyedEventCallbackDelegate); - } + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - _objectRegistryObjectDestroyedEventHandler -= value; + public ObjectRegistry Assign(ObjectRegistry rhs) + { + ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.ObjectRegistry_Assign(swigCPtr, ObjectRegistry.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - } - - // Callback for ObjectRegistry ObjectDestroyedSignal - private void OnObjectDestroyed(IntPtr refObject) - { - ObjectDestroyedEventArgs e = new ObjectDestroyedEventArgs(); - - // Populate all members of "e" (ObjectDestroyedEventArgs) with real data - e.RefObject = RefObject.GetRefObjectFromPtr(refObject); - - if (_objectRegistryObjectDestroyedEventHandler != null) - { - //here we send all data to user event handlers - _objectRegistryObjectDestroyedEventHandler(this, e); - } - } - - - public ObjectRegistry() : this(NDalicPINVOKE.new_ObjectRegistry__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ObjectRegistry(ObjectRegistry handle) : this(NDalicPINVOKE.new_ObjectRegistry__SWIG_1(ObjectRegistry.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ObjectRegistry Assign(ObjectRegistry rhs) { - ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.ObjectRegistry_Assign(swigCPtr, ObjectRegistry.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ObjectCreatedSignal ObjectCreatedSignal() { - ObjectCreatedSignal ret = new ObjectCreatedSignal(NDalicPINVOKE.ObjectRegistry_ObjectCreatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ObjectDestroyedSignal ObjectDestroyedSignal() { - ObjectDestroyedSignal ret = new ObjectDestroyedSignal(NDalicPINVOKE.ObjectRegistry_ObjectDestroyedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public ObjectCreatedSignal ObjectCreatedSignal() + { + ObjectCreatedSignal ret = new ObjectCreatedSignal(NDalicPINVOKE.ObjectRegistry_ObjectCreatedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ObjectDestroyedSignal ObjectDestroyedSignal() + { + ObjectDestroyedSignal ret = new ObjectDestroyedSignal(NDalicPINVOKE.ObjectRegistry_ObjectDestroyedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/PaddingType.cs b/src/Tizen.NUI/src/internal/PaddingType.cs old mode 100644 new mode 100755 index 72ec92d..86691f5 --- a/src/Tizen.NUI/src/internal/PaddingType.cs +++ b/src/Tizen.NUI/src/internal/PaddingType.cs @@ -8,242 +8,318 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class PaddingType : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class PaddingType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PaddingType obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PaddingType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PaddingType() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PaddingType(swigCPtr); + ~PaddingType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public static bool operator ==(PaddingType a, PaddingType b) - { - // If both are null, or both are same instance, return true. - if (System.Object.ReferenceEquals(a, b)) + protected virtual void Dispose(DisposeTypes type) { - return true; + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PaddingType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - // If one is null, but not both, return false. - if (((object)a == null) || ((object)b == null)) + public static bool operator ==(PaddingType a, PaddingType b) { - return false; + // If both are null, or both are same instance, return true. + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + // If one is null, but not both, return false. + if (((object)a == null) || ((object)b == null)) + { + return false; + } + + // Return true if the fields match: + return (System.Math.Abs(a.Left - b.Left) < NDalic.GetRangedEpsilon(a.Left, b.Left)) && + (System.Math.Abs(a.Right - b.Right) < NDalic.GetRangedEpsilon(a.Right, b.Right)) && + (System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) && + (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top)); } - // Return true if the fields match: - return ( System.Math.Abs( a.Left - b.Left ) < NDalic.GetRangedEpsilon(a.Left, b.Left) )&& - ( System.Math.Abs( a.Right - b.Right ) < NDalic.GetRangedEpsilon(a.Right, b.Right) )&& - ( System.Math.Abs( a.Bottom - b.Bottom ) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom) )&& - ( System.Math.Abs( a.Top - b.Top ) < NDalic.GetRangedEpsilon(a.Top, b.Top) ); - } + public static bool operator !=(PaddingType a, PaddingType b) + { + return !(a == b); + } - public static bool operator !=(PaddingType a, PaddingType b) - { - return !(a == b); - } + ///< The Left value + public float Left + { + set + { + left = value; + } + get + { + return left; + } + } - ///< The Left value - public float Left - { - set + ///< The Right value + public float Right { - left = value; + set + { + right = value; + } + get + { + return right; + } } - get + + ///< The Bottom value + public float Bottom { - return left; + set + { + bottom = value; + } + get + { + return bottom; + } } - } - ///< The Right value - public float Right - { - set + ///< The Top value + public float Top { - right = value; + set + { + top = value; + } + get + { + return top; + } } - get + + + public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) { - return right; + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - ///< The Bottom value - public float Bottom - { - set + public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true) { - bottom = value; + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - get + + public PaddingType(PaddingType rhs) : this(NDalicPINVOKE.new_PaddingType__SWIG_2(PaddingType.getCPtr(rhs)), true) { - return bottom; + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - ///< The Top value - public float Top - { - set + public PaddingType Assign(PaddingType rhs) { - top = value; + PaddingType ret = new PaddingType(NDalicPINVOKE.PaddingType_Assign(swigCPtr, PaddingType.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - get + + public void Set(float newX, float newY, float newWidth, float newHeight) { - return top; + NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private float x + { + set + { + NDalicPINVOKE.PaddingType_x_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_x_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float left + { + set + { + NDalicPINVOKE.PaddingType_left_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } } - } + private float y + { + set + { + NDalicPINVOKE.PaddingType_y_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } - public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PaddingType(PaddingType rhs) : this(NDalicPINVOKE.new_PaddingType__SWIG_2(PaddingType.getCPtr(rhs)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PaddingType Assign(PaddingType rhs) { - PaddingType ret = new PaddingType(NDalicPINVOKE.PaddingType_Assign(swigCPtr, PaddingType.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Set(float newX, float newY, float newWidth, float newHeight) { - NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private float x { - set { - NDalicPINVOKE.PaddingType_x_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_x_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float left { - set { - NDalicPINVOKE.PaddingType_left_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float y { - set { - NDalicPINVOKE.PaddingType_y_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float right { - set { - NDalicPINVOKE.PaddingType_right_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float width { - set { - NDalicPINVOKE.PaddingType_width_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_width_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float bottom { - set { - NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float height { - set { - NDalicPINVOKE.PaddingType_height_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float top { - set { - NDalicPINVOKE.PaddingType_top_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + private float right + { + set + { + NDalicPINVOKE.PaddingType_right_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } -} + private float width + { + set + { + NDalicPINVOKE.PaddingType_width_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_width_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float bottom + { + set + { + NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float height + { + set + { + NDalicPINVOKE.PaddingType_height_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float top + { + set + { + NDalicPINVOKE.PaddingType_top_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/PageFactory.cs b/src/Tizen.NUI/src/internal/PageFactory.cs old mode 100644 new mode 100755 index 13c59d1..e036066 --- a/src/Tizen.NUI/src/internal/PageFactory.cs +++ b/src/Tizen.NUI/src/internal/PageFactory.cs @@ -8,56 +8,105 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PageFactory : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class PageFactory : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PageFactory(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PageFactory(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageFactory obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageFactory obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PageFactory() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PageFactory(swigCPtr); + ~PageFactory() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - public virtual uint GetNumberOfPages() { - uint ret = NDalicPINVOKE.PageFactory_GetNumberOfPages(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public virtual Texture NewPage(uint pageId) { - Texture ret = new Texture(NDalicPINVOKE.PageFactory_NewPage(swigCPtr, pageId), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } -} + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageFactory(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public virtual uint GetNumberOfPages() + { + uint ret = NDalicPINVOKE.PageFactory_GetNumberOfPages(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual Texture NewPage(uint pageId) + { + Texture ret = new Texture(NDalicPINVOKE.PageFactory_NewPage(swigCPtr, pageId), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/PagePanSignal.cs b/src/Tizen.NUI/src/internal/PagePanSignal.cs old mode 100644 new mode 100755 index bc52bc8..98872e3 --- a/src/Tizen.NUI/src/internal/PagePanSignal.cs +++ b/src/Tizen.NUI/src/internal/PagePanSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PagePanSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class PagePanSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PagePanSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PagePanSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PagePanSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PagePanSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PagePanSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PagePanSignal(swigCPtr); + ~PagePanSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.PagePanSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PagePanSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.PagePanSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.PagePanSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PagePanSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.PagePanSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PagePanSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PagePanSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PagePanSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(PageTurnView arg) { - NDalicPINVOKE.PagePanSignal_Emit(swigCPtr, PageTurnView.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(PageTurnView arg) + { + NDalicPINVOKE.PagePanSignal_Emit(swigCPtr, PageTurnView.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public PagePanSignal() : this(NDalicPINVOKE.new_PagePanSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PagePanSignal() : this(NDalicPINVOKE.new_PagePanSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs b/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs old mode 100644 new mode 100755 index f12ec40..f72cb36 --- a/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs +++ b/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs @@ -24,59 +24,82 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PageTurnLandscapeView : PageTurnView { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class PageTurnLandscapeView : PageTurnView + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PageTurnLandscapeView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnLandscapeView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PageTurnLandscapeView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnLandscapeView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnLandscapeView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnLandscapeView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PageTurnLandscapeView(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public PageTurnLandscapeView (PageFactory pageFactory, Vector2 pageSize) : this (NDalicPINVOKE.PageTurnLandscapeView_New(PageFactory.getCPtr(pageFactory), Vector2.getCPtr(pageSize)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); - } - public PageTurnLandscapeView(PageTurnLandscapeView pageTurnLandscapeView) : this(NDalicPINVOKE.new_PageTurnLandscapeView__SWIG_1(PageTurnLandscapeView.getCPtr(pageTurnLandscapeView)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageTurnLandscapeView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - public PageTurnLandscapeView Assign(PageTurnLandscapeView pageTurnLandscapeView) { - PageTurnLandscapeView ret = new PageTurnLandscapeView(NDalicPINVOKE.PageTurnLandscapeView_Assign(swigCPtr, PageTurnLandscapeView.getCPtr(pageTurnLandscapeView)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + base.Dispose(type); + } - public new static PageTurnLandscapeView DownCast(BaseHandle handle) { - PageTurnLandscapeView ret = new PageTurnLandscapeView(NDalicPINVOKE.PageTurnLandscapeView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PageTurnLandscapeView(PageFactory pageFactory, Vector2 pageSize) : this(NDalicPINVOKE.PageTurnLandscapeView_New(PageFactory.getCPtr(pageFactory), Vector2.getCPtr(pageSize)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -} + } + public PageTurnLandscapeView(PageTurnLandscapeView pageTurnLandscapeView) : this(NDalicPINVOKE.new_PageTurnLandscapeView__SWIG_1(PageTurnLandscapeView.getCPtr(pageTurnLandscapeView)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PageTurnLandscapeView Assign(PageTurnLandscapeView pageTurnLandscapeView) + { + PageTurnLandscapeView ret = new PageTurnLandscapeView(NDalicPINVOKE.PageTurnLandscapeView_Assign(swigCPtr, PageTurnLandscapeView.getCPtr(pageTurnLandscapeView)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static PageTurnLandscapeView DownCast(BaseHandle handle) + { + PageTurnLandscapeView ret = new PageTurnLandscapeView(NDalicPINVOKE.PageTurnLandscapeView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs b/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs old mode 100644 new mode 100755 index ab4da7b..c839ad1 --- a/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs +++ b/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs @@ -24,59 +24,82 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PageTurnPortraitView : PageTurnView { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class PageTurnPortraitView : PageTurnView + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PageTurnPortraitView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnPortraitView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PageTurnPortraitView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnPortraitView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnPortraitView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnPortraitView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PageTurnPortraitView(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public PageTurnPortraitView (PageFactory pageFactory, Vector2 pageSize) : this (NDalicPINVOKE.PageTurnPortraitView_New(PageFactory.getCPtr(pageFactory), Vector2.getCPtr(pageSize)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); - } - public PageTurnPortraitView(PageTurnPortraitView pageTurnPortraitView) : this(NDalicPINVOKE.new_PageTurnPortraitView__SWIG_1(PageTurnPortraitView.getCPtr(pageTurnPortraitView)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageTurnPortraitView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - public PageTurnPortraitView Assign(PageTurnPortraitView pageTurnPortraitView) { - PageTurnPortraitView ret = new PageTurnPortraitView(NDalicPINVOKE.PageTurnPortraitView_Assign(swigCPtr, PageTurnPortraitView.getCPtr(pageTurnPortraitView)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + base.Dispose(type); + } - public new static PageTurnPortraitView DownCast(BaseHandle handle) { - PageTurnPortraitView ret = new PageTurnPortraitView(NDalicPINVOKE.PageTurnPortraitView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PageTurnPortraitView(PageFactory pageFactory, Vector2 pageSize) : this(NDalicPINVOKE.PageTurnPortraitView_New(PageFactory.getCPtr(pageFactory), Vector2.getCPtr(pageSize)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -} + } + public PageTurnPortraitView(PageTurnPortraitView pageTurnPortraitView) : this(NDalicPINVOKE.new_PageTurnPortraitView__SWIG_1(PageTurnPortraitView.getCPtr(pageTurnPortraitView)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PageTurnPortraitView Assign(PageTurnPortraitView pageTurnPortraitView) + { + PageTurnPortraitView ret = new PageTurnPortraitView(NDalicPINVOKE.PageTurnPortraitView_Assign(swigCPtr, PageTurnPortraitView.getCPtr(pageTurnPortraitView)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static PageTurnPortraitView DownCast(BaseHandle handle) + { + PageTurnPortraitView ret = new PageTurnPortraitView(NDalicPINVOKE.PageTurnPortraitView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/PageTurnSignal.cs b/src/Tizen.NUI/src/internal/PageTurnSignal.cs old mode 100644 new mode 100755 index 43ba6ab..5b021f6 --- a/src/Tizen.NUI/src/internal/PageTurnSignal.cs +++ b/src/Tizen.NUI/src/internal/PageTurnSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PageTurnSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class PageTurnSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PageTurnSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PageTurnSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PageTurnSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PageTurnSignal(swigCPtr); + ~PageTurnSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.PageTurnSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageTurnSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.PageTurnSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.PageTurnSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PageTurnSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.PageTurnSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PageTurnSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PageTurnSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PageTurnSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(PageTurnView arg1, uint arg2, bool arg3) { - NDalicPINVOKE.PageTurnSignal_Emit(swigCPtr, PageTurnView.getCPtr(arg1), arg2, arg3); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(PageTurnView arg1, uint arg2, bool arg3) + { + NDalicPINVOKE.PageTurnSignal_Emit(swigCPtr, PageTurnView.getCPtr(arg1), arg2, arg3); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public PageTurnSignal() : this(NDalicPINVOKE.new_PageTurnSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PageTurnSignal() : this(NDalicPINVOKE.new_PageTurnSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/PageTurnView.cs b/src/Tizen.NUI/src/internal/PageTurnView.cs old mode 100644 new mode 100755 index 5c4faa6..2526115 --- a/src/Tizen.NUI/src/internal/PageTurnView.cs +++ b/src/Tizen.NUI/src/internal/PageTurnView.cs @@ -8,521 +8,600 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; + + internal class PageTurnView : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal PageTurnView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + // By default, we do not want the position to use the anchor point + PositionUsesAnchorPoint = false; + } -using System; -using System.Runtime.InteropServices; -using Tizen.NUI.BaseComponents; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal class PageTurnView : View { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageTurnView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - internal PageTurnView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PageTurnView(swigCPtr); + public class PagePanStartedEventArgs : EventArgs + { + private PageTurnView _pageTurnView; + + public PageTurnView PageTurnView + { + get + { + return _pageTurnView; + } + set + { + _pageTurnView = value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public class PagePanFinishedEventArgs : EventArgs + { + private PageTurnView _pageTurnView; + + public PageTurnView PageTurnView + { + get + { + return _pageTurnView; + } + set + { + _pageTurnView = value; + } + } + } + public class PageTurnStartedEventArgs : EventArgs + { + private PageTurnView _pageTurnView; + private uint _pageIndex; + private bool _isTurningForward; + + public PageTurnView PageTurnView + { + get + { + return _pageTurnView; + } + set + { + _pageTurnView = value; + } + } + + public uint PageIndex + { + get + { + return _pageIndex; + } + set + { + _pageIndex = value; + } + } + + public bool IsTurningForward + { + get + { + return _isTurningForward; + } + set + { + _isTurningForward = value; + } + } -public class PagePanStartedEventArgs : EventArgs -{ - private PageTurnView _pageTurnView; - - public PageTurnView PageTurnView - { - get - { - return _pageTurnView; - } - set - { - _pageTurnView = value; - } - } -} + } -public class PagePanFinishedEventArgs : EventArgs -{ - private PageTurnView _pageTurnView; - - public PageTurnView PageTurnView - { - get - { - return _pageTurnView; - } - set - { - _pageTurnView = value; - } - } -} + public class PageTurnFinishedEventArgs : EventArgs + { + private PageTurnView _pageTurnView; + private uint _pageIndex; + private bool _isTurningForward; + + public PageTurnView PageTurnView + { + get + { + return _pageTurnView; + } + set + { + _pageTurnView = value; + } + } + + public uint PageIndex + { + get + { + return _pageIndex; + } + set + { + _pageIndex = value; + } + } + + public bool IsTurningForward + { + get + { + return _isTurningForward; + } + set + { + _isTurningForward = value; + } + } -public class PageTurnStartedEventArgs : EventArgs -{ - private PageTurnView _pageTurnView; - private uint _pageIndex; - private bool _isTurningForward; - - public PageTurnView PageTurnView - { - get - { - return _pageTurnView; - } - set - { - _pageTurnView = value; - } - } - - public uint PageIndex - { - get - { - return _pageIndex; - } - set - { - _pageIndex = value; - } - } - - public bool IsTurningForward - { - get - { - return _isTurningForward; - } - set - { - _isTurningForward = value; - } - } + } -} + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void PagePanStartedCallbackDelegate(IntPtr page); + private DaliEventHandler _pageTurnViewPagePanStartedEventHandler; + private PagePanStartedCallbackDelegate _pageTurnViewPagePanStartedCallbackDelegate; -public class PageTurnFinishedEventArgs : EventArgs -{ - private PageTurnView _pageTurnView; - private uint _pageIndex; - private bool _isTurningForward; - - public PageTurnView PageTurnView - { - get - { - return _pageTurnView; - } - set - { - _pageTurnView = value; - } - } - - public uint PageIndex - { - get - { - return _pageIndex; - } - set - { - _pageIndex = value; - } - } - - public bool IsTurningForward - { - get - { - return _isTurningForward; - } - set - { - _isTurningForward = value; - } - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void PagePanFinishedCallbackDelegate(IntPtr page); + private DaliEventHandler _pageTurnViewPagePanFinishedEventHandler; + private PagePanFinishedCallbackDelegate _pageTurnViewPagePanFinishedCallbackDelegate; -} + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void PageTurnStartedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward); + private DaliEventHandler _pageTurnViewPageTurnStartedEventHandler; + private PageTurnStartedCallbackDelegate _pageTurnViewPageTurnStartedCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void PageTurnFinishedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward); + private DaliEventHandler _pageTurnViewPageTurnFinishedEventHandler; + private PageTurnFinishedCallbackDelegate _pageTurnViewPageTurnFinishedCallbackDelegate; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void PagePanStartedCallbackDelegate(IntPtr page); - private DaliEventHandler _pageTurnViewPagePanStartedEventHandler; - private PagePanStartedCallbackDelegate _pageTurnViewPagePanStartedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void PagePanFinishedCallbackDelegate(IntPtr page); - private DaliEventHandler _pageTurnViewPagePanFinishedEventHandler; - private PagePanFinishedCallbackDelegate _pageTurnViewPagePanFinishedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void PageTurnStartedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward); - private DaliEventHandler _pageTurnViewPageTurnStartedEventHandler; - private PageTurnStartedCallbackDelegate _pageTurnViewPageTurnStartedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void PageTurnFinishedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward); - private DaliEventHandler _pageTurnViewPageTurnFinishedEventHandler; - private PageTurnFinishedCallbackDelegate _pageTurnViewPageTurnFinishedCallbackDelegate; - - public event DaliEventHandler PagePanStarted - { - add - { - lock(this) + public event DaliEventHandler PagePanStarted { - // Restricted to only one listener - if (_pageTurnViewPagePanStartedEventHandler == null) - { - _pageTurnViewPagePanStartedEventHandler += value; - - _pageTurnViewPagePanStartedCallbackDelegate = new PagePanStartedCallbackDelegate(OnPagePanStarted); - this.PagePanStartedSignal().Connect(_pageTurnViewPagePanStartedCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_pageTurnViewPagePanStartedEventHandler == null) + { + _pageTurnViewPagePanStartedEventHandler += value; + + _pageTurnViewPagePanStartedCallbackDelegate = new PagePanStartedCallbackDelegate(OnPagePanStarted); + this.PagePanStartedSignal().Connect(_pageTurnViewPagePanStartedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_pageTurnViewPagePanStartedEventHandler != null) + { + this.PagePanStartedSignal().Disconnect(_pageTurnViewPagePanStartedCallbackDelegate); + } + + _pageTurnViewPagePanStartedEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for PageTurnView PagePanStarted signal + private void OnPagePanStarted(IntPtr page) { - if (_pageTurnViewPagePanStartedEventHandler != null) - { - this.PagePanStartedSignal().Disconnect(_pageTurnViewPagePanStartedCallbackDelegate); - } + PagePanStartedEventArgs e = new PagePanStartedEventArgs(); + + // Populate all members of "e" (PagePanStartedEventArgs) with real page + e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr(page); - _pageTurnViewPagePanStartedEventHandler -= value; + if (_pageTurnViewPagePanStartedEventHandler != null) + { + //here we send all page to user event handlers + _pageTurnViewPagePanStartedEventHandler(this, e); + } } - } - } - - // Callback for PageTurnView PagePanStarted signal - private void OnPagePanStarted(IntPtr page) - { - PagePanStartedEventArgs e = new PagePanStartedEventArgs(); - - // Populate all members of "e" (PagePanStartedEventArgs) with real page - e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page ); - - if (_pageTurnViewPagePanStartedEventHandler != null) - { - //here we send all page to user event handlers - _pageTurnViewPagePanStartedEventHandler(this, e); - } - } - - public event DaliEventHandler PagePanFinished - { - add - { - lock(this) + + public event DaliEventHandler PagePanFinished { - // Restricted to only one listener - if (_pageTurnViewPagePanFinishedEventHandler == null) - { - _pageTurnViewPagePanFinishedEventHandler += value; - - _pageTurnViewPagePanFinishedCallbackDelegate = new PagePanFinishedCallbackDelegate(OnPagePanFinished); - this.PagePanFinishedSignal().Connect(_pageTurnViewPagePanFinishedCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_pageTurnViewPagePanFinishedEventHandler == null) + { + _pageTurnViewPagePanFinishedEventHandler += value; + + _pageTurnViewPagePanFinishedCallbackDelegate = new PagePanFinishedCallbackDelegate(OnPagePanFinished); + this.PagePanFinishedSignal().Connect(_pageTurnViewPagePanFinishedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_pageTurnViewPagePanFinishedEventHandler != null) + { + this.PagePanFinishedSignal().Disconnect(_pageTurnViewPagePanFinishedCallbackDelegate); + } + + _pageTurnViewPagePanFinishedEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for PageTurnView PagePanFinished signal + private void OnPagePanFinished(IntPtr page) { - if (_pageTurnViewPagePanFinishedEventHandler != null) - { - this.PagePanFinishedSignal().Disconnect(_pageTurnViewPagePanFinishedCallbackDelegate); - } + PagePanFinishedEventArgs e = new PagePanFinishedEventArgs(); + + // Populate all members of "e" (PagePanFinishedEventArgs) with real page + e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr(page); - _pageTurnViewPagePanFinishedEventHandler -= value; + if (_pageTurnViewPagePanFinishedEventHandler != null) + { + //here we send all page to user event handlers + _pageTurnViewPagePanFinishedEventHandler(this, e); + } } - } - } - - // Callback for PageTurnView PagePanFinished signal - private void OnPagePanFinished(IntPtr page) - { - PagePanFinishedEventArgs e = new PagePanFinishedEventArgs(); - - // Populate all members of "e" (PagePanFinishedEventArgs) with real page - e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page ); - - if (_pageTurnViewPagePanFinishedEventHandler != null) - { - //here we send all page to user event handlers - _pageTurnViewPagePanFinishedEventHandler(this, e); - } - } - - - public event DaliEventHandler PageTurnStarted - { - add - { - lock(this) + + + public event DaliEventHandler PageTurnStarted { - // Restricted to only one listener - if (_pageTurnViewPageTurnStartedEventHandler == null) - { - _pageTurnViewPageTurnStartedEventHandler += value; - - _pageTurnViewPageTurnStartedCallbackDelegate = new PageTurnStartedCallbackDelegate(OnPageTurnStarted); - this.PageTurnStartedSignal().Connect(_pageTurnViewPageTurnStartedCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_pageTurnViewPageTurnStartedEventHandler == null) + { + _pageTurnViewPageTurnStartedEventHandler += value; + + _pageTurnViewPageTurnStartedCallbackDelegate = new PageTurnStartedCallbackDelegate(OnPageTurnStarted); + this.PageTurnStartedSignal().Connect(_pageTurnViewPageTurnStartedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_pageTurnViewPageTurnStartedEventHandler != null) + { + this.PageTurnStartedSignal().Disconnect(_pageTurnViewPageTurnStartedCallbackDelegate); + } + + _pageTurnViewPageTurnStartedEventHandler -= value; + } + } } - } - remove - { - lock(this) + // Callback for PageTurnView PageTurnStarted signal + private void OnPageTurnStarted(IntPtr page, uint pageIndex, bool isTurningForward) { - if (_pageTurnViewPageTurnStartedEventHandler != null) - { - this.PageTurnStartedSignal().Disconnect(_pageTurnViewPageTurnStartedCallbackDelegate); - } + PageTurnStartedEventArgs e = new PageTurnStartedEventArgs(); + + // Populate all members of "e" (PageTurnStartedEventArgs) with real page + e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr(page); + e.PageIndex = pageIndex; + e.IsTurningForward = isTurningForward; + - _pageTurnViewPageTurnStartedEventHandler -= value; + if (_pageTurnViewPageTurnStartedEventHandler != null) + { + //here we send all page to user event handlers + _pageTurnViewPageTurnStartedEventHandler(this, e); + } } - } - } - // Callback for PageTurnView PageTurnStarted signal - private void OnPageTurnStarted(IntPtr page, uint pageIndex, bool isTurningForward) - { - PageTurnStartedEventArgs e = new PageTurnStartedEventArgs(); - // Populate all members of "e" (PageTurnStartedEventArgs) with real page - e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page ); - e.PageIndex = pageIndex; - e.IsTurningForward = isTurningForward; + public event DaliEventHandler PageTurnFinished + { + add + { + lock (this) + { + // Restricted to only one listener + if (_pageTurnViewPageTurnFinishedEventHandler == null) + { + _pageTurnViewPageTurnFinishedEventHandler += value; + + _pageTurnViewPageTurnFinishedCallbackDelegate = new PageTurnFinishedCallbackDelegate(OnPageTurnFinished); + this.PageTurnFinishedSignal().Connect(_pageTurnViewPageTurnFinishedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_pageTurnViewPageTurnFinishedEventHandler != null) + { + this.PageTurnFinishedSignal().Disconnect(_pageTurnViewPageTurnFinishedCallbackDelegate); + } + + _pageTurnViewPageTurnFinishedEventHandler -= value; + } + } + } + + // Callback for PageTurnView PageTurnFinished signal + private void OnPageTurnFinished(IntPtr page, uint pageIndex, bool isTurningForward) + { + PageTurnFinishedEventArgs e = new PageTurnFinishedEventArgs(); + // Populate all members of "e" (PageTurnFinishedEventArgs) with real page + e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr(page); + e.PageIndex = pageIndex; + e.IsTurningForward = isTurningForward; - if (_pageTurnViewPageTurnStartedEventHandler != null) - { - //here we send all page to user event handlers - _pageTurnViewPageTurnStartedEventHandler(this, e); - } - } + if (_pageTurnViewPageTurnFinishedEventHandler != null) + { + //here we send all page to user event handlers + _pageTurnViewPageTurnFinishedEventHandler(this, e); + } + } - public event DaliEventHandler PageTurnFinished - { - add - { - lock(this) + public static PageTurnView GetPageTurnViewFromPtr(global::System.IntPtr cPtr) { - // Restricted to only one listener - if (_pageTurnViewPageTurnFinishedEventHandler == null) - { - _pageTurnViewPageTurnFinishedEventHandler += value; - - _pageTurnViewPageTurnFinishedCallbackDelegate = new PageTurnFinishedCallbackDelegate(OnPageTurnFinished); - this.PageTurnFinishedSignal().Connect(_pageTurnViewPageTurnFinishedCallbackDelegate); - } + PageTurnView ret = new PageTurnView(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - } - remove - { - lock(this) + + public class Property : global::System.IDisposable { - if (_pageTurnViewPageTurnFinishedEventHandler != null) - { - this.PageTurnFinishedSignal().Disconnect(_pageTurnViewPageTurnFinishedCallbackDelegate); - } + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageTurnView_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_PageTurnView_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int PAGE_SIZE = NDalicPINVOKE.PageTurnView_Property_PAGE_SIZE_get(); + public static readonly int CURRENT_PAGE_ID = NDalicPINVOKE.PageTurnView_Property_CURRENT_PAGE_ID_get(); + public static readonly int SPINE_SHADOW = NDalicPINVOKE.PageTurnView_Property_SPINE_SHADOW_get(); - _pageTurnViewPageTurnFinishedEventHandler -= value; } - } - } - - // Callback for PageTurnView PageTurnFinished signal - private void OnPageTurnFinished(IntPtr page, uint pageIndex, bool isTurningForward) - { - PageTurnFinishedEventArgs e = new PageTurnFinishedEventArgs(); - - // Populate all members of "e" (PageTurnFinishedEventArgs) with real page - e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page ); - e.PageIndex = pageIndex; - e.IsTurningForward = isTurningForward; - - - if (_pageTurnViewPageTurnFinishedEventHandler != null) - { - //here we send all page to user event handlers - _pageTurnViewPageTurnFinishedEventHandler(this, e); - } - } - - public static PageTurnView GetPageTurnViewFromPtr(global::System.IntPtr cPtr) { - PageTurnView ret = new PageTurnView(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PageTurnView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + + public PageTurnView() : this(NDalicPINVOKE.new_PageTurnView__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_PageTurnView_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int PAGE_SIZE = NDalicPINVOKE.PageTurnView_Property_PAGE_SIZE_get(); - public static readonly int CURRENT_PAGE_ID = NDalicPINVOKE.PageTurnView_Property_CURRENT_PAGE_ID_get(); - public static readonly int SPINE_SHADOW = NDalicPINVOKE.PageTurnView_Property_SPINE_SHADOW_get(); - - } - - public PageTurnView() : this(NDalicPINVOKE.new_PageTurnView__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PageTurnView(PageTurnView handle) : this(NDalicPINVOKE.new_PageTurnView__SWIG_1(PageTurnView.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PageTurnView Assign(PageTurnView handle) { - PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_Assign(swigCPtr, PageTurnView.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static PageTurnView DownCast(BaseHandle handle) { - PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PageTurnSignal PageTurnStartedSignal() { - PageTurnSignal ret = new PageTurnSignal(NDalicPINVOKE.PageTurnView_PageTurnStartedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PageTurnSignal PageTurnFinishedSignal() { - PageTurnSignal ret = new PageTurnSignal(NDalicPINVOKE.PageTurnView_PageTurnFinishedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PagePanSignal PagePanStartedSignal() { - PagePanSignal ret = new PagePanSignal(NDalicPINVOKE.PageTurnView_PagePanStartedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PagePanSignal PagePanFinishedSignal() { - PagePanSignal ret = new PagePanSignal(NDalicPINVOKE.PageTurnView_PagePanFinishedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000 - } - - public Vector2 PageSize - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( PageTurnView.Property.PAGE_SIZE).Get( temp ); - return temp; - } - set - { - SetProperty( PageTurnView.Property.PAGE_SIZE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int CurrentPageId - { - get - { - int temp = 0; - GetProperty( PageTurnView.Property.CURRENT_PAGE_ID).Get( ref temp ); - return temp; - } - set - { - SetProperty( PageTurnView.Property.CURRENT_PAGE_ID, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 SpineShadow - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( PageTurnView.Property.SPINE_SHADOW).Get( temp ); - return temp; - } - set - { - SetProperty( PageTurnView.Property.SPINE_SHADOW, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public PageTurnView(PageTurnView handle) : this(NDalicPINVOKE.new_PageTurnView__SWIG_1(PageTurnView.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PageTurnView Assign(PageTurnView handle) + { + PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_Assign(swigCPtr, PageTurnView.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static PageTurnView DownCast(BaseHandle handle) + { + PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PageTurnSignal PageTurnStartedSignal() + { + PageTurnSignal ret = new PageTurnSignal(NDalicPINVOKE.PageTurnView_PageTurnStartedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PageTurnSignal PageTurnFinishedSignal() + { + PageTurnSignal ret = new PageTurnSignal(NDalicPINVOKE.PageTurnView_PageTurnFinishedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PagePanSignal PagePanStartedSignal() + { + PagePanSignal ret = new PagePanSignal(NDalicPINVOKE.PageTurnView_PagePanStartedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PagePanSignal PagePanFinishedSignal() + { + PagePanSignal ret = new PagePanSignal(NDalicPINVOKE.PageTurnView_PagePanFinishedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 + } + + public Vector2 PageSize + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(PageTurnView.Property.PAGE_SIZE).Get(temp); + return temp; + } + set + { + SetProperty(PageTurnView.Property.PAGE_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + public int CurrentPageId + { + get + { + int temp = 0; + GetProperty(PageTurnView.Property.CURRENT_PAGE_ID).Get(ref temp); + return temp; + } + set + { + SetProperty(PageTurnView.Property.CURRENT_PAGE_ID, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 SpineShadow + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(PageTurnView.Property.SPINE_SHADOW).Get(temp); + return temp; + } + set + { + SetProperty(PageTurnView.Property.SPINE_SHADOW, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs old mode 100644 new mode 100755 index 3e11653..476e970 --- a/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class PanGestureDetectedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal PanGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGestureDetectedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~PanGestureDetectedSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class PanGestureDetectedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PanGestureDetectedSignal(swigCPtr); + internal PanGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGestureDetectedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.PanGestureDetectedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.PanGestureDetectedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PanGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~PanGestureDetectedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PanGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, PanGesture arg2) { - NDalicPINVOKE.PanGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), PanGesture.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public PanGestureDetectedSignal() : this(NDalicPINVOKE.new_PanGestureDetectedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PanGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.PanGestureDetectedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.PanGestureDetectedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PanGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PanGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, PanGesture arg2) + { + NDalicPINVOKE.PanGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), PanGesture.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PanGestureDetectedSignal() : this(NDalicPINVOKE.new_PanGestureDetectedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/PanGestureDetector.cs b/src/Tizen.NUI/src/internal/PanGestureDetector.cs old mode 100644 new mode 100755 index 4fc0be3..7217c17 --- a/src/Tizen.NUI/src/internal/PanGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/PanGestureDetector.cs @@ -24,316 +24,408 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; -public class PanGestureDetector : GestureDetector { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class PanGestureDetector : GestureDetector + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PanGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PanGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PanGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PanGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGestureDetector obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGestureDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PanGestureDetector(swigCPtr); + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PanGestureDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public class DetectedEventArgs : EventArgs + { + private View _view; + private PanGesture _panGesture; + + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + public PanGesture PanGesture + { + get + { + return _panGesture; + } + set + { + _panGesture = value; + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr panGesture); + private DaliEventHandler _panGestureEventHandler; + private DetectedCallbackDelegate _panGestureCallbackDelegate; -public class DetectedEventArgs : EventArgs -{ - private View _view; - private PanGesture _panGesture; - public View View + public event DaliEventHandler Detected + { + add { - get - { - return _view; - } - set - { - _view = value; - } - } - - public PanGesture PanGesture - { - get - { - return _panGesture; - } - set - { - _panGesture = value; - } - } -} + lock (this) + { + // Restricted to only one listener + if (_panGestureEventHandler == null) + { + _panGestureEventHandler += value; + + _panGestureCallbackDelegate = new DetectedCallbackDelegate(OnPanGestureDetected); + this.DetectedSignal().Connect(_panGestureCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_panGestureEventHandler != null) + { + this.DetectedSignal().Disconnect(_panGestureCallbackDelegate); + } + + _panGestureEventHandler -= value; + } + } + } + + private void OnPanGestureDetected(IntPtr actor, IntPtr panGesture) + { + DetectedEventArgs e = new DetectedEventArgs(); + + // Populate all members of "e" (PanGestureEventArgs) with real data + e.View = View.GetViewFromPtr(actor); + e.PanGesture = Tizen.NUI.PanGesture.GetPanGestureFromPtr(panGesture); + + if (_panGestureEventHandler != null) + { + //here we send all data to user event handlers + _panGestureEventHandler(this, e); + } + + } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr panGesture); - private DaliEventHandler _panGestureEventHandler; - private DetectedCallbackDelegate _panGestureCallbackDelegate; + + public static PanGestureDetector GetPanGestureDetectorFromPtr(global::System.IntPtr cPtr) + { + PanGestureDetector ret = new PanGestureDetector(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public event DaliEventHandler Detected - { - add - { - lock(this) + public class Property : global::System.IDisposable { - // Restricted to only one listener - if (_panGestureEventHandler == null) - { - _panGestureEventHandler += value; + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PanGestureDetector_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_PanGestureDetector_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int SCREEN_POSITION = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_POSITION_get(); + public static readonly int SCREEN_DISPLACEMENT = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_DISPLACEMENT_get(); + public static readonly int SCREEN_VELOCITY = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_VELOCITY_get(); + public static readonly int LOCAL_POSITION = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_POSITION_get(); + public static readonly int LOCAL_DISPLACEMENT = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_DISPLACEMENT_get(); + public static readonly int LOCAL_VELOCITY = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_VELOCITY_get(); + public static readonly int PANNING = NDalicPINVOKE.PanGestureDetector_Property_PANNING_get(); - _panGestureCallbackDelegate = new DetectedCallbackDelegate(OnPanGestureDetected); - this.DetectedSignal().Connect(_panGestureCallbackDelegate); - } } - } - remove - { - lock(this) + public static Radian DIRECTION_LEFT { - if (_panGestureEventHandler != null) - { - this.DetectedSignal().Disconnect(_panGestureCallbackDelegate); - } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_LEFT_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Radian DIRECTION_RIGHT + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_RIGHT_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } - _panGestureEventHandler -= value; + public static Radian DIRECTION_UP + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_UP_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } } - } - } - private void OnPanGestureDetected(IntPtr actor, IntPtr panGesture) - { - DetectedEventArgs e = new DetectedEventArgs(); + public static Radian DIRECTION_DOWN + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_DOWN_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } - // Populate all members of "e" (PanGestureEventArgs) with real data - e.View = View.GetViewFromPtr(actor); - e.PanGesture = Tizen.NUI.PanGesture.GetPanGestureFromPtr(panGesture); + public static Radian DIRECTION_HORIZONTAL + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_HORIZONTAL_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } - if (_panGestureEventHandler != null) - { - //here we send all data to user event handlers - _panGestureEventHandler(this, e); - } + public static Radian DIRECTION_VERTICAL + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_VERTICAL_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } - } + public static Radian DEFAULT_THRESHOLD + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DEFAULT_THRESHOLD_get(); + Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public PanGestureDetector() : this(NDalicPINVOKE.PanGestureDetector_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -public static PanGestureDetector GetPanGestureDetectorFromPtr(global::System.IntPtr cPtr) { - PanGestureDetector ret = new PanGestureDetector(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + } + public new static PanGestureDetector DownCast(BaseHandle handle) + { + PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public PanGestureDetector(PanGestureDetector handle) : this(NDalicPINVOKE.new_PanGestureDetector__SWIG_1(PanGestureDetector.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PanGestureDetector_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_PanGestureDetector_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int SCREEN_POSITION = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_POSITION_get(); - public static readonly int SCREEN_DISPLACEMENT = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_DISPLACEMENT_get(); - public static readonly int SCREEN_VELOCITY = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_VELOCITY_get(); - public static readonly int LOCAL_POSITION = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_POSITION_get(); - public static readonly int LOCAL_DISPLACEMENT = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_DISPLACEMENT_get(); - public static readonly int LOCAL_VELOCITY = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_VELOCITY_get(); - public static readonly int PANNING = NDalicPINVOKE.PanGestureDetector_Property_PANNING_get(); - - } - - public static Radian DIRECTION_LEFT { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_LEFT_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian DIRECTION_RIGHT { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_RIGHT_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian DIRECTION_UP { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_UP_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian DIRECTION_DOWN { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_DOWN_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian DIRECTION_HORIZONTAL { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_HORIZONTAL_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian DIRECTION_VERTICAL { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_VERTICAL_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Radian DEFAULT_THRESHOLD { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DEFAULT_THRESHOLD_get(); - Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public PanGestureDetector () : this (NDalicPINVOKE.PanGestureDetector_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public new static PanGestureDetector DownCast(BaseHandle handle) { - PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PanGestureDetector(PanGestureDetector handle) : this(NDalicPINVOKE.new_PanGestureDetector__SWIG_1(PanGestureDetector.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PanGestureDetector Assign(PanGestureDetector rhs) { - PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_Assign(swigCPtr, PanGestureDetector.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMinimumTouchesRequired(uint minimum) { - NDalicPINVOKE.PanGestureDetector_SetMinimumTouchesRequired(swigCPtr, minimum); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetMaximumTouchesRequired(uint maximum) { - NDalicPINVOKE.PanGestureDetector_SetMaximumTouchesRequired(swigCPtr, maximum); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetMinimumTouchesRequired() { - uint ret = NDalicPINVOKE.PanGestureDetector_GetMinimumTouchesRequired(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetMaximumTouchesRequired() { - uint ret = NDalicPINVOKE.PanGestureDetector_GetMaximumTouchesRequired(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void AddAngle(Radian angle, Radian threshold) { - NDalicPINVOKE.PanGestureDetector_AddAngle__SWIG_0(swigCPtr, Radian.getCPtr(angle), Radian.getCPtr(threshold)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddAngle(Radian angle) { - NDalicPINVOKE.PanGestureDetector_AddAngle__SWIG_1(swigCPtr, Radian.getCPtr(angle)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddDirection(Radian direction, Radian threshold) { - NDalicPINVOKE.PanGestureDetector_AddDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddDirection(Radian direction) { - NDalicPINVOKE.PanGestureDetector_AddDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetAngleCount() { - uint ret = NDalicPINVOKE.PanGestureDetector_GetAngleCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PanGestureDetector Assign(PanGestureDetector rhs) + { + PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_Assign(swigCPtr, PanGestureDetector.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMinimumTouchesRequired(uint minimum) + { + NDalicPINVOKE.PanGestureDetector_SetMinimumTouchesRequired(swigCPtr, minimum); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetMaximumTouchesRequired(uint maximum) + { + NDalicPINVOKE.PanGestureDetector_SetMaximumTouchesRequired(swigCPtr, maximum); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetMinimumTouchesRequired() + { + uint ret = NDalicPINVOKE.PanGestureDetector_GetMinimumTouchesRequired(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetMaximumTouchesRequired() + { + uint ret = NDalicPINVOKE.PanGestureDetector_GetMaximumTouchesRequired(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void AddAngle(Radian angle, Radian threshold) + { + NDalicPINVOKE.PanGestureDetector_AddAngle__SWIG_0(swigCPtr, Radian.getCPtr(angle), Radian.getCPtr(threshold)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddAngle(Radian angle) + { + NDalicPINVOKE.PanGestureDetector_AddAngle__SWIG_1(swigCPtr, Radian.getCPtr(angle)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddDirection(Radian direction, Radian threshold) + { + NDalicPINVOKE.PanGestureDetector_AddDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddDirection(Radian direction) + { + NDalicPINVOKE.PanGestureDetector_AddDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetAngleCount() + { + uint ret = NDalicPINVOKE.PanGestureDetector_GetAngleCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } internal AngleThresholdPair GetAngle(uint index) { @@ -342,20 +434,23 @@ public static PanGestureDetector GetPanGestureDetectorFromPtr(global::System.Int return ret; } - public void ClearAngles() { - NDalicPINVOKE.PanGestureDetector_ClearAngles(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void ClearAngles() + { + NDalicPINVOKE.PanGestureDetector_ClearAngles(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void RemoveAngle(Radian angle) { - NDalicPINVOKE.PanGestureDetector_RemoveAngle(swigCPtr, Radian.getCPtr(angle)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void RemoveAngle(Radian angle) + { + NDalicPINVOKE.PanGestureDetector_RemoveAngle(swigCPtr, Radian.getCPtr(angle)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void RemoveDirection(Radian direction) { - NDalicPINVOKE.PanGestureDetector_RemoveDirection(swigCPtr, Radian.getCPtr(direction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void RemoveDirection(Radian direction) + { + NDalicPINVOKE.PanGestureDetector_RemoveDirection(swigCPtr, Radian.getCPtr(direction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } internal PanGestureDetectedSignal DetectedSignal() { @@ -364,68 +459,75 @@ public static PanGestureDetector GetPanGestureDetectorFromPtr(global::System.Int return ret; } - public static void SetPanGestureProperties(PanGesture pan) { - NDalicPINVOKE.PanGestureDetector_SetPanGestureProperties(PanGesture.getCPtr(pan)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public static void SetPanGestureProperties(PanGesture pan) + { + NDalicPINVOKE.PanGestureDetector_SetPanGestureProperties(PanGesture.getCPtr(pan)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public Vector2 ScreenPosition - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.SCREEN_POSITION).Get( temp ); - return temp; - } -} public Vector2 ScreenDisplacement - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.SCREEN_DISPLACEMENT).Get( temp ); - return temp; - } -} public Vector2 ScreenVelocity - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.SCREEN_VELOCITY).Get( temp ); - return temp; - } -} public Vector2 LocalPosition - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.LOCAL_POSITION).Get( temp ); - return temp; - } -} public Vector2 LocalDisplacement - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.LOCAL_DISPLACEMENT).Get( temp ); - return temp; - } -} public Vector2 LocalVelocity - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.LOCAL_VELOCITY).Get( temp ); - return temp; - } -} public bool Panning - { - get - { - bool temp = false; - Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.PANNING).Get( ref temp ); - return temp; + public Vector2 ScreenPosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.SCREEN_POSITION).Get(temp); + return temp; + } + } + public Vector2 ScreenDisplacement + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.SCREEN_DISPLACEMENT).Get(temp); + return temp; + } + } + public Vector2 ScreenVelocity + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.SCREEN_VELOCITY).Get(temp); + return temp; + } + } + public Vector2 LocalPosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.LOCAL_POSITION).Get(temp); + return temp; + } + } + public Vector2 LocalDisplacement + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.LOCAL_DISPLACEMENT).Get(temp); + return temp; + } + } + public Vector2 LocalVelocity + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.LOCAL_VELOCITY).Get(temp); + return temp; + } + } + public bool Panning + { + get + { + bool temp = false; + Tizen.NUI.Object.GetProperty(swigCPtr, PanGestureDetector.Property.PANNING).Get(ref temp); + return temp; + } + } } -} -} } diff --git a/src/Tizen.NUI/src/internal/PathConstrainer.cs b/src/Tizen.NUI/src/internal/PathConstrainer.cs old mode 100644 new mode 100755 index 2b73097..516c32e --- a/src/Tizen.NUI/src/internal/PathConstrainer.cs +++ b/src/Tizen.NUI/src/internal/PathConstrainer.cs @@ -24,94 +24,162 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ internal class PathConstrainer : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PathConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PathConstrainer_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PathConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PathConstrainer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PathConstrainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PathConstrainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PathConstrainer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PathConstrainer_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PathConstrainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_PathConstrainer_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + + + + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PathConstrainer_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_PathConstrainer_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + internal static readonly int FORWARD = NDalicPINVOKE.PathConstrainer_Property_FORWARD_get(); internal static readonly int POINTS = NDalicPINVOKE.PathConstrainer_Property_POINTS_get(); internal static readonly int CONTROL_POINTS = NDalicPINVOKE.PathConstrainer_Property_CONTROL_POINTS_get(); - - } - public PathConstrainer () : this (NDalicPINVOKE.PathConstrainer_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - } - public new static PathConstrainer DownCast(BaseHandle handle) { - PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PathConstrainer() : this(NDalicPINVOKE.PathConstrainer_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public new static PathConstrainer DownCast(BaseHandle handle) + { + PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } internal PathConstrainer(PathConstrainer handle) : this(NDalicPINVOKE.new_PathConstrainer__SWIG_1(PathConstrainer.getCPtr(handle)), true) { @@ -125,15 +193,17 @@ namespace Tizen.NUI { return ret; } - public void Apply(Property target, Property source, Vector2 range, Vector2 wrap) { - NDalicPINVOKE.PathConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Apply(Property target, Property source, Vector2 range, Vector2 wrap) + { + NDalicPINVOKE.PathConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Apply(Property target, Property source, Vector2 range) { - NDalicPINVOKE.PathConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Apply(Property target, Property source, Vector2 range) + { + NDalicPINVOKE.PathConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } internal void Remove(Animatable target) { @@ -183,6 +253,6 @@ namespace Tizen.NUI { } } -} + } } diff --git a/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs old mode 100644 new mode 100755 index abeb433..81778a5 --- a/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class PinchGestureDetectedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal PinchGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGestureDetectedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~PinchGestureDetectedSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class PinchGestureDetectedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PinchGestureDetectedSignal(swigCPtr); + internal PinchGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGestureDetectedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.PinchGestureDetectedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.PinchGestureDetectedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PinchGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~PinchGestureDetectedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PinchGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, PinchGesture arg2) { - NDalicPINVOKE.PinchGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), PinchGesture.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public PinchGestureDetectedSignal() : this(NDalicPINVOKE.new_PinchGestureDetectedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PinchGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.PinchGestureDetectedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.PinchGestureDetectedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PinchGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PinchGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, PinchGesture arg2) + { + NDalicPINVOKE.PinchGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), PinchGesture.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PinchGestureDetectedSignal() : this(NDalicPINVOKE.new_PinchGestureDetectedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/PinchGestureDetector.cs b/src/Tizen.NUI/src/internal/PinchGestureDetector.cs old mode 100644 new mode 100755 index 22587e2..566e0f9 --- a/src/Tizen.NUI/src/internal/PinchGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/PinchGestureDetector.cs @@ -24,162 +24,186 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; -public class PinchGestureDetector : GestureDetector { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class PinchGestureDetector : GestureDetector + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PinchGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PinchGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PinchGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PinchGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGestureDetector obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PinchGestureDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PinchGestureDetector(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } -public class DetectedEventArgs : EventArgs -{ - private View _view; - private PinchGesture _pinchGesture; + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - - public PinchGesture PinchGesture - { - get - { - return _pinchGesture; - } - set - { - _pinchGesture = value; - } - } -} - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr pinchGesture); - private DaliEventHandler _pinchGestureEventHandler; - private DetectedCallbackDelegate _pinchGestureCallbackDelegate; + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PinchGestureDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public event DaliEventHandler Detected - { - add - { - lock(this) + public class DetectedEventArgs : EventArgs { - // Restricted to only one listener - if (_pinchGestureEventHandler == null) - { - _pinchGestureEventHandler += value; - - _pinchGestureCallbackDelegate = new DetectedCallbackDelegate(OnPinchGestureDetected); - this.DetectedSignal().Connect(_pinchGestureCallbackDelegate); - } + private View _view; + private PinchGesture _pinchGesture; + + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + public PinchGesture PinchGesture + { + get + { + return _pinchGesture; + } + set + { + _pinchGesture = value; + } + } } - } - remove - { - lock(this) - { - if (_pinchGestureEventHandler != null) - { - this.DetectedSignal().Disconnect(_pinchGestureCallbackDelegate); - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr pinchGesture); + private DaliEventHandler _pinchGestureEventHandler; + private DetectedCallbackDelegate _pinchGestureCallbackDelegate; + - _pinchGestureEventHandler -= value; + public event DaliEventHandler Detected + { + add + { + lock (this) + { + // Restricted to only one listener + if (_pinchGestureEventHandler == null) + { + _pinchGestureEventHandler += value; + + _pinchGestureCallbackDelegate = new DetectedCallbackDelegate(OnPinchGestureDetected); + this.DetectedSignal().Connect(_pinchGestureCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_pinchGestureEventHandler != null) + { + this.DetectedSignal().Disconnect(_pinchGestureCallbackDelegate); + } + + _pinchGestureEventHandler -= value; + } + } } - } - } - private void OnPinchGestureDetected(IntPtr actor, IntPtr pinchGesture) - { - DetectedEventArgs e = new DetectedEventArgs(); + private void OnPinchGestureDetected(IntPtr actor, IntPtr pinchGesture) + { + DetectedEventArgs e = new DetectedEventArgs(); - // Populate all members of "e" (DetectedEventArgs) with real data - e.View = View.GetViewFromPtr(actor); - e.PinchGesture = Tizen.NUI.PinchGesture.GetPinchGestureFromPtr(pinchGesture); + // Populate all members of "e" (DetectedEventArgs) with real data + e.View = View.GetViewFromPtr(actor); + e.PinchGesture = Tizen.NUI.PinchGesture.GetPinchGestureFromPtr(pinchGesture); - if (_pinchGestureEventHandler != null) - { - //here we send all data to user event handlers - _pinchGestureEventHandler(this, e); - } + if (_pinchGestureEventHandler != null) + { + //here we send all data to user event handlers + _pinchGestureEventHandler(this, e); + } - } + } -public static PinchGestureDetector GetPinchGestureDetectorFromPtr(global::System.IntPtr cPtr) { - PinchGestureDetector ret = new PinchGestureDetector(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public static PinchGestureDetector GetPinchGestureDetectorFromPtr(global::System.IntPtr cPtr) + { + PinchGestureDetector ret = new PinchGestureDetector(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public PinchGestureDetector () : this (NDalicPINVOKE.PinchGestureDetector_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + public PinchGestureDetector() : this(NDalicPINVOKE.PinchGestureDetector_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public new static PinchGestureDetector DownCast(BaseHandle handle) { - PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.PinchGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + } + public new static PinchGestureDetector DownCast(BaseHandle handle) + { + PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.PinchGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public PinchGestureDetector(PinchGestureDetector handle) : this(NDalicPINVOKE.new_PinchGestureDetector__SWIG_1(PinchGestureDetector.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PinchGestureDetector(PinchGestureDetector handle) : this(NDalicPINVOKE.new_PinchGestureDetector__SWIG_1(PinchGestureDetector.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public PinchGestureDetector Assign(PinchGestureDetector rhs) { - PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.PinchGestureDetector_Assign(swigCPtr, PinchGestureDetector.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PinchGestureDetector Assign(PinchGestureDetector rhs) + { + PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.PinchGestureDetector_Assign(swigCPtr, PinchGestureDetector.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - internal PinchGestureDetectedSignal DetectedSignal() { - PinchGestureDetectedSignal ret = new PinchGestureDetectedSignal(NDalicPINVOKE.PinchGestureDetector_DetectedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + internal PinchGestureDetectedSignal DetectedSignal() + { + PinchGestureDetectedSignal ret = new PinchGestureDetectedSignal(NDalicPINVOKE.PinchGestureDetector_DetectedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + } } diff --git a/src/Tizen.NUI/src/internal/PixelData.cs b/src/Tizen.NUI/src/internal/PixelData.cs old mode 100644 new mode 100755 index 5b7e066..3c332a6 --- a/src/Tizen.NUI/src/internal/PixelData.cs +++ b/src/Tizen.NUI/src/internal/PixelData.cs @@ -24,76 +24,102 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PixelData : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class PixelData : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PixelData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PixelData_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PixelData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PixelData_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PixelData obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PixelData(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PixelData obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PixelData(swigCPtr); + public PixelData(byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat, PixelData.ReleaseFunction releaseFunction) : this(NDalicPINVOKE.PixelData_New(buffer, bufferSize, width, height, (int)pixelFormat, (int)releaseFunction), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public PixelData(PixelData handle) : this(NDalicPINVOKE.new_PixelData__SWIG_1(PixelData.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public PixelData (byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat, PixelData.ReleaseFunction releaseFunction) : this (NDalicPINVOKE.PixelData_New(buffer, bufferSize, width, height, (int)pixelFormat, (int)releaseFunction), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public PixelData(PixelData handle) : this(NDalicPINVOKE.new_PixelData__SWIG_1(PixelData.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PixelData Assign(PixelData rhs) { - PixelData ret = new PixelData(NDalicPINVOKE.PixelData_Assign(swigCPtr, PixelData.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetWidth() { - uint ret = NDalicPINVOKE.PixelData_GetWidth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetHeight() { - uint ret = NDalicPINVOKE.PixelData_GetHeight(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PixelFormat GetPixelFormat() { - PixelFormat ret = (PixelFormat)NDalicPINVOKE.PixelData_GetPixelFormat(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum ReleaseFunction { - FREE, - DELETE_ARRAY - } -} + public PixelData Assign(PixelData rhs) + { + PixelData ret = new PixelData(NDalicPINVOKE.PixelData_Assign(swigCPtr, PixelData.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetWidth() + { + uint ret = NDalicPINVOKE.PixelData_GetWidth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetHeight() + { + uint ret = NDalicPINVOKE.PixelData_GetHeight(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PixelFormat GetPixelFormat() + { + PixelFormat ret = (PixelFormat)NDalicPINVOKE.PixelData_GetPixelFormat(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum ReleaseFunction + { + FREE, + DELETE_ARRAY + } + + } } diff --git a/src/Tizen.NUI/src/internal/PixelFormat.cs b/src/Tizen.NUI/src/internal/PixelFormat.cs old mode 100644 new mode 100755 index f829e40..6b5b01f --- a/src/Tizen.NUI/src/internal/PixelFormat.cs +++ b/src/Tizen.NUI/src/internal/PixelFormat.cs @@ -8,64 +8,66 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum PixelFormat { - INVALID = 0, - A8 = 1, - L8, - LA88, - RGB565, - BGR565, - RGBA4444, - BGRA4444, - RGBA5551, - BGRA5551, - RGB888, - RGB8888, - BGR8888, - RGBA8888, - BGRA8888, - COMPRESSED_R11_EAC, - COMPRESSED_SIGNED_R11_EAC, - COMPRESSED_RG11_EAC, - COMPRESSED_SIGNED_RG11_EAC, - COMPRESSED_RGB8_ETC2, - COMPRESSED_SRGB8_ETC2, - COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, - COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, - COMPRESSED_RGBA8_ETC2_EAC, - COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, - COMPRESSED_RGB8_ETC1, - COMPRESSED_RGB_PVRTC_4BPPV1, - COMPRESSED_RGBA_ASTC_4x4_KHR, - COMPRESSED_RGBA_ASTC_5x4_KHR, - COMPRESSED_RGBA_ASTC_5x5_KHR, - COMPRESSED_RGBA_ASTC_6x5_KHR, - COMPRESSED_RGBA_ASTC_6x6_KHR, - COMPRESSED_RGBA_ASTC_8x5_KHR, - COMPRESSED_RGBA_ASTC_8x6_KHR, - COMPRESSED_RGBA_ASTC_8x8_KHR, - COMPRESSED_RGBA_ASTC_10x5_KHR, - COMPRESSED_RGBA_ASTC_10x6_KHR, - COMPRESSED_RGBA_ASTC_10x8_KHR, - COMPRESSED_RGBA_ASTC_10x10_KHR, - COMPRESSED_RGBA_ASTC_12x10_KHR, - COMPRESSED_RGBA_ASTC_12x12_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, - COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR -} + internal enum PixelFormat + { + INVALID = 0, + A8 = 1, + L8, + LA88, + RGB565, + BGR565, + RGBA4444, + BGRA4444, + RGBA5551, + BGRA5551, + RGB888, + RGB8888, + BGR8888, + RGBA8888, + BGRA8888, + COMPRESSED_R11_EAC, + COMPRESSED_SIGNED_R11_EAC, + COMPRESSED_RG11_EAC, + COMPRESSED_SIGNED_RG11_EAC, + COMPRESSED_RGB8_ETC2, + COMPRESSED_SRGB8_ETC2, + COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, + COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, + COMPRESSED_RGBA8_ETC2_EAC, + COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, + COMPRESSED_RGB8_ETC1, + COMPRESSED_RGB_PVRTC_4BPPV1, + COMPRESSED_RGBA_ASTC_4x4_KHR, + COMPRESSED_RGBA_ASTC_5x4_KHR, + COMPRESSED_RGBA_ASTC_5x5_KHR, + COMPRESSED_RGBA_ASTC_6x5_KHR, + COMPRESSED_RGBA_ASTC_6x6_KHR, + COMPRESSED_RGBA_ASTC_8x5_KHR, + COMPRESSED_RGBA_ASTC_8x6_KHR, + COMPRESSED_RGBA_ASTC_8x8_KHR, + COMPRESSED_RGBA_ASTC_10x5_KHR, + COMPRESSED_RGBA_ASTC_10x6_KHR, + COMPRESSED_RGBA_ASTC_10x8_KHR, + COMPRESSED_RGBA_ASTC_10x10_KHR, + COMPRESSED_RGBA_ASTC_12x10_KHR, + COMPRESSED_RGBA_ASTC_12x12_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, + COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR + } } diff --git a/src/Tizen.NUI/src/internal/Popup.cs b/src/Tizen.NUI/src/internal/Popup.cs old mode 100644 new mode 100755 index 77722b9..0e89e6b --- a/src/Tizen.NUI/src/internal/Popup.cs +++ b/src/Tizen.NUI/src/internal/Popup.cs @@ -50,32 +50,45 @@ namespace Tizen.NUI.UIComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Popup(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Popup(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } + /// /// Event arguments that passed via OutsideTouchedEvent /// @@ -333,31 +346,70 @@ namespace Tizen.NUI.UIComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Property() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Popup_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Popup_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } internal Property() : this(NDalicPINVOKE.new_Popup_Property(), true) @@ -664,30 +716,30 @@ namespace Tizen.NUI.UIComponents switch (value) { case DisplayStateType.Showing: - { - valueToString = "SHOWING"; - break; - } + { + valueToString = "SHOWING"; + break; + } case DisplayStateType.Shown: - { - valueToString = "SHOWN"; - break; - } + { + valueToString = "SHOWN"; + break; + } case DisplayStateType.Hiding: - { - valueToString = "HIDING"; - break; - } + { + valueToString = "HIDING"; + break; + } case DisplayStateType.Hidden: - { - valueToString = "HIDDEN"; - break; - } + { + valueToString = "HIDDEN"; + break; + } default: - { - valueToString = "HIDDEN"; - break; - } + { + valueToString = "HIDDEN"; + break; + } } SetProperty(Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString)); } @@ -776,35 +828,35 @@ namespace Tizen.NUI.UIComponents switch (value) { case ContextualModeType.NonContextual: - { - valueToString = "NON_CONTEXTUAL"; - break; - } + { + valueToString = "NON_CONTEXTUAL"; + break; + } case ContextualModeType.Above: - { - valueToString = "ABOVE"; - break; - } + { + valueToString = "ABOVE"; + break; + } case ContextualModeType.Rright: - { - valueToString = "RIGHT"; - break; - } + { + valueToString = "RIGHT"; + break; + } case ContextualModeType.Below: - { - valueToString = "BELOW"; - break; - } + { + valueToString = "BELOW"; + break; + } case ContextualModeType.Left: - { - valueToString = "LEFT"; - break; - } + { + valueToString = "LEFT"; + break; + } default: - { - valueToString = "BELOW"; - break; - } + { + valueToString = "BELOW"; + break; + } } SetProperty(Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString)); } @@ -859,30 +911,30 @@ namespace Tizen.NUI.UIComponents switch (value) { case AnimationModeType.None: - { - valueToString = "NONE"; - break; - } + { + valueToString = "NONE"; + break; + } case AnimationModeType.Zoom: - { - valueToString = "ZOOM"; - break; - } + { + valueToString = "ZOOM"; + break; + } case AnimationModeType.Fade: - { - valueToString = "FADE"; - break; - } + { + valueToString = "FADE"; + break; + } case AnimationModeType.Custom: - { - valueToString = "CUSTOM"; - break; - } + { + valueToString = "CUSTOM"; + break; + } default: - { - valueToString = "FADE"; - break; - } + { + valueToString = "FADE"; + break; + } } SetProperty(Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString)); } diff --git a/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs b/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs old mode 100644 new mode 100755 index dae37ca..a04a2e4 --- a/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs +++ b/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum PositionInheritanceMode { - INHERIT_PARENT_POSITION, - USE_PARENT_POSITION, - USE_PARENT_POSITION_PLUS_LOCAL_POSITION, - DONT_INHERIT_POSITION -} + internal enum PositionInheritanceMode + { + INHERIT_PARENT_POSITION, + USE_PARENT_POSITION, + USE_PARENT_POSITION_PLUS_LOCAL_POSITION, + DONT_INHERIT_POSITION + } } diff --git a/src/Tizen.NUI/src/internal/ProgressBar.cs b/src/Tizen.NUI/src/internal/ProgressBar.cs old mode 100644 new mode 100755 index a178cb2..e284c04 --- a/src/Tizen.NUI/src/internal/ProgressBar.cs +++ b/src/Tizen.NUI/src/internal/ProgressBar.cs @@ -53,30 +53,40 @@ namespace Tizen.NUI.UIComponents /// /// To make ProgressBar instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ProgressBar(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ProgressBar(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } + base.Dispose(type); + } /// @@ -197,31 +207,70 @@ namespace Tizen.NUI.UIComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Property() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ProgressBar_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ProgressBar_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } internal Property() : this(NDalicPINVOKE.new_ProgressBar_Property(), true) diff --git a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs old mode 100644 new mode 100755 index ac4ab59..1c6fc85 --- a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class ProgressBarValueChangedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class ProgressBarValueChangedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ProgressBarValueChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ProgressBarValueChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ProgressBarValueChangedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ProgressBarValueChangedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ProgressBarValueChangedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ProgressBarValueChangedSignal(swigCPtr); + ~ProgressBarValueChangedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ProgressBarValueChangedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ProgressBarValueChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ProgressBarValueChangedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ProgressBarValueChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ProgressBarValueChangedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ProgressBarValueChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ProgressBarValueChangedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(Tizen.NUI.UIComponents.ProgressBar arg1, float arg2, float arg3) { - NDalicPINVOKE.ProgressBarValueChangedSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.ProgressBar.getCPtr(arg1), arg2, arg3); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ProgressBarValueChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public ProgressBarValueChangedSignal() : this(NDalicPINVOKE.new_ProgressBarValueChangedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ProgressBarValueChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(Tizen.NUI.UIComponents.ProgressBar arg1, float arg2, float arg3) + { + NDalicPINVOKE.ProgressBarValueChangedSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.ProgressBar.getCPtr(arg1), arg2, arg3); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ProgressBarValueChangedSignal() : this(NDalicPINVOKE.new_ProgressBarValueChangedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/PropertyBuffer.cs b/src/Tizen.NUI/src/internal/PropertyBuffer.cs old mode 100644 new mode 100755 index 8a416ed..4038fa7 --- a/src/Tizen.NUI/src/internal/PropertyBuffer.cs +++ b/src/Tizen.NUI/src/internal/PropertyBuffer.cs @@ -24,70 +24,93 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PropertyBuffer : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class PropertyBuffer : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PropertyBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyBuffer_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PropertyBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyBuffer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyBuffer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyBuffer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PropertyBuffer(swigCPtr); + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PropertyBuffer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public PropertyBuffer (PropertyMap bufferFormat) : this (NDalicPINVOKE.PropertyBuffer_New(PropertyMap.getCPtr(bufferFormat)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + public PropertyBuffer(PropertyMap bufferFormat) : this(NDalicPINVOKE.PropertyBuffer_New(PropertyMap.getCPtr(bufferFormat)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public PropertyBuffer(PropertyBuffer handle) : this(NDalicPINVOKE.new_PropertyBuffer__SWIG_1(PropertyBuffer.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + } + public PropertyBuffer(PropertyBuffer handle) : this(NDalicPINVOKE.new_PropertyBuffer__SWIG_1(PropertyBuffer.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public static PropertyBuffer DownCast(BaseHandle handle) { - PropertyBuffer ret = new PropertyBuffer(NDalicPINVOKE.PropertyBuffer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public static PropertyBuffer DownCast(BaseHandle handle) + { + PropertyBuffer ret = new PropertyBuffer(NDalicPINVOKE.PropertyBuffer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public PropertyBuffer Assign(PropertyBuffer handle) { - PropertyBuffer ret = new PropertyBuffer(NDalicPINVOKE.PropertyBuffer_Assign(swigCPtr, PropertyBuffer.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PropertyBuffer Assign(PropertyBuffer handle) + { + PropertyBuffer ret = new PropertyBuffer(NDalicPINVOKE.PropertyBuffer_Assign(swigCPtr, PropertyBuffer.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void SetData(System.IntPtr data, uint size) { - NDalicPINVOKE.PropertyBuffer_SetData(swigCPtr, data, size); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetData(System.IntPtr data, uint size) + { + NDalicPINVOKE.PropertyBuffer_SetData(swigCPtr, data, size); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public uint GetSize() { - uint ret = NDalicPINVOKE.PropertyBuffer_GetSize(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetSize() + { + uint ret = NDalicPINVOKE.PropertyBuffer_GetSize(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + } } diff --git a/src/Tizen.NUI/src/internal/PropertyCondition.cs b/src/Tizen.NUI/src/internal/PropertyCondition.cs old mode 100644 new mode 100755 index d30a053..6e5a1ed --- a/src/Tizen.NUI/src/internal/PropertyCondition.cs +++ b/src/Tizen.NUI/src/internal/PropertyCondition.cs @@ -8,65 +8,87 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PropertyCondition : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class PropertyCondition : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyCondition_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyCondition obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PropertyCondition(swigCPtr); + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PropertyCondition(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public PropertyCondition() : this(NDalicPINVOKE.new_PropertyCondition__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PropertyCondition() : this(NDalicPINVOKE.new_PropertyCondition__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public PropertyCondition(PropertyCondition handle) : this(NDalicPINVOKE.new_PropertyCondition__SWIG_1(PropertyCondition.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PropertyCondition(PropertyCondition handle) : this(NDalicPINVOKE.new_PropertyCondition__SWIG_1(PropertyCondition.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public PropertyCondition Assign(PropertyCondition rhs) { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.PropertyCondition_Assign(swigCPtr, PropertyCondition.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public PropertyCondition Assign(PropertyCondition rhs) + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.PropertyCondition_Assign(swigCPtr, PropertyCondition.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public uint GetArgumentCount() { - uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public uint GetArgumentCount() + { + uint ret = NDalicPINVOKE.PropertyCondition_GetArgumentCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public float GetArgument(uint index) { - float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public float GetArgument(uint index) + { + float ret = NDalicPINVOKE.PropertyCondition_GetArgument(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + } } diff --git a/src/Tizen.NUI/src/internal/PropertyNotification.cs b/src/Tizen.NUI/src/internal/PropertyNotification.cs old mode 100644 new mode 100755 index d2bc022..9f20df0 --- a/src/Tizen.NUI/src/internal/PropertyNotification.cs +++ b/src/Tizen.NUI/src/internal/PropertyNotification.cs @@ -8,198 +8,226 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; - internal class PropertyNotification : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class PropertyNotification : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PropertyNotification(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyNotification_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PropertyNotification(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PropertyNotification_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyNotification obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyNotification obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PropertyNotification(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PropertyNotification(swigCPtr); + /** + * @brief Event arguments that passed via Notify signal + * + */ + public class NotifyEventArgs : EventArgs + { + private PropertyNotification _propertyNotification; + + /** + * @brief PropertyNotification - is the PropertyNotification handle that has the notification properties. + * + */ + public PropertyNotification PropertyNotification + { + get + { + return _propertyNotification; + } + set + { + _propertyNotification = value; + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void NotifyEventCallbackDelegate(IntPtr propertyNotification); + private DaliEventHandler _propertyNotificationNotifyEventHandler; + private NotifyEventCallbackDelegate _propertyNotificationNotifyEventCallbackDelegate; + + /** + * @brief Event for Notified signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NotifyEventHandler-DaliEventHandler) provided by the user. + * Notified signal is emitted when the notification upon a condition of the property being met, has occurred. + */ + public event DaliEventHandler Notified + { + add + { + lock (this) + { + // Restricted to only one listener + if (_propertyNotificationNotifyEventHandler == null) + { + _propertyNotificationNotifyEventHandler += value; + + _propertyNotificationNotifyEventCallbackDelegate = new NotifyEventCallbackDelegate(OnPropertyNotificationNotify); + this.NotifySignal().Connect(_propertyNotificationNotifyEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_propertyNotificationNotifyEventHandler != null) + { + this.NotifySignal().Disconnect(_propertyNotificationNotifyEventCallbackDelegate); + } + + _propertyNotificationNotifyEventHandler -= value; + } + } + } + + // Callback for PropertyNotification NotifySignal + private void OnPropertyNotificationNotify(IntPtr propertyNotification) + { + NotifyEventArgs e = new NotifyEventArgs(); + e.PropertyNotification = GetPropertyNotificationFromPtr(propertyNotification); + + if (_propertyNotificationNotifyEventHandler != null) + { + //here we send all data to user event handlers + _propertyNotificationNotifyEventHandler(this, e); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public static PropertyNotification GetPropertyNotificationFromPtr(global::System.IntPtr cPtr) + { + PropertyNotification ret = new PropertyNotification(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -/** - * @brief Event arguments that passed via Notify signal - * - */ -public class NotifyEventArgs : EventArgs -{ - private PropertyNotification _propertyNotification; - - /** - * @brief PropertyNotification - is the PropertyNotification handle that has the notification properties. - * - */ - public PropertyNotification PropertyNotification - { - get - { - return _propertyNotification; - } - set - { - _propertyNotification = value; - } - } -} + public PropertyNotification() : this(NDalicPINVOKE.new_PropertyNotification__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void NotifyEventCallbackDelegate(IntPtr propertyNotification); - private DaliEventHandler _propertyNotificationNotifyEventHandler; - private NotifyEventCallbackDelegate _propertyNotificationNotifyEventCallbackDelegate; - - /** - * @brief Event for Notified signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NotifyEventHandler-DaliEventHandler) provided by the user. - * Notified signal is emitted when the notification upon a condition of the property being met, has occurred. - */ - public event DaliEventHandler Notified - { - add - { - lock(this) - { - // Restricted to only one listener - if (_propertyNotificationNotifyEventHandler == null) - { - _propertyNotificationNotifyEventHandler += value; - - _propertyNotificationNotifyEventCallbackDelegate = new NotifyEventCallbackDelegate(OnPropertyNotificationNotify); - this.NotifySignal().Connect(_propertyNotificationNotifyEventCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_propertyNotificationNotifyEventHandler != null) - { - this.NotifySignal().Disconnect(_propertyNotificationNotifyEventCallbackDelegate); - } - - _propertyNotificationNotifyEventHandler -= value; - } - } - } - - // Callback for PropertyNotification NotifySignal - private void OnPropertyNotificationNotify(IntPtr propertyNotification) - { - NotifyEventArgs e = new NotifyEventArgs(); - e.PropertyNotification = GetPropertyNotificationFromPtr(propertyNotification); - - if (_propertyNotificationNotifyEventHandler != null) - { - //here we send all data to user event handlers - _propertyNotificationNotifyEventHandler(this, e); - } - } - - public static PropertyNotification GetPropertyNotificationFromPtr(global::System.IntPtr cPtr) { - PropertyNotification ret = new PropertyNotification(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public PropertyNotification() : this(NDalicPINVOKE.new_PropertyNotification__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static PropertyNotification DownCast(BaseHandle handle) { - PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.PropertyNotification_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyNotification(PropertyNotification handle) : this(NDalicPINVOKE.new_PropertyNotification__SWIG_1(PropertyNotification.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PropertyNotification Assign(PropertyNotification rhs) { - PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.PropertyNotification_Assign(swigCPtr, PropertyNotification.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyCondition GetCondition() { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.PropertyNotification_GetCondition__SWIG_0(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Animatable GetTarget() { - Animatable ret = new Animatable(NDalicPINVOKE.PropertyNotification_GetTarget(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int GetTargetProperty() { - int ret = NDalicPINVOKE.PropertyNotification_GetTargetProperty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetNotifyMode(PropertyNotification.NotifyMode mode) { - NDalicPINVOKE.PropertyNotification_SetNotifyMode(swigCPtr, (int)mode); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PropertyNotification.NotifyMode GetNotifyMode() { - PropertyNotification.NotifyMode ret = (PropertyNotification.NotifyMode)NDalicPINVOKE.PropertyNotification_GetNotifyMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool GetNotifyResult() { - bool ret = NDalicPINVOKE.PropertyNotification_GetNotifyResult(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyNotifySignal NotifySignal() { - PropertyNotifySignal ret = new PropertyNotifySignal(NDalicPINVOKE.PropertyNotification_NotifySignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum NotifyMode { - Disabled, - NotifyOnTrue, - NotifyOnFalse, - NotifyOnChanged - } + public static PropertyNotification DownCast(BaseHandle handle) + { + PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.PropertyNotification_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + public PropertyNotification(PropertyNotification handle) : this(NDalicPINVOKE.new_PropertyNotification__SWIG_1(PropertyNotification.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PropertyNotification Assign(PropertyNotification rhs) + { + PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.PropertyNotification_Assign(swigCPtr, PropertyNotification.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyCondition GetCondition() + { + PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.PropertyNotification_GetCondition__SWIG_0(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Animatable GetTarget() + { + Animatable ret = new Animatable(NDalicPINVOKE.PropertyNotification_GetTarget(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int GetTargetProperty() + { + int ret = NDalicPINVOKE.PropertyNotification_GetTargetProperty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetNotifyMode(PropertyNotification.NotifyMode mode) + { + NDalicPINVOKE.PropertyNotification_SetNotifyMode(swigCPtr, (int)mode); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PropertyNotification.NotifyMode GetNotifyMode() + { + PropertyNotification.NotifyMode ret = (PropertyNotification.NotifyMode)NDalicPINVOKE.PropertyNotification_GetNotifyMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool GetNotifyResult() + { + bool ret = NDalicPINVOKE.PropertyNotification_GetNotifyResult(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyNotifySignal NotifySignal() + { + PropertyNotifySignal ret = new PropertyNotifySignal(NDalicPINVOKE.PropertyNotification_NotifySignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum NotifyMode + { + Disabled, + NotifyOnTrue, + NotifyOnFalse, + NotifyOnChanged + } + + } } diff --git a/src/Tizen.NUI/src/internal/PropertyNotifySignal.cs b/src/Tizen.NUI/src/internal/PropertyNotifySignal.cs old mode 100644 new mode 100755 index 0f9fae2..2ab0225 --- a/src/Tizen.NUI/src/internal/PropertyNotifySignal.cs +++ b/src/Tizen.NUI/src/internal/PropertyNotifySignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PropertyNotifySignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class PropertyNotifySignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PropertyNotifySignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PropertyNotifySignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyNotifySignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyNotifySignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PropertyNotifySignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PropertyNotifySignal(swigCPtr); + ~PropertyNotifySignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.PropertyNotifySignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PropertyNotifySignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.PropertyNotifySignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PropertyNotifySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.PropertyNotifySignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.PropertyNotifySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.PropertyNotifySignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(PropertyNotification arg) { - NDalicPINVOKE.PropertyNotifySignal_Emit(swigCPtr, PropertyNotification.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PropertyNotifySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public PropertyNotifySignal() : this(NDalicPINVOKE.new_PropertyNotifySignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.PropertyNotifySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(PropertyNotification arg) + { + NDalicPINVOKE.PropertyNotifySignal_Emit(swigCPtr, PropertyNotification.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PropertyNotifySignal() : this(NDalicPINVOKE.new_PropertyNotifySignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/PropertyRangeManager.cs b/src/Tizen.NUI/src/internal/PropertyRangeManager.cs old mode 100644 new mode 100755 index 7fd218a..a1a78fe --- a/src/Tizen.NUI/src/internal/PropertyRangeManager.cs +++ b/src/Tizen.NUI/src/internal/PropertyRangeManager.cs @@ -14,8 +14,8 @@ namespace Tizen.NUI /// Helper class for calculating what property indexes should be assigned to C# View (view) classes. /// internal class PropertyRangeManager - { - private Dictionary _propertyRange; + { + private Dictionary _propertyRange; /// /// Initializes a new instance of the class. @@ -95,7 +95,7 @@ namespace Tizen.NUI int startAnimatablePropertyIndex = (int)Tizen.NUI.PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + maxCountPerDerivation; #if (DOT_NET_CORE) - while ( viewType.GetTypeInfo().BaseType.Name != "CustomView" ) // custom view is our C# view base class. we don't go any deeper. + while (viewType.GetTypeInfo().BaseType.Name != "CustomView") // custom view is our C# view base class. we don't go any deeper. #else while (viewType.BaseType.Name != "CustomView") // custom view is our C# view base class. we don't go any deeper. #endif @@ -104,7 +104,7 @@ namespace Tizen.NUI startEventPropertyIndex += (int)Tizen.NUI.PropertyRanges.DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION; // DALi uses 10,000 startAnimatablePropertyIndex += maxCountPerDerivation; #if DEBUG_ON - Tizen.Log.Debug("NUI", "getStartPropertyIndex = " + viewType.Name +"current index " + startEventPropertyIndex); + Tizen.Log.Debug("NUI", "getStartPropertyIndex = " + viewType.Name + "current index " + startEventPropertyIndex); #endif #if (DOT_NET_CORE) viewType = viewType.GetTypeInfo().BaseType; diff --git a/src/Tizen.NUI/src/internal/PropertyRanges.cs b/src/Tizen.NUI/src/internal/PropertyRanges.cs old mode 100644 new mode 100755 index b9409af..54f0d48 --- a/src/Tizen.NUI/src/internal/PropertyRanges.cs +++ b/src/Tizen.NUI/src/internal/PropertyRanges.cs @@ -8,27 +8,29 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum PropertyRanges { - DEFAULT_OBJECT_PROPERTY_START_INDEX = 0, - DEFAULT_ACTOR_PROPERTY_START_INDEX = DEFAULT_OBJECT_PROPERTY_START_INDEX, - DEFAULT_ACTOR_PROPERTY_MAX_COUNT = 10000, - DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX = DEFAULT_ACTOR_PROPERTY_START_INDEX+DEFAULT_ACTOR_PROPERTY_MAX_COUNT, - DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION = 10000, - DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX, - DEFAULT_RENDERER_PROPERTY_START_INDEX = 9000000, - DEFAULT_RENDERER_PROPERTY_MAX_INDEX = DEFAULT_RENDERER_PROPERTY_START_INDEX+100000, - PROPERTY_REGISTRATION_START_INDEX = 10000000, - DEFAULT_PROPERTY_MAX_COUNT = PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_REGISTRATION_MAX_INDEX = 19999999, - ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX = 20000000, - ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX = 29999999, - CHILD_PROPERTY_REGISTRATION_START_INDEX = 45000000, - CHILD_PROPERTY_REGISTRATION_MAX_INDEX = 49999999, - PROPERTY_CUSTOM_START_INDEX = 50000000, - PROPERTY_CUSTOM_MAX_INDEX = 59999999, - CORE_PROPERTY_MAX_INDEX = PROPERTY_CUSTOM_MAX_INDEX -} + internal enum PropertyRanges + { + DEFAULT_OBJECT_PROPERTY_START_INDEX = 0, + DEFAULT_ACTOR_PROPERTY_START_INDEX = DEFAULT_OBJECT_PROPERTY_START_INDEX, + DEFAULT_ACTOR_PROPERTY_MAX_COUNT = 10000, + DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX = DEFAULT_ACTOR_PROPERTY_START_INDEX + DEFAULT_ACTOR_PROPERTY_MAX_COUNT, + DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION = 10000, + DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX, + DEFAULT_RENDERER_PROPERTY_START_INDEX = 9000000, + DEFAULT_RENDERER_PROPERTY_MAX_INDEX = DEFAULT_RENDERER_PROPERTY_START_INDEX + 100000, + PROPERTY_REGISTRATION_START_INDEX = 10000000, + DEFAULT_PROPERTY_MAX_COUNT = PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_REGISTRATION_MAX_INDEX = 19999999, + ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX = 20000000, + ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX = 29999999, + CHILD_PROPERTY_REGISTRATION_START_INDEX = 45000000, + CHILD_PROPERTY_REGISTRATION_MAX_INDEX = 49999999, + PROPERTY_CUSTOM_START_INDEX = 50000000, + PROPERTY_CUSTOM_MAX_INDEX = 59999999, + CORE_PROPERTY_MAX_INDEX = PROPERTY_CUSTOM_MAX_INDEX + } } diff --git a/src/Tizen.NUI/src/internal/PropertyRegistration.cs b/src/Tizen.NUI/src/internal/PropertyRegistration.cs old mode 100644 new mode 100755 index 00e1631..ba67542 --- a/src/Tizen.NUI/src/internal/PropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/PropertyRegistration.cs @@ -8,47 +8,97 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class PropertyRegistration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class PropertyRegistration : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal PropertyRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal PropertyRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyRegistration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyRegistration obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~PropertyRegistration() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_PropertyRegistration(swigCPtr); + ~PropertyRegistration() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public PropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type, SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void setFunc, SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value getFunc) : this(NDalicPINVOKE.new_PropertyRegistration(TypeRegistration.getCPtr(registered), name, index, (int)type, SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.getCPtr(setFunc), SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.getCPtr(getFunc)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } -} + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PropertyRegistration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public PropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type, SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void setFunc, SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value getFunc) : this(NDalicPINVOKE.new_PropertyRegistration(TypeRegistration.getCPtr(registered), name, index, (int)type, SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.getCPtr(setFunc), SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.getCPtr(getFunc)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/RadioButton.cs b/src/Tizen.NUI/src/internal/RadioButton.cs old mode 100644 new mode 100755 index 32221e9..150ffb2 --- a/src/Tizen.NUI/src/internal/RadioButton.cs +++ b/src/Tizen.NUI/src/internal/RadioButton.cs @@ -57,30 +57,40 @@ namespace Tizen.NUI.UIComponents /// /// To make RadioButton instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_RadioButton(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_RadioButton(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } + base.Dispose(type); + } /// /// Creates an uninitialized RadioButton /// diff --git a/src/Tizen.NUI/src/internal/RefObject.cs b/src/Tizen.NUI/src/internal/RefObject.cs old mode 100644 new mode 100755 index 3782c3d..e46c92e --- a/src/Tizen.NUI/src/internal/RefObject.cs +++ b/src/Tizen.NUI/src/internal/RefObject.cs @@ -8,66 +8,116 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class RefObject : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class RefObject : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal RefObject(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal RefObject(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RefObject obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RefObject obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~RefObject() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { + ~RefObject() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public static RefObject GetRefObjectFromPtr(global::System.IntPtr cPtr) { - RefObject ret = new RefObject(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reference() { - NDalicPINVOKE.RefObject_Reference(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Unreference() { - NDalicPINVOKE.RefObject_Unreference(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int ReferenceCount() { - int ret = NDalicPINVOKE.RefObject_ReferenceCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public static RefObject GetRefObjectFromPtr(global::System.IntPtr cPtr) + { + RefObject ret = new RefObject(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reference() + { + NDalicPINVOKE.RefObject_Reference(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Unreference() + { + NDalicPINVOKE.RefObject_Unreference(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int ReferenceCount() + { + int ret = NDalicPINVOKE.RefObject_ReferenceCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/RenderBufferFormat.cs b/src/Tizen.NUI/src/internal/RenderBufferFormat.cs old mode 100644 new mode 100755 index ac16c80..9d023c3 --- a/src/Tizen.NUI/src/internal/RenderBufferFormat.cs +++ b/src/Tizen.NUI/src/internal/RenderBufferFormat.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum RenderBufferFormat { - COLOR, - COLOR_DEPTH, - COLOR_STENCIL, - COLOR_DEPTH_STENCIL -} + internal enum RenderBufferFormat + { + COLOR, + COLOR_DEPTH, + COLOR_STENCIL, + COLOR_DEPTH_STENCIL + } } diff --git a/src/Tizen.NUI/src/internal/RenderModeType.cs b/src/Tizen.NUI/src/internal/RenderModeType.cs old mode 100644 new mode 100755 index 4f1115e..ace2f6d --- a/src/Tizen.NUI/src/internal/RenderModeType.cs +++ b/src/Tizen.NUI/src/internal/RenderModeType.cs @@ -8,14 +8,16 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum RenderModeType { - NONE, - AUTO, - COLOR, - STENCIL, - COLOR_STENCIL -} + internal enum RenderModeType + { + NONE, + AUTO, + COLOR, + STENCIL, + COLOR_STENCIL + } } diff --git a/src/Tizen.NUI/src/internal/RenderTask.cs b/src/Tizen.NUI/src/internal/RenderTask.cs old mode 100644 new mode 100755 index b7bab08..9891a6a --- a/src/Tizen.NUI/src/internal/RenderTask.cs +++ b/src/Tizen.NUI/src/internal/RenderTask.cs @@ -8,420 +8,541 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class RenderTask : Animatable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class RenderTask : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal RenderTask(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RenderTask_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal RenderTask(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RenderTask_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTask obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTask obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RenderTask(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_RenderTask(swigCPtr); + + public static RenderTask GetRenderTaskFromPtr(global::System.IntPtr cPtr) + { + RenderTask ret = new RenderTask(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public static RenderTask GetRenderTaskFromPtr(global::System.IntPtr cPtr) { - RenderTask ret = new RenderTask(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_RenderTask_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_RenderTask_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int VIEWPORT_POSITION = NDalicPINVOKE.RenderTask_Property_VIEWPORT_POSITION_get(); - public static readonly int VIEWPORT_SIZE = NDalicPINVOKE.RenderTask_Property_VIEWPORT_SIZE_get(); - public static readonly int CLEAR_COLOR = NDalicPINVOKE.RenderTask_Property_CLEAR_COLOR_get(); - public static readonly int REQUIRES_SYNC = NDalicPINVOKE.RenderTask_Property_REQUIRES_SYNC_get(); - - } - - public static SWIGTYPE_p_f_r_Dali__Vector2__bool DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION_get(); - SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static SWIGTYPE_p_f_r_Dali__Vector2__bool FULLSCREEN_FRAMEBUFFER_FUNCTION { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_FULLSCREEN_FRAMEBUFFER_FUNCTION_get(); - SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool DEFAULT_EXCLUSIVE { - get { - bool ret = NDalicPINVOKE.RenderTask_DEFAULT_EXCLUSIVE_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool DEFAULT_INPUT_ENABLED { - get { - bool ret = NDalicPINVOKE.RenderTask_DEFAULT_INPUT_ENABLED_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static Vector4 DEFAULT_CLEAR_COLOR { - get { - global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_DEFAULT_CLEAR_COLOR_get(); - Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool DEFAULT_CLEAR_ENABLED { - get { - bool ret = NDalicPINVOKE.RenderTask_DEFAULT_CLEAR_ENABLED_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static bool DEFAULT_CULL_MODE { - get { - bool ret = NDalicPINVOKE.RenderTask_DEFAULT_CULL_MODE_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public static uint DEFAULT_REFRESH_RATE { - get { - uint ret = NDalicPINVOKE.RenderTask_DEFAULT_REFRESH_RATE_get(); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public RenderTask() : this(NDalicPINVOKE.new_RenderTask__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new static RenderTask DownCast(BaseHandle handle) { - RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTask_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RenderTask(RenderTask handle) : this(NDalicPINVOKE.new_RenderTask__SWIG_1(RenderTask.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RenderTask Assign(RenderTask rhs) { - RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTask_Assign(swigCPtr, RenderTask.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetSourceView(View view) { - NDalicPINVOKE.RenderTask_SetSourceActor(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetSourceView() { - View ret = new View(NDalicPINVOKE.RenderTask_GetSourceActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetExclusive(bool exclusive) { - NDalicPINVOKE.RenderTask_SetExclusive(swigCPtr, exclusive); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool IsExclusive() { - bool ret = NDalicPINVOKE.RenderTask_IsExclusive(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetInputEnabled(bool enabled) { - NDalicPINVOKE.RenderTask_SetInputEnabled(swigCPtr, enabled); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetInputEnabled() { - bool ret = NDalicPINVOKE.RenderTask_GetInputEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetCamera(Camera camera) { - NDalicPINVOKE.RenderTask_SetCameraActor(swigCPtr, Camera.getCPtr(camera)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Camera GetCamera() { - Camera ret = new Camera(NDalicPINVOKE.RenderTask_GetCameraActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetTargetFrameBuffer(FrameBufferImage frameBuffer) { - NDalicPINVOKE.RenderTask_SetTargetFrameBuffer(swigCPtr, FrameBufferImage.getCPtr(frameBuffer)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public FrameBufferImage GetTargetFrameBuffer() { - FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.RenderTask_GetTargetFrameBuffer(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFrameBuffer(FrameBuffer frameBuffer) { - NDalicPINVOKE.RenderTask_SetFrameBuffer(swigCPtr, FrameBuffer.getCPtr(frameBuffer)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public FrameBuffer GetFrameBuffer() { - FrameBuffer ret = new FrameBuffer(NDalicPINVOKE.RenderTask_GetFrameBuffer(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScreenToFrameBufferFunction(SWIGTYPE_p_f_r_Dali__Vector2__bool conversionFunction) { - NDalicPINVOKE.RenderTask_SetScreenToFrameBufferFunction(swigCPtr, SWIGTYPE_p_f_r_Dali__Vector2__bool.getCPtr(conversionFunction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_f_r_Dali__Vector2__bool GetScreenToFrameBufferFunction() { - global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_GetScreenToFrameBufferFunction(swigCPtr); - SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScreenToFrameBufferMappingView(View mappingView) { - NDalicPINVOKE.RenderTask_SetScreenToFrameBufferMappingActor(swigCPtr, View.getCPtr(mappingView)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetScreenToFrameBufferMappingView() { - View ret = new View(NDalicPINVOKE.RenderTask_GetScreenToFrameBufferMappingActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetViewportPosition(Vector2 position) { - NDalicPINVOKE.RenderTask_SetViewportPosition(swigCPtr, Vector2.getCPtr(position)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetCurrentViewportPosition() { - Vector2 ret = new Vector2(NDalicPINVOKE.RenderTask_GetCurrentViewportPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetViewportSize(Vector2 size) { - NDalicPINVOKE.RenderTask_SetViewportSize(swigCPtr, Vector2.getCPtr(size)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetCurrentViewportSize() { - Vector2 ret = new Vector2(NDalicPINVOKE.RenderTask_GetCurrentViewportSize(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetViewport(Rectangle viewport) { - NDalicPINVOKE.RenderTask_SetViewport(swigCPtr, Rectangle.getCPtr(viewport)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Rectangle GetViewport() { - Rectangle ret = new Rectangle(NDalicPINVOKE.RenderTask_GetViewport(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetClearColor(Vector4 color) { - NDalicPINVOKE.RenderTask_SetClearColor(swigCPtr, Vector4.getCPtr(color)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector4 GetClearColor() { - Vector4 ret = new Vector4(NDalicPINVOKE.RenderTask_GetClearColor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetClearEnabled(bool enabled) { - NDalicPINVOKE.RenderTask_SetClearEnabled(swigCPtr, enabled); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetClearEnabled() { - bool ret = NDalicPINVOKE.RenderTask_GetClearEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetCullMode(bool cullMode) { - NDalicPINVOKE.RenderTask_SetCullMode(swigCPtr, cullMode); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetCullMode() { - bool ret = NDalicPINVOKE.RenderTask_GetCullMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetRefreshRate(uint refreshRate) { - NDalicPINVOKE.RenderTask_SetRefreshRate(swigCPtr, refreshRate); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetRefreshRate() { - uint ret = NDalicPINVOKE.RenderTask_GetRefreshRate(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool WorldToViewport(Vector3 position, out float viewportX, out float viewportY) { - bool ret = NDalicPINVOKE.RenderTask_WorldToViewport(swigCPtr, Vector3.getCPtr(position), out viewportX, out viewportY); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool ViewportToLocal(View view, float viewportX, float viewportY, out float localX, out float localY) { - bool ret = NDalicPINVOKE.RenderTask_ViewportToLocal(swigCPtr, View.getCPtr(view), viewportX, viewportY, out localX, out localY); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RenderTaskSignal FinishedSignal() { - RenderTaskSignal ret = new RenderTaskSignal(NDalicPINVOKE.RenderTask_FinishedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum RefreshRate { - REFRESH_ONCE = 0, - REFRESH_ALWAYS = 1 - } - - public Vector2 ViewportPosition - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( RenderTask.Property.VIEWPORT_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( RenderTask.Property.VIEWPORT_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ViewportSize - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( RenderTask.Property.VIEWPORT_SIZE).Get( temp ); - return temp; - } - set - { - SetProperty( RenderTask.Property.VIEWPORT_SIZE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector4 ClearColor - { - get - { - Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); - GetProperty( RenderTask.Property.CLEAR_COLOR).Get( temp ); - return temp; - } - set - { - SetProperty( RenderTask.Property.CLEAR_COLOR, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool RequiresSync - { - get - { - bool temp = false; - GetProperty( RenderTask.Property.REQUIRES_SYNC).Get( ref temp ); - return temp; - } - set - { - SetProperty( RenderTask.Property.REQUIRES_SYNC, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RenderTask_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_RenderTask_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int VIEWPORT_POSITION = NDalicPINVOKE.RenderTask_Property_VIEWPORT_POSITION_get(); + public static readonly int VIEWPORT_SIZE = NDalicPINVOKE.RenderTask_Property_VIEWPORT_SIZE_get(); + public static readonly int CLEAR_COLOR = NDalicPINVOKE.RenderTask_Property_CLEAR_COLOR_get(); + public static readonly int REQUIRES_SYNC = NDalicPINVOKE.RenderTask_Property_REQUIRES_SYNC_get(); + + } + + public static SWIGTYPE_p_f_r_Dali__Vector2__bool DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION_get(); + SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static SWIGTYPE_p_f_r_Dali__Vector2__bool FULLSCREEN_FRAMEBUFFER_FUNCTION + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_FULLSCREEN_FRAMEBUFFER_FUNCTION_get(); + SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool DEFAULT_EXCLUSIVE + { + get + { + bool ret = NDalicPINVOKE.RenderTask_DEFAULT_EXCLUSIVE_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool DEFAULT_INPUT_ENABLED + { + get + { + bool ret = NDalicPINVOKE.RenderTask_DEFAULT_INPUT_ENABLED_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static Vector4 DEFAULT_CLEAR_COLOR + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_DEFAULT_CLEAR_COLOR_get(); + Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool DEFAULT_CLEAR_ENABLED + { + get + { + bool ret = NDalicPINVOKE.RenderTask_DEFAULT_CLEAR_ENABLED_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static bool DEFAULT_CULL_MODE + { + get + { + bool ret = NDalicPINVOKE.RenderTask_DEFAULT_CULL_MODE_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static uint DEFAULT_REFRESH_RATE + { + get + { + uint ret = NDalicPINVOKE.RenderTask_DEFAULT_REFRESH_RATE_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public RenderTask() : this(NDalicPINVOKE.new_RenderTask__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new static RenderTask DownCast(BaseHandle handle) + { + RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTask_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RenderTask(RenderTask handle) : this(NDalicPINVOKE.new_RenderTask__SWIG_1(RenderTask.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RenderTask Assign(RenderTask rhs) + { + RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTask_Assign(swigCPtr, RenderTask.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetSourceView(View view) + { + NDalicPINVOKE.RenderTask_SetSourceActor(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public View GetSourceView() + { + View ret = new View(NDalicPINVOKE.RenderTask_GetSourceActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetExclusive(bool exclusive) + { + NDalicPINVOKE.RenderTask_SetExclusive(swigCPtr, exclusive); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool IsExclusive() + { + bool ret = NDalicPINVOKE.RenderTask_IsExclusive(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetInputEnabled(bool enabled) + { + NDalicPINVOKE.RenderTask_SetInputEnabled(swigCPtr, enabled); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetInputEnabled() + { + bool ret = NDalicPINVOKE.RenderTask_GetInputEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetCamera(Camera camera) + { + NDalicPINVOKE.RenderTask_SetCameraActor(swigCPtr, Camera.getCPtr(camera)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Camera GetCamera() + { + Camera ret = new Camera(NDalicPINVOKE.RenderTask_GetCameraActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetTargetFrameBuffer(FrameBufferImage frameBuffer) + { + NDalicPINVOKE.RenderTask_SetTargetFrameBuffer(swigCPtr, FrameBufferImage.getCPtr(frameBuffer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public FrameBufferImage GetTargetFrameBuffer() + { + FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.RenderTask_GetTargetFrameBuffer(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFrameBuffer(FrameBuffer frameBuffer) + { + NDalicPINVOKE.RenderTask_SetFrameBuffer(swigCPtr, FrameBuffer.getCPtr(frameBuffer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public FrameBuffer GetFrameBuffer() + { + FrameBuffer ret = new FrameBuffer(NDalicPINVOKE.RenderTask_GetFrameBuffer(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScreenToFrameBufferFunction(SWIGTYPE_p_f_r_Dali__Vector2__bool conversionFunction) + { + NDalicPINVOKE.RenderTask_SetScreenToFrameBufferFunction(swigCPtr, SWIGTYPE_p_f_r_Dali__Vector2__bool.getCPtr(conversionFunction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_f_r_Dali__Vector2__bool GetScreenToFrameBufferFunction() + { + global::System.IntPtr cPtr = NDalicPINVOKE.RenderTask_GetScreenToFrameBufferFunction(swigCPtr); + SWIGTYPE_p_f_r_Dali__Vector2__bool ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_f_r_Dali__Vector2__bool(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScreenToFrameBufferMappingView(View mappingView) + { + NDalicPINVOKE.RenderTask_SetScreenToFrameBufferMappingActor(swigCPtr, View.getCPtr(mappingView)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public View GetScreenToFrameBufferMappingView() + { + View ret = new View(NDalicPINVOKE.RenderTask_GetScreenToFrameBufferMappingActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetViewportPosition(Vector2 position) + { + NDalicPINVOKE.RenderTask_SetViewportPosition(swigCPtr, Vector2.getCPtr(position)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetCurrentViewportPosition() + { + Vector2 ret = new Vector2(NDalicPINVOKE.RenderTask_GetCurrentViewportPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetViewportSize(Vector2 size) + { + NDalicPINVOKE.RenderTask_SetViewportSize(swigCPtr, Vector2.getCPtr(size)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetCurrentViewportSize() + { + Vector2 ret = new Vector2(NDalicPINVOKE.RenderTask_GetCurrentViewportSize(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetViewport(Rectangle viewport) + { + NDalicPINVOKE.RenderTask_SetViewport(swigCPtr, Rectangle.getCPtr(viewport)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Rectangle GetViewport() + { + Rectangle ret = new Rectangle(NDalicPINVOKE.RenderTask_GetViewport(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetClearColor(Vector4 color) + { + NDalicPINVOKE.RenderTask_SetClearColor(swigCPtr, Vector4.getCPtr(color)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector4 GetClearColor() + { + Vector4 ret = new Vector4(NDalicPINVOKE.RenderTask_GetClearColor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetClearEnabled(bool enabled) + { + NDalicPINVOKE.RenderTask_SetClearEnabled(swigCPtr, enabled); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetClearEnabled() + { + bool ret = NDalicPINVOKE.RenderTask_GetClearEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetCullMode(bool cullMode) + { + NDalicPINVOKE.RenderTask_SetCullMode(swigCPtr, cullMode); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetCullMode() + { + bool ret = NDalicPINVOKE.RenderTask_GetCullMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetRefreshRate(uint refreshRate) + { + NDalicPINVOKE.RenderTask_SetRefreshRate(swigCPtr, refreshRate); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetRefreshRate() + { + uint ret = NDalicPINVOKE.RenderTask_GetRefreshRate(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool WorldToViewport(Vector3 position, out float viewportX, out float viewportY) + { + bool ret = NDalicPINVOKE.RenderTask_WorldToViewport(swigCPtr, Vector3.getCPtr(position), out viewportX, out viewportY); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool ViewportToLocal(View view, float viewportX, float viewportY, out float localX, out float localY) + { + bool ret = NDalicPINVOKE.RenderTask_ViewportToLocal(swigCPtr, View.getCPtr(view), viewportX, viewportY, out localX, out localY); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RenderTaskSignal FinishedSignal() + { + RenderTaskSignal ret = new RenderTaskSignal(NDalicPINVOKE.RenderTask_FinishedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum RefreshRate + { + REFRESH_ONCE = 0, + REFRESH_ALWAYS = 1 + } + + public Vector2 ViewportPosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(RenderTask.Property.VIEWPORT_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(RenderTask.Property.VIEWPORT_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ViewportSize + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(RenderTask.Property.VIEWPORT_SIZE).Get(temp); + return temp; + } + set + { + SetProperty(RenderTask.Property.VIEWPORT_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector4 ClearColor + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(RenderTask.Property.CLEAR_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(RenderTask.Property.CLEAR_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + public bool RequiresSync + { + get + { + bool temp = false; + GetProperty(RenderTask.Property.REQUIRES_SYNC).Get(ref temp); + return temp; + } + set + { + SetProperty(RenderTask.Property.REQUIRES_SYNC, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/RenderTaskList.cs b/src/Tizen.NUI/src/internal/RenderTaskList.cs old mode 100644 new mode 100755 index c628e5a..158b45f --- a/src/Tizen.NUI/src/internal/RenderTaskList.cs +++ b/src/Tizen.NUI/src/internal/RenderTaskList.cs @@ -8,82 +8,107 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class RenderTaskList : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class RenderTaskList : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal RenderTaskList(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RenderTaskList_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal RenderTaskList(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RenderTaskList_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTaskList obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTaskList obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RenderTaskList(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_RenderTaskList(swigCPtr); + public RenderTaskList() : this(NDalicPINVOKE.new_RenderTaskList__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public RenderTaskList() : this(NDalicPINVOKE.new_RenderTaskList__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static RenderTaskList DownCast(BaseHandle handle) { - RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.RenderTaskList_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RenderTaskList(RenderTaskList handle) : this(NDalicPINVOKE.new_RenderTaskList__SWIG_1(RenderTaskList.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RenderTaskList Assign(RenderTaskList rhs) { - RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.RenderTaskList_Assign(swigCPtr, RenderTaskList.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RenderTask CreateTask() { - RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTaskList_CreateTask(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void RemoveTask(RenderTask task) { - NDalicPINVOKE.RenderTaskList_RemoveTask(swigCPtr, RenderTask.getCPtr(task)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetTaskCount() { - uint ret = NDalicPINVOKE.RenderTaskList_GetTaskCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RenderTask GetTask(uint index) { - RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTaskList_GetTask(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public static RenderTaskList DownCast(BaseHandle handle) + { + RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.RenderTaskList_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RenderTaskList(RenderTaskList handle) : this(NDalicPINVOKE.new_RenderTaskList__SWIG_1(RenderTaskList.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RenderTaskList Assign(RenderTaskList rhs) + { + RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.RenderTaskList_Assign(swigCPtr, RenderTaskList.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RenderTask CreateTask() + { + RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTaskList_CreateTask(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void RemoveTask(RenderTask task) + { + NDalicPINVOKE.RenderTaskList_RemoveTask(swigCPtr, RenderTask.getCPtr(task)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetTaskCount() + { + uint ret = NDalicPINVOKE.RenderTaskList_GetTaskCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RenderTask GetTask(uint index) + { + RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTaskList_GetTask(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/RenderTaskSignal.cs b/src/Tizen.NUI/src/internal/RenderTaskSignal.cs old mode 100644 new mode 100755 index 58ceee0..ab95f15 --- a/src/Tizen.NUI/src/internal/RenderTaskSignal.cs +++ b/src/Tizen.NUI/src/internal/RenderTaskSignal.cs @@ -8,48 +8,97 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class RenderTaskSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class RenderTaskSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal RenderTaskSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal RenderTaskSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTaskSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RenderTaskSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~RenderTaskSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_RenderTaskSignal(swigCPtr); + ~RenderTaskSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - public RenderTaskSignal() : this(NDalicPINVOKE.new_RenderTaskSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RenderTaskSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public RenderTaskSignal() : this(NDalicPINVOKE.new_RenderTaskSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Renderer.cs b/src/Tizen.NUI/src/internal/Renderer.cs old mode 100644 new mode 100755 index cdd1e37..5d84d99 --- a/src/Tizen.NUI/src/internal/Renderer.cs +++ b/src/Tizen.NUI/src/internal/Renderer.cs @@ -24,474 +24,552 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Renderer : Animatable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Renderer : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Renderer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Renderer_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Renderer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Renderer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Renderer(swigCPtr); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Renderer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Renderer_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_Renderer_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get(); - public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get(); - public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get(); - public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get(); - public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get(); - public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get(); - public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get(); - public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get(); - public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get(); - public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get(); - public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get(); - public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get(); - public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get(); - public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get(); - public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get(); - public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get(); - public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get(); - public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get(); - public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get(); - public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get(); - public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get(); - public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get(); - public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get(); - public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get(); - - } - - public Renderer (Geometry geometry, Shader shader) : this (NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Renderer(Renderer handle) : this(NDalicPINVOKE.new_Renderer__SWIG_1(Renderer.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new static Renderer DownCast(BaseHandle handle) { - Renderer ret = new Renderer(NDalicPINVOKE.Renderer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Renderer Assign(Renderer handle) { - Renderer ret = new Renderer(NDalicPINVOKE.Renderer_Assign(swigCPtr, Renderer.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetGeometry(Geometry geometry) { - NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Geometry GetGeometry() { - Geometry ret = new Geometry(NDalicPINVOKE.Renderer_GetGeometry(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetIndexRange(int firstElement, int elementsCount) { - NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetTextures(TextureSet textureSet) { - NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TextureSet GetTextures() { - TextureSet ret = new TextureSet(NDalicPINVOKE.Renderer_GetTextures(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetShader(Shader shader) { - NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Shader GetShader() { - Shader ret = new Shader(NDalicPINVOKE.Renderer_GetShader(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int DepthIndex - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int FaceCullingMode - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendMode - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_MODE).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_MODE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendEquationRgb - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendEquationAlpha - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendFactorSrcRgb - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendFactorDestRgb - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendFactorSrcAlpha - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int BlendFactorDestAlpha - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector4 BlendColor - { - get - { - Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_COLOR).Get( temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_COLOR, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool BlendPreMultipliedAlpha - { - get - { - bool temp = false; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int IndexRangeFirst - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int IndexRangeCount - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int DepthWriteMode - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int DepthFunction - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int DepthTestMode - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int RenderMode - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.RENDER_MODE).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.RENDER_MODE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilFunction - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilFunctionMask - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilFunctionReference - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilMask - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_MASK).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_MASK, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilOperationOnFail - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilOperationOnZFail - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int StencilOperationOnZPass - { - get - { - int temp = 0; - Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get( ref temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Renderer_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_Renderer_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get(); + public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get(); + public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get(); + public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get(); + public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get(); + public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get(); + public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get(); + public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get(); + public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get(); + public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get(); + public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get(); + public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get(); + public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get(); + public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get(); + public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get(); + public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get(); + public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get(); + public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get(); + public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get(); + public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get(); + public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get(); + public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get(); + public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get(); + public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get(); + + } + + public Renderer(Geometry geometry, Shader shader) : this(NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Renderer(Renderer handle) : this(NDalicPINVOKE.new_Renderer__SWIG_1(Renderer.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new static Renderer DownCast(BaseHandle handle) + { + Renderer ret = new Renderer(NDalicPINVOKE.Renderer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Renderer Assign(Renderer handle) + { + Renderer ret = new Renderer(NDalicPINVOKE.Renderer_Assign(swigCPtr, Renderer.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetGeometry(Geometry geometry) + { + NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Geometry GetGeometry() + { + Geometry ret = new Geometry(NDalicPINVOKE.Renderer_GetGeometry(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetIndexRange(int firstElement, int elementsCount) + { + NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetTextures(TextureSet textureSet) + { + NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TextureSet GetTextures() + { + TextureSet ret = new TextureSet(NDalicPINVOKE.Renderer_GetTextures(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetShader(Shader shader) + { + NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Shader GetShader() + { + Shader ret = new Shader(NDalicPINVOKE.Renderer_GetShader(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int DepthIndex + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX, new Tizen.NUI.PropertyValue(value)); + } + } + public int FaceCullingMode + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendMode + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_MODE).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_MODE, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendEquationRgb + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendEquationAlpha + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendFactorSrcRgb + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendFactorDestRgb + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendFactorSrcAlpha + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Tizen.NUI.PropertyValue(value)); + } + } + public int BlendFactorDestAlpha + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector4 BlendColor + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_COLOR).Get(temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + public bool BlendPreMultipliedAlpha + { + get + { + bool temp = false; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Tizen.NUI.PropertyValue(value)); + } + } + public int IndexRangeFirst + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST, new Tizen.NUI.PropertyValue(value)); + } + } + public int IndexRangeCount + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT, new Tizen.NUI.PropertyValue(value)); + } + } + public int DepthWriteMode + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE, new Tizen.NUI.PropertyValue(value)); + } + } + public int DepthFunction + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION, new Tizen.NUI.PropertyValue(value)); + } + } + public int DepthTestMode + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE, new Tizen.NUI.PropertyValue(value)); + } + } + public int RenderMode + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.RENDER_MODE).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.RENDER_MODE, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilFunction + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilFunctionMask + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilFunctionReference + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilMask + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_MASK).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_MASK, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilOperationOnFail + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilOperationOnZFail + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Tizen.NUI.PropertyValue(value)); + } + } + public int StencilOperationOnZPass + { + get + { + int temp = 0; + Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get(ref temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/RenderingType.cs b/src/Tizen.NUI/src/internal/RenderingType.cs old mode 100644 new mode 100755 index b2c0f41..b772770 --- a/src/Tizen.NUI/src/internal/RenderingType.cs +++ b/src/Tizen.NUI/src/internal/RenderingType.cs @@ -8,11 +8,13 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum RenderingType { - RENDERING_SHARED_ATLAS, - RENDERING_VECTOR_BASED -} + internal enum RenderingType + { + RENDERING_SHARED_ATLAS, + RENDERING_VECTOR_BASED + } } diff --git a/src/Tizen.NUI/src/internal/ResourceImage.cs b/src/Tizen.NUI/src/internal/ResourceImage.cs old mode 100644 new mode 100755 index aafc7f4..1ae3c26 --- a/src/Tizen.NUI/src/internal/ResourceImage.cs +++ b/src/Tizen.NUI/src/internal/ResourceImage.cs @@ -24,189 +24,221 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; -internal class ResourceImage : Image { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class ResourceImage : Image + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ResourceImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ResourceImage_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ResourceImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ResourceImage_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ResourceImage obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ResourceImage obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ResourceImage(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ResourceImage(swigCPtr); + public class LoadingFinishedEventArgs : EventArgs + { + private ResourceImage _resourceImage; + + public ResourceImage ResourceImage + { + get + { + return _resourceImage; + } + set + { + _resourceImage = value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void LoadingFinishedEventCallbackDelegate(IntPtr ResourceImage); + private DaliEventHandler _resourceImageLoadingFinishedEventHandler; + private LoadingFinishedEventCallbackDelegate _resourceImageLoadingFinishedEventCallbackDelegate; + public event DaliEventHandler LoadingFinished + { + add + { + lock (this) + { + // Restricted to only one listener + if (_resourceImageLoadingFinishedEventHandler == null) + { + _resourceImageLoadingFinishedEventHandler += value; + + _resourceImageLoadingFinishedEventCallbackDelegate = new LoadingFinishedEventCallbackDelegate(OnLoadingFinished); + this.LoadingFinishedSignal().Connect(_resourceImageLoadingFinishedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_resourceImageLoadingFinishedEventHandler != null) + { + this.LoadingFinishedSignal().Disconnect(_resourceImageLoadingFinishedEventCallbackDelegate); + } + + _resourceImageLoadingFinishedEventHandler -= value; + } + } + } -public class LoadingFinishedEventArgs : EventArgs -{ - private ResourceImage _resourceImage; - - public ResourceImage ResourceImage - { - get - { - return _resourceImage; - } - set - { - _resourceImage = value; - } - } -} + // Callback for ResourceImage LoadingFinishedSignal + private void OnLoadingFinished(IntPtr data) + { + LoadingFinishedEventArgs e = new LoadingFinishedEventArgs(); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void LoadingFinishedEventCallbackDelegate(IntPtr ResourceImage); - private DaliEventHandler _resourceImageLoadingFinishedEventHandler; - private LoadingFinishedEventCallbackDelegate _resourceImageLoadingFinishedEventCallbackDelegate; + // Populate all members of "e" (LoadingFinishedEventArgs) with real data + e.ResourceImage = ResourceImage.GetResourceImageFromPtr(data); - public event DaliEventHandler LoadingFinished - { - add - { - lock(this) - { - // Restricted to only one listener - if (_resourceImageLoadingFinishedEventHandler == null) - { - _resourceImageLoadingFinishedEventHandler += value; - - _resourceImageLoadingFinishedEventCallbackDelegate = new LoadingFinishedEventCallbackDelegate(OnLoadingFinished); - this.LoadingFinishedSignal().Connect(_resourceImageLoadingFinishedEventCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_resourceImageLoadingFinishedEventHandler != null) - { - this.LoadingFinishedSignal().Disconnect(_resourceImageLoadingFinishedEventCallbackDelegate); - } - - _resourceImageLoadingFinishedEventHandler -= value; - } - } - } - - // Callback for ResourceImage LoadingFinishedSignal - private void OnLoadingFinished(IntPtr data) - { - LoadingFinishedEventArgs e = new LoadingFinishedEventArgs(); - - // Populate all members of "e" (LoadingFinishedEventArgs) with real data - e.ResourceImage = ResourceImage.GetResourceImageFromPtr(data); - - if (_resourceImageLoadingFinishedEventHandler != null) - { - //here we send all data to user event handlers - _resourceImageLoadingFinishedEventHandler(this, e); - } - } - - -public static ResourceImage GetResourceImageFromPtr(global::System.IntPtr cPtr) { - ResourceImage ret = new ResourceImage(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public static Uint16Pair GetImageSize(string url) { - Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.ResourceImage_GetImageSize(url), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ResourceImage (string url, bool orientationCorrection) : this (NDalicPINVOKE.ResourceImage_New__SWIG_0(url, orientationCorrection), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage (string url) : this (NDalicPINVOKE.ResourceImage_New__SWIG_1(url), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage (string url, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) : this (NDalicPINVOKE.ResourceImage_New__SWIG_2(url, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode, orientationCorrection), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage (string url, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode) : this (NDalicPINVOKE.ResourceImage_New__SWIG_3(url, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage (string url, Uint16Pair size, FittingModeType fittingMode) : this (NDalicPINVOKE.ResourceImage_New__SWIG_4(url, Uint16Pair.getCPtr(size), (int)fittingMode), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage (string url, Uint16Pair size) : this (NDalicPINVOKE.ResourceImage_New__SWIG_5(url, Uint16Pair.getCPtr(size)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(ResourceImage handle) : this(NDalicPINVOKE.new_ResourceImage__SWIG_1(ResourceImage.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ResourceImage Assign(ResourceImage rhs) { - ResourceImage ret = new ResourceImage(NDalicPINVOKE.ResourceImage_Assign(swigCPtr, ResourceImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ResourceImage DownCast(BaseHandle handle) { - ResourceImage ret = new ResourceImage(NDalicPINVOKE.ResourceImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public LoadingState GetLoadingState() { - LoadingState ret = (LoadingState)NDalicPINVOKE.ResourceImage_GetLoadingState(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetUrl() { - string ret = NDalicPINVOKE.ResourceImage_GetUrl(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reload() { - NDalicPINVOKE.ResourceImage_Reload(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ResourceImageSignal LoadingFinishedSignal() { - ResourceImageSignal ret = new ResourceImageSignal(NDalicPINVOKE.ResourceImage_LoadingFinishedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + if (_resourceImageLoadingFinishedEventHandler != null) + { + //here we send all data to user event handlers + _resourceImageLoadingFinishedEventHandler(this, e); + } + } -} + + public static ResourceImage GetResourceImageFromPtr(global::System.IntPtr cPtr) + { + ResourceImage ret = new ResourceImage(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + public static Uint16Pair GetImageSize(string url) + { + Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.ResourceImage_GetImageSize(url), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ResourceImage(string url, bool orientationCorrection) : this(NDalicPINVOKE.ResourceImage_New__SWIG_0(url, orientationCorrection), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ResourceImage(string url) : this(NDalicPINVOKE.ResourceImage_New__SWIG_1(url), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ResourceImage(string url, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) : this(NDalicPINVOKE.ResourceImage_New__SWIG_2(url, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode, orientationCorrection), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ResourceImage(string url, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode) : this(NDalicPINVOKE.ResourceImage_New__SWIG_3(url, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ResourceImage(string url, Uint16Pair size, FittingModeType fittingMode) : this(NDalicPINVOKE.ResourceImage_New__SWIG_4(url, Uint16Pair.getCPtr(size), (int)fittingMode), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ResourceImage(string url, Uint16Pair size) : this(NDalicPINVOKE.ResourceImage_New__SWIG_5(url, Uint16Pair.getCPtr(size)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ResourceImage(ResourceImage handle) : this(NDalicPINVOKE.new_ResourceImage__SWIG_1(ResourceImage.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ResourceImage Assign(ResourceImage rhs) + { + ResourceImage ret = new ResourceImage(NDalicPINVOKE.ResourceImage_Assign(swigCPtr, ResourceImage.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static ResourceImage DownCast(BaseHandle handle) + { + ResourceImage ret = new ResourceImage(NDalicPINVOKE.ResourceImage_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public LoadingState GetLoadingState() + { + LoadingState ret = (LoadingState)NDalicPINVOKE.ResourceImage_GetLoadingState(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetUrl() + { + string ret = NDalicPINVOKE.ResourceImage_GetUrl(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reload() + { + NDalicPINVOKE.ResourceImage_Reload(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ResourceImageSignal LoadingFinishedSignal() + { + ResourceImageSignal ret = new ResourceImageSignal(NDalicPINVOKE.ResourceImage_LoadingFinishedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/ResourceImageSignal.cs b/src/Tizen.NUI/src/internal/ResourceImageSignal.cs old mode 100644 new mode 100755 index c6c3b5f..f5c55fc --- a/src/Tizen.NUI/src/internal/ResourceImageSignal.cs +++ b/src/Tizen.NUI/src/internal/ResourceImageSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ResourceImageSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ResourceImageSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ResourceImageSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ResourceImageSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ResourceImageSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ResourceImageSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ResourceImageSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ResourceImageSignal(swigCPtr); + ~ResourceImageSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ResourceImageSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ResourceImageSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ResourceImageSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ResourceImageSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ResourceImageSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ResourceImageSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ResourceImageSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(ResourceImage arg) { - NDalicPINVOKE.ResourceImageSignal_Emit(swigCPtr, ResourceImage.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ResourceImageSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public ResourceImageSignal() : this(NDalicPINVOKE.new_ResourceImageSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ResourceImageSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(ResourceImage arg) + { + NDalicPINVOKE.ResourceImageSignal_Emit(swigCPtr, ResourceImage.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ResourceImageSignal() : this(NDalicPINVOKE.new_ResourceImageSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Ruler.cs b/src/Tizen.NUI/src/internal/Ruler.cs old mode 100644 new mode 100755 index 031bdf7..fc1b960 --- a/src/Tizen.NUI/src/internal/Ruler.cs +++ b/src/Tizen.NUI/src/internal/Ruler.cs @@ -8,161 +8,204 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class Ruler : RefObject { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class Ruler : RefObject + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Ruler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Ruler_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Ruler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Ruler_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Ruler obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Ruler obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); + public virtual float Snap(float x, float bias) + { + float ret = NDalicPINVOKE.Ruler_Snap__SWIG_0(swigCPtr, x, bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public virtual float Snap(float x, float bias) { - float ret = NDalicPINVOKE.Ruler_Snap__SWIG_0(swigCPtr, x, bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float Snap(float x) { - float ret = NDalicPINVOKE.Ruler_Snap__SWIG_1(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual float GetPositionFromPage(uint page, out uint volume, bool wrap) { - float ret = NDalicPINVOKE.Ruler_GetPositionFromPage(swigCPtr, page, out volume, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual uint GetPageFromPosition(float position, bool wrap) { - uint ret = NDalicPINVOKE.Ruler_GetPageFromPosition(swigCPtr, position, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public virtual uint GetTotalPages() { - uint ret = NDalicPINVOKE.Ruler_GetTotalPages(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Ruler.RulerType GetType() { - Ruler.RulerType ret = (Ruler.RulerType)NDalicPINVOKE.Ruler_GetType(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsEnabled() { - bool ret = NDalicPINVOKE.Ruler_IsEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Enable() { - NDalicPINVOKE.Ruler_Enable(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Disable() { - NDalicPINVOKE.Ruler_Disable(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetDomain(RulerDomain domain) { - NDalicPINVOKE.Ruler_SetDomain(swigCPtr, RulerDomain.getCPtr(domain)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RulerDomain GetDomain() { - RulerDomain ret = new RulerDomain(NDalicPINVOKE.Ruler_GetDomain(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void DisableDomain() { - NDalicPINVOKE.Ruler_DisableDomain(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float Clamp(float x, float length, float scale) { - float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_0(swigCPtr, x, length, scale); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Clamp(float x, float length) { - float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_1(swigCPtr, x, length); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Clamp(float x) { - float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_2(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) { - float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x, float bias, float length, float scale) { - float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_0(swigCPtr, x, bias, length, scale); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x, float bias, float length) { - float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_1(swigCPtr, x, bias, length); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x, float bias) { - float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_2(swigCPtr, x, bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x) { - float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_3(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) { - float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_4(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum RulerType { - Fixed, - Free - } -} + public virtual float Snap(float x) + { + float ret = NDalicPINVOKE.Ruler_Snap__SWIG_1(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual float GetPositionFromPage(uint page, out uint volume, bool wrap) + { + float ret = NDalicPINVOKE.Ruler_GetPositionFromPage(swigCPtr, page, out volume, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual uint GetPageFromPosition(float position, bool wrap) + { + uint ret = NDalicPINVOKE.Ruler_GetPageFromPosition(swigCPtr, position, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public virtual uint GetTotalPages() + { + uint ret = NDalicPINVOKE.Ruler_GetTotalPages(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Ruler.RulerType GetType() + { + Ruler.RulerType ret = (Ruler.RulerType)NDalicPINVOKE.Ruler_GetType(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsEnabled() + { + bool ret = NDalicPINVOKE.Ruler_IsEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Enable() + { + NDalicPINVOKE.Ruler_Enable(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Disable() + { + NDalicPINVOKE.Ruler_Disable(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetDomain(RulerDomain domain) + { + NDalicPINVOKE.Ruler_SetDomain(swigCPtr, RulerDomain.getCPtr(domain)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RulerDomain GetDomain() + { + RulerDomain ret = new RulerDomain(NDalicPINVOKE.Ruler_GetDomain(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void DisableDomain() + { + NDalicPINVOKE.Ruler_DisableDomain(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float Clamp(float x, float length, float scale) + { + float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_0(swigCPtr, x, length, scale); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Clamp(float x, float length) + { + float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_1(swigCPtr, x, length); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Clamp(float x) + { + float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_2(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) + { + float ret = NDalicPINVOKE.Ruler_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x, float bias, float length, float scale) + { + float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_0(swigCPtr, x, bias, length, scale); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x, float bias, float length) + { + float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_1(swigCPtr, x, bias, length); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x, float bias) + { + float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_2(swigCPtr, x, bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x) + { + float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_3(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) + { + float ret = NDalicPINVOKE.Ruler_SnapAndClamp__SWIG_4(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum RulerType + { + Fixed, + Free + } + + } } diff --git a/src/Tizen.NUI/src/internal/RulerDomain.cs b/src/Tizen.NUI/src/internal/RulerDomain.cs old mode 100644 new mode 100755 index 7a318d5..cbe2b4b --- a/src/Tizen.NUI/src/internal/RulerDomain.cs +++ b/src/Tizen.NUI/src/internal/RulerDomain.cs @@ -8,117 +8,182 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + public class RulerDomain : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal RulerDomain(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - public class RulerDomain : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RulerDomain obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal RulerDomain(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RulerDomain obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~RulerDomain() { - DisposeQueue.Instance.Add(this); - } + ~RulerDomain() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_RulerDomain(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RulerDomain(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public RulerDomain(float min, float max, bool enabled) : this(NDalicPINVOKE.new_RulerDomain__SWIG_0(min, max, enabled), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RulerDomain(float min, float max) : this(NDalicPINVOKE.new_RulerDomain__SWIG_1(min, max), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float min { - set { - NDalicPINVOKE.RulerDomain_min_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.RulerDomain_min_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float max { - set { - NDalicPINVOKE.RulerDomain_max_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.RulerDomain_max_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public bool enabled { - set { - NDalicPINVOKE.RulerDomain_enabled_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - bool ret = NDalicPINVOKE.RulerDomain_enabled_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float Clamp(float x, float length, float scale) { - float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_0(swigCPtr, x, length, scale); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Clamp(float x, float length) { - float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_1(swigCPtr, x, length); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Clamp(float x) { - float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_2(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) { - float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float GetSize() { - float ret = NDalicPINVOKE.RulerDomain_GetSize(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + + public RulerDomain(float min, float max, bool enabled) : this(NDalicPINVOKE.new_RulerDomain__SWIG_0(min, max, enabled), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RulerDomain(float min, float max) : this(NDalicPINVOKE.new_RulerDomain__SWIG_1(min, max), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float min + { + set + { + NDalicPINVOKE.RulerDomain_min_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.RulerDomain_min_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float max + { + set + { + NDalicPINVOKE.RulerDomain_max_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.RulerDomain_max_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public bool enabled + { + set + { + NDalicPINVOKE.RulerDomain_enabled_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + bool ret = NDalicPINVOKE.RulerDomain_enabled_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float Clamp(float x, float length, float scale) + { + float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_0(swigCPtr, x, length, scale); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Clamp(float x, float length) + { + float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_1(swigCPtr, x, length); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Clamp(float x) + { + float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_2(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) + { + float ret = NDalicPINVOKE.RulerDomain_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float GetSize() + { + float ret = NDalicPINVOKE.RulerDomain_GetSize(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/RulerPtr.cs b/src/Tizen.NUI/src/internal/RulerPtr.cs old mode 100644 new mode 100755 index 4840640..2ab91cf --- a/src/Tizen.NUI/src/internal/RulerPtr.cs +++ b/src/Tizen.NUI/src/internal/RulerPtr.cs @@ -8,243 +8,326 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + public class RulerPtr : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal RulerPtr(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - public class RulerPtr : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RulerPtr obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal RulerPtr(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RulerPtr obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~RulerPtr() { - DisposeQueue.Instance.Add(this); - } + ~RulerPtr() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_RulerPtr(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RulerPtr(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public RulerPtr() : this(NDalicPINVOKE.new_RulerPtr__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RulerPtr(Ruler p) : this(NDalicPINVOKE.new_RulerPtr__SWIG_1(Ruler.getCPtr(p)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RulerPtr(RulerPtr rhs) : this(NDalicPINVOKE.new_RulerPtr__SWIG_2(RulerPtr.getCPtr(rhs)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Ruler Get() { - global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr_Get(swigCPtr); - Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Ruler __deref__() { - global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr___deref__(swigCPtr); - Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Ruler __ref__() { - Ruler ret = new Ruler(NDalicPINVOKE.RulerPtr___ref__(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RulerPtr Assign(RulerPtr rhs) { - RulerPtr ret = new RulerPtr(NDalicPINVOKE.RulerPtr_Assign__SWIG_0(swigCPtr, RulerPtr.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public RulerPtr Assign(Ruler rhs) { - RulerPtr ret = new RulerPtr(NDalicPINVOKE.RulerPtr_Assign__SWIG_1(swigCPtr, Ruler.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reset() { - NDalicPINVOKE.RulerPtr_Reset__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reset(Ruler rhs) { - NDalicPINVOKE.RulerPtr_Reset__SWIG_1(swigCPtr, Ruler.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Ruler Detach() { - global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr_Detach(swigCPtr); - Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Snap(float x, float bias) { - float ret = NDalicPINVOKE.RulerPtr_Snap__SWIG_0(swigCPtr, x, bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Snap(float x) { - float ret = NDalicPINVOKE.RulerPtr_Snap__SWIG_1(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float GetPositionFromPage(uint page, out uint volume, bool wrap) { - float ret = NDalicPINVOKE.RulerPtr_GetPositionFromPage(swigCPtr, page, out volume, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetPageFromPosition(float position, bool wrap) { - uint ret = NDalicPINVOKE.RulerPtr_GetPageFromPosition(swigCPtr, position, wrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetTotalPages() { - uint ret = NDalicPINVOKE.RulerPtr_GetTotalPages(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Ruler.RulerType GetType() { - Ruler.RulerType ret = (Ruler.RulerType)NDalicPINVOKE.RulerPtr_GetType(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsEnabled() { - bool ret = NDalicPINVOKE.RulerPtr_IsEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Enable() { - NDalicPINVOKE.RulerPtr_Enable(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Disable() { - NDalicPINVOKE.RulerPtr_Disable(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetDomain(RulerDomain domain) { - NDalicPINVOKE.RulerPtr_SetDomain(swigCPtr, RulerDomain.getCPtr(domain)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public RulerDomain GetDomain() { - RulerDomain ret = new RulerDomain(NDalicPINVOKE.RulerPtr_GetDomain(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void DisableDomain() { - NDalicPINVOKE.RulerPtr_DisableDomain(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float Clamp(float x, float length, float scale) { - float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_0(swigCPtr, x, length, scale); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Clamp(float x, float length) { - float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_1(swigCPtr, x, length); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float Clamp(float x) { - float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_2(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) { - float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x, float bias, float length, float scale) { - float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_0(swigCPtr, x, bias, length, scale); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x, float bias, float length) { - float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_1(swigCPtr, x, bias, length); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x, float bias) { - float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_2(swigCPtr, x, bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public float SnapAndClamp(float x) { - float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_3(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) { - float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_4(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reference() { - NDalicPINVOKE.RulerPtr_Reference(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Unreference() { - NDalicPINVOKE.RulerPtr_Unreference(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int ReferenceCount() { - int ret = NDalicPINVOKE.RulerPtr_ReferenceCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + + public RulerPtr() : this(NDalicPINVOKE.new_RulerPtr__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RulerPtr(Ruler p) : this(NDalicPINVOKE.new_RulerPtr__SWIG_1(Ruler.getCPtr(p)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RulerPtr(RulerPtr rhs) : this(NDalicPINVOKE.new_RulerPtr__SWIG_2(RulerPtr.getCPtr(rhs)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Ruler Get() + { + global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr_Get(swigCPtr); + Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Ruler __deref__() + { + global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr___deref__(swigCPtr); + Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Ruler __ref__() + { + Ruler ret = new Ruler(NDalicPINVOKE.RulerPtr___ref__(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RulerPtr Assign(RulerPtr rhs) + { + RulerPtr ret = new RulerPtr(NDalicPINVOKE.RulerPtr_Assign__SWIG_0(swigCPtr, RulerPtr.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public RulerPtr Assign(Ruler rhs) + { + RulerPtr ret = new RulerPtr(NDalicPINVOKE.RulerPtr_Assign__SWIG_1(swigCPtr, Ruler.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reset() + { + NDalicPINVOKE.RulerPtr_Reset__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reset(Ruler rhs) + { + NDalicPINVOKE.RulerPtr_Reset__SWIG_1(swigCPtr, Ruler.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Ruler Detach() + { + global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr_Detach(swigCPtr); + Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Snap(float x, float bias) + { + float ret = NDalicPINVOKE.RulerPtr_Snap__SWIG_0(swigCPtr, x, bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Snap(float x) + { + float ret = NDalicPINVOKE.RulerPtr_Snap__SWIG_1(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float GetPositionFromPage(uint page, out uint volume, bool wrap) + { + float ret = NDalicPINVOKE.RulerPtr_GetPositionFromPage(swigCPtr, page, out volume, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetPageFromPosition(float position, bool wrap) + { + uint ret = NDalicPINVOKE.RulerPtr_GetPageFromPosition(swigCPtr, position, wrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetTotalPages() + { + uint ret = NDalicPINVOKE.RulerPtr_GetTotalPages(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Ruler.RulerType GetType() + { + Ruler.RulerType ret = (Ruler.RulerType)NDalicPINVOKE.RulerPtr_GetType(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsEnabled() + { + bool ret = NDalicPINVOKE.RulerPtr_IsEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Enable() + { + NDalicPINVOKE.RulerPtr_Enable(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Disable() + { + NDalicPINVOKE.RulerPtr_Disable(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetDomain(RulerDomain domain) + { + NDalicPINVOKE.RulerPtr_SetDomain(swigCPtr, RulerDomain.getCPtr(domain)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RulerDomain GetDomain() + { + RulerDomain ret = new RulerDomain(NDalicPINVOKE.RulerPtr_GetDomain(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void DisableDomain() + { + NDalicPINVOKE.RulerPtr_DisableDomain(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float Clamp(float x, float length, float scale) + { + float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_0(swigCPtr, x, length, scale); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Clamp(float x, float length) + { + float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_1(swigCPtr, x, length); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float Clamp(float x) + { + float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_2(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) + { + float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x, float bias, float length, float scale) + { + float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_0(swigCPtr, x, bias, length, scale); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x, float bias, float length) + { + float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_1(swigCPtr, x, bias, length); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x, float bias) + { + float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_2(swigCPtr, x, bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public float SnapAndClamp(float x) + { + float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_3(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped) + { + float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_4(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reference() + { + NDalicPINVOKE.RulerPtr_Reference(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Unreference() + { + NDalicPINVOKE.RulerPtr_Unreference(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int ReferenceCount() + { + int ret = NDalicPINVOKE.RulerPtr_ReferenceCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs old mode 100644 new mode 100755 index 620de4b..1f7ceab --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class SWIGTYPE_p_CallbackBase { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class SWIGTYPE_p_CallbackBase + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_CallbackBase(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_CallbackBase(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_CallbackBase() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_CallbackBase() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_CallbackBase obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_CallbackBase obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs old mode 100644 new mode 100755 index ae11b70..f861201 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Configuration__ContextLoss { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Configuration__ContextLoss + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Configuration__ContextLoss(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Configuration__ContextLoss(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Configuration__ContextLoss() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Configuration__ContextLoss() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Configuration__ContextLoss obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Configuration__ContextLoss obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs old mode 100644 new mode 100755 index 15ae74d..9acac7f --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class SWIGTYPE_p_Dali__CallbackBase { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class SWIGTYPE_p_Dali__CallbackBase + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__CallbackBase(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__CallbackBase(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__CallbackBase() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__CallbackBase() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__CallbackBase obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__CallbackBase obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs old mode 100644 new mode 100755 index 7a7334a..d0b0127 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Constraint { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Constraint + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Constraint(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Constraint(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Constraint() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Constraint() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Constraint obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Constraint obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs old mode 100644 new mode 100755 index 94525a1..c9befa2 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__CustomActorImpl__Extension { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__CustomActorImpl__Extension + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__CustomActorImpl__Extension(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__CustomActorImpl__Extension(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__CustomActorImpl__Extension() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__CustomActorImpl__Extension() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__CustomActorImpl__Extension obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__CustomActorImpl__Extension obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs old mode 100644 new mode 100755 index 8cb3c9a..1af9222 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class SWIGTYPE_p_Dali__FunctorDelegate { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class SWIGTYPE_p_Dali__FunctorDelegate + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__FunctorDelegate(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__FunctorDelegate(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__FunctorDelegate() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__FunctorDelegate() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__FunctorDelegate obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__FunctorDelegate obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs old mode 100644 new mode 100755 index 1276580..e16bc39 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class SWIGTYPE_p_Dali__Internal__Texture { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class SWIGTYPE_p_Dali__Internal__Texture + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Internal__Texture(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Internal__Texture(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Internal__Texture() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Internal__Texture() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Internal__Texture obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Internal__Texture obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs old mode 100644 new mode 100755 index d27bcac..472a681 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Internal__TypeRegistry { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Internal__TypeRegistry + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Internal__TypeRegistry(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Internal__TypeRegistry(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Internal__TypeRegistry() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Internal__TypeRegistry() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Internal__TypeRegistry obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Internal__TypeRegistry obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs old mode 100644 new mode 100755 index 856c18e..5490134 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs old mode 100644 new mode 100755 index b2891ec..3246a31 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__RectT_unsigned_int_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__RectT_unsigned_int_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__RectT_unsigned_int_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__RectT_unsigned_int_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__RectT_unsigned_int_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__RectT_unsigned_int_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__RectT_unsigned_int_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__RectT_unsigned_int_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs old mode 100644 new mode 100755 index 2357f6c..3531893 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs old mode 100644 new mode 100755 index fc1ca1b..88e24e6 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs old mode 100644 new mode 100755 index 31e5689..0ca2c39 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t.cs old mode 100644 new mode 100755 index 57029c3..ab9f636 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__DragAndDropDetectorF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs old mode 100644 new mode 100755 index 042ec17..bae8b9e --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t.cs old mode 100644 new mode 100755 index 756209a..b096399 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs old mode 100644 new mode 100755 index 4872674..c09e5f3 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs old mode 100644 new mode 100755 index dcdea98..d523deb --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs old mode 100644 new mode 100755 index 799ffc5..510b8b5 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Toolkit__ClampState { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Toolkit__ClampState + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Toolkit__ClampState(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Toolkit__ClampState(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Toolkit__ClampState() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Toolkit__ClampState() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__ClampState obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__ClampState obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs old mode 100644 new mode 100755 index d3c6e9b..e288d78 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs old mode 100644 new mode 100755 index 818ade1..4628a67 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs old mode 100644 new mode 100755 index 8a8df45..049002a --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs old mode 100644 new mode 100755 index 607fd3a..4533321 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs old mode 100644 new mode 100755 index 2b51b2c..cd942db --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs old mode 100644 new mode 100755 index e2f8af1..a5e71bc --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_Dali__TouchEvent { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_Dali__TouchEvent + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_Dali__TouchEvent(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_Dali__TouchEvent(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_Dali__TouchEvent() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_Dali__TouchEvent() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__TouchEvent obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__TouchEvent obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs old mode 100644 new mode 100755 index 50cd233..171b20b --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_FunctorDelegate { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_FunctorDelegate + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_FunctorDelegate(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_FunctorDelegate(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_FunctorDelegate() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_FunctorDelegate() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_FunctorDelegate obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_FunctorDelegate obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs old mode 100644 new mode 100755 index 5df75c1..b1a5186 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -internal class SWIGTYPE_p_KeyboardFocusManager { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_KeyboardFocusManager + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_KeyboardFocusManager(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_KeyboardFocusManager(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_KeyboardFocusManager() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_KeyboardFocusManager() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_KeyboardFocusManager obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_KeyboardFocusManager obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs old mode 100644 new mode 100755 index 84751d9..32f9d65 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_PropertyInputContainer { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_PropertyInputContainer + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_PropertyInputContainer(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_PropertyInputContainer(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_PropertyInputContainer() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_PropertyInputContainer() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_PropertyInputContainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_PropertyInputContainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs old mode 100644 new mode 100755 index bd172b1..048186e --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_double { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_double + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_double(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_double(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_double() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_double() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_double obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_double obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs old mode 100644 new mode 100755 index 7ea1c03..209b5fe --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_float__float { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_float__float + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_float__float(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_float__float(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_float__float() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_float__float() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_float__float obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_float__float obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs old mode 100644 new mode 100755 index 99130ff..fa6d79c --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs old mode 100644 new mode 100755 index 78f2bc4..e332f4f --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.cs old mode 100644 new mode 100755 index fe04fa1..cce5fc9 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs old mode 100644 new mode 100755 index f2aac12..3b8400b --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs old mode 100644 new mode 100755 index be71387..ca1cbb9 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs old mode 100644 new mode 100755 index 3a3cb01..bc2f6af --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_r_Dali__Vector2__bool { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_r_Dali__Vector2__bool + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_r_Dali__Vector2__bool(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_r_Dali__Vector2__bool(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_r_Dali__Vector2__bool() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_r_Dali__Vector2__bool() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_r_Dali__Vector2__bool obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_r_Dali__Vector2__bool obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs old mode 100644 new mode 100755 index c49d792..d44c6c1 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs old mode 100644 new mode 100755 index 9cf7aa3..aa663d7 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_f_r_q_const__Dali__Vector3__float { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_f_r_q_const__Dali__Vector3__float + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_f_r_q_const__Dali__Vector3__float(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_f_r_q_const__Dali__Vector3__float(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_f_r_q_const__Dali__Vector3__float() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_f_r_q_const__Dali__Vector3__float() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs old mode 100644 new mode 100755 index 9194428..a014065 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_float { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_float + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_float(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_float(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_float() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_float() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_float obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_float obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs old mode 100644 new mode 100755 index f8c3942..a00f2ee --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_int { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_int + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_int(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_int(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_int() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_int() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_int obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_int obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs old mode 100644 new mode 100755 index 592b899..d6a09d8 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_std__type_info { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_std__type_info + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_std__type_info(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_std__type_info(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_std__type_info() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_std__type_info() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_std__type_info obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_std__type_info obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs old mode 100644 new mode 100755 index 33792e6..3504f15 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_uint8_t { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_uint8_t + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_uint8_t(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_uint8_t(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_uint8_t() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_uint8_t() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_uint8_t obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_uint8_t obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs old mode 100644 new mode 100755 index 119e8d4..4be1d02 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_unsigned_char { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_unsigned_char + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_unsigned_char(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_unsigned_char(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_unsigned_char() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_unsigned_char() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_char obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_char obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs old mode 100644 new mode 100755 index f002151..0da738e --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_unsigned_int { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_unsigned_int + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_unsigned_int(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_unsigned_int(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_unsigned_int() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_unsigned_int() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_int obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_int obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs old mode 100644 new mode 100755 index 826d4ce..812757c --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs @@ -8,22 +8,27 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SWIGTYPE_p_unsigned_short { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class SWIGTYPE_p_unsigned_short + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal SWIGTYPE_p_unsigned_short(global::System.IntPtr cPtr, bool futureUse) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SWIGTYPE_p_unsigned_short(global::System.IntPtr cPtr, bool futureUse) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - protected SWIGTYPE_p_unsigned_short() { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + protected SWIGTYPE_p_unsigned_short() + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_short obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } -} + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_short obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + } } diff --git a/src/Tizen.NUI/src/internal/Sampler.cs b/src/Tizen.NUI/src/internal/Sampler.cs old mode 100644 new mode 100755 index 289733b..a44de08 --- a/src/Tizen.NUI/src/internal/Sampler.cs +++ b/src/Tizen.NUI/src/internal/Sampler.cs @@ -24,74 +24,99 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Sampler : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Sampler : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Sampler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Sampler_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Sampler obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal Sampler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Sampler_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Sampler obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Sampler(swigCPtr); + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Sampler(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public Sampler () : this (NDalicPINVOKE.Sampler_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + public Sampler() : this(NDalicPINVOKE.Sampler_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public Sampler(Sampler handle) : this(NDalicPINVOKE.new_Sampler__SWIG_1(Sampler.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + } + public Sampler(Sampler handle) : this(NDalicPINVOKE.new_Sampler__SWIG_1(Sampler.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public static Sampler DownCast(BaseHandle handle) { - Sampler ret = new Sampler(NDalicPINVOKE.Sampler_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public static Sampler DownCast(BaseHandle handle) + { + Sampler ret = new Sampler(NDalicPINVOKE.Sampler_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public Sampler Assign(Sampler handle) { - Sampler ret = new Sampler(NDalicPINVOKE.Sampler_Assign(swigCPtr, Sampler.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public Sampler Assign(Sampler handle) + { + Sampler ret = new Sampler(NDalicPINVOKE.Sampler_Assign(swigCPtr, Sampler.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter) { - NDalicPINVOKE.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter) + { + NDalicPINVOKE.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void SetWrapMode(WrapModeType uWrap, WrapModeType vWrap) { - NDalicPINVOKE.Sampler_SetWrapMode__SWIG_0(swigCPtr, (int)uWrap, (int)vWrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetWrapMode(WrapModeType uWrap, WrapModeType vWrap) + { + NDalicPINVOKE.Sampler_SetWrapMode__SWIG_0(swigCPtr, (int)uWrap, (int)vWrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void SetWrapMode(WrapModeType rWrap, WrapModeType sWrap, WrapModeType tWrap) { - NDalicPINVOKE.Sampler_SetWrapMode__SWIG_1(swigCPtr, (int)rWrap, (int)sWrap, (int)tWrap); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetWrapMode(WrapModeType rWrap, WrapModeType sWrap, WrapModeType tWrap) + { + NDalicPINVOKE.Sampler_SetWrapMode__SWIG_1(swigCPtr, (int)rWrap, (int)sWrap, (int)tWrap); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/ScrollView.cs b/src/Tizen.NUI/src/internal/ScrollView.cs old mode 100644 new mode 100755 index 83cada5..f97eb60 --- a/src/Tizen.NUI/src/internal/ScrollView.cs +++ b/src/Tizen.NUI/src/internal/ScrollView.cs @@ -24,912 +24,1158 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; -using Tizen.NUI.BaseComponents; + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; - public class ScrollView : Scrollable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class ScrollView : Scrollable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollView_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollView(swigCPtr); + /** + * @brief Event arguments that passed via SnapStarted signal + * + */ + public class SnapStartedEventArgs : EventArgs + { + private Tizen.NUI.ScrollView.SnapEvent _snapEvent; + + /** + * @brief SnapEvent - is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick). + * + */ + public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo + { + get + { + return _snapEvent; + } + set + { + _snapEvent = value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } -/** - * @brief Event arguments that passed via SnapStarted signal - * - */ -public class SnapStartedEventArgs : EventArgs -{ - private Tizen.NUI.ScrollView.SnapEvent _snapEvent; - - /** - * @brief SnapEvent - is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick). - * - */ - public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo - { - get - { - return _snapEvent; - } - set - { - _snapEvent = value; - } - } -} + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void SnapStartedCallbackDelegate(IntPtr data); + private DaliEventHandler _scrollViewSnapStartedEventHandler; + private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate; + + /** + * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler + * (in the type of SnapStartedEventHandler-DaliEventHandler) provided by the user. + * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target + * position, scale, rotation for the snap or flick). + * + */ + public event DaliEventHandler SnapStarted + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollViewSnapStartedEventHandler == null) + { + _scrollViewSnapStartedEventHandler += value; + + _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); + this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollViewSnapStartedEventHandler != null) + { + this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate); + } + + _scrollViewSnapStartedEventHandler -= value; + } + } + } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void SnapStartedCallbackDelegate(IntPtr data); - private DaliEventHandler _scrollViewSnapStartedEventHandler; - private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate; - - /** - * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler - * (in the type of SnapStartedEventHandler-DaliEventHandler) provided by the user. - * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target - * position, scale, rotation for the snap or flick). - * - */ - public event DaliEventHandler SnapStarted - { - add - { - lock(this) - { - // Restricted to only one listener - if (_scrollViewSnapStartedEventHandler == null) - { - _scrollViewSnapStartedEventHandler += value; - - _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); - this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_scrollViewSnapStartedEventHandler != null) - { - this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate); - } - - _scrollViewSnapStartedEventHandler -= value; - } - } - } - - // Callback for ScrollView SnapStarted signal - private void OnSnapStarted(IntPtr data) - { - SnapStartedEventArgs e = new SnapStartedEventArgs(); - - // Populate all members of "e" (SnapStartedEventArgs) with real data - e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr( data ); - - if (_scrollViewSnapStartedEventHandler != null) - { - //here we send all data to user event handlers - _scrollViewSnapStartedEventHandler(this, e); - } - } - - - public class ClampEvent : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ClampEvent(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + // Callback for ScrollView SnapStarted signal + private void OnSnapStarted(IntPtr data) + { + SnapStartedEventArgs e = new SnapStartedEventArgs(); - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ClampEvent obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + // Populate all members of "e" (SnapStartedEventArgs) with real data + e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr(data); - ~ClampEvent() { - DisposeQueue.Instance.Add(this); - } + if (_scrollViewSnapStartedEventHandler != null) + { + //here we send all data to user event handlers + _scrollViewSnapStartedEventHandler(this, e); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollView_ClampEvent(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - internal ClampState2D scale { - set { - NDalicPINVOKE.ScrollView_ClampEvent_scale_set(swigCPtr, ClampState2D.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_ClampEvent_scale_get(swigCPtr); - ClampState2D ret = (cPtr == global::System.IntPtr.Zero) ? null : new ClampState2D(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public class ClampEvent : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ClampEvent(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ClampEvent obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~ClampEvent() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollView_ClampEvent(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + internal ClampState2D scale + { + set + { + NDalicPINVOKE.ScrollView_ClampEvent_scale_set(swigCPtr, ClampState2D.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_ClampEvent_scale_get(swigCPtr); + ClampState2D ret = (cPtr == global::System.IntPtr.Zero) ? null : new ClampState2D(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + internal ClampState2D position + { + set + { + NDalicPINVOKE.ScrollView_ClampEvent_position_set(swigCPtr, ClampState2D.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_ClampEvent_position_get(swigCPtr); + ClampState2D ret = (cPtr == global::System.IntPtr.Zero) ? null : new ClampState2D(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + internal ClampState rotation + { + set + { + NDalicPINVOKE.ScrollView_ClampEvent_rotation_set(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + ClampState ret = (ClampState)NDalicPINVOKE.ScrollView_ClampEvent_rotation_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public ClampEvent() : this(NDalicPINVOKE.new_ScrollView_ClampEvent(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - internal ClampState2D position { - set { - NDalicPINVOKE.ScrollView_ClampEvent_position_set(swigCPtr, ClampState2D.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_ClampEvent_position_get(swigCPtr); - ClampState2D ret = (cPtr == global::System.IntPtr.Zero) ? null : new ClampState2D(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + } - internal ClampState rotation { - set { - NDalicPINVOKE.ScrollView_ClampEvent_rotation_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - ClampState ret = (ClampState)NDalicPINVOKE.ScrollView_ClampEvent_rotation_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public class SnapEvent : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal SnapEvent(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SnapEvent obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~SnapEvent() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollView_SnapEvent(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr) + { + SnapEvent ret = new SnapEvent(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal SnapType type + { + set + { + NDalicPINVOKE.ScrollView_SnapEvent_type_set(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + SnapType ret = (SnapType)NDalicPINVOKE.ScrollView_SnapEvent_type_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Vector2 position + { + set + { + NDalicPINVOKE.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_SnapEvent_position_get(swigCPtr); + Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float duration + { + set + { + NDalicPINVOKE.ScrollView_SnapEvent_duration_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.ScrollView_SnapEvent_duration_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SnapEvent() : this(NDalicPINVOKE.new_ScrollView_SnapEvent(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public ClampEvent() : this(NDalicPINVOKE.new_ScrollView_ClampEvent(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + } - } + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollView_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_ScrollView_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int WRAP_ENABLED = NDalicPINVOKE.ScrollView_Property_WRAP_ENABLED_get(); + public static readonly int PANNING_ENABLED = NDalicPINVOKE.ScrollView_Property_PANNING_ENABLED_get(); + public static readonly int AXIS_AUTO_LOCK_ENABLED = NDalicPINVOKE.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get(); + public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); + public static readonly int SCROLL_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_get(); + public static readonly int SCROLL_PRE_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_get(); + public static readonly int SCROLL_PRE_POSITION_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_X_get(); + public static readonly int SCROLL_PRE_POSITION_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_Y_get(); + public static readonly int SCROLL_PRE_POSITION_MAX = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get(); + public static readonly int SCROLL_PRE_POSITION_MAX_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get(); + public static readonly int SCROLL_PRE_POSITION_MAX_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get(); + public static readonly int OVERSHOOT_X = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_X_get(); + public static readonly int OVERSHOOT_Y = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_Y_get(); + public static readonly int SCROLL_FINAL = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_get(); + public static readonly int SCROLL_FINAL_X = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_X_get(); + public static readonly int SCROLL_FINAL_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_Y_get(); + public static readonly int WRAP = NDalicPINVOKE.ScrollView_Property_WRAP_get(); + public static readonly int PANNING = NDalicPINVOKE.ScrollView_Property_PANNING_get(); + public static readonly int SCROLLING = NDalicPINVOKE.ScrollView_Property_SCROLLING_get(); + public static readonly int SCROLL_DOMAIN_SIZE = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_get(); + public static readonly int SCROLL_DOMAIN_SIZE_X = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get(); + public static readonly int SCROLL_DOMAIN_SIZE_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get(); + public static readonly int SCROLL_DOMAIN_OFFSET = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get(); + public static readonly int SCROLL_POSITION_DELTA = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_DELTA_get(); + public static readonly int START_PAGE_POSITION = NDalicPINVOKE.ScrollView_Property_START_PAGE_POSITION_get(); - public class SnapEvent : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + } - internal SnapEvent(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + public ScrollView() : this(NDalicPINVOKE.ScrollView_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SnapEvent obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + } + public ScrollView(ScrollView handle) : this(NDalicPINVOKE.new_ScrollView__SWIG_1(ScrollView.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - ~SnapEvent() { - DisposeQueue.Instance.Add(this); - } + public ScrollView Assign(ScrollView handle) + { + ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_Assign(swigCPtr, ScrollView.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollView_SnapEvent(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public new static ScrollView DownCast(BaseHandle handle) + { + ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr) { - SnapEvent ret = new SnapEvent(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public AlphaFunction GetScrollSnapAlphaFunction() + { + AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - internal SnapType type { - set { - NDalicPINVOKE.ScrollView_SnapEvent_type_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - SnapType ret = (SnapType)NDalicPINVOKE.ScrollView_SnapEvent_type_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public void SetScrollSnapAlphaFunction(AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public Vector2 position { - set { - NDalicPINVOKE.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_SnapEvent_position_get(swigCPtr); - Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public AlphaFunction GetScrollFlickAlphaFunction() + { + AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public float duration { - set { - NDalicPINVOKE.ScrollView_SnapEvent_duration_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.ScrollView_SnapEvent_duration_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public void SetScrollFlickAlphaFunction(AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public SnapEvent() : this(NDalicPINVOKE.new_ScrollView_SnapEvent(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public float GetScrollSnapDuration() + { + float ret = NDalicPINVOKE.ScrollView_GetScrollSnapDuration(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - } + public void SetScrollSnapDuration(float time) + { + NDalicPINVOKE.ScrollView_SetScrollSnapDuration(swigCPtr, time); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public float GetScrollFlickDuration() + { + float ret = NDalicPINVOKE.ScrollView_GetScrollFlickDuration(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + public void SetScrollFlickDuration(float time) + { + NDalicPINVOKE.ScrollView_SetScrollFlickDuration(swigCPtr, time); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + public void SetRulerX(RulerPtr ruler) + { + NDalicPINVOKE.ScrollView_SetRulerX(swigCPtr, RulerPtr.getCPtr(ruler)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - ~Property() { - DisposeQueue.Instance.Add(this); - } + public void SetRulerY(RulerPtr ruler) + { + NDalicPINVOKE.ScrollView_SetRulerY(swigCPtr, RulerPtr.getCPtr(ruler)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void SetScrollSensitive(bool sensitive) + { + NDalicPINVOKE.ScrollView_SetScrollSensitive(swigCPtr, sensitive); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public Property() : this(NDalicPINVOKE.new_ScrollView_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetMaxOvershoot(float overshootX, float overshootY) + { + NDalicPINVOKE.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public static readonly int WRAP_ENABLED = NDalicPINVOKE.ScrollView_Property_WRAP_ENABLED_get(); - public static readonly int PANNING_ENABLED = NDalicPINVOKE.ScrollView_Property_PANNING_ENABLED_get(); - public static readonly int AXIS_AUTO_LOCK_ENABLED = NDalicPINVOKE.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get(); - public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); - public static readonly int SCROLL_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_get(); - public static readonly int SCROLL_PRE_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_get(); - public static readonly int SCROLL_PRE_POSITION_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_X_get(); - public static readonly int SCROLL_PRE_POSITION_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_Y_get(); - public static readonly int SCROLL_PRE_POSITION_MAX = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get(); - public static readonly int SCROLL_PRE_POSITION_MAX_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get(); - public static readonly int SCROLL_PRE_POSITION_MAX_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get(); - public static readonly int OVERSHOOT_X = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_X_get(); - public static readonly int OVERSHOOT_Y = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_Y_get(); - public static readonly int SCROLL_FINAL = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_get(); - public static readonly int SCROLL_FINAL_X = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_X_get(); - public static readonly int SCROLL_FINAL_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_Y_get(); - public static readonly int WRAP = NDalicPINVOKE.ScrollView_Property_WRAP_get(); - public static readonly int PANNING = NDalicPINVOKE.ScrollView_Property_PANNING_get(); - public static readonly int SCROLLING = NDalicPINVOKE.ScrollView_Property_SCROLLING_get(); - public static readonly int SCROLL_DOMAIN_SIZE = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_get(); - public static readonly int SCROLL_DOMAIN_SIZE_X = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get(); - public static readonly int SCROLL_DOMAIN_SIZE_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get(); - public static readonly int SCROLL_DOMAIN_OFFSET = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get(); - public static readonly int SCROLL_POSITION_DELTA = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_DELTA_get(); - public static readonly int START_PAGE_POSITION = NDalicPINVOKE.ScrollView_Property_START_PAGE_POSITION_get(); - - } - - public ScrollView () : this (NDalicPINVOKE.ScrollView_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ScrollView(ScrollView handle) : this(NDalicPINVOKE.new_ScrollView__SWIG_1(ScrollView.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ScrollView Assign(ScrollView handle) { - ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_Assign(swigCPtr, ScrollView.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ScrollView DownCast(BaseHandle handle) { - ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AlphaFunction GetScrollSnapAlphaFunction() { - AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollSnapAlphaFunction(AlphaFunction alpha) { - NDalicPINVOKE.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public AlphaFunction GetScrollFlickAlphaFunction() { - AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollFlickAlphaFunction(AlphaFunction alpha) { - NDalicPINVOKE.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetScrollSnapDuration() { - float ret = NDalicPINVOKE.ScrollView_GetScrollSnapDuration(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollSnapDuration(float time) { - NDalicPINVOKE.ScrollView_SetScrollSnapDuration(swigCPtr, time); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetScrollFlickDuration() { - float ret = NDalicPINVOKE.ScrollView_GetScrollFlickDuration(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollFlickDuration(float time) { - NDalicPINVOKE.ScrollView_SetScrollFlickDuration(swigCPtr, time); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRulerX(RulerPtr ruler) { - NDalicPINVOKE.ScrollView_SetRulerX(swigCPtr, RulerPtr.getCPtr(ruler)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRulerY(RulerPtr ruler) { - NDalicPINVOKE.ScrollView_SetRulerY(swigCPtr, RulerPtr.getCPtr(ruler)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetScrollSensitive(bool sensitive) { - NDalicPINVOKE.ScrollView_SetScrollSensitive(swigCPtr, sensitive); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetMaxOvershoot(float overshootX, float overshootY) { - NDalicPINVOKE.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetSnapOvershootAlphaFunction(AlphaFunction alpha) { - NDalicPINVOKE.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetSnapOvershootDuration(float duration) { - NDalicPINVOKE.ScrollView_SetSnapOvershootDuration(swigCPtr, duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetViewAutoSnap(bool enable) { - NDalicPINVOKE.ScrollView_SetActorAutoSnap(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetWrapMode(bool enable) { - NDalicPINVOKE.ScrollView_SetWrapMode(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int GetScrollUpdateDistance() { - int ret = NDalicPINVOKE.ScrollView_GetScrollUpdateDistance(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollUpdateDistance(int distance) { - NDalicPINVOKE.ScrollView_SetScrollUpdateDistance(swigCPtr, distance); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetAxisAutoLock() { - bool ret = NDalicPINVOKE.ScrollView_GetAxisAutoLock(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAxisAutoLock(bool enable) { - NDalicPINVOKE.ScrollView_SetAxisAutoLock(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetAxisAutoLockGradient() { - float ret = NDalicPINVOKE.ScrollView_GetAxisAutoLockGradient(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAxisAutoLockGradient(float gradient) { - NDalicPINVOKE.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetFrictionCoefficient() { - float ret = NDalicPINVOKE.ScrollView_GetFrictionCoefficient(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFrictionCoefficient(float friction) { - NDalicPINVOKE.ScrollView_SetFrictionCoefficient(swigCPtr, friction); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetFlickSpeedCoefficient() { - float ret = NDalicPINVOKE.ScrollView_GetFlickSpeedCoefficient(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFlickSpeedCoefficient(float speed) { - NDalicPINVOKE.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetMinimumDistanceForFlick() { - Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMinimumDistanceForFlick(Vector2 distance) { - NDalicPINVOKE.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetMinimumSpeedForFlick() { - float ret = NDalicPINVOKE.ScrollView_GetMinimumSpeedForFlick(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMinimumSpeedForFlick(float speed) { - NDalicPINVOKE.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetMaxFlickSpeed() { - float ret = NDalicPINVOKE.ScrollView_GetMaxFlickSpeed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMaxFlickSpeed(float speed) { - NDalicPINVOKE.ScrollView_SetMaxFlickSpeed(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetWheelScrollDistanceStep() { - Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetWheelScrollDistanceStep(Vector2 step) { - NDalicPINVOKE.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetCurrentScrollPosition() { - Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetCurrentScrollPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetCurrentPage() { - uint ret = NDalicPINVOKE.ScrollView_GetCurrentPage(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void ScrollTo(Vector2 position) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_4(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(uint page) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_5(swigCPtr, page); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(uint page, float duration) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(uint page, float duration, DirectionBias bias) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(View view) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(View view, float duration) { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ScrollToSnapPoint() { - bool ret = NDalicPINVOKE.ScrollView_ScrollToSnapPoint(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint) { - NDalicPINVOKE.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveConstraintsFromChildren() { - NDalicPINVOKE.ScrollView_RemoveConstraintsFromChildren(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ApplyEffect(ScrollViewEffect effect) { - NDalicPINVOKE.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveEffect(ScrollViewEffect effect) { - NDalicPINVOKE.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAllEffects() { - NDalicPINVOKE.ScrollView_RemoveAllEffects(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void BindView(View child) { - NDalicPINVOKE.ScrollView_BindActor(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void UnbindView(View child) { - NDalicPINVOKE.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetScrollingDirection(Radian direction, Radian threshold) { - NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetScrollingDirection(Radian direction) { - NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveScrollingDirection(Radian direction) { - NDalicPINVOKE.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal ScrollViewSnapStartedSignal SnapStartedSignal() { - ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(NDalicPINVOKE.ScrollView_SnapStartedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000, - ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000 - } - - public bool WrapEnabled - { - get - { - bool temp = false; - GetProperty( ScrollView.Property.WRAP_ENABLED).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool PanningEnabled - { - get - { - bool temp = false; - GetProperty( ScrollView.Property.PANNING_ENABLED).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool AxisAutoLockEnabled - { - get - { - bool temp = false; - GetProperty( ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 WheelScrollDistanceStep - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollPosition - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollPrePosition - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_PRE_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollPrePositionMax - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_PRE_POSITION_MAX).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float OvershootX - { - get - { - float temp = 0.0f; - GetProperty( ScrollView.Property.OVERSHOOT_X).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float OvershootY - { - get - { - float temp = 0.0f; - GetProperty( ScrollView.Property.OVERSHOOT_Y).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollFinal - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_FINAL).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool Wrap - { - get - { - bool temp = false; - GetProperty( ScrollView.Property.WRAP).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool Panning - { - get - { - bool temp = false; - GetProperty( ScrollView.Property.PANNING).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool Scrolling - { - get - { - bool temp = false; - GetProperty( ScrollView.Property.SCROLLING).Get( ref temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollDomainSize - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_DOMAIN_SIZE).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollDomainOffset - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_DOMAIN_OFFSET).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollPositionDelta - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( ScrollView.Property.SCROLL_POSITION_DELTA).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector3 StartPagePosition - { - get - { - Vector3 temp = new Vector3(0.0f,0.0f,0.0f); - GetProperty( ScrollView.Property.START_PAGE_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } + public void SetSnapOvershootAlphaFunction(AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public void SetSnapOvershootDuration(float duration) + { + NDalicPINVOKE.ScrollView_SetSnapOvershootDuration(swigCPtr, duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetViewAutoSnap(bool enable) + { + NDalicPINVOKE.ScrollView_SetActorAutoSnap(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetWrapMode(bool enable) + { + NDalicPINVOKE.ScrollView_SetWrapMode(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int GetScrollUpdateDistance() + { + int ret = NDalicPINVOKE.ScrollView_GetScrollUpdateDistance(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScrollUpdateDistance(int distance) + { + NDalicPINVOKE.ScrollView_SetScrollUpdateDistance(swigCPtr, distance); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetAxisAutoLock() + { + bool ret = NDalicPINVOKE.ScrollView_GetAxisAutoLock(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAxisAutoLock(bool enable) + { + NDalicPINVOKE.ScrollView_SetAxisAutoLock(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetAxisAutoLockGradient() + { + float ret = NDalicPINVOKE.ScrollView_GetAxisAutoLockGradient(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAxisAutoLockGradient(float gradient) + { + NDalicPINVOKE.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetFrictionCoefficient() + { + float ret = NDalicPINVOKE.ScrollView_GetFrictionCoefficient(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFrictionCoefficient(float friction) + { + NDalicPINVOKE.ScrollView_SetFrictionCoefficient(swigCPtr, friction); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetFlickSpeedCoefficient() + { + float ret = NDalicPINVOKE.ScrollView_GetFlickSpeedCoefficient(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFlickSpeedCoefficient(float speed) + { + NDalicPINVOKE.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetMinimumDistanceForFlick() + { + Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMinimumDistanceForFlick(Vector2 distance) + { + NDalicPINVOKE.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetMinimumSpeedForFlick() + { + float ret = NDalicPINVOKE.ScrollView_GetMinimumSpeedForFlick(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMinimumSpeedForFlick(float speed) + { + NDalicPINVOKE.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetMaxFlickSpeed() + { + float ret = NDalicPINVOKE.ScrollView_GetMaxFlickSpeed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMaxFlickSpeed(float speed) + { + NDalicPINVOKE.ScrollView_SetMaxFlickSpeed(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetWheelScrollDistanceStep() + { + Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetWheelScrollDistanceStep(Vector2 step) + { + NDalicPINVOKE.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetCurrentScrollPosition() + { + Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetCurrentScrollPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetCurrentPage() + { + uint ret = NDalicPINVOKE.ScrollView_GetCurrentPage(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ScrollTo(Vector2 position) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_4(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(uint page) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_5(swigCPtr, page); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(uint page, float duration) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(uint page, float duration, DirectionBias bias) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(View view) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(View view, float duration) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ScrollToSnapPoint() + { + bool ret = NDalicPINVOKE.ScrollView_ScrollToSnapPoint(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint) + { + NDalicPINVOKE.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveConstraintsFromChildren() + { + NDalicPINVOKE.ScrollView_RemoveConstraintsFromChildren(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ApplyEffect(ScrollViewEffect effect) + { + NDalicPINVOKE.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveEffect(ScrollViewEffect effect) + { + NDalicPINVOKE.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAllEffects() + { + NDalicPINVOKE.ScrollView_RemoveAllEffects(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void BindView(View child) + { + NDalicPINVOKE.ScrollView_BindActor(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void UnbindView(View child) + { + NDalicPINVOKE.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetScrollingDirection(Radian direction, Radian threshold) + { + NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetScrollingDirection(Radian direction) + { + NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveScrollingDirection(Radian direction) + { + NDalicPINVOKE.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal ScrollViewSnapStartedSignal SnapStartedSignal() + { + ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(NDalicPINVOKE.ScrollView_SnapStartedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, + ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, + ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 + } + + public bool WrapEnabled + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.WRAP_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public bool PanningEnabled + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.PANNING_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public bool AxisAutoLockEnabled + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 WheelScrollDistanceStep + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPrePosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_PRE_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPrePositionMax + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue(value)); + } + } + public float OvershootX + { + get + { + float temp = 0.0f; + GetProperty(ScrollView.Property.OVERSHOOT_X).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue(value)); + } + } + public float OvershootY + { + get + { + float temp = 0.0f; + GetProperty(ScrollView.Property.OVERSHOOT_Y).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollFinal + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_FINAL).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue(value)); + } + } + public bool Wrap + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.WRAP).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue(value)); + } + } + public bool Panning + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.PANNING).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue(value)); + } + } + public bool Scrolling + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.SCROLLING).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollDomainSize + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollDomainOffset + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPositionDelta + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_POSITION_DELTA).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector3 StartPagePosition + { + get + { + Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); + GetProperty(ScrollView.Property.START_PAGE_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/ScrollViewEffect.cs b/src/Tizen.NUI/src/internal/ScrollViewEffect.cs old mode 100644 new mode 100755 index 40ac2da..9ddfc35 --- a/src/Tizen.NUI/src/internal/ScrollViewEffect.cs +++ b/src/Tizen.NUI/src/internal/ScrollViewEffect.cs @@ -8,43 +8,62 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class ScrollViewEffect : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class ScrollViewEffect : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ScrollViewEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollViewEffect_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ScrollViewEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollViewEffect_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewEffect obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewEffect obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollViewEffect(swigCPtr); + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollViewEffect(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public ScrollViewEffect() : this(NDalicPINVOKE.new_ScrollViewEffect(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ScrollViewEffect() : this(NDalicPINVOKE.new_ScrollViewEffect(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/ScrollViewPagePathEffect.cs b/src/Tizen.NUI/src/internal/ScrollViewPagePathEffect.cs old mode 100644 new mode 100755 index 2f81901..9be2042 --- a/src/Tizen.NUI/src/internal/ScrollViewPagePathEffect.cs +++ b/src/Tizen.NUI/src/internal/ScrollViewPagePathEffect.cs @@ -24,54 +24,73 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class ScrollViewPagePathEffect : ScrollViewEffect { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class ScrollViewPagePathEffect : ScrollViewEffect + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ScrollViewPagePathEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollViewPagePathEffect_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ScrollViewPagePathEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollViewPagePathEffect_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewPagePathEffect obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewPagePathEffect obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollViewPagePathEffect(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } - public ScrollViewPagePathEffect (Path path, Vector3 forward, int inputPropertyIndex, Vector3 pageSize, uint pageCount) : this (NDalicPINVOKE.ScrollViewPagePathEffect_New(Path.getCPtr(path), Vector3.getCPtr(forward), inputPropertyIndex, Vector3.getCPtr(pageSize), pageCount), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - } - public static ScrollViewPagePathEffect DownCast(BaseHandle handle) { - ScrollViewPagePathEffect ret = new ScrollViewPagePathEffect(NDalicPINVOKE.ScrollViewPagePathEffect_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollViewPagePathEffect(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } - public void ApplyToPage(View page, uint pageOrder) { - NDalicPINVOKE.ScrollViewPagePathEffect_ApplyToPage(swigCPtr, View.getCPtr(page), pageOrder); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + base.Dispose(type); + } -} + public ScrollViewPagePathEffect(Path path, Vector3 forward, int inputPropertyIndex, Vector3 pageSize, uint pageCount) : this(NDalicPINVOKE.ScrollViewPagePathEffect_New(Path.getCPtr(path), Vector3.getCPtr(forward), inputPropertyIndex, Vector3.getCPtr(pageSize), pageCount), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public static ScrollViewPagePathEffect DownCast(BaseHandle handle) + { + ScrollViewPagePathEffect ret = new ScrollViewPagePathEffect(NDalicPINVOKE.ScrollViewPagePathEffect_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ApplyToPage(View page, uint pageOrder) + { + NDalicPINVOKE.ScrollViewPagePathEffect_ApplyToPage(swigCPtr, View.getCPtr(page), pageOrder); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs b/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs old mode 100644 new mode 100755 index 2fd97ce..a0b40ba --- a/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ScrollViewSnapStartedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ScrollViewSnapStartedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ScrollViewSnapStartedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ScrollViewSnapStartedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewSnapStartedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewSnapStartedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ScrollViewSnapStartedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollViewSnapStartedSignal(swigCPtr); + ~ScrollViewSnapStartedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ScrollViewSnapStartedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollViewSnapStartedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ScrollViewSnapStartedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ScrollViewSnapStartedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ScrollViewSnapStartedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ScrollViewSnapStartedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ScrollViewSnapStartedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ScrollViewSnapStartedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ScrollViewSnapStartedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(ScrollView.SnapEvent arg) { - NDalicPINVOKE.ScrollViewSnapStartedSignal_Emit(swigCPtr, ScrollView.SnapEvent.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(ScrollView.SnapEvent arg) + { + NDalicPINVOKE.ScrollViewSnapStartedSignal_Emit(swigCPtr, ScrollView.SnapEvent.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public ScrollViewSnapStartedSignal() : this(NDalicPINVOKE.new_ScrollViewSnapStartedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ScrollViewSnapStartedSignal() : this(NDalicPINVOKE.new_ScrollViewSnapStartedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/Scrollable.cs b/src/Tizen.NUI/src/internal/Scrollable.cs old mode 100644 new mode 100755 index 3cf0348..0a31f59 --- a/src/Tizen.NUI/src/internal/Scrollable.cs +++ b/src/Tizen.NUI/src/internal/Scrollable.cs @@ -8,517 +8,596 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; -using Tizen.NUI.BaseComponents; + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; - public class Scrollable : View { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class Scrollable : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; - } + internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + // By default, we do not want the position to use the anchor point + PositionUsesAnchorPoint = false; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Scrollable(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Scrollable(swigCPtr); + public class StartedEventArgs : EventArgs + { + private Vector2 _vector2; + + public Vector2 Vector2 + { + get + { + return _vector2; + } + set + { + _vector2 = value; + } + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + public class UpdatedEventArgs : EventArgs + { + private Vector2 _vector2; + + public Vector2 Vector2 + { + get + { + return _vector2; + } + set + { + _vector2 = value; + } + } + } + public class CompletedEventArgs : EventArgs + { + private Vector2 _vector2; + + public Vector2 Vector2 + { + get + { + return _vector2; + } + set + { + _vector2 = value; + } + } + } -public class StartedEventArgs : EventArgs -{ - private Vector2 _vector2; - - public Vector2 Vector2 - { - get - { - return _vector2; - } - set - { - _vector2 = value; - } - } -} - -public class UpdatedEventArgs : EventArgs -{ - private Vector2 _vector2; - - public Vector2 Vector2 - { - get - { - return _vector2; - } - set - { - _vector2 = value; - } - } -} - -public class CompletedEventArgs : EventArgs -{ - private Vector2 _vector2; - - public Vector2 Vector2 - { - get - { - return _vector2; - } - set - { - _vector2 = value; - } - } -} - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void StartedCallbackDelegate(IntPtr vector2); - private DaliEventHandler _scrollableStartedEventHandler; - private StartedCallbackDelegate _scrollableStartedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void UpdatedCallbackDelegate(IntPtr vector2); - private DaliEventHandler _scrollableUpdatedEventHandler; - private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void CompletedCallbackDelegate(IntPtr vector2); - private DaliEventHandler _scrollableCompletedEventHandler; - private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate; - - public event DaliEventHandler ScrollStarted - { - add - { - lock(this) - { - // Restricted to only one listener - if (_scrollableStartedEventHandler == null) - { - _scrollableStartedEventHandler += value; - - _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted); - this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_scrollableStartedEventHandler != null) - { - this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate); - } - - _scrollableStartedEventHandler -= value; - } - } - } - - private void OnStarted(IntPtr vector2) - { - StartedEventArgs e = new StartedEventArgs(); - - // Populate all members of "e" (StartedEventArgs) with real data - e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); - - if (_scrollableStartedEventHandler != null) - { - //here we send all data to user event handlers - _scrollableStartedEventHandler(this, e); - } - - } - - public event DaliEventHandler ScrollUpdated - { - add - { - lock(this) - { - // Restricted to only one listener - if (_scrollableUpdatedEventHandler == null) - { - _scrollableUpdatedEventHandler += value; - - _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated); - this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_scrollableUpdatedEventHandler != null) - { - this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate); - } - - _scrollableUpdatedEventHandler -= value; - } - } - } - - private void OnUpdated(IntPtr vector2) - { - UpdatedEventArgs e = new UpdatedEventArgs(); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void StartedCallbackDelegate(IntPtr vector2); + private DaliEventHandler _scrollableStartedEventHandler; + private StartedCallbackDelegate _scrollableStartedCallbackDelegate; - // Populate all members of "e" (UpdatedEventArgs) with real data - e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void UpdatedCallbackDelegate(IntPtr vector2); + private DaliEventHandler _scrollableUpdatedEventHandler; + private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate; - if (_scrollableUpdatedEventHandler != null) - { - //here we send all data to user event handlers - _scrollableUpdatedEventHandler(this, e); - } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void CompletedCallbackDelegate(IntPtr vector2); + private DaliEventHandler _scrollableCompletedEventHandler; + private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate; - } + public event DaliEventHandler ScrollStarted + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollableStartedEventHandler == null) + { + _scrollableStartedEventHandler += value; + + _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted); + this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollableStartedEventHandler != null) + { + this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate); + } + + _scrollableStartedEventHandler -= value; + } + } + } - public event DaliEventHandler ScrollCompleted - { - add - { - lock(this) + private void OnStarted(IntPtr vector2) { - // Restricted to only one listener - if (_scrollableCompletedEventHandler == null) - { - _scrollableCompletedEventHandler += value; + StartedEventArgs e = new StartedEventArgs(); + + // Populate all members of "e" (StartedEventArgs) with real data + e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + + if (_scrollableStartedEventHandler != null) + { + //here we send all data to user event handlers + _scrollableStartedEventHandler(this, e); + } - _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted); - this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate); - } } - } - remove - { - lock(this) + public event DaliEventHandler ScrollUpdated { - if (_scrollableCompletedEventHandler != null) - { - this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate); - } + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollableUpdatedEventHandler == null) + { + _scrollableUpdatedEventHandler += value; + + _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated); + this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollableUpdatedEventHandler != null) + { + this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate); + } + + _scrollableUpdatedEventHandler -= value; + } + } + } + + private void OnUpdated(IntPtr vector2) + { + UpdatedEventArgs e = new UpdatedEventArgs(); + + // Populate all members of "e" (UpdatedEventArgs) with real data + e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + + if (_scrollableUpdatedEventHandler != null) + { + //here we send all data to user event handlers + _scrollableUpdatedEventHandler(this, e); + } - _scrollableCompletedEventHandler -= value; } - } - } - private void OnCompleted(IntPtr vector2) - { - CompletedEventArgs e = new CompletedEventArgs(); + public event DaliEventHandler ScrollCompleted + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollableCompletedEventHandler == null) + { + _scrollableCompletedEventHandler += value; + + _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted); + this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollableCompletedEventHandler != null) + { + this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate); + } + + _scrollableCompletedEventHandler -= value; + } + } + } - // Populate all members of "e" (CompletedEventArgs) with real data - e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + private void OnCompleted(IntPtr vector2) + { + CompletedEventArgs e = new CompletedEventArgs(); - if (_scrollableCompletedEventHandler != null) - { - //here we send all data to user event handlers - _scrollableCompletedEventHandler(this, e); - } + // Populate all members of "e" (CompletedEventArgs) with real data + e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); - } + if (_scrollableCompletedEventHandler != null) + { + //here we send all data to user event handlers + _scrollableCompletedEventHandler(this, e); + } + } - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Scrollable_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get(); - public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get(); - public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get(); - public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get(); - public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get(); - public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get(); - public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get(); - public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get(); - public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get(); - public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get(); - public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get(); - public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get(); - public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get(); - public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get(); - - } - - public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Scrollable Assign(Scrollable handle) { - Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static Scrollable DownCast(BaseHandle handle) { - Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsOvershootEnabled() { - bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetOvershootEnabled(bool enable) { - NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetOvershootEffectColor(Vector4 color) { - NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector4 GetOvershootEffectColor() { - Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetOvershootAnimationSpeed(float pixelsPerSecond) { - NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetOvershootAnimationSpeed() { - float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ScrollableSignal ScrollStartedSignal() { - ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ScrollableSignal ScrollUpdatedSignal() { - ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ScrollableSignal ScrollCompletedSignal() { - ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000, - ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000 - } - - public Vector4 OvershootEffectColor - { - get - { - Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); - GetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get( temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue( value ) ); - } - } - public float OvershootAnimationSpeed - { - get - { - float temp = 0.0f; - GetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get( ref temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool OvershootEnabled - { - get - { - bool temp = false; - GetProperty( Scrollable.Property.OVERSHOOT_ENABLED).Get( ref temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 OvershootSize - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( Scrollable.Property.OVERSHOOT_SIZE).Get( temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int ScrollToAlphaFunction - { - get - { - int temp = 0; - GetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get( ref temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollRelativePosition - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION).Get( temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollPositionMin - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( Scrollable.Property.SCROLL_POSITION_MIN).Get( temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Vector2 ScrollPositionMax - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( Scrollable.Property.SCROLL_POSITION_MAX).Get( temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool CanScrollVertical - { - get - { - bool temp = false; - GetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL).Get( ref temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue( value ) ); - } - } - public bool CanScrollHorizontal - { - get - { - bool temp = false; - GetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get( ref temp ); - return temp; - } - set - { - SetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Scrollable_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get(); + public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get(); + public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get(); + public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get(); + public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get(); + public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get(); + public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get(); + public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get(); + public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get(); + public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get(); + public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get(); + public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get(); + public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get(); + public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get(); + + } + + public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Scrollable Assign(Scrollable handle) + { + Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static Scrollable DownCast(BaseHandle handle) + { + Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsOvershootEnabled() + { + bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetOvershootEnabled(bool enable) + { + NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetOvershootEffectColor(Vector4 color) + { + NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector4 GetOvershootEffectColor() + { + Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetOvershootAnimationSpeed(float pixelsPerSecond) + { + NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetOvershootAnimationSpeed() + { + float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ScrollableSignal ScrollStartedSignal() + { + ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ScrollableSignal ScrollUpdatedSignal() + { + ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ScrollableSignal ScrollCompletedSignal() + { + ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, + ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, + ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 + } + + public Vector4 OvershootEffectColor + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + public float OvershootAnimationSpeed + { + get + { + float temp = 0.0f; + GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value)); + } + } + public bool OvershootEnabled + { + get + { + bool temp = false; + GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 OvershootSize + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + public int ScrollToAlphaFunction + { + get + { + int temp = 0; + GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollRelativePosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPositionMin + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPositionMax + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value)); + } + } + public bool CanScrollVertical + { + get + { + bool temp = false; + GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value)); + } + } + public bool CanScrollHorizontal + { + get + { + bool temp = false; + GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value)); + } + } + + } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/ScrollableSignal.cs b/src/Tizen.NUI/src/internal/ScrollableSignal.cs old mode 100644 new mode 100755 index 89ff189..9488f4e --- a/src/Tizen.NUI/src/internal/ScrollableSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollableSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ScrollableSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ScrollableSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ScrollableSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ScrollableSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollableSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollableSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ScrollableSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollableSignal(swigCPtr); + ~ScrollableSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ScrollableSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollableSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ScrollableSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ScrollableSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ScrollableSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ScrollableSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ScrollableSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ScrollableSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ScrollableSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(Vector2 arg) { - NDalicPINVOKE.ScrollableSignal_Emit(swigCPtr, Vector2.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(Vector2 arg) + { + NDalicPINVOKE.ScrollableSignal_Emit(swigCPtr, Vector2.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public ScrollableSignal() : this(NDalicPINVOKE.new_ScrollableSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ScrollableSignal() : this(NDalicPINVOKE.new_ScrollableSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/Shader.cs b/src/Tizen.NUI/src/internal/Shader.cs old mode 100644 new mode 100755 index 46eb781..2bb4dd6 --- a/src/Tizen.NUI/src/internal/Shader.cs +++ b/src/Tizen.NUI/src/internal/Shader.cs @@ -24,167 +24,284 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Shader : Animatable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Shader : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Shader(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Shader_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Shader(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Shader_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Shader obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Shader obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Shader(swigCPtr); + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Shader(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - public class Hint : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Hint(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hint obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Hint() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Shader_Hint(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + public class Hint : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Hint(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hint obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Hint() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Shader_Hint(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Hint() : this(NDalicPINVOKE.new_Shader_Hint(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Value + { + NONE = 0x00, + OUTPUT_IS_TRANSPARENT = 0x01, + MODIFIES_GEOMETRY = 0x02 + } + } - global::System.GC.SuppressFinalize(this); - } - } - - public Hint() : this(NDalicPINVOKE.new_Shader_Hint(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum Value { - NONE = 0x00, - OUTPUT_IS_TRANSPARENT = 0x01, - MODIFIES_GEOMETRY = 0x02 - } - - } - - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Shader_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Shader_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_Shader_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int PROGRAM = NDalicPINVOKE.Shader_Property_PROGRAM_get(); + } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_Shader_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int PROGRAM = NDalicPINVOKE.Shader_Property_PROGRAM_get(); - - } - - public Shader (string vertexShader, string fragmentShader, Shader.Hint.Value hints) : this (NDalicPINVOKE.Shader_New__SWIG_0(vertexShader, fragmentShader, (int)hints), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Shader (string vertexShader, string fragmentShader) : this (NDalicPINVOKE.Shader_New__SWIG_1(vertexShader, fragmentShader), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Shader(Shader handle) : this(NDalicPINVOKE.new_Shader__SWIG_1(Shader.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new static Shader DownCast(BaseHandle handle) { - Shader ret = new Shader(NDalicPINVOKE.Shader_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Shader Assign(Shader handle) { - Shader ret = new Shader(NDalicPINVOKE.Shader_Assign(swigCPtr, Shader.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Tizen.NUI.PropertyMap Program - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - Tizen.NUI.Object.GetProperty(swigCPtr, Shader.Property.PROGRAM).Get( temp ); - return temp; - } - set - { - Tizen.NUI.Object.SetProperty(swigCPtr, Shader.Property.PROGRAM, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public Shader(string vertexShader, string fragmentShader, Shader.Hint.Value hints) : this(NDalicPINVOKE.Shader_New__SWIG_0(vertexShader, fragmentShader, (int)hints), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Shader(string vertexShader, string fragmentShader) : this(NDalicPINVOKE.Shader_New__SWIG_1(vertexShader, fragmentShader), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Shader(Shader handle) : this(NDalicPINVOKE.new_Shader__SWIG_1(Shader.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public new static Shader DownCast(BaseHandle handle) + { + Shader ret = new Shader(NDalicPINVOKE.Shader_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Shader Assign(Shader handle) + { + Shader ret = new Shader(NDalicPINVOKE.Shader_Assign(swigCPtr, Shader.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Tizen.NUI.PropertyMap Program + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + Tizen.NUI.Object.GetProperty(swigCPtr, Shader.Property.PROGRAM).Get(temp); + return temp; + } + set + { + Tizen.NUI.Object.SetProperty(swigCPtr, Shader.Property.PROGRAM, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/SignalConnectorType.cs b/src/Tizen.NUI/src/internal/SignalConnectorType.cs old mode 100644 new mode 100755 index 0e2035c..6947f27 --- a/src/Tizen.NUI/src/internal/SignalConnectorType.cs +++ b/src/Tizen.NUI/src/internal/SignalConnectorType.cs @@ -8,48 +8,96 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SignalConnectorType : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class SignalConnectorType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal SignalConnectorType(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SignalConnectorType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SignalConnectorType obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SignalConnectorType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~SignalConnectorType() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~SignalConnectorType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_SignalConnectorType(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public SignalConnectorType(TypeRegistration typeRegistration, string name, SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool func) : this(NDalicPINVOKE.new_SignalConnectorType(TypeRegistration.getCPtr(typeRegistration), name, SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.getCPtr(func)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } -} + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_SignalConnectorType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public SignalConnectorType(TypeRegistration typeRegistration, string name, SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool func) : this(NDalicPINVOKE.new_SignalConnectorType(TypeRegistration.getCPtr(typeRegistration), name, SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.getCPtr(func)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/SignalObserver.cs b/src/Tizen.NUI/src/internal/SignalObserver.cs old mode 100644 new mode 100755 index 05430bc..1eb0b2e --- a/src/Tizen.NUI/src/internal/SignalObserver.cs +++ b/src/Tizen.NUI/src/internal/SignalObserver.cs @@ -8,49 +8,97 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class SignalObserver : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class SignalObserver : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal SignalObserver(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SignalObserver(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SignalObserver obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SignalObserver obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~SignalObserver() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_SignalObserver(swigCPtr); + ~SignalObserver() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - public virtual void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) { - NDalicPINVOKE.SignalObserver_SignalDisconnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_SignalObserver(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public virtual void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) + { + NDalicPINVOKE.SignalObserver_SignalDisconnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Size.cs b/src/Tizen.NUI/src/internal/Size.cs old mode 100644 new mode 100755 index 2785a3a..f5a3dc7 --- a/src/Tizen.NUI/src/internal/Size.cs +++ b/src/Tizen.NUI/src/internal/Size.cs @@ -37,35 +37,72 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - ~Size() - { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; /// /// Dispose /// - public virtual void Dispose() + ~Size() { - if (!Window.IsInstalled()) + if (!isDisposeQueued) { + isDisposeQueued = true; DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector3(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector3(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } /// diff --git a/src/Tizen.NUI/src/internal/Slider.cs b/src/Tizen.NUI/src/internal/Slider.cs old mode 100644 new mode 100755 index 22e9d90..6f4e930 --- a/src/Tizen.NUI/src/internal/Slider.cs +++ b/src/Tizen.NUI/src/internal/Slider.cs @@ -30,7 +30,7 @@ namespace Tizen.NUI.UIComponents using System; using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; - + /// /// Slider is a control to enable sliding an indicator between two values. /// @@ -53,31 +53,40 @@ namespace Tizen.NUI.UIComponents /// /// Dispose /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Slider(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Slider(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } - + base.Dispose(type); + } /// /// Value changed event arguments. @@ -361,33 +370,71 @@ namespace Tizen.NUI.UIComponents internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() - { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() - { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock (this) - { - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Slider_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Slider_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } internal Property() : this(NDalicPINVOKE.new_Slider_Property(), true) diff --git a/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs b/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs old mode 100644 new mode 100755 index 1b77243..42d1377 --- a/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs +++ b/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs @@ -8,82 +8,136 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SliderMarkReachedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class SliderMarkReachedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal SliderMarkReachedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SliderMarkReachedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SliderMarkReachedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SliderMarkReachedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~SliderMarkReachedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_SliderMarkReachedSignal(swigCPtr); + ~SliderMarkReachedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.SliderMarkReachedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_SliderMarkReachedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.SliderMarkReachedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.SliderMarkReachedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.SliderMarkReachedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.SliderMarkReachedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.SliderMarkReachedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public bool Emit(Tizen.NUI.UIComponents.Slider arg1, int arg2) { - bool ret = NDalicPINVOKE.SliderMarkReachedSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.Slider.getCPtr(arg1), arg2); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.SliderMarkReachedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public SliderMarkReachedSignal() : this(NDalicPINVOKE.new_SliderMarkReachedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.SliderMarkReachedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public bool Emit(Tizen.NUI.UIComponents.Slider arg1, int arg2) + { + bool ret = NDalicPINVOKE.SliderMarkReachedSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.Slider.getCPtr(arg1), arg2); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SliderMarkReachedSignal() : this(NDalicPINVOKE.new_SliderMarkReachedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs b/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs old mode 100644 new mode 100755 index b3098ef..5bef696 --- a/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs @@ -8,82 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class SliderValueChangedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class SliderValueChangedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal SliderValueChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SliderValueChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SliderValueChangedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SliderValueChangedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~SliderValueChangedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_SliderValueChangedSignal(swigCPtr); + ~SliderValueChangedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.SliderValueChangedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_SliderValueChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.SliderValueChangedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.SliderValueChangedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.SliderValueChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.SliderValueChangedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.SliderValueChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.SliderValueChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.SliderValueChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public bool Emit(Tizen.NUI.UIComponents.Slider arg1, float arg2) { - bool ret = NDalicPINVOKE.SliderValueChangedSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.Slider.getCPtr(arg1), arg2); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Emit(Tizen.NUI.UIComponents.Slider arg1, float arg2) + { + bool ret = NDalicPINVOKE.SliderValueChangedSignal_Emit(swigCPtr, Tizen.NUI.UIComponents.Slider.getCPtr(arg1), arg2); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public SliderValueChangedSignal() : this(NDalicPINVOKE.new_SliderValueChangedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public SliderValueChangedSignal() : this(NDalicPINVOKE.new_SliderValueChangedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs old mode 100644 new mode 100755 index 1eb23d2..a5fdab1 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -8,49 +8,98 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class SlotObserver : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class SlotObserver : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal SlotObserver(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal SlotObserver(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SlotObserver obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SlotObserver obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~SlotObserver() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_SlotObserver(swigCPtr); + ~SlotObserver() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - public virtual void SlotDisconnected(SWIGTYPE_p_Dali__CallbackBase callback) { - NDalicPINVOKE.SlotObserver_SlotDisconnected(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_SlotObserver(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public virtual void SlotDisconnected(SWIGTYPE_p_Dali__CallbackBase callback) + { + NDalicPINVOKE.SlotObserver_SlotDisconnected(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/SnapType.cs b/src/Tizen.NUI/src/internal/SnapType.cs old mode 100644 new mode 100755 index 83b3413..9b670c0 --- a/src/Tizen.NUI/src/internal/SnapType.cs +++ b/src/Tizen.NUI/src/internal/SnapType.cs @@ -8,11 +8,13 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum SnapType { - Snap, - Flick -} + internal enum SnapType + { + Snap, + Flick + } } diff --git a/src/Tizen.NUI/src/internal/StageWheelSignal.cs b/src/Tizen.NUI/src/internal/StageWheelSignal.cs old mode 100644 new mode 100755 index 3f6ab6b..65a89f6 --- a/src/Tizen.NUI/src/internal/StageWheelSignal.cs +++ b/src/Tizen.NUI/src/internal/StageWheelSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class StageWheelSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class StageWheelSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal StageWheelSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal StageWheelSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StageWheelSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StageWheelSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~StageWheelSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_StageWheelSignal(swigCPtr); + ~StageWheelSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.StageWheelSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_StageWheelSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.StageWheelSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.StageWheelSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.StageWheelSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.StageWheelSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.StageWheelSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(Wheel arg) { - NDalicPINVOKE.StageWheelSignal_Emit(swigCPtr, Wheel.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.StageWheelSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public StageWheelSignal() : this(NDalicPINVOKE.new_StageWheelSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.StageWheelSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(Wheel arg) + { + NDalicPINVOKE.StageWheelSignal_Emit(swigCPtr, Wheel.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public StageWheelSignal() : this(NDalicPINVOKE.new_StageWheelSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/StencilFunctionType.cs b/src/Tizen.NUI/src/internal/StencilFunctionType.cs old mode 100644 new mode 100755 index 613a778..69d0b4d --- a/src/Tizen.NUI/src/internal/StencilFunctionType.cs +++ b/src/Tizen.NUI/src/internal/StencilFunctionType.cs @@ -8,17 +8,19 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum StencilFunctionType { - NEVER, - LESS, - EQUAL, - LESS_EQUAL, - GREATER, - NOT_EQUAL, - GREATER_EQUAL, - ALWAYS -} + internal enum StencilFunctionType + { + NEVER, + LESS, + EQUAL, + LESS_EQUAL, + GREATER, + NOT_EQUAL, + GREATER_EQUAL, + ALWAYS + } } diff --git a/src/Tizen.NUI/src/internal/StencilOperationType.cs b/src/Tizen.NUI/src/internal/StencilOperationType.cs old mode 100644 new mode 100755 index c78dbcf..179692b --- a/src/Tizen.NUI/src/internal/StencilOperationType.cs +++ b/src/Tizen.NUI/src/internal/StencilOperationType.cs @@ -8,17 +8,19 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum StencilOperationType { - ZERO, - KEEP, - REPLACE, - INCREMENT, - DECREMENT, - INVERT, - INCREMENT_WRAP, - DECREMENT_WRAP -} + internal enum StencilOperationType + { + ZERO, + KEEP, + REPLACE, + INCREMENT, + DECREMENT, + INVERT, + INCREMENT_WRAP, + DECREMENT_WRAP + } } diff --git a/src/Tizen.NUI/src/internal/StringValuePair.cs b/src/Tizen.NUI/src/internal/StringValuePair.cs old mode 100644 new mode 100755 index 3c83496..983b40b --- a/src/Tizen.NUI/src/internal/StringValuePair.cs +++ b/src/Tizen.NUI/src/internal/StringValuePair.cs @@ -8,80 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class StringValuePair : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class StringValuePair : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal StringValuePair(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal StringValuePair(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StringValuePair obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StringValuePair obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - ~StringValuePair() { - DisposeQueue.Instance.Add(this); - } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~StringValuePair() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_StringValuePair(swigCPtr); + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public StringValuePair() : this(NDalicPINVOKE.new_StringValuePair__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public StringValuePair(string t, PropertyValue u) : this(NDalicPINVOKE.new_StringValuePair__SWIG_1(t, PropertyValue.getCPtr(u)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public StringValuePair(StringValuePair p) : this(NDalicPINVOKE.new_StringValuePair__SWIG_2(StringValuePair.getCPtr(p)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string first { - set { - NDalicPINVOKE.StringValuePair_first_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - string ret = NDalicPINVOKE.StringValuePair_first_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public PropertyValue second { - set { - NDalicPINVOKE.StringValuePair_second_set(swigCPtr, PropertyValue.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.StringValuePair_second_get(swigCPtr); - PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_StringValuePair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + public StringValuePair() : this(NDalicPINVOKE.new_StringValuePair__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public StringValuePair(string t, PropertyValue u) : this(NDalicPINVOKE.new_StringValuePair__SWIG_1(t, PropertyValue.getCPtr(u)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public StringValuePair(StringValuePair p) : this(NDalicPINVOKE.new_StringValuePair__SWIG_2(StringValuePair.getCPtr(p)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public string first + { + set + { + NDalicPINVOKE.StringValuePair_first_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + string ret = NDalicPINVOKE.StringValuePair_first_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public PropertyValue second + { + set + { + NDalicPINVOKE.StringValuePair_second_set(swigCPtr, PropertyValue.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.StringValuePair_second_get(swigCPtr); + PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/StyleChangedSignal.cs b/src/Tizen.NUI/src/internal/StyleChangedSignal.cs old mode 100644 new mode 100755 index fb13b60..ec04692 --- a/src/Tizen.NUI/src/internal/StyleChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/StyleChangedSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class StyleChangedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class StyleChangedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal StyleChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal StyleChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StyleChangedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StyleChangedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~StyleChangedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_StyleChangedSignal(swigCPtr); + ~StyleChangedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.StyleChangedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_StyleChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.StyleChangedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.StyleChangedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.StyleChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.StyleChangedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.StyleChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.StyleChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.StyleChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(StyleManager arg1, StyleChangeType arg2) { - NDalicPINVOKE.StyleChangedSignal_Emit(swigCPtr, StyleManager.getCPtr(arg1), (int)arg2); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(StyleManager arg1, StyleChangeType arg2) + { + NDalicPINVOKE.StyleChangedSignal_Emit(swigCPtr, StyleManager.getCPtr(arg1), (int)arg2); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public StyleChangedSignal() : this(NDalicPINVOKE.new_StyleChangedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public StyleChangedSignal() : this(NDalicPINVOKE.new_StyleChangedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs old mode 100644 new mode 100755 index d0c1426..060041d --- a/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs @@ -8,81 +8,134 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class TapGestureDetectedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal TapGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGestureDetectedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~TapGestureDetectedSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class TapGestureDetectedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TapGestureDetectedSignal(swigCPtr); + internal TapGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGestureDetectedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.TapGestureDetectedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.TapGestureDetectedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TapGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~TapGestureDetectedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TapGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg1, TapGesture arg2) { - NDalicPINVOKE.TapGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), TapGesture.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public TapGestureDetectedSignal() : this(NDalicPINVOKE.new_TapGestureDetectedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TapGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.TapGestureDetectedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.TapGestureDetectedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TapGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TapGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, TapGesture arg2) + { + NDalicPINVOKE.TapGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), TapGesture.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TapGestureDetectedSignal() : this(NDalicPINVOKE.new_TapGestureDetectedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TapGestureDetector.cs b/src/Tizen.NUI/src/internal/TapGestureDetector.cs old mode 100644 new mode 100755 index 3e35a6f..0390e45 --- a/src/Tizen.NUI/src/internal/TapGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/TapGestureDetector.cs @@ -24,188 +24,214 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -using System; -using System.Runtime.InteropServices; + using System; + using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; -public class TapGestureDetector : GestureDetector { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal TapGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TapGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + public class TapGestureDetector : GestureDetector + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGestureDetector obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal TapGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TapGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TapGestureDetector(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGestureDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } -public class DetectedEventArgs : EventArgs -{ - private View _view; - private TapGesture _tapGesture; + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. - public View View + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - get - { - return _view; - } - set - { - _view = value; - } - } - - public TapGesture TapGesture - { - get - { - return _tapGesture; - } - set - { - _tapGesture = value; - } - } -} + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TapGestureDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + public class DetectedEventArgs : EventArgs + { + private View _view; + private TapGesture _tapGesture; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr TapGesture); - private DaliEventHandler _tapGestureEventHandler; - private DetectedCallbackDelegate _tapGestureCallbackDelegate; + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + public TapGesture TapGesture + { + get + { + return _tapGesture; + } + set + { + _tapGesture = value; + } + } + } + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr TapGesture); + private DaliEventHandler _tapGestureEventHandler; + private DetectedCallbackDelegate _tapGestureCallbackDelegate; - public event DaliEventHandler Detected - { - add - { - lock(this) - { - // Restricted to only one listener - if (_tapGestureEventHandler == null) - { - _tapGestureEventHandler += value; - _tapGestureCallbackDelegate = new DetectedCallbackDelegate(OnTapGestureDetected); - this.DetectedSignal().Connect(_tapGestureCallbackDelegate); - } + public event DaliEventHandler Detected + { + add + { + lock (this) + { + // Restricted to only one listener + if (_tapGestureEventHandler == null) + { + _tapGestureEventHandler += value; + + _tapGestureCallbackDelegate = new DetectedCallbackDelegate(OnTapGestureDetected); + this.DetectedSignal().Connect(_tapGestureCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_tapGestureEventHandler != null) + { + this.DetectedSignal().Disconnect(_tapGestureCallbackDelegate); + } + + _tapGestureEventHandler -= value; + } + } } - } - remove - { - lock(this) + private void OnTapGestureDetected(IntPtr actor, IntPtr tapGesture) { - if (_tapGestureEventHandler != null) - { - this.DetectedSignal().Disconnect(_tapGestureCallbackDelegate); - } + DetectedEventArgs e = new DetectedEventArgs(); - _tapGestureEventHandler -= value; - } - } - } + // Populate all members of "e" (DetectedEventArgs) with real data + e.View = View.GetViewFromPtr(actor); + e.TapGesture = Tizen.NUI.TapGesture.GetTapGestureFromPtr(tapGesture); - private void OnTapGestureDetected(IntPtr actor, IntPtr tapGesture) - { - DetectedEventArgs e = new DetectedEventArgs(); + if (_tapGestureEventHandler != null) + { + //here we send all data to user event handlers + _tapGestureEventHandler(this, e); + } - // Populate all members of "e" (DetectedEventArgs) with real data - e.View = View.GetViewFromPtr(actor); - e.TapGesture = Tizen.NUI.TapGesture.GetTapGestureFromPtr(tapGesture); + } - if (_tapGestureEventHandler != null) - { - //here we send all data to user event handlers - _tapGestureEventHandler(this, e); - } - } + public static TapGestureDetector GetTapGestureDetectorFromPtr(global::System.IntPtr cPtr) + { + TapGestureDetector ret = new TapGestureDetector(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -public static TapGestureDetector GetTapGestureDetectorFromPtr(global::System.IntPtr cPtr) { - TapGestureDetector ret = new TapGestureDetector(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public TapGestureDetector() : this(NDalicPINVOKE.TapGestureDetector_New__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public TapGestureDetector(uint tapsRequired) : this(NDalicPINVOKE.TapGestureDetector_New__SWIG_1(tapsRequired), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - public TapGestureDetector () : this (NDalicPINVOKE.TapGestureDetector_New__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public new static TapGestureDetector DownCast(BaseHandle handle) + { + TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.TapGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - } - public TapGestureDetector (uint tapsRequired) : this (NDalicPINVOKE.TapGestureDetector_New__SWIG_1(tapsRequired), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + public TapGestureDetector(TapGestureDetector handle) : this(NDalicPINVOKE.new_TapGestureDetector__SWIG_1(TapGestureDetector.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - } - public new static TapGestureDetector DownCast(BaseHandle handle) { - TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.TapGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public TapGestureDetector Assign(TapGestureDetector rhs) + { + TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.TapGestureDetector_Assign(swigCPtr, TapGestureDetector.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public TapGestureDetector(TapGestureDetector handle) : this(NDalicPINVOKE.new_TapGestureDetector__SWIG_1(TapGestureDetector.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void SetMinimumTapsRequired(uint minimumTaps) + { + NDalicPINVOKE.TapGestureDetector_SetMinimumTapsRequired(swigCPtr, minimumTaps); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public TapGestureDetector Assign(TapGestureDetector rhs) { - TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.TapGestureDetector_Assign(swigCPtr, TapGestureDetector.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public void SetMaximumTapsRequired(uint maximumTaps) + { + NDalicPINVOKE.TapGestureDetector_SetMaximumTapsRequired(swigCPtr, maximumTaps); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void SetMinimumTapsRequired(uint minimumTaps) { - NDalicPINVOKE.TapGestureDetector_SetMinimumTapsRequired(swigCPtr, minimumTaps); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public uint GetMinimumTapsRequired() + { + uint ret = NDalicPINVOKE.TapGestureDetector_GetMinimumTapsRequired(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void SetMaximumTapsRequired(uint maximumTaps) { - NDalicPINVOKE.TapGestureDetector_SetMaximumTapsRequired(swigCPtr, maximumTaps); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public uint GetMaximumTapsRequired() + { + uint ret = NDalicPINVOKE.TapGestureDetector_GetMaximumTapsRequired(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public uint GetMinimumTapsRequired() { - uint ret = NDalicPINVOKE.TapGestureDetector_GetMinimumTapsRequired(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetMaximumTapsRequired() { - uint ret = NDalicPINVOKE.TapGestureDetector_GetMaximumTapsRequired(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TapGestureDetectedSignal DetectedSignal() { - TapGestureDetectedSignal ret = new TapGestureDetectedSignal(NDalicPINVOKE.TapGestureDetector_DetectedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + internal TapGestureDetectedSignal DetectedSignal() + { + TapGestureDetectedSignal ret = new TapGestureDetectedSignal(NDalicPINVOKE.TapGestureDetector_DetectedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } -} + } } diff --git a/src/Tizen.NUI/src/internal/TextEditorSignal.cs b/src/Tizen.NUI/src/internal/TextEditorSignal.cs old mode 100644 new mode 100755 index d6ec52f..67dedf2 --- a/src/Tizen.NUI/src/internal/TextEditorSignal.cs +++ b/src/Tizen.NUI/src/internal/TextEditorSignal.cs @@ -10,81 +10,135 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TextEditorSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class TextEditorSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal TextEditorSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TextEditorSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditorSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditorSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~TextEditorSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextEditorSignal(swigCPtr); + ~TextEditorSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.TextEditorSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TextEditorSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.TextEditorSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TextEditorSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.TextEditorSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TextEditorSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.TextEditorSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(TextEditor arg) { - NDalicPINVOKE.TextEditorSignal_Emit(swigCPtr, TextEditor.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TextEditorSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public TextEditorSignal() : this(NDalicPINVOKE.new_TextEditorSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TextEditorSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(TextEditor arg) + { + NDalicPINVOKE.TextEditorSignal_Emit(swigCPtr, TextEditor.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TextEditorSignal() : this(NDalicPINVOKE.new_TextEditorSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TextFieldSignal.cs b/src/Tizen.NUI/src/internal/TextFieldSignal.cs old mode 100644 new mode 100755 index 664de57..9a08251 --- a/src/Tizen.NUI/src/internal/TextFieldSignal.cs +++ b/src/Tizen.NUI/src/internal/TextFieldSignal.cs @@ -10,81 +10,135 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TextFieldSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class TextFieldSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal TextFieldSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TextFieldSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextFieldSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextFieldSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~TextFieldSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextFieldSignal(swigCPtr); + ~TextFieldSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.TextFieldSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TextFieldSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.TextFieldSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TextFieldSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.TextFieldSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TextFieldSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.TextFieldSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(TextField arg) { - NDalicPINVOKE.TextFieldSignal_Emit(swigCPtr, TextField.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TextFieldSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public TextFieldSignal() : this(NDalicPINVOKE.new_TextFieldSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TextFieldSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(TextField arg) + { + NDalicPINVOKE.TextFieldSignal_Emit(swigCPtr, TextField.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TextFieldSignal() : this(NDalicPINVOKE.new_TextFieldSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Texture.cs b/src/Tizen.NUI/src/internal/Texture.cs old mode 100644 new mode 100755 index c31dc88..c910d3c --- a/src/Tizen.NUI/src/internal/Texture.cs +++ b/src/Tizen.NUI/src/internal/Texture.cs @@ -24,96 +24,124 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class Texture : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class Texture : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Texture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Texture_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal Texture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Texture_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Texture obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Texture obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Texture(swigCPtr); + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Texture(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public Texture (TextureType type, PixelFormat format, uint width, uint height) : this (NDalicPINVOKE.Texture_New__SWIG_0((int)type, (int)format, width, height), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Texture (NativeImageInterface nativeImageInterface) : this (NDalicPINVOKE.Texture_New__SWIG_1(NativeImageInterface.getCPtr(nativeImageInterface)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Texture(Texture handle) : this(NDalicPINVOKE.new_Texture__SWIG_1(Texture.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static Texture DownCast(BaseHandle handle) { - Texture ret = new Texture(NDalicPINVOKE.Texture_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Texture Assign(Texture handle) { - Texture ret = new Texture(NDalicPINVOKE.Texture_Assign(swigCPtr, Texture.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Upload(PixelData pixelData) { - bool ret = NDalicPINVOKE.Texture_Upload__SWIG_0(swigCPtr, PixelData.getCPtr(pixelData)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Upload(PixelData pixelData, uint layer, uint mipmap, uint xOffset, uint yOffset, uint width, uint height) { - bool ret = NDalicPINVOKE.Texture_Upload__SWIG_1(swigCPtr, PixelData.getCPtr(pixelData), layer, mipmap, xOffset, yOffset, width, height); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void GenerateMipmaps() { - NDalicPINVOKE.Texture_GenerateMipmaps(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetWidth() { - uint ret = NDalicPINVOKE.Texture_GetWidth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetHeight() { - uint ret = NDalicPINVOKE.Texture_GetHeight(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Texture(SWIGTYPE_p_Dali__Internal__Texture pointer) : this(NDalicPINVOKE.new_Texture__SWIG_2(SWIGTYPE_p_Dali__Internal__Texture.getCPtr(pointer)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public Texture(TextureType type, PixelFormat format, uint width, uint height) : this(NDalicPINVOKE.Texture_New__SWIG_0((int)type, (int)format, width, height), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Texture(NativeImageInterface nativeImageInterface) : this(NDalicPINVOKE.Texture_New__SWIG_1(NativeImageInterface.getCPtr(nativeImageInterface)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Texture(Texture handle) : this(NDalicPINVOKE.new_Texture__SWIG_1(Texture.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static Texture DownCast(BaseHandle handle) + { + Texture ret = new Texture(NDalicPINVOKE.Texture_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Texture Assign(Texture handle) + { + Texture ret = new Texture(NDalicPINVOKE.Texture_Assign(swigCPtr, Texture.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Upload(PixelData pixelData) + { + bool ret = NDalicPINVOKE.Texture_Upload__SWIG_0(swigCPtr, PixelData.getCPtr(pixelData)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Upload(PixelData pixelData, uint layer, uint mipmap, uint xOffset, uint yOffset, uint width, uint height) + { + bool ret = NDalicPINVOKE.Texture_Upload__SWIG_1(swigCPtr, PixelData.getCPtr(pixelData), layer, mipmap, xOffset, yOffset, width, height); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void GenerateMipmaps() + { + NDalicPINVOKE.Texture_GenerateMipmaps(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint GetWidth() + { + uint ret = NDalicPINVOKE.Texture_GetWidth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetHeight() + { + uint ret = NDalicPINVOKE.Texture_GetHeight(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Texture(SWIGTYPE_p_Dali__Internal__Texture pointer) : this(NDalicPINVOKE.new_Texture__SWIG_2(SWIGTYPE_p_Dali__Internal__Texture.getCPtr(pointer)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TextureSet.cs b/src/Tizen.NUI/src/internal/TextureSet.cs old mode 100644 new mode 100755 index ca7774c..ec9c4fa --- a/src/Tizen.NUI/src/internal/TextureSet.cs +++ b/src/Tizen.NUI/src/internal/TextureSet.cs @@ -24,87 +24,113 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TextureSet : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + internal class TextureSet : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal TextureSet(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextureSet_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TextureSet(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextureSet_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextureSet obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextureSet obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TextureSet(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + public TextureSet() : this(NDalicPINVOKE.TextureSet_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextureSet(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public TextureSet () : this (NDalicPINVOKE.TextureSet_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public TextureSet(TextureSet handle) : this(NDalicPINVOKE.new_TextureSet__SWIG_1(TextureSet.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static TextureSet DownCast(BaseHandle handle) { - TextureSet ret = new TextureSet(NDalicPINVOKE.TextureSet_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public TextureSet Assign(TextureSet handle) { - TextureSet ret = new TextureSet(NDalicPINVOKE.TextureSet_Assign(swigCPtr, TextureSet.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetTexture(uint index, Texture texture) { - NDalicPINVOKE.TextureSet_SetTexture(swigCPtr, index, Texture.getCPtr(texture)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Texture GetTexture(uint index) { - Texture ret = new Texture(NDalicPINVOKE.TextureSet_GetTexture(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetSampler(uint index, Sampler sampler) { - NDalicPINVOKE.TextureSet_SetSampler(swigCPtr, index, Sampler.getCPtr(sampler)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Sampler GetSampler(uint index) { - Sampler ret = new Sampler(NDalicPINVOKE.TextureSet_GetSampler(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetTextureCount() { - uint ret = NDalicPINVOKE.TextureSet_GetTextureCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public TextureSet(TextureSet handle) : this(NDalicPINVOKE.new_TextureSet__SWIG_1(TextureSet.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + public static TextureSet DownCast(BaseHandle handle) + { + TextureSet ret = new TextureSet(NDalicPINVOKE.TextureSet_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TextureSet Assign(TextureSet handle) + { + TextureSet ret = new TextureSet(NDalicPINVOKE.TextureSet_Assign(swigCPtr, TextureSet.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetTexture(uint index, Texture texture) + { + NDalicPINVOKE.TextureSet_SetTexture(swigCPtr, index, Texture.getCPtr(texture)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Texture GetTexture(uint index) + { + Texture ret = new Texture(NDalicPINVOKE.TextureSet_GetTexture(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetSampler(uint index, Sampler sampler) + { + NDalicPINVOKE.TextureSet_SetSampler(swigCPtr, index, Sampler.getCPtr(sampler)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Sampler GetSampler(uint index) + { + Sampler ret = new Sampler(NDalicPINVOKE.TextureSet_GetSampler(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetTextureCount() + { + uint ret = NDalicPINVOKE.TextureSet_GetTextureCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/TextureType.cs b/src/Tizen.NUI/src/internal/TextureType.cs old mode 100644 new mode 100755 index 651c177..e73f8a1 --- a/src/Tizen.NUI/src/internal/TextureType.cs +++ b/src/Tizen.NUI/src/internal/TextureType.cs @@ -8,11 +8,13 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum TextureType { - TEXTURE_2D, - TEXTURE_CUBE -} + internal enum TextureType + { + TEXTURE_2D, + TEXTURE_CUBE + } } diff --git a/src/Tizen.NUI/src/internal/TimePeriod.cs b/src/Tizen.NUI/src/internal/TimePeriod.cs old mode 100644 new mode 100755 index fb992ba..656ba73 --- a/src/Tizen.NUI/src/internal/TimePeriod.cs +++ b/src/Tizen.NUI/src/internal/TimePeriod.cs @@ -8,76 +8,132 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TimePeriod : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class TimePeriod : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal TimePeriod(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TimePeriod(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TimePeriod obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TimePeriod obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~TimePeriod() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TimePeriod(swigCPtr); + ~TimePeriod() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public TimePeriod(float durationSeconds) : this(NDalicPINVOKE.new_TimePeriod__SWIG_0(durationSeconds), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TimePeriod(float delaySeconds, float durationSeconds) : this(NDalicPINVOKE.new_TimePeriod__SWIG_1(delaySeconds, durationSeconds), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float delaySeconds { - set { - NDalicPINVOKE.TimePeriod_delaySeconds_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.TimePeriod_delaySeconds_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float durationSeconds { - set { - NDalicPINVOKE.TimePeriod_durationSeconds_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.TimePeriod_durationSeconds_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TimePeriod(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public TimePeriod(float durationSeconds) : this(NDalicPINVOKE.new_TimePeriod__SWIG_0(durationSeconds), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TimePeriod(float delaySeconds, float durationSeconds) : this(NDalicPINVOKE.new_TimePeriod__SWIG_1(delaySeconds, durationSeconds), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float delaySeconds + { + set + { + NDalicPINVOKE.TimePeriod_delaySeconds_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.TimePeriod_delaySeconds_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float durationSeconds + { + set + { + NDalicPINVOKE.TimePeriod_durationSeconds_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.TimePeriod_durationSeconds_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/TimerSignalType.cs b/src/Tizen.NUI/src/internal/TimerSignalType.cs old mode 100644 new mode 100755 index eda4f3e..d8b163f --- a/src/Tizen.NUI/src/internal/TimerSignalType.cs +++ b/src/Tizen.NUI/src/internal/TimerSignalType.cs @@ -8,81 +8,136 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ internal class TimerSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; - internal TimerSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TimerSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TimerSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TimerSignalType obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - ~TimerSignalType() { - DisposeQueue.Instance.Add(this); - } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TimerSignalType(swigCPtr); + ~TimerSignalType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public bool Empty() { - bool ret = NDalicPINVOKE.TimerSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.TimerSignalType_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TimerSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TimerSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Emit() { - bool ret = NDalicPINVOKE.TimerSignalType_Emit(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public TimerSignalType() : this(NDalicPINVOKE.new_TimerSignalType(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TimerSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.TimerSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.TimerSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TimerSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TimerSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public bool Emit() + { + bool ret = NDalicPINVOKE.TimerSignalType_Emit(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TimerSignalType() : this(NDalicPINVOKE.new_TimerSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ToggleButton.cs b/src/Tizen.NUI/src/internal/ToggleButton.cs old mode 100644 new mode 100755 index ac08ca5..034f03e --- a/src/Tizen.NUI/src/internal/ToggleButton.cs +++ b/src/Tizen.NUI/src/internal/ToggleButton.cs @@ -26,147 +26,221 @@ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class ToggleButton : Tizen.NUI.UIComponents.Button { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class ToggleButton : Tizen.NUI.UIComponents.Button + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ToggleButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ToggleButton_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ToggleButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ToggleButton_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ToggleButton obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ToggleButton obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ToggleButton(swigCPtr); + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ToggleButton(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public class Property : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Property() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ToggleButton_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + + public class Property : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~Property() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ToggleButton_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_ToggleButton_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int STATE_VISUALS = NDalicPINVOKE.ToggleButton_Property_STATE_VISUALS_get(); + public static readonly int TOOLTIPS = NDalicPINVOKE.ToggleButton_Property_TOOLTIPS_get(); + public static readonly int CURRENT_STATE_INDEX = NDalicPINVOKE.ToggleButton_Property_CURRENT_STATE_INDEX_get(); + } - global::System.GC.SuppressFinalize(this); - } - } - - public Property() : this(NDalicPINVOKE.new_ToggleButton_Property(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int STATE_VISUALS = NDalicPINVOKE.ToggleButton_Property_STATE_VISUALS_get(); - public static readonly int TOOLTIPS = NDalicPINVOKE.ToggleButton_Property_TOOLTIPS_get(); - public static readonly int CURRENT_STATE_INDEX = NDalicPINVOKE.ToggleButton_Property_CURRENT_STATE_INDEX_get(); - - } - - public ToggleButton () : this (NDalicPINVOKE.ToggleButton_New(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ToggleButton(ToggleButton toggleButton) : this(NDalicPINVOKE.new_ToggleButton__SWIG_1(ToggleButton.getCPtr(toggleButton)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ToggleButton Assign(ToggleButton toggleButton) { - ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_Assign(swigCPtr, ToggleButton.getCPtr(toggleButton)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ToggleButton DownCast(BaseHandle handle) { - ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000 - } - - public Tizen.NUI.PropertyArray StateVisuals - { - get - { - Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); - GetProperty( ToggleButton.Property.STATE_VISUALS).Get( temp ); - return temp; - } - set - { - SetProperty( ToggleButton.Property.STATE_VISUALS, new Tizen.NUI.PropertyValue( value ) ); - } - } - public Tizen.NUI.PropertyArray Tooltips - { - get - { - Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); - GetProperty( ToggleButton.Property.TOOLTIPS).Get( temp ); - return temp; - } - set - { - SetProperty( ToggleButton.Property.TOOLTIPS, new Tizen.NUI.PropertyValue( value ) ); - } - } - public int CurrentStateIndex - { - get - { - int temp = 0; - GetProperty( ToggleButton.Property.CURRENT_STATE_INDEX).Get( ref temp ); - return temp; - } - set - { - SetProperty( ToggleButton.Property.CURRENT_STATE_INDEX, new Tizen.NUI.PropertyValue( value ) ); - } - } -} + public ToggleButton() : this(NDalicPINVOKE.ToggleButton_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ToggleButton(ToggleButton toggleButton) : this(NDalicPINVOKE.new_ToggleButton__SWIG_1(ToggleButton.getCPtr(toggleButton)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ToggleButton Assign(ToggleButton toggleButton) + { + ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_Assign(swigCPtr, ToggleButton.getCPtr(toggleButton)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static ToggleButton DownCast(BaseHandle handle) + { + ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 + } + + public Tizen.NUI.PropertyArray StateVisuals + { + get + { + Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); + GetProperty(ToggleButton.Property.STATE_VISUALS).Get(temp); + return temp; + } + set + { + SetProperty(ToggleButton.Property.STATE_VISUALS, new Tizen.NUI.PropertyValue(value)); + } + } + public Tizen.NUI.PropertyArray Tooltips + { + get + { + Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); + GetProperty(ToggleButton.Property.TOOLTIPS).Get(temp); + return temp; + } + set + { + SetProperty(ToggleButton.Property.TOOLTIPS, new Tizen.NUI.PropertyValue(value)); + } + } + public int CurrentStateIndex + { + get + { + int temp = 0; + GetProperty(ToggleButton.Property.CURRENT_STATE_INDEX).Get(ref temp); + return temp; + } + set + { + SetProperty(ToggleButton.Property.CURRENT_STATE_INDEX, new Tizen.NUI.PropertyValue(value)); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs b/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs old mode 100644 new mode 100755 index a5b4810..337a4f9 --- a/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs +++ b/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum ToolkitPropertyRange { - VISUAL_PROPERTY_BASE_START_INDEX = PropertyRanges.CORE_PROPERTY_MAX_INDEX+1, - VISUAL_PROPERTY_BASE_END_INDEX = VISUAL_PROPERTY_BASE_START_INDEX+100, - VISUAL_PROPERTY_START_INDEX = VISUAL_PROPERTY_BASE_END_INDEX+1, - VISUAL_PROPERTY_END_INDEX = VISUAL_PROPERTY_START_INDEX+100000 -} + internal enum ToolkitPropertyRange + { + VISUAL_PROPERTY_BASE_START_INDEX = PropertyRanges.CORE_PROPERTY_MAX_INDEX + 1, + VISUAL_PROPERTY_BASE_END_INDEX = VISUAL_PROPERTY_BASE_START_INDEX + 100, + VISUAL_PROPERTY_START_INDEX = VISUAL_PROPERTY_BASE_END_INDEX + 1, + VISUAL_PROPERTY_END_INDEX = VISUAL_PROPERTY_START_INDEX + 100000 + } } diff --git a/src/Tizen.NUI/src/internal/TooltipPositionType.cs b/src/Tizen.NUI/src/internal/TooltipPositionType.cs old mode 100644 new mode 100755 index f014cb7..fec1f09 --- a/src/Tizen.NUI/src/internal/TooltipPositionType.cs +++ b/src/Tizen.NUI/src/internal/TooltipPositionType.cs @@ -8,12 +8,14 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum TooltipPositionType { - ABOVE, - BELOW, - HOVER_POINT -} + internal enum TooltipPositionType + { + ABOVE, + BELOW, + HOVER_POINT + } } diff --git a/src/Tizen.NUI/src/internal/TouchDataSignal.cs b/src/Tizen.NUI/src/internal/TouchDataSignal.cs old mode 100644 new mode 100755 index 93f64e1..b20680a --- a/src/Tizen.NUI/src/internal/TouchDataSignal.cs +++ b/src/Tizen.NUI/src/internal/TouchDataSignal.cs @@ -8,82 +8,136 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; -internal class TouchDataSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal TouchDataSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchDataSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~TouchDataSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class TouchDataSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ActorTouchDataSignal(swigCPtr); + internal TouchDataSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchDataSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.ActorTouchDataSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ActorTouchDataSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorTouchDataSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~TouchDataSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorTouchDataSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Emit(View arg1, Touch arg2) { - bool ret = NDalicPINVOKE.ActorTouchDataSignal_Emit(swigCPtr, View.getCPtr(arg1), Touch.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public TouchDataSignal() : this(NDalicPINVOKE.new_ActorTouchDataSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ActorTouchDataSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.ActorTouchDataSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ActorTouchDataSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorTouchDataSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorTouchDataSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public bool Emit(View arg1, Touch arg2) + { + bool ret = NDalicPINVOKE.ActorTouchDataSignal_Emit(swigCPtr, View.getCPtr(arg1), Touch.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TouchDataSignal() : this(NDalicPINVOKE.new_ActorTouchDataSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TouchPoint.cs b/src/Tizen.NUI/src/internal/TouchPoint.cs old mode 100644 new mode 100755 index e2ccda6..5c2e871 --- a/src/Tizen.NUI/src/internal/TouchPoint.cs +++ b/src/Tizen.NUI/src/internal/TouchPoint.cs @@ -8,128 +8,194 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; - internal class TouchPoint : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal TouchPoint(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPoint obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~TouchPoint() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class TouchPoint : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal TouchPoint(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TouchPoint(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPoint obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public TouchPoint(int id, TouchPoint.State state, float screenX, float screenY) : this(NDalicPINVOKE.new_TouchPoint__SWIG_0(id, (int)state, screenX, screenY), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TouchPoint(int id, TouchPoint.State state, float screenX, float screenY, float localX, float localY) : this(NDalicPINVOKE.new_TouchPoint__SWIG_1(id, (int)state, screenX, screenY, localX, localY), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int deviceId { - set { - NDalicPINVOKE.TouchPoint_deviceId_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - int ret = NDalicPINVOKE.TouchPoint_deviceId_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public TouchPoint.State state { - set { - NDalicPINVOKE.TouchPoint_state_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - TouchPoint.State ret = (TouchPoint.State)NDalicPINVOKE.TouchPoint_state_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public View hitView { - set { - NDalicPINVOKE.TouchPoint_hitActor_set(swigCPtr, View.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_hitActor_get(swigCPtr); - View ret = (cPtr == global::System.IntPtr.Zero) ? null : new View(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Vector2 local { - set { - NDalicPINVOKE.TouchPoint_local_set(swigCPtr, Vector2.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_local_get(swigCPtr); - Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Vector2 screen { - set { - NDalicPINVOKE.TouchPoint_screen_set(swigCPtr, Vector2.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_screen_get(swigCPtr); - Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public enum State { - Started, - Finished, - Down = Started, - Up = Finished, - Motion, - Leave, - Stationary, - Interrupted, - Last - } -} + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~TouchPoint() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TouchPoint(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public TouchPoint(int id, TouchPoint.State state, float screenX, float screenY) : this(NDalicPINVOKE.new_TouchPoint__SWIG_0(id, (int)state, screenX, screenY), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TouchPoint(int id, TouchPoint.State state, float screenX, float screenY, float localX, float localY) : this(NDalicPINVOKE.new_TouchPoint__SWIG_1(id, (int)state, screenX, screenY, localX, localY), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int deviceId + { + set + { + NDalicPINVOKE.TouchPoint_deviceId_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + int ret = NDalicPINVOKE.TouchPoint_deviceId_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public TouchPoint.State state + { + set + { + NDalicPINVOKE.TouchPoint_state_set(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + TouchPoint.State ret = (TouchPoint.State)NDalicPINVOKE.TouchPoint_state_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public View hitView + { + set + { + NDalicPINVOKE.TouchPoint_hitActor_set(swigCPtr, View.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_hitActor_get(swigCPtr); + View ret = (cPtr == global::System.IntPtr.Zero) ? null : new View(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Vector2 local + { + set + { + NDalicPINVOKE.TouchPoint_local_set(swigCPtr, Vector2.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_local_get(swigCPtr); + Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Vector2 screen + { + set + { + NDalicPINVOKE.TouchPoint_screen_set(swigCPtr, Vector2.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_screen_get(swigCPtr); + Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public enum State + { + Started, + Finished, + Down = Started, + Up = Finished, + Motion, + Leave, + Stationary, + Interrupted, + Last + } + + } } diff --git a/src/Tizen.NUI/src/internal/TouchPointContainer.cs b/src/Tizen.NUI/src/internal/TouchPointContainer.cs old mode 100644 new mode 100755 index 5135ddb..c5ddc15 --- a/src/Tizen.NUI/src/internal/TouchPointContainer.cs +++ b/src/Tizen.NUI/src/internal/TouchPointContainer.cs @@ -8,314 +8,412 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ internal class TouchPointContainer : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal TouchPointContainer(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPointContainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~TouchPointContainer() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal TouchPointContainer(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TouchPointContainer(swigCPtr); + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPointContainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public TouchPointContainer(global::System.Collections.ICollection c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (TouchPoint element in c) { - this.Add(element); - } - } - public bool IsFixedSize { - get { - return false; - } - } + ~TouchPointContainer() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public bool IsReadOnly { - get { - return false; - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public TouchPoint this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TouchPointContainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } + public TouchPointContainer(global::System.Collections.ICollection c) : this() + { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (TouchPoint element in c) + { + this.Add(element); + } + } - public int Count { - get { - return (int)size(); - } - } + public bool IsFixedSize + { + get + { + return false; + } + } - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(TouchPoint[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(TouchPoint[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, TouchPoint[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new TouchPointContainerEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new TouchPointContainerEnumerator(this); - } - - public TouchPointContainerEnumerator GetEnumerator() { - return new TouchPointContainerEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class TouchPointContainerEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private TouchPointContainer collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public TouchPointContainerEnumerator(TouchPointContainer collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } + public bool IsReadOnly + { + get + { + return false; + } + } - // Type-safe iterator Current - public TouchPoint Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (TouchPoint)currentObject; - } - } + public TouchPoint this[int index] + { + get + { + return getitem(index); + } + set + { + setitem(index, value); + } + } - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } + public int Capacity + { + get + { + return (int)capacity(); + } + set + { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } + public int Count + { + get + { + return (int)size(); + } + } - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } + public bool IsSynchronized + { + get + { + return false; + } + } - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - NDalicPINVOKE.TouchPointContainer_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(TouchPoint x) { - NDalicPINVOKE.TouchPointContainer_Add(swigCPtr, TouchPoint.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = NDalicPINVOKE.TouchPointContainer_size(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = NDalicPINVOKE.TouchPointContainer_capacity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - NDalicPINVOKE.TouchPointContainer_reserve(swigCPtr, n); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TouchPointContainer() : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TouchPointContainer(TouchPointContainer other) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_1(TouchPointContainer.getCPtr(other)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TouchPointContainer(int capacity) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_2(capacity), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private TouchPoint getitemcopy(int index) { - TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitemcopy(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private TouchPoint getitem(int index) { - TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitem(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, TouchPoint val) { - NDalicPINVOKE.TouchPointContainer_setitem(swigCPtr, index, TouchPoint.getCPtr(val)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(TouchPointContainer values) { - NDalicPINVOKE.TouchPointContainer_AddRange(swigCPtr, TouchPointContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TouchPointContainer GetRange(int index, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_GetRange(swigCPtr, index, count); - TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, TouchPoint x) { - NDalicPINVOKE.TouchPointContainer_Insert(swigCPtr, index, TouchPoint.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, TouchPointContainer values) { - NDalicPINVOKE.TouchPointContainer_InsertRange(swigCPtr, index, TouchPointContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - NDalicPINVOKE.TouchPointContainer_RemoveAt(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - NDalicPINVOKE.TouchPointContainer_RemoveRange(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static TouchPointContainer Repeat(TouchPoint value, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_Repeat(TouchPoint.getCPtr(value), count); - TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_1(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, TouchPointContainer values) { - NDalicPINVOKE.TouchPointContainer_SetRange(swigCPtr, index, TouchPointContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void CopyTo(TouchPoint[] array) + { + CopyTo(0, array, 0, this.Count); + } -} + public void CopyTo(TouchPoint[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, TouchPoint[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index + count > this.Count || arrayIndex + count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i = 0; i < count; i++) + array.SetValue(getitemcopy(index + i), arrayIndex + i); + } + + global::System.Collections.Generic.IEnumerator global::System.Collections.Generic.IEnumerable.GetEnumerator() + { + return new TouchPointContainerEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() + { + return new TouchPointContainerEnumerator(this); + } + + public TouchPointContainerEnumerator GetEnumerator() + { + return new TouchPointContainerEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class TouchPointContainerEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private TouchPointContainer collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public TouchPointContainerEnumerator(TouchPointContainer collection) + { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public TouchPoint Current + { + get + { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (TouchPoint)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current + { + get + { + return Current; + } + } + + public bool MoveNext() + { + int size = collectionRef.Count; + bool moveOkay = (currentIndex + 1 < size) && (size == currentSize); + if (moveOkay) + { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } + else + { + currentObject = null; + } + return moveOkay; + } + + public void Reset() + { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) + { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() + { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() + { + NDalicPINVOKE.TouchPointContainer_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(TouchPoint x) + { + NDalicPINVOKE.TouchPointContainer_Add(swigCPtr, TouchPoint.getCPtr(x)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() + { + uint ret = NDalicPINVOKE.TouchPointContainer_size(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() + { + uint ret = NDalicPINVOKE.TouchPointContainer_capacity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) + { + NDalicPINVOKE.TouchPointContainer_reserve(swigCPtr, n); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TouchPointContainer() : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TouchPointContainer(TouchPointContainer other) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_1(TouchPointContainer.getCPtr(other)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TouchPointContainer(int capacity) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_2(capacity), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private TouchPoint getitemcopy(int index) + { + TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitemcopy(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private TouchPoint getitem(int index) + { + TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitem(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, TouchPoint val) + { + NDalicPINVOKE.TouchPointContainer_setitem(swigCPtr, index, TouchPoint.getCPtr(val)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(TouchPointContainer values) + { + NDalicPINVOKE.TouchPointContainer_AddRange(swigCPtr, TouchPointContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TouchPointContainer GetRange(int index, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_GetRange(swigCPtr, index, count); + TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, TouchPoint x) + { + NDalicPINVOKE.TouchPointContainer_Insert(swigCPtr, index, TouchPoint.getCPtr(x)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, TouchPointContainer values) + { + NDalicPINVOKE.TouchPointContainer_InsertRange(swigCPtr, index, TouchPointContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) + { + NDalicPINVOKE.TouchPointContainer_RemoveAt(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) + { + NDalicPINVOKE.TouchPointContainer_RemoveRange(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static TouchPointContainer Repeat(TouchPoint value, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_Repeat(TouchPoint.getCPtr(value), count); + TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() + { + NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) + { + NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_1(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, TouchPointContainer values) + { + NDalicPINVOKE.TouchPointContainer_SetRange(swigCPtr, index, TouchPointContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TouchSignal.cs b/src/Tizen.NUI/src/internal/TouchSignal.cs old mode 100644 new mode 100755 index df4a3f3..4c9ceba --- a/src/Tizen.NUI/src/internal/TouchSignal.cs +++ b/src/Tizen.NUI/src/internal/TouchSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TouchSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class TouchSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal TouchSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TouchSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~TouchSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TouchSignal(swigCPtr); + ~TouchSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.TouchSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TouchSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.TouchSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TouchSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.TouchSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.TouchSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.TouchSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(Touch arg) { - NDalicPINVOKE.TouchSignal_Emit(swigCPtr, Touch.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TouchSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public TouchSignal() : this(NDalicPINVOKE.new_TouchSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.TouchSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(Touch arg) + { + NDalicPINVOKE.TouchSignal_Emit(swigCPtr, Touch.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TouchSignal() : this(NDalicPINVOKE.new_TouchSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TransitionData.cs b/src/Tizen.NUI/src/internal/TransitionData.cs old mode 100644 new mode 100755 index dd417bb..6de51d7 --- a/src/Tizen.NUI/src/internal/TransitionData.cs +++ b/src/Tizen.NUI/src/internal/TransitionData.cs @@ -24,77 +24,103 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class TransitionData : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class TransitionData : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal TransitionData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TransitionData_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TransitionData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TransitionData_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionData obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionData obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TransitionData(swigCPtr); + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TransitionData(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public TransitionData (PropertyMap transition) : this (NDalicPINVOKE.TransitionData_New__SWIG_0(PropertyMap.getCPtr(transition)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public TransitionData (PropertyArray transition) : this (NDalicPINVOKE.TransitionData_New__SWIG_1(PropertyArray.getCPtr(transition)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public static TransitionData DownCast(BaseHandle handle) { - TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public TransitionData(TransitionData handle) : this(NDalicPINVOKE.new_TransitionData__SWIG_1(TransitionData.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TransitionData Assign(TransitionData handle) { - TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_Assign(swigCPtr, TransitionData.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Count() { - uint ret = NDalicPINVOKE.TransitionData_Count(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyMap GetAnimatorAt(uint index) { - PropertyMap ret = new PropertyMap(NDalicPINVOKE.TransitionData_GetAnimatorAt(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TransitionData(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData impl) : this(NDalicPINVOKE.new_TransitionData__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.getCPtr(impl)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public TransitionData(PropertyMap transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_0(PropertyMap.getCPtr(transition)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public TransitionData(PropertyArray transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_1(PropertyArray.getCPtr(transition)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public static TransitionData DownCast(BaseHandle handle) + { + TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TransitionData(TransitionData handle) : this(NDalicPINVOKE.new_TransitionData__SWIG_1(TransitionData.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TransitionData Assign(TransitionData handle) + { + TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_Assign(swigCPtr, TransitionData.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Count() + { + uint ret = NDalicPINVOKE.TransitionData_Count(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyMap GetAnimatorAt(uint index) + { + PropertyMap ret = new PropertyMap(NDalicPINVOKE.TransitionData_GetAnimatorAt(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal TransitionData(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData impl) : this(NDalicPINVOKE.new_TransitionData__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.getCPtr(impl)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Type.cs b/src/Tizen.NUI/src/internal/Type.cs old mode 100644 new mode 100755 index 24a3b23..9a15c35 --- a/src/Tizen.NUI/src/internal/Type.cs +++ b/src/Tizen.NUI/src/internal/Type.cs @@ -8,17 +8,19 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public enum Type { - NONE, - USER, - KEYBOARD, - MOUSE, - TOUCH, - PEN, - POINTER, - GAMEPAD -} + public enum Type + { + NONE, + USER, + KEYBOARD, + MOUSE, + TOUCH, + PEN, + POINTER, + GAMEPAD + } } diff --git a/src/Tizen.NUI/src/internal/TypeAction.cs b/src/Tizen.NUI/src/internal/TypeAction.cs old mode 100644 new mode 100755 index e1de0cc..0f94ec8 --- a/src/Tizen.NUI/src/internal/TypeAction.cs +++ b/src/Tizen.NUI/src/internal/TypeAction.cs @@ -8,47 +8,97 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TypeAction : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class TypeAction : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal TypeAction(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TypeAction(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeAction obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeAction obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~TypeAction() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TypeAction(swigCPtr); + ~TypeAction() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public TypeAction(TypeRegistration registered, string name, SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool f) : this(NDalicPINVOKE.new_TypeAction(TypeRegistration.getCPtr(registered), name, SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.getCPtr(f)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } -} + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TypeAction(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public TypeAction(TypeRegistration registered, string name, SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool f) : this(NDalicPINVOKE.new_TypeAction(TypeRegistration.getCPtr(registered), name, SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.getCPtr(f)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/TypeInfo.cs b/src/Tizen.NUI/src/internal/TypeInfo.cs old mode 100644 new mode 100755 index 4b287ad..44196e9 --- a/src/Tizen.NUI/src/internal/TypeInfo.cs +++ b/src/Tizen.NUI/src/internal/TypeInfo.cs @@ -8,112 +8,142 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class TypeInfo : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class TypeInfo : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TypeInfo_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TypeInfo(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TypeInfo_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeInfo obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeInfo obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TypeInfo(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TypeInfo(swigCPtr); + + public TypeInfo() : this(NDalicPINVOKE.new_TypeInfo__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - - public TypeInfo() : this(NDalicPINVOKE.new_TypeInfo__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TypeInfo(TypeInfo handle) : this(NDalicPINVOKE.new_TypeInfo__SWIG_1(TypeInfo.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TypeInfo Assign(TypeInfo rhs) { - TypeInfo ret = new TypeInfo(NDalicPINVOKE.TypeInfo_Assign(swigCPtr, TypeInfo.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetName() { - string ret = NDalicPINVOKE.TypeInfo_GetName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetBaseName() { - string ret = NDalicPINVOKE.TypeInfo_GetBaseName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BaseHandle CreateInstance() { - BaseHandle ret = new BaseHandle(NDalicPINVOKE.TypeInfo_CreateInstance(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetActionCount() { - uint ret = NDalicPINVOKE.TypeInfo_GetActionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetActionName(uint index) { - string ret = NDalicPINVOKE.TypeInfo_GetActionName(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetSignalCount() { - uint ret = NDalicPINVOKE.TypeInfo_GetSignalCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetSignalName(uint index) { - string ret = NDalicPINVOKE.TypeInfo_GetSignalName(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetPropertyCount() { - uint ret = NDalicPINVOKE.TypeInfo_GetPropertyCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void GetPropertyIndices(VectorInteger indices) { - NDalicPINVOKE.TypeInfo_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string GetPropertyName(int index) { - string ret = NDalicPINVOKE.TypeInfo_GetPropertyName(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public TypeInfo(TypeInfo handle) : this(NDalicPINVOKE.new_TypeInfo__SWIG_1(TypeInfo.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TypeInfo Assign(TypeInfo rhs) + { + TypeInfo ret = new TypeInfo(NDalicPINVOKE.TypeInfo_Assign(swigCPtr, TypeInfo.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetName() + { + string ret = NDalicPINVOKE.TypeInfo_GetName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetBaseName() + { + string ret = NDalicPINVOKE.TypeInfo_GetBaseName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public BaseHandle CreateInstance() + { + BaseHandle ret = new BaseHandle(NDalicPINVOKE.TypeInfo_CreateInstance(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetActionCount() + { + uint ret = NDalicPINVOKE.TypeInfo_GetActionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetActionName(uint index) + { + string ret = NDalicPINVOKE.TypeInfo_GetActionName(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetSignalCount() + { + uint ret = NDalicPINVOKE.TypeInfo_GetSignalCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetSignalName(uint index) + { + string ret = NDalicPINVOKE.TypeInfo_GetSignalName(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetPropertyCount() + { + uint ret = NDalicPINVOKE.TypeInfo_GetPropertyCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void GetPropertyIndices(VectorInteger indices) + { + NDalicPINVOKE.TypeInfo_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public string GetPropertyName(int index) + { + string ret = NDalicPINVOKE.TypeInfo_GetPropertyName(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/TypeRegistration.cs b/src/Tizen.NUI/src/internal/TypeRegistration.cs old mode 100644 new mode 100755 index e47da5a..4ed17d9 --- a/src/Tizen.NUI/src/internal/TypeRegistration.cs +++ b/src/Tizen.NUI/src/internal/TypeRegistration.cs @@ -8,93 +8,149 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class TypeRegistration : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class TypeRegistration : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal TypeRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TypeRegistration(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeRegistration obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeRegistration obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~TypeRegistration() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - ~TypeRegistration() { - DisposeQueue.Instance.Add(this); - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TypeRegistration(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TypeRegistration(swigCPtr); + static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); + return NDalicPINVOKE.new_TypeRegistration__SWIG_0(SWIGTYPE_p_std__type_info.getCPtr(registerType), SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip)); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); - return NDalicPINVOKE.new_TypeRegistration__SWIG_0(SWIGTYPE_p_std__type_info.getCPtr(registerType), SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip)); - } - - public TypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f) : this(TypeRegistration.SwigConstructTypeRegistration(registerType, baseType, f), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f, bool callCreateOnInit) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); - return NDalicPINVOKE.new_TypeRegistration__SWIG_1(SWIGTYPE_p_std__type_info.getCPtr(registerType), SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip), callCreateOnInit); - } - - public TypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f, bool callCreateOnInit) : this(TypeRegistration.SwigConstructTypeRegistration(registerType, baseType, f, callCreateOnInit), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - static private global::System.IntPtr SwigConstructTypeRegistration(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); - return NDalicPINVOKE.new_TypeRegistration__SWIG_2(name, SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip)); - } - - public TypeRegistration(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) : this(TypeRegistration.SwigConstructTypeRegistration(name, baseType, f), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string RegisteredName() { - string ret = NDalicPINVOKE.TypeRegistration_RegisteredName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static void RegisterControl(string controlName, System.Delegate createFunc) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(createFunc); - { - NDalicPINVOKE.TypeRegistration_RegisterControl(controlName, new System.Runtime.InteropServices.HandleRef(null, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - public static void RegisterProperty(string controlName, string propertyName, int index, PropertyType type, System.Delegate setFunc, System.Delegate getFunc) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(setFunc); -System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(getFunc); - { - NDalicPINVOKE.TypeRegistration_RegisterProperty(controlName, propertyName, index, (int)type, new System.Runtime.InteropServices.HandleRef(null, ip), new System.Runtime.InteropServices.HandleRef(null, ip2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public TypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f) : this(TypeRegistration.SwigConstructTypeRegistration(registerType, baseType, f), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f, bool callCreateOnInit) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); + return NDalicPINVOKE.new_TypeRegistration__SWIG_1(SWIGTYPE_p_std__type_info.getCPtr(registerType), SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip), callCreateOnInit); + } + + public TypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f, bool callCreateOnInit) : this(TypeRegistration.SwigConstructTypeRegistration(registerType, baseType, f, callCreateOnInit), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + static private global::System.IntPtr SwigConstructTypeRegistration(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f); + return NDalicPINVOKE.new_TypeRegistration__SWIG_2(name, SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip)); + } + + public TypeRegistration(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) : this(TypeRegistration.SwigConstructTypeRegistration(name, baseType, f), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public string RegisteredName() + { + string ret = NDalicPINVOKE.TypeRegistration_RegisteredName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void RegisterControl(string controlName, System.Delegate createFunc) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(createFunc); + { + NDalicPINVOKE.TypeRegistration_RegisterControl(controlName, new System.Runtime.InteropServices.HandleRef(null, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public static void RegisterProperty(string controlName, string propertyName, int index, PropertyType type, System.Delegate setFunc, System.Delegate getFunc) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(setFunc); + System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(getFunc); + { + NDalicPINVOKE.TypeRegistration_RegisterProperty(controlName, propertyName, index, (int)type, new System.Runtime.InteropServices.HandleRef(null, ip), new System.Runtime.InteropServices.HandleRef(null, ip2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + } } diff --git a/src/Tizen.NUI/src/internal/TypeRegistry.cs b/src/Tizen.NUI/src/internal/TypeRegistry.cs old mode 100644 new mode 100755 index 03ebb05..bf52f5d --- a/src/Tizen.NUI/src/internal/TypeRegistry.cs +++ b/src/Tizen.NUI/src/internal/TypeRegistry.cs @@ -8,86 +8,112 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class TypeRegistry : BaseHandle { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; + public class TypeRegistry : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal TypeRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TypeRegistry_SWIGUpcast(cPtr), cMemoryOwn) { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal TypeRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TypeRegistry_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeRegistry obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeRegistry obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public override void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_TypeRegistry(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_TypeRegistry(swigCPtr); + public static TypeRegistry Get() + { + TypeRegistry ret = new TypeRegistry(NDalicPINVOKE.TypeRegistry_Get(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - base.Dispose(); - } - } - - public static TypeRegistry Get() { - TypeRegistry ret = new TypeRegistry(NDalicPINVOKE.TypeRegistry_Get(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public TypeRegistry() : this(NDalicPINVOKE.new_TypeRegistry__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TypeRegistry(TypeRegistry handle) : this(NDalicPINVOKE.new_TypeRegistry__SWIG_1(TypeRegistry.getCPtr(handle)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TypeRegistry Assign(TypeRegistry rhs) { - TypeRegistry ret = new TypeRegistry(NDalicPINVOKE.TypeRegistry_Assign(swigCPtr, TypeRegistry.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public TypeInfo GetTypeInfo(string uniqueTypeName) { - TypeInfo ret = new TypeInfo(NDalicPINVOKE.TypeRegistry_GetTypeInfo__SWIG_0(swigCPtr, uniqueTypeName), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TypeInfo GetTypeInfo(SWIGTYPE_p_std__type_info registerType) { - TypeInfo ret = new TypeInfo(NDalicPINVOKE.TypeRegistry_GetTypeInfo__SWIG_1(swigCPtr, SWIGTYPE_p_std__type_info.getCPtr(registerType)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetTypeNameCount() { - uint ret = NDalicPINVOKE.TypeRegistry_GetTypeNameCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetTypeName(uint index) { - string ret = NDalicPINVOKE.TypeRegistry_GetTypeName(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TypeRegistry(SWIGTYPE_p_Dali__Internal__TypeRegistry typeRegistry) : this(NDalicPINVOKE.new_TypeRegistry__SWIG_2(SWIGTYPE_p_Dali__Internal__TypeRegistry.getCPtr(typeRegistry)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public TypeRegistry() : this(NDalicPINVOKE.new_TypeRegistry__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TypeRegistry(TypeRegistry handle) : this(NDalicPINVOKE.new_TypeRegistry__SWIG_1(TypeRegistry.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TypeRegistry Assign(TypeRegistry rhs) + { + TypeRegistry ret = new TypeRegistry(NDalicPINVOKE.TypeRegistry_Assign(swigCPtr, TypeRegistry.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TypeInfo GetTypeInfo(string uniqueTypeName) + { + TypeInfo ret = new TypeInfo(NDalicPINVOKE.TypeRegistry_GetTypeInfo__SWIG_0(swigCPtr, uniqueTypeName), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal TypeInfo GetTypeInfo(SWIGTYPE_p_std__type_info registerType) + { + TypeInfo ret = new TypeInfo(NDalicPINVOKE.TypeRegistry_GetTypeInfo__SWIG_1(swigCPtr, SWIGTYPE_p_std__type_info.getCPtr(registerType)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetTypeNameCount() + { + uint ret = NDalicPINVOKE.TypeRegistry_GetTypeNameCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetTypeName(uint index) + { + string ret = NDalicPINVOKE.TypeRegistry_GetTypeName(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal TypeRegistry(SWIGTYPE_p_Dali__Internal__TypeRegistry typeRegistry) : this(NDalicPINVOKE.new_TypeRegistry__SWIG_2(SWIGTYPE_p_Dali__Internal__TypeRegistry.getCPtr(typeRegistry)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/Uint16Pair.cs b/src/Tizen.NUI/src/internal/Uint16Pair.cs old mode 100644 new mode 100755 index d7bc710..21f550c --- a/src/Tizen.NUI/src/internal/Uint16Pair.cs +++ b/src/Tizen.NUI/src/internal/Uint16Pair.cs @@ -8,138 +8,204 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class Uint16Pair : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Uint16Pair(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class Uint16Pair : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Uint16Pair obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal Uint16Pair(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Uint16Pair obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~Uint16Pair() { - DisposeQueue.Instance.Add(this); - } + ~Uint16Pair() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Uint16Pair(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Uint16Pair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public static bool operator<(Uint16Pair arg1, Uint16Pair arg2) { - return arg1.LessThan(arg2); - } - - public static bool operator>(Uint16Pair arg1, Uint16Pair arg2) { - return arg1.GreaterThan(arg2); - } - - public Uint16Pair() : this(NDalicPINVOKE.new_Uint16Pair__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Uint16Pair(uint width, uint height) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_1(width, height), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Uint16Pair(Uint16Pair rhs) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_2(Uint16Pair.getCPtr(rhs)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetWidth(ushort width) { - NDalicPINVOKE.Uint16Pair_SetWidth(swigCPtr, width); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ushort GetWidth() { - ushort ret = NDalicPINVOKE.Uint16Pair_GetWidth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetHeight(ushort height) { - NDalicPINVOKE.Uint16Pair_SetHeight(swigCPtr, height); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ushort GetHeight() { - ushort ret = NDalicPINVOKE.Uint16Pair_GetHeight(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetX(ushort x) { - NDalicPINVOKE.Uint16Pair_SetX(swigCPtr, x); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ushort GetX() { - ushort ret = NDalicPINVOKE.Uint16Pair_GetX(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetY(ushort y) { - NDalicPINVOKE.Uint16Pair_SetY(swigCPtr, y); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ushort GetY() { - ushort ret = NDalicPINVOKE.Uint16Pair_GetY(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Uint16Pair Assign(Uint16Pair rhs) { - Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.Uint16Pair_Assign(swigCPtr, Uint16Pair.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool EqualTo(Uint16Pair rhs) { - bool ret = NDalicPINVOKE.Uint16Pair_EqualTo(swigCPtr, Uint16Pair.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool NotEqualTo(Uint16Pair rhs) { - bool ret = NDalicPINVOKE.Uint16Pair_NotEqualTo(swigCPtr, Uint16Pair.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool LessThan(Uint16Pair rhs) { - bool ret = NDalicPINVOKE.Uint16Pair_LessThan(swigCPtr, Uint16Pair.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool GreaterThan(Uint16Pair rhs) { - bool ret = NDalicPINVOKE.Uint16Pair_GreaterThan(swigCPtr, Uint16Pair.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + + public static bool operator <(Uint16Pair arg1, Uint16Pair arg2) + { + return arg1.LessThan(arg2); + } + + public static bool operator >(Uint16Pair arg1, Uint16Pair arg2) + { + return arg1.GreaterThan(arg2); + } + + public Uint16Pair() : this(NDalicPINVOKE.new_Uint16Pair__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Uint16Pair(uint width, uint height) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_1(width, height), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Uint16Pair(Uint16Pair rhs) : this(NDalicPINVOKE.new_Uint16Pair__SWIG_2(Uint16Pair.getCPtr(rhs)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetWidth(ushort width) + { + NDalicPINVOKE.Uint16Pair_SetWidth(swigCPtr, width); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ushort GetWidth() + { + ushort ret = NDalicPINVOKE.Uint16Pair_GetWidth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetHeight(ushort height) + { + NDalicPINVOKE.Uint16Pair_SetHeight(swigCPtr, height); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ushort GetHeight() + { + ushort ret = NDalicPINVOKE.Uint16Pair_GetHeight(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetX(ushort x) + { + NDalicPINVOKE.Uint16Pair_SetX(swigCPtr, x); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ushort GetX() + { + ushort ret = NDalicPINVOKE.Uint16Pair_GetX(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetY(ushort y) + { + NDalicPINVOKE.Uint16Pair_SetY(swigCPtr, y); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ushort GetY() + { + ushort ret = NDalicPINVOKE.Uint16Pair_GetY(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Uint16Pair Assign(Uint16Pair rhs) + { + Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.Uint16Pair_Assign(swigCPtr, Uint16Pair.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool EqualTo(Uint16Pair rhs) + { + bool ret = NDalicPINVOKE.Uint16Pair_EqualTo(swigCPtr, Uint16Pair.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool NotEqualTo(Uint16Pair rhs) + { + bool ret = NDalicPINVOKE.Uint16Pair_NotEqualTo(swigCPtr, Uint16Pair.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool LessThan(Uint16Pair rhs) + { + bool ret = NDalicPINVOKE.Uint16Pair_LessThan(swigCPtr, Uint16Pair.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool GreaterThan(Uint16Pair rhs) + { + bool ret = NDalicPINVOKE.Uint16Pair_GreaterThan(swigCPtr, Uint16Pair.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/VectorBase.cs b/src/Tizen.NUI/src/internal/VectorBase.cs old mode 100644 new mode 100755 index 513c48e..6394df9 --- a/src/Tizen.NUI/src/internal/VectorBase.cs +++ b/src/Tizen.NUI/src/internal/VectorBase.cs @@ -8,72 +8,126 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class VectorBase : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class VectorBase : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal VectorBase(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal VectorBase(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorBase obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorBase obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~VectorBase() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); + ~VectorBase() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public uint Count() { - uint ret = NDalicPINVOKE.VectorBase_Count(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Size() { - uint ret = NDalicPINVOKE.VectorBase_Size(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool Empty() { - bool ret = NDalicPINVOKE.VectorBase_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Capacity() { - uint ret = NDalicPINVOKE.VectorBase_Capacity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Release() { - NDalicPINVOKE.VectorBase_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public uint Count() + { + uint ret = NDalicPINVOKE.VectorBase_Count(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Size() + { + uint ret = NDalicPINVOKE.VectorBase_Size(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.VectorBase_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Capacity() + { + uint ret = NDalicPINVOKE.VectorBase_Capacity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Release() + { + NDalicPINVOKE.VectorBase_Release(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/VectorFloat.cs b/src/Tizen.NUI/src/internal/VectorFloat.cs old mode 100644 new mode 100755 index 349cf5f..1b35b38 --- a/src/Tizen.NUI/src/internal/VectorFloat.cs +++ b/src/Tizen.NUI/src/internal/VectorFloat.cs @@ -8,144 +8,209 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class VectorFloat : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal VectorFloat(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class VectorFloat : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorFloat obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal VectorFloat(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorFloat obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~VectorFloat() { - DisposeQueue.Instance.Add(this); - } + ~VectorFloat() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_VectorFloat(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorFloat(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public VectorFloat() : this(NDalicPINVOKE.new_VectorFloat__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorFloat(VectorFloat vector) : this(NDalicPINVOKE.new_VectorFloat__SWIG_1(VectorFloat.getCPtr(vector)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorFloat Assign(VectorFloat vector) { - VectorFloat ret = new VectorFloat(NDalicPINVOKE.VectorFloat_Assign(swigCPtr, VectorFloat.getCPtr(vector)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float Begin() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Begin(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float End() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_End(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float ValueOfIndex(uint index) { - SWIGTYPE_p_float ret = new SWIGTYPE_p_float(NDalicPINVOKE.VectorFloat_ValueOfIndex__SWIG_0(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void PushBack(float element) { - NDalicPINVOKE.VectorFloat_PushBack(swigCPtr, element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_float at, float element) { - NDalicPINVOKE.VectorFloat_Insert__SWIG_0(swigCPtr, SWIGTYPE_p_float.getCPtr(at), element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_float at, SWIGTYPE_p_float from, SWIGTYPE_p_float to) { - NDalicPINVOKE.VectorFloat_Insert__SWIG_1(swigCPtr, SWIGTYPE_p_float.getCPtr(at), SWIGTYPE_p_float.getCPtr(from), SWIGTYPE_p_float.getCPtr(to)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reserve(uint count) { - NDalicPINVOKE.VectorFloat_Reserve(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count) { - NDalicPINVOKE.VectorFloat_Resize__SWIG_0(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count, float item) { - NDalicPINVOKE.VectorFloat_Resize__SWIG_1(swigCPtr, count, item); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_float Erase(SWIGTYPE_p_float iterator) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Erase__SWIG_0(swigCPtr, SWIGTYPE_p_float.getCPtr(iterator)); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float Erase(SWIGTYPE_p_float first, SWIGTYPE_p_float last) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Erase__SWIG_1(swigCPtr, SWIGTYPE_p_float.getCPtr(first), SWIGTYPE_p_float.getCPtr(last)); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Remove(SWIGTYPE_p_float iterator) { - NDalicPINVOKE.VectorFloat_Remove(swigCPtr, SWIGTYPE_p_float.getCPtr(iterator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Swap(VectorFloat vector) { - NDalicPINVOKE.VectorFloat_Swap(swigCPtr, VectorFloat.getCPtr(vector)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Clear() { - NDalicPINVOKE.VectorFloat_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Release() { - NDalicPINVOKE.VectorFloat_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int BaseType = NDalicPINVOKE.VectorFloat_BaseType_get(); -} + public VectorFloat() : this(NDalicPINVOKE.new_VectorFloat__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorFloat(VectorFloat vector) : this(NDalicPINVOKE.new_VectorFloat__SWIG_1(VectorFloat.getCPtr(vector)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorFloat Assign(VectorFloat vector) + { + VectorFloat ret = new VectorFloat(NDalicPINVOKE.VectorFloat_Assign(swigCPtr, VectorFloat.getCPtr(vector)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_float Begin() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Begin(swigCPtr); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_float End() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_End(swigCPtr); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_float ValueOfIndex(uint index) + { + SWIGTYPE_p_float ret = new SWIGTYPE_p_float(NDalicPINVOKE.VectorFloat_ValueOfIndex__SWIG_0(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void PushBack(float element) + { + NDalicPINVOKE.VectorFloat_PushBack(swigCPtr, element); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(SWIGTYPE_p_float at, float element) + { + NDalicPINVOKE.VectorFloat_Insert__SWIG_0(swigCPtr, SWIGTYPE_p_float.getCPtr(at), element); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(SWIGTYPE_p_float at, SWIGTYPE_p_float from, SWIGTYPE_p_float to) + { + NDalicPINVOKE.VectorFloat_Insert__SWIG_1(swigCPtr, SWIGTYPE_p_float.getCPtr(at), SWIGTYPE_p_float.getCPtr(from), SWIGTYPE_p_float.getCPtr(to)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reserve(uint count) + { + NDalicPINVOKE.VectorFloat_Reserve(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count) + { + NDalicPINVOKE.VectorFloat_Resize__SWIG_0(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count, float item) + { + NDalicPINVOKE.VectorFloat_Resize__SWIG_1(swigCPtr, count, item); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_float Erase(SWIGTYPE_p_float iterator) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Erase__SWIG_0(swigCPtr, SWIGTYPE_p_float.getCPtr(iterator)); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_float Erase(SWIGTYPE_p_float first, SWIGTYPE_p_float last) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Erase__SWIG_1(swigCPtr, SWIGTYPE_p_float.getCPtr(first), SWIGTYPE_p_float.getCPtr(last)); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Remove(SWIGTYPE_p_float iterator) + { + NDalicPINVOKE.VectorFloat_Remove(swigCPtr, SWIGTYPE_p_float.getCPtr(iterator)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Swap(VectorFloat vector) + { + NDalicPINVOKE.VectorFloat_Swap(swigCPtr, VectorFloat.getCPtr(vector)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Clear() + { + NDalicPINVOKE.VectorFloat_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Release() + { + NDalicPINVOKE.VectorFloat_Release(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int BaseType = NDalicPINVOKE.VectorFloat_BaseType_get(); + + } } diff --git a/src/Tizen.NUI/src/internal/VectorInteger.cs b/src/Tizen.NUI/src/internal/VectorInteger.cs old mode 100644 new mode 100755 index 381ee99..de342c0 --- a/src/Tizen.NUI/src/internal/VectorInteger.cs +++ b/src/Tizen.NUI/src/internal/VectorInteger.cs @@ -8,144 +8,211 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class VectorInteger : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal VectorInteger(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } -internal class VectorInteger : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorInteger obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal VectorInteger(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorInteger obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~VectorInteger() { - DisposeQueue.Instance.Add(this); - } + ~VectorInteger() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_VectorInteger(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorInteger(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public VectorInteger() : this(NDalicPINVOKE.new_VectorInteger__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorInteger(VectorInteger vector) : this(NDalicPINVOKE.new_VectorInteger__SWIG_1(VectorInteger.getCPtr(vector)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorInteger Assign(VectorInteger vector) { - VectorInteger ret = new VectorInteger(NDalicPINVOKE.VectorInteger_Assign(swigCPtr, VectorInteger.getCPtr(vector)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int Begin() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Begin(swigCPtr); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int End() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_End(swigCPtr); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int ValueOfIndex(uint index) { - SWIGTYPE_p_int ret = new SWIGTYPE_p_int(NDalicPINVOKE.VectorInteger_ValueOfIndex__SWIG_0(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void PushBack(int element) { - NDalicPINVOKE.VectorInteger_PushBack(swigCPtr, element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_int at, int element) { - NDalicPINVOKE.VectorInteger_Insert__SWIG_0(swigCPtr, SWIGTYPE_p_int.getCPtr(at), element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_int at, SWIGTYPE_p_int from, SWIGTYPE_p_int to) { - NDalicPINVOKE.VectorInteger_Insert__SWIG_1(swigCPtr, SWIGTYPE_p_int.getCPtr(at), SWIGTYPE_p_int.getCPtr(from), SWIGTYPE_p_int.getCPtr(to)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reserve(uint count) { - NDalicPINVOKE.VectorInteger_Reserve(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count) { - NDalicPINVOKE.VectorInteger_Resize__SWIG_0(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count, int item) { - NDalicPINVOKE.VectorInteger_Resize__SWIG_1(swigCPtr, count, item); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_int Erase(SWIGTYPE_p_int iterator) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Erase__SWIG_0(swigCPtr, SWIGTYPE_p_int.getCPtr(iterator)); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int Erase(SWIGTYPE_p_int first, SWIGTYPE_p_int last) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Erase__SWIG_1(swigCPtr, SWIGTYPE_p_int.getCPtr(first), SWIGTYPE_p_int.getCPtr(last)); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Remove(SWIGTYPE_p_int iterator) { - NDalicPINVOKE.VectorInteger_Remove(swigCPtr, SWIGTYPE_p_int.getCPtr(iterator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Swap(VectorInteger vector) { - NDalicPINVOKE.VectorInteger_Swap(swigCPtr, VectorInteger.getCPtr(vector)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Clear() { - NDalicPINVOKE.VectorInteger_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Release() { - NDalicPINVOKE.VectorInteger_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int BaseType = NDalicPINVOKE.VectorInteger_BaseType_get(); -} + + + public VectorInteger() : this(NDalicPINVOKE.new_VectorInteger__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorInteger(VectorInteger vector) : this(NDalicPINVOKE.new_VectorInteger__SWIG_1(VectorInteger.getCPtr(vector)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorInteger Assign(VectorInteger vector) + { + VectorInteger ret = new VectorInteger(NDalicPINVOKE.VectorInteger_Assign(swigCPtr, VectorInteger.getCPtr(vector)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_int Begin() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Begin(swigCPtr); + SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_int End() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_End(swigCPtr); + SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_int ValueOfIndex(uint index) + { + SWIGTYPE_p_int ret = new SWIGTYPE_p_int(NDalicPINVOKE.VectorInteger_ValueOfIndex__SWIG_0(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void PushBack(int element) + { + NDalicPINVOKE.VectorInteger_PushBack(swigCPtr, element); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(SWIGTYPE_p_int at, int element) + { + NDalicPINVOKE.VectorInteger_Insert__SWIG_0(swigCPtr, SWIGTYPE_p_int.getCPtr(at), element); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(SWIGTYPE_p_int at, SWIGTYPE_p_int from, SWIGTYPE_p_int to) + { + NDalicPINVOKE.VectorInteger_Insert__SWIG_1(swigCPtr, SWIGTYPE_p_int.getCPtr(at), SWIGTYPE_p_int.getCPtr(from), SWIGTYPE_p_int.getCPtr(to)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reserve(uint count) + { + NDalicPINVOKE.VectorInteger_Reserve(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count) + { + NDalicPINVOKE.VectorInteger_Resize__SWIG_0(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count, int item) + { + NDalicPINVOKE.VectorInteger_Resize__SWIG_1(swigCPtr, count, item); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_int Erase(SWIGTYPE_p_int iterator) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Erase__SWIG_0(swigCPtr, SWIGTYPE_p_int.getCPtr(iterator)); + SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_int Erase(SWIGTYPE_p_int first, SWIGTYPE_p_int last) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Erase__SWIG_1(swigCPtr, SWIGTYPE_p_int.getCPtr(first), SWIGTYPE_p_int.getCPtr(last)); + SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Remove(SWIGTYPE_p_int iterator) + { + NDalicPINVOKE.VectorInteger_Remove(swigCPtr, SWIGTYPE_p_int.getCPtr(iterator)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Swap(VectorInteger vector) + { + NDalicPINVOKE.VectorInteger_Swap(swigCPtr, VectorInteger.getCPtr(vector)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Clear() + { + NDalicPINVOKE.VectorInteger_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Release() + { + NDalicPINVOKE.VectorInteger_Release(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int BaseType = NDalicPINVOKE.VectorInteger_BaseType_get(); + + } } diff --git a/src/Tizen.NUI/src/internal/VectorUint16Pair.cs b/src/Tizen.NUI/src/internal/VectorUint16Pair.cs old mode 100644 new mode 100755 index 65851cd..ca97fa4 --- a/src/Tizen.NUI/src/internal/VectorUint16Pair.cs +++ b/src/Tizen.NUI/src/internal/VectorUint16Pair.cs @@ -8,144 +8,210 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class VectorUint16Pair : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal VectorUint16Pair(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class VectorUint16Pair : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorUint16Pair obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal VectorUint16Pair(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorUint16Pair obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~VectorUint16Pair() { - DisposeQueue.Instance.Add(this); - } + ~VectorUint16Pair() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_VectorUint16Pair(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorUint16Pair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public VectorUint16Pair() : this(NDalicPINVOKE.new_VectorUint16Pair__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorUint16Pair(VectorUint16Pair vector) : this(NDalicPINVOKE.new_VectorUint16Pair__SWIG_1(VectorUint16Pair.getCPtr(vector)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorUint16Pair Assign(VectorUint16Pair vector) { - VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.VectorUint16Pair_Assign(swigCPtr, VectorUint16Pair.getCPtr(vector)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Uint16Pair Begin() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_Begin(swigCPtr); - Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Uint16Pair End() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_End(swigCPtr); - Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Uint16Pair ValueOfIndex(uint index) { - Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.VectorUint16Pair_ValueOfIndex__SWIG_0(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void PushBack(Uint16Pair element) { - NDalicPINVOKE.VectorUint16Pair_PushBack(swigCPtr, Uint16Pair.getCPtr(element)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(Uint16Pair at, Uint16Pair element) { - NDalicPINVOKE.VectorUint16Pair_Insert__SWIG_0(swigCPtr, Uint16Pair.getCPtr(at), Uint16Pair.getCPtr(element)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(Uint16Pair at, Uint16Pair from, Uint16Pair to) { - NDalicPINVOKE.VectorUint16Pair_Insert__SWIG_1(swigCPtr, Uint16Pair.getCPtr(at), Uint16Pair.getCPtr(from), Uint16Pair.getCPtr(to)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reserve(uint count) { - NDalicPINVOKE.VectorUint16Pair_Reserve(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count) { - NDalicPINVOKE.VectorUint16Pair_Resize__SWIG_0(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count, Uint16Pair item) { - NDalicPINVOKE.VectorUint16Pair_Resize__SWIG_1(swigCPtr, count, Uint16Pair.getCPtr(item)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Uint16Pair Erase(Uint16Pair iterator) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_Erase__SWIG_0(swigCPtr, Uint16Pair.getCPtr(iterator)); - Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Uint16Pair Erase(Uint16Pair first, Uint16Pair last) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_Erase__SWIG_1(swigCPtr, Uint16Pair.getCPtr(first), Uint16Pair.getCPtr(last)); - Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Remove(Uint16Pair iterator) { - NDalicPINVOKE.VectorUint16Pair_Remove(swigCPtr, Uint16Pair.getCPtr(iterator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Swap(VectorUint16Pair vector) { - NDalicPINVOKE.VectorUint16Pair_Swap(swigCPtr, VectorUint16Pair.getCPtr(vector)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Clear() { - NDalicPINVOKE.VectorUint16Pair_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Release() { - NDalicPINVOKE.VectorUint16Pair_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int BaseType = NDalicPINVOKE.VectorUint16Pair_BaseType_get(); -} + + public VectorUint16Pair() : this(NDalicPINVOKE.new_VectorUint16Pair__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorUint16Pair(VectorUint16Pair vector) : this(NDalicPINVOKE.new_VectorUint16Pair__SWIG_1(VectorUint16Pair.getCPtr(vector)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorUint16Pair Assign(VectorUint16Pair vector) + { + VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.VectorUint16Pair_Assign(swigCPtr, VectorUint16Pair.getCPtr(vector)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Uint16Pair Begin() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_Begin(swigCPtr); + Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Uint16Pair End() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_End(swigCPtr); + Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Uint16Pair ValueOfIndex(uint index) + { + Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.VectorUint16Pair_ValueOfIndex__SWIG_0(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void PushBack(Uint16Pair element) + { + NDalicPINVOKE.VectorUint16Pair_PushBack(swigCPtr, Uint16Pair.getCPtr(element)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(Uint16Pair at, Uint16Pair element) + { + NDalicPINVOKE.VectorUint16Pair_Insert__SWIG_0(swigCPtr, Uint16Pair.getCPtr(at), Uint16Pair.getCPtr(element)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(Uint16Pair at, Uint16Pair from, Uint16Pair to) + { + NDalicPINVOKE.VectorUint16Pair_Insert__SWIG_1(swigCPtr, Uint16Pair.getCPtr(at), Uint16Pair.getCPtr(from), Uint16Pair.getCPtr(to)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reserve(uint count) + { + NDalicPINVOKE.VectorUint16Pair_Reserve(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count) + { + NDalicPINVOKE.VectorUint16Pair_Resize__SWIG_0(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count, Uint16Pair item) + { + NDalicPINVOKE.VectorUint16Pair_Resize__SWIG_1(swigCPtr, count, Uint16Pair.getCPtr(item)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Uint16Pair Erase(Uint16Pair iterator) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_Erase__SWIG_0(swigCPtr, Uint16Pair.getCPtr(iterator)); + Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public Uint16Pair Erase(Uint16Pair first, Uint16Pair last) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUint16Pair_Erase__SWIG_1(swigCPtr, Uint16Pair.getCPtr(first), Uint16Pair.getCPtr(last)); + Uint16Pair ret = (cPtr == global::System.IntPtr.Zero) ? null : new Uint16Pair(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Remove(Uint16Pair iterator) + { + NDalicPINVOKE.VectorUint16Pair_Remove(swigCPtr, Uint16Pair.getCPtr(iterator)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Swap(VectorUint16Pair vector) + { + NDalicPINVOKE.VectorUint16Pair_Swap(swigCPtr, VectorUint16Pair.getCPtr(vector)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Clear() + { + NDalicPINVOKE.VectorUint16Pair_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Release() + { + NDalicPINVOKE.VectorUint16Pair_Release(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int BaseType = NDalicPINVOKE.VectorUint16Pair_BaseType_get(); + + } } diff --git a/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs b/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs old mode 100644 new mode 100755 index f673ecc..2d23d18 --- a/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs +++ b/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs @@ -8,144 +8,210 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ + + internal class VectorUnsignedChar : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal VectorUnsignedChar(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal class VectorUnsignedChar : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorUnsignedChar obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - internal VectorUnsignedChar(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorUnsignedChar obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - ~VectorUnsignedChar() { - DisposeQueue.Instance.Add(this); - } + ~VectorUnsignedChar() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_VectorUnsignedChar(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorUnsignedChar(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - - public VectorUnsignedChar() : this(NDalicPINVOKE.new_VectorUnsignedChar__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorUnsignedChar(VectorUnsignedChar vector) : this(NDalicPINVOKE.new_VectorUnsignedChar__SWIG_1(VectorUnsignedChar.getCPtr(vector)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorUnsignedChar Assign(VectorUnsignedChar vector) { - VectorUnsignedChar ret = new VectorUnsignedChar(NDalicPINVOKE.VectorUnsignedChar_Assign(swigCPtr, VectorUnsignedChar.getCPtr(vector)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_char Begin() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_Begin(swigCPtr); - SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_char End() { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_End(swigCPtr); - SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_char ValueOfIndex(uint index) { - SWIGTYPE_p_unsigned_char ret = new SWIGTYPE_p_unsigned_char(NDalicPINVOKE.VectorUnsignedChar_ValueOfIndex__SWIG_0(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void PushBack(byte element) { - NDalicPINVOKE.VectorUnsignedChar_PushBack(swigCPtr, element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(byte[] at, byte element) { - NDalicPINVOKE.VectorUnsignedChar_Insert__SWIG_0(swigCPtr, at, element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(byte[] at, SWIGTYPE_p_unsigned_char from, SWIGTYPE_p_unsigned_char to) { - NDalicPINVOKE.VectorUnsignedChar_Insert__SWIG_1(swigCPtr, at, SWIGTYPE_p_unsigned_char.getCPtr(from), SWIGTYPE_p_unsigned_char.getCPtr(to)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reserve(uint count) { - NDalicPINVOKE.VectorUnsignedChar_Reserve(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count) { - NDalicPINVOKE.VectorUnsignedChar_Resize__SWIG_0(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count, byte item) { - NDalicPINVOKE.VectorUnsignedChar_Resize__SWIG_1(swigCPtr, count, item); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_unsigned_char Erase(byte[] iterator) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_Erase__SWIG_0(swigCPtr, iterator); - SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_char Erase(byte[] first, SWIGTYPE_p_unsigned_char last) { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_Erase__SWIG_1(swigCPtr, first, SWIGTYPE_p_unsigned_char.getCPtr(last)); - SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Remove(byte[] iterator) { - NDalicPINVOKE.VectorUnsignedChar_Remove(swigCPtr, iterator); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Swap(VectorUnsignedChar vector) { - NDalicPINVOKE.VectorUnsignedChar_Swap(swigCPtr, VectorUnsignedChar.getCPtr(vector)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Clear() { - NDalicPINVOKE.VectorUnsignedChar_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Release() { - NDalicPINVOKE.VectorUnsignedChar_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int BaseType = NDalicPINVOKE.VectorUnsignedChar_BaseType_get(); -} + + public VectorUnsignedChar() : this(NDalicPINVOKE.new_VectorUnsignedChar__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorUnsignedChar(VectorUnsignedChar vector) : this(NDalicPINVOKE.new_VectorUnsignedChar__SWIG_1(VectorUnsignedChar.getCPtr(vector)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public VectorUnsignedChar Assign(VectorUnsignedChar vector) + { + VectorUnsignedChar ret = new VectorUnsignedChar(NDalicPINVOKE.VectorUnsignedChar_Assign(swigCPtr, VectorUnsignedChar.getCPtr(vector)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_char Begin() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_Begin(swigCPtr); + SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_char End() + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_End(swigCPtr); + SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_char ValueOfIndex(uint index) + { + SWIGTYPE_p_unsigned_char ret = new SWIGTYPE_p_unsigned_char(NDalicPINVOKE.VectorUnsignedChar_ValueOfIndex__SWIG_0(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void PushBack(byte element) + { + NDalicPINVOKE.VectorUnsignedChar_PushBack(swigCPtr, element); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(byte[] at, byte element) + { + NDalicPINVOKE.VectorUnsignedChar_Insert__SWIG_0(swigCPtr, at, element); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Insert(byte[] at, SWIGTYPE_p_unsigned_char from, SWIGTYPE_p_unsigned_char to) + { + NDalicPINVOKE.VectorUnsignedChar_Insert__SWIG_1(swigCPtr, at, SWIGTYPE_p_unsigned_char.getCPtr(from), SWIGTYPE_p_unsigned_char.getCPtr(to)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reserve(uint count) + { + NDalicPINVOKE.VectorUnsignedChar_Reserve(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count) + { + NDalicPINVOKE.VectorUnsignedChar_Resize__SWIG_0(swigCPtr, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Resize(uint count, byte item) + { + NDalicPINVOKE.VectorUnsignedChar_Resize__SWIG_1(swigCPtr, count, item); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public SWIGTYPE_p_unsigned_char Erase(byte[] iterator) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_Erase__SWIG_0(swigCPtr, iterator); + SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_char Erase(byte[] first, SWIGTYPE_p_unsigned_char last) + { + global::System.IntPtr cPtr = NDalicPINVOKE.VectorUnsignedChar_Erase__SWIG_1(swigCPtr, first, SWIGTYPE_p_unsigned_char.getCPtr(last)); + SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Remove(byte[] iterator) + { + NDalicPINVOKE.VectorUnsignedChar_Remove(swigCPtr, iterator); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Swap(VectorUnsignedChar vector) + { + NDalicPINVOKE.VectorUnsignedChar_Swap(swigCPtr, VectorUnsignedChar.getCPtr(vector)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Clear() + { + NDalicPINVOKE.VectorUnsignedChar_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Release() + { + NDalicPINVOKE.VectorUnsignedChar_Release(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int BaseType = NDalicPINVOKE.VectorUnsignedChar_BaseType_get(); + + } } diff --git a/src/Tizen.NUI/src/internal/VideoViewSignal.cs b/src/Tizen.NUI/src/internal/VideoViewSignal.cs old mode 100644 new mode 100755 index 20514f4..18b79f8 --- a/src/Tizen.NUI/src/internal/VideoViewSignal.cs +++ b/src/Tizen.NUI/src/internal/VideoViewSignal.cs @@ -23,30 +23,74 @@ namespace Tizen.NUI { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - ~VideoViewSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~VideoViewSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_VideoViewSignal(swigCPtr); + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_VideoViewSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - public bool Empty() { + public bool Empty() { bool ret = NDalicPINVOKE.VideoViewSignal_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; diff --git a/src/Tizen.NUI/src/internal/ViewContainer.cs b/src/Tizen.NUI/src/internal/ViewContainer.cs old mode 100644 new mode 100755 index f42056d..8f1e23b --- a/src/Tizen.NUI/src/internal/ViewContainer.cs +++ b/src/Tizen.NUI/src/internal/ViewContainer.cs @@ -8,315 +8,415 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; -public class ViewContainer : global::System.IDisposable, global::System.Collections.IEnumerable - , global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ViewContainer(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewContainer obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~ViewContainer() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + public class ViewContainer : global::System.IDisposable, global::System.Collections.IEnumerable + , global::System.Collections.Generic.IEnumerable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ActorContainer(swigCPtr); + internal ViewContainer(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewContainer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public ViewContainer(global::System.Collections.ICollection c) : this() { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (View element in c) { - this.Add(element); - } - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public bool IsFixedSize { - get { - return false; - } - } - public bool IsReadOnly { - get { - return false; - } - } + ~ViewContainer() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public View this[int index] { - get { - return getitem(index); - } - set { - setitem(index, value); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public int Capacity { - get { - return (int)capacity(); - } - set { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ActorContainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public int Count { - get { - return (int)size(); - } - } - public bool IsSynchronized { - get { - return false; - } - } - - public void CopyTo(View[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(View[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, View[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index+count > this.Count || arrayIndex+count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i=0; i global::System.Collections.Generic.IEnumerable.GetEnumerator() { - return new ViewContainerEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { - return new ViewContainerEnumerator(this); - } - - public ViewContainerEnumerator GetEnumerator() { - return new ViewContainerEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class ViewContainerEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private ViewContainer collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public ViewContainerEnumerator(ViewContainer collection) { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - // Type-safe iterator Current - public View Current { - get { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (View)currentObject; - } - } + public ViewContainer(global::System.Collections.ICollection c) : this() + { + if (c == null) + throw new global::System.ArgumentNullException("c"); + foreach (View element in c) + { + this.Add(element); + } + } - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current { - get { - return Current; - } - } + public bool IsFixedSize + { + get + { + return false; + } + } - public bool MoveNext() { - int size = collectionRef.Count; - bool moveOkay = (currentIndex+1 < size) && (size == currentSize); - if (moveOkay) { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } else { - currentObject = null; - } - return moveOkay; - } + public bool IsReadOnly + { + get + { + return false; + } + } - public void Reset() { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) { - throw new global::System.InvalidOperationException("Collection modified."); - } - } + public View this[int index] + { + get + { + return getitem(index); + } + set + { + setitem(index, value); + } + } - public void Dispose() { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() { - NDalicPINVOKE.ActorContainer_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(View x) { - NDalicPINVOKE.ActorContainer_Add(swigCPtr, View.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() { - uint ret = NDalicPINVOKE.ActorContainer_size(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() { - uint ret = NDalicPINVOKE.ActorContainer_capacity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) { - NDalicPINVOKE.ActorContainer_reserve(swigCPtr, n); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer() : this(NDalicPINVOKE.new_ActorContainer__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer(ViewContainer other) : this(NDalicPINVOKE.new_ActorContainer__SWIG_1(ViewContainer.getCPtr(other)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer(int capacity) : this(NDalicPINVOKE.new_ActorContainer__SWIG_2(capacity), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private View getitemcopy(int index) { - View ret = new View(NDalicPINVOKE.ActorContainer_getitemcopy(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private View getitem(int index) { - View ret = new View(NDalicPINVOKE.ActorContainer_getitem(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, View val) { - NDalicPINVOKE.ActorContainer_setitem(swigCPtr, index, View.getCPtr(val)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(ViewContainer values) { - NDalicPINVOKE.ActorContainer_AddRange(swigCPtr, ViewContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer GetRange(int index, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_GetRange(swigCPtr, index, count); - ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, View x) { - NDalicPINVOKE.ActorContainer_Insert(swigCPtr, index, View.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, ViewContainer values) { - NDalicPINVOKE.ActorContainer_InsertRange(swigCPtr, index, ViewContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) { - NDalicPINVOKE.ActorContainer_RemoveAt(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) { - NDalicPINVOKE.ActorContainer_RemoveRange(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static ViewContainer Repeat(View value, int count) { - global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_Repeat(View.getCPtr(value), count); - ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() { - NDalicPINVOKE.ActorContainer_Reverse__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) { - NDalicPINVOKE.ActorContainer_Reverse__SWIG_1(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, ViewContainer values) { - NDalicPINVOKE.ActorContainer_SetRange(swigCPtr, index, ViewContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public int Capacity + { + get + { + return (int)capacity(); + } + set + { + if (value < size()) + throw new global::System.ArgumentOutOfRangeException("Capacity"); + reserve((uint)value); + } + } -} + public int Count + { + get + { + return (int)size(); + } + } + + public bool IsSynchronized + { + get + { + return false; + } + } + + public void CopyTo(View[] array) + { + CopyTo(0, array, 0, this.Count); + } + + public void CopyTo(View[] array, int arrayIndex) + { + CopyTo(0, array, arrayIndex, this.Count); + } + + public void CopyTo(int index, View[] array, int arrayIndex, int count) + { + if (array == null) + throw new global::System.ArgumentNullException("array"); + if (index < 0) + throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); + if (arrayIndex < 0) + throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); + if (count < 0) + throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); + if (array.Rank > 1) + throw new global::System.ArgumentException("Multi dimensional array.", "array"); + if (index + count > this.Count || arrayIndex + count > array.Length) + throw new global::System.ArgumentException("Number of elements to copy is too large."); + for (int i = 0; i < count; i++) + array.SetValue(getitemcopy(index + i), arrayIndex + i); + } + + global::System.Collections.Generic.IEnumerator global::System.Collections.Generic.IEnumerable.GetEnumerator() + { + return new ViewContainerEnumerator(this); + } + + global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() + { + return new ViewContainerEnumerator(this); + } + + public ViewContainerEnumerator GetEnumerator() + { + return new ViewContainerEnumerator(this); + } + + // Type-safe enumerator + /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown + /// whenever the collection is modified. This has been done for changes in the size of the + /// collection but not when one of the elements of the collection is modified as it is a bit + /// tricky to detect unmanaged code that modifies the collection under our feet. + public sealed class ViewContainerEnumerator : global::System.Collections.IEnumerator + , global::System.Collections.Generic.IEnumerator + { + private ViewContainer collectionRef; + private int currentIndex; + private object currentObject; + private int currentSize; + + public ViewContainerEnumerator(ViewContainer collection) + { + collectionRef = collection; + currentIndex = -1; + currentObject = null; + currentSize = collectionRef.Count; + } + + // Type-safe iterator Current + public View Current + { + get + { + if (currentIndex == -1) + throw new global::System.InvalidOperationException("Enumeration not started."); + if (currentIndex > currentSize - 1) + throw new global::System.InvalidOperationException("Enumeration finished."); + if (currentObject == null) + throw new global::System.InvalidOperationException("Collection modified."); + return (View)currentObject; + } + } + + // Type-unsafe IEnumerator.Current + object global::System.Collections.IEnumerator.Current + { + get + { + return Current; + } + } + + public bool MoveNext() + { + int size = collectionRef.Count; + bool moveOkay = (currentIndex + 1 < size) && (size == currentSize); + if (moveOkay) + { + currentIndex++; + currentObject = collectionRef[currentIndex]; + } + else + { + currentObject = null; + } + return moveOkay; + } + + public void Reset() + { + currentIndex = -1; + currentObject = null; + if (collectionRef.Count != currentSize) + { + throw new global::System.InvalidOperationException("Collection modified."); + } + } + + public void Dispose() + { + currentIndex = -1; + currentObject = null; + } + } + + public void Clear() + { + NDalicPINVOKE.ActorContainer_Clear(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Add(View x) + { + NDalicPINVOKE.ActorContainer_Add(swigCPtr, View.getCPtr(x)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private uint size() + { + uint ret = NDalicPINVOKE.ActorContainer_size(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private uint capacity() + { + uint ret = NDalicPINVOKE.ActorContainer_capacity(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void reserve(uint n) + { + NDalicPINVOKE.ActorContainer_reserve(swigCPtr, n); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ViewContainer() : this(NDalicPINVOKE.new_ActorContainer__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ViewContainer(ViewContainer other) : this(NDalicPINVOKE.new_ActorContainer__SWIG_1(ViewContainer.getCPtr(other)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ViewContainer(int capacity) : this(NDalicPINVOKE.new_ActorContainer__SWIG_2(capacity), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private View getitemcopy(int index) + { + View ret = new View(NDalicPINVOKE.ActorContainer_getitemcopy(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private View getitem(int index) + { + View ret = new View(NDalicPINVOKE.ActorContainer_getitem(swigCPtr, index), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private void setitem(int index, View val) + { + NDalicPINVOKE.ActorContainer_setitem(swigCPtr, index, View.getCPtr(val)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void AddRange(ViewContainer values) + { + NDalicPINVOKE.ActorContainer_AddRange(swigCPtr, ViewContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ViewContainer GetRange(int index, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_GetRange(swigCPtr, index, count); + ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Insert(int index, View x) + { + NDalicPINVOKE.ActorContainer_Insert(swigCPtr, index, View.getCPtr(x)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void InsertRange(int index, ViewContainer values) + { + NDalicPINVOKE.ActorContainer_InsertRange(swigCPtr, index, ViewContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAt(int index) + { + NDalicPINVOKE.ActorContainer_RemoveAt(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveRange(int index, int count) + { + NDalicPINVOKE.ActorContainer_RemoveRange(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static ViewContainer Repeat(View value, int count) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_Repeat(View.getCPtr(value), count); + ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reverse() + { + NDalicPINVOKE.ActorContainer_Reverse__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Reverse(int index, int count) + { + NDalicPINVOKE.ActorContainer_Reverse__SWIG_1(swigCPtr, index, count); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetRange(int index, ViewContainer values) + { + NDalicPINVOKE.ActorContainer_SetRange(swigCPtr, index, ViewContainer.getCPtr(values)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ViewImpl.cs b/src/Tizen.NUI/src/internal/ViewImpl.cs old mode 100644 new mode 100755 index f74a91a..1cb651b --- a/src/Tizen.NUI/src/internal/ViewImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewImpl.cs @@ -31,30 +31,39 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - throw new global::System.MethodAccessException("C++ destructor does not have public access"); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + throw new global::System.MethodAccessException("C++ destructor does not have public access"); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } + public static View New() { View ret = new View(NDalicPINVOKE.ViewImpl_New(), true); diff --git a/src/Tizen.NUI/src/internal/ViewMode.cs b/src/Tizen.NUI/src/internal/ViewMode.cs old mode 100644 new mode 100755 index efe0d34..2a69c80 --- a/src/Tizen.NUI/src/internal/ViewMode.cs +++ b/src/Tizen.NUI/src/internal/ViewMode.cs @@ -8,13 +8,15 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal enum ViewMode { - MONO, - STEREO_HORIZONTAL, - STEREO_VERTICAL, - STEREO_INTERLACED -} + internal enum ViewMode + { + MONO, + STEREO_HORIZONTAL, + STEREO_VERTICAL, + STEREO_INTERLACED + } } diff --git a/src/Tizen.NUI/src/internal/ViewRegistry.cs b/src/Tizen.NUI/src/internal/ViewRegistry.cs old mode 100644 new mode 100755 index b61ade5..507f903 --- a/src/Tizen.NUI/src/internal/ViewRegistry.cs +++ b/src/Tizen.NUI/src/internal/ViewRegistry.cs @@ -196,14 +196,14 @@ namespace Tizen.NUI if (_daliPropertyTypeLookup.TryGetValue(cSharpTypeName, out daliType)) { #if DEBUG_ON - Tizen.Log.Debug("NUI", "mapped "+ cSharpTypeName + " to dAli type " +daliType ); + Tizen.Log.Debug("NUI", "mapped " + cSharpTypeName + " to dAli type " + daliType); #endif return daliType; } else { #if DEBUG_ON - Tizen.Log.Debug("NUI", "Failed to find a mapping between C# property" + cSharpTypeName +" and DALi type"); + Tizen.Log.Debug("NUI", "Failed to find a mapping between C# property" + cSharpTypeName + " and DALi type"); #endif return PropertyType.None; } @@ -247,7 +247,7 @@ namespace Tizen.NUI IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj); #if DEBUG_ON - Tizen.Log.Debug("NUI", "________Storing ref object cptr in control map Hex: {0:X}"+ refCptr); + Tizen.Log.Debug("NUI", "________Storing ref object cptr in control map Hex: {0:X}" + refCptr); #endif if (!Instance._controlMap.ContainsKey(refCptr)) { @@ -284,7 +284,7 @@ namespace Tizen.NUI { string name = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(propertyName); #if DEBUG_ON - Tizen.Log.Debug("NUI", "SetControlProperty called for:" + name ); + Tizen.Log.Debug("NUI", "SetControlProperty called for:" + name); #endif Instance.SetPropertyValue(controlPtr, name, propertyValue); @@ -366,7 +366,7 @@ namespace Tizen.NUI if (attr is ScriptableProperty) { #if DEBUG_ON - Tizen.Log.Debug("NUI", "Got a DALi JSON scriptable property = " + propertyInfo.Name +", of type " + propertyInfo.PropertyType.Name); + Tizen.Log.Debug("NUI", "Got a DALi JSON scriptable property = " + propertyInfo.Name + ", of type " + propertyInfo.PropertyType.Name); #endif // first get the attribute type, ( default, or animatable) ScriptableProperty scriptableProp = attr as ScriptableProperty; @@ -428,7 +428,7 @@ namespace Tizen.NUI { // Get the C# control that maps to the C++ control #if DEBUG_ON - Tizen.Log.Debug("NUI", "SetPropertyValue refObjectPtr = {0:X}"+ controlPtr); + Tizen.Log.Debug("NUI", "SetPropertyValue refObjectPtr = {0:X}" + controlPtr); #endif PropertyValue propValue = new PropertyValue(propertyValuePtr, false); diff --git a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs old mode 100644 new mode 100755 index 1f1a92f..ae5615e --- a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs +++ b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs @@ -9,81 +9,134 @@ //------------------------------------------------------------------------------ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class ViewResourceReadySignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class ViewResourceReadySignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ViewResourceReadySignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ViewResourceReadySignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewResourceReadySignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewResourceReadySignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ViewResourceReadySignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ViewResourceReadySignal(swigCPtr); + ~ViewResourceReadySignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Empty() { - bool ret = NDalicPINVOKE.ViewResourceReadySignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ViewResourceReadySignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ViewResourceReadySignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public bool Empty() + { + bool ret = NDalicPINVOKE.ViewResourceReadySignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ViewResourceReadySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ViewResourceReadySignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ViewResourceReadySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ViewResourceReadySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ViewResourceReadySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit(View arg) { - NDalicPINVOKE.ViewResourceReadySignal_Emit(swigCPtr, View.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Emit(View arg) + { + NDalicPINVOKE.ViewResourceReadySignal_Emit(swigCPtr, View.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public ViewResourceReadySignal() : this(NDalicPINVOKE.new_ViewResourceReadySignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public ViewResourceReadySignal() : this(NDalicPINVOKE.new_ViewResourceReadySignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } -} + } } diff --git a/src/Tizen.NUI/src/internal/ViewSignal.cs b/src/Tizen.NUI/src/internal/ViewSignal.cs old mode 100644 new mode 100755 index e6e02c2..5650c9f --- a/src/Tizen.NUI/src/internal/ViewSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewSignal.cs @@ -8,81 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - public class ViewSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~ViewSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } +namespace Tizen.NUI +{ + using Tizen.NUI.BaseComponents; + public class ViewSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ActorSignal(swigCPtr); + internal ViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.ActorSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ActorSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~ViewSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg) { - NDalicPINVOKE.ActorSignal_Emit(swigCPtr, View.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public ViewSignal() : this(NDalicPINVOKE.new_ActorSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ActorSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.ActorSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ActorSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg) + { + NDalicPINVOKE.ActorSignal_Emit(swigCPtr, View.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ViewSignal() : this(NDalicPINVOKE.new_ActorSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs old mode 100644 new mode 100755 index 2511be0..4c60fc9 --- a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs @@ -8,80 +8,135 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ using Tizen.NUI.BaseComponents; -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public class ViewVisibilityChangedSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class ViewVisibilityChangedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ViewVisibilityChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ViewVisibilityChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewVisibilityChangedSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewVisibilityChangedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ViewVisibilityChangedSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ViewVisibilityChangedSignal(swigCPtr); + ~ViewVisibilityChangedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public bool Empty() { - bool ret = NDalicPINVOKE.ViewVisibilityChangedSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ViewVisibilityChangedSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ViewVisibilityChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ViewVisibilityChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public void Emit(View arg) { - NDalicPINVOKE.ViewVisibilityChangedSignal_Emit(swigCPtr, View.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public ViewVisibilityChangedSignal() : this(NDalicPINVOKE.new_ViewVisibilityChangedSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ViewVisibilityChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.ViewVisibilityChangedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ViewVisibilityChangedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ViewVisibilityChangedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ViewVisibilityChangedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg) + { + NDalicPINVOKE.ViewVisibilityChangedSignal_Emit(swigCPtr, View.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ViewVisibilityChangedSignal() : this(NDalicPINVOKE.new_ViewVisibilityChangedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/ViewWrapper.cs b/src/Tizen.NUI/src/internal/ViewWrapper.cs old mode 100644 new mode 100755 index 7bb2967..a78da9b --- a/src/Tizen.NUI/src/internal/ViewWrapper.cs +++ b/src/Tizen.NUI/src/internal/ViewWrapper.cs @@ -36,30 +36,43 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock(this) + + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ViewWrapper(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ViewWrapper(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } - public ViewWrapper (string typeName, ViewWrapperImpl implementation) : this (NDalicManualPINVOKE.ViewWrapper_New(typeName, ViewWrapperImpl.getCPtr(implementation)), true) + + public ViewWrapper(string typeName, ViewWrapperImpl implementation) : this(NDalicManualPINVOKE.ViewWrapper_New(typeName, ViewWrapperImpl.getCPtr(implementation)), true) { viewWrapperImpl = implementation; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs b/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs old mode 100644 new mode 100755 index ec06cad..61ea3ca --- a/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs @@ -108,27 +108,36 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock(this) + + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ViewWrapperImpl(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ViewWrapperImpl(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } public ViewWrapperImpl(CustomViewBehaviour behaviourFlags) : this(NDalicManualPINVOKE.new_ViewWrapperImpl((int)behaviourFlags), true) @@ -308,7 +317,7 @@ namespace Tizen.NUI private void DirectorOnPropertySet(int index, global::System.IntPtr propertyValue) { - if ( OnPropertySet != null ) + if (OnPropertySet != null) { OnPropertySet(index, new PropertyValue(propertyValue, true)); } diff --git a/src/Tizen.NUI/src/internal/VisibilityChangeType.cs b/src/Tizen.NUI/src/internal/VisibilityChangeType.cs old mode 100644 new mode 100755 index b0ab543..6b0b0fc --- a/src/Tizen.NUI/src/internal/VisibilityChangeType.cs +++ b/src/Tizen.NUI/src/internal/VisibilityChangeType.cs @@ -8,11 +8,13 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ -public enum VisibilityChangeType { - SELF, - PARENT -} + public enum VisibilityChangeType + { + SELF, + PARENT + } } diff --git a/src/Tizen.NUI/src/internal/VoidSignal.cs b/src/Tizen.NUI/src/internal/VoidSignal.cs old mode 100644 new mode 100755 index d0736f9..d813a25 --- a/src/Tizen.NUI/src/internal/VoidSignal.cs +++ b/src/Tizen.NUI/src/internal/VoidSignal.cs @@ -8,86 +8,141 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - public class VoidSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + public class VoidSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal VoidSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal VoidSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VoidSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VoidSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~VoidSignal() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_VoidSignal(swigCPtr); + ~VoidSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public VoidSignal() : this(NDalicPINVOKE.new_VoidSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_VoidSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } - public bool Empty() { - bool ret = NDalicPINVOKE.VoidSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.VoidSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public VoidSignal() : this(NDalicPINVOKE.new_VoidSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.VoidSignal_Connect__SWIG_0(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = NDalicPINVOKE.VoidSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.VoidSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.VoidSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Connect(ConnectionTrackerInterface connectionTracker, SWIGTYPE_p_Dali__FunctorDelegate arg1) { - NDalicPINVOKE.VoidSignal_Connect__SWIG_4(swigCPtr, ConnectionTrackerInterface.getCPtr(connectionTracker), SWIGTYPE_p_Dali__FunctorDelegate.getCPtr(arg1)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.VoidSignal_Connect__SWIG_0(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public void Emit() { - NDalicPINVOKE.VoidSignal_Emit(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.VoidSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Connect(ConnectionTrackerInterface connectionTracker, SWIGTYPE_p_Dali__FunctorDelegate arg1) + { + NDalicPINVOKE.VoidSignal_Connect__SWIG_4(swigCPtr, ConnectionTrackerInterface.getCPtr(connectionTracker), SWIGTYPE_p_Dali__FunctorDelegate.getCPtr(arg1)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Emit() + { + NDalicPINVOKE.VoidSignal_Emit(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/WheelSignal.cs b/src/Tizen.NUI/src/internal/WheelSignal.cs old mode 100644 new mode 100755 index 6d61ba6..d9e5c2e --- a/src/Tizen.NUI/src/internal/WheelSignal.cs +++ b/src/Tizen.NUI/src/internal/WheelSignal.cs @@ -8,82 +8,136 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ using Tizen.NUI.BaseComponents; -internal class WheelSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal WheelSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WheelSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~WheelSignal() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + internal class WheelSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ActorWheelSignal(swigCPtr); + internal WheelSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WheelSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - public bool Empty() { - bool ret = NDalicPINVOKE.ActorWheelSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public uint GetConnectionCount() { - uint ret = NDalicPINVOKE.ActorWheelSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorWheelSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + ~WheelSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ActorWheelSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } - public bool Emit(View arg1, Wheel arg2) { - bool ret = NDalicPINVOKE.ActorWheelSignal_Emit(swigCPtr, View.getCPtr(arg1), Wheel.getCPtr(arg2)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } - public WheelSignal() : this(NDalicPINVOKE.new_ActorWheelSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. -} + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ActorWheelSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public bool Empty() + { + bool ret = NDalicPINVOKE.ActorWheelSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.ActorWheelSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorWheelSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.ActorWheelSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public bool Emit(View arg1, Wheel arg2) + { + bool ret = NDalicPINVOKE.ActorWheelSignal_Emit(swigCPtr, View.getCPtr(arg1), Wheel.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public WheelSignal() : this(NDalicPINVOKE.new_ActorWheelSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } } diff --git a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs old mode 100644 new mode 100755 index 7ca4b33..6f1560d --- a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs +++ b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs @@ -27,32 +27,71 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~WindowFocusSignalType() { - DisposeQueue.Instance.Add(this); + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if (type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + disposed = true; } public bool Empty() diff --git a/src/Tizen.NUI/src/internal/doublep.cs b/src/Tizen.NUI/src/internal/doublep.cs old mode 100644 new mode 100755 index 2137adc..5df60f4 --- a/src/Tizen.NUI/src/internal/doublep.cs +++ b/src/Tizen.NUI/src/internal/doublep.cs @@ -8,73 +8,125 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class doublep : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class doublep : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal doublep(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal doublep(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(doublep obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(doublep obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - ~doublep() { - DisposeQueue.Instance.Add(this); - } - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } + ~doublep() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_doublep(swigCPtr); + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public doublep() : this(NDalicPINVOKE.new_doublep(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void assign(double value) { - NDalicPINVOKE.doublep_assign(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public double value() { - double ret = NDalicPINVOKE.doublep_value(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_double cast() { - global::System.IntPtr cPtr = NDalicPINVOKE.doublep_cast(swigCPtr); - SWIGTYPE_p_double ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_double(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static doublep frompointer(SWIGTYPE_p_double t) { - global::System.IntPtr cPtr = NDalicPINVOKE.doublep_frompointer(SWIGTYPE_p_double.getCPtr(t)); - doublep ret = (cPtr == global::System.IntPtr.Zero) ? null : new doublep(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_doublep(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public doublep() : this(NDalicPINVOKE.new_doublep(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void assign(double value) + { + NDalicPINVOKE.doublep_assign(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public double value() + { + double ret = NDalicPINVOKE.doublep_value(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_double cast() + { + global::System.IntPtr cPtr = NDalicPINVOKE.doublep_cast(swigCPtr); + SWIGTYPE_p_double ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_double(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static doublep frompointer(SWIGTYPE_p_double t) + { + global::System.IntPtr cPtr = NDalicPINVOKE.doublep_frompointer(SWIGTYPE_p_double.getCPtr(t)); + doublep ret = (cPtr == global::System.IntPtr.Zero) ? null : new doublep(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/floatp.cs b/src/Tizen.NUI/src/internal/floatp.cs old mode 100644 new mode 100755 index ed9963a..7b507a2 --- a/src/Tizen.NUI/src/internal/floatp.cs +++ b/src/Tizen.NUI/src/internal/floatp.cs @@ -8,72 +8,125 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class floatp : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class floatp : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal floatp(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal floatp(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(floatp obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(floatp obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~floatp() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_floatp(swigCPtr); + ~floatp() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public floatp() : this(NDalicPINVOKE.new_floatp(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void assign(float value) { - NDalicPINVOKE.floatp_assign(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float value() { - float ret = NDalicPINVOKE.floatp_value(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float cast() { - global::System.IntPtr cPtr = NDalicPINVOKE.floatp_cast(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static floatp frompointer(SWIGTYPE_p_float t) { - global::System.IntPtr cPtr = NDalicPINVOKE.floatp_frompointer(SWIGTYPE_p_float.getCPtr(t)); - floatp ret = (cPtr == global::System.IntPtr.Zero) ? null : new floatp(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_floatp(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public floatp() : this(NDalicPINVOKE.new_floatp(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void assign(float value) + { + NDalicPINVOKE.floatp_assign(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float value() + { + float ret = NDalicPINVOKE.floatp_value(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_float cast() + { + global::System.IntPtr cPtr = NDalicPINVOKE.floatp_cast(swigCPtr); + SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static floatp frompointer(SWIGTYPE_p_float t) + { + global::System.IntPtr cPtr = NDalicPINVOKE.floatp_frompointer(SWIGTYPE_p_float.getCPtr(t)); + floatp ret = (cPtr == global::System.IntPtr.Zero) ? null : new floatp(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/intp.cs b/src/Tizen.NUI/src/internal/intp.cs old mode 100644 new mode 100755 index 6736e36..5a2e653 --- a/src/Tizen.NUI/src/internal/intp.cs +++ b/src/Tizen.NUI/src/internal/intp.cs @@ -8,72 +8,125 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class intp : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class intp : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal intp(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal intp(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(intp obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(intp obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~intp() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_intp(swigCPtr); + ~intp() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public intp() : this(NDalicPINVOKE.new_intp(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void assign(int value) { - NDalicPINVOKE.intp_assign(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int value() { - int ret = NDalicPINVOKE.intp_value(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int cast() { - global::System.IntPtr cPtr = NDalicPINVOKE.intp_cast(swigCPtr); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static intp frompointer(SWIGTYPE_p_int t) { - global::System.IntPtr cPtr = NDalicPINVOKE.intp_frompointer(SWIGTYPE_p_int.getCPtr(t)); - intp ret = (cPtr == global::System.IntPtr.Zero) ? null : new intp(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_intp(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public intp() : this(NDalicPINVOKE.new_intp(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void assign(int value) + { + NDalicPINVOKE.intp_assign(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int value() + { + int ret = NDalicPINVOKE.intp_value(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_int cast() + { + global::System.IntPtr cPtr = NDalicPINVOKE.intp_cast(swigCPtr); + SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static intp frompointer(SWIGTYPE_p_int t) + { + global::System.IntPtr cPtr = NDalicPINVOKE.intp_frompointer(SWIGTYPE_p_int.getCPtr(t)); + intp ret = (cPtr == global::System.IntPtr.Zero) ? null : new intp(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/uintp.cs b/src/Tizen.NUI/src/internal/uintp.cs old mode 100644 new mode 100755 index 0e8137f..be1f220 --- a/src/Tizen.NUI/src/internal/uintp.cs +++ b/src/Tizen.NUI/src/internal/uintp.cs @@ -8,72 +8,126 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class uintp : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class uintp : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal uintp(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal uintp(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(uintp obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(uintp obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~uintp() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_uintp(swigCPtr); + ~uintp() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public uintp() : this(NDalicPINVOKE.new_uintp(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void assign(uint value) { - NDalicPINVOKE.uintp_assign(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint value() { - uint ret = NDalicPINVOKE.uintp_value(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_int cast() { - global::System.IntPtr cPtr = NDalicPINVOKE.uintp_cast(swigCPtr); - SWIGTYPE_p_unsigned_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static uintp frompointer(SWIGTYPE_p_unsigned_int t) { - global::System.IntPtr cPtr = NDalicPINVOKE.uintp_frompointer(SWIGTYPE_p_unsigned_int.getCPtr(t)); - uintp ret = (cPtr == global::System.IntPtr.Zero) ? null : new uintp(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_uintp(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + public uintp() : this(NDalicPINVOKE.new_uintp(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void assign(uint value) + { + NDalicPINVOKE.uintp_assign(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public uint value() + { + uint ret = NDalicPINVOKE.uintp_value(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_int cast() + { + global::System.IntPtr cPtr = NDalicPINVOKE.uintp_cast(swigCPtr); + SWIGTYPE_p_unsigned_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_int(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static uintp frompointer(SWIGTYPE_p_unsigned_int t) + { + global::System.IntPtr cPtr = NDalicPINVOKE.uintp_frompointer(SWIGTYPE_p_unsigned_int.getCPtr(t)); + uintp ret = (cPtr == global::System.IntPtr.Zero) ? null : new uintp(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/internal/ushortp.cs b/src/Tizen.NUI/src/internal/ushortp.cs old mode 100644 new mode 100755 index 95f90e8..48b60ac --- a/src/Tizen.NUI/src/internal/ushortp.cs +++ b/src/Tizen.NUI/src/internal/ushortp.cs @@ -8,72 +8,125 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI { +namespace Tizen.NUI +{ - internal class ushortp : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; + internal class ushortp : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - internal ushortp(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } + internal ushortp(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ushortp obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ushortp obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } - ~ushortp() { - DisposeQueue.Instance.Add(this); - } + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_ushortp(swigCPtr); + ~ushortp() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public ushortp() : this(NDalicPINVOKE.new_ushortp(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void assign(ushort value) { - NDalicPINVOKE.ushortp_assign(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ushort value() { - ushort ret = NDalicPINVOKE.ushortp_value(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_unsigned_short cast() { - global::System.IntPtr cPtr = NDalicPINVOKE.ushortp_cast(swigCPtr); - SWIGTYPE_p_unsigned_short ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_short(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static ushortp frompointer(SWIGTYPE_p_unsigned_short t) { - global::System.IntPtr cPtr = NDalicPINVOKE.ushortp_frompointer(SWIGTYPE_p_unsigned_short.getCPtr(t)); - ushortp ret = (cPtr == global::System.IntPtr.Zero) ? null : new ushortp(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } -} + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ushortp(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public ushortp() : this(NDalicPINVOKE.new_ushortp(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void assign(ushort value) + { + NDalicPINVOKE.ushortp_assign(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ushort value() + { + ushort ret = NDalicPINVOKE.ushortp_value(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_unsigned_short cast() + { + global::System.IntPtr cPtr = NDalicPINVOKE.ushortp_cast(swigCPtr); + SWIGTYPE_p_unsigned_short ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_short(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static ushortp frompointer(SWIGTYPE_p_unsigned_short t) + { + global::System.IntPtr cPtr = NDalicPINVOKE.ushortp_frompointer(SWIGTYPE_p_unsigned_short.getCPtr(t)); + ushortp ret = (cPtr == global::System.IntPtr.Zero) ? null : new ushortp(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } } diff --git a/src/Tizen.NUI/src/public/AlphaFunction.cs b/src/Tizen.NUI/src/public/AlphaFunction.cs old mode 100644 new mode 100755 index 0f7b2a5..347fe4e --- a/src/Tizen.NUI/src/public/AlphaFunction.cs +++ b/src/Tizen.NUI/src/public/AlphaFunction.cs @@ -39,34 +39,72 @@ namespace Tizen.NUI { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~AlphaFunction() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } /// /// To make AlphaFunction instance be disposed. /// - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_AlphaFunction(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_AlphaFunction(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index b3f40ce..5b264dd 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -47,28 +47,35 @@ namespace Tizen.NUI /// /// To make Animation instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Animation(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Animation(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs old mode 100644 new mode 100755 index 93dcc1a..2c721a7 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -122,28 +122,40 @@ namespace Tizen.NUI.BaseComponents } } - public override void Dispose() + //you can override it to clean-up your own resources. + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (!disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + _border?.Dispose(); + _border = null; + _nPatchMap?.Dispose(); + _nPatchMap = null; + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ImageView(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ImageView(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } internal class Property : global::System.IDisposable @@ -162,31 +174,69 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ImageView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ImageView_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_ImageView_Property(), true) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs old mode 100644 new mode 100755 index 87195c5..0b06475 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -52,31 +52,36 @@ namespace Tizen.NUI.BaseComponents /// /// Dispose. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextEditor(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextEditor(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } - + base.Dispose(type); + } /// /// Event arguments that passed via TextChanged signal. @@ -170,31 +175,69 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - public virtual void Dispose() + protected virtual void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextEditor_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextEditor_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_TextEditor_Property(), true) @@ -267,31 +310,69 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~InputStyle() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextEditor_InputStyle(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextEditor_InputStyle(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal InputStyle() : this(NDalicPINVOKE.new_TextEditor_InputStyle(), true) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs old mode 100644 new mode 100755 index 8049dd1..cffe75a --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -52,28 +52,36 @@ namespace Tizen.NUI.BaseComponents /// /// Dispose /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextField(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextField(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// @@ -235,31 +243,69 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextField_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextField_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_TextField_Property(), true) @@ -335,31 +381,69 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~InputStyle() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextField_InputStyle(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextField_InputStyle(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal InputStyle() : this(NDalicPINVOKE.new_TextField_InputStyle(), true) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 8b24a6f..e5511ca 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -50,30 +50,36 @@ namespace Tizen.NUI.BaseComponents /// /// Dispose /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextLabel(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextLabel(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } + base.Dispose(type); + } internal class Property : global::System.IDisposable { @@ -91,31 +97,68 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TextLabel_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TextLabel_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_TextLabel_Property(), true) diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 48ddd27..f34776c 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -40,39 +40,40 @@ namespace Tizen.NUI.BaseComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - ~View() + //you can override it to clean-up your own resources. + protected override void Dispose(DisposeTypes type) { - DisposeQueue.Instance.Add(this); - - // Unregister this instance of view from the view registry. - ViewRegistry.UnregisterView(this); - } - - public virtual void Dispose() - { - if (!Window.IsInstalled())//Stage=>Window + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_View(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_View(swigCPtr); } - global::System.GC.SuppressFinalize(this); - //base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - } - + base.Dispose(type); + } private EventHandler _keyInputFocusGainedEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -709,7 +710,7 @@ namespace Tizen.NUI.BaseComponents DisposeQueue.Instance.Add(this); } - public virtual void Dispose() + public void Dispose() { if (!Window.IsInstalled()) { DisposeQueue.Instance.Add(this); diff --git a/src/Tizen.NUI/src/public/Color.cs b/src/Tizen.NUI/src/public/Color.cs old mode 100644 new mode 100755 index 3aedcc1..9fc712e --- a/src/Tizen.NUI/src/public/Color.cs +++ b/src/Tizen.NUI/src/public/Color.cs @@ -40,35 +40,72 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Color() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } /// /// To make Color instance be disposed. /// - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector4(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector4(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/CustomView/Spin.cs b/src/Tizen.NUI/src/public/CustomView/Spin.cs old mode 100644 new mode 100755 index 515e8ff..2303baa --- a/src/Tizen.NUI/src/public/CustomView/Spin.cs +++ b/src/Tizen.NUI/src/public/CustomView/Spin.cs @@ -76,7 +76,7 @@ namespace Tizen.NUI public override void OnInitialize() { // Initialize the propertiesControl - _arrowImage = "/home/owner/apps_rw/NUISamples.TizenTV/res/images/arrow.png"; + _arrowImage = "/home/tengxb/Workspace/nui-debug/examples/res/images/arrow.png"; _textBackgroundColor = new Color(0.6f, 0.6f, 0.6f, 1.0f); _currentValue = 0; _minValue = 0; diff --git a/src/Tizen.NUI/src/public/Degree.cs b/src/Tizen.NUI/src/public/Degree.cs old mode 100644 new mode 100755 index f461c66..6fc876e --- a/src/Tizen.NUI/src/public/Degree.cs +++ b/src/Tizen.NUI/src/public/Degree.cs @@ -30,34 +30,71 @@ namespace Tizen.NUI { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Degree() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Degree(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Degree(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } - /// /// Constructor. /// diff --git a/src/Tizen.NUI/src/public/FlexContainer.cs b/src/Tizen.NUI/src/public/FlexContainer.cs old mode 100644 new mode 100755 index 83f6341..d33f4a5 --- a/src/Tizen.NUI/src/public/FlexContainer.cs +++ b/src/Tizen.NUI/src/public/FlexContainer.cs @@ -50,28 +50,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_FlexContainer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_FlexContainer(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } @@ -91,31 +98,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_FlexContainer_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_FlexContainer_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_FlexContainer_Property(), true) @@ -151,31 +196,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~ChildProperty() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_FlexContainer_ChildProperty(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_FlexContainer_ChildProperty(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal ChildProperty() : this(NDalicPINVOKE.new_FlexContainer_ChildProperty(), true) diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs old mode 100644 new mode 100755 index 627dd15..bf28761 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -47,28 +47,35 @@ namespace Tizen.NUI /// /// To make FocusManager instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_FocusManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicManualPINVOKE.delete_FocusManager(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Gesture.cs b/src/Tizen.NUI/src/public/Gesture.cs old mode 100644 new mode 100755 index 3d02f45..de0e078 --- a/src/Tizen.NUI/src/public/Gesture.cs +++ b/src/Tizen.NUI/src/public/Gesture.cs @@ -32,32 +32,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Gesture() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Gesture(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Gesture(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/Hover.cs b/src/Tizen.NUI/src/public/Hover.cs old mode 100644 new mode 100755 index 7ae04de..a6cb98e --- a/src/Tizen.NUI/src/public/Hover.cs +++ b/src/Tizen.NUI/src/public/Hover.cs @@ -32,32 +32,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Hover() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Hover(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Hover(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/Key.cs b/src/Tizen.NUI/src/public/Key.cs old mode 100644 new mode 100755 index fdf845e..8fa76a5 --- a/src/Tizen.NUI/src/public/Key.cs +++ b/src/Tizen.NUI/src/public/Key.cs @@ -30,32 +30,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Key() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Key(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Key(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/KeyFrames.cs b/src/Tizen.NUI/src/public/KeyFrames.cs old mode 100644 new mode 100755 index 64c0f64..6bb331b --- a/src/Tizen.NUI/src/public/KeyFrames.cs +++ b/src/Tizen.NUI/src/public/KeyFrames.cs @@ -45,28 +45,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_KeyFrames(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_KeyFrames(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Layer.cs b/src/Tizen.NUI/src/public/Layer.cs index 3087d20..1aff277 100755 --- a/src/Tizen.NUI/src/public/Layer.cs +++ b/src/Tizen.NUI/src/public/Layer.cs @@ -44,28 +44,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public virtual void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Layer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Layer(swigCPtr); } - global::System.GC.SuppressFinalize(this); - //base.Dispose(); //xb.teng + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } @@ -85,31 +92,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Layer_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Layer_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_Layer_Property(), true) diff --git a/src/Tizen.NUI/src/public/LongPressGesture.cs b/src/Tizen.NUI/src/public/LongPressGesture.cs old mode 100644 new mode 100755 index 318bf9d..c9009fb --- a/src/Tizen.NUI/src/public/LongPressGesture.cs +++ b/src/Tizen.NUI/src/public/LongPressGesture.cs @@ -29,28 +29,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_LongPressGesture(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_LongPressGesture(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs old mode 100644 new mode 100755 diff --git a/src/Tizen.NUI/src/public/NUIConstants.cs b/src/Tizen.NUI/src/public/NUIConstants.cs index def703e..fc8bc7f 100755 --- a/src/Tizen.NUI/src/public/NUIConstants.cs +++ b/src/Tizen.NUI/src/public/NUIConstants.cs @@ -1310,4 +1310,10 @@ namespace Tizen.NUI /// Dialog } + + public enum DisposeTypes + { + Explicit, //Called By User + Implicit, //Called by DisposeQueue + } } diff --git a/src/Tizen.NUI/src/public/PanGesture.cs b/src/Tizen.NUI/src/public/PanGesture.cs old mode 100644 new mode 100755 index 215a5ac..0011b09 --- a/src/Tizen.NUI/src/public/PanGesture.cs +++ b/src/Tizen.NUI/src/public/PanGesture.cs @@ -34,28 +34,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_PanGesture(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_PanGesture(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Path.cs b/src/Tizen.NUI/src/public/Path.cs old mode 100644 new mode 100755 index 5e45f61..dde5453 --- a/src/Tizen.NUI/src/public/Path.cs +++ b/src/Tizen.NUI/src/public/Path.cs @@ -45,28 +45,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Path(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Path(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } @@ -86,31 +93,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Path_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Path_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_Path_Property(), true) diff --git a/src/Tizen.NUI/src/public/PinchGesture.cs b/src/Tizen.NUI/src/public/PinchGesture.cs old mode 100644 new mode 100755 index 2ef419c..6869eb0 --- a/src/Tizen.NUI/src/public/PinchGesture.cs +++ b/src/Tizen.NUI/src/public/PinchGesture.cs @@ -29,28 +29,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_PinchGesture(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_PinchGesture(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Position.cs b/src/Tizen.NUI/src/public/Position.cs old mode 100644 new mode 100755 index b175355..60da1e5 --- a/src/Tizen.NUI/src/public/Position.cs +++ b/src/Tizen.NUI/src/public/Position.cs @@ -37,32 +37,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Position() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector3(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector3(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/Position2D.cs b/src/Tizen.NUI/src/public/Position2D.cs old mode 100644 new mode 100755 index c4c3a07..c376ead --- a/src/Tizen.NUI/src/public/Position2D.cs +++ b/src/Tizen.NUI/src/public/Position2D.cs @@ -15,277 +15,351 @@ * */ -namespace Tizen.NUI { - -/// -/// Position2D is a two dimensional vector. -/// -public class Position2D : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Position2D(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position2D obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~Position2D() { - DisposeQueue.Instance.Add(this); - } - - public virtual void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); - return; - } - - lock(this) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector2(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - /// - /// Addition operator. - /// - /// Vector to add - /// Vector to add - /// A vector containing the result of the addition - public static Position2D operator+(Position2D arg1, Position2D arg2) { - return arg1.Add(arg2); - } - - /// - /// Subtraction operator. - /// - /// Vector to subtract - /// Vector to subtract - /// A vector containing the result of the subtraction - public static Position2D operator-(Position2D arg1, Position2D arg2) { - return arg1.Subtract(arg2); - } - - /// - /// Unary negation operator. - /// - /// Vector to netate - /// A vector containing the negation - public static Position2D operator-(Position2D arg1) { - return arg1.Subtract(); - } - - /// - /// Multiplication operator. - /// - /// Vector to multiply - /// Vector to multiply - /// A vector containing the result of the multiplication - public static Position2D operator*(Position2D arg1, Position2D arg2) { - return arg1.Multiply(arg2); - } - - /// - /// Multiplication operator. - /// - /// Vector to multiply - /// The int value to scale the vector - /// A vector containing the result of the multiplication - public static Position2D operator*(Position2D arg1, int arg2) { - return arg1.Multiply(arg2); - } - - /// - /// Division operator. - /// - /// Vector to divide - /// Vector to divide - /// A vector containing the result of the division - public static Position2D operator/(Position2D arg1, Position2D arg2) { - return arg1.Divide(arg2); - } - - /// - /// Division operator. - /// - /// Vector to divide - /// The int value to scale the vector by - /// A vector containing the result of the division - public static Position2D operator/(Position2D arg1, int arg2) { - return arg1.Divide(arg2); - } - - /// - /// Const array subscript operator overload. Should be 0, or 1. - /// - /// Subscript index - /// The float at the given index - public float this[uint index] - { - get - { - return ValueOfIndex(index); - } - } - - internal static Position2D GetPosition2DFromPtr(global::System.IntPtr cPtr) { - Position2D ret = new Position2D(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Constructor - /// - public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Constructor - /// - /// x component - /// y component - public Position2D(int x, int y) : this(NDalicPINVOKE.new_Vector2__SWIG_1((float)x, (float)y), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Constructor - /// - /// Position to create this vector from - public Position2D(Position position) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Position.getCPtr(position)), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private Position2D Add(Position2D rhs) { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Add(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Subtract(Position2D rhs) { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - private Position2D Multiply(Position2D rhs) { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Multiply(int rhs) { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, (float)rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - private Position2D Divide(Position2D rhs) { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Divide(int rhs) { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, (float)rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Subtract() { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Compare if rhs is equal to. - /// - /// The vector to compare - /// Returns true if the two vectors are equal, otherwise false - public bool EqualTo(Position2D rhs) { - bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Compare if rhs is not equal to. - /// - /// The vector to compare - /// Returns true if the two vectors are not equal, otherwise false - public bool NotEqualTo(Position2D rhs) { - bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Position2D.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private int ValueOfIndex(uint index) { - int ret = (int)NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// x component. - /// - public int X { - set { - NDalicPINVOKE.Vector2_X_set(swigCPtr, (float)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get { - float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return (int)ret; - } - } - - /// - /// y component. - /// - public int Y { - set { - NDalicPINVOKE.Vector2_Y_set(swigCPtr, (float)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); +namespace Tizen.NUI +{ + + /// + /// Position2D is a two dimensional vector. + /// + public class Position2D : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Position2D(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position2D obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Position2D() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector2(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + disposed = true; + } + + /// + /// Addition operator. + /// + /// Vector to add + /// Vector to add + /// A vector containing the result of the addition + public static Position2D operator +(Position2D arg1, Position2D arg2) + { + return arg1.Add(arg2); + } + + /// + /// Subtraction operator. + /// + /// Vector to subtract + /// Vector to subtract + /// A vector containing the result of the subtraction + public static Position2D operator -(Position2D arg1, Position2D arg2) + { + return arg1.Subtract(arg2); + } + + /// + /// Unary negation operator. + /// + /// Vector to netate + /// A vector containing the negation + public static Position2D operator -(Position2D arg1) + { + return arg1.Subtract(); + } + + /// + /// Multiplication operator. + /// + /// Vector to multiply + /// Vector to multiply + /// A vector containing the result of the multiplication + public static Position2D operator *(Position2D arg1, Position2D arg2) + { + return arg1.Multiply(arg2); + } + + /// + /// Multiplication operator. + /// + /// Vector to multiply + /// The int value to scale the vector + /// A vector containing the result of the multiplication + public static Position2D operator *(Position2D arg1, int arg2) + { + return arg1.Multiply(arg2); + } + + /// + /// Division operator. + /// + /// Vector to divide + /// Vector to divide + /// A vector containing the result of the division + public static Position2D operator /(Position2D arg1, Position2D arg2) + { + return arg1.Divide(arg2); + } + + /// + /// Division operator. + /// + /// Vector to divide + /// The int value to scale the vector by + /// A vector containing the result of the division + public static Position2D operator /(Position2D arg1, int arg2) + { + return arg1.Divide(arg2); + } + + /// + /// Const array subscript operator overload. Should be 0, or 1. + /// + /// Subscript index + /// The float at the given index + public float this[uint index] + { + get + { + return ValueOfIndex(index); + } + } + + internal static Position2D GetPosition2DFromPtr(global::System.IntPtr cPtr) + { + Position2D ret = new Position2D(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Constructor + /// + public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Constructor + /// + /// x component + /// y component + public Position2D(int x, int y) : this(NDalicPINVOKE.new_Vector2__SWIG_1((float)x, (float)y), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Constructor + /// + /// Position to create this vector from + public Position2D(Position position) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Position.getCPtr(position)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private Position2D Add(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Add(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Subtract(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + private Position2D Multiply(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Multiply(int rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, (float)rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + private Position2D Divide(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Divide(int rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, (float)rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Subtract() + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Compare if rhs is equal to. + /// + /// The vector to compare + /// Returns true if the two vectors are equal, otherwise false + public bool EqualTo(Position2D rhs) + { + bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Compare if rhs is not equal to. + /// + /// The vector to compare + /// Returns true if the two vectors are not equal, otherwise false + public bool NotEqualTo(Position2D rhs) + { + bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Position2D.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private int ValueOfIndex(uint index) + { + int ret = (int)NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// x component. + /// + public int X + { + set + { + NDalicPINVOKE.Vector2_X_set(swigCPtr, (float)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (int)ret; + } + } + + /// + /// y component. + /// + public int Y + { + set + { + NDalicPINVOKE.Vector2_Y_set(swigCPtr, (float)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (int)ret; + } + } + + /// + /// Convert a position2D instance to a vector2 instance. + /// + public static implicit operator Vector2(Position2D position2d) + { + return new Vector2((float)position2d.X, (float)position2d.Y); + } + + /// + /// Convert a vector2 instance to a position2D instance. + /// + public static implicit operator Position2D(Vector2 vec) + { + return new Position2D((int)vec.X, (int)vec.Y); + } + } - get { - float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return (int)ret; - } - } - - /// - /// Convert a position2D instance to a vector2 instance. - /// - public static implicit operator Vector2(Position2D position2d) - { - return new Vector2((float)position2d.X, (float)position2d.Y); - } - - /// - /// Convert a vector2 instance to a position2D instance. - /// - public static implicit operator Position2D(Vector2 vec) - { - return new Position2D((int)vec.X, (int)vec.Y); - } - -} } diff --git a/src/Tizen.NUI/src/public/Property.cs b/src/Tizen.NUI/src/public/Property.cs old mode 100644 new mode 100755 index b55948c..2b4f133 --- a/src/Tizen.NUI/src/public/Property.cs +++ b/src/Tizen.NUI/src/public/Property.cs @@ -27,32 +27,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } @@ -202,31 +239,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~PropertyArray() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Property_Array(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Property_Array(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// @@ -406,31 +481,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~PropertyKey() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Property_Key(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Property_Key(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// @@ -607,31 +720,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~PropertyMap() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } } - public virtual void Dispose() + protected virtual void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Property_Map(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Property_Map(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// @@ -941,31 +1092,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~PropertyValue() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Property_Value(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Property_Value(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/Radian.cs b/src/Tizen.NUI/src/public/Radian.cs old mode 100644 new mode 100755 index 87f5e40..6fc8f47 --- a/src/Tizen.NUI/src/public/Radian.cs +++ b/src/Tizen.NUI/src/public/Radian.cs @@ -30,32 +30,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Radian() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Radian(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Radian(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/Rectangle.cs b/src/Tizen.NUI/src/public/Rectangle.cs old mode 100644 new mode 100755 index cdba783..aaeb533 --- a/src/Tizen.NUI/src/public/Rectangle.cs +++ b/src/Tizen.NUI/src/public/Rectangle.cs @@ -30,32 +30,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Rectangle() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Rectangle(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Rectangle(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/RelativeVector2.cs b/src/Tizen.NUI/src/public/RelativeVector2.cs old mode 100644 new mode 100755 index 68f8612..f5052fa --- a/src/Tizen.NUI/src/public/RelativeVector2.cs +++ b/src/Tizen.NUI/src/public/RelativeVector2.cs @@ -39,32 +39,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~RelativeVector2() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector2(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector2(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/RelativeVector3.cs b/src/Tizen.NUI/src/public/RelativeVector3.cs old mode 100644 new mode 100755 index 324df2a..0aec4dc --- a/src/Tizen.NUI/src/public/RelativeVector3.cs +++ b/src/Tizen.NUI/src/public/RelativeVector3.cs @@ -39,32 +39,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~RelativeVector3() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector3(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector3(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/RelativeVector4.cs b/src/Tizen.NUI/src/public/RelativeVector4.cs old mode 100644 new mode 100755 index 390c0e8..69cbdec --- a/src/Tizen.NUI/src/public/RelativeVector4.cs +++ b/src/Tizen.NUI/src/public/RelativeVector4.cs @@ -39,32 +39,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~RelativeVector4() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector4(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector4(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/RelayoutContainer.cs b/src/Tizen.NUI/src/public/RelayoutContainer.cs old mode 100644 new mode 100755 index 59e9bdf..1b990a8 --- a/src/Tizen.NUI/src/public/RelayoutContainer.cs +++ b/src/Tizen.NUI/src/public/RelayoutContainer.cs @@ -39,35 +39,72 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~RelayoutContainer() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } /// /// To make RelayoutContainer instance be disposed. /// - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_RelayoutContainer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_RelayoutContainer(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/Rotation.cs b/src/Tizen.NUI/src/public/Rotation.cs old mode 100644 new mode 100755 index a34fc28..70bd9e6 --- a/src/Tizen.NUI/src/public/Rotation.cs +++ b/src/Tizen.NUI/src/public/Rotation.cs @@ -30,35 +30,72 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Rotation() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } /// /// To make Rotation instance be disposed. /// - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Rotation(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Rotation(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/Size2D.cs b/src/Tizen.NUI/src/public/Size2D.cs old mode 100644 new mode 100755 index 2893eb3..0df0143 --- a/src/Tizen.NUI/src/public/Size2D.cs +++ b/src/Tizen.NUI/src/public/Size2D.cs @@ -37,35 +37,72 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Size2D() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } /// /// Dispose /// - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector2(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector2(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/StyleManager.cs b/src/Tizen.NUI/src/public/StyleManager.cs old mode 100644 new mode 100755 index 06c2ff2..738bef0 --- a/src/Tizen.NUI/src/public/StyleManager.cs +++ b/src/Tizen.NUI/src/public/StyleManager.cs @@ -39,28 +39,35 @@ namespace Tizen.NUI /// /// Dispose /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_StyleManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_StyleManager(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// diff --git a/src/Tizen.NUI/src/public/TableView.cs b/src/Tizen.NUI/src/public/TableView.cs old mode 100644 new mode 100755 index 2377e31..f45d8b5 --- a/src/Tizen.NUI/src/public/TableView.cs +++ b/src/Tizen.NUI/src/public/TableView.cs @@ -51,28 +51,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TableView(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TableView(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } @@ -92,31 +99,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TableView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TableView_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } public Property() : this(NDalicPINVOKE.new_TableView_Property(), true) @@ -148,31 +193,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~ChildProperty() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TableView_ChildProperty(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TableView_ChildProperty(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } public ChildProperty() : this(NDalicPINVOKE.new_TableView_ChildProperty(), true) @@ -207,31 +290,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~CellPosition() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/TapGesture.cs b/src/Tizen.NUI/src/public/TapGesture.cs old mode 100644 new mode 100755 index 06db807..4eb7c0a --- a/src/Tizen.NUI/src/public/TapGesture.cs +++ b/src/Tizen.NUI/src/public/TapGesture.cs @@ -31,28 +31,35 @@ namespace Tizen.NUI /// /// Dispose /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_TapGesture(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_TapGesture(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Timer.cs b/src/Tizen.NUI/src/public/Timer.cs old mode 100644 new mode 100755 index 8e02c9d..04525be --- a/src/Tizen.NUI/src/public/Timer.cs +++ b/src/Tizen.NUI/src/public/Timer.cs @@ -54,28 +54,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Timer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Timer(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Touch.cs b/src/Tizen.NUI/src/public/Touch.cs old mode 100644 new mode 100755 index b461d13..742e8e7 --- a/src/Tizen.NUI/src/public/Touch.cs +++ b/src/Tizen.NUI/src/public/Touch.cs @@ -30,28 +30,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Touch(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Touch(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs b/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs old mode 100644 new mode 100755 index 3fdf472..d0392c1 --- a/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs +++ b/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs @@ -45,28 +45,35 @@ namespace Tizen.NUI.UIComponents /// /// To make CheckBoxButton instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_CheckBoxButton(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_CheckBoxButton(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// diff --git a/src/Tizen.NUI/src/public/UIComponents/PushButton.cs b/src/Tizen.NUI/src/public/UIComponents/PushButton.cs old mode 100644 new mode 100755 index 64cb7f4..cc8bc92 --- a/src/Tizen.NUI/src/public/UIComponents/PushButton.cs +++ b/src/Tizen.NUI/src/public/UIComponents/PushButton.cs @@ -49,28 +49,35 @@ namespace Tizen.NUI.UIComponents /// /// To make PushButton instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_PushButton(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_PushButton(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } @@ -90,31 +97,69 @@ namespace Tizen.NUI.UIComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_PushButton_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_PushButton_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_PushButton_Property(), true) diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs old mode 100644 new mode 100755 index 7af08ea..4236141 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -54,28 +54,35 @@ namespace Tizen.NUI.UIComponents /// /// To make ScrollBar instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if (disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollBar(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollBar(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// @@ -208,31 +215,69 @@ namespace Tizen.NUI.UIComponents return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollBar_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollBar_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_ScrollBar_Property(), true) diff --git a/src/Tizen.NUI/src/public/Vector2.cs b/src/Tizen.NUI/src/public/Vector2.cs old mode 100644 new mode 100755 index eb78892..1c9d79e --- a/src/Tizen.NUI/src/public/Vector2.cs +++ b/src/Tizen.NUI/src/public/Vector2.cs @@ -30,32 +30,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Vector2() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector2(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector2(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/Vector3.cs b/src/Tizen.NUI/src/public/Vector3.cs old mode 100644 new mode 100755 index 6c6bfe2..62f282c --- a/src/Tizen.NUI/src/public/Vector3.cs +++ b/src/Tizen.NUI/src/public/Vector3.cs @@ -30,32 +30,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Vector3() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector3(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector3(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/Vector4.cs b/src/Tizen.NUI/src/public/Vector4.cs old mode 100644 new mode 100755 index 1967f2e..fb80a29 --- a/src/Tizen.NUI/src/public/Vector4.cs +++ b/src/Tizen.NUI/src/public/Vector4.cs @@ -30,32 +30,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Vector4() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector4(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector4(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } /// diff --git a/src/Tizen.NUI/src/public/VideoView.cs b/src/Tizen.NUI/src/public/VideoView.cs old mode 100644 new mode 100755 index c2231a5..7ec231e --- a/src/Tizen.NUI/src/public/VideoView.cs +++ b/src/Tizen.NUI/src/public/VideoView.cs @@ -50,28 +50,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_VideoView(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_VideoView(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// @@ -169,31 +176,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Property() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { - if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_VideoView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_VideoView_Property(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } internal Property() : this(NDalicPINVOKE.new_VideoView_Property(), true) diff --git a/src/Tizen.NUI/src/public/VisualBase.cs b/src/Tizen.NUI/src/public/VisualBase.cs old mode 100644 new mode 100755 index c9723d5..aaa7c49 --- a/src/Tizen.NUI/src/public/VisualBase.cs +++ b/src/Tizen.NUI/src/public/VisualBase.cs @@ -30,27 +30,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_VisualBase(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_VisualBase(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// diff --git a/src/Tizen.NUI/src/public/VisualFactory.cs b/src/Tizen.NUI/src/public/VisualFactory.cs old mode 100644 new mode 100755 index 8f5c4ed..545b368 --- a/src/Tizen.NUI/src/public/VisualFactory.cs +++ b/src/Tizen.NUI/src/public/VisualFactory.cs @@ -28,28 +28,35 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_VisualFactory(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_VisualFactory(swigCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Wheel.cs b/src/Tizen.NUI/src/public/Wheel.cs old mode 100644 new mode 100755 index fa38d47..59bc7aa --- a/src/Tizen.NUI/src/public/Wheel.cs +++ b/src/Tizen.NUI/src/public/Wheel.cs @@ -33,32 +33,69 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } + //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + ~Wheel() { - DisposeQueue.Instance.Add(this); + if(!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } } - public virtual void Dispose() + public void Dispose() { + //Throw excpetion if Dispose() is called in separate thread. if (!Window.IsInstalled()) { - DisposeQueue.Instance.Add(this); + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { return; } - lock (this) + if(type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Wheel(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Wheel(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + disposed = true; } diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 729bf50..812bd60 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -54,29 +54,36 @@ namespace Tizen.NUI /// /// To make Window instance be disposed. /// - public override void Dispose() + protected override void Dispose(DisposeTypes type) { - if (!Window.IsInstalled()) + if(disposed) { - DisposeQueue.Instance.Add(this); return; } - lock (this) + if(type == DisposeTypes.Explicit) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Window(swigCPtr); - NDalicPINVOKE.delete_Stage(stageCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + NDalicPINVOKE.delete_Window(swigCPtr); + NDalicPINVOKE.delete_Stage(stageCPtr); } - global::System.GC.SuppressFinalize(this); - base.Dispose(); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } internal static Window GetCurrent() @@ -244,6 +251,15 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } + // public void SetType(WindowType type) { + + // } + + // public WindowType GetType() { + // WindowType ret = (WindowType)NDalicPINVOKE.GetType(swigCPtr); + // if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + // return ret; + // } /// /// Sets a priority level for the specified notification window. -- 2.7.4