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 = 37;
23 public const int nuiVer1 = 0;
24 public const int nuiVer2 = 2;
25 public const int nuiVer3 = 37;
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;
324 public override void Dispose()
326 if (!Window.IsInstalled())
328 DisposeQueue.Instance.Add(this);
334 if (swigCPtr.Handle != global::System.IntPtr.Zero)
339 NDalicPINVOKE.delete_Application(swigCPtr);
341 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
343 global::System.GC.SuppressFinalize(this);
348 private static void LOG(string str)
351 Tizen.Log.Debug("NUI", str);
355 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
356 private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
357 private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
358 private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
361 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
362 private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
363 private DaliEventHandler<object, NUIApplicationTerminateEventArgs> _applicationTerminateEventHandler;
364 private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
367 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
368 private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
369 private DaliEventHandler<object, NUIApplicationPauseEventArgs> _applicationPauseEventHandler;
370 private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
372 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
373 private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
374 private DaliEventHandler<object, NUIApplicationResumeEventArgs> _applicationResumeEventHandler;
375 private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
378 private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
379 private DaliEventHandler<object, NUIApplicationResetEventArgs> _applicationResetEventHandler;
380 private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
382 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
383 private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
384 private DaliEventHandler<object, NUIApplicationResizeEventArgs> _applicationResizeEventHandler;
385 private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
387 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
388 private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
389 private DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
390 private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
393 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
394 private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
395 private DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
396 private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
398 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
399 private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
400 private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
401 private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
403 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
404 private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
405 private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
406 private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
408 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
409 private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
410 private DaliEventHandler<object, NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
411 private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
414 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
415 * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
416 * provided by the user. Initialized signal is emitted when application is initialised
418 public event DaliEventHandler<object, NUIApplicationInitEventArgs> Initialized
424 // Restricted to only one listener
425 if (_applicationInitEventHandler == null)
427 _applicationInitEventHandler += value;
429 _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
430 this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
439 if (_applicationInitEventHandler != null)
441 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
444 _applicationInitEventHandler -= value;
449 // Callback for Application InitSignal
450 private void OnApplicationInit(IntPtr data)
452 // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
453 DisposeQueue.Instance.Initialize();
454 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
456 // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
457 e.Application = Application.GetApplicationFromPtr(data);
459 if (_applicationInitEventHandler != null)
461 //here we send all data to user event handlers
462 _applicationInitEventHandler(this, e);
467 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
468 * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
469 * provided by the user. Terminated signal is emitted when application is terminated
471 public event DaliEventHandler<object, NUIApplicationTerminateEventArgs> Terminated
477 // Restricted to only one listener
478 if (_applicationTerminateEventHandler == null)
480 _applicationTerminateEventHandler += value;
482 _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
483 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
492 if (_applicationTerminateEventHandler != null)
494 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
497 _applicationTerminateEventHandler -= value;
502 // Callback for Application TerminateSignal
503 private void OnNUIApplicationTerminate(IntPtr data)
505 NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs();
507 // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
508 e.Application = Application.GetApplicationFromPtr(data);
510 if (_applicationTerminateEventHandler != null)
512 //here we send all data to user event handlers
513 _applicationTerminateEventHandler(this, e);
518 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
519 * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
520 * provided by the user. Paused signal is emitted when application is paused
522 public event DaliEventHandler<object, NUIApplicationPauseEventArgs> Paused
528 // Restricted to only one listener
529 if (_applicationPauseEventHandler == null)
531 _applicationPauseEventHandler += value;
533 _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
534 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
543 if (_applicationPauseEventHandler != null)
545 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
548 _applicationPauseEventHandler -= value;
553 // Callback for Application PauseSignal
554 private void OnNUIApplicationPause(IntPtr data)
556 NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs();
558 // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
559 e.Application = Application.GetApplicationFromPtr(data);
561 if (_applicationPauseEventHandler != null)
563 //here we send all data to user event handlers
564 _applicationPauseEventHandler(this, e);
569 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
570 * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
571 * provided by the user. Resumed signal is emitted when application is resumed
573 public event DaliEventHandler<object, NUIApplicationResumeEventArgs> Resumed
579 // Restricted to only one listener
580 if (_applicationResumeEventHandler == null)
582 _applicationResumeEventHandler += value;
584 _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
585 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
594 if (_applicationResumeEventHandler != null)
596 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
599 _applicationResumeEventHandler -= value;
604 // Callback for Application ResumeSignal
605 private void OnNUIApplicationResume(IntPtr data)
607 NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs();
609 // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
610 e.Application = Application.GetApplicationFromPtr(data);
612 if (_applicationResumeEventHandler != null)
614 //here we send all data to user event handlers
615 _applicationResumeEventHandler(this, e);
620 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
621 * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
622 * provided by the user. Reset signal is emitted when application is reset
624 public event DaliEventHandler<object, NUIApplicationResetEventArgs> Reset
630 // Restricted to only one listener
631 if (_applicationResetEventHandler == null)
633 _applicationResetEventHandler += value;
635 _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
636 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
645 if (_applicationResetEventHandler != null)
647 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
650 _applicationResetEventHandler -= value;
655 // Callback for Application ResetSignal
656 private void OnNUIApplicationReset(IntPtr data)
658 NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
660 // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
661 e.Application = Application.GetApplicationFromPtr(data);
663 if (_applicationResetEventHandler != null)
665 //here we send all data to user event handlers
666 _applicationResetEventHandler(this, e);
671 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
672 * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
673 * provided by the user. Resized signal is emitted when application is resized
675 public event DaliEventHandler<object, NUIApplicationResizeEventArgs> Resized
681 // Restricted to only one listener
682 if (_applicationResizeEventHandler == null)
684 _applicationResizeEventHandler += value;
686 _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
687 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
696 if (_applicationResizeEventHandler != null)
698 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
701 _applicationResizeEventHandler -= value;
706 // Callback for Application ResizeSignal
707 private void OnNUIApplicationResize(IntPtr data)
709 NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs();
711 // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
712 e.Application = Application.GetApplicationFromPtr(data);
714 if (_applicationResizeEventHandler != null)
716 //here we send all data to user event handlers
717 _applicationResizeEventHandler(this, e);
722 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
723 * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
724 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
726 public event DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> LanguageChanged
732 // Restricted to only one listener
733 if (_applicationLanguageChangedEventHandler == null)
735 _applicationLanguageChangedEventHandler += value;
737 _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
738 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
747 if (_applicationLanguageChangedEventHandler != null)
749 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
752 _applicationLanguageChangedEventHandler -= value;
757 // Callback for Application LanguageChangedSignal
758 private void OnNUIApplicationLanguageChanged(IntPtr data)
760 NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
762 // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
763 e.Application = Application.GetApplicationFromPtr(data);
765 if (_applicationLanguageChangedEventHandler != null)
767 //here we send all data to user event handlers
768 _applicationLanguageChangedEventHandler(this, e);
773 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
774 * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
775 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
777 public event DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> RegionChanged
783 // Restricted to only one listener
784 if (_applicationRegionChangedEventHandler == null)
786 _applicationRegionChangedEventHandler += value;
788 _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
789 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
798 if (_applicationRegionChangedEventHandler != null)
800 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
803 _applicationRegionChangedEventHandler -= value;
808 // Callback for Application RegionChangedSignal
809 private void OnNUIApplicationRegionChanged(IntPtr data)
811 NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
813 // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
814 e.Application = Application.GetApplicationFromPtr(data);
816 if (_applicationRegionChangedEventHandler != null)
818 //here we send all data to user event handlers
819 _applicationRegionChangedEventHandler(this, e);
824 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
825 * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
826 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
828 public event DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> BatteryLow
834 // Restricted to only one listener
835 if (_applicationBatteryLowEventHandler == null)
837 _applicationBatteryLowEventHandler += value;
839 _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
840 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
849 if (_applicationBatteryLowEventHandler != null)
851 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
854 _applicationBatteryLowEventHandler -= value;
859 // Callback for Application BatteryLowSignal
860 private void OnNUIApplicationBatteryLow(IntPtr data)
862 NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
864 // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
865 e.Application = Application.GetApplicationFromPtr(data);
867 if (_applicationBatteryLowEventHandler != null)
869 //here we send all data to user event handlers
870 _applicationBatteryLowEventHandler(this, e);
875 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
876 * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
877 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
879 public event DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> MemoryLow
885 // Restricted to only one listener
886 if (_applicationMemoryLowEventHandler == null)
888 _applicationMemoryLowEventHandler += value;
890 _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
891 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
900 if (_applicationMemoryLowEventHandler != null)
902 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
905 _applicationMemoryLowEventHandler -= value;
910 // Callback for Application MemoryLowSignal
911 private void OnNUIApplicationMemoryLow(IntPtr data)
913 NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
915 // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
916 e.Application = Application.GetApplicationFromPtr(data);
918 if (_applicationMemoryLowEventHandler != null)
920 //here we send all data to user event handlers
921 _applicationMemoryLowEventHandler(this, e);
926 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
927 * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
928 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
930 public event DaliEventHandler<object, NUIApplicationAppControlEventArgs> AppControl
936 // Restricted to only one listener
937 if (_applicationAppControlEventHandler == null)
939 _applicationAppControlEventHandler += value;
941 _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
942 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
951 if (_applicationAppControlEventHandler != null)
953 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
956 _applicationAppControlEventHandler -= value;
961 // Callback for Application AppControlSignal
962 private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
964 NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
966 // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
967 e.Application = Application.GetApplicationFromPtr(application);
970 if (_applicationAppControlEventHandler != null)
972 //here we send all data to user event handlers
973 _applicationAppControlEventHandler(this, e);
977 private static Application _instance; // singleton
979 public delegate void InitDelegate();
981 public delegate void TerminateDelegate();
983 public delegate void PauseDelegate();
985 public delegate void ResumeDelegate();
987 public delegate void ResizeDelegate();
989 public delegate void AppControlDelegate();
991 public delegate void LanguageChangedDelegate();
993 public delegate void RegionChangedDelegate();
995 public delegate void BatteryLowDelegate();
997 public delegate void MemoryLowDelegate();
999 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1000 internal delegate void InitDelegateInternal();
1002 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1003 internal delegate void TerminateDelegateInternal();
1005 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1006 internal delegate void PauseDelegateInternal();
1008 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1009 internal delegate void ResumeDelegateInternal();
1011 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1012 internal delegate void ResizeDelegateInternal();
1014 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1015 internal delegate void AppControlDelegateInternal();
1017 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1018 internal delegate void LanguageChangedDelegateInternal();
1020 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1021 internal delegate void RegionChangedDelegateInternal();
1023 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1024 internal delegate void BatteryLowDelegateInternal();
1026 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1027 internal delegate void MemoryLowDelegateInternal();
1029 static void Initialize()
1031 // instance.InitDelegate();
1034 public static Application Instance
1042 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr)
1044 Application ret = new Application(cPtr, false);
1045 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1049 internal void SetupDelegates()
1051 InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialize);
1053 Tizen.Log.Debug("NUI", "InitSignal connection count");
1055 this.InitSignal().Connect(initializeCallback);
1057 Tizen.Log.Debug("NUI", "InitSignal connection count = " + 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);
1096 catch (Exception exc)
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);
1100 Tizen.Log.Fatal("NUI", "exception occured! =" + exc.Message);
1102 LOG(" Dali native version="+ver1 + "." + ver2 + "." + ver3 + " NUI version=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
1104 LOG(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! ");
1106 // register all Views with the type registry, so that can be created / styled via JSON
1107 //ViewRegistryHelper.Initialize(); //moved to Application side.
1109 Application ret = New(1, stylesheet, windowMode);
1110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1112 // we've got an application now connect the signals
1113 ret.SetupDelegates();
1114 // set the singleton
1119 //Removed from v0.2.33
1120 /*public bool AddIdle(System.Delegate func)
1122 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1123 System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
1125 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
1127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1134 * Outer::outer_method(int)
1136 public static Application New()
1138 LOG("New() is called!");
1140 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
1141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1145 public static Application New(int argc)
1147 LOG("New(int argc) is called!");
1149 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
1150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1154 public static Application New(int argc, string stylesheet)
1156 LOG("New(int argc, string stylesheet) is called!");
1158 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
1159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1163 public static Application New(int argc, string stylesheet, Application.WindowMode windowMode)
1165 LOG("New(int argc, string stylesheet, Application.WindowMode windowMode) is called!");
1167 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
1168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1172 public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
1174 LOG("Application() is called!");
1176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1179 public Application(Application application) : this(NDalicPINVOKE.new_Application__SWIG_1(Application.getCPtr(application)), true)
1181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1184 public Application Assign(Application application)
1186 Application ret = new Application(NDalicPINVOKE.Application_Assign(swigCPtr, Application.getCPtr(application)), false);
1187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1191 public void MainLoop()
1193 NDalicPINVOKE.Application_MainLoop__SWIG_0(swigCPtr);
1194 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1197 internal void MainLoop(SWIGTYPE_p_Configuration__ContextLoss configuration)
1199 NDalicPINVOKE.Application_MainLoop__SWIG_1(swigCPtr, SWIGTYPE_p_Configuration__ContextLoss.getCPtr(configuration));
1200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1205 NDalicPINVOKE.Application_Lower(swigCPtr);
1206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1211 NDalicPINVOKE.Application_Quit(swigCPtr);
1212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1215 internal bool AddIdle(SWIGTYPE_p_Dali__CallbackBase callback)
1217 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback));
1218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1222 public Window GetWindow()
1224 Window ret = new Window(NDalicPINVOKE.Application_GetWindow(swigCPtr), true);
1225 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1229 public void ReplaceWindow(Rectangle windowPosition, string name)
1231 NDalicPINVOKE.Application_ReplaceWindow(swigCPtr, Rectangle.getCPtr(windowPosition), name);
1232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1235 public static string GetResourcePath()
1237 string ret = NDalicPINVOKE.Application_GetResourcePath();
1238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1242 internal void SetViewMode(ViewMode viewMode)
1244 NDalicPINVOKE.Application_SetViewMode(swigCPtr, (int)viewMode);
1245 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1248 internal ViewMode GetViewMode()
1250 ViewMode ret = (ViewMode)NDalicPINVOKE.Application_GetViewMode(swigCPtr);
1251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1255 public void SetStereoBase(float stereoBase)
1257 NDalicPINVOKE.Application_SetStereoBase(swigCPtr, stereoBase);
1258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1261 public float GetStereoBase()
1263 float ret = NDalicPINVOKE.Application_GetStereoBase(swigCPtr);
1264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1268 internal ApplicationSignal InitSignal()
1270 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
1271 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1275 internal ApplicationSignal TerminateSignal()
1277 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_TerminateSignal(swigCPtr), false);
1278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1282 internal ApplicationSignal PauseSignal()
1284 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_PauseSignal(swigCPtr), false);
1285 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1289 internal ApplicationSignal ResumeSignal()
1291 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResumeSignal(swigCPtr), false);
1292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1296 internal ApplicationSignal ResetSignal()
1298 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResetSignal(swigCPtr), false);
1299 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1303 internal ApplicationSignal ResizeSignal()
1305 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResizeSignal(swigCPtr), false);
1306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1310 internal ApplicationControlSignal AppControlSignal()
1312 ApplicationControlSignal ret = new ApplicationControlSignal(NDalicPINVOKE.Application_AppControlSignal(swigCPtr), false);
1313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1317 internal ApplicationSignal LanguageChangedSignal()
1319 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_LanguageChangedSignal(swigCPtr), false);
1320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1324 internal ApplicationSignal RegionChangedSignal()
1326 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_RegionChangedSignal(swigCPtr), false);
1327 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1331 internal ApplicationSignal BatteryLowSignal()
1333 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
1334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1338 internal ApplicationSignal MemoryLowSignal()
1340 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
1341 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1345 public enum WindowMode