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;
18 * @brief Event arguments that passed via NUIApplicationInit signal
21 public class NUIApplicationInitEventArgs : EventArgs
23 private Application _application;
\r
26 * @brief Application - is the application that is being initialized
29 public Application Application
\r
33 return _application;
\r
37 _application = value;
\r
43 * @brief Event arguments that passed via NUIApplicationTerminate signal
46 public class NUIApplicationTerminateEventArgs : EventArgs
48 private Application _application;
\r
50 * @brief Application - is the application that is being Terminated
53 public Application Application
\r
57 return _application;
\r
61 _application = value;
\r
67 * @brief Event arguments that passed via NUIApplicationPause signal
70 public class NUIApplicationPauseEventArgs : EventArgs
72 private Application _application;
\r
74 * @brief Application - is the application that is being Paused
77 public Application Application
\r
81 return _application;
\r
85 _application = value;
\r
91 * @brief Event arguments that passed via NUIApplicationResume signal
94 public class NUIApplicationResumeEventArgs : EventArgs
96 private Application _application;
\r
98 * @brief Application - is the application that is being Resumed
101 public Application Application
\r
105 return _application;
\r
109 _application = value;
\r
115 * @brief Event arguments that passed via NUIApplicationReset signal
118 public class NUIApplicationResetEventArgs : EventArgs
120 private Application _application;
\r
122 * @brief Application - is the application that is being Reset
125 public Application Application
\r
129 return _application;
\r
133 _application = value;
\r
139 * @brief Event arguments that passed via NUIApplicationResize signal
142 public class NUIApplicationResizeEventArgs : EventArgs
144 private Application _application;
\r
146 * @brief Application - is the application that is being Resized
149 public Application Application
\r
153 return _application;
\r
157 _application = value;
\r
163 * @brief Event arguments that passed via NUIApplicationLanguageChanged signal
166 public class NUIApplicationLanguageChangedEventArgs : EventArgs
168 private Application _application;
\r
170 * @brief Application - is the application that is being affected with Device's language change
173 public Application Application
\r
177 return _application;
\r
181 _application = value;
\r
187 * @brief Event arguments that passed via NUIApplicationRegionChanged signal
190 public class NUIApplicationRegionChangedEventArgs : EventArgs
192 private Application _application;
\r
194 * @brief Application - is the application that is being affected with Device's region change
197 public Application Application
\r
201 return _application;
\r
205 _application = value;
\r
211 * @brief Event arguments that passed via NUIApplicationBatteryLow signal
214 public class NUIApplicationBatteryLowEventArgs : EventArgs
216 private Application _application;
\r
218 * @brief Application - is the application that is being affected when the battery level of the device is low
221 public Application Application
\r
225 return _application;
\r
229 _application = value;
\r
235 * @brief Event arguments that passed via NUIApplicationMemoryLow signal
238 public class NUIApplicationMemoryLowEventArgs : EventArgs
240 private Application _application;
\r
242 * @brief Application - is the application that is being affected when the memory level of the device is low
245 public Application Application
\r
249 return _application;
\r
253 _application = value;
\r
259 * @brief Event arguments that passed via NUIApplicationAppControl signal
262 public class NUIApplicationAppControlEventArgs : EventArgs
264 private Application _application;
\r
265 private IntPtr _voidp;
\r
267 * @brief Application - is the application that is receiving the launch request from another application
270 public Application Application
\r
274 return _application;
\r
278 _application = value;
\r
282 * @brief VoidP - contains the information about why the application is launched
285 public IntPtr VoidP
\r
298 public class Application : BaseHandle
\r
300 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
\r
302 internal Application(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Application_SWIGUpcast(cPtr), cMemoryOwn)
\r
304 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
\r
307 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Application obj)
\r
309 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
\r
314 DisposeQueue.Instance.Add(this);
\r
317 public override void Dispose()
\r
319 if (!Stage.IsInstalled())
\r
321 DisposeQueue.Instance.Add(this);
\r
327 if (swigCPtr.Handle != global::System.IntPtr.Zero)
\r
331 swigCMemOwn = false;
\r
332 NDalicPINVOKE.delete_Application(swigCPtr);
\r
334 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
\r
336 global::System.GC.SuppressFinalize(this);
\r
342 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
343 private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
\r
344 private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
\r
345 private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
\r
348 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
349 private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
\r
350 private DaliEventHandler<object, NUIApplicationTerminateEventArgs> _applicationTerminateEventHandler;
\r
351 private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
\r
354 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
355 private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
\r
356 private DaliEventHandler<object, NUIApplicationPauseEventArgs> _applicationPauseEventHandler;
\r
357 private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
\r
359 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
360 private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
\r
361 private DaliEventHandler<object, NUIApplicationResumeEventArgs> _applicationResumeEventHandler;
\r
362 private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
\r
364 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
365 private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
\r
366 private DaliEventHandler<object, NUIApplicationResetEventArgs> _applicationResetEventHandler;
\r
367 private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
\r
369 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
370 private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
\r
371 private DaliEventHandler<object, NUIApplicationResizeEventArgs> _applicationResizeEventHandler;
\r
372 private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
\r
374 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
375 private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
\r
376 private DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
\r
377 private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
\r
380 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
381 private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
\r
382 private DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
\r
383 private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
\r
385 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
386 private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
\r
387 private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
\r
388 private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
\r
390 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
391 private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
\r
392 private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
\r
393 private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
\r
395 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
\r
396 private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
\r
397 private DaliEventHandler<object, NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
\r
398 private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
\r
401 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
402 * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
403 * provided by the user. Initialized signal is emitted when application is initialised
405 public event DaliEventHandler<object, NUIApplicationInitEventArgs> Initialized
\r
411 // Restricted to only one listener
\r
412 if (_applicationInitEventHandler == null)
\r
414 _applicationInitEventHandler += value;
\r
416 _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
\r
417 this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
\r
426 if (_applicationInitEventHandler != null)
\r
428 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
\r
431 _applicationInitEventHandler -= value;
\r
436 // Callback for Application InitSignal
\r
437 private void OnApplicationInit(IntPtr data)
\r
439 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
\r
441 // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
\r
442 e.Application = Application.GetApplicationFromPtr(data);
\r
444 if (_applicationInitEventHandler != null)
\r
446 //here we send all data to user event handlers
\r
447 _applicationInitEventHandler(this, e);
\r
452 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
453 * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
454 * provided by the user. Terminated signal is emitted when application is terminated
456 public event DaliEventHandler<object, NUIApplicationTerminateEventArgs> Terminated
\r
462 // Restricted to only one listener
\r
463 if (_applicationTerminateEventHandler == null)
\r
465 _applicationTerminateEventHandler += value;
\r
467 _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
\r
468 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
\r
477 if (_applicationTerminateEventHandler != null)
\r
479 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
\r
482 _applicationTerminateEventHandler -= value;
\r
487 // Callback for Application TerminateSignal
\r
488 private void OnNUIApplicationTerminate(IntPtr data)
\r
490 NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs();
\r
492 // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
\r
493 e.Application = Application.GetApplicationFromPtr(data);
\r
495 if (_applicationTerminateEventHandler != null)
\r
497 //here we send all data to user event handlers
\r
498 _applicationTerminateEventHandler(this, e);
\r
503 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
504 * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
505 * provided by the user. Paused signal is emitted when application is paused
507 public event DaliEventHandler<object, NUIApplicationPauseEventArgs> Paused
\r
513 // Restricted to only one listener
\r
514 if (_applicationPauseEventHandler == null)
\r
516 _applicationPauseEventHandler += value;
\r
518 _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
\r
519 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
\r
528 if (_applicationPauseEventHandler != null)
\r
530 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
\r
533 _applicationPauseEventHandler -= value;
\r
538 // Callback for Application PauseSignal
\r
539 private void OnNUIApplicationPause(IntPtr data)
\r
541 NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs();
\r
543 // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
\r
544 e.Application = Application.GetApplicationFromPtr(data);
\r
546 if (_applicationPauseEventHandler != null)
\r
548 //here we send all data to user event handlers
\r
549 _applicationPauseEventHandler(this, e);
\r
554 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
555 * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
556 * provided by the user. Resumed signal is emitted when application is resumed
558 public event DaliEventHandler<object, NUIApplicationResumeEventArgs> Resumed
\r
564 // Restricted to only one listener
\r
565 if (_applicationResumeEventHandler == null)
\r
567 _applicationResumeEventHandler += value;
\r
569 _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
\r
570 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
\r
579 if (_applicationResumeEventHandler != null)
\r
581 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
\r
584 _applicationResumeEventHandler -= value;
\r
589 // Callback for Application ResumeSignal
\r
590 private void OnNUIApplicationResume(IntPtr data)
\r
592 NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs();
\r
594 // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
\r
595 e.Application = Application.GetApplicationFromPtr(data);
\r
597 if (_applicationResumeEventHandler != null)
\r
599 //here we send all data to user event handlers
\r
600 _applicationResumeEventHandler(this, e);
\r
605 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
606 * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
607 * provided by the user. Reset signal is emitted when application is reset
609 public event DaliEventHandler<object, NUIApplicationResetEventArgs> Reset
\r
615 // Restricted to only one listener
\r
616 if (_applicationResetEventHandler == null)
\r
618 _applicationResetEventHandler += value;
\r
620 _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
\r
621 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
\r
630 if (_applicationResetEventHandler != null)
\r
632 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
\r
635 _applicationResetEventHandler -= value;
\r
640 // Callback for Application ResetSignal
\r
641 private void OnNUIApplicationReset(IntPtr data)
\r
643 NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
\r
645 // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
\r
646 e.Application = Application.GetApplicationFromPtr(data);
\r
648 if (_applicationResetEventHandler != null)
\r
650 //here we send all data to user event handlers
\r
651 _applicationResetEventHandler(this, e);
\r
656 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
657 * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
658 * provided by the user. Resized signal is emitted when application is resized
660 public event DaliEventHandler<object, NUIApplicationResizeEventArgs> Resized
\r
666 // Restricted to only one listener
\r
667 if (_applicationResizeEventHandler == null)
\r
669 _applicationResizeEventHandler += value;
\r
671 _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
\r
672 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
\r
681 if (_applicationResizeEventHandler != null)
\r
683 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
\r
686 _applicationResizeEventHandler -= value;
\r
691 // Callback for Application ResizeSignal
\r
692 private void OnNUIApplicationResize(IntPtr data)
\r
694 NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs();
\r
696 // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
\r
697 e.Application = Application.GetApplicationFromPtr(data);
\r
699 if (_applicationResizeEventHandler != null)
\r
701 //here we send all data to user event handlers
\r
702 _applicationResizeEventHandler(this, e);
\r
707 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
708 * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
709 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
711 public event DaliEventHandler<object, NUIApplicationLanguageChangedEventArgs> LanguageChanged
\r
717 // Restricted to only one listener
\r
718 if (_applicationLanguageChangedEventHandler == null)
\r
720 _applicationLanguageChangedEventHandler += value;
\r
722 _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
\r
723 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
\r
732 if (_applicationLanguageChangedEventHandler != null)
\r
734 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
\r
737 _applicationLanguageChangedEventHandler -= value;
\r
742 // Callback for Application LanguageChangedSignal
\r
743 private void OnNUIApplicationLanguageChanged(IntPtr data)
\r
745 NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
\r
747 // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
\r
748 e.Application = Application.GetApplicationFromPtr(data);
\r
750 if (_applicationLanguageChangedEventHandler != null)
\r
752 //here we send all data to user event handlers
\r
753 _applicationLanguageChangedEventHandler(this, e);
\r
758 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
759 * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
760 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
762 public event DaliEventHandler<object, NUIApplicationRegionChangedEventArgs> RegionChanged
\r
768 // Restricted to only one listener
\r
769 if (_applicationRegionChangedEventHandler == null)
\r
771 _applicationRegionChangedEventHandler += value;
\r
773 _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
\r
774 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
\r
783 if (_applicationRegionChangedEventHandler != null)
\r
785 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
\r
788 _applicationRegionChangedEventHandler -= value;
\r
793 // Callback for Application RegionChangedSignal
\r
794 private void OnNUIApplicationRegionChanged(IntPtr data)
\r
796 NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
\r
798 // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
\r
799 e.Application = Application.GetApplicationFromPtr(data);
\r
801 if (_applicationRegionChangedEventHandler != null)
\r
803 //here we send all data to user event handlers
\r
804 _applicationRegionChangedEventHandler(this, e);
\r
809 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
810 * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
811 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
813 public event DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> BatteryLow
\r
819 // Restricted to only one listener
\r
820 if (_applicationBatteryLowEventHandler == null)
\r
822 _applicationBatteryLowEventHandler += value;
\r
824 _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
\r
825 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
\r
834 if (_applicationBatteryLowEventHandler != null)
\r
836 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
\r
839 _applicationBatteryLowEventHandler -= value;
\r
844 // Callback for Application BatteryLowSignal
\r
845 private void OnNUIApplicationBatteryLow(IntPtr data)
\r
847 NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
\r
849 // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
\r
850 e.Application = Application.GetApplicationFromPtr(data);
\r
852 if (_applicationBatteryLowEventHandler != null)
\r
854 //here we send all data to user event handlers
\r
855 _applicationBatteryLowEventHandler(this, e);
\r
860 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
861 * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
862 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
864 public event DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> MemoryLow
\r
870 // Restricted to only one listener
\r
871 if (_applicationMemoryLowEventHandler == null)
\r
873 _applicationMemoryLowEventHandler += value;
\r
875 _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
\r
876 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
\r
885 if (_applicationMemoryLowEventHandler != null)
\r
887 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
\r
890 _applicationMemoryLowEventHandler -= value;
\r
895 // Callback for Application MemoryLowSignal
\r
896 private void OnNUIApplicationMemoryLow(IntPtr data)
\r
898 NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
\r
900 // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
\r
901 e.Application = Application.GetApplicationFromPtr(data);
\r
903 if (_applicationMemoryLowEventHandler != null)
\r
905 //here we send all data to user event handlers
\r
906 _applicationMemoryLowEventHandler(this, e);
\r
911 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
912 * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
913 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
915 public event DaliEventHandler<object, NUIApplicationAppControlEventArgs> AppControl
\r
921 // Restricted to only one listener
\r
922 if (_applicationAppControlEventHandler == null)
\r
924 _applicationAppControlEventHandler += value;
\r
926 _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
\r
927 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
\r
936 if (_applicationAppControlEventHandler != null)
\r
938 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
\r
941 _applicationAppControlEventHandler -= value;
\r
946 // Callback for Application AppControlSignal
\r
947 private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
\r
949 NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
\r
951 // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
\r
952 e.Application = Application.GetApplicationFromPtr(application);
\r
955 if (_applicationAppControlEventHandler != null)
\r
957 //here we send all data to user event handlers
\r
958 _applicationAppControlEventHandler(this, e);
\r
962 private static Application _instance; // singleton
\r
964 public delegate void InitDelegate();
\r
966 public delegate void TerminateDelegate();
\r
968 public delegate void PauseDelegate();
\r
970 public delegate void ResumeDelegate();
\r
972 public delegate void ResizeDelegate();
\r
974 public delegate void AppControlDelegate();
\r
976 public delegate void LanguageChangedDelegate();
\r
978 public delegate void RegionChangedDelegate();
\r
980 public delegate void BatteryLowDelegate();
\r
982 public delegate void MemoryLowDelegate();
\r
984 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
985 internal delegate void InitDelegateInternal();
\r
987 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
988 internal delegate void TerminateDelegateInternal();
\r
990 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
991 internal delegate void PauseDelegateInternal();
\r
993 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
994 internal delegate void ResumeDelegateInternal();
\r
996 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
997 internal delegate void ResizeDelegateInternal();
\r
999 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
1000 internal delegate void AppControlDelegateInternal();
\r
1002 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
1003 internal delegate void LanguageChangedDelegateInternal();
\r
1005 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
1006 internal delegate void RegionChangedDelegateInternal();
\r
1008 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
1009 internal delegate void BatteryLowDelegateInternal();
\r
1011 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
\r
1012 internal delegate void MemoryLowDelegateInternal();
\r
1014 static void Initialize()
\r
1016 // instance.InitDelegate();
\r
1019 public static Application Instance
\r
1027 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr)
\r
1029 Application ret = new Application(cPtr, false);
\r
1030 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1034 internal void SetupDelegates()
\r
1036 InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialize);
\r
1037 System.Console.WriteLine("InitSignal connection count");
\r
1039 this.InitSignal().Connect(initializeCallback);
\r
1040 //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
\r
1043 public static Application NewApplication()
\r
1045 _instance = NewApplication("", Application.WINDOW_MODE.OPAQUE);
\r
1049 public static Application NewApplication(string stylesheet)
\r
1051 _instance = NewApplication(stylesheet, Application.WINDOW_MODE.OPAQUE);
\r
1055 public static Application NewApplication(string stylesheet, Application.WINDOW_MODE windowMode)
\r
1058 // register all Views with the type registry, so that can be created / styled via JSON
\r
1059 ViewRegistryHelper.Initialize();
\r
1061 Application ret = New(1, stylesheet, windowMode);
\r
1062 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1064 // we've got an application now connect the signals
\r
1065 ret.SetupDelegates();
\r
1066 // set the singleton
\r
1071 public bool AddIdle(System.Delegate func)
\r
1073 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
\r
1074 System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
\r
1076 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
\r
1078 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1085 * Outer::outer_method(int)
1087 public static Application New()
\r
1089 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
\r
1090 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1094 public static Application New(int argc)
\r
1096 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
\r
1097 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1101 public static Application New(int argc, string stylesheet)
\r
1103 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
\r
1104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1108 public static Application New(int argc, string stylesheet, Application.WINDOW_MODE windowMode)
\r
1110 Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
\r
1111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1115 public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
\r
1117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1120 public Application(Application application) : this(NDalicPINVOKE.new_Application__SWIG_1(Application.getCPtr(application)), true)
\r
1122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1125 public Application Assign(Application application)
\r
1127 Application ret = new Application(NDalicPINVOKE.Application_Assign(swigCPtr, Application.getCPtr(application)), false);
\r
1128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1132 public void MainLoop()
\r
1134 NDalicPINVOKE.Application_MainLoop__SWIG_0(swigCPtr);
\r
1135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1138 internal void MainLoop(SWIGTYPE_p_Configuration__ContextLoss configuration)
\r
1140 NDalicPINVOKE.Application_MainLoop__SWIG_1(swigCPtr, SWIGTYPE_p_Configuration__ContextLoss.getCPtr(configuration));
\r
1141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1144 public void Lower()
\r
1146 NDalicPINVOKE.Application_Lower(swigCPtr);
\r
1147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1150 public void Quit()
\r
1152 NDalicPINVOKE.Application_Quit(swigCPtr);
\r
1153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1156 internal bool AddIdle(SWIGTYPE_p_Dali__CallbackBase callback)
\r
1158 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback));
\r
1159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1163 public Window GetWindow()
\r
1165 Window ret = new Window(NDalicPINVOKE.Application_GetWindow(swigCPtr), true);
\r
1166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1170 public void ReplaceWindow(Rectangle windowPosition, string name)
\r
1172 NDalicPINVOKE.Application_ReplaceWindow(swigCPtr, Rectangle.getCPtr(windowPosition), name);
\r
1173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1176 public static string GetResourcePath()
\r
1178 string ret = NDalicPINVOKE.Application_GetResourcePath();
\r
1179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1183 internal void SetViewMode(ViewMode viewMode)
\r
1185 NDalicPINVOKE.Application_SetViewMode(swigCPtr, (int)viewMode);
\r
1186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1189 internal ViewMode GetViewMode()
\r
1191 ViewMode ret = (ViewMode)NDalicPINVOKE.Application_GetViewMode(swigCPtr);
\r
1192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1196 public void SetStereoBase(float stereoBase)
\r
1198 NDalicPINVOKE.Application_SetStereoBase(swigCPtr, stereoBase);
\r
1199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1202 public float GetStereoBase()
\r
1204 float ret = NDalicPINVOKE.Application_GetStereoBase(swigCPtr);
\r
1205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1209 internal ApplicationSignal InitSignal()
\r
1211 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
\r
1212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1216 internal ApplicationSignal TerminateSignal()
\r
1218 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_TerminateSignal(swigCPtr), false);
\r
1219 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1223 internal ApplicationSignal PauseSignal()
\r
1225 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_PauseSignal(swigCPtr), false);
\r
1226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1230 internal ApplicationSignal ResumeSignal()
\r
1232 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResumeSignal(swigCPtr), false);
\r
1233 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1237 internal ApplicationSignal ResetSignal()
\r
1239 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResetSignal(swigCPtr), false);
\r
1240 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1244 internal ApplicationSignal ResizeSignal()
\r
1246 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_ResizeSignal(swigCPtr), false);
\r
1247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1251 internal ApplicationControlSignal AppControlSignal()
\r
1253 ApplicationControlSignal ret = new ApplicationControlSignal(NDalicPINVOKE.Application_AppControlSignal(swigCPtr), false);
\r
1254 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1258 internal ApplicationSignal LanguageChangedSignal()
\r
1260 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_LanguageChangedSignal(swigCPtr), false);
\r
1261 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1265 internal ApplicationSignal RegionChangedSignal()
\r
1267 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_RegionChangedSignal(swigCPtr), false);
\r
1268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1272 internal ApplicationSignal BatteryLowSignal()
\r
1274 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
\r
1275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1279 internal ApplicationSignal MemoryLowSignal()
\r
1281 ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
\r
1282 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
1286 public enum WINDOW_MODE
\r