X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fdali-swig%2Fautomatic%2Fcsharp%2FView.cs;h=3fd6b3c72eb09c093db3d2ad9ad25c3c761ec4ab;hb=83bf759fdda8e36fde9c58a2fa1c3528aa914cad;hp=be4a86545f7089d6c920f8d17775673870c7bd87;hpb=a10edf35216e89cd2b6a2d1fa131a9dcb2bdfc7d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/plugins/dali-swig/automatic/csharp/View.cs b/plugins/dali-swig/automatic/csharp/View.cs index be4a865..3fd6b3c 100644 --- a/plugins/dali-swig/automatic/csharp/View.cs +++ b/plugins/dali-swig/automatic/csharp/View.cs @@ -26,10 +26,10 @@ namespace Dali { - using System; - using System.Runtime.InteropServices; +using System; +using System.Runtime.InteropServices; + - public class View : CustomActor { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -61,822 +61,274 @@ public class View : CustomActor { - /** - * @brief Event arguments that passed via KeyInputFocusGained signal - * - */ - public class KeyInputFocusGainedEventArgs : EventArgs - { - private View _view; - - /** - * @brief View - is the view that gets Key Input Focus - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } - - /** - * @brief Event arguments that passed via KeyInputFocusLost signal - * - */ - public class KeyInputFocusLostEventArgs : EventArgs - { - private View _view; - - /** - * @brief View - is the view that loses Key Input Focus - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } +/** + * @brief Event arguments that passed via KeyInputFocusGained signal + * + */ +public class KeyInputFocusGainedEventArgs : EventArgs +{ + private View _view; - /** - * @brief Event arguments that passed via KeyEvent signal + /** + * @brief View - is the view that gets Key Input Focus * */ - public class KeyEventArgs : EventArgs - { - private View _view; - private KeyEvent _keyEvent; - - /** - * @brief View - is the view that recieves the keyevent. - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - - /** - * @brief KeyEvent - is the keyevent sent to the View. - * - */ - public KeyEvent KeyEvent - { - get - { - return _keyEvent; - } - set - { - _keyEvent = value; - } - } - } - - /** - * @brief Event arguments that passed via OnRelayout signal - * - */ - public class OnRelayoutEventArgs : EventArgs - { - private View _view; - - /** - * @brief View - is the view that is being resized upon relayout - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } - - - /** - * @brief Event arguments that passed via Touch signal - * - */ - public class TouchEventArgs : EventArgs - { - private View _view; - private TouchData _touchData; - - /** - * @brief View - is the view that is being touched - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - - /** - * @brief TouchData - contains the information of touch points - * - */ - public TouchData TouchData - { - get - { - return _touchData; - } - set - { - _touchData = value; - } - } - } - - /** - * @brief Event arguments that passed via Hover signal - * - */ - public class HoverEventArgs : EventArgs - { - private View _view; - private HoverEvent _hoverEvent; - - /** - * @brief View - is the view that is being hovered - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - - /** - * @brief HoverEvent - contains touch points that represent the points - * that are currently being hovered or the points where a hover has stopped - * - */ - public HoverEvent HoverEvent - { - get - { - return _hoverEvent; - } - set - { - _hoverEvent = value; - } - } - } - - /** - * @brief Event arguments that passed via Wheel signal - * - */ - public class WheelEventArgs : EventArgs - { - private View _view; - private WheelEvent _wheelEvent; - - /** - * @brief View - is the view that is being wheeled - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - - /** - * @brief WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL - * - */ - public WheelEvent WheelEvent + public View View + { + get { - get - { - return _wheelEvent; - } - set - { - _wheelEvent = value; - } + return _view; } - } - - /** - * @brief Event arguments that passed via OnStage signal - * - */ - public class OnStageEventArgs : EventArgs - { - private View _view; - - /** - * @brief View - is the view that is being connected to the stage - * - */ - public View View + set { - get - { - return _view; - } - set - { - _view = value; - } + _view = value; } - } + } +} - /** - * @brief Event arguments that passed via OffStage signal - * - */ - public class OffStageEventArgs : EventArgs - { - private View _view; - - /** - * @brief View - is the view that is being disconnected from the stage - * - */ - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } +/** + * @brief Event arguments that passed via KeyInputFocusLost signal + * + */ +public class KeyInputFocusLostEventArgs : EventArgs +{ + private View _view; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control); - private DaliEventHandler _KeyInputFocusGainedEventHandler; - private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control); - private DaliEventHandler _KeyInputFocusLostEventHandler; - private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent); - private DaliEventHandlerWithReturnType _KeyEventHandler; - private KeyCallbackDelegate _KeyCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void OnRelayoutEventCallbackDelegate(IntPtr control); - private DaliEventHandler _viewOnRelayoutEventHandler; - private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touchData); - private DaliEventHandlerWithReturnType _viewTouchDataEventHandler; - private TouchCallbackDelegate _viewTouchDataCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool HoverEventCallbackDelegate(IntPtr view, IntPtr hoverEvent); - private DaliEventHandlerWithReturnType _viewHoverEventHandler; - private HoverEventCallbackDelegate _viewHoverEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool WheelEventCallbackDelegate(IntPtr view, IntPtr wheelEvent); - private DaliEventHandlerWithReturnType _viewWheelEventHandler; - private WheelEventCallbackDelegate _viewWheelEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void OnStageEventCallbackDelegate(IntPtr control); - private DaliEventHandler _viewOnStageEventHandler; - private OnStageEventCallbackDelegate _viewOnStageEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void OffStageEventCallbackDelegate(IntPtr control); - private DaliEventHandler _viewOffStageEventHandler; - private OffStageEventCallbackDelegate _viewOffStageEventCallbackDelegate; - - /** - * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler) - * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus. + /** + * @brief View - is the view that loses Key Input Focus + * */ - public event DaliEventHandler KeyInputFocusGained - { - add + public View View + { + get { - lock(this) - { - // Restricted to only one listener - if (_KeyInputFocusGainedEventHandler == null) - { - _KeyInputFocusGainedEventHandler += value; - Console.WriteLine("View Keyevent EVENT Locked...."); - _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained); - this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate); - } - } + return _view; } - - remove - { - lock(this) - { - if (_KeyInputFocusGainedEventHandler != null) - { - this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate); - } - - _KeyInputFocusGainedEventHandler -= value; - } - } - } - - private void OnKeyInputFocusGained(IntPtr view) - { - KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs(); - Console.WriteLine("View Keyevent ...."); - // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data - e.View = Dali.View.GetViewFromPtr(view); - - if (_KeyInputFocusGainedEventHandler != null) + set { - //here we send all data to user event handlers - _KeyInputFocusGainedEventHandler(this, e); + _view = value; } + } +} - } - - /** - * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler) - * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus. +/** + * @brief Event arguments that passed via KeyEvent signal + * + */ +public class KeyEventArgs : EventArgs +{ + private View _view; + private KeyEvent _keyEvent; + + /** + * @brief View - is the view that recieves the keyevent. + * */ - public event DaliEventHandler KeyInputFocusLost - { - add + public View View + { + get { - lock(this) - { - // Restricted to only one listener - if (_KeyInputFocusLostEventHandler == null) - { - _KeyInputFocusLostEventHandler += value; - - _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost); - this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_KeyInputFocusLostEventHandler != null) - { - this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate); - } - - _KeyInputFocusLostEventHandler -= value; - } + return _view; } - } - - private void OnKeyInputFocusLost(IntPtr view) - { - KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs(); - - // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data - e.View = Dali.View.GetViewFromPtr(view); - - if (_KeyInputFocusLostEventHandler != null) + set { - //here we send all data to user event handlers - _KeyInputFocusLostEventHandler(this, e); + _view = value; } - } + } - /** - * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyEventEventHandler-DaliEventHandlerWithReturnType) - * provided by the user. KeyPressed signal is emitted when key event is received. + /** + * @brief KeyEvent - is the keyevent sent to the View. + * */ - public event DaliEventHandlerWithReturnType KeyPressed - { - add - { - lock(this) - { - // Restricted to only one listener - if (_KeyEventHandler == null) - { - _KeyEventHandler += value; - - _KeyCallbackDelegate = new KeyCallbackDelegate(OnKeyEvent); - this.KeyEventSignal().Connect(_KeyCallbackDelegate); - } - } - } - - remove - { - lock(this) - { - if (_KeyEventHandler != null) - { - this.KeyEventSignal().Disconnect(_KeyCallbackDelegate); - } - - _KeyEventHandler -= value; - } - } - } - - private bool OnKeyEvent(IntPtr view, IntPtr keyEvent) - { - KeyEventArgs e = new KeyEventArgs(); - - // Populate all members of "e" (KeyEventArgs) with real data - e.View = Dali.View.GetViewFromPtr(view); - e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr(keyEvent); - - if (_KeyEventHandler != null) + public KeyEvent KeyEvent + { + get { - //here we send all data to user event handlers - return _KeyEventHandler(this, e); + return _keyEvent; } - return false; - - } - - /** - * @brief Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler - * (in the type of OnRelayoutEventHandler) provided by the user. - * OnRelayout signal is emitted after the size has been set on the view during relayout. - */ - public event DaliEventHandler OnRelayoutEvent - { - add + set { - lock(this) - { - // Restricted to only one listener - if (_viewOnRelayoutEventHandler == null) - { - _viewOnRelayoutEventHandler += value; - Console.WriteLine("View OnRelayoutEventArgs Locked...."); - _viewOnRelayoutEventCallbackDelegate = new OnRelayoutEventCallbackDelegate(OnRelayout); - this.OnRelayoutSignal().Connect(_viewOnRelayoutEventCallbackDelegate); - } - } + _keyEvent = value; } + } +} - remove - { + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control); + private DaliEventHandler _KeyInputFocusGainedEventHandler; + private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control); + private DaliEventHandler _KeyInputFocusLostEventHandler; + private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent); + private DaliEventHandlerWithReturnType _KeyEventHandler; + private KeyCallbackDelegate _KeyCallbackDelegate; + + /** + * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler + * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler) + * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus. + */ + public event DaliEventHandler KeyInputFocusGained + { + add + { lock(this) { - if (_viewOnRelayoutEventHandler != null) - { - this.OnRelayoutSignal().Disconnect(_viewOnRelayoutEventCallbackDelegate); - } - - _viewOnRelayoutEventHandler -= value; - } - } - } - - // Callback for View OnRelayout signal - private void OnRelayout(IntPtr data) - { - OnRelayoutEventArgs e = new OnRelayoutEventArgs(); - Console.WriteLine("View OnRelayoutEventArgs...."); - // Populate all members of "e" (OnRelayoutEventArgs) with real data - e.View = View.GetViewFromPtr(data); - - if (_viewOnRelayoutEventHandler != null) - { - //here we send all data to user event handlers - _viewOnRelayoutEventHandler(this, e); - } - } + // Restricted to only one listener + if (_KeyInputFocusGainedEventHandler == null) + { + _KeyInputFocusGainedEventHandler += value; - /** - * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler - * (in the type of TouchEventHandler-DaliEventHandlerWithReturnType) - * provided by the user. Touched signal is emitted when touch input is received. - */ - public event DaliEventHandlerWithReturnType Touched - { - add - { - lock(this) - { - // Restricted to only one listener - if (_viewTouchDataEventHandler == null) - { - _viewTouchDataEventHandler += value; - Console.WriteLine("View Touch EVENT LOCKED...."); - _viewTouchDataCallbackDelegate = new TouchCallbackDelegate(OnTouch); - this.TouchSignal().Connect(_viewTouchDataCallbackDelegate); - } + _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained); + this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate); + } } - } + } - remove - { + remove + { lock(this) { - if (_viewTouchDataEventHandler != null) - { - this.TouchSignal().Disconnect(_viewTouchDataCallbackDelegate); - } + if (_KeyInputFocusGainedEventHandler != null) + { + this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate); + } - _viewTouchDataEventHandler -= value; + _KeyInputFocusGainedEventHandler -= value; } - } - } - - // Callback for View TouchSignal - private bool OnTouch(IntPtr view, IntPtr touchData) - { - TouchEventArgs e = new TouchEventArgs(); - Console.WriteLine("View Touch EVENT...."); - // Populate all members of "e" (TouchEventArgs) with real data - e.View = View.GetViewFromPtr(view); - e.TouchData = Dali.TouchData.GetTouchDataFromPtr(touchData); + } + } - if (_viewTouchDataEventHandler != null) - { - //here we send all data to user event handlers - return _viewTouchDataEventHandler(this, e); - } + private void OnKeyInputFocusGained(IntPtr view) + { + KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs(); - return false; - } + // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data + e.View = Dali.View.GetViewFromPtr(view); - /** - * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler - * (in the type of HoverEventHandler-DaliEventHandlerWithReturnType) - * provided by the user. Hovered signal is emitted when hover input is received. - */ - public event DaliEventHandlerWithReturnType Hovered - { - add - { - lock(this) - { - // Restricted to only one listener - if (_viewHoverEventHandler == null) - { - _viewHoverEventHandler += value; + if (_KeyInputFocusGainedEventHandler != null) + { + //here we send all data to user event handlers + _KeyInputFocusGainedEventHandler(this, e); + } - _viewHoverEventCallbackDelegate = new HoverEventCallbackDelegate(OnHoverEvent); - this.HoveredSignal().Connect(_viewHoverEventCallbackDelegate); - } - } - } + } - remove - { + /** + * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler + * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler) + * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus. + */ + public event DaliEventHandler KeyInputFocusLost + { + add + { lock(this) { - if (_viewHoverEventHandler != null) - { - this.HoveredSignal().Disconnect(_viewHoverEventCallbackDelegate); - } - - _viewHoverEventHandler -= value; - } - } - } - - // Callback for View Hover signal - private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent) - { - HoverEventArgs e = new HoverEventArgs(); - - // Populate all members of "e" (HoverEventArgs) with real data - e.View = View.GetViewFromPtr(view); - e.HoverEvent = Dali.HoverEvent.GetHoverEventFromPtr(hoverEvent); - - if (_viewHoverEventHandler != null) - { - //here we send all data to user event handlers - return _viewHoverEventHandler(this, e); - } + // Restricted to only one listener + if (_KeyInputFocusLostEventHandler == null) + { + _KeyInputFocusLostEventHandler += value; - return false; - } - - /** - * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler - * (in the type of WheelEventHandler-DaliEventHandlerWithReturnType) - * provided by the user. WheelMoved signal is emitted when wheel event is received. - */ - public event DaliEventHandlerWithReturnType WheelMoved - { - add - { - lock(this) - { - // Restricted to only one listener - if (_viewWheelEventHandler == null) - { - _viewWheelEventHandler += value; - Console.WriteLine("View Wheel EVENT LOCKED...."); - _viewWheelEventCallbackDelegate = new WheelEventCallbackDelegate(OnWheelEvent); - this.WheelEventSignal().Connect(_viewWheelEventCallbackDelegate); - } + _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost); + this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate); + } } - } + } - remove - { + remove + { lock(this) { - if (_viewWheelEventHandler != null) - { - this.WheelEventSignal().Disconnect(_viewWheelEventCallbackDelegate); - } + if (_KeyInputFocusLostEventHandler != null) + { + this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate); + } - _viewWheelEventHandler -= value; + _KeyInputFocusLostEventHandler -= value; } - } - } - - // Callback for View Wheel signal - private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent) - { - WheelEventArgs e = new WheelEventArgs(); - Console.WriteLine("View Wheel EVENT ...."); - // Populate all members of "e" (WheelEventArgs) with real data - e.View = View.GetViewFromPtr(view); - e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr(wheelEvent); - - if (_viewWheelEventHandler != null) - { - //here we send all data to user event handlers - return _viewWheelEventHandler(this, e); - } + } + } - return false; - } + private void OnKeyInputFocusLost(IntPtr view) + { + KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs(); - /** - * @brief Event for OnStage signal which can be used to subscribe/unsubscribe the event handler - * (in the type of OnStageEventHandler) provided by the user. - * OnStage signal is emitted after the view has been connected to the stage. - */ - public event DaliEventHandler OnStageEvent - { - add - { - lock(this) - { - // Restricted to only one listener - if (_viewOnStageEventHandler == null) - { - _viewOnStageEventHandler += value; + // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data + e.View = Dali.View.GetViewFromPtr(view); - _viewOnStageEventCallbackDelegate = new OnStageEventCallbackDelegate(OnStage); - this.OnStageSignal().Connect(_viewOnStageEventCallbackDelegate); - } - } - } + if (_KeyInputFocusLostEventHandler != null) + { + //here we send all data to user event handlers + _KeyInputFocusLostEventHandler(this, e); + } + } - remove - { + /** + * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler + * (in the type of KeyEventEventHandler-DaliEventHandlerWithReturnType) + * provided by the user. KeyPressed signal is emitted when key event is received. + */ + public event DaliEventHandlerWithReturnType KeyPressed + { + add + { lock(this) { - if (_viewOnStageEventHandler != null) - { - this.OnStageSignal().Disconnect(_viewOnStageEventCallbackDelegate); - } + // Restricted to only one listener + if (_KeyEventHandler == null) + { + _KeyEventHandler += value; - _viewOnStageEventHandler -= value; + _KeyCallbackDelegate = new KeyCallbackDelegate(OnKeyEvent); + this.KeyEventSignal().Connect(_KeyCallbackDelegate); + } } - } - } - - // Callback for View OnStage signal - private void OnStage(IntPtr data) - { - OnStageEventArgs e = new OnStageEventArgs(); + } - // Populate all members of "e" (OnStageEventArgs) with real data - e.View = View.GetViewFromPtr(data); - - if (_viewOnStageEventHandler != null) - { - //here we send all data to user event handlers - _viewOnStageEventHandler(this, e); - } - } - - /** - * @brief Event for OffStage signal which can be used to subscribe/unsubscribe the event handler - * (in the type of OffStageEventHandler) provided by the user. - * OffStage signal is emitted after the view has been disconnected from the stage. - */ - public event DaliEventHandler OffStageEvent - { - add - { + remove + { lock(this) { - // Restricted to only one listener - if (_viewOffStageEventHandler == null) - { - _viewOffStageEventHandler += value; + if (_KeyEventHandler != null) + { + this.KeyEventSignal().Disconnect(_KeyCallbackDelegate); + } - _viewOffStageEventCallbackDelegate = new OffStageEventCallbackDelegate(OffStage); - this.OnStageSignal().Connect(_viewOffStageEventCallbackDelegate); - } + _KeyEventHandler -= value; } - } + } + } - remove - { - lock(this) - { - if (_viewOffStageEventHandler != null) - { - this.OnStageSignal().Disconnect(_viewOffStageEventCallbackDelegate); - } + private bool OnKeyEvent(IntPtr view, IntPtr keyEvent) + { + KeyEventArgs e = new KeyEventArgs(); - _viewOffStageEventHandler -= value; - } - } - } + // Populate all members of "e" (KeyEventArgs) with real data + e.View = Dali.View.GetViewFromPtr(view); + e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr(keyEvent); - // Callback for View OffStage signal - private void OffStage(IntPtr data) - { - OffStageEventArgs e = new OffStageEventArgs(); + if (_KeyEventHandler != null) + { + //here we send all data to user event handlers + return _KeyEventHandler(this, e, true); + } + return false; - // Populate all members of "e" (OffStageEventArgs) with real data - e.View = View.GetViewFromPtr(data); + } - if (_viewOffStageEventHandler != null) - { - //here we send all data to user event handlers - _viewOffStageEventHandler(this, e); - } - } + public static View GetViewFromPtr(global::System.IntPtr cPtr) { + View ret = new View(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public static View GetViewFromPtr(global::System.IntPtr cPtr) { - View ret = new View(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; @@ -1082,178 +534,6 @@ public class View : CustomActor { CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX+1000 } - public string StyleName - { - get - { - string temp; - GetProperty( View.Property.STYLE_NAME).Get( out temp ); - return temp; - } - set - { - SetProperty( View.Property.STYLE_NAME, new Dali.Property.Value( value ) ); - } - } - public Vector4 BackgroundColor - { - get - { - Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); - GetProperty( View.Property.BACKGROUND_COLOR).Get( temp ); - return temp; - } - set - { - SetProperty( View.Property.BACKGROUND_COLOR, new Dali.Property.Value( value ) ); - } - } - public Dali.Property.Map BackgroundImage - { - get - { - Dali.Property.Map temp = new Dali.Property.Map(); - GetProperty( View.Property.BACKGROUND_IMAGE).Get( temp ); - return temp; - } - set - { - SetProperty( View.Property.BACKGROUND_IMAGE, new Dali.Property.Value( value ) ); - } - } - public bool KeyInputFocus - { - get - { - bool temp = false; - GetProperty( View.Property.KEY_INPUT_FOCUS).Get( ref temp ); - return temp; - } - set - { - SetProperty( View.Property.KEY_INPUT_FOCUS, new Dali.Property.Value( value ) ); - } - } - public Dali.Property.Map Background - { - get - { - Dali.Property.Map temp = new Dali.Property.Map(); - GetProperty( View.Property.BACKGROUND).Get( temp ); - return temp; - } - set - { - SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) ); - } - } - - public Vector2 CellIndex - { - get - { - Vector2 temp = new Vector2(0.0f,0.0f); - GetProperty( TableView.ChildProperty.CELL_INDEX).Get( temp ); - return temp; - } - set - { - SetProperty( TableView.ChildProperty.CELL_INDEX, new Dali.Property.Value( value ) ); - } - } - public float RowSpan - { - get - { - float temp = 0.0f; - GetProperty( TableView.ChildProperty.ROW_SPAN).Get( ref temp ); - return temp; - } - set - { - SetProperty( TableView.ChildProperty.ROW_SPAN, new Dali.Property.Value( value ) ); - } - } - public float ColumnSpan - { - get - { - float temp = 0.0f; - GetProperty( TableView.ChildProperty.COLUMN_SPAN).Get( ref temp ); - return temp; - } - set - { - SetProperty( TableView.ChildProperty.COLUMN_SPAN, new Dali.Property.Value( value ) ); - } - } - public string CellHorizontalAlignment - { - get - { - string temp; - GetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get( out temp ); - return temp; - } - set - { - SetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Dali.Property.Value( value ) ); - } - } - public string CellVerticalAlignment - { - get - { - string temp; - GetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get( out temp ); - return temp; - } - set - { - SetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Dali.Property.Value( value ) ); - } - } - - public float Flex - { - get - { - float temp = 0.0f; - GetProperty( FlexContainer.ChildProperty.FLEX).Get( ref temp ); - return temp; - } - set - { - SetProperty( FlexContainer.ChildProperty.FLEX, new Dali.Property.Value( value ) ); - } - } - public int AlignSelf - { - get - { - int temp = 0; - GetProperty( FlexContainer.ChildProperty.ALIGN_SELF).Get( ref temp ); - return temp; - } - set - { - SetProperty( FlexContainer.ChildProperty.ALIGN_SELF, new Dali.Property.Value( value ) ); - } - } - public Vector4 FlexMargin - { - get - { - Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); - GetProperty( FlexContainer.ChildProperty.FLEX_MARGIN).Get( temp ); - return temp; - } - set - { - SetProperty( FlexContainer.ChildProperty.FLEX_MARGIN, new Dali.Property.Value( value ) ); - } - } - } }