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