Release 4.0.0-preview1-00230
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Application.cs
1 /** Copyright (c) 2017 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
17 namespace Tizen.NUI
18 {
19
20     using System;
21     using System.Runtime.InteropServices;
22
23     /**
24       * @brief Event arguments that passed via NUIApplicationInit signal
25       *
26       */
27     internal class NUIApplicationInitEventArgs : EventArgs
28     {
29         private Application _application;
30
31         /**
32           * @brief Application - is the application that is being initialized
33           *
34           */
35         public Application Application
36         {
37             get
38             {
39                 return _application;
40             }
41             set
42             {
43                 _application = value;
44             }
45         }
46     }
47
48     /**
49       * @brief Event arguments that passed via NUIApplicationTerminate signal
50       *
51       */
52     internal class NUIApplicationTerminatingEventArgs : EventArgs
53     {
54         private Application _application;
55         /**
56           * @brief Application - is the application that is being Terminated
57           *
58           */
59         public Application Application
60         {
61             get
62             {
63                 return _application;
64             }
65             set
66             {
67                 _application = value;
68             }
69         }
70     }
71
72     /**
73       * @brief Event arguments that passed via NUIApplicationPause signal
74       *
75       */
76     internal class NUIApplicationPausedEventArgs : EventArgs
77     {
78         private Application _application;
79         /**
80           * @brief Application - is the application that is being Paused
81           *
82           */
83         public Application Application
84         {
85             get
86             {
87                 return _application;
88             }
89             set
90             {
91                 _application = value;
92             }
93         }
94     }
95
96     /**
97       * @brief Event arguments that passed via NUIApplicationResume signal
98       *
99       */
100     internal class NUIApplicationResumedEventArgs : EventArgs
101     {
102         private Application _application;
103         /**
104           * @brief Application - is the application that is being Resumed
105           *
106           */
107         public Application Application
108         {
109             get
110             {
111                 return _application;
112             }
113             set
114             {
115                 _application = value;
116             }
117         }
118     }
119
120     /**
121       * @brief Event arguments that passed via NUIApplicationReset signal
122       *
123       */
124     internal class NUIApplicationResetEventArgs : EventArgs
125     {
126         private Application _application;
127         /**
128           * @brief Application - is the application that is being Reset
129           *
130           */
131         public Application Application
132         {
133             get
134             {
135                 return _application;
136             }
137             set
138             {
139                 _application = value;
140             }
141         }
142     }
143
144     /**
145       * @brief Event arguments that passed via NUIApplicationResize signal
146       *
147       */
148     internal class NUIApplicationResizedEventArgs : EventArgs
149     {
150         private Application _application;
151         /**
152           * @brief Application - is the application that is being Resized
153           *
154           */
155         public Application Application
156         {
157             get
158             {
159                 return _application;
160             }
161             set
162             {
163                 _application = value;
164             }
165         }
166     }
167
168     /**
169       * @brief Event arguments that passed via NUIApplicationLanguageChanged signal
170       *
171       */
172     internal class NUIApplicationLanguageChangedEventArgs : EventArgs
173     {
174         private Application _application;
175         /**
176           * @brief Application - is the application that is being affected with Device's language change
177           *
178           */
179         public Application Application
180         {
181             get
182             {
183                 return _application;
184             }
185             set
186             {
187                 _application = value;
188             }
189         }
190     }
191
192     /**
193       * @brief Event arguments that passed via NUIApplicationRegionChanged signal
194       *
195       */
196     internal class NUIApplicationRegionChangedEventArgs : EventArgs
197     {
198         private Application _application;
199         /**
200           * @brief Application - is the application that is being affected with Device's region change
201           *
202           */
203         public Application Application
204         {
205             get
206             {
207                 return _application;
208             }
209             set
210             {
211                 _application = value;
212             }
213         }
214     }
215
216     /**
217       * @brief Event arguments that passed via NUIApplicationBatteryLow signal
218       *
219       */
220     internal class NUIApplicationBatteryLowEventArgs : EventArgs
221     {
222         private Application _application;
223         /**
224           * @brief Application - is the application that is being affected when the battery level of the device is low
225           *
226           */
227         public Application Application
228         {
229             get
230             {
231                 return _application;
232             }
233             set
234             {
235                 _application = value;
236             }
237         }
238     }
239
240     /**
241       * @brief Event arguments that passed via NUIApplicationMemoryLow signal
242       *
243       */
244     internal class NUIApplicationMemoryLowEventArgs : EventArgs
245     {
246         private Application _application;
247         /**
248           * @brief Application - is the application that is being affected when the memory level of the device is low
249           *
250           */
251         public Application Application
252         {
253             get
254             {
255                 return _application;
256             }
257             set
258             {
259                 _application = value;
260             }
261         }
262     }
263
264     /**
265       * @brief Event arguments that passed via NUIApplicationAppControl  signal
266       *
267       */
268     internal class NUIApplicationAppControlEventArgs : EventArgs
269     {
270         private Application _application;
271         private IntPtr _voidp;
272         /**
273           * @brief Application - is the application that is receiving the launch request from another application
274           *
275           */
276         public Application Application
277         {
278             get
279             {
280                 return _application;
281             }
282             set
283             {
284                 _application = value;
285             }
286         }
287         /**
288           * @brief VoidP - contains the information about why the application is launched
289           *
290           */
291         public IntPtr VoidP
292         {
293             get
294             {
295                 return _voidp;
296             }
297             set
298             {
299                 _voidp = value;
300             }
301         }
302     }
303
304     internal class Application : BaseHandle
305     {
306         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
307
308         internal Application(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Application_SWIGUpcast(cPtr), cMemoryOwn)
309         {
310             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
311         }
312
313         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Application obj)
314         {
315             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
316         }
317
318         protected override void Dispose(DisposeTypes type)
319         {
320             if (disposed)
321             {
322                 return;
323             }
324
325             if (type == DisposeTypes.Explicit)
326             {
327                 //Called by User
328                 //Release your own managed resources here.
329                 //You should release all of your own disposable objects here.
330
331             }
332
333             //Release your own unmanaged resources here.
334             //You should not access any managed member here except static instance.
335             //because the execution order of Finalizes is non-deterministic.
336
337             if (_applicationInitEventCallbackDelegate != null)
338             {
339                 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
340             }
341
342             if (_applicationTerminateEventCallbackDelegate != null)
343             {
344                 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
345             }
346
347             if (_applicationPauseEventCallbackDelegate != null)
348             {
349                 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
350             }
351
352             if (_applicationResumeEventCallbackDelegate != null)
353             {
354                 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
355             }
356
357             if (_applicationResetEventCallbackDelegate != null)
358             {
359                 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
360             }
361
362             if (_applicationResizeEventCallbackDelegate != null)
363             {
364                 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
365             }
366
367             if (_applicationLanguageChangedEventCallbackDelegate != null)
368             {
369                 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
370             }
371
372             if (_applicationRegionChangedEventCallbackDelegate != null)
373             {
374                 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
375             }
376
377             if (_applicationBatteryLowEventCallbackDelegate != null)
378             {
379                 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
380             }
381
382             if (_applicationMemoryLowEventCallbackDelegate != null)
383             {
384                 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
385             }
386
387             if (_applicationAppControlEventCallbackDelegate != null)
388             {
389                 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
390             }
391
392             if (swigCPtr.Handle != global::System.IntPtr.Zero)
393             {
394                 if (swigCMemOwn)
395                 {
396                     swigCMemOwn = false;
397                     NDalicPINVOKE.delete_Application(swigCPtr);
398                 }
399                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
400             }
401
402             base.Dispose(type);
403         }
404
405         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
406         private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
407         private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
408         private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
409
410
411         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
412         private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
413         private DaliEventHandler<object, NUIApplicationTerminatingEventArgs> _applicationTerminateEventHandler;
414         private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
415
416
417         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
418         private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
419         private DaliEventHandler<object, NUIApplicationPausedEventArgs> _applicationPauseEventHandler;
420         private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
421
422         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
423         private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
424         private DaliEventHandler<object, NUIApplicationResumedEventArgs> _applicationResumeEventHandler;
425         private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
426
427         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
428         private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
429         private DaliEventHandler<object, NUIApplicationResetEventArgs> _applicationResetEventHandler;
430         private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
431
432         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
433         private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
434         private DaliEventHandler<object, NUIApplicationResizedEventArgs> _applicationResizeEventHandler;
435         private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
436
437         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
438         private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
439         private DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
440         private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
441
442
443         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
444         private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
445         private DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
446         private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
447
448         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
449         private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
450         private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
451         private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
452
453         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
454         private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
455         private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
456         private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
457
458         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
459         private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
460         private DaliEventHandler<object, NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
461         private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
462
463         /**
464           * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
465           * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
466           *  provided by the user. Initialized signal is emitted when application is initialised
467           */
468         public event DaliEventHandler<object, NUIApplicationInitEventArgs> Initialized
469         {
470             add
471             {
472                 lock (this)
473                 {
474                     // Restricted to only one listener
475                     if (_applicationInitEventHandler == null)
476                     {
477                         _applicationInitEventHandler += value;
478
479                         _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
480                         this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
481                     }
482                 }
483             }
484
485             remove
486             {
487                 lock (this)
488                 {
489                     if (_applicationInitEventHandler != null)
490                     {
491                         this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
492                     }
493
494                     _applicationInitEventHandler -= value;
495                 }
496             }
497         }
498
499         // Callback for Application InitSignal
500         private void OnApplicationInit(IntPtr data)
501         {
502             // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
503             DisposeQueue.Instance.Initialize();
504             NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
505
506             // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
507             e.Application = Application.GetApplicationFromPtr(data);
508
509             if (_applicationInitEventHandler != null)
510             {
511                 //here we send all data to user event handlers
512                 _applicationInitEventHandler(this, e);
513             }
514         }
515
516         /**
517           * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
518           * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
519           *  provided by the user. Terminated signal is emitted when application is terminating
520           */
521         public event DaliEventHandler<object, NUIApplicationTerminatingEventArgs> Terminating
522         {
523             add
524             {
525                 lock (this)
526                 {
527                     // Restricted to only one listener
528                     if (_applicationTerminateEventHandler == null)
529                     {
530                         _applicationTerminateEventHandler += value;
531
532                         _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
533                         this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
534                     }
535                 }
536             }
537
538             remove
539             {
540                 lock (this)
541                 {
542                     if (_applicationTerminateEventHandler != null)
543                     {
544                         this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
545                     }
546
547                     _applicationTerminateEventHandler -= value;
548                 }
549             }
550         }
551
552         // Callback for Application TerminateSignal
553         private void OnNUIApplicationTerminate(IntPtr data)
554         {
555             NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs();
556
557             // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
558             e.Application = Application.GetApplicationFromPtr(data);
559
560             if (_applicationTerminateEventHandler != null)
561             {
562                 //here we send all data to user event handlers
563                 _applicationTerminateEventHandler(this, e);
564             }
565         }
566
567         /**
568           * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
569           * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
570           * provided by the user. Paused signal is emitted when application is paused
571           */
572         public event DaliEventHandler<object, NUIApplicationPausedEventArgs> Paused
573         {
574             add
575             {
576                 lock (this)
577                 {
578                     // Restricted to only one listener
579                     if (_applicationPauseEventHandler == null)
580                     {
581                         _applicationPauseEventHandler += value;
582
583                         _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
584                         this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
585                     }
586                 }
587             }
588
589             remove
590             {
591                 lock (this)
592                 {
593                     if (_applicationPauseEventHandler != null)
594                     {
595                         this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
596                     }
597
598                     _applicationPauseEventHandler -= value;
599                 }
600             }
601         }
602
603         // Callback for Application PauseSignal
604         private void OnNUIApplicationPause(IntPtr data)
605         {
606             NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs();
607
608             // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
609             e.Application = Application.GetApplicationFromPtr(data);
610
611             if (_applicationPauseEventHandler != null)
612             {
613                 //here we send all data to user event handlers
614                 _applicationPauseEventHandler(this, e);
615             }
616         }
617
618         /**
619           * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
620           * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
621           *  provided by the user. Resumed signal is emitted when application is resumed
622           */
623         public event DaliEventHandler<object, NUIApplicationResumedEventArgs> Resumed
624         {
625             add
626             {
627                 lock (this)
628                 {
629                     // Restricted to only one listener
630                     if (_applicationResumeEventHandler == null)
631                     {
632                         _applicationResumeEventHandler += value;
633
634                         _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
635                         this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
636                     }
637                 }
638             }
639
640             remove
641             {
642                 lock (this)
643                 {
644                     if (_applicationResumeEventHandler != null)
645                     {
646                         this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
647                     }
648
649                     _applicationResumeEventHandler -= value;
650                 }
651             }
652         }
653
654         // Callback for Application ResumeSignal
655         private void OnNUIApplicationResume(IntPtr data)
656         {
657             NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs();
658
659             // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
660             e.Application = Application.GetApplicationFromPtr(data);
661
662             if (_applicationResumeEventHandler != null)
663             {
664                 //here we send all data to user event handlers
665                 _applicationResumeEventHandler(this, e);
666             }
667         }
668
669         /**
670           * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
671           * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
672           *  provided by the user. Reset signal is emitted when application is reset
673           */
674         public new event DaliEventHandler<object, NUIApplicationResetEventArgs> Reset
675         {
676             add
677             {
678                 lock (this)
679                 {
680                     // Restricted to only one listener
681                     if (_applicationResetEventHandler == null)
682                     {
683                         _applicationResetEventHandler += value;
684
685                         _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
686                         this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
687                     }
688                 }
689             }
690
691             remove
692             {
693                 lock (this)
694                 {
695                     if (_applicationResetEventHandler != null)
696                     {
697                         this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
698                     }
699
700                     _applicationResetEventHandler -= value;
701                 }
702             }
703         }
704
705         // Callback for Application ResetSignal
706         private void OnNUIApplicationReset(IntPtr data)
707         {
708             NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
709
710             // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
711             e.Application = Application.GetApplicationFromPtr(data);
712
713             if (_applicationResetEventHandler != null)
714             {
715                 //here we send all data to user event handlers
716                 _applicationResetEventHandler(this, e);
717             }
718         }
719
720         /**
721           * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
722           * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
723           *  provided by the user. Resized signal is emitted when application is resized
724           */
725         public event DaliEventHandler<object, NUIApplicationResizedEventArgs> Resized
726         {
727             add
728             {
729                 lock (this)
730                 {
731                     // Restricted to only one listener
732                     if (_applicationResizeEventHandler == null)
733                     {
734                         _applicationResizeEventHandler += value;
735
736                         _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
737                         this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
738                     }
739                 }
740             }
741
742             remove
743             {
744                 lock (this)
745                 {
746                     if (_applicationResizeEventHandler != null)
747                     {
748                         this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
749                     }
750
751                     _applicationResizeEventHandler -= value;
752                 }
753             }
754         }
755
756         // Callback for Application ResizeSignal
757         private void OnNUIApplicationResize(IntPtr data)
758         {
759             NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs();
760
761             // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
762             e.Application = Application.GetApplicationFromPtr(data);
763
764             if (_applicationResizeEventHandler != null)
765             {
766                 //here we send all data to user event handlers
767                 _applicationResizeEventHandler(this, e);
768             }
769         }
770
771         /**
772           * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
773           * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
774           *  provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
775           */
776         public event DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> LanguageChanged
777         {
778             add
779             {
780                 lock (this)
781                 {
782                     // Restricted to only one listener
783                     if (_applicationLanguageChangedEventHandler == null)
784                     {
785                         _applicationLanguageChangedEventHandler += value;
786
787                         _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
788                         this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
789                     }
790                 }
791             }
792
793             remove
794             {
795                 lock (this)
796                 {
797                     if (_applicationLanguageChangedEventHandler != null)
798                     {
799                         this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
800                     }
801
802                     _applicationLanguageChangedEventHandler -= value;
803                 }
804             }
805         }
806
807         // Callback for Application LanguageChangedSignal
808         private void OnNUIApplicationLanguageChanged(IntPtr data)
809         {
810             NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
811
812             // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
813             e.Application = Application.GetApplicationFromPtr(data);
814
815             if (_applicationLanguageChangedEventHandler != null)
816             {
817                 //here we send all data to user event handlers
818                 _applicationLanguageChangedEventHandler(this, e);
819             }
820         }
821
822         /**
823           * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
824           * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
825           *  provided by the user. RegionChanged signal is emitted when the region of the device is changed.
826           */
827         public event DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> RegionChanged
828         {
829             add
830             {
831                 lock (this)
832                 {
833                     // Restricted to only one listener
834                     if (_applicationRegionChangedEventHandler == null)
835                     {
836                         _applicationRegionChangedEventHandler += value;
837
838                         _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
839                         this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
840                     }
841                 }
842             }
843
844             remove
845             {
846                 lock (this)
847                 {
848                     if (_applicationRegionChangedEventHandler != null)
849                     {
850                         this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
851                     }
852
853                     _applicationRegionChangedEventHandler -= value;
854                 }
855             }
856         }
857
858         // Callback for Application RegionChangedSignal
859         private void OnNUIApplicationRegionChanged(IntPtr data)
860         {
861             NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
862
863             // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
864             e.Application = Application.GetApplicationFromPtr(data);
865
866             if (_applicationRegionChangedEventHandler != null)
867             {
868                 //here we send all data to user event handlers
869                 _applicationRegionChangedEventHandler(this, e);
870             }
871         }
872
873         /**
874           * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
875           * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
876           * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
877           */
878         public event DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> BatteryLow
879         {
880             add
881             {
882                 lock (this)
883                 {
884                     // Restricted to only one listener
885                     if (_applicationBatteryLowEventHandler == null)
886                     {
887                         _applicationBatteryLowEventHandler += value;
888
889                         _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
890                         this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
891                     }
892                 }
893             }
894
895             remove
896             {
897                 lock (this)
898                 {
899                     if (_applicationBatteryLowEventHandler != null)
900                     {
901                         this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
902                     }
903
904                     _applicationBatteryLowEventHandler -= value;
905                 }
906             }
907         }
908
909         // Callback for Application BatteryLowSignal
910         private void OnNUIApplicationBatteryLow(IntPtr data)
911         {
912             NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
913
914             // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
915             e.Application = Application.GetApplicationFromPtr(data);
916
917             if (_applicationBatteryLowEventHandler != null)
918             {
919                 //here we send all data to user event handlers
920                 _applicationBatteryLowEventHandler(this, e);
921             }
922         }
923
924         /**
925           * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
926           * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
927           *  provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
928           */
929         public event DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> MemoryLow
930         {
931             add
932             {
933                 lock (this)
934                 {
935                     // Restricted to only one listener
936                     if (_applicationMemoryLowEventHandler == null)
937                     {
938                         _applicationMemoryLowEventHandler += value;
939
940                         _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
941                         this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
942                     }
943                 }
944             }
945
946             remove
947             {
948                 lock (this)
949                 {
950                     if (_applicationMemoryLowEventHandler != null)
951                     {
952                         this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
953                     }
954
955                     _applicationMemoryLowEventHandler -= value;
956                 }
957             }
958         }
959
960         // Callback for Application MemoryLowSignal
961         private void OnNUIApplicationMemoryLow(IntPtr data)
962         {
963             NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
964
965             // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
966             e.Application = Application.GetApplicationFromPtr(data);
967
968             if (_applicationMemoryLowEventHandler != null)
969             {
970                 //here we send all data to user event handlers
971                 _applicationMemoryLowEventHandler(this, e);
972             }
973         }
974
975         /**
976           * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
977           * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
978           *  provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
979           */
980         public event DaliEventHandler<object, NUIApplicationAppControlEventArgs> AppControl
981         {
982             add
983             {
984                 lock (this)
985                 {
986                     // Restricted to only one listener
987                     if (_applicationAppControlEventHandler == null)
988                     {
989                         _applicationAppControlEventHandler += value;
990
991                         _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
992                         this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
993                     }
994                 }
995             }
996
997             remove
998             {
999                 lock (this)
1000                 {
1001                     if (_applicationAppControlEventHandler != null)
1002                     {
1003                         this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
1004                     }
1005
1006                     _applicationAppControlEventHandler -= value;
1007                 }
1008             }
1009         }
1010
1011         // Callback for Application AppControlSignal
1012         private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
1013         {
1014             NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
1015
1016             // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
1017             e.Application = Application.GetApplicationFromPtr(application);
1018             e.VoidP = voidp;
1019
1020             if (_applicationAppControlEventHandler != null)
1021             {
1022                 //here we send all data to user event handlers
1023                 _applicationAppControlEventHandler(this, e);
1024             }
1025         }
1026
1027         private static Application _instance; // singleton
1028
1029         public delegate void InitDelegate();
1030
1031         public delegate void TerminateDelegate();
1032
1033         public delegate void PauseDelegate();
1034
1035         public delegate void ResumeDelegate();
1036
1037         public delegate void ResizeDelegate();
1038
1039         public delegate void AppControlDelegate();
1040
1041         public delegate void LanguageChangedDelegate();
1042
1043         public delegate void RegionChangedDelegate();
1044
1045         public delegate void BatteryLowDelegate();
1046
1047         public delegate void MemoryLowDelegate();
1048
1049         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1050         internal delegate void InitDelegateInternal();
1051
1052         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1053         internal delegate void TerminateDelegateInternal();
1054
1055         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1056         internal delegate void PauseDelegateInternal();
1057
1058         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1059         internal delegate void ResumeDelegateInternal();
1060
1061         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1062         internal delegate void ResizeDelegateInternal();
1063
1064         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1065         internal delegate void AppControlDelegateInternal();
1066
1067         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1068         internal delegate void LanguageChangedDelegateInternal();
1069
1070         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1071         internal delegate void RegionChangedDelegateInternal();
1072
1073         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1074         internal delegate void BatteryLowDelegateInternal();
1075
1076         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1077         internal delegate void MemoryLowDelegateInternal();
1078
1079         static void Initialization()
1080         {
1081             //  instance.InitDelegate();
1082         }
1083
1084         public static Application Instance
1085         {
1086             get
1087             {
1088                 return _instance;
1089             }
1090         }
1091
1092         public static Application GetApplicationFromPtr(global::System.IntPtr cPtr)
1093         {
1094             Application ret = new Application(cPtr, false);
1095             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1096             return ret;
1097         }
1098
1099         internal void SetupDelegates()
1100         {
1101             InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialization);
1102
1103             NUILog.Debug("InitSignal connection count");
1104
1105             this.InitSignal().Connect(initializeCallback);
1106
1107             NUILog.Debug("InitSignal connection count = " + InitSignal().GetConnectionCount());
1108         }
1109
1110         public static Application NewApplication()
1111         {
1112             _instance = NewApplication("", Application.WindowMode.Opaque);
1113             return _instance;
1114         }
1115
1116         public static Application NewApplication(string stylesheet)
1117         {
1118             _instance = NewApplication(stylesheet, Application.WindowMode.Opaque);
1119             return _instance;
1120         }
1121
1122         public static Application NewApplication(string stylesheet, Application.WindowMode windowMode)
1123         {
1124             // register all Views with the type registry, so that can be created / styled via JSON
1125             //ViewRegistryHelper.Initialize(); //moved to Application side.
1126
1127             Application ret = New(1, stylesheet, windowMode);
1128             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1129
1130             // we've got an application now connect the signals
1131             ret.SetupDelegates();
1132             // set the singleton
1133             _instance = ret;
1134             return ret;
1135         }
1136
1137
1138         public static Application NewApplication(string[] args, string stylesheet, Application.WindowMode windowMode)
1139         {
1140             NUILog.Debug(" NewApplication(string[] args, string stylesheet, Application.WindowMode windowMode) is called! ");
1141
1142             Application ret = New(args, stylesheet, (Application.WindowMode)windowMode);
1143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1144
1145             // we've got an application now connect the signals
1146             ret.SetupDelegates();
1147             // set the singleton
1148             _instance = ret;
1149             return _instance;
1150         }
1151
1152         /// <summary>
1153         /// Ensures that the function passed in is called from the main loop when it is idle.
1154         /// </summary>
1155         /// <param name="func">The function to call</param>
1156         /// <returns>true if added successfully, false otherwise</returns>
1157         public bool AddIdle(System.Delegate func)
1158         {
1159             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
1160             System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
1161
1162             bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
1163
1164             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1165             return ret;
1166         }
1167
1168         /**
1169         * Outer::outer_method(int)
1170         */
1171         public static Application New()
1172         {
1173             NUILog.Debug("New() is called!");
1174
1175             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
1176             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1177             return ret;
1178         }
1179
1180         public static Application New(int argc)
1181         {
1182             NUILog.Debug("New(int argc) is called!");
1183
1184             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
1185             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1186             return ret;
1187         }
1188
1189         public static Application New(int argc, string stylesheet)
1190         {
1191             NUILog.Debug("New(int argc, string stylesheet) is called!");
1192
1193             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
1194             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1195             return ret;
1196         }
1197
1198         public static Application New(int argc, string stylesheet, Application.WindowMode windowMode)
1199         {
1200             NUILog.Debug("New(int argc, string stylesheet, Application.WindowMode windowMode) is called!");
1201
1202             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
1203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1204             return ret;
1205         }
1206
1207         public static Application New(string[] args, string stylesheet, Application.WindowMode windowMode)
1208         {
1209             NUILog.Debug("New(string[] args) is called!");
1210             int argc = args.Length;
1211             string argvStr = string.Join(" ", args);
1212
1213             Application ret = new Application(NDalicPINVOKE.Application_New__MANUAL_4(argc, argvStr, stylesheet, (int)windowMode), true);
1214             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1215             return ret;
1216         }
1217
1218         public static Application New(int argc, string stylesheet, Application.WindowMode windowMode, Rectangle positionSize)
1219         {
1220             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_4(argc, stylesheet, (int)windowMode, Rectangle.getCPtr(positionSize)), true);
1221             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1222             return ret;
1223         }
1224
1225         public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
1226         {
1227             NUILog.Debug("Application() is called!");
1228
1229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1230         }
1231
1232         public Application(Application application) : this(NDalicPINVOKE.new_Application__SWIG_1(Application.getCPtr(application)), true)
1233         {
1234             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1235         }
1236
1237         public Application Assign(Application application)
1238         {
1239             Application ret = new Application(NDalicPINVOKE.Application_Assign(swigCPtr, Application.getCPtr(application)), false);
1240             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1241             return ret;
1242         }
1243
1244         public void MainLoop()
1245         {
1246             NDalicPINVOKE.Application_MainLoop__SWIG_0(swigCPtr);
1247             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1248         }
1249
1250         internal void MainLoop(SWIGTYPE_p_Configuration__ContextLoss configuration)
1251         {
1252             NDalicPINVOKE.Application_MainLoop__SWIG_1(swigCPtr, SWIGTYPE_p_Configuration__ContextLoss.getCPtr(configuration));
1253             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1254         }
1255
1256         public void Lower()
1257         {
1258             NDalicPINVOKE.Application_Lower(swigCPtr);
1259             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1260         }
1261
1262         public void Quit()
1263         {
1264             NDalicPINVOKE.Application_Quit(swigCPtr);
1265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1266         }
1267
1268         internal bool AddIdle(SWIGTYPE_p_Dali__CallbackBase callback)
1269         {
1270             bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback));
1271             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1272             return ret;
1273         }
1274
1275         public Window GetWindow()
1276         {
1277             Window ret = new Window(NDalicPINVOKE.Application_GetWindow(swigCPtr), true);
1278             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1279             return ret;
1280         }
1281
1282         public void ReplaceWindow(Rectangle windowPosition, string name)
1283         {
1284             NDalicPINVOKE.Application_ReplaceWindow(swigCPtr, Rectangle.getCPtr(windowPosition), name);
1285             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1286         }
1287
1288         public static string GetResourcePath()
1289         {
1290             string ret = NDalicPINVOKE.Application_GetResourcePath();
1291             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1292             return ret;
1293         }
1294
1295         internal void SetViewMode(ViewMode viewMode)
1296         {
1297             NDalicPINVOKE.Application_SetViewMode(swigCPtr, (int)viewMode);
1298             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1299         }
1300
1301         internal ViewMode GetViewMode()
1302         {
1303             ViewMode ret = (ViewMode)NDalicPINVOKE.Application_GetViewMode(swigCPtr);
1304             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1305             return ret;
1306         }
1307
1308         public void SetStereoBase(float stereoBase)
1309         {
1310             NDalicPINVOKE.Application_SetStereoBase(swigCPtr, stereoBase);
1311             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1312         }
1313
1314         public float GetStereoBase()
1315         {
1316             float ret = NDalicPINVOKE.Application_GetStereoBase(swigCPtr);
1317             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1318             return ret;
1319         }
1320
1321         internal ApplicationSignal InitSignal()
1322         {
1323             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
1324             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1325             return ret;
1326         }
1327
1328         internal ApplicationSignal TerminateSignal()
1329         {
1330             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_TerminateSignal(swigCPtr), false);
1331             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1332             return ret;
1333         }
1334
1335         internal ApplicationSignal PauseSignal()
1336         {
1337             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_PauseSignal(swigCPtr), false);
1338             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1339             return ret;
1340         }
1341
1342         internal ApplicationSignal ResumeSignal()
1343         {
1344             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResumeSignal(swigCPtr), false);
1345             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1346             return ret;
1347         }
1348
1349         internal ApplicationSignal ResetSignal()
1350         {
1351             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResetSignal(swigCPtr), false);
1352             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1353             return ret;
1354         }
1355
1356         internal ApplicationSignal ResizeSignal()
1357         {
1358             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResizeSignal(swigCPtr), false);
1359             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1360             return ret;
1361         }
1362
1363         internal ApplicationControlSignal AppControlSignal()
1364         {
1365             ApplicationControlSignal ret = new ApplicationControlSignal(NDalicPINVOKE.Application_AppControlSignal(swigCPtr), false);
1366             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1367             return ret;
1368         }
1369
1370         internal ApplicationSignal LanguageChangedSignal()
1371         {
1372             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_LanguageChangedSignal(swigCPtr), false);
1373             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1374             return ret;
1375         }
1376
1377         internal ApplicationSignal RegionChangedSignal()
1378         {
1379             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_RegionChangedSignal(swigCPtr), false);
1380             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1381             return ret;
1382         }
1383
1384         internal ApplicationSignal BatteryLowSignal()
1385         {
1386             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
1387             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1388             return ret;
1389         }
1390
1391         internal ApplicationSignal MemoryLowSignal()
1392         {
1393             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
1394             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1395             return ret;
1396         }
1397
1398         public enum WindowMode
1399         {
1400             Opaque = 0,
1401             Transparent = 1
1402         }
1403
1404     }
1405
1406 }