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
308 %define APPLICATION_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
309 %typemap(cscode) NameSpace::ClassName %{
310 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
311 private delegate void AUIApplicationInitEventCallbackDelegate(IntPtr application);
312 private DaliEventHandler<object,AUIApplicationInitEventArgs> _applicationInitEventHandler;
313 private AUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
316 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
317 private delegate void AUIApplicationTerminateEventCallbackDelegate(IntPtr application);
318 private DaliEventHandler<object,AUIApplicationTerminateEventArgs> _applicationTerminateEventHandler;
319 private AUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
322 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
323 private delegate void AUIApplicationPauseEventCallbackDelegate(IntPtr application);
324 private DaliEventHandler<object,AUIApplicationPauseEventArgs> _applicationPauseEventHandler;
325 private AUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
328 private delegate void AUIApplicationResumeEventCallbackDelegate(IntPtr application);
329 private DaliEventHandler<object,AUIApplicationResumeEventArgs> _applicationResumeEventHandler;
330 private AUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
333 private delegate void AUIApplicationResetEventCallbackDelegate(IntPtr application);
334 private DaliEventHandler<object,AUIApplicationResetEventArgs> _applicationResetEventHandler;
335 private AUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
338 private delegate void AUIApplicationResizeEventCallbackDelegate(IntPtr application);
339 private DaliEventHandler<object,AUIApplicationResizeEventArgs> _applicationResizeEventHandler;
340 private AUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
342 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
343 private delegate void AUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
344 private DaliEventHandler<object,AUIApplicationLanguageChangedEventArgs> _applicationLanguageChangedEventHandler;
345 private AUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
348 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
349 private delegate void AUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
350 private DaliEventHandler<object,AUIApplicationRegionChangedEventArgs> _applicationRegionChangedEventHandler;
351 private AUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
353 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
354 private delegate void AUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
355 private DaliEventHandler<object,AUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
356 private AUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
358 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359 private delegate void AUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
360 private DaliEventHandler<object,AUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
361 private AUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
363 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
364 private delegate void AUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
365 private DaliEventHandler<object,AUIApplicationAppControlEventArgs> _applicationAppControlEventHandler;
366 private AUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
369 * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
370 * (in the type of AUIApplicationInitEventHandler - DaliEventHandler<object,AUIApplicationInitEventArgs>)
371 * provided by the user. Initialized signal is emitted when application is initialised
373 public event DaliEventHandler<object,AUIApplicationInitEventArgs> Initialized
379 // Restricted to only one listener
380 if (_applicationInitEventHandler == null)
382 _applicationInitEventHandler += value;
384 _applicationInitEventCallbackDelegate = new AUIApplicationInitEventCallbackDelegate(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 AUIApplicationInitEventArgs e = new AUIApplicationInitEventArgs();
409 // Populate all members of "e" (AUIApplicationInitEventArgs) 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 AUIApplicationTerminateEventHandler-DaliEventHandler<object,AUIApplicationTerminateEventArgs>)
422 * provided by the user. Terminated signal is emitted when application is terminated
424 public event DaliEventHandler<object,AUIApplicationTerminateEventArgs> Terminated
430 // Restricted to only one listener
431 if (_applicationTerminateEventHandler == null)
433 _applicationTerminateEventHandler += value;
435 _applicationTerminateEventCallbackDelegate = new AUIApplicationTerminateEventCallbackDelegate(OnAUIApplicationTerminate);
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 OnAUIApplicationTerminate(IntPtr data)
458 AUIApplicationTerminateEventArgs e = new AUIApplicationTerminateEventArgs();
460 // Populate all members of "e" (AUIApplicationTerminateEventArgs) 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 AUIApplicationPauseEventHandler-DaliEventHandler<object,AUIApplicationPauseEventArgs>)
473 * provided by the user. Paused signal is emitted when application is paused
475 public event DaliEventHandler<object,AUIApplicationPauseEventArgs> Paused
481 // Restricted to only one listener
482 if (_applicationPauseEventHandler == null)
484 _applicationPauseEventHandler += value;
486 _applicationPauseEventCallbackDelegate = new AUIApplicationPauseEventCallbackDelegate(OnAUIApplicationPause);
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 OnAUIApplicationPause(IntPtr data)
509 AUIApplicationPauseEventArgs e = new AUIApplicationPauseEventArgs();
511 // Populate all members of "e" (AUIApplicationPauseEventArgs) 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 AUIApplicationResumeEventHandler-DaliEventHandler<object,AUIApplicationResumeEventArgs>)
524 * provided by the user. Resumed signal is emitted when application is resumed
526 public event DaliEventHandler<object,AUIApplicationResumeEventArgs> Resumed
532 // Restricted to only one listener
533 if (_applicationResumeEventHandler == null)
535 _applicationResumeEventHandler += value;
537 _applicationResumeEventCallbackDelegate = new AUIApplicationResumeEventCallbackDelegate(OnAUIApplicationResume);
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 OnAUIApplicationResume(IntPtr data)
560 AUIApplicationResumeEventArgs e = new AUIApplicationResumeEventArgs();
562 // Populate all members of "e" (AUIApplicationResumeEventArgs) 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 AUIApplicationResetEventHandler-DaliEventHandler<object,AUIApplicationResetEventArgs>)
575 * provided by the user. Reset signal is emitted when application is reset
577 public event DaliEventHandler<object,AUIApplicationResetEventArgs> Reset
583 // Restricted to only one listener
584 if (_applicationResetEventHandler == null)
586 _applicationResetEventHandler += value;
588 _applicationResetEventCallbackDelegate = new AUIApplicationResetEventCallbackDelegate(OnAUIApplicationReset);
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 OnAUIApplicationReset(IntPtr data)
611 AUIApplicationResetEventArgs e = new AUIApplicationResetEventArgs();
613 // Populate all members of "e" (AUIApplicationResetEventArgs) 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 AUIApplicationResizeEventHandler-DaliEventHandler<object,AUIApplicationResizeEventArgs>)
626 * provided by the user. Resized signal is emitted when application is resized
628 public event DaliEventHandler<object,AUIApplicationResizeEventArgs> Resized
634 // Restricted to only one listener
635 if (_applicationResizeEventHandler == null)
637 _applicationResizeEventHandler += value;
639 _applicationResizeEventCallbackDelegate = new AUIApplicationResizeEventCallbackDelegate(OnAUIApplicationResize);
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 OnAUIApplicationResize(IntPtr data)
662 AUIApplicationResizeEventArgs e = new AUIApplicationResizeEventArgs();
664 // Populate all members of "e" (AUIApplicationResizeEventArgs) 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 AUIApplicationLanguageChangedEventHandler-DaliEventHandler<object,AUIApplicationLanguageChangedEventArgs>)
677 * provided by the user. LanguageChanged signal is emitted when the region of the device is changed.
679 public event DaliEventHandler<object,AUIApplicationLanguageChangedEventArgs> LanguageChanged
685 // Restricted to only one listener
686 if (_applicationLanguageChangedEventHandler == null)
688 _applicationLanguageChangedEventHandler += value;
690 _applicationLanguageChangedEventCallbackDelegate = new AUIApplicationLanguageChangedEventCallbackDelegate(OnAUIApplicationLanguageChanged);
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 OnAUIApplicationLanguageChanged(IntPtr data)
713 AUIApplicationLanguageChangedEventArgs e = new AUIApplicationLanguageChangedEventArgs();
715 // Populate all members of "e" (AUIApplicationLanguageChangedEventArgs) 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 AUIApplicationRegionChangedEventHandler-DaliEventHandler<object,AUIApplicationRegionChangedEventArgs>)
728 * provided by the user. RegionChanged signal is emitted when the region of the device is changed.
730 public event DaliEventHandler<object,AUIApplicationRegionChangedEventArgs> RegionChanged
736 // Restricted to only one listener
737 if (_applicationRegionChangedEventHandler == null)
739 _applicationRegionChangedEventHandler += value;
741 _applicationRegionChangedEventCallbackDelegate = new AUIApplicationRegionChangedEventCallbackDelegate(OnAUIApplicationRegionChanged);
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 OnAUIApplicationRegionChanged(IntPtr data)
764 AUIApplicationRegionChangedEventArgs e = new AUIApplicationRegionChangedEventArgs();
766 // Populate all members of "e" (AUIApplicationRegionChangedEventArgs) 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 AUIApplicationBatteryLowEventHandler-DaliEventHandler<object,AUIApplicationBatteryLowEventArgs>)
779 * provided by the user. BatteryLow signal is emitted when the battery level of the device is low.
781 public event DaliEventHandler<object,AUIApplicationBatteryLowEventArgs> BatteryLow
787 // Restricted to only one listener
788 if (_applicationBatteryLowEventHandler == null)
790 _applicationBatteryLowEventHandler += value;
792 _applicationBatteryLowEventCallbackDelegate = new AUIApplicationBatteryLowEventCallbackDelegate(OnAUIApplicationBatteryLow);
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 OnAUIApplicationBatteryLow(IntPtr data)
815 AUIApplicationBatteryLowEventArgs e = new AUIApplicationBatteryLowEventArgs();
817 // Populate all members of "e" (AUIApplicationBatteryLowEventArgs) 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 AUIApplicationMemoryLowEventHandler-DaliEventHandler<object,AUIApplicationMemoryLowEventArgs>)
830 * provided by the user. MemoryLow signal is emitted when the memory level of the device is low.
832 public event DaliEventHandler<object,AUIApplicationMemoryLowEventArgs> MemoryLow
838 // Restricted to only one listener
839 if (_applicationMemoryLowEventHandler == null)
841 _applicationMemoryLowEventHandler += value;
843 _applicationMemoryLowEventCallbackDelegate = new AUIApplicationMemoryLowEventCallbackDelegate(OnAUIApplicationMemoryLow);
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 OnAUIApplicationMemoryLow(IntPtr data)
866 AUIApplicationMemoryLowEventArgs e = new AUIApplicationMemoryLowEventArgs();
868 // Populate all members of "e" (AUIApplicationMemoryLowEventArgs) 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 AUIApplicationAppControlEventHandler-DaliEventHandler<object,AUIApplicationAppControlEventArgs>)
881 * provided by the user. AppControl signal is emitted when another application sends a launch request to the application.
883 public event DaliEventHandler<object,AUIApplicationAppControlEventArgs> AppControl
889 // Restricted to only one listener
890 if (_applicationAppControlEventHandler == null)
892 _applicationAppControlEventHandler += value;
894 _applicationAppControlEventCallbackDelegate = new AUIApplicationAppControlEventCallbackDelegate(OnAUIApplicationAppControl);
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 OnAUIApplicationAppControl(IntPtr application, IntPtr voidp)
917 AUIApplicationAppControlEventArgs e = new AUIApplicationAppControlEventArgs();
919 // Populate all members of "e" (AUIApplicationAppControlEventArgs) 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 GetApplicationFromPtr(global::System.IntPtr cPtr) {
988 Application ret = new Application(cPtr, false);
989 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
993 internal void SetupDelegates() {
994 InitDelegateInternal initializeCallback = new InitDelegateInternal( Initialize );
995 System.Console.WriteLine( "InitSignal connection count");
997 this.InitSignal().Connect( initializeCallback );
998 //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
1001 public static Application NewApplication() {
1002 Application ret = New(1);
1003 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1005 // we've got an application now connect the signals
1006 ret.SetupDelegates();
1007 // set the singleton
1015 %define DALI_APPLICATION_EVENTHANDLER_PARAM( NameSpace, ClassName)
1016 APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
1017 APPLICATION_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
1022 DALI_APPLICATION_EVENTHANDLER_PARAM( Dali, Application);