2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.Runtime.InteropServices;
21 namespace Tizen.NUI.BaseComponents
24 /// View is the base class for all views.
26 /// <since_tizen> 3 </since_tizen>
27 public partial class View
29 private EventHandler _offWindowEventHandler;
30 private OffWindowEventCallbackType _offWindowEventCallback;
31 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
32 private WheelEventCallbackType _wheelEventCallback;
33 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
34 private KeyCallbackType _keyCallback;
35 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
36 private TouchDataCallbackType _touchDataCallback;
37 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
38 private HoverEventCallbackType _hoverEventCallback;
39 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
40 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
41 private EventHandler _keyInputFocusGainedEventHandler;
42 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
43 private EventHandler _keyInputFocusLostEventHandler;
44 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
45 private EventHandler _onRelayoutEventHandler;
46 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
47 private EventHandler _onWindowEventHandler;
48 private OnWindowEventCallbackType _onWindowEventCallback;
49 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
50 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
51 // Resource Ready Signal
52 private EventHandler _resourcesLoadedEventHandler;
53 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
54 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
55 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
57 private OnWindowEventCallbackType _onWindowSendEventCallback;
59 private void SendViewAddedEventToWindow(IntPtr data)
61 Window.Instance?.SendViewAdded(this);
64 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
65 private delegate void OffWindowEventCallbackType(IntPtr control);
66 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
67 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
68 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
69 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
70 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
71 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
72 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
73 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
74 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
75 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
76 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
77 private delegate void ResourcesLoadedCallbackType(IntPtr control);
78 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
79 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
80 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
81 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
82 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
83 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
84 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
85 private delegate void OnRelayoutEventCallbackType(IntPtr control);
86 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
87 private delegate void OnWindowEventCallbackType(IntPtr control);
88 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
89 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
92 /// Event when a child is removed.
94 /// <since_tizen> 5 </since_tizen>
95 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
97 /// Event when a child is added.
99 /// <since_tizen> 5 </since_tizen>
100 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
103 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
104 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
106 /// <since_tizen> 3 </since_tizen>
107 public event EventHandler FocusGained
111 if (_keyInputFocusGainedEventHandler == null)
113 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
114 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
117 _keyInputFocusGainedEventHandler += value;
122 _keyInputFocusGainedEventHandler -= value;
124 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
126 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
132 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
133 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
135 /// <since_tizen> 3 </since_tizen>
136 public event EventHandler FocusLost
140 if (_keyInputFocusLostEventHandler == null)
142 _keyInputFocusLostCallback = OnKeyInputFocusLost;
143 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
146 _keyInputFocusLostEventHandler += value;
151 _keyInputFocusLostEventHandler -= value;
153 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
155 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
161 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
162 /// The KeyPressed signal is emitted when the key event is received.<br />
164 /// <since_tizen> 3 </since_tizen>
165 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
169 if (_keyEventHandler == null)
171 _keyCallback = OnKeyEvent;
172 this.KeyEventSignal().Connect(_keyCallback);
175 _keyEventHandler += value;
180 _keyEventHandler -= value;
182 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
184 this.KeyEventSignal().Disconnect(_keyCallback);
190 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
191 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
193 /// <since_tizen> 3 </since_tizen>
194 public event EventHandler Relayout
198 if (_onRelayoutEventHandler == null)
200 _onRelayoutEventCallback = OnRelayout;
201 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
204 _onRelayoutEventHandler += value;
209 _onRelayoutEventHandler -= value;
211 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
213 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
220 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
221 /// The touched signal is emitted when the touch input is received.<br />
223 /// <since_tizen> 3 </since_tizen>
224 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
228 if (_touchDataEventHandler == null)
230 _touchDataCallback = OnTouch;
231 this.TouchSignal().Connect(_touchDataCallback);
234 _touchDataEventHandler += value;
239 _touchDataEventHandler -= value;
241 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
243 this.TouchSignal().Disconnect(_touchDataCallback);
250 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
251 /// The hovered signal is emitted when the hover input is received.<br />
253 /// <since_tizen> 3 </since_tizen>
254 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
258 if (_hoverEventHandler == null)
260 _hoverEventCallback = OnHoverEvent;
261 this.HoveredSignal().Connect(_hoverEventCallback);
264 _hoverEventHandler += value;
269 _hoverEventHandler -= value;
271 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
273 this.HoveredSignal().Disconnect(_hoverEventCallback);
280 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
281 /// The WheelMoved signal is emitted when the wheel event is received.<br />
283 /// <since_tizen> 3 </since_tizen>
284 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
288 if (_wheelEventHandler == null)
290 _wheelEventCallback = OnWheelEvent;
291 this.WheelEventSignal().Connect(_wheelEventCallback);
294 _wheelEventHandler += value;
299 _wheelEventHandler -= value;
301 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
303 this.WheelEventSignal().Disconnect(_wheelEventCallback);
310 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
311 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
313 /// <since_tizen> 3 </since_tizen>
314 public event EventHandler AddedToWindow
318 if (_onWindowEventHandler == null)
320 _onWindowEventCallback = OnWindow;
321 this.OnWindowSignal().Connect(_onWindowEventCallback);
324 _onWindowEventHandler += value;
329 _onWindowEventHandler -= value;
331 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
333 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
339 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
340 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
342 /// <since_tizen> 3 </since_tizen>
343 public event EventHandler RemovedFromWindow
347 if (_offWindowEventHandler == null)
349 _offWindowEventCallback = OffWindow;
350 this.OffWindowSignal().Connect(_offWindowEventCallback);
353 _offWindowEventHandler += value;
358 _offWindowEventHandler -= value;
360 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
362 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
368 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
369 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
371 /// <since_tizen> 3 </since_tizen>
372 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
376 if (_visibilityChangedEventHandler == null)
378 _visibilityChangedEventCallback = OnVisibilityChanged;
379 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
382 _visibilityChangedEventHandler += value;
387 _visibilityChangedEventHandler -= value;
389 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
391 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
397 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
398 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
400 /// <since_tizen> 4 </since_tizen>
401 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
405 if (_layoutDirectionChangedEventHandler == null)
407 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
408 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
411 _layoutDirectionChangedEventHandler += value;
416 _layoutDirectionChangedEventHandler -= value;
418 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
420 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
426 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
427 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
429 /// <since_tizen> 3 </since_tizen>
430 public event EventHandler ResourcesLoaded
434 if (_resourcesLoadedEventHandler == null)
436 _ResourcesLoadedCallback = OnResourcesLoaded;
437 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
440 _resourcesLoadedEventHandler += value;
445 _resourcesLoadedEventHandler -= value;
447 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
449 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
454 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
458 if (_backgroundResourceLoadedEventHandler == null)
460 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
461 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
464 _backgroundResourceLoadedEventHandler += value;
468 _backgroundResourceLoadedEventHandler -= value;
470 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
472 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
477 internal TouchDataSignal TouchSignal()
479 TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
480 if (NDalicPINVOKE.SWIGPendingException.Pending)
481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
485 internal HoverSignal HoveredSignal()
487 HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
488 if (NDalicPINVOKE.SWIGPendingException.Pending)
489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
493 internal WheelSignal WheelEventSignal()
495 WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
496 if (NDalicPINVOKE.SWIGPendingException.Pending)
497 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501 internal ViewSignal OnWindowSignal()
503 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
504 if (NDalicPINVOKE.SWIGPendingException.Pending)
505 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
509 internal ViewSignal OffWindowSignal()
511 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
512 if (NDalicPINVOKE.SWIGPendingException.Pending)
513 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
517 internal ViewSignal OnRelayoutSignal()
519 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
520 if (NDalicPINVOKE.SWIGPendingException.Pending)
521 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
525 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
527 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
528 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
532 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
534 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
535 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539 internal ViewSignal ResourcesLoadedSignal()
541 ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
542 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
546 internal ControlKeySignal KeyEventSignal()
548 ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
549 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
553 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
555 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
556 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
560 internal KeyInputFocusSignal KeyInputFocusLostSignal()
562 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
563 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
567 private void OnSize2DChanged(int width, int height)
569 Size2D = new Size2D(width, height);
572 private void OnMinimumSizeChanged(int width, int height)
574 MinimumSize = new Size2D(width, height);
577 private void OnMaximumSizeChanged(int width, int height)
579 MaximumSize = new Size2D(width, height);
582 private void OnPosition2DChanged(int x, int y)
584 Position2D = new Position2D(x, y);
587 private void OnSizeChanged(float width, float height, float depth)
589 Size = new Size(width, height, depth);
592 private void OnPositionChanged(float x, float y, float z)
594 Position = new Position(x, y, z);
597 private void OnParentOriginChanged(float x, float y, float z)
599 ParentOrigin = new Position(x, y, z);
602 private void OnPivotPointChanged(float x, float y, float z)
604 PivotPoint = new Position(x, y, z);
607 private void OnImageShadowChanged(TransformablePropertyMap instance)
609 ImageShadow = (ImageShadow)instance;
612 private void OnBoxShadowChanged(TransformablePropertyMap instance)
614 BoxShadow = (Shadow)instance;
617 private void OnKeyInputFocusGained(IntPtr view)
619 if (_keyInputFocusGainedEventHandler != null)
621 _keyInputFocusGainedEventHandler(this, null);
625 private void OnKeyInputFocusLost(IntPtr view)
627 if (_keyInputFocusLostEventHandler != null)
629 _keyInputFocusLostEventHandler(this, null);
633 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
635 if (keyEvent == global::System.IntPtr.Zero)
637 NUILog.Error("keyEvent should not be null!");
641 KeyEventArgs e = new KeyEventArgs();
645 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
647 if (_keyEventHandler != null)
649 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
651 // Oring the result of each callback.
652 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
654 result |= del(this, e);
661 // Callback for View OnRelayout signal
662 private void OnRelayout(IntPtr data)
664 if (_onRelayoutEventHandler != null)
666 _onRelayoutEventHandler(this, null);
670 // Callback for View TouchSignal
671 private bool OnTouch(IntPtr view, IntPtr touchData)
673 if (touchData == global::System.IntPtr.Zero)
675 NUILog.Error("touchData should not be null!");
679 TouchEventArgs e = new TouchEventArgs();
681 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
683 if (_touchDataEventHandler != null)
685 return _touchDataEventHandler(this, e);
690 // Callback for View Hover signal
691 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
693 if (hoverEvent == global::System.IntPtr.Zero)
695 NUILog.Error("hoverEvent should not be null!");
699 HoverEventArgs e = new HoverEventArgs();
701 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
703 if (_hoverEventHandler != null)
705 return _hoverEventHandler(this, e);
710 // Callback for View Wheel signal
711 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
713 if (wheelEvent == global::System.IntPtr.Zero)
715 NUILog.Error("wheelEvent should not be null!");
719 WheelEventArgs e = new WheelEventArgs();
721 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
723 if (_wheelEventHandler != null)
725 return _wheelEventHandler(this, e);
730 // Callback for View OnWindow signal
731 private void OnWindow(IntPtr data)
733 if (_onWindowEventHandler != null)
735 _onWindowEventHandler(this, null);
739 // Callback for View OffWindow signal
740 private void OffWindow(IntPtr data)
742 if (_offWindowEventHandler != null)
744 _offWindowEventHandler(this, null);
748 // Callback for View visibility change signal
749 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
751 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
754 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
756 e.Visibility = visibility;
759 if (_visibilityChangedEventHandler != null)
761 _visibilityChangedEventHandler(this, e);
765 // Callback for View layout direction change signal
766 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
768 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
771 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
775 if (_layoutDirectionChangedEventHandler != null)
777 _layoutDirectionChangedEventHandler(this, e);
781 private void OnResourcesLoaded(IntPtr view)
783 if (_resourcesLoadedEventHandler != null)
785 _resourcesLoadedEventHandler(this, null);
789 private void OnBackgroundResourceLoaded(IntPtr view)
791 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
792 e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
794 if (_backgroundResourceLoadedEventHandler != null)
796 _backgroundResourceLoadedEventHandler(this, e);
801 /// Event argument passed through the ChildAdded event.
803 /// <since_tizen> 5 </since_tizen>
804 public class ChildAddedEventArgs : EventArgs
807 /// Added child view at moment.
809 /// <since_tizen> 5 </since_tizen>
810 public View Added { get; set; }
814 /// Event argument passed through the ChildRemoved event.
816 /// <since_tizen> 5 </since_tizen>
817 public class ChildRemovedEventArgs : EventArgs
820 /// Removed child view at moment.
822 /// <since_tizen> 5 </since_tizen>
823 public View Removed { get; set; }
827 /// Event arguments that passed via the KeyEvent signal.
829 /// <since_tizen> 3 </since_tizen>
830 public class KeyEventArgs : EventArgs
835 /// Key - is the key sent to the view.
837 /// <since_tizen> 3 </since_tizen>
852 /// Event arguments that passed via the touch signal.
854 /// <since_tizen> 3 </since_tizen>
855 public class TouchEventArgs : EventArgs
857 private Touch _touch;
860 /// Touch - contains the information of touch points.
862 /// <since_tizen> 3 </since_tizen>
877 /// Event arguments that passed via the hover signal.
879 /// <since_tizen> 3 </since_tizen>
880 public class HoverEventArgs : EventArgs
882 private Hover _hover;
885 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
887 /// <since_tizen> 3 </since_tizen>
902 /// Event arguments that passed via the wheel signal.
904 /// <since_tizen> 3 </since_tizen>
905 public class WheelEventArgs : EventArgs
907 private Wheel _wheel;
910 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
912 /// <since_tizen> 3 </since_tizen>
927 /// Event arguments of visibility changed.
929 /// <since_tizen> 3 </since_tizen>
930 public class VisibilityChangedEventArgs : EventArgs
933 private bool _visibility;
934 private VisibilityChangeType _type;
937 /// The view, or child of view, whose visibility has changed.
939 /// <since_tizen> 3 </since_tizen>
953 /// Whether the view is now visible or not.
955 /// <since_tizen> 3 </since_tizen>
956 public bool Visibility
969 /// Whether the view's visible property has changed or a parent's.
971 /// <since_tizen> 3 </since_tizen>
972 public VisibilityChangeType Type
986 /// Event arguments of layout direction changed.
988 /// <since_tizen> 4 </since_tizen>
989 public class LayoutDirectionChangedEventArgs : EventArgs
992 private ViewLayoutDirectionType _type;
995 /// The view, or child of view, whose layout direction has changed.
997 /// <since_tizen> 4 </since_tizen>
1011 /// Whether the view's layout direction property has changed or a parent's.
1013 /// <since_tizen> 4 </since_tizen>
1014 public ViewLayoutDirectionType Type
1027 internal class BackgroundResourceLoadedEventArgs : EventArgs
1029 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
1030 public ResourceLoadingStatusType Status