[Tizen] Ensuring that Registry.Unregister is called from the most derived class befor...
[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 = 46;
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 (swigCPtr.Handle != global::System.IntPtr.Zero)
350             {
351                 if (swigCMemOwn)
352                 {
353                     swigCMemOwn = false;
354
355                     //Unreference this instance from Registry.
356                     Registry.Unregister(this);
357
358                     NDalicPINVOKE.delete_Application(swigCPtr);
359                 }
360                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
361             }
362
363             base.Dispose(type);
364         }
365
366         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
367         private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
368         private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
369         private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
370
371
372         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
373         private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
374         private DaliEventHandler<object, NUIApplicationTerminatingEventArgs> _applicationTerminateEventHandler;
375         private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
376
377
378         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
379         private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
380         private DaliEventHandler<object, NUIApplicationPausedEventArgs> _applicationPauseEventHandler;
381         private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
382
383         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
384         private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
385         private DaliEventHandler<object, NUIApplicationResumedEventArgs> _applicationResumeEventHandler;
386         private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
387
388         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
389         private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
390         private DaliEventHandler<object, NUIApplicationResetEventArgs> _applicationResetEventHandler;
391         private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
392
393         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
394         private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
395         private DaliEventHandler<object, NUIApplicationResizedEventArgs> _applicationResizeEventHandler;
396         private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
397
398         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
399         private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
400         private DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
401         private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
402
403
404         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
405         private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
406         private DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
407         private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
408
409         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
410         private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
411         private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
412         private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
413
414         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
415         private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
416         private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
417         private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
418
419         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
420         private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
421         private DaliEventHandler<object, NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
422         private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
423
424         /**
425           * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
426           * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
427           *  provided by the user. Initialized signal is emitted when application is initialised
428           */
429         public event DaliEventHandler<object, NUIApplicationInitEventArgs> Initialized
430         {
431             add
432             {
433                 lock (this)
434                 {
435                     // Restricted to only one listener
436                     if (_applicationInitEventHandler == null)
437                     {
438                         _applicationInitEventHandler += value;
439
440                         _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
441                         this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
442                     }
443                 }
444             }
445
446             remove
447             {
448                 lock (this)
449                 {
450                     if (_applicationInitEventHandler != null)
451                     {
452                         this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
453                     }
454
455                     _applicationInitEventHandler -= value;
456                 }
457             }
458         }
459
460         // Callback for Application InitSignal
461         private void OnApplicationInit(IntPtr data)
462         {
463             // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
464             DisposeQueue.Instance.Initialize();
465             NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
466
467             // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
468             e.Application = Application.GetApplicationFromPtr(data);
469
470             if (_applicationInitEventHandler != null)
471             {
472                 //here we send all data to user event handlers
473                 _applicationInitEventHandler(this, e);
474             }
475         }
476
477         /**
478           * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
479           * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
480           *  provided by the user. Terminated signal is emitted when application is terminating
481           */
482         public event DaliEventHandler<object, NUIApplicationTerminatingEventArgs> Terminating
483         {
484             add
485             {
486                 lock (this)
487                 {
488                     // Restricted to only one listener
489                     if (_applicationTerminateEventHandler == null)
490                     {
491                         _applicationTerminateEventHandler += value;
492
493                         _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
494                         this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
495                     }
496                 }
497             }
498
499             remove
500             {
501                 lock (this)
502                 {
503                     if (_applicationTerminateEventHandler != null)
504                     {
505                         this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
506                     }
507
508                     _applicationTerminateEventHandler -= value;
509                 }
510             }
511         }
512
513         // Callback for Application TerminateSignal
514         private void OnNUIApplicationTerminate(IntPtr data)
515         {
516             NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs();
517
518             // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
519             e.Application = Application.GetApplicationFromPtr(data);
520
521             if (_applicationTerminateEventHandler != null)
522             {
523                 //here we send all data to user event handlers
524                 _applicationTerminateEventHandler(this, e);
525             }
526         }
527
528         /**
529           * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
530           * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
531           * provided by the user. Paused signal is emitted when application is paused
532           */
533         public event DaliEventHandler<object, NUIApplicationPausedEventArgs> Paused
534         {
535             add
536             {
537                 lock (this)
538                 {
539                     // Restricted to only one listener
540                     if (_applicationPauseEventHandler == null)
541                     {
542                         _applicationPauseEventHandler += value;
543
544                         _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
545                         this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
546                     }
547                 }
548             }
549
550             remove
551             {
552                 lock (this)
553                 {
554                     if (_applicationPauseEventHandler != null)
555                     {
556                         this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
557                     }
558
559                     _applicationPauseEventHandler -= value;
560                 }
561             }
562         }
563
564         // Callback for Application PauseSignal
565         private void OnNUIApplicationPause(IntPtr data)
566         {
567             NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs();
568
569             // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
570             e.Application = Application.GetApplicationFromPtr(data);
571
572             if (_applicationPauseEventHandler != null)
573             {
574                 //here we send all data to user event handlers
575                 _applicationPauseEventHandler(this, e);
576             }
577         }
578
579         /**
580           * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
581           * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
582           *  provided by the user. Resumed signal is emitted when application is resumed
583           */
584         public event DaliEventHandler<object, NUIApplicationResumedEventArgs> Resumed
585         {
586             add
587             {
588                 lock (this)
589                 {
590                     // Restricted to only one listener
591                     if (_applicationResumeEventHandler == null)
592                     {
593                         _applicationResumeEventHandler += value;
594
595                         _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
596                         this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
597                     }
598                 }
599             }
600
601             remove
602             {
603                 lock (this)
604                 {
605                     if (_applicationResumeEventHandler != null)
606                     {
607                         this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
608                     }
609
610                     _applicationResumeEventHandler -= value;
611                 }
612             }
613         }
614
615         // Callback for Application ResumeSignal
616         private void OnNUIApplicationResume(IntPtr data)
617         {
618             NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs();
619
620             // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
621             e.Application = Application.GetApplicationFromPtr(data);
622
623             if (_applicationResumeEventHandler != null)
624             {
625                 //here we send all data to user event handlers
626                 _applicationResumeEventHandler(this, e);
627             }
628         }
629
630         /**
631           * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
632           * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
633           *  provided by the user. Reset signal is emitted when application is reset
634           */
635         public event DaliEventHandler<object, NUIApplicationResetEventArgs> Reset
636         {
637             add
638             {
639                 lock (this)
640                 {
641                     // Restricted to only one listener
642                     if (_applicationResetEventHandler == null)
643                     {
644                         _applicationResetEventHandler += value;
645
646                         _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
647                         this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
648                     }
649                 }
650             }
651
652             remove
653             {
654                 lock (this)
655                 {
656                     if (_applicationResetEventHandler != null)
657                     {
658                         this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
659                     }
660
661                     _applicationResetEventHandler -= value;
662                 }
663             }
664         }
665
666         // Callback for Application ResetSignal
667         private void OnNUIApplicationReset(IntPtr data)
668         {
669             NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
670
671             // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
672             e.Application = Application.GetApplicationFromPtr(data);
673
674             if (_applicationResetEventHandler != null)
675             {
676                 //here we send all data to user event handlers
677                 _applicationResetEventHandler(this, e);
678             }
679         }
680
681         /**
682           * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
683           * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
684           *  provided by the user. Resized signal is emitted when application is resized
685           */
686         public event DaliEventHandler<object, NUIApplicationResizedEventArgs> Resized
687         {
688             add
689             {
690                 lock (this)
691                 {
692                     // Restricted to only one listener
693                     if (_applicationResizeEventHandler == null)
694                     {
695                         _applicationResizeEventHandler += value;
696
697                         _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
698                         this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
699                     }
700                 }
701             }
702
703             remove
704             {
705                 lock (this)
706                 {
707                     if (_applicationResizeEventHandler != null)
708                     {
709                         this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
710                     }
711
712                     _applicationResizeEventHandler -= value;
713                 }
714             }
715         }
716
717         // Callback for Application ResizeSignal
718         private void OnNUIApplicationResize(IntPtr data)
719         {
720             NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs();
721
722             // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
723             e.Application = Application.GetApplicationFromPtr(data);
724
725             if (_applicationResizeEventHandler != null)
726             {
727                 //here we send all data to user event handlers
728                 _applicationResizeEventHandler(this, e);
729             }
730         }
731
732         /**
733           * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
734           * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
735           *  provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
736           */
737         public event DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> LanguageChanged
738         {
739             add
740             {
741                 lock (this)
742                 {
743                     // Restricted to only one listener
744                     if (_applicationLanguageChangedEventHandler == null)
745                     {
746                         _applicationLanguageChangedEventHandler += value;
747
748                         _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
749                         this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
750                     }
751                 }
752             }
753
754             remove
755             {
756                 lock (this)
757                 {
758                     if (_applicationLanguageChangedEventHandler != null)
759                     {
760                         this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
761                     }
762
763                     _applicationLanguageChangedEventHandler -= value;
764                 }
765             }
766         }
767
768         // Callback for Application LanguageChangedSignal
769         private void OnNUIApplicationLanguageChanged(IntPtr data)
770         {
771             NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
772
773             // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
774             e.Application = Application.GetApplicationFromPtr(data);
775
776             if (_applicationLanguageChangedEventHandler != null)
777             {
778                 //here we send all data to user event handlers
779                 _applicationLanguageChangedEventHandler(this, e);
780             }
781         }
782
783         /**
784           * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
785           * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
786           *  provided by the user. RegionChanged signal is emitted when the region of the device is changed.
787           */
788         public event DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> RegionChanged
789         {
790             add
791             {
792                 lock (this)
793                 {
794                     // Restricted to only one listener
795                     if (_applicationRegionChangedEventHandler == null)
796                     {
797                         _applicationRegionChangedEventHandler += value;
798
799                         _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
800                         this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
801                     }
802                 }
803             }
804
805             remove
806             {
807                 lock (this)
808                 {
809                     if (_applicationRegionChangedEventHandler != null)
810                     {
811                         this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
812                     }
813
814                     _applicationRegionChangedEventHandler -= value;
815                 }
816             }
817         }
818
819         // Callback for Application RegionChangedSignal
820         private void OnNUIApplicationRegionChanged(IntPtr data)
821         {
822             NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
823
824             // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
825             e.Application = Application.GetApplicationFromPtr(data);
826
827             if (_applicationRegionChangedEventHandler != null)
828             {
829                 //here we send all data to user event handlers
830                 _applicationRegionChangedEventHandler(this, e);
831             }
832         }
833
834         /**
835           * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
836           * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
837           * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
838           */
839         public event DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> BatteryLow
840         {
841             add
842             {
843                 lock (this)
844                 {
845                     // Restricted to only one listener
846                     if (_applicationBatteryLowEventHandler == null)
847                     {
848                         _applicationBatteryLowEventHandler += value;
849
850                         _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
851                         this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
852                     }
853                 }
854             }
855
856             remove
857             {
858                 lock (this)
859                 {
860                     if (_applicationBatteryLowEventHandler != null)
861                     {
862                         this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
863                     }
864
865                     _applicationBatteryLowEventHandler -= value;
866                 }
867             }
868         }
869
870         // Callback for Application BatteryLowSignal
871         private void OnNUIApplicationBatteryLow(IntPtr data)
872         {
873             NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
874
875             // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
876             e.Application = Application.GetApplicationFromPtr(data);
877
878             if (_applicationBatteryLowEventHandler != null)
879             {
880                 //here we send all data to user event handlers
881                 _applicationBatteryLowEventHandler(this, e);
882             }
883         }
884
885         /**
886           * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
887           * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
888           *  provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
889           */
890         public event DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> MemoryLow
891         {
892             add
893             {
894                 lock (this)
895                 {
896                     // Restricted to only one listener
897                     if (_applicationMemoryLowEventHandler == null)
898                     {
899                         _applicationMemoryLowEventHandler += value;
900
901                         _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
902                         this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
903                     }
904                 }
905             }
906
907             remove
908             {
909                 lock (this)
910                 {
911                     if (_applicationMemoryLowEventHandler != null)
912                     {
913                         this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
914                     }
915
916                     _applicationMemoryLowEventHandler -= value;
917                 }
918             }
919         }
920
921         // Callback for Application MemoryLowSignal
922         private void OnNUIApplicationMemoryLow(IntPtr data)
923         {
924             NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
925
926             // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
927             e.Application = Application.GetApplicationFromPtr(data);
928
929             if (_applicationMemoryLowEventHandler != null)
930             {
931                 //here we send all data to user event handlers
932                 _applicationMemoryLowEventHandler(this, e);
933             }
934         }
935
936         /**
937           * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
938           * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
939           *  provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
940           */
941         public event DaliEventHandler<object, NUIApplicationAppControlEventArgs> AppControl
942         {
943             add
944             {
945                 lock (this)
946                 {
947                     // Restricted to only one listener
948                     if (_applicationAppControlEventHandler == null)
949                     {
950                         _applicationAppControlEventHandler += value;
951
952                         _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
953                         this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
954                     }
955                 }
956             }
957
958             remove
959             {
960                 lock (this)
961                 {
962                     if (_applicationAppControlEventHandler != null)
963                     {
964                         this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
965                     }
966
967                     _applicationAppControlEventHandler -= value;
968                 }
969             }
970         }
971
972         // Callback for Application AppControlSignal
973         private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
974         {
975             NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
976
977             // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
978             e.Application = Application.GetApplicationFromPtr(application);
979             e.VoidP = voidp;
980
981             if (_applicationAppControlEventHandler != null)
982             {
983                 //here we send all data to user event handlers
984                 _applicationAppControlEventHandler(this, e);
985             }
986         }
987
988         private static Application _instance; // singleton
989
990         public delegate void InitDelegate();
991
992         public delegate void TerminateDelegate();
993
994         public delegate void PauseDelegate();
995
996         public delegate void ResumeDelegate();
997
998         public delegate void ResizeDelegate();
999
1000         public delegate void AppControlDelegate();
1001
1002         public delegate void LanguageChangedDelegate();
1003
1004         public delegate void RegionChangedDelegate();
1005
1006         public delegate void BatteryLowDelegate();
1007
1008         public delegate void MemoryLowDelegate();
1009
1010         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1011         internal delegate void InitDelegateInternal();
1012
1013         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1014         internal delegate void TerminateDelegateInternal();
1015
1016         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1017         internal delegate void PauseDelegateInternal();
1018
1019         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1020         internal delegate void ResumeDelegateInternal();
1021
1022         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1023         internal delegate void ResizeDelegateInternal();
1024
1025         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1026         internal delegate void AppControlDelegateInternal();
1027
1028         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1029         internal delegate void LanguageChangedDelegateInternal();
1030
1031         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1032         internal delegate void RegionChangedDelegateInternal();
1033
1034         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1035         internal delegate void BatteryLowDelegateInternal();
1036
1037         [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1038         internal delegate void MemoryLowDelegateInternal();
1039
1040         static void Initialization()
1041         {
1042             //  instance.InitDelegate();
1043         }
1044
1045         public static Application Instance
1046         {
1047             get
1048             {
1049                 return _instance;
1050             }
1051         }
1052
1053         public static Application GetApplicationFromPtr(global::System.IntPtr cPtr)
1054         {
1055             Application ret = new Application(cPtr, false);
1056             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1057             return ret;
1058         }
1059
1060         internal void SetupDelegates()
1061         {
1062             InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialization);
1063
1064             NUILog.Debug("InitSignal connection count");
1065
1066             this.InitSignal().Connect(initializeCallback);
1067
1068             NUILog.Debug("InitSignal connection count = " + InitSignal().GetConnectionCount());
1069         }
1070
1071         public static Application NewApplication()
1072         {
1073             _instance = NewApplication("", Application.WindowMode.Opaque);
1074             return _instance;
1075         }
1076
1077         public static Application NewApplication(string stylesheet)
1078         {
1079             _instance = NewApplication(stylesheet, Application.WindowMode.Opaque);
1080             return _instance;
1081         }
1082
1083         public static Application NewApplication(string stylesheet, Application.WindowMode windowMode)
1084         {
1085             {
1086                 int ver1 = -1;
1087                 int ver2 = -1;
1088                 int ver3 = -1;
1089
1090                 try
1091                 {
1092                     if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3))
1093                     {
1094                         if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3)
1095                         {
1096                             //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
1097                             NUILog.Error("Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
1098                         }
1099                     }
1100                     else
1101                     {
1102                         //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
1103                         NUILog.Error("Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
1104                     }
1105                 }
1106                 catch (Exception exc)
1107                 {
1108                     //throw new System.InvalidOperationException("Dali native version is very old! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3);
1109                     NUILog.Error("Dali native version is very old! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
1110                     NUILog.Error("exception occured! =" + exc.Message);
1111                 }
1112                 NUILog.Debug(" Dali native version=" + ver1 + "." + ver2 + "." + ver3 + "       NUI version=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
1113             }
1114             NUILog.Debug(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! ");
1115
1116             // register all Views with the type registry, so that can be created / styled via JSON
1117             //ViewRegistryHelper.Initialize(); //moved to Application side.
1118
1119             Application ret = New(1, stylesheet, windowMode);
1120             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1121
1122             // we've got an application now connect the signals
1123             ret.SetupDelegates();
1124             // set the singleton
1125             _instance = ret;
1126             return ret;
1127         }
1128
1129         //Removed from v0.2.33
1130         /*public bool AddIdle(System.Delegate func)
1131         {
1132             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1133             System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
1134
1135             bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
1136
1137             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1138             return ret;
1139         }*/
1140
1141
1142
1143         /**
1144         * Outer::outer_method(int)
1145         */
1146         public static Application New()
1147         {
1148             NUILog.Debug("New() is called!");
1149
1150             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
1151             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1152             return ret;
1153         }
1154
1155         public static Application New(int argc)
1156         {
1157             NUILog.Debug("New(int argc) is called!");
1158
1159             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
1160             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1161             return ret;
1162         }
1163
1164         public static Application New(int argc, string stylesheet)
1165         {
1166             NUILog.Debug("New(int argc, string stylesheet) is called!");
1167
1168             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
1169             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1170             return ret;
1171         }
1172
1173         public static Application New(int argc, string stylesheet, Application.WindowMode windowMode)
1174         {
1175             NUILog.Debug("New(int argc, string stylesheet, Application.WindowMode windowMode) is called!");
1176
1177             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
1178             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1179             return ret;
1180         }
1181
1182         public static Application New(int argc, string stylesheet, Application.WindowMode windowMode, Rectangle positionSize)
1183         {
1184             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_4(argc, stylesheet, (int)windowMode, Rectangle.getCPtr(positionSize)), true);
1185             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1186             return ret;
1187         }
1188
1189         public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
1190         {
1191             NUILog.Debug("Application() is called!");
1192
1193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1194         }
1195
1196         public Application(Application application) : this(NDalicPINVOKE.new_Application__SWIG_1(Application.getCPtr(application)), true)
1197         {
1198             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1199         }
1200
1201         public Application Assign(Application application)
1202         {
1203             Application ret = new Application(NDalicPINVOKE.Application_Assign(swigCPtr, Application.getCPtr(application)), false);
1204             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1205             return ret;
1206         }
1207
1208         public void MainLoop()
1209         {
1210             NDalicPINVOKE.Application_MainLoop__SWIG_0(swigCPtr);
1211             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1212         }
1213
1214         internal void MainLoop(SWIGTYPE_p_Configuration__ContextLoss configuration)
1215         {
1216             NDalicPINVOKE.Application_MainLoop__SWIG_1(swigCPtr, SWIGTYPE_p_Configuration__ContextLoss.getCPtr(configuration));
1217             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1218         }
1219
1220         public void Lower()
1221         {
1222             NDalicPINVOKE.Application_Lower(swigCPtr);
1223             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1224         }
1225
1226         public void Quit()
1227         {
1228             NDalicPINVOKE.Application_Quit(swigCPtr);
1229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1230         }
1231
1232         internal bool AddIdle(SWIGTYPE_p_Dali__CallbackBase callback)
1233         {
1234             bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback));
1235             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1236             return ret;
1237         }
1238
1239         public Window GetWindow()
1240         {
1241             Window ret = new Window(NDalicPINVOKE.Application_GetWindow(swigCPtr), true);
1242             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1243             return ret;
1244         }
1245
1246         public void ReplaceWindow(Rectangle windowPosition, string name)
1247         {
1248             NDalicPINVOKE.Application_ReplaceWindow(swigCPtr, Rectangle.getCPtr(windowPosition), name);
1249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1250         }
1251
1252         public static string GetResourcePath()
1253         {
1254             string ret = NDalicPINVOKE.Application_GetResourcePath();
1255             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1256             return ret;
1257         }
1258
1259         internal void SetViewMode(ViewMode viewMode)
1260         {
1261             NDalicPINVOKE.Application_SetViewMode(swigCPtr, (int)viewMode);
1262             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1263         }
1264
1265         internal ViewMode GetViewMode()
1266         {
1267             ViewMode ret = (ViewMode)NDalicPINVOKE.Application_GetViewMode(swigCPtr);
1268             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1269             return ret;
1270         }
1271
1272         public void SetStereoBase(float stereoBase)
1273         {
1274             NDalicPINVOKE.Application_SetStereoBase(swigCPtr, stereoBase);
1275             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1276         }
1277
1278         public float GetStereoBase()
1279         {
1280             float ret = NDalicPINVOKE.Application_GetStereoBase(swigCPtr);
1281             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1282             return ret;
1283         }
1284
1285         internal ApplicationSignal InitSignal()
1286         {
1287             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
1288             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1289             return ret;
1290         }
1291
1292         internal ApplicationSignal TerminateSignal()
1293         {
1294             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_TerminateSignal(swigCPtr), false);
1295             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1296             return ret;
1297         }
1298
1299         internal ApplicationSignal PauseSignal()
1300         {
1301             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_PauseSignal(swigCPtr), false);
1302             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1303             return ret;
1304         }
1305
1306         internal ApplicationSignal ResumeSignal()
1307         {
1308             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResumeSignal(swigCPtr), false);
1309             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1310             return ret;
1311         }
1312
1313         internal ApplicationSignal ResetSignal()
1314         {
1315             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResetSignal(swigCPtr), false);
1316             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1317             return ret;
1318         }
1319
1320         internal ApplicationSignal ResizeSignal()
1321         {
1322             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResizeSignal(swigCPtr), false);
1323             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1324             return ret;
1325         }
1326
1327         internal ApplicationControlSignal AppControlSignal()
1328         {
1329             ApplicationControlSignal ret = new ApplicationControlSignal(NDalicPINVOKE.Application_AppControlSignal(swigCPtr), false);
1330             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1331             return ret;
1332         }
1333
1334         internal ApplicationSignal LanguageChangedSignal()
1335         {
1336             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_LanguageChangedSignal(swigCPtr), false);
1337             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1338             return ret;
1339         }
1340
1341         internal ApplicationSignal RegionChangedSignal()
1342         {
1343             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_RegionChangedSignal(swigCPtr), false);
1344             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1345             return ret;
1346         }
1347
1348         internal ApplicationSignal BatteryLowSignal()
1349         {
1350             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
1351             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1352             return ret;
1353         }
1354
1355         internal ApplicationSignal MemoryLowSignal()
1356         {
1357             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
1358             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1359             return ret;
1360         }
1361
1362         public enum WindowMode
1363         {
1364             Opaque = 0,
1365             Transparent = 1
1366         }
1367
1368     }
1369
1370 }