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