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 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
409 // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
410 e.Application = Application.GetApplicationFromPtr(data);
412 if (_applicationInitEventHandler != null)
414 //here we send all data to user event handlers
415 _applicationInitEventHandler(this, e);
420 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
421 * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler<object,NUIApplicationTerminateEventArgs>)
422 * provided by the user. Terminated signal is emitted when application is terminated
424 public event DaliEventHandler<object,NUIApplicationTerminateEventArgs> Terminated
430 // Restricted to only one listener
431 if (_applicationTerminateEventHandler == null)
433 _applicationTerminateEventHandler += value;
435 _applicationTerminateEventCallbackDelegate = new NUIApplicationTerminateEventCallbackDelegate(OnNUIApplicationTerminate);
436 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
445 if (_applicationTerminateEventHandler != null)
447 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
450 _applicationTerminateEventHandler -= value;
455 // Callback for Application TerminateSignal
456 private void OnNUIApplicationTerminate(IntPtr data)
458 NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs();
460 // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data
461 e.Application = Application.GetApplicationFromPtr(data);
463 if (_applicationTerminateEventHandler != null)
465 //here we send all data to user event handlers
466 _applicationTerminateEventHandler(this, e);
471 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
472 * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler<object,NUIApplicationPauseEventArgs>)
473 * provided by the user. Paused signal is emitted when application is paused
475 public event DaliEventHandler<object,NUIApplicationPauseEventArgs> Paused
481 // Restricted to only one listener
482 if (_applicationPauseEventHandler == null)
484 _applicationPauseEventHandler += value;
486 _applicationPauseEventCallbackDelegate = new NUIApplicationPauseEventCallbackDelegate(OnNUIApplicationPause);
487 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
496 if (_applicationPauseEventHandler != null)
498 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
501 _applicationPauseEventHandler -= value;
506 // Callback for Application PauseSignal
507 private void OnNUIApplicationPause(IntPtr data)
509 NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs();
511 // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data
512 e.Application = Application.GetApplicationFromPtr(data);
514 if (_applicationPauseEventHandler != null)
516 //here we send all data to user event handlers
517 _applicationPauseEventHandler(this, e);
522 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
523 * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler<object,NUIApplicationResumeEventArgs>)
524 * provided by the user. Resumed signal is emitted when application is resumed
526 public event DaliEventHandler<object,NUIApplicationResumeEventArgs> Resumed
532 // Restricted to only one listener
533 if (_applicationResumeEventHandler == null)
535 _applicationResumeEventHandler += value;
537 _applicationResumeEventCallbackDelegate = new NUIApplicationResumeEventCallbackDelegate(OnNUIApplicationResume);
538 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
547 if (_applicationResumeEventHandler != null)
549 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
552 _applicationResumeEventHandler -= value;
557 // Callback for Application ResumeSignal
558 private void OnNUIApplicationResume(IntPtr data)
560 NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs();
562 // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data
563 e.Application = Application.GetApplicationFromPtr(data);
565 if (_applicationResumeEventHandler != null)
567 //here we send all data to user event handlers
568 _applicationResumeEventHandler(this, e);
573 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
574 * (in the type of NUIApplicationResetEventHandler-DaliEventHandler<object,NUIApplicationResetEventArgs>)
575 * provided by the user. Reset signal is emitted when application is reset
577 public event DaliEventHandler<object,NUIApplicationResetEventArgs> Reset
583 // Restricted to only one listener
584 if (_applicationResetEventHandler == null)
586 _applicationResetEventHandler += value;
588 _applicationResetEventCallbackDelegate = new NUIApplicationResetEventCallbackDelegate(OnNUIApplicationReset);
589 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
598 if (_applicationResetEventHandler != null)
600 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
603 _applicationResetEventHandler -= value;
608 // Callback for Application ResetSignal
609 private void OnNUIApplicationReset(IntPtr data)
611 NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
613 // Populate all members of "e" (NUIApplicationResetEventArgs) with real data
614 e.Application = Application.GetApplicationFromPtr(data);
616 if (_applicationResetEventHandler != null)
618 //here we send all data to user event handlers
619 _applicationResetEventHandler(this, e);
624 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
625 * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler<object,NUIApplicationResizeEventArgs>)
626 * provided by the user. Resized signal is emitted when application is resized
628 public event DaliEventHandler<object,NUIApplicationResizeEventArgs> Resized
634 // Restricted to only one listener
635 if (_applicationResizeEventHandler == null)
637 _applicationResizeEventHandler += value;
639 _applicationResizeEventCallbackDelegate = new NUIApplicationResizeEventCallbackDelegate(OnNUIApplicationResize);
640 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
649 if (_applicationResizeEventHandler != null)
651 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
654 _applicationResizeEventHandler -= value;
659 // Callback for Application ResizeSignal
660 private void OnNUIApplicationResize(IntPtr data)
662 NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs();
664 // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data
665 e.Application = Application.GetApplicationFromPtr(data);
667 if (_applicationResizeEventHandler != null)
669 //here we send all data to user event handlers
670 _applicationResizeEventHandler(this, e);
675 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
676 * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs>)
677 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
679 public event DaliEventHandler<object,NUIApplicationLanguageChangedEventArgs> LanguageChanged
685 // Restricted to only one listener
686 if (_applicationLanguageChangedEventHandler == null)
688 _applicationLanguageChangedEventHandler += value;
690 _applicationLanguageChangedEventCallbackDelegate = new NUIApplicationLanguageChangedEventCallbackDelegate(OnNUIApplicationLanguageChanged);
691 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
700 if (_applicationLanguageChangedEventHandler != null)
702 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
705 _applicationLanguageChangedEventHandler -= value;
710 // Callback for Application LanguageChangedSignal
711 private void OnNUIApplicationLanguageChanged(IntPtr data)
713 NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
715 // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data
716 e.Application = Application.GetApplicationFromPtr(data);
718 if (_applicationLanguageChangedEventHandler != null)
720 //here we send all data to user event handlers
721 _applicationLanguageChangedEventHandler(this, e);
726 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
727 * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler<object,NUIApplicationRegionChangedEventArgs>)
728 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
730 public event DaliEventHandler<object,NUIApplicationRegionChangedEventArgs> RegionChanged
736 // Restricted to only one listener
737 if (_applicationRegionChangedEventHandler == null)
739 _applicationRegionChangedEventHandler += value;
741 _applicationRegionChangedEventCallbackDelegate = new NUIApplicationRegionChangedEventCallbackDelegate(OnNUIApplicationRegionChanged);
742 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
751 if (_applicationRegionChangedEventHandler != null)
753 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
756 _applicationRegionChangedEventHandler -= value;
761 // Callback for Application RegionChangedSignal
762 private void OnNUIApplicationRegionChanged(IntPtr data)
764 NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
766 // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data
767 e.Application = Application.GetApplicationFromPtr(data);
769 if (_applicationRegionChangedEventHandler != null)
771 //here we send all data to user event handlers
772 _applicationRegionChangedEventHandler(this, e);
777 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
778 * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler<object,NUIApplicationBatteryLowEventArgs>)
779 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
781 public event DaliEventHandler<object,NUIApplicationBatteryLowEventArgs> BatteryLow
787 // Restricted to only one listener
788 if (_applicationBatteryLowEventHandler == null)
790 _applicationBatteryLowEventHandler += value;
792 _applicationBatteryLowEventCallbackDelegate = new NUIApplicationBatteryLowEventCallbackDelegate(OnNUIApplicationBatteryLow);
793 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
802 if (_applicationBatteryLowEventHandler != null)
804 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
807 _applicationBatteryLowEventHandler -= value;
812 // Callback for Application BatteryLowSignal
813 private void OnNUIApplicationBatteryLow(IntPtr data)
815 NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
817 // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
818 e.Application = Application.GetApplicationFromPtr(data);
820 if (_applicationBatteryLowEventHandler != null)
822 //here we send all data to user event handlers
823 _applicationBatteryLowEventHandler(this, e);
828 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
829 * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler<object,NUIApplicationMemoryLowEventArgs>)
830 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
832 public event DaliEventHandler<object,NUIApplicationMemoryLowEventArgs> MemoryLow
838 // Restricted to only one listener
839 if (_applicationMemoryLowEventHandler == null)
841 _applicationMemoryLowEventHandler += value;
843 _applicationMemoryLowEventCallbackDelegate = new NUIApplicationMemoryLowEventCallbackDelegate(OnNUIApplicationMemoryLow);
844 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
853 if (_applicationMemoryLowEventHandler != null)
855 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
858 _applicationMemoryLowEventHandler -= value;
863 // Callback for Application MemoryLowSignal
864 private void OnNUIApplicationMemoryLow(IntPtr data)
866 NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
868 // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
869 e.Application = Application.GetApplicationFromPtr(data);
871 if (_applicationMemoryLowEventHandler != null)
873 //here we send all data to user event handlers
874 _applicationMemoryLowEventHandler(this, e);
879 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
880 * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler<object,NUIApplicationAppControlEventArgs>)
881 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
883 public event DaliEventHandler<object,NUIApplicationAppControlEventArgs> AppControl
889 // Restricted to only one listener
890 if (_applicationAppControlEventHandler == null)
892 _applicationAppControlEventHandler += value;
894 _applicationAppControlEventCallbackDelegate = new NUIApplicationAppControlEventCallbackDelegate(OnNUIApplicationAppControl);
895 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
904 if (_applicationAppControlEventHandler != null)
906 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
909 _applicationAppControlEventHandler -= value;
914 // Callback for Application AppControlSignal
915 private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
917 NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
919 // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data
920 e.Application = Application.GetApplicationFromPtr(application);
923 if (_applicationAppControlEventHandler != null)
925 //here we send all data to user event handlers
926 _applicationAppControlEventHandler(this, e);
930 private static Application _instance; // singleton
932 public delegate void InitDelegate();
934 public delegate void TerminateDelegate();
936 public delegate void PauseDelegate();
938 public delegate void ResumeDelegate();
940 public delegate void ResizeDelegate();
942 public delegate void AppControlDelegate();
944 public delegate void LanguageChangedDelegate();
946 public delegate void RegionChangedDelegate();
948 public delegate void BatteryLowDelegate();
950 public delegate void MemoryLowDelegate();
952 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
953 internal delegate void InitDelegateInternal();
955 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
956 internal delegate void TerminateDelegateInternal();
958 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
959 internal delegate void PauseDelegateInternal();
961 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
962 internal delegate void ResumeDelegateInternal();
964 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
965 internal delegate void ResizeDelegateInternal();
967 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
968 internal delegate void AppControlDelegateInternal();
970 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
971 internal delegate void LanguageChangedDelegateInternal();
973 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
974 internal delegate void RegionChangedDelegateInternal();
976 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
977 internal delegate void BatteryLowDelegateInternal();
979 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
980 internal delegate void MemoryLowDelegateInternal();
982 static void Initialize()
984 // instance.InitDelegate();
987 public static Application Instance
995 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr) {
996 Application ret = new Application(cPtr, false);
997 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 internal void SetupDelegates() {
1002 InitDelegateInternal initializeCallback = new InitDelegateInternal( Initialize );
1003 System.Console.WriteLine( "InitSignal connection count");
1005 this.InitSignal().Connect( initializeCallback );
1006 //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
1009 public static Application NewApplication() {
1010 _instance = NewApplication("", Application.WINDOW_MODE.OPAQUE);
1014 public static Application NewApplication(string stylesheet) {
1015 _instance = NewApplication(stylesheet, Application.WINDOW_MODE.OPAQUE);
1019 public static Application NewApplication(string stylesheet, Application.WINDOW_MODE windowMode) {
1021 Application ret = New(1, stylesheet, windowMode);
1022 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1024 // we've got an application now connect the signals
1025 ret.SetupDelegates();
1026 // set the singleton
1031 public bool AddIdle(System.Delegate func) {
1032 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
1033 System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
1035 bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2));
1037 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1044 %define DALI_APPLICATION_EVENTHANDLER_PARAM( NameSpace, ClassName)
1045 APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
1046 APPLICATION_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
1051 DALI_APPLICATION_EVENTHANDLER_PARAM( Dali, Application);