1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
15 using System.Runtime.InteropServices;
17 //This version should be updated and synced for every Dali native release
18 internal static class Version
20 public const int ver1 = 1;
21 public const int ver2 = 2;
22 public const int ver3 = 34;
23 public const int nuiVer1 = 0;
24 public const int nuiVer2 = 2;
25 public const int nuiVer3 = 34;
26 public const string nuiRelease = "";
30 * @brief Event arguments that passed via NUIApplicationInit signal
33 internal class NUIApplicationInitEventArgs : EventArgs
35 private Application _application;
38 * @brief Application - is the application that is being initialized
41 public Application Application
55 * @brief Event arguments that passed via NUIApplicationTerminate signal
58 internal class NUIApplicationTerminateEventArgs : EventArgs
60 private Application _application;
62 * @brief Application - is the application that is being Terminated
65 public Application Application
79 * @brief Event arguments that passed via NUIApplicationPause signal
82 internal class NUIApplicationPauseEventArgs : EventArgs
84 private Application _application;
86 * @brief Application - is the application that is being Paused
89 public Application Application
103 * @brief Event arguments that passed via NUIApplicationResume signal
106 internal class NUIApplicationResumeEventArgs : EventArgs
108 private Application _application;
110 * @brief Application - is the application that is being Resumed
113 public Application Application
121 _application = value;
127 * @brief Event arguments that passed via NUIApplicationReset signal
130 internal class NUIApplicationResetEventArgs : EventArgs
132 private Application _application;
134 * @brief Application - is the application that is being Reset
137 public Application Application
145 _application = value;
151 * @brief Event arguments that passed via NUIApplicationResize signal
154 internal class NUIApplicationResizeEventArgs : EventArgs
156 private Application _application;
158 * @brief Application - is the application that is being Resized
161 public Application Application
169 _application = value;
175 * @brief Event arguments that passed via NUIApplicationLanguageChanged signal
178 internal class NUIApplicationLanguageChangedEventArgs : EventArgs
180 private Application _application;
182 * @brief Application - is the application that is being affected with Device's language change
185 public Application Application
193 _application = value;
199 * @brief Event arguments that passed via NUIApplicationRegionChanged signal
202 internal class NUIApplicationRegionChangedEventArgs : EventArgs
204 private Application _application;
206 * @brief Application - is the application that is being affected with Device's region change
209 public Application Application
217 _application = value;
223 * @brief Event arguments that passed via NUIApplicationBatteryLow signal
226 internal class NUIApplicationBatteryLowEventArgs : EventArgs
228 private Application _application;
230 * @brief Application - is the application that is being affected when the battery level of the device is low
233 public Application Application
241 _application = value;
247 * @brief Event arguments that passed via NUIApplicationMemoryLow signal
250 internal class NUIApplicationMemoryLowEventArgs : EventArgs
252 private Application _application;
254 * @brief Application - is the application that is being affected when the memory level of the device is low
257 public Application Application
265 _application = value;
271 * @brief Event arguments that passed via NUIApplicationAppControl signal
274 internal class NUIApplicationAppControlEventArgs : EventArgs
276 private Application _application;
277 private IntPtr _voidp;
279 * @brief Application - is the application that is receiving the launch request from another application
282 public Application Application
290 _application = value;
294 * @brief VoidP - contains the information about why the application is launched
310 internal class Application : BaseHandle
312 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
314 internal Application(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Application_SWIGUpcast(cPtr), cMemoryOwn)
316 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
319 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Application obj)
321 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
326 DisposeQueue.Instance.Add(this);
329 public override void Dispose()
331 if (!Stage.IsInstalled())
333 DisposeQueue.Instance.Add(this);
339 if (swigCPtr.Handle != global::System.IntPtr.Zero)
344 NDalicPINVOKE.delete_Application(swigCPtr);
346 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
348 global::System.GC.SuppressFinalize(this);
353 private static void LOG(string str)
355 //Tizen.Log.Debug("NUI", str);
358 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359 private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
360 private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
361 private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
364 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
365 private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
366 private DaliEventHandler<object, NUIApplicationTerminateEventArgs> _applicationTerminateEventHandler;
367 private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
370 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
371 private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
372 private DaliEventHandler<object, NUIApplicationPauseEventArgs> _applicationPauseEventHandler;
373 private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
375 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
376 private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
377 private DaliEventHandler<object, NUIApplicationResumeEventArgs> _applicationResumeEventHandler;
378 private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
380 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
381 private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
382 private DaliEventHandler<object, NUIApplicationResetEventArgs> _applicationResetEventHandler;
383 private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
385 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
386 private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
387 private DaliEventHandler<object, NUIApplicationResizeEventArgs> _applicationResizeEventHandler;
388 private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
390 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
391 private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
392 private DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
393 private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
396 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
397 private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
398 private DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
399 private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
401 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
402 private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
403 private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
404 private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
406 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
407 private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
408 private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
409 private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
411 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
412 private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
413 private DaliEventHandler<object, NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
414 private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
417 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
418 * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
419 * provided by the user. Initialized signal is emitted when application is initialised
421 public event DaliEventHandler<object, NUIApplicationInitEventArgs> Initialized
427 // Restricted to only one listener
428 if (_applicationInitEventHandler == null)
430 _applicationInitEventHandler += value;
432 _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
433 this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
442 if (_applicationInitEventHandler != null)
444 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
447 _applicationInitEventHandler -= value;
452 // Callback for Application InitSignal
453 private void OnApplicationInit(IntPtr data)
455 // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
456 DisposeQueue.Instance.Initialize();
457 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
459 // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
460 e.Application = Application.GetApplicationFromPtr(data);
462 if (_applicationInitEventHandler != null)
464 //here we send all data to user event handlers
465 _applicationInitEventHandler(this, e);
470 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
471 * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
472 * provided by the user. Terminated signal is emitted when application is terminated
474 public event DaliEventHandler<object, NUIApplicationTerminateEventArgs> Terminated
480 // Restricted to only one listener
481 if (_applicationTerminateEventHandler == null)
483 _applicationTerminateEventHandler += value;
485 _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
486 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
495 if (_applicationTerminateEventHandler != null)
497 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
500 _applicationTerminateEventHandler -= value;
505 // Callback for Application TerminateSignal
506 private void OnNUIApplicationTerminate(IntPtr data)
508 NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs();
510 // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
511 e.Application = Application.GetApplicationFromPtr(data);
513 if (_applicationTerminateEventHandler != null)
515 //here we send all data to user event handlers
516 _applicationTerminateEventHandler(this, e);
521 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
522 * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
523 * provided by the user. Paused signal is emitted when application is paused
525 public event DaliEventHandler<object, NUIApplicationPauseEventArgs> Paused
531 // Restricted to only one listener
532 if (_applicationPauseEventHandler == null)
534 _applicationPauseEventHandler += value;
536 _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
537 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
546 if (_applicationPauseEventHandler != null)
548 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
551 _applicationPauseEventHandler -= value;
556 // Callback for Application PauseSignal
557 private void OnNUIApplicationPause(IntPtr data)
559 NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs();
561 // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
562 e.Application = Application.GetApplicationFromPtr(data);
564 if (_applicationPauseEventHandler != null)
566 //here we send all data to user event handlers
567 _applicationPauseEventHandler(this, e);
572 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
573 * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
574 * provided by the user. Resumed signal is emitted when application is resumed
576 public event DaliEventHandler<object, NUIApplicationResumeEventArgs> Resumed
582 // Restricted to only one listener
583 if (_applicationResumeEventHandler == null)
585 _applicationResumeEventHandler += value;
587 _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
588 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
597 if (_applicationResumeEventHandler != null)
599 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
602 _applicationResumeEventHandler -= value;
607 // Callback for Application ResumeSignal
608 private void OnNUIApplicationResume(IntPtr data)
610 NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs();
612 // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
613 e.Application = Application.GetApplicationFromPtr(data);
615 if (_applicationResumeEventHandler != null)
617 //here we send all data to user event handlers
618 _applicationResumeEventHandler(this, e);
623 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
624 * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
625 * provided by the user. Reset signal is emitted when application is reset
627 public event DaliEventHandler<object, NUIApplicationResetEventArgs> Reset
633 // Restricted to only one listener
634 if (_applicationResetEventHandler == null)
636 _applicationResetEventHandler += value;
638 _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
639 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
648 if (_applicationResetEventHandler != null)
650 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
653 _applicationResetEventHandler -= value;
658 // Callback for Application ResetSignal
659 private void OnNUIApplicationReset(IntPtr data)
661 NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
663 // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
664 e.Application = Application.GetApplicationFromPtr(data);
666 if (_applicationResetEventHandler != null)
668 //here we send all data to user event handlers
669 _applicationResetEventHandler(this, e);
674 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
675 * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
676 * provided by the user. Resized signal is emitted when application is resized
678 public event DaliEventHandler<object, NUIApplicationResizeEventArgs> Resized
684 // Restricted to only one listener
685 if (_applicationResizeEventHandler == null)
687 _applicationResizeEventHandler += value;
689 _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
690 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
699 if (_applicationResizeEventHandler != null)
701 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
704 _applicationResizeEventHandler -= value;
709 // Callback for Application ResizeSignal
710 private void OnNUIApplicationResize(IntPtr data)
712 NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs();
714 // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
715 e.Application = Application.GetApplicationFromPtr(data);
717 if (_applicationResizeEventHandler != null)
719 //here we send all data to user event handlers
720 _applicationResizeEventHandler(this, e);
725 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
726 * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
727 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
729 public event DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> LanguageChanged
735 // Restricted to only one listener
736 if (_applicationLanguageChangedEventHandler == null)
738 _applicationLanguageChangedEventHandler += value;
740 _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
741 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
750 if (_applicationLanguageChangedEventHandler != null)
752 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
755 _applicationLanguageChangedEventHandler -= value;
760 // Callback for Application LanguageChangedSignal
761 private void OnNUIApplicationLanguageChanged(IntPtr data)
763 NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
765 // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
766 e.Application = Application.GetApplicationFromPtr(data);
768 if (_applicationLanguageChangedEventHandler != null)
770 //here we send all data to user event handlers
771 _applicationLanguageChangedEventHandler(this, e);
776 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
777 * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
778 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
780 public event DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> RegionChanged
786 // Restricted to only one listener
787 if (_applicationRegionChangedEventHandler == null)
789 _applicationRegionChangedEventHandler += value;
791 _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
792 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
801 if (_applicationRegionChangedEventHandler != null)
803 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
806 _applicationRegionChangedEventHandler -= value;
811 // Callback for Application RegionChangedSignal
812 private void OnNUIApplicationRegionChanged(IntPtr data)
814 NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
816 // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
817 e.Application = Application.GetApplicationFromPtr(data);
819 if (_applicationRegionChangedEventHandler != null)
821 //here we send all data to user event handlers
822 _applicationRegionChangedEventHandler(this, e);
827 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
828 * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
829 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
831 public event DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> BatteryLow
837 // Restricted to only one listener
838 if (_applicationBatteryLowEventHandler == null)
840 _applicationBatteryLowEventHandler += value;
842 _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
843 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
852 if (_applicationBatteryLowEventHandler != null)
854 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
857 _applicationBatteryLowEventHandler -= value;
862 // Callback for Application BatteryLowSignal
863 private void OnNUIApplicationBatteryLow(IntPtr data)
865 NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
867 // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
868 e.Application = Application.GetApplicationFromPtr(data);
870 if (_applicationBatteryLowEventHandler != null)
872 //here we send all data to user event handlers
873 _applicationBatteryLowEventHandler(this, e);
878 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
879 * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
880 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
882 public event DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> MemoryLow
888 // Restricted to only one listener
889 if (_applicationMemoryLowEventHandler == null)
891 _applicationMemoryLowEventHandler += value;
893 _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
894 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
903 if (_applicationMemoryLowEventHandler != null)
905 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
908 _applicationMemoryLowEventHandler -= value;
913 // Callback for Application MemoryLowSignal
914 private void OnNUIApplicationMemoryLow(IntPtr data)
916 NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
918 // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
919 e.Application = Application.GetApplicationFromPtr(data);
921 if (_applicationMemoryLowEventHandler != null)
923 //here we send all data to user event handlers
924 _applicationMemoryLowEventHandler(this, e);
929 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
930 * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
931 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
933 public event DaliEventHandler<object, NUIApplicationAppControlEventArgs> AppControl
939 // Restricted to only one listener
940 if (_applicationAppControlEventHandler == null)
942 _applicationAppControlEventHandler += value;
944 _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
945 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
954 if (_applicationAppControlEventHandler != null)
956 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
959 _applicationAppControlEventHandler -= value;
964 // Callback for Application AppControlSignal
965 private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
967 NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
969 // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
970 e.Application = Application.GetApplicationFromPtr(application);
973 if (_applicationAppControlEventHandler != null)
975 //here we send all data to user event handlers
976 _applicationAppControlEventHandler(this, e);
980 private static Application _instance; // singleton
982 public delegate void InitDelegate();
984 public delegate void TerminateDelegate();
986 public delegate void PauseDelegate();
988 public delegate void ResumeDelegate();
990 public delegate void ResizeDelegate();
992 public delegate void AppControlDelegate();
994 public delegate void LanguageChangedDelegate();
996 public delegate void RegionChangedDelegate();
998 public delegate void BatteryLowDelegate();
1000 public delegate void MemoryLowDelegate();
1002 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1003 internal delegate void InitDelegateInternal();
1005 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1006 internal delegate void TerminateDelegateInternal();
1008 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1009 internal delegate void PauseDelegateInternal();
1011 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1012 internal delegate void ResumeDelegateInternal();
1014 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1015 internal delegate void ResizeDelegateInternal();
1017 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1018 internal delegate void AppControlDelegateInternal();
1020 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1021 internal delegate void LanguageChangedDelegateInternal();
1023 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1024 internal delegate void RegionChangedDelegateInternal();
1026 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1027 internal delegate void BatteryLowDelegateInternal();
1029 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1030 internal delegate void MemoryLowDelegateInternal();
1032 static void Initialize()
1034 // instance.InitDelegate();
1037 public static Application Instance
1045 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr)
1047 Application ret = new Application(cPtr, false);
1048 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1052 internal void SetupDelegates()
1054 InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialize);
1055 System.Console.WriteLine("InitSignal connection count");
1057 this.InitSignal().Connect(initializeCallback);
1058 //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
1061 public static Application NewApplication()
1063 _instance = NewApplication("", Application.WindowMode.Opaque);
1067 public static Application NewApplication(string stylesheet)
1069 _instance = NewApplication(stylesheet, Application.WindowMode.Opaque);
1073 public static Application NewApplication(string stylesheet, Application.WindowMode windowMode)
1082 if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3))
1084 if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3)
1086 //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
1087 Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
1092 //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
1093 Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
1098 //throw new System.InvalidOperationException("Dali native version is very old! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3);
1099 Tizen.Log.Fatal("NUI", "Dali native version is very old! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
1103 LOG(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! ");
1105 // register all Views with the type registry, so that can be created / styled via JSON
1106 ViewRegistryHelper.Initialize();
1108 Application ret = New(1, stylesheet, windowMode);
1109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1111 // we've got an application now connect the signals
1112 ret.SetupDelegates();
1113 // set the singleton
1118 //Removed from v0.2.33
1119 /*public bool AddIdle(System.Delegate func)
1121 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1122 System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
1124 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
1126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1133 * Outer::outer_method(int)
1135 public static Application New()
1137 LOG("New() is called!");
1139 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
1140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1144 public static Application New(int argc)
1146 LOG("New(int argc) is called!");
1148 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
1149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1153 public static Application New(int argc, string stylesheet)
1155 LOG("New(int argc, string stylesheet) is called!");
1157 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
1158 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1162 public static Application New(int argc, string stylesheet, Application.WindowMode windowMode)
1164 LOG("New(int argc, string stylesheet, Application.WindowMode windowMode) is called!");
1166 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
1167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1171 public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
1173 LOG("Application() is called!");
1175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1178 public Application(Application application) : this(NDalicPINVOKE.new_Application__SWIG_1(Application.getCPtr(application)), true)
1180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1183 public Application Assign(Application application)
1185 Application ret = new Application(NDalicPINVOKE.Application_Assign(swigCPtr, Application.getCPtr(application)), false);
1186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1190 public void MainLoop()
1192 NDalicPINVOKE.Application_MainLoop__SWIG_0(swigCPtr);
1193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1196 internal void MainLoop(SWIGTYPE_p_Configuration__ContextLoss configuration)
1198 NDalicPINVOKE.Application_MainLoop__SWIG_1(swigCPtr, SWIGTYPE_p_Configuration__ContextLoss.getCPtr(configuration));
1199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1204 NDalicPINVOKE.Application_Lower(swigCPtr);
1205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1210 NDalicPINVOKE.Application_Quit(swigCPtr);
1211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1214 internal bool AddIdle(SWIGTYPE_p_Dali__CallbackBase callback)
1216 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback));
1217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1221 public Window GetWindow()
1223 Window ret = new Window(NDalicPINVOKE.Application_GetWindow(swigCPtr), true);
1224 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1228 public void ReplaceWindow(Rectangle windowPosition, string name)
1230 NDalicPINVOKE.Application_ReplaceWindow(swigCPtr, Rectangle.getCPtr(windowPosition), name);
1231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1234 public static string GetResourcePath()
1236 string ret = NDalicPINVOKE.Application_GetResourcePath();
1237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1241 internal void SetViewMode(ViewMode viewMode)
1243 NDalicPINVOKE.Application_SetViewMode(swigCPtr, (int)viewMode);
1244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1247 internal ViewMode GetViewMode()
1249 ViewMode ret = (ViewMode)NDalicPINVOKE.Application_GetViewMode(swigCPtr);
1250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1254 public void SetStereoBase(float stereoBase)
1256 NDalicPINVOKE.Application_SetStereoBase(swigCPtr, stereoBase);
1257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1260 public float GetStereoBase()
1262 float ret = NDalicPINVOKE.Application_GetStereoBase(swigCPtr);
1263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1267 internal ApplicationSignal InitSignal()
1269 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
1270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1274 internal ApplicationSignal TerminateSignal()
1276 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_TerminateSignal(swigCPtr), false);
1277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1281 internal ApplicationSignal PauseSignal()
1283 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_PauseSignal(swigCPtr), false);
1284 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1288 internal ApplicationSignal ResumeSignal()
1290 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResumeSignal(swigCPtr), false);
1291 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1295 internal ApplicationSignal ResetSignal()
1297 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResetSignal(swigCPtr), false);
1298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1302 internal ApplicationSignal ResizeSignal()
1304 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResizeSignal(swigCPtr), false);
1305 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1309 internal ApplicationControlSignal AppControlSignal()
1311 ApplicationControlSignal ret = new ApplicationControlSignal(NDalicPINVOKE.Application_AppControlSignal(swigCPtr), false);
1312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1316 internal ApplicationSignal LanguageChangedSignal()
1318 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_LanguageChangedSignal(swigCPtr), false);
1319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1323 internal ApplicationSignal RegionChangedSignal()
1325 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_RegionChangedSignal(swigCPtr), false);
1326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1330 internal ApplicationSignal BatteryLowSignal()
1332 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
1333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1337 internal ApplicationSignal MemoryLowSignal()
1339 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
1340 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1344 public enum WindowMode