X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-swig%2Fmanual%2Fcsharp%2FCustomView.cs;h=83540d3bbd5130314f862419cab6be969624f7a8;hp=f7048856acd7bf0a07f8b4f7f25cb13ebfa038d6;hb=aba4610aa62406ba9c89dac6e937a4fcd0daf786;hpb=be7711b99f7e5db0b712194636745045d4da1154 diff --git a/plugins/dali-swig/manual/csharp/CustomView.cs b/plugins/dali-swig/manual/csharp/CustomView.cs index f704885..83540d3 100644 --- a/plugins/dali-swig/manual/csharp/CustomView.cs +++ b/plugins/dali-swig/manual/csharp/CustomView.cs @@ -19,7 +19,7 @@ namespace Dali { public class CustomView : ViewWrapper { - public CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour) : base(new ViewWrapperImpl(behaviour)) + public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour)) { // Registering CustomView virtual functions to viewWrapperImpl delegates. viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection); @@ -29,10 +29,10 @@ namespace Dali viewWrapperImpl.OnPropertySet = new ViewWrapperImpl.OnPropertySetDelegate(OnPropertySet); viewWrapperImpl.OnSizeSet = new ViewWrapperImpl.OnSizeSetDelegate(OnSizeSet); viewWrapperImpl.OnSizeAnimation = new ViewWrapperImpl.OnSizeAnimationDelegate(OnSizeAnimation); - viewWrapperImpl.OnTouchEvent = new ViewWrapperImpl.OnTouchEventDelegate(OnTouchEvent); - viewWrapperImpl.OnHoverEvent = new ViewWrapperImpl.OnHoverEventDelegate(OnHoverEvent); - viewWrapperImpl.OnKeyEvent = new ViewWrapperImpl.OnKeyEventDelegate(OnKeyEvent); - viewWrapperImpl.OnWheelEvent = new ViewWrapperImpl.OnWheelEventDelegate(OnWheelEvent); + viewWrapperImpl.OnTouch = new ViewWrapperImpl.OnTouchDelegate(OnTouch); + viewWrapperImpl.OnHover = new ViewWrapperImpl.OnHoverDelegate(OnHover); + viewWrapperImpl.OnKey = new ViewWrapperImpl.OnKeyDelegate(OnKey); + viewWrapperImpl.OnWheel = new ViewWrapperImpl.OnWheelDelegate(OnWheel); viewWrapperImpl.OnRelayout = new ViewWrapperImpl.OnRelayoutDelegate(OnRelayout); viewWrapperImpl.OnSetResizePolicy = new ViewWrapperImpl.OnSetResizePolicyDelegate(OnSetResizePolicy); viewWrapperImpl.GetNaturalSize = new ViewWrapperImpl.GetNaturalSizeDelegate(GetNaturalSize); @@ -60,14 +60,14 @@ namespace Dali viewWrapperImpl.OnPan = new ViewWrapperImpl.OnPanDelegate(OnPan); viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap); viewWrapperImpl.OnLongPress = new ViewWrapperImpl.OnLongPressDelegate(OnLongPress); - viewWrapperImpl.SignalConnected = new ViewWrapperImpl.SignalConnectedDelegate(SignalConnected); - viewWrapperImpl.SignalDisconnected = new ViewWrapperImpl.SignalDisconnectedDelegate(SignalDisconnected); // Make sure CustomView is initialized. OnInitialize(); - // Make sure the style of actors/visuals initialized above are applied by the style manager. - viewWrapperImpl.ApplyThemeStyle(); + // Set the StyleName the name of the View + // We have to do this because the StyleManager on Native side can't workout it out + // This will also ensure that the style of actors/visuals initialized above are applied by the style manager. + SetStyleName( this.GetType().Name ); } /** @@ -89,7 +89,7 @@ namespace Dali * @endcode * @param[in] type The gesture type(s) to enable. */ - public void EnableGestureDetection(Gesture.Type type) + public void EnableGestureDetection(Gesture.GestureType type) { viewWrapperImpl.EnableGestureDetection(type); } @@ -101,7 +101,7 @@ namespace Dali * @param[in] type The gesture type(s) to disable. * @see EnableGetureDetection */ - public void DisableGestureDetection(Gesture.Type type) + public void DisableGestureDetection(Gesture.GestureType type) { viewWrapperImpl.DisableGestureDetection(type); } @@ -171,12 +171,12 @@ namespace Dali /** * @brief Called by the KeyInputFocusManager to emit key event signals. * - * @param[in] keyEvent The key event. + * @param[in] key The key event. * @return True if the event was consumed. */ - public bool EmitKeyEventSignal(KeyEvent keyEvent) + public bool EmitKeyEventSignal(Key key) { - return viewWrapperImpl.EmitKeyEventSignal(keyEvent); + return viewWrapperImpl.EmitKeyEventSignal(key); } /** @@ -457,11 +457,11 @@ namespace Dali * * @brief Called after a touch-event is received by the owning actor. * - * @param[in] event The touch event + * @param[in] touch The touch event * @return True if the event should be consumed. * @note CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour). */ - public virtual bool OnTouchEvent(TouchEvent touchEvent) + public virtual bool OnTouch(Touch touch) { return false; // Do not consume } @@ -469,11 +469,11 @@ namespace Dali /** * @brief Called after a hover-event is received by the owning actor. * - * @param[in] event The hover event - * @return True if the event should be consumed. + * @param[in] hover The hover event + * @return True if the hover event should be consumed. * @note CustomViewBehaviour.REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour). */ - public virtual bool OnHoverEvent(HoverEvent hoverEvent) + public virtual bool OnHover(Hover hover) { return false; // Do not consume } @@ -481,10 +481,10 @@ namespace Dali /** * @brief Called after a key-event is received by the actor that has had its focus set. * - * @param[in] event the Key Event + * @param[in] key the Key Event * @return True if the event should be consumed. */ - public virtual bool OnKeyEvent(KeyEvent keyEvent) + public virtual bool OnKey(Key key) { return false; // Do not consume } @@ -492,11 +492,11 @@ namespace Dali /** * @brief Called after a wheel-event is received by the owning actor. * - * @param[in] event The wheel event + * @param[in] wheel The wheel event * @return True if the event should be consumed. * @note CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour). */ - public virtual bool OnWheelEvent(WheelEvent wheelEvent) + public virtual bool OnWheel(Wheel wheel) { return false; // Do not consume } @@ -657,10 +657,10 @@ namespace Dali * @brief This method should be overridden by deriving classes when they wish to respond the accessibility * touch event. * - * @param[in] touchEvent The touch event. + * @param[in] touch The touch event. * @return true if the touch event has been consumed by this control */ - public virtual bool OnAccessibilityTouch(TouchEvent touchEvent) + public virtual bool OnAccessibilityTouch(Touch touch) { return false; } @@ -805,14 +805,6 @@ namespace Dali { } - private void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) - { - } - - private void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback) - { - } - private void OnControlChildAdd(Actor child) { }