[3.0] Dali C# GBS build enabled
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / automatic / csharp / View.cs
1 /** Copyright (c) 2016 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29     using System;
30     using System.Runtime.InteropServices;
31
32     
33 public class View : CustomActor {
34   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36   internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn) {
37     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38   }
39
40   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj) {
41     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42   }
43
44   ~View() {
45     Dispose();
46   }
47
48   public override void Dispose() {
49     lock(this) {
50       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
51         if (swigCMemOwn) {
52           swigCMemOwn = false;
53           NDalicPINVOKE.delete_View(swigCPtr);
54         }
55         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56       }
57       global::System.GC.SuppressFinalize(this);
58       base.Dispose();
59     }
60   }
61
62
63
64     /**
65      * @brief Event arguments that passed via KeyInputFocusGained signal
66      *
67      */
68     public class KeyInputFocusGainedEventArgs : EventArgs
69     {
70       private View _view;
71
72       /**
73        * @brief View - is the view that gets Key Input Focus
74        *
75        */
76       public View View
77       {
78         get
79         {
80           return _view;
81         }
82         set
83         {
84           _view = value;
85         }
86       }
87     }
88
89     /**
90      * @brief Event arguments that passed via KeyInputFocusLost signal
91      *
92      */
93     public class KeyInputFocusLostEventArgs : EventArgs
94     {
95       private View _view;
96
97       /**
98        * @brief View - is the view that loses Key Input Focus
99        *
100        */
101       public View View
102       {
103         get
104         {
105           return _view;
106         }
107         set
108         {
109           _view = value;
110         }
111       }
112     }
113
114     /**
115      * @brief Event arguments that passed via KeyEvent signal
116      *
117      */
118     public class KeyEventArgs : EventArgs
119     {
120       private View _view;
121       private KeyEvent _keyEvent;
122
123       /**
124        * @brief View - is the view that recieves the keyevent.
125        *
126        */
127       public View View
128       {
129         get
130         {
131           return _view;
132         }
133         set
134         {
135           _view = value;
136         }
137       }
138
139       /**
140        * @brief KeyEvent - is the keyevent sent to the View.
141        *
142        */
143       public KeyEvent KeyEvent
144       {
145         get
146         {
147           return _keyEvent;
148         }
149         set
150         {
151           _keyEvent = value;
152         }
153       }
154     }
155
156     /**
157       * @brief Event arguments that passed via OnRelayout signal
158       *
159       */
160     public class OnRelayoutEventArgs : EventArgs
161     {
162       private View _view;
163
164       /**
165         * @brief View - is the view that is being resized upon relayout
166         *
167         */
168       public View View
169       {
170         get
171         {
172           return _view;
173         }
174         set
175         {
176           _view = value;
177         }
178       }
179     }
180
181
182     /**
183       * @brief Event arguments that passed via Touch signal
184       *
185       */
186     public class TouchEventArgs : EventArgs
187     {
188        private View _view;
189        private TouchData _touchData;
190
191       /**
192         * @brief View - is the view that is being touched
193         *
194         */
195       public View View
196       {
197         get
198         {
199           return _view;
200         }
201         set
202         {
203           _view = value;
204         }
205       }
206
207       /**
208         * @brief TouchData - contains the information of touch points
209         *
210         */
211       public TouchData TouchData
212       {
213         get
214         {
215           return _touchData;
216         }
217         set
218         {
219           _touchData = value;
220         }
221       }
222     }
223
224     /**
225       * @brief Event arguments that passed via Hover signal
226       *
227       */
228     public class HoverEventArgs : EventArgs
229     {
230     private View _view;
231     private HoverEvent _hoverEvent;
232
233       /**
234         * @brief View - is the view that is being hovered
235         *
236         */
237       public View View
238       {
239         get
240         {
241           return _view;
242         }
243         set
244         {
245           _view = value;
246         }
247       }
248
249       /**
250         * @brief HoverEvent - contains touch points that represent the points
251         * that are currently being hovered or the points where a hover has stopped
252         *
253         */
254       public HoverEvent HoverEvent
255       {
256         get
257         {
258           return _hoverEvent;
259         }
260         set
261         {
262           _hoverEvent = value;
263         }
264       }
265     }
266
267     /**
268       * @brief Event arguments that passed via Wheel signal
269       *
270       */
271     public class WheelEventArgs : EventArgs
272     {
273     private View _view;
274     private WheelEvent _wheelEvent;
275
276       /**
277         * @brief View - is the view that is being wheeled
278         *
279         */
280       public View View
281       {
282         get
283         {
284           return _view;
285         }
286         set
287         {
288           _view = value;
289         }
290       }
291
292       /**
293         * @brief WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
294         *
295         */
296       public WheelEvent WheelEvent
297       {
298         get
299         {
300           return _wheelEvent;
301         }
302         set
303         {
304           _wheelEvent = value;
305         }
306       }
307     }
308
309     /**
310       * @brief Event arguments that passed via OnStage signal
311       *
312       */
313     public class OnStageEventArgs : EventArgs
314     {
315     private View _view;
316
317       /**
318         * @brief View - is the view that is being connected to the stage
319         *
320         */
321       public View View
322       {
323         get
324         {
325           return _view;
326         }
327         set
328         {
329           _view = value;
330         }
331       }
332     }
333
334     /**
335       * @brief Event arguments that passed via OffStage signal
336       *
337       */
338     public class OffStageEventArgs : EventArgs
339     {
340     private View _view;
341
342       /**
343         * @brief View - is the view that is being disconnected from the stage
344         *
345         */
346       public View View
347       {
348         get
349         {
350           return _view;
351         }
352         set
353         {
354           _view = value;
355         }
356       }
357     }
358
359     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
360     private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control);
361     private DaliEventHandler<object,KeyInputFocusGainedEventArgs> _KeyInputFocusGainedEventHandler;
362     private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate;
363
364     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
365     private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control);
366     private DaliEventHandler<object,KeyInputFocusLostEventArgs> _KeyInputFocusLostEventHandler;
367     private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate;
368
369     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
370     private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent);
371     private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyEventHandler;
372     private KeyCallbackDelegate _KeyCallbackDelegate;
373
374     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
375     private delegate void OnRelayoutEventCallbackDelegate(IntPtr control);
376     private DaliEventHandler<object,OnRelayoutEventArgs> _viewOnRelayoutEventHandler;
377     private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate;
378
379     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
380     private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touchData);
381     private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchDataEventHandler;
382     private TouchCallbackDelegate _viewTouchDataCallbackDelegate;
383
384     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
385     private delegate bool HoverEventCallbackDelegate(IntPtr view, IntPtr hoverEvent);
386     private DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> _viewHoverEventHandler;
387     private HoverEventCallbackDelegate _viewHoverEventCallbackDelegate;
388
389     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
390     private delegate bool WheelEventCallbackDelegate(IntPtr view, IntPtr wheelEvent);
391     private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelEventHandler;
392     private WheelEventCallbackDelegate _viewWheelEventCallbackDelegate;
393
394     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
395     private delegate void OnStageEventCallbackDelegate(IntPtr control);
396     private DaliEventHandler<object,OnStageEventArgs> _viewOnStageEventHandler;
397     private OnStageEventCallbackDelegate _viewOnStageEventCallbackDelegate;
398
399     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
400     private delegate void OffStageEventCallbackDelegate(IntPtr control);
401     private DaliEventHandler<object,OffStageEventArgs> _viewOffStageEventHandler;
402     private OffStageEventCallbackDelegate _viewOffStageEventCallbackDelegate;
403
404     /**
405      * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler
406      * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler<object,KeyInputFocusGainedEventArgs>) 
407      * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus.
408      */
409     public event DaliEventHandler<object,KeyInputFocusGainedEventArgs> KeyInputFocusGained
410     {
411       add
412       {
413         lock(this)
414         {
415           // Restricted to only one listener
416           if (_KeyInputFocusGainedEventHandler == null)
417           {
418             _KeyInputFocusGainedEventHandler += value;
419             Console.WriteLine("View Keyevent EVENT Locked....");
420             _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained);
421             this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate);
422           }
423         }
424       }
425
426       remove
427       {
428         lock(this)
429         {
430           if (_KeyInputFocusGainedEventHandler != null)
431           {
432             this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate);
433           }
434
435           _KeyInputFocusGainedEventHandler -= value;
436         }
437       }
438     }
439
440     private void OnKeyInputFocusGained(IntPtr view)
441     {
442       KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs();
443       Console.WriteLine("View Keyevent ....");
444       // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data
445       e.View = Dali.View.GetViewFromPtr(view);
446
447       if (_KeyInputFocusGainedEventHandler != null)
448       {
449         //here we send all data to user event handlers
450         _KeyInputFocusGainedEventHandler(this, e);
451       }
452
453     }
454
455     /**
456      * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler
457      * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler<object,KeyInputFocusLostEventArgs>) 
458      * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus.
459      */
460     public event DaliEventHandler<object,KeyInputFocusLostEventArgs> KeyInputFocusLost
461     {
462       add
463       {
464         lock(this)
465         {
466           // Restricted to only one listener
467           if (_KeyInputFocusLostEventHandler == null)
468           {
469             _KeyInputFocusLostEventHandler += value;
470
471             _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost);
472             this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate);
473           }
474         }
475       }
476
477       remove
478       {
479         lock(this)
480         {
481           if (_KeyInputFocusLostEventHandler != null)
482           {
483             this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate);
484           }
485
486           _KeyInputFocusLostEventHandler -= value;
487         }
488       }
489     }
490
491     private void OnKeyInputFocusLost(IntPtr view)
492     {
493       KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs();
494
495       // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data
496       e.View = Dali.View.GetViewFromPtr(view);
497
498       if (_KeyInputFocusLostEventHandler != null)
499       {
500         //here we send all data to user event handlers
501         _KeyInputFocusLostEventHandler(this, e);
502       }
503     }
504
505     /**
506      * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
507      * (in the type of KeyEventEventHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>) 
508      * provided by the user. KeyPressed signal is emitted when key event is received.
509      */
510     public event DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> KeyPressed
511     {
512       add
513       {
514         lock(this)
515         {
516           // Restricted to only one listener
517           if (_KeyEventHandler == null)
518           {
519             _KeyEventHandler += value;
520
521             _KeyCallbackDelegate = new KeyCallbackDelegate(OnKeyEvent);
522             this.KeyEventSignal().Connect(_KeyCallbackDelegate);
523           }
524         }
525       }
526
527       remove
528       {
529         lock(this)
530         {
531           if (_KeyEventHandler != null)
532           {
533             this.KeyEventSignal().Disconnect(_KeyCallbackDelegate);
534           }
535
536           _KeyEventHandler -= value;
537         }
538       }
539     }
540
541     private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
542     {
543       KeyEventArgs e = new KeyEventArgs();
544
545       // Populate all members of "e" (KeyEventArgs) with real data
546       e.View = Dali.View.GetViewFromPtr(view);
547       e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr(keyEvent);
548
549       if (_KeyEventHandler != null)
550       {
551         //here we send all data to user event handlers
552         return _KeyEventHandler(this, e);
553       }
554       return false;
555
556     }
557
558     /**
559       * @brief Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler
560       * (in the type of OnRelayoutEventHandler) provided by the user.
561       * OnRelayout signal is emitted after the size has been set on the view during relayout.
562       */
563     public event DaliEventHandler<object,OnRelayoutEventArgs> OnRelayoutEvent
564     {
565       add
566       {
567         lock(this)
568         {
569           // Restricted to only one listener
570           if (_viewOnRelayoutEventHandler == null)
571           {
572             _viewOnRelayoutEventHandler += value;
573             Console.WriteLine("View OnRelayoutEventArgs Locked....");
574             _viewOnRelayoutEventCallbackDelegate = new OnRelayoutEventCallbackDelegate(OnRelayout);
575             this.OnRelayoutSignal().Connect(_viewOnRelayoutEventCallbackDelegate);
576           }
577         }
578       }
579
580       remove
581       {
582         lock(this)
583         {
584           if (_viewOnRelayoutEventHandler != null)
585           {
586             this.OnRelayoutSignal().Disconnect(_viewOnRelayoutEventCallbackDelegate);
587           }
588
589           _viewOnRelayoutEventHandler -= value;
590         }
591       }
592     }
593
594     // Callback for View OnRelayout signal
595     private void OnRelayout(IntPtr data)
596     {
597       OnRelayoutEventArgs e = new OnRelayoutEventArgs();
598       Console.WriteLine("View OnRelayoutEventArgs....");
599       // Populate all members of "e" (OnRelayoutEventArgs) with real data
600       e.View = View.GetViewFromPtr(data);
601
602       if (_viewOnRelayoutEventHandler != null)
603       {
604         //here we send all data to user event handlers
605         _viewOnRelayoutEventHandler(this, e);
606       }
607     }
608
609     /**
610       * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
611       * (in the type of TouchEventHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
612       * provided by the user. Touched signal is emitted when touch input is received.
613       */
614     public event DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> Touched
615     {
616       add
617       {
618         lock(this)
619         {
620           // Restricted to only one listener
621           if (_viewTouchDataEventHandler == null)
622           {
623             _viewTouchDataEventHandler += value;
624             Console.WriteLine("View Touch EVENT LOCKED....");
625             _viewTouchDataCallbackDelegate = new TouchCallbackDelegate(OnTouch);
626             this.TouchSignal().Connect(_viewTouchDataCallbackDelegate);
627           }
628         }
629       }
630
631       remove
632       {
633         lock(this)
634         {
635           if (_viewTouchDataEventHandler != null)
636           {
637             this.TouchSignal().Disconnect(_viewTouchDataCallbackDelegate);
638           }
639
640           _viewTouchDataEventHandler -= value;
641         }
642       }
643     }
644
645     // Callback for View TouchSignal
646     private bool OnTouch(IntPtr view, IntPtr touchData)
647     {
648       TouchEventArgs e = new TouchEventArgs();
649       Console.WriteLine("View Touch EVENT....");
650       // Populate all members of "e" (TouchEventArgs) with real data
651       e.View = View.GetViewFromPtr(view);
652       e.TouchData = Dali.TouchData.GetTouchDataFromPtr(touchData);
653
654       if (_viewTouchDataEventHandler != null)
655       {
656         //here we send all data to user event handlers
657         return _viewTouchDataEventHandler(this, e);
658       }
659
660       return false;
661     }
662
663     /**
664       * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler
665       * (in the type of HoverEventHandler-DaliEventHandlerWithReturnType<object,HoverEventArgs,bool>)
666       * provided by the user. Hovered signal is emitted when hover input is received.
667       */
668     public event DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> Hovered
669     {
670       add
671       {
672         lock(this)
673         {
674           // Restricted to only one listener
675           if (_viewHoverEventHandler == null)
676           {
677             _viewHoverEventHandler += value;
678
679             _viewHoverEventCallbackDelegate = new HoverEventCallbackDelegate(OnHoverEvent);
680             this.HoveredSignal().Connect(_viewHoverEventCallbackDelegate);
681           }
682         }
683       }
684
685       remove
686       {
687         lock(this)
688         {
689           if (_viewHoverEventHandler != null)
690           {
691             this.HoveredSignal().Disconnect(_viewHoverEventCallbackDelegate);
692           }
693
694           _viewHoverEventHandler -= value;
695         }
696       }
697     }
698
699     // Callback for View Hover signal
700     private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
701     {
702       HoverEventArgs e = new HoverEventArgs();
703
704       // Populate all members of "e" (HoverEventArgs) with real data
705       e.View = View.GetViewFromPtr(view);
706       e.HoverEvent = Dali.HoverEvent.GetHoverEventFromPtr(hoverEvent);
707
708       if (_viewHoverEventHandler != null)
709       {
710         //here we send all data to user event handlers
711         return _viewHoverEventHandler(this, e);
712       }
713
714       return false;
715     }
716
717     /**
718       * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
719       * (in the type of WheelEventHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
720       * provided by the user. WheelMoved signal is emitted when wheel event is received.
721       */
722     public event DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> WheelMoved
723     {
724       add
725       {
726         lock(this)
727         {
728           // Restricted to only one listener
729           if (_viewWheelEventHandler == null)
730           {
731             _viewWheelEventHandler += value;
732             Console.WriteLine("View Wheel EVENT LOCKED....");
733             _viewWheelEventCallbackDelegate = new WheelEventCallbackDelegate(OnWheelEvent);
734             this.WheelEventSignal().Connect(_viewWheelEventCallbackDelegate);
735           }
736         }
737       }
738
739       remove
740       {
741         lock(this)
742         {
743           if (_viewWheelEventHandler != null)
744           {
745             this.WheelEventSignal().Disconnect(_viewWheelEventCallbackDelegate);
746           }
747
748           _viewWheelEventHandler -= value;
749         }
750       }
751     }
752
753     // Callback for View Wheel signal
754     private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
755     {
756       WheelEventArgs e = new WheelEventArgs();
757       Console.WriteLine("View Wheel EVENT ....");
758       // Populate all members of "e" (WheelEventArgs) with real data
759       e.View = View.GetViewFromPtr(view);
760       e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr(wheelEvent);
761
762       if (_viewWheelEventHandler != null)
763       {
764         //here we send all data to user event handlers
765         return _viewWheelEventHandler(this, e);
766       }
767
768       return false;
769     }
770
771     /**
772       * @brief Event for OnStage signal which can be used to subscribe/unsubscribe the event handler
773       * (in the type of OnStageEventHandler) provided by the user.
774       * OnStage signal is emitted after the view has been connected to the stage.
775       */
776     public event DaliEventHandler<object,OnStageEventArgs> OnStageEvent
777     {
778       add
779       {
780         lock(this)
781         {
782           // Restricted to only one listener
783           if (_viewOnStageEventHandler == null)
784           {
785             _viewOnStageEventHandler += value;
786
787             _viewOnStageEventCallbackDelegate = new OnStageEventCallbackDelegate(OnStage);
788             this.OnStageSignal().Connect(_viewOnStageEventCallbackDelegate);
789           }
790         }
791       }
792
793       remove
794       {
795         lock(this)
796         {
797           if (_viewOnStageEventHandler != null)
798           {
799             this.OnStageSignal().Disconnect(_viewOnStageEventCallbackDelegate);
800           }
801
802           _viewOnStageEventHandler -= value;
803         }
804       }
805     }
806
807     // Callback for View OnStage signal
808     private void OnStage(IntPtr data)
809     {
810       OnStageEventArgs e = new OnStageEventArgs();
811
812       // Populate all members of "e" (OnStageEventArgs) with real data
813       e.View = View.GetViewFromPtr(data);
814
815       if (_viewOnStageEventHandler != null)
816       {
817         //here we send all data to user event handlers
818         _viewOnStageEventHandler(this, e);
819       }
820     }
821
822     /**
823       * @brief Event for OffStage signal which can be used to subscribe/unsubscribe the event handler
824       * (in the type of OffStageEventHandler) provided by the user.
825       * OffStage signal is emitted after the view has been disconnected from the stage.
826       */
827     public event DaliEventHandler<object,OffStageEventArgs> OffStageEvent
828     {
829       add
830       {
831         lock(this)
832         {
833           // Restricted to only one listener
834           if (_viewOffStageEventHandler == null)
835           {
836             _viewOffStageEventHandler += value;
837
838             _viewOffStageEventCallbackDelegate = new OffStageEventCallbackDelegate(OffStage);
839             this.OnStageSignal().Connect(_viewOffStageEventCallbackDelegate);
840           }
841         }
842       }
843
844       remove
845       {
846         lock(this)
847         {
848           if (_viewOffStageEventHandler != null)
849           {
850             this.OnStageSignal().Disconnect(_viewOffStageEventCallbackDelegate);
851           }
852
853           _viewOffStageEventHandler -= value;
854         }
855       }
856     }
857
858     // Callback for View OffStage signal
859     private void OffStage(IntPtr data)
860     {
861       OffStageEventArgs e = new OffStageEventArgs();
862
863       // Populate all members of "e" (OffStageEventArgs) with real data
864       e.View = View.GetViewFromPtr(data);
865
866       if (_viewOffStageEventHandler != null)
867       {
868         //here we send all data to user event handlers
869         _viewOffStageEventHandler(this, e);
870       }
871     }
872
873     public static View GetViewFromPtr(global::System.IntPtr cPtr) {
874       View ret = new View(cPtr, false);
875       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
876       return ret;
877     }
878
879     
880   public class Property : global::System.IDisposable {
881     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
882     protected bool swigCMemOwn;
883   
884     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
885       swigCMemOwn = cMemoryOwn;
886       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
887     }
888   
889     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
890       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
891     }
892   
893     ~Property() {
894       Dispose();
895     }
896   
897     public virtual void Dispose() {
898       lock(this) {
899         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
900           if (swigCMemOwn) {
901             swigCMemOwn = false;
902             NDalicPINVOKE.delete_View_Property(swigCPtr);
903           }
904           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
905         }
906         global::System.GC.SuppressFinalize(this);
907       }
908     }
909   
910     public Property() : this(NDalicPINVOKE.new_View_Property(), true) {
911       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
912     }
913   
914     public static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
915     public static readonly int BACKGROUND_COLOR = NDalicPINVOKE.View_Property_BACKGROUND_COLOR_get();
916     public static readonly int BACKGROUND_IMAGE = NDalicPINVOKE.View_Property_BACKGROUND_IMAGE_get();
917     public static readonly int KEY_INPUT_FOCUS = NDalicPINVOKE.View_Property_KEY_INPUT_FOCUS_get();
918     public static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
919   
920   }
921
922   public class KeyboardFocus : global::System.IDisposable {
923     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
924     protected bool swigCMemOwn;
925   
926     internal KeyboardFocus(global::System.IntPtr cPtr, bool cMemoryOwn) {
927       swigCMemOwn = cMemoryOwn;
928       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
929     }
930   
931     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardFocus obj) {
932       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
933     }
934   
935     ~KeyboardFocus() {
936       Dispose();
937     }
938   
939     public virtual void Dispose() {
940       lock(this) {
941         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
942           if (swigCMemOwn) {
943             swigCMemOwn = false;
944             NDalicPINVOKE.delete_View_KeyboardFocus(swigCPtr);
945           }
946           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
947         }
948         global::System.GC.SuppressFinalize(this);
949       }
950     }
951   
952     public KeyboardFocus() : this(NDalicPINVOKE.new_View_KeyboardFocus(), true) {
953       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
954     }
955   
956     public enum Direction {
957       LEFT,
958       RIGHT,
959       UP,
960       DOWN
961     }
962   
963   }
964
965   public View () : this (NDalicPINVOKE.View_New(), true) {
966       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967
968   }
969   public View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true) {
970     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
971   }
972
973   public View Assign(View handle) {
974     View ret = new View(NDalicPINVOKE.View_Assign(swigCPtr, View.getCPtr(handle)), false);
975     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
976     return ret;
977   }
978
979   public new static View DownCast(BaseHandle handle) {
980     View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
981     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
982     return ret;
983   }
984
985   public void SetKeyInputFocus() {
986     NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
987     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
988   }
989
990   public bool HasKeyInputFocus() {
991     bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
992     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
993     return ret;
994   }
995
996   public void ClearKeyInputFocus() {
997     NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
998     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
999   }
1000
1001   public PinchGestureDetector GetPinchGestureDetector() {
1002     PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1003     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1004     return ret;
1005   }
1006
1007   public PanGestureDetector GetPanGestureDetector() {
1008     PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1009     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010     return ret;
1011   }
1012
1013   public TapGestureDetector GetTapGestureDetector() {
1014     TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1015     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1016     return ret;
1017   }
1018
1019   public LongPressGestureDetector GetLongPressGestureDetector() {
1020     LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1021     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1022     return ret;
1023   }
1024
1025   public void SetStyleName(string styleName) {
1026     NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1027     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1028   }
1029
1030   public string GetStyleName() {
1031     string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1032     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1033     return ret;
1034   }
1035
1036   public void SetBackgroundColor(Vector4 color) {
1037     NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1038     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1039   }
1040
1041   public Vector4 GetBackgroundColor() {
1042     Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1043     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1044     return ret;
1045   }
1046
1047   public void SetBackgroundImage(Image image) {
1048     NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1049     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1050   }
1051
1052   public void ClearBackground() {
1053     NDalicPINVOKE.View_ClearBackground(swigCPtr);
1054     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1055   }
1056
1057   public ControlKeyEventSignal KeyEventSignal() {
1058     ControlKeyEventSignal ret = new ControlKeyEventSignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1059     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1060     return ret;
1061   }
1062
1063   public KeyInputFocusSignal KeyInputFocusGainedSignal() {
1064     KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1065     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1066     return ret;
1067   }
1068
1069   public KeyInputFocusSignal KeyInputFocusLostSignal() {
1070     KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1071     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1072     return ret;
1073   }
1074
1075   public View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true) {
1076     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1077   }
1078
1079   public enum PropertyRange {
1080     PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1081     CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1082     CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX+1000
1083   }
1084
1085   public string StyleName 
1086   { 
1087     get 
1088     {
1089       string temp;
1090       GetProperty( View.Property.STYLE_NAME).Get( out temp );
1091       return temp;
1092     }
1093     set 
1094     { 
1095       SetProperty( View.Property.STYLE_NAME, new Dali.Property.Value( value ) );
1096     }
1097   }
1098   public Vector4 BackgroundColor 
1099   { 
1100     get 
1101     {
1102       Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
1103       GetProperty( View.Property.BACKGROUND_COLOR).Get(  temp );
1104       return temp;
1105     }
1106     set 
1107     { 
1108       SetProperty( View.Property.BACKGROUND_COLOR, new Dali.Property.Value( value ) );
1109     }
1110   }
1111   public Dali.Property.Map BackgroundImage 
1112   { 
1113     get 
1114     {
1115       Dali.Property.Map temp = new Dali.Property.Map();
1116       GetProperty( View.Property.BACKGROUND_IMAGE).Get(  temp );
1117       return temp;
1118     }
1119     set 
1120     { 
1121       SetProperty( View.Property.BACKGROUND_IMAGE, new Dali.Property.Value( value ) );
1122     }
1123   }
1124   public bool KeyInputFocus 
1125   { 
1126     get 
1127     {
1128       bool temp = false;
1129       GetProperty( View.Property.KEY_INPUT_FOCUS).Get( ref temp );
1130       return temp;
1131     }
1132     set 
1133     { 
1134       SetProperty( View.Property.KEY_INPUT_FOCUS, new Dali.Property.Value( value ) );
1135     }
1136   }
1137   public Dali.Property.Map Background 
1138   { 
1139     get 
1140     {
1141       Dali.Property.Map temp = new Dali.Property.Map();
1142       GetProperty( View.Property.BACKGROUND).Get(  temp );
1143       return temp;
1144     }
1145     set 
1146     { 
1147       SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) );
1148     }
1149   }
1150
1151   public Vector2 CellIndex 
1152   { 
1153     get 
1154     {
1155       Vector2 temp = new Vector2(0.0f,0.0f);
1156       GetProperty( TableView.ChildProperty.CELL_INDEX).Get(  temp );
1157       return temp;
1158     }
1159     set 
1160     { 
1161       SetProperty( TableView.ChildProperty.CELL_INDEX, new Dali.Property.Value( value ) );
1162     }
1163   }
1164   public float RowSpan 
1165   { 
1166     get 
1167     {
1168       float temp = 0.0f;
1169       GetProperty( TableView.ChildProperty.ROW_SPAN).Get( ref temp );
1170       return temp;
1171     }
1172     set 
1173     { 
1174       SetProperty( TableView.ChildProperty.ROW_SPAN, new Dali.Property.Value( value ) );
1175     }
1176   }
1177   public float ColumnSpan 
1178   { 
1179     get 
1180     {
1181       float temp = 0.0f;
1182       GetProperty( TableView.ChildProperty.COLUMN_SPAN).Get( ref temp );
1183       return temp;
1184     }
1185     set 
1186     { 
1187       SetProperty( TableView.ChildProperty.COLUMN_SPAN, new Dali.Property.Value( value ) );
1188     }
1189   }
1190   public string CellHorizontalAlignment 
1191   { 
1192     get 
1193     {
1194       string temp;
1195       GetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get( out temp );
1196       return temp;
1197     }
1198     set 
1199     { 
1200       SetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Dali.Property.Value( value ) );
1201     }
1202   }
1203   public string CellVerticalAlignment 
1204   { 
1205     get 
1206     {
1207       string temp;
1208       GetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get( out temp );
1209       return temp;
1210     }
1211     set 
1212     { 
1213       SetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Dali.Property.Value( value ) );
1214     }
1215   }
1216
1217   public float Flex 
1218   { 
1219     get 
1220     {
1221       float temp = 0.0f;
1222       GetProperty( FlexContainer.ChildProperty.FLEX).Get( ref temp );
1223       return temp;
1224     }
1225     set 
1226     { 
1227       SetProperty( FlexContainer.ChildProperty.FLEX, new Dali.Property.Value( value ) );
1228     }
1229   }
1230   public int AlignSelf 
1231   { 
1232     get 
1233     {
1234       int temp = 0;
1235       GetProperty( FlexContainer.ChildProperty.ALIGN_SELF).Get( ref temp );
1236       return temp;
1237     }
1238     set 
1239     { 
1240       SetProperty( FlexContainer.ChildProperty.ALIGN_SELF, new Dali.Property.Value( value ) );
1241     }
1242   }
1243   public Vector4 FlexMargin 
1244   { 
1245     get 
1246     {
1247       Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
1248       GetProperty( FlexContainer.ChildProperty.FLEX_MARGIN).Get(  temp );
1249       return temp;
1250     }
1251     set 
1252     { 
1253       SetProperty( FlexContainer.ChildProperty.FLEX_MARGIN, new Dali.Property.Value( value ) );
1254     }
1255   }
1256
1257 }
1258
1259 }