1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 using System.Runtime.InteropServices;
24 * @brief Event arguments that passed via NUIApplicationInit signal
27 internal class NUIApplicationInitEventArgs : EventArgs
29 private Application _application;
32 * @brief Application - is the application that is being initialized
35 public Application Application
49 * @brief Event arguments that passed via NUIApplicationTerminate signal
52 internal class NUIApplicationTerminatingEventArgs : EventArgs
54 private Application _application;
56 * @brief Application - is the application that is being Terminated
59 public Application Application
73 * @brief Event arguments that passed via NUIApplicationPause signal
76 internal class NUIApplicationPausedEventArgs : EventArgs
78 private Application _application;
80 * @brief Application - is the application that is being Paused
83 public Application Application
97 * @brief Event arguments that passed via NUIApplicationResume signal
100 internal class NUIApplicationResumedEventArgs : EventArgs
102 private Application _application;
104 * @brief Application - is the application that is being Resumed
107 public Application Application
115 _application = value;
121 * @brief Event arguments that passed via NUIApplicationReset signal
124 internal class NUIApplicationResetEventArgs : EventArgs
126 private Application _application;
128 * @brief Application - is the application that is being Reset
131 public Application Application
139 _application = value;
145 * @brief Event arguments that passed via NUIApplicationResize signal
148 internal class NUIApplicationResizedEventArgs : EventArgs
150 private Application _application;
152 * @brief Application - is the application that is being Resized
155 public Application Application
163 _application = value;
169 * @brief Event arguments that passed via NUIApplicationLanguageChanged signal
172 internal class NUIApplicationLanguageChangedEventArgs : EventArgs
174 private Application _application;
176 * @brief Application - is the application that is being affected with Device's language change
179 public Application Application
187 _application = value;
193 * @brief Event arguments that passed via NUIApplicationRegionChanged signal
196 internal class NUIApplicationRegionChangedEventArgs : EventArgs
198 private Application _application;
200 * @brief Application - is the application that is being affected with Device's region change
203 public Application Application
211 _application = value;
217 * @brief Event arguments that passed via NUIApplicationBatteryLow signal
220 internal class NUIApplicationBatteryLowEventArgs : EventArgs
222 private Application _application;
224 * @brief Application - is the application that is being affected when the battery level of the device is low
227 public Application Application
235 _application = value;
241 * @brief Event arguments that passed via NUIApplicationMemoryLow signal
244 internal class NUIApplicationMemoryLowEventArgs : EventArgs
246 private Application _application;
248 * @brief Application - is the application that is being affected when the memory level of the device is low
251 public Application Application
259 _application = value;
265 * @brief Event arguments that passed via NUIApplicationAppControl signal
268 internal class NUIApplicationAppControlEventArgs : EventArgs
270 private Application _application;
271 private IntPtr _voidp;
273 * @brief Application - is the application that is receiving the launch request from another application
276 public Application Application
284 _application = value;
288 * @brief VoidP - contains the information about why the application is launched
304 internal class Application : BaseHandle
306 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
308 internal Application(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Application_SWIGUpcast(cPtr), cMemoryOwn)
310 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
313 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Application obj)
315 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
318 protected override void Dispose(DisposeTypes type)
325 if (type == DisposeTypes.Explicit)
328 //Release your own managed resources here.
329 //You should release all of your own disposable objects here.
333 //Release your own unmanaged resources here.
334 //You should not access any managed member here except static instance.
335 //because the execution order of Finalizes is non-deterministic.
337 if (swigCPtr.Handle != global::System.IntPtr.Zero)
342 NDalicPINVOKE.delete_Application(swigCPtr);
344 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
350 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
351 private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
352 private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
353 private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
356 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
357 private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
358 private DaliEventHandler<object, NUIApplicationTerminatingEventArgs> _applicationTerminateEventHandler;
359 private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
362 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
363 private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
364 private DaliEventHandler<object, NUIApplicationPausedEventArgs> _applicationPauseEventHandler;
365 private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
367 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
368 private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
369 private DaliEventHandler<object, NUIApplicationResumedEventArgs> _applicationResumeEventHandler;
370 private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
372 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
373 private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
374 private DaliEventHandler<object, NUIApplicationResetEventArgs> _applicationResetEventHandler;
375 private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
378 private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
379 private DaliEventHandler<object, NUIApplicationResizedEventArgs> _applicationResizeEventHandler;
380 private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
382 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
383 private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
384 private DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
385 private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
388 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
389 private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
390 private DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
391 private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
393 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
394 private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
395 private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
396 private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
398 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
399 private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
400 private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
401 private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
403 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
404 private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
405 private DaliEventHandler<object, NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
406 private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
409 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
410 * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
411 * provided by the user. Initialized signal is emitted when application is initialised
413 public event DaliEventHandler<object, NUIApplicationInitEventArgs> Initialized
419 // Restricted to only one listener
420 if (_applicationInitEventHandler == null)
422 _applicationInitEventHandler += value;
424 _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
425 this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
434 if (_applicationInitEventHandler != null)
436 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
439 _applicationInitEventHandler -= value;
444 // Callback for Application InitSignal
445 private void OnApplicationInit(IntPtr data)
447 // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
448 DisposeQueue.Instance.Initialize();
449 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
451 // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
452 e.Application = Application.GetApplicationFromPtr(data);
454 if (_applicationInitEventHandler != null)
456 //here we send all data to user event handlers
457 _applicationInitEventHandler(this, e);
462 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
463 * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
464 * provided by the user. Terminated signal is emitted when application is terminating
466 public event DaliEventHandler<object, NUIApplicationTerminatingEventArgs> Terminating
472 // Restricted to only one listener
473 if (_applicationTerminateEventHandler == null)
475 _applicationTerminateEventHandler += value;
477 _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
478 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
487 if (_applicationTerminateEventHandler != null)
489 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
492 _applicationTerminateEventHandler -= value;
497 // Callback for Application TerminateSignal
498 private void OnNUIApplicationTerminate(IntPtr data)
500 NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs();
502 // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
503 e.Application = Application.GetApplicationFromPtr(data);
505 if (_applicationTerminateEventHandler != null)
507 //here we send all data to user event handlers
508 _applicationTerminateEventHandler(this, e);
513 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
514 * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
515 * provided by the user. Paused signal is emitted when application is paused
517 public event DaliEventHandler<object, NUIApplicationPausedEventArgs> Paused
523 // Restricted to only one listener
524 if (_applicationPauseEventHandler == null)
526 _applicationPauseEventHandler += value;
528 _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
529 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
538 if (_applicationPauseEventHandler != null)
540 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
543 _applicationPauseEventHandler -= value;
548 // Callback for Application PauseSignal
549 private void OnNUIApplicationPause(IntPtr data)
551 NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs();
553 // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
554 e.Application = Application.GetApplicationFromPtr(data);
556 if (_applicationPauseEventHandler != null)
558 //here we send all data to user event handlers
559 _applicationPauseEventHandler(this, e);
564 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
565 * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
566 * provided by the user. Resumed signal is emitted when application is resumed
568 public event DaliEventHandler<object, NUIApplicationResumedEventArgs> Resumed
574 // Restricted to only one listener
575 if (_applicationResumeEventHandler == null)
577 _applicationResumeEventHandler += value;
579 _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
580 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
589 if (_applicationResumeEventHandler != null)
591 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
594 _applicationResumeEventHandler -= value;
599 // Callback for Application ResumeSignal
600 private void OnNUIApplicationResume(IntPtr data)
602 NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs();
604 // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
605 e.Application = Application.GetApplicationFromPtr(data);
607 if (_applicationResumeEventHandler != null)
609 //here we send all data to user event handlers
610 _applicationResumeEventHandler(this, e);
615 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
616 * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
617 * provided by the user. Reset signal is emitted when application is reset
619 public event DaliEventHandler<object, NUIApplicationResetEventArgs> Reset
625 // Restricted to only one listener
626 if (_applicationResetEventHandler == null)
628 _applicationResetEventHandler += value;
630 _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
631 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
640 if (_applicationResetEventHandler != null)
642 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
645 _applicationResetEventHandler -= value;
650 // Callback for Application ResetSignal
651 private void OnNUIApplicationReset(IntPtr data)
653 NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
655 // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
656 e.Application = Application.GetApplicationFromPtr(data);
658 if (_applicationResetEventHandler != null)
660 //here we send all data to user event handlers
661 _applicationResetEventHandler(this, e);
666 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
667 * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
668 * provided by the user. Resized signal is emitted when application is resized
670 public event DaliEventHandler<object, NUIApplicationResizedEventArgs> Resized
676 // Restricted to only one listener
677 if (_applicationResizeEventHandler == null)
679 _applicationResizeEventHandler += value;
681 _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
682 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
691 if (_applicationResizeEventHandler != null)
693 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
696 _applicationResizeEventHandler -= value;
701 // Callback for Application ResizeSignal
702 private void OnNUIApplicationResize(IntPtr data)
704 NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs();
706 // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
707 e.Application = Application.GetApplicationFromPtr(data);
709 if (_applicationResizeEventHandler != null)
711 //here we send all data to user event handlers
712 _applicationResizeEventHandler(this, e);
717 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
718 * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
719 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
721 public event DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> LanguageChanged
727 // Restricted to only one listener
728 if (_applicationLanguageChangedEventHandler == null)
730 _applicationLanguageChangedEventHandler += value;
732 _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
733 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
742 if (_applicationLanguageChangedEventHandler != null)
744 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
747 _applicationLanguageChangedEventHandler -= value;
752 // Callback for Application LanguageChangedSignal
753 private void OnNUIApplicationLanguageChanged(IntPtr data)
755 NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
757 // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
758 e.Application = Application.GetApplicationFromPtr(data);
760 if (_applicationLanguageChangedEventHandler != null)
762 //here we send all data to user event handlers
763 _applicationLanguageChangedEventHandler(this, e);
768 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
769 * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
770 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
772 public event DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> RegionChanged
778 // Restricted to only one listener
779 if (_applicationRegionChangedEventHandler == null)
781 _applicationRegionChangedEventHandler += value;
783 _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
784 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
793 if (_applicationRegionChangedEventHandler != null)
795 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
798 _applicationRegionChangedEventHandler -= value;
803 // Callback for Application RegionChangedSignal
804 private void OnNUIApplicationRegionChanged(IntPtr data)
806 NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
808 // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
809 e.Application = Application.GetApplicationFromPtr(data);
811 if (_applicationRegionChangedEventHandler != null)
813 //here we send all data to user event handlers
814 _applicationRegionChangedEventHandler(this, e);
819 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
820 * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
821 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
823 public event DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> BatteryLow
829 // Restricted to only one listener
830 if (_applicationBatteryLowEventHandler == null)
832 _applicationBatteryLowEventHandler += value;
834 _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
835 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
844 if (_applicationBatteryLowEventHandler != null)
846 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
849 _applicationBatteryLowEventHandler -= value;
854 // Callback for Application BatteryLowSignal
855 private void OnNUIApplicationBatteryLow(IntPtr data)
857 NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
859 // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
860 e.Application = Application.GetApplicationFromPtr(data);
862 if (_applicationBatteryLowEventHandler != null)
864 //here we send all data to user event handlers
865 _applicationBatteryLowEventHandler(this, e);
870 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
871 * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
872 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
874 public event DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> MemoryLow
880 // Restricted to only one listener
881 if (_applicationMemoryLowEventHandler == null)
883 _applicationMemoryLowEventHandler += value;
885 _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
886 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
895 if (_applicationMemoryLowEventHandler != null)
897 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
900 _applicationMemoryLowEventHandler -= value;
905 // Callback for Application MemoryLowSignal
906 private void OnNUIApplicationMemoryLow(IntPtr data)
908 NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
910 // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
911 e.Application = Application.GetApplicationFromPtr(data);
913 if (_applicationMemoryLowEventHandler != null)
915 //here we send all data to user event handlers
916 _applicationMemoryLowEventHandler(this, e);
921 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
922 * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
923 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
925 public event DaliEventHandler<object, NUIApplicationAppControlEventArgs> AppControl
931 // Restricted to only one listener
932 if (_applicationAppControlEventHandler == null)
934 _applicationAppControlEventHandler += value;
936 _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
937 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
946 if (_applicationAppControlEventHandler != null)
948 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
951 _applicationAppControlEventHandler -= value;
956 // Callback for Application AppControlSignal
957 private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
959 NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
961 // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
962 e.Application = Application.GetApplicationFromPtr(application);
965 if (_applicationAppControlEventHandler != null)
967 //here we send all data to user event handlers
968 _applicationAppControlEventHandler(this, e);
972 private static Application _instance; // singleton
974 public delegate void InitDelegate();
976 public delegate void TerminateDelegate();
978 public delegate void PauseDelegate();
980 public delegate void ResumeDelegate();
982 public delegate void ResizeDelegate();
984 public delegate void AppControlDelegate();
986 public delegate void LanguageChangedDelegate();
988 public delegate void RegionChangedDelegate();
990 public delegate void BatteryLowDelegate();
992 public delegate void MemoryLowDelegate();
994 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
995 internal delegate void InitDelegateInternal();
997 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
998 internal delegate void TerminateDelegateInternal();
1000 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1001 internal delegate void PauseDelegateInternal();
1003 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1004 internal delegate void ResumeDelegateInternal();
1006 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1007 internal delegate void ResizeDelegateInternal();
1009 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1010 internal delegate void AppControlDelegateInternal();
1012 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1013 internal delegate void LanguageChangedDelegateInternal();
1015 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1016 internal delegate void RegionChangedDelegateInternal();
1018 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1019 internal delegate void BatteryLowDelegateInternal();
1021 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1022 internal delegate void MemoryLowDelegateInternal();
1024 static void Initialization()
1026 // instance.InitDelegate();
1029 public static Application Instance
1037 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr)
1039 Application ret = new Application(cPtr, false);
1040 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1044 internal void SetupDelegates()
1046 InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialization);
1048 NUILog.Debug("InitSignal connection count");
1050 this.InitSignal().Connect(initializeCallback);
1052 NUILog.Debug("InitSignal connection count = " + InitSignal().GetConnectionCount());
1055 public static Application NewApplication()
1057 _instance = NewApplication("", Application.WindowMode.Opaque);
1061 public static Application NewApplication(string stylesheet)
1063 _instance = NewApplication(stylesheet, Application.WindowMode.Opaque);
1067 public static Application NewApplication(string stylesheet, Application.WindowMode windowMode)
1069 // register all Views with the type registry, so that can be created / styled via JSON
1070 //ViewRegistryHelper.Initialize(); //moved to Application side.
1072 Application ret = New(1, stylesheet, windowMode);
1073 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1075 // we've got an application now connect the signals
1076 ret.SetupDelegates();
1077 // set the singleton
1082 //Removed from v0.2.33
1083 /*public bool AddIdle(System.Delegate func)
1085 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1086 System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
1088 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
1090 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1097 * Outer::outer_method(int)
1099 public static Application New()
1101 NUILog.Debug("New() is called!");
1103 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
1104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1108 public static Application New(int argc)
1110 NUILog.Debug("New(int argc) is called!");
1112 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
1113 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1117 public static Application New(int argc, string stylesheet)
1119 NUILog.Debug("New(int argc, string stylesheet) is called!");
1121 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
1122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1126 public static Application New(int argc, string stylesheet, Application.WindowMode windowMode)
1128 NUILog.Debug("New(int argc, string stylesheet, Application.WindowMode windowMode) is called!");
1130 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
1131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1135 public static Application New(int argc, string stylesheet, Application.WindowMode windowMode, Rectangle positionSize)
1137 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_4(argc, stylesheet, (int)windowMode, Rectangle.getCPtr(positionSize)), true);
1138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1142 public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
1144 NUILog.Debug("Application() is called!");
1146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1149 public Application(Application application) : this(NDalicPINVOKE.new_Application__SWIG_1(Application.getCPtr(application)), true)
1151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1154 public Application Assign(Application application)
1156 Application ret = new Application(NDalicPINVOKE.Application_Assign(swigCPtr, Application.getCPtr(application)), false);
1157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1161 public void MainLoop()
1163 NDalicPINVOKE.Application_MainLoop__SWIG_0(swigCPtr);
1164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1167 internal void MainLoop(SWIGTYPE_p_Configuration__ContextLoss configuration)
1169 NDalicPINVOKE.Application_MainLoop__SWIG_1(swigCPtr, SWIGTYPE_p_Configuration__ContextLoss.getCPtr(configuration));
1170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1175 NDalicPINVOKE.Application_Lower(swigCPtr);
1176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1181 NDalicPINVOKE.Application_Quit(swigCPtr);
1182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1185 internal bool AddIdle(SWIGTYPE_p_Dali__CallbackBase callback)
1187 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback));
1188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1192 public Window GetWindow()
1194 Window ret = new Window(NDalicPINVOKE.Application_GetWindow(swigCPtr), true);
1195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1199 public void ReplaceWindow(Rectangle windowPosition, string name)
1201 NDalicPINVOKE.Application_ReplaceWindow(swigCPtr, Rectangle.getCPtr(windowPosition), name);
1202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1205 public static string GetResourcePath()
1207 string ret = NDalicPINVOKE.Application_GetResourcePath();
1208 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1212 internal void SetViewMode(ViewMode viewMode)
1214 NDalicPINVOKE.Application_SetViewMode(swigCPtr, (int)viewMode);
1215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1218 internal ViewMode GetViewMode()
1220 ViewMode ret = (ViewMode)NDalicPINVOKE.Application_GetViewMode(swigCPtr);
1221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1225 public void SetStereoBase(float stereoBase)
1227 NDalicPINVOKE.Application_SetStereoBase(swigCPtr, stereoBase);
1228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1231 public float GetStereoBase()
1233 float ret = NDalicPINVOKE.Application_GetStereoBase(swigCPtr);
1234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1238 internal ApplicationSignal InitSignal()
1240 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
1241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1245 internal ApplicationSignal TerminateSignal()
1247 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_TerminateSignal(swigCPtr), false);
1248 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1252 internal ApplicationSignal PauseSignal()
1254 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_PauseSignal(swigCPtr), false);
1255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1259 internal ApplicationSignal ResumeSignal()
1261 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResumeSignal(swigCPtr), false);
1262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1266 internal ApplicationSignal ResetSignal()
1268 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResetSignal(swigCPtr), false);
1269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1273 internal ApplicationSignal ResizeSignal()
1275 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResizeSignal(swigCPtr), false);
1276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1280 internal ApplicationControlSignal AppControlSignal()
1282 ApplicationControlSignal ret = new ApplicationControlSignal(NDalicPINVOKE.Application_AppControlSignal(swigCPtr), false);
1283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1287 internal ApplicationSignal LanguageChangedSignal()
1289 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_LanguageChangedSignal(swigCPtr), false);
1290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1294 internal ApplicationSignal RegionChangedSignal()
1296 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_RegionChangedSignal(swigCPtr), false);
1297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1301 internal ApplicationSignal BatteryLowSignal()
1303 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
1304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1308 internal ApplicationSignal MemoryLowSignal()
1310 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
1311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1315 public enum WindowMode