2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 %define APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
19 %typemap(csimports) NameSpace::ClassName %{
21 using System.Runtime.InteropServices;
24 * @brief Event arguments that passed via NUIApplicationInit signal
27 public class NUIApplicationInitEventArgs : EventArgs
29 private Application _application;
32 * @brief Application - is the application that is being initialized
35 public Application Application
49 * @brief Event arguments that passed via NUIApplicationTerminate signal
52 public class NUIApplicationTerminateEventArgs : EventArgs
54 private Application _application;
56 * @brief Application - is the application that is being Terminated
59 public Application Application
73 * @brief Event arguments that passed via NUIApplicationPause signal
76 public class NUIApplicationPauseEventArgs : EventArgs
78 private Application _application;
80 * @brief Application - is the application that is being Paused
83 public Application Application
97 * @brief Event arguments that passed via NUIApplicationResume signal
100 public class NUIApplicationResumeEventArgs : EventArgs
102 private Application _application;
104 * @brief Application - is the application that is being Resumed
107 public Application Application
115 _application = value;
121 * @brief Event arguments that passed via NUIApplicationReset signal
124 public class NUIApplicationResetEventArgs : EventArgs
126 private Application _application;
128 * @brief Application - is the application that is being Reset
131 public Application Application
139 _application = value;
145 * @brief Event arguments that passed via NUIApplicationResize signal
148 public class NUIApplicationResizeEventArgs : EventArgs
150 private Application _application;
152 * @brief Application - is the application that is being Resized
155 public Application Application
163 _application = value;
169 * @brief Event arguments that passed via NUIApplicationLanguageChanged signal
172 public class NUIApplicationLanguageChangedEventArgs : EventArgs
174 private Application _application;
176 * @brief Application - is the application that is being affected with Device's language change
179 public Application Application
187 _application = value;
193 * @brief Event arguments that passed via NUIApplicationRegionChanged signal
196 public class NUIApplicationRegionChangedEventArgs : EventArgs
198 private Application _application;
200 * @brief Application - is the application that is being affected with Device's region change
203 public Application Application
211 _application = value;
217 * @brief Event arguments that passed via NUIApplicationBatteryLow signal
220 public class NUIApplicationBatteryLowEventArgs : EventArgs
222 private Application _application;
224 * @brief Application - is the application that is being affected when the battery level of the device is low
227 public Application Application
235 _application = value;
241 * @brief Event arguments that passed via NUIApplicationMemoryLow signal
244 public class NUIApplicationMemoryLowEventArgs : EventArgs
246 private Application _application;
248 * @brief Application - is the application that is being affected when the memory level of the device is low
251 public Application Application
259 _application = value;
265 * @brief Event arguments that passed via NUIApplicationAppControl signal
268 public class NUIApplicationAppControlEventArgs : EventArgs
270 private Application _application;
271 private IntPtr _voidp;
273 * @brief Application - is the application that is receiving the launch request from another application
276 public Application Application
284 _application = value;
288 * @brief VoidP - contains the information about why the application is launched
308 %define APPLICATION_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
309 %typemap(cscode) NameSpace::ClassName %{
310 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
311 private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
312 private DaliEventHandler<object,NUIApplicationInitEventArgs> _applicationInitEventHandler;
313 private NUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
316 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
317 private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application);
318 private DaliEventHandler<object,NUIApplicationTerminateEventArgs> _applicationTerminateEventHandler;
319 private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
322 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
323 private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application);
324 private DaliEventHandler<object,NUIApplicationPauseEventArgs> _applicationPauseEventHandler;
325 private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
328 private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application);
329 private DaliEventHandler<object,NUIApplicationResumeEventArgs> _applicationResumeEventHandler;
330 private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
333 private delegate void NUIApplicationResetEventCallbackDelegate(IntPtr application);
334 private DaliEventHandler<object,NUIApplicationResetEventArgs> _applicationResetEventHandler;
335 private NUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
338 private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application);
339 private DaliEventHandler<object,NUIApplicationResizeEventArgs> _applicationResizeEventHandler;
340 private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
342 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
343 private delegate void NUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
344 private DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
345 private NUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
348 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
349 private delegate void NUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
350 private DaliEventHandler<object,NUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
351 private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
353 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
354 private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
355 private DaliEventHandler<object,NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
356 private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
358 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359 private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
360 private DaliEventHandler<object,NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
361 private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
363 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
364 private delegate void NUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
365 private DaliEventHandler<object,NUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
366 private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
369 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
370 * (in the type of NUIApplicationInitEventHandler - DaliEventHandler<object,NUIApplicationInitEventArgs>)
371 * provided by the user. Initialized signal is emitted when application is initialised
373 public event DaliEventHandler<object,NUIApplicationInitEventArgs> Initialized
379 // Restricted to only one listener
380 if (_applicationInitEventHandler == null)
382 _applicationInitEventHandler += value;
384 _applicationInitEventCallbackDelegate = new NUIApplicationInitEventCallbackDelegate(OnApplicationInit);
385 this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
394 if (_applicationInitEventHandler != null)
396 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
399 _applicationInitEventHandler -= value;
404 // Callback for Application InitSignal
405 private void OnApplicationInit(IntPtr data)
407 // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
408 DisposeQueue.Instance.Initialize();
410 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
412 // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
413 e.Application = Application.GetApplicationFromPtr(data);
415 if (_applicationInitEventHandler != null)
417 //here we send all data to user event handlers
418 _applicationInitEventHandler(this, e);
423 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
424 * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
425 * provided by the user. Terminated signal is emitted when application is terminated
427 public event DaliEventHandler<object,NUIApplicationTerminateEventArgs> Terminated
433 // Restricted to only one listener
434 if (_applicationTerminateEventHandler == null)
436 _applicationTerminateEventHandler += value;
438 _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
439 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
448 if (_applicationTerminateEventHandler != null)
450 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
453 _applicationTerminateEventHandler -= value;
458 // Callback for Application TerminateSignal
459 private void OnNUIApplicationTerminate(IntPtr data)
461 NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs();
463 // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
464 e.Application = Application.GetApplicationFromPtr(data);
466 if (_applicationTerminateEventHandler != null)
468 //here we send all data to user event handlers
469 _applicationTerminateEventHandler(this, e);
474 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
475 * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
476 * provided by the user. Paused signal is emitted when application is paused
478 public event DaliEventHandler<object,NUIApplicationPauseEventArgs> Paused
484 // Restricted to only one listener
485 if (_applicationPauseEventHandler == null)
487 _applicationPauseEventHandler += value;
489 _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
490 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
499 if (_applicationPauseEventHandler != null)
501 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
504 _applicationPauseEventHandler -= value;
509 // Callback for Application PauseSignal
510 private void OnNUIApplicationPause(IntPtr data)
512 NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs();
514 // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
515 e.Application = Application.GetApplicationFromPtr(data);
517 if (_applicationPauseEventHandler != null)
519 //here we send all data to user event handlers
520 _applicationPauseEventHandler(this, e);
525 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
526 * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
527 * provided by the user. Resumed signal is emitted when application is resumed
529 public event DaliEventHandler<object,NUIApplicationResumeEventArgs> Resumed
535 // Restricted to only one listener
536 if (_applicationResumeEventHandler == null)
538 _applicationResumeEventHandler += value;
540 _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
541 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
550 if (_applicationResumeEventHandler != null)
552 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
555 _applicationResumeEventHandler -= value;
560 // Callback for Application ResumeSignal
561 private void OnNUIApplicationResume(IntPtr data)
563 NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs();
565 // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
566 e.Application = Application.GetApplicationFromPtr(data);
568 if (_applicationResumeEventHandler != null)
570 //here we send all data to user event handlers
571 _applicationResumeEventHandler(this, e);
576 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
577 * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
578 * provided by the user. Reset signal is emitted when application is reset
580 public event DaliEventHandler<object,NUIApplicationResetEventArgs> Reset
586 // Restricted to only one listener
587 if (_applicationResetEventHandler == null)
589 _applicationResetEventHandler += value;
591 _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
592 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
601 if (_applicationResetEventHandler != null)
603 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
606 _applicationResetEventHandler -= value;
611 // Callback for Application ResetSignal
612 private void OnNUIApplicationReset(IntPtr data)
614 NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
616 // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
617 e.Application = Application.GetApplicationFromPtr(data);
619 if (_applicationResetEventHandler != null)
621 //here we send all data to user event handlers
622 _applicationResetEventHandler(this, e);
627 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
628 * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
629 * provided by the user. Resized signal is emitted when application is resized
631 public event DaliEventHandler<object,NUIApplicationResizeEventArgs> Resized
637 // Restricted to only one listener
638 if (_applicationResizeEventHandler == null)
640 _applicationResizeEventHandler += value;
642 _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
643 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
652 if (_applicationResizeEventHandler != null)
654 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
657 _applicationResizeEventHandler -= value;
662 // Callback for Application ResizeSignal
663 private void OnNUIApplicationResize(IntPtr data)
665 NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs();
667 // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
668 e.Application = Application.GetApplicationFromPtr(data);
670 if (_applicationResizeEventHandler != null)
672 //here we send all data to user event handlers
673 _applicationResizeEventHandler(this, e);
678 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
679 * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
680 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
682 public event DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs> LanguageChanged
688 // Restricted to only one listener
689 if (_applicationLanguageChangedEventHandler == null)
691 _applicationLanguageChangedEventHandler += value;
693 _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
694 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
703 if (_applicationLanguageChangedEventHandler != null)
705 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
708 _applicationLanguageChangedEventHandler -= value;
713 // Callback for Application LanguageChangedSignal
714 private void OnNUIApplicationLanguageChanged(IntPtr data)
716 NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
718 // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
719 e.Application = Application.GetApplicationFromPtr(data);
721 if (_applicationLanguageChangedEventHandler != null)
723 //here we send all data to user event handlers
724 _applicationLanguageChangedEventHandler(this, e);
729 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
730 * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
731 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
733 public event DaliEventHandler<object,NUIApplicationRegionChangedEventArgs> RegionChanged
739 // Restricted to only one listener
740 if (_applicationRegionChangedEventHandler == null)
742 _applicationRegionChangedEventHandler += value;
744 _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
745 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
754 if (_applicationRegionChangedEventHandler != null)
756 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
759 _applicationRegionChangedEventHandler -= value;
764 // Callback for Application RegionChangedSignal
765 private void OnNUIApplicationRegionChanged(IntPtr data)
767 NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
769 // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
770 e.Application = Application.GetApplicationFromPtr(data);
772 if (_applicationRegionChangedEventHandler != null)
774 //here we send all data to user event handlers
775 _applicationRegionChangedEventHandler(this, e);
780 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
781 * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
782 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
784 public event DaliEventHandler<object,NUIApplicationBatteryLowEventArgs> BatteryLow
790 // Restricted to only one listener
791 if (_applicationBatteryLowEventHandler == null)
793 _applicationBatteryLowEventHandler += value;
795 _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
796 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
805 if (_applicationBatteryLowEventHandler != null)
807 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
810 _applicationBatteryLowEventHandler -= value;
815 // Callback for Application BatteryLowSignal
816 private void OnNUIApplicationBatteryLow(IntPtr data)
818 NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
820 // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
821 e.Application = Application.GetApplicationFromPtr(data);
823 if (_applicationBatteryLowEventHandler != null)
825 //here we send all data to user event handlers
826 _applicationBatteryLowEventHandler(this, e);
831 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
832 * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
833 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
835 public event DaliEventHandler<object,NUIApplicationMemoryLowEventArgs> MemoryLow
841 // Restricted to only one listener
842 if (_applicationMemoryLowEventHandler == null)
844 _applicationMemoryLowEventHandler += value;
846 _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
847 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
856 if (_applicationMemoryLowEventHandler != null)
858 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
861 _applicationMemoryLowEventHandler -= value;
866 // Callback for Application MemoryLowSignal
867 private void OnNUIApplicationMemoryLow(IntPtr data)
869 NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
871 // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
872 e.Application = Application.GetApplicationFromPtr(data);
874 if (_applicationMemoryLowEventHandler != null)
876 //here we send all data to user event handlers
877 _applicationMemoryLowEventHandler(this, e);
882 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
883 * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
884 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
886 public event DaliEventHandler<object,NUIApplicationAppControlEventArgs> AppControl
892 // Restricted to only one listener
893 if (_applicationAppControlEventHandler == null)
895 _applicationAppControlEventHandler += value;
897 _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
898 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
907 if (_applicationAppControlEventHandler != null)
909 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
912 _applicationAppControlEventHandler -= value;
917 // Callback for Application AppControlSignal
918 private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
920 NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
922 // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
923 e.Application = Application.GetApplicationFromPtr(application);
926 if (_applicationAppControlEventHandler != null)
928 //here we send all data to user event handlers
929 _applicationAppControlEventHandler(this, e);
933 private static Application _instance; // singleton
935 public delegate void InitDelegate();
937 public delegate void TerminateDelegate();
939 public delegate void PauseDelegate();
941 public delegate void ResumeDelegate();
943 public delegate void ResizeDelegate();
945 public delegate void AppControlDelegate();
947 public delegate void LanguageChangedDelegate();
949 public delegate void RegionChangedDelegate();
951 public delegate void BatteryLowDelegate();
953 public delegate void MemoryLowDelegate();
955 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
956 internal delegate void InitDelegateInternal();
958 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
959 internal delegate void TerminateDelegateInternal();
961 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
962 internal delegate void PauseDelegateInternal();
964 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
965 internal delegate void ResumeDelegateInternal();
967 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
968 internal delegate void ResizeDelegateInternal();
970 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
971 internal delegate void AppControlDelegateInternal();
973 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
974 internal delegate void LanguageChangedDelegateInternal();
976 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
977 internal delegate void RegionChangedDelegateInternal();
979 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
980 internal delegate void BatteryLowDelegateInternal();
982 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
983 internal delegate void MemoryLowDelegateInternal();
985 static void Initialize()
987 // instance.InitDelegate();
990 public static Application Instance
998 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr) {
999 Application ret = new Application(cPtr, false);
1000 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1004 internal void SetupDelegates() {
1005 InitDelegateInternal initializeCallback = new InitDelegateInternal( Initialize );
1006 System.Console.WriteLine( "InitSignal connection count");
1008 this.InitSignal().Connect( initializeCallback );
1009 //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
1012 public static Application NewApplication() {
1013 _instance = NewApplication("", Application.WINDOW_MODE.OPAQUE);
1017 public static Application NewApplication(string stylesheet) {
1018 _instance = NewApplication(stylesheet, Application.WINDOW_MODE.OPAQUE);
1022 public static Application NewApplication(string stylesheet, Application.WINDOW_MODE windowMode) {
1024 // register all Views with the type registry, so that can be created / styled via JSON
1025 ViewRegistryHelper.Initialize();
1027 Application ret = New(1, stylesheet, windowMode);
1028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1030 // we've got an application now connect the signals
1031 ret.SetupDelegates();
1032 // set the singleton
1040 %define DALI_APPLICATION_EVENTHANDLER_PARAM( NameSpace, ClassName)
1041 APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
1042 APPLICATION_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
1047 DALI_APPLICATION_EVENTHANDLER_PARAM( Dali, Application);