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 AUIApplicationInit signal
27 public class AUIApplicationInitEventArgs : 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 AUIApplicationTerminate signal
52 public class AUIApplicationTerminateEventArgs : 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 AUIApplicationPause signal
76 public class AUIApplicationPauseEventArgs : 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 AUIApplicationResume signal
100 public class AUIApplicationResumeEventArgs : 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 AUIApplicationReset signal
124 public class AUIApplicationResetEventArgs : 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 AUIApplicationResize signal
148 public class AUIApplicationResizeEventArgs : 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 AUIApplicationLanguageChanged signal
172 public class AUIApplicationLanguageChangedEventArgs : 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 AUIApplicationRegionChanged signal
196 public class AUIApplicationRegionChangedEventArgs : 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 AUIApplicationBatteryLow signal
220 public class AUIApplicationBatteryLowEventArgs : 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 AUIApplicationMemoryLow signal
244 public class AUIApplicationMemoryLowEventArgs : 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 AUIApplicationAppControl signal
268 public class AUIApplicationAppControlEventArgs : 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
304 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
305 public delegate void AUIApplicationInitEventHandler(object source, AUIApplicationInitEventArgs e);
307 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
308 public delegate void AUIApplicationTerminateEventHandler(object source, AUIApplicationTerminateEventArgs e);
310 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
311 public delegate void AUIApplicationPauseEventHandler(object source, AUIApplicationPauseEventArgs e);
313 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
314 public delegate void AUIApplicationResumeEventHandler(object source, AUIApplicationResumeEventArgs e);
316 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
317 public delegate void AUIApplicationResetEventHandler(object source, AUIApplicationResetEventArgs e);
319 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
320 public delegate void AUIApplicationResizeEventHandler(object source, AUIApplicationResizeEventArgs e);
322 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
323 public delegate void AUIApplicationLanguageChangedEventHandler(object source, AUIApplicationLanguageChangedEventArgs e);
325 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
326 public delegate void AUIApplicationRegionChangedEventHandler(object source, AUIApplicationRegionChangedEventArgs e);
328 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
329 public delegate void AUIApplicationBatteryLowEventHandler(object source, AUIApplicationBatteryLowEventArgs e);
331 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
332 public delegate void AUIApplicationMemoryLowEventHandler(object source, AUIApplicationMemoryLowEventArgs e);
334 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
335 public delegate void AUIApplicationAppControlEventHandler(object source, AUIApplicationAppControlEventArgs e);
342 %define APPLICATION_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
343 %typemap(cscode) NameSpace::ClassName %{
344 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
345 private delegate void AUIApplicationInitEventCallbackDelegate(IntPtr application);
346 private AUIApplicationInitEventHandler _applicationInitEventHandler;
347 private AUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
350 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
351 private delegate void AUIApplicationTerminateEventCallbackDelegate(IntPtr application);
352 private AUIApplicationTerminateEventHandler _applicationTerminateEventHandler;
353 private AUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
356 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
357 private delegate void AUIApplicationPauseEventCallbackDelegate(IntPtr application);
358 private AUIApplicationPauseEventHandler _applicationPauseEventHandler;
359 private AUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
361 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
362 private delegate void AUIApplicationResumeEventCallbackDelegate(IntPtr application);
363 private AUIApplicationResumeEventHandler _applicationResumeEventHandler;
364 private AUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
366 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
367 private delegate void AUIApplicationResetEventCallbackDelegate(IntPtr application);
368 private AUIApplicationResetEventHandler _applicationResetEventHandler;
369 private AUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
371 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
372 private delegate void AUIApplicationResizeEventCallbackDelegate(IntPtr application);
373 private AUIApplicationResizeEventHandler _applicationResizeEventHandler;
374 private AUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
376 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
377 private delegate void AUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
378 private AUIApplicationLanguageChangedEventHandler _applicationLanguageChangedEventHandler;
379 private AUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
382 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
383 private delegate void AUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
384 private AUIApplicationRegionChangedEventHandler _applicationRegionChangedEventHandler;
385 private AUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
387 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
388 private delegate void AUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
389 private AUIApplicationBatteryLowEventHandler _applicationBatteryLowEventHandler;
390 private AUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
392 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
393 private delegate void AUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
394 private AUIApplicationMemoryLowEventHandler _applicationMemoryLowEventHandler;
395 private AUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
397 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
398 private delegate void AUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
399 private AUIApplicationAppControlEventHandler _applicationAppControlEventHandler;
400 private AUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
403 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
404 * (in the type of AUIApplicationInitEventHandler) provided by the user.
405 * Initialized signal is emitted when application is initialised
407 public event AUIApplicationInitEventHandler Initialized
413 // Restricted to only one listener
414 if (_applicationInitEventHandler == null)
416 _applicationInitEventHandler += value;
418 _applicationInitEventCallbackDelegate = new AUIApplicationInitEventCallbackDelegate(OnApplicationInit);
419 this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
428 if (_applicationInitEventHandler != null)
430 this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
433 _applicationInitEventHandler -= value;
438 // Callback for Application InitSignal
439 private void OnApplicationInit(IntPtr data)
441 AUIApplicationInitEventArgs e = new AUIApplicationInitEventArgs();
443 // Populate all members of "e" (AUIApplicationInitEventArgs) with real data
444 e.Application = Application.GetApplicationFromPtr(data);
446 if (_applicationInitEventHandler != null)
448 //here we send all data to user event handlers
449 _applicationInitEventHandler(this, e);
454 * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
455 * (in the type of AUIApplicationTerminateEventHandler) provided by the user.
456 * Terminated signal is emitted when application is terminated
458 public event AUIApplicationTerminateEventHandler Terminated
464 // Restricted to only one listener
465 if (_applicationTerminateEventHandler == null)
467 _applicationTerminateEventHandler += value;
469 _applicationTerminateEventCallbackDelegate = new AUIApplicationTerminateEventCallbackDelegate(OnAUIApplicationTerminate);
470 this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
479 if (_applicationTerminateEventHandler != null)
481 this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
484 _applicationTerminateEventHandler -= value;
489 // Callback for Application TerminateSignal
490 private void OnAUIApplicationTerminate(IntPtr data)
492 AUIApplicationTerminateEventArgs e = new AUIApplicationTerminateEventArgs();
494 // Populate all members of "e" (AUIApplicationTerminateEventArgs) with real data
495 e.Application = Application.GetApplicationFromPtr(data);
497 if (_applicationTerminateEventHandler != null)
499 //here we send all data to user event handlers
500 _applicationTerminateEventHandler(this, e);
505 * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
506 * (in the type of AUIApplicationPauseEventHandler) provided by the user.
507 * Paused signal is emitted when application is paused
509 public event AUIApplicationPauseEventHandler Paused
515 // Restricted to only one listener
516 if (_applicationPauseEventHandler == null)
518 _applicationPauseEventHandler += value;
520 _applicationPauseEventCallbackDelegate = new AUIApplicationPauseEventCallbackDelegate(OnAUIApplicationPause);
521 this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
530 if (_applicationPauseEventHandler != null)
532 this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
535 _applicationPauseEventHandler -= value;
540 // Callback for Application PauseSignal
541 private void OnAUIApplicationPause(IntPtr data)
543 AUIApplicationPauseEventArgs e = new AUIApplicationPauseEventArgs();
545 // Populate all members of "e" (AUIApplicationPauseEventArgs) with real data
546 e.Application = Application.GetApplicationFromPtr(data);
548 if (_applicationPauseEventHandler != null)
550 //here we send all data to user event handlers
551 _applicationPauseEventHandler(this, e);
556 * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
557 * (in the type of AUIApplicationResumeEventHandler) provided by the user.
558 * Resumed signal is emitted when application is resumed
560 public event AUIApplicationResumeEventHandler Resumed
566 // Restricted to only one listener
567 if (_applicationResumeEventHandler == null)
569 _applicationResumeEventHandler += value;
571 _applicationResumeEventCallbackDelegate = new AUIApplicationResumeEventCallbackDelegate(OnAUIApplicationResume);
572 this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
581 if (_applicationResumeEventHandler != null)
583 this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
586 _applicationResumeEventHandler -= value;
591 // Callback for Application ResumeSignal
592 private void OnAUIApplicationResume(IntPtr data)
594 AUIApplicationResumeEventArgs e = new AUIApplicationResumeEventArgs();
596 // Populate all members of "e" (AUIApplicationResumeEventArgs) with real data
597 e.Application = Application.GetApplicationFromPtr(data);
599 if (_applicationResumeEventHandler != null)
601 //here we send all data to user event handlers
602 _applicationResumeEventHandler(this, e);
607 * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
608 * (in the type of AUIApplicationResetEventHandler) provided by the user.
609 * Reset signal is emitted when application is reset
611 public event AUIApplicationResetEventHandler Reset
617 // Restricted to only one listener
618 if (_applicationResetEventHandler == null)
620 _applicationResetEventHandler += value;
622 _applicationResetEventCallbackDelegate = new AUIApplicationResetEventCallbackDelegate(OnAUIApplicationReset);
623 this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
632 if (_applicationResetEventHandler != null)
634 this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
637 _applicationResetEventHandler -= value;
642 // Callback for Application ResetSignal
643 private void OnAUIApplicationReset(IntPtr data)
645 AUIApplicationResetEventArgs e = new AUIApplicationResetEventArgs();
647 // Populate all members of "e" (AUIApplicationResetEventArgs) with real data
648 e.Application = Application.GetApplicationFromPtr(data);
650 if (_applicationResetEventHandler != null)
652 //here we send all data to user event handlers
653 _applicationResetEventHandler(this, e);
658 * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
659 * (in the type of AUIApplicationResizeEventHandler) provided by the user.
660 * Resized signal is emitted when application is resized
662 public event AUIApplicationResizeEventHandler Resized
668 // Restricted to only one listener
669 if (_applicationResizeEventHandler == null)
671 _applicationResizeEventHandler += value;
673 _applicationResizeEventCallbackDelegate = new AUIApplicationResizeEventCallbackDelegate(OnAUIApplicationResize);
674 this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
683 if (_applicationResizeEventHandler != null)
685 this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
688 _applicationResizeEventHandler -= value;
693 // Callback for Application ResizeSignal
694 private void OnAUIApplicationResize(IntPtr data)
696 AUIApplicationResizeEventArgs e = new AUIApplicationResizeEventArgs();
698 // Populate all members of "e" (AUIApplicationResizeEventArgs) with real data
699 e.Application = Application.GetApplicationFromPtr(data);
701 if (_applicationResizeEventHandler != null)
703 //here we send all data to user event handlers
704 _applicationResizeEventHandler(this, e);
709 * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
710 * (in the type of AUIApplicationLanguageChangedEventHandler) provided by the user.
711 * LanguageChanged signal is emitted when the region of the device is changed.
713 public event AUIApplicationLanguageChangedEventHandler LanguageChanged
719 // Restricted to only one listener
720 if (_applicationLanguageChangedEventHandler == null)
722 _applicationLanguageChangedEventHandler += value;
724 _applicationLanguageChangedEventCallbackDelegate = new AUIApplicationLanguageChangedEventCallbackDelegate(OnAUIApplicationLanguageChanged);
725 this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
734 if (_applicationLanguageChangedEventHandler != null)
736 this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
739 _applicationLanguageChangedEventHandler -= value;
744 // Callback for Application LanguageChangedSignal
745 private void OnAUIApplicationLanguageChanged(IntPtr data)
747 AUIApplicationLanguageChangedEventArgs e = new AUIApplicationLanguageChangedEventArgs();
749 // Populate all members of "e" (AUIApplicationLanguageChangedEventArgs) with real data
750 e.Application = Application.GetApplicationFromPtr(data);
752 if (_applicationLanguageChangedEventHandler != null)
754 //here we send all data to user event handlers
755 _applicationLanguageChangedEventHandler(this, e);
760 * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
761 * (in the type of AUIApplicationRegionChangedEventHandler) provided by the user.
762 * RegionChanged signal is emitted when the region of the device is changed.
764 public event AUIApplicationRegionChangedEventHandler RegionChanged
770 // Restricted to only one listener
771 if (_applicationRegionChangedEventHandler == null)
773 _applicationRegionChangedEventHandler += value;
775 _applicationRegionChangedEventCallbackDelegate = new AUIApplicationRegionChangedEventCallbackDelegate(OnAUIApplicationRegionChanged);
776 this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
785 if (_applicationRegionChangedEventHandler != null)
787 this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
790 _applicationRegionChangedEventHandler -= value;
795 // Callback for Application RegionChangedSignal
796 private void OnAUIApplicationRegionChanged(IntPtr data)
798 AUIApplicationRegionChangedEventArgs e = new AUIApplicationRegionChangedEventArgs();
800 // Populate all members of "e" (AUIApplicationRegionChangedEventArgs) with real data
801 e.Application = Application.GetApplicationFromPtr(data);
803 if (_applicationRegionChangedEventHandler != null)
805 //here we send all data to user event handlers
806 _applicationRegionChangedEventHandler(this, e);
811 * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
812 * (in the type of AUIApplicationBatteryLowEventHandler) provided by the user.
813 * BatteryLow signal is emitted when the battery level of the device is low.
815 public event AUIApplicationBatteryLowEventHandler BatteryLow
821 // Restricted to only one listener
822 if (_applicationBatteryLowEventHandler == null)
824 _applicationBatteryLowEventHandler += value;
826 _applicationBatteryLowEventCallbackDelegate = new AUIApplicationBatteryLowEventCallbackDelegate(OnAUIApplicationBatteryLow);
827 this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
836 if (_applicationBatteryLowEventHandler != null)
838 this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
841 _applicationBatteryLowEventHandler -= value;
846 // Callback for Application BatteryLowSignal
847 private void OnAUIApplicationBatteryLow(IntPtr data)
849 AUIApplicationBatteryLowEventArgs e = new AUIApplicationBatteryLowEventArgs();
851 // Populate all members of "e" (AUIApplicationBatteryLowEventArgs) with real data
852 e.Application = Application.GetApplicationFromPtr(data);
854 if (_applicationBatteryLowEventHandler != null)
856 //here we send all data to user event handlers
857 _applicationBatteryLowEventHandler(this, e);
862 * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
863 * (in the type of AUIApplicationMemoryLowEventHandler) provided by the user.
864 * MemoryLow signal is emitted when the memory level of the device is low.
866 public event AUIApplicationMemoryLowEventHandler MemoryLow
872 // Restricted to only one listener
873 if (_applicationMemoryLowEventHandler == null)
875 _applicationMemoryLowEventHandler += value;
877 _applicationMemoryLowEventCallbackDelegate = new AUIApplicationMemoryLowEventCallbackDelegate(OnAUIApplicationMemoryLow);
878 this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
887 if (_applicationMemoryLowEventHandler != null)
889 this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
892 _applicationMemoryLowEventHandler -= value;
897 // Callback for Application MemoryLowSignal
898 private void OnAUIApplicationMemoryLow(IntPtr data)
900 AUIApplicationMemoryLowEventArgs e = new AUIApplicationMemoryLowEventArgs();
902 // Populate all members of "e" (AUIApplicationMemoryLowEventArgs) with real data
903 e.Application = Application.GetApplicationFromPtr(data);
905 if (_applicationMemoryLowEventHandler != null)
907 //here we send all data to user event handlers
908 _applicationMemoryLowEventHandler(this, e);
913 * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
914 * (in the type of AUIApplicationAppControlEventHandler) provided by the user.
915 * AppControl signal is emitted when another application sends a launch request to the application.
917 public event AUIApplicationAppControlEventHandler AppControl
923 // Restricted to only one listener
924 if (_applicationAppControlEventHandler == null)
926 _applicationAppControlEventHandler += value;
928 _applicationAppControlEventCallbackDelegate = new AUIApplicationAppControlEventCallbackDelegate(OnAUIApplicationAppControl);
929 this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
938 if (_applicationAppControlEventHandler != null)
940 this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
943 _applicationAppControlEventHandler -= value;
948 // Callback for Application AppControlSignal
949 private void OnAUIApplicationAppControl(IntPtr application, IntPtr voidp)
951 AUIApplicationAppControlEventArgs e = new AUIApplicationAppControlEventArgs();
953 // Populate all members of "e" (AUIApplicationAppControlEventArgs) with real data
954 e.Application = Application.GetApplicationFromPtr(application);
957 if (_applicationAppControlEventHandler != null)
959 //here we send all data to user event handlers
960 _applicationAppControlEventHandler(this, e);
964 private static Application instance; // singleton
966 public delegate void InitDelegate();
968 public delegate void TerminateDelegate();
970 public delegate void PauseDelegate();
972 public delegate void ResumeDelegate();
974 public delegate void ResizeDelegate();
976 public delegate void AppControlDelegate();
978 public delegate void LanguageChangedDelegate();
980 public delegate void RegionChangedDelegate();
982 public delegate void BatteryLowDelegate();
984 public delegate void MemoryLowDelegate();
986 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
987 internal delegate void InitDelegateInternal();
989 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
990 internal delegate void TerminateDelegateInternal();
992 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
993 internal delegate void PauseDelegateInternal();
995 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
996 internal delegate void ResumeDelegateInternal();
998 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
999 internal delegate void ResizeDelegateInternal();
1001 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1002 internal delegate void AppControlDelegateInternal();
1004 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1005 internal delegate void LanguageChangedDelegateInternal();
1007 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1008 internal delegate void RegionChangedDelegateInternal();
1010 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1011 internal delegate void BatteryLowDelegateInternal();
1013 [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
1014 internal delegate void MemoryLowDelegateInternal();
1016 static void Initialize()
1018 // instance.InitDelegate();
1021 public static Application GetApplicationFromPtr(global::System.IntPtr cPtr) {
1022 Application ret = new Application(cPtr, false);
1023 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027 internal void SetupDelegates() {
1028 InitDelegateInternal initializeCallback = new InitDelegateInternal( Initialize );
1029 System.Console.WriteLine( "InitSignal connection count");
1031 this.InitSignal().Connect( initializeCallback );
1032 //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
1035 public static Application NewApplication() {
1036 Application ret = New(1);
1037 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1039 // we've got an application now connect the signals
1040 ret.SetupDelegates();
1041 // set the singleton
1049 %define DALI_APPLICATION_EVENTHANDLER_PARAM( NameSpace, ClassName)
1050 APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
1051 APPLICATION_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
1056 DALI_APPLICATION_EVENTHANDLER_PARAM( Dali, Application);