From 5bdacbc181f88698499b69199b584d05a2791454 Mon Sep 17 00:00:00 2001 From: Ravi Nanjundappa Date: Mon, 10 Oct 2016 14:27:50 +0530 Subject: [PATCH 1/1] DALi C# binding - Generic Delegates support for EventHandlers Implemented the Generic delegates to support EventHandlers for all public classes. Added a new cs file (manual/csharp/DaliEventHandler.cs) having declaration for generic delegates. Earlier usage of EventHandlers : 1) _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize); 2) stage.Touched += new Dali.Stage.TouchEventHandler(OnStageTouched); 3) _scrollView.OnRelayoutEvent += new Dali.Actor.OnRelayoutEventHandler(OnScrollViewRelayout); New usage of Generic EventHandlers: ex: 1) _application.Initialized += Initialize; 2) stage.Touched += OnStageTouched; 3) _scrollView.OnRelayoutEvent += OnScrollViewRelayout; Change-Id: I6ce2af12c825a9a7ef830049863dafb1f63e6a17 Signed-off-by: Ravi Nanjundappa --- .../SWIG/events/accessibilitymanager-event.i | 263 +++++++-------------- plugins/dali-swig/SWIG/events/actor-event.i | 60 ++--- plugins/dali-swig/SWIG/events/animation-event.i | 9 +- plugins/dali-swig/SWIG/events/application-event.i | 122 ++++------ plugins/dali-swig/SWIG/events/builder-event.i | 7 +- plugins/dali-swig/SWIG/events/button-event.i | 35 +-- plugins/dali-swig/SWIG/events/control-event.i | 41 ++-- .../SWIG/events/gaussian-blur-view-event.i | 7 +- plugins/dali-swig/SWIG/events/image-event.i | 11 +- plugins/dali-swig/SWIG/events/itemview-event.i | 7 +- .../SWIG/events/keyboardFocusManager-event.i | 29 +-- .../dali-swig/SWIG/events/longpressgesture-event.i | 7 +- .../dali-swig/SWIG/events/objectregistry-event.i | 14 +- plugins/dali-swig/SWIG/events/pageturnview-event.i | 28 +-- plugins/dali-swig/SWIG/events/pangesture-event.i | 7 +- plugins/dali-swig/SWIG/events/pinchgesture-event.i | 7 +- plugins/dali-swig/SWIG/events/popup-event.i | 35 +-- .../SWIG/events/propertynotification-event.i | 9 +- plugins/dali-swig/SWIG/events/rendertask-event.i | 7 +- .../dali-swig/SWIG/events/resourceimage-event.i | 7 +- plugins/dali-swig/SWIG/events/scrollable-event.i | 21 +- plugins/dali-swig/SWIG/events/scrollbar-event.i | 16 +- plugins/dali-swig/SWIG/events/scrollview-event.i | 10 +- plugins/dali-swig/SWIG/events/slider-event.i | 26 +- plugins/dali-swig/SWIG/events/stage-event.i | 66 ++---- plugins/dali-swig/SWIG/events/stylemanager-event.i | 11 +- plugins/dali-swig/SWIG/events/tapgesture-event.i | 7 +- plugins/dali-swig/SWIG/events/texteditor-event.i | 10 +- plugins/dali-swig/SWIG/events/textfield-event.i | 15 +- plugins/dali-swig/SWIG/events/timer-event.i | 13 +- plugins/dali-swig/SWIG/events/videoview-event.i | 9 +- plugins/dali-swig/examples/dali-test.cs | 2 +- plugins/dali-swig/examples/hello-world.cs | 6 +- plugins/dali-swig/examples/scroll-view.cs | 4 +- .../dali-swig/manual/csharp/DaliEventHandler.cs | 12 + 35 files changed, 325 insertions(+), 615 deletions(-) create mode 100644 plugins/dali-swig/manual/csharp/DaliEventHandler.cs diff --git a/plugins/dali-swig/SWIG/events/accessibilitymanager-event.i b/plugins/dali-swig/SWIG/events/accessibilitymanager-event.i index fa988c9..f28e3ca 100644 --- a/plugins/dali-swig/SWIG/events/accessibilitymanager-event.i +++ b/plugins/dali-swig/SWIG/events/accessibilitymanager-event.i @@ -700,245 +700,156 @@ [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool StatusChangedEventHandler(object source, StatusChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionNextEventHandler(object source, ActionNextEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionPreviousEventHandler(object source, ActionPreviousEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionActivateEventHandler(object source, ActionActivateEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadEventHandler(object source, ActionReadEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionOverEventHandler(object source, ActionOverEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadNextEventHandler(object source, ActionReadNextEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadPreviousEventHandler(object source, ActionReadPreviousEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionUpEventHandler(object source, ActionUpEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionDownEventHandler(object source, ActionDownEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionClearFocusEventHandler(object source, ActionClearFocusEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionBackEventHandler(object source, ActionBackEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionScrollUpEventHandler(object source, ActionScrollUpEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionScrollDownEventHandler(object source, ActionScrollDownEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionPageLeftEventHandler(object source, ActionPageLeftEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionPageRightEventHandler(object source, ActionPageRightEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionPageUpEventHandler(object source, ActionPageUpEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionPageDownEventHandler(object source, ActionPageDownEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionMoveToFirstEventHandler(object source, ActionMoveToFirstEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionMoveToLastEventHandler(object source, ActionMoveToLastEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadFromTopEventHandler(object source, ActionReadFromTopEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadFromNextEventHandler(object source, ActionReadFromNextEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionZoomEventHandler(object source, ActionZoomEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadIndicatorInformationEventHandler(object source, ActionReadIndicatorInformationEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionReadPauseResumeEventHandler(object source, ActionReadPauseResumeEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionStartStopEventHandler(object source, ActionStartStopEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ActionScrollEventHandler(object source, ActionScrollEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FocusChangedEventHandler(object source, FocusChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FocusedActorActivatedEventHandler(object source, FocusedActorActivatedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FocusOvershotEventHandler(object source, FocusOvershotEventArgs e); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); - private StatusChangedEventHandler _accessibilityManagerStatusChangedEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); - private ActionNextEventHandler _accessibilityManagerActionNextEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private ActionPreviousEventHandler _accessibilityManagerActionPreviousEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); - private ActionActivateEventHandler _accessibilityManagerActionActivateEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadEventHandler _accessibilityManagerActionReadEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); - private ActionOverEventHandler _accessibilityManagerActionOverEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadNextEventHandler _accessibilityManagerActionReadNextEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadPreviousEventHandler _accessibilityManagerActionReadPreviousEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); - private ActionUpEventHandler _accessibilityManagerActionUpEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); - private ActionDownEventHandler _accessibilityManagerActionDownEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); - private ActionClearFocusEventHandler _accessibilityManagerActionClearFocusEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); - private ActionBackEventHandler _accessibilityManagerActionBackEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); - private ActionScrollUpEventHandler _accessibilityManagerActionScrollUpEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); - private ActionScrollDownEventHandler _accessibilityManagerActionScrollDownEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); - private ActionPageLeftEventHandler _accessibilityManagerActionPageLeftEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); - private ActionPageRightEventHandler _accessibilityManagerActionPageRightEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); - private ActionPageUpEventHandler _accessibilityManagerActionPageUpEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); - private ActionPageDownEventHandler _accessibilityManagerActionPageDownEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); - private ActionMoveToFirstEventHandler _accessibilityManagerActionMoveToFirstEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); - private ActionMoveToLastEventHandler _accessibilityManagerActionMoveToLastEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadFromTopEventHandler _accessibilityManagerActionReadFromTopEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadFromNextEventHandler _accessibilityManagerActionReadFromNextEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); - private ActionZoomEventHandler _accessibilityManagerActionZoomEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadIndicatorInformationEventHandler _accessibilityManagerActionReadIndicatorInformationEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadIndicatorInformationEventHandler; private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); - private ActionReadPauseResumeEventHandler _accessibilityManagerActionReadPauseResumeEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); - private ActionStartStopEventHandler _accessibilityManagerActionStartStopEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionStartStopEventHandler; private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent); - private ActionScrollEventHandler _accessibilityManagerActionScrollEventHandler; + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusChangedEventCallbackDelegate(IntPtr actor1, IntPtr actor2); - private FocusChangedEventHandler _accessibilityManagerFocusChangedEventHandler; + private DaliEventHandler _accessibilityManagerFocusChangedEventHandler; private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusedActorActivatedEventCallbackDelegate(IntPtr actor); - private FocusedActorActivatedEventHandler _accessibilityManagerFocusedActorActivatedEventHandler; + private DaliEventHandler _accessibilityManagerFocusedActorActivatedEventHandler; private FocusedActorActivatedEventCallbackDelegate _accessibilityManagerFocusedActorActivatedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedActor, AccessibilityManager.FocusOvershotDirection direction); - private FocusOvershotEventHandler _accessibilityManagerFocusOvershotEventHandler; + private DaliEventHandler _accessibilityManagerFocusOvershotEventHandler; private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate; - public event StatusChangedEventHandler StatusChanged + public event DaliEventHandlerWithReturnType StatusChanged { add { @@ -980,12 +891,12 @@ if (_accessibilityManagerStatusChangedEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerStatusChangedEventHandler(this, e); + return _accessibilityManagerStatusChangedEventHandler(this, e, true); } return false; } - public event ActionNextEventHandler ActionNext + public event DaliEventHandlerWithReturnType ActionNext { add { @@ -1027,12 +938,12 @@ if (_accessibilityManagerActionNextEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionNextEventHandler(this, e); + return _accessibilityManagerActionNextEventHandler(this, e, true); } return false; } - public event ActionPreviousEventHandler ActionPrevious + public event DaliEventHandlerWithReturnType ActionPrevious { add { @@ -1074,12 +985,12 @@ if (_accessibilityManagerActionPreviousEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionPreviousEventHandler(this, e); + return _accessibilityManagerActionPreviousEventHandler(this, e, true); } return false; } - public event ActionActivateEventHandler ActionActivate + public event DaliEventHandlerWithReturnType ActionActivate { add { @@ -1121,12 +1032,12 @@ if (_accessibilityManagerActionActivateEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionActivateEventHandler(this, e); + return _accessibilityManagerActionActivateEventHandler(this, e, true); } return false; } - public event ActionReadEventHandler ActionRead + public event DaliEventHandlerWithReturnType ActionRead { add { @@ -1168,12 +1079,12 @@ if (_accessibilityManagerActionReadEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadEventHandler(this, e); + return _accessibilityManagerActionReadEventHandler(this, e, true); } return false; } - public event ActionOverEventHandler ActionOver + public event DaliEventHandlerWithReturnType ActionOver { add { @@ -1215,12 +1126,12 @@ if (_accessibilityManagerActionOverEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionOverEventHandler(this, e); + return _accessibilityManagerActionOverEventHandler(this, e, true); } return false; } - public event ActionReadNextEventHandler ActionReadNext + public event DaliEventHandlerWithReturnType ActionReadNext { add { @@ -1262,13 +1173,13 @@ if (_accessibilityManagerActionReadNextEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadNextEventHandler(this, e); + return _accessibilityManagerActionReadNextEventHandler(this, e, true); } return false; } - public event ActionReadPreviousEventHandler ActionReadPrevious + public event DaliEventHandlerWithReturnType ActionReadPrevious { add { @@ -1310,12 +1221,12 @@ if (_accessibilityManagerActionReadPreviousEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadPreviousEventHandler(this, e); + return _accessibilityManagerActionReadPreviousEventHandler(this, e, true); } return false; } - public event ActionUpEventHandler ActionUp + public event DaliEventHandlerWithReturnType ActionUp { add { @@ -1357,12 +1268,12 @@ if (_accessibilityManagerActionUpEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionUpEventHandler(this, e); + return _accessibilityManagerActionUpEventHandler(this, e, true); } return false; } - public event ActionDownEventHandler ActionDown + public event DaliEventHandlerWithReturnType ActionDown { add { @@ -1404,12 +1315,12 @@ if (_accessibilityManagerActionDownEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionDownEventHandler(this, e); + return _accessibilityManagerActionDownEventHandler(this, e, true); } return false; } - public event ActionClearFocusEventHandler ActionClearFocus + public event DaliEventHandlerWithReturnType ActionClearFocus { add { @@ -1451,12 +1362,12 @@ if (_accessibilityManagerActionClearFocusEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionClearFocusEventHandler(this, e); + return _accessibilityManagerActionClearFocusEventHandler(this, e, true); } return false; } - public event ActionBackEventHandler ActionBack + public event DaliEventHandlerWithReturnType ActionBack { add { @@ -1498,12 +1409,12 @@ if (_accessibilityManagerActionBackEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionBackEventHandler(this, e); + return _accessibilityManagerActionBackEventHandler(this, e, true); } return false; } - public event ActionScrollUpEventHandler ActionScrollUp + public event DaliEventHandlerWithReturnType ActionScrollUp { add { @@ -1545,12 +1456,12 @@ if (_accessibilityManagerActionScrollUpEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionScrollUpEventHandler(this, e); + return _accessibilityManagerActionScrollUpEventHandler(this, e, true); } return false; } - public event ActionScrollDownEventHandler ActionScrollDown + public event DaliEventHandlerWithReturnType ActionScrollDown { add { @@ -1592,13 +1503,13 @@ if (_accessibilityManagerActionScrollDownEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionScrollDownEventHandler(this, e); + return _accessibilityManagerActionScrollDownEventHandler(this, e, true); } return false; } - public event ActionPageLeftEventHandler ActionPageLeft + public event DaliEventHandlerWithReturnType ActionPageLeft { add { @@ -1640,12 +1551,12 @@ if (_accessibilityManagerActionPageLeftEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionPageLeftEventHandler(this, e); + return _accessibilityManagerActionPageLeftEventHandler(this, e, true); } return false; } - public event ActionPageRightEventHandler ActionPageRight + public event DaliEventHandlerWithReturnType ActionPageRight { add { @@ -1687,12 +1598,12 @@ if (_accessibilityManagerActionPageRightEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionPageRightEventHandler(this, e); + return _accessibilityManagerActionPageRightEventHandler(this, e, true); } return false; } - public event ActionPageUpEventHandler ActionPageUp + public event DaliEventHandlerWithReturnType ActionPageUp { add { @@ -1734,13 +1645,13 @@ if (_accessibilityManagerActionPageUpEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionPageUpEventHandler(this, e); + return _accessibilityManagerActionPageUpEventHandler(this, e, true); } return false; } - public event ActionPageDownEventHandler ActionPageDown + public event DaliEventHandlerWithReturnType ActionPageDown { add { @@ -1782,13 +1693,13 @@ if (_accessibilityManagerActionPageDownEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionPageDownEventHandler(this, e); + return _accessibilityManagerActionPageDownEventHandler(this, e, true); } return false; } - public event ActionMoveToFirstEventHandler ActionMoveToFirst + public event DaliEventHandlerWithReturnType ActionMoveToFirst { add { @@ -1830,12 +1741,12 @@ if (_accessibilityManagerActionMoveToFirstEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionMoveToFirstEventHandler(this, e); + return _accessibilityManagerActionMoveToFirstEventHandler(this, e, true); } return false; } - public event ActionMoveToLastEventHandler ActionMoveToLast + public event DaliEventHandlerWithReturnType ActionMoveToLast { add { @@ -1877,12 +1788,12 @@ if (_accessibilityManagerActionMoveToLastEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionMoveToLastEventHandler(this, e); + return _accessibilityManagerActionMoveToLastEventHandler(this, e, true); } return false; } - public event ActionReadFromTopEventHandler ActionReadFromTop + public event DaliEventHandlerWithReturnType ActionReadFromTop { add { @@ -1924,12 +1835,12 @@ if (_accessibilityManagerActionReadFromTopEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadFromTopEventHandler(this, e); + return _accessibilityManagerActionReadFromTopEventHandler(this, e, true); } return false; } - public event ActionReadFromNextEventHandler ActionReadFromNext + public event DaliEventHandlerWithReturnType ActionReadFromNext { add { @@ -1971,12 +1882,12 @@ if (_accessibilityManagerActionReadFromNextEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadFromNextEventHandler(this, e); + return _accessibilityManagerActionReadFromNextEventHandler(this, e, true); } return false; } - public event ActionZoomEventHandler ActionZoom + public event DaliEventHandlerWithReturnType ActionZoom { add { @@ -2018,12 +1929,12 @@ if (_accessibilityManagerActionZoomEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionZoomEventHandler(this, e); + return _accessibilityManagerActionZoomEventHandler(this, e, true); } return false; } - public event ActionReadIndicatorInformationEventHandler ActionReadIndicatorInformation + public event DaliEventHandlerWithReturnType ActionReadIndicatorInformation { add { @@ -2065,12 +1976,12 @@ if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadIndicatorInformationEventHandler(this, e); + return _accessibilityManagerActionReadIndicatorInformationEventHandler(this, e, true); } return false; } - public event ActionReadPauseResumeEventHandler ActionReadPauseResume + public event DaliEventHandlerWithReturnType ActionReadPauseResume { add { @@ -2112,12 +2023,12 @@ if (_accessibilityManagerActionReadPauseResumeEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionReadPauseResumeEventHandler(this, e); + return _accessibilityManagerActionReadPauseResumeEventHandler(this, e, true); } return false; } - public event ActionStartStopEventHandler ActionStartStop + public event DaliEventHandlerWithReturnType ActionStartStop { add { @@ -2159,12 +2070,12 @@ if (_accessibilityManagerActionStartStopEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionStartStopEventHandler(this, e); + return _accessibilityManagerActionStartStopEventHandler(this, e, true); } return false; } - public event ActionScrollEventHandler ActionScroll + public event DaliEventHandlerWithReturnType ActionScroll { add { @@ -2207,12 +2118,12 @@ if (_accessibilityManagerActionScrollEventHandler != null) { //here we send all data to user event handlers - return _accessibilityManagerActionScrollEventHandler(this, e); + return _accessibilityManagerActionScrollEventHandler(this, e, true); } return false; } - public event FocusChangedEventHandler FocusChanged + public event DaliEventHandler FocusChanged { add { @@ -2259,7 +2170,7 @@ } } - public event FocusedActorActivatedEventHandler FocusedActorActivated + public event DaliEventHandler FocusedActorActivated { add { @@ -2306,7 +2217,7 @@ } - public event FocusOvershotEventHandler FocusOvershot + public event DaliEventHandler FocusOvershot { add { diff --git a/plugins/dali-swig/SWIG/events/actor-event.i b/plugins/dali-swig/SWIG/events/actor-event.i index 634a753..1a4b05a 100644 --- a/plugins/dali-swig/SWIG/events/actor-event.i +++ b/plugins/dali-swig/SWIG/events/actor-event.i @@ -231,59 +231,41 @@ [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool TouchEventHandler(object source, TouchEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool HoverEventHandler(object source, HoverEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool WheelEventHandler(object source, WheelEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void OnStageEventHandler(object source, OnStageEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void OffStageEventHandler(object source, OffStageEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void OnRelayoutEventHandler(object source, OnRelayoutEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool TouchCallbackDelegate(IntPtr actor, IntPtr touchData); - private TouchEventHandler _actorTouchDataEventHandler; + private DaliEventHandlerWithReturnType _actorTouchDataEventHandler; private TouchCallbackDelegate _actorTouchDataCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool HoverEventCallbackDelegate(IntPtr actor, IntPtr hoverEvent); - private HoverEventHandler _actorHoverEventHandler; + private DaliEventHandlerWithReturnType _actorHoverEventHandler; private HoverEventCallbackDelegate _actorHoverEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool WheelEventCallbackDelegate(IntPtr actor, IntPtr wheelEvent); - private WheelEventHandler _actorWheelEventHandler; + private DaliEventHandlerWithReturnType _actorWheelEventHandler; private WheelEventCallbackDelegate _actorWheelEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void OnStageEventCallbackDelegate(IntPtr actor); - private OnStageEventHandler _actorOnStageEventHandler; + private DaliEventHandler _actorOnStageEventHandler; private OnStageEventCallbackDelegate _actorOnStageEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void OffStageEventCallbackDelegate(IntPtr actor); - private OffStageEventHandler _actorOffStageEventHandler; + private DaliEventHandler _actorOffStageEventHandler; private OffStageEventCallbackDelegate _actorOffStageEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void OnRelayoutEventCallbackDelegate(IntPtr actor); - private OnRelayoutEventHandler _actorOnRelayoutEventHandler; + private DaliEventHandler _actorOnRelayoutEventHandler; private OnRelayoutEventCallbackDelegate _actorOnRelayoutEventCallbackDelegate; /** * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler - * (in the type of TouchEventHandler) provided by the user. - * Touched signal is emitted when touch input is received. + * (in the type of TouchEventHandler-DaliEventHandlerWithReturnType) + * provided by the user. Touched signal is emitted when touch input is received. */ - public event TouchEventHandler Touched + public event DaliEventHandlerWithReturnType Touched { add { @@ -326,7 +308,7 @@ if (_actorTouchDataEventHandler != null) { //here we send all data to user event handlers - return _actorTouchDataEventHandler(this, e); + return _actorTouchDataEventHandler(this, e, true); } return false; @@ -334,10 +316,10 @@ /** * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler - * (in the type of HoverEventHandler) provided by the user. - * Hovered signal is emitted when hover input is received. + * (in the type of HoverEventHandler-DaliEventHandlerWithReturnType) + * provided by the user. Hovered signal is emitted when hover input is received. */ - public event HoverEventHandler Hovered + public event DaliEventHandlerWithReturnType Hovered { add { @@ -380,7 +362,7 @@ if (_actorHoverEventHandler != null) { //here we send all data to user event handlers - return _actorHoverEventHandler(this, e); + return _actorHoverEventHandler(this, e, true); } return false; @@ -388,10 +370,10 @@ /** * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler - * (in the type of WheelEventHandler) provided by the user. - * WheelMoved signal is emitted when wheel event is received. + * (in the type of WheelEventHandler-DaliEventHandlerWithReturnType) + * provided by the user. WheelMoved signal is emitted when wheel event is received. */ - public event WheelEventHandler WheelMoved + public event DaliEventHandlerWithReturnType WheelMoved { add { @@ -434,7 +416,7 @@ if (_actorWheelEventHandler != null) { //here we send all data to user event handlers - return _actorWheelEventHandler(this, e); + return _actorWheelEventHandler(this, e, true); } return false; @@ -445,7 +427,7 @@ * (in the type of OnStageEventHandler) provided by the user. * OnStage signal is emitted after the actor has been connected to the stage. */ - public event OnStageEventHandler OnStageEvent + public event DaliEventHandler OnStageEvent { add { @@ -496,7 +478,7 @@ * (in the type of OffStageEventHandler) provided by the user. * OffStage signal is emitted after the actor has been disconnected from the stage. */ - public event OffStageEventHandler OffStageEvent + public event DaliEventHandler OffStageEvent { add { @@ -547,7 +529,7 @@ * (in the type of OnRelayoutEventHandler) provided by the user. * OnRelayout signal is emitted after the size has been set on the actor during relayout. */ - public event OnRelayoutEventHandler OnRelayoutEvent + public event DaliEventHandler OnRelayoutEvent { add { diff --git a/plugins/dali-swig/SWIG/events/animation-event.i b/plugins/dali-swig/SWIG/events/animation-event.i index 4415479..e921f76 100644 --- a/plugins/dali-swig/SWIG/events/animation-event.i +++ b/plugins/dali-swig/SWIG/events/animation-event.i @@ -52,19 +52,16 @@ using System.Runtime.InteropServices; } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FinishedEventHandler(object source, FinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FinishedEventCallbackDelegate(IntPtr Animation); - private FinishedEventHandler _animationFinishedEventHandler; + private DaliEventHandler _animationFinishedEventHandler; private FinishedEventCallbackDelegate _animationFinishedEventCallbackDelegate; /** * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler - * (in the type of FinishedEventHandler) provided by the user. + * (in the type of FinishedEventHandler - DaliEventHandler) provided by the user. * Finished signal is emitted when an Animation's animations have finished. */ - public event FinishedEventHandler Finished + public event DaliEventHandler Finished { add { diff --git a/plugins/dali-swig/SWIG/events/application-event.i b/plugins/dali-swig/SWIG/events/application-event.i index af9ebdf..73a05cd 100644 --- a/plugins/dali-swig/SWIG/events/application-event.i +++ b/plugins/dali-swig/SWIG/events/application-event.i @@ -300,40 +300,6 @@ } } } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationInitEventHandler(object source, AUIApplicationInitEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationTerminateEventHandler(object source, AUIApplicationTerminateEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationPauseEventHandler(object source, AUIApplicationPauseEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationResumeEventHandler(object source, AUIApplicationResumeEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationResetEventHandler(object source, AUIApplicationResetEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationResizeEventHandler(object source, AUIApplicationResizeEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationLanguageChangedEventHandler(object source, AUIApplicationLanguageChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationRegionChangedEventHandler(object source, AUIApplicationRegionChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationBatteryLowEventHandler(object source, AUIApplicationBatteryLowEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationMemoryLowEventHandler(object source, AUIApplicationMemoryLowEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void AUIApplicationAppControlEventHandler(object source, AUIApplicationAppControlEventArgs e); - %} %enddef @@ -343,68 +309,68 @@ %typemap(cscode) NameSpace::ClassName %{ [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationInitEventCallbackDelegate(IntPtr application); - private AUIApplicationInitEventHandler _applicationInitEventHandler; + private DaliEventHandler _applicationInitEventHandler; private AUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationTerminateEventCallbackDelegate(IntPtr application); - private AUIApplicationTerminateEventHandler _applicationTerminateEventHandler; + private DaliEventHandler _applicationTerminateEventHandler; private AUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationPauseEventCallbackDelegate(IntPtr application); - private AUIApplicationPauseEventHandler _applicationPauseEventHandler; + private DaliEventHandler _applicationPauseEventHandler; private AUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationResumeEventCallbackDelegate(IntPtr application); - private AUIApplicationResumeEventHandler _applicationResumeEventHandler; + private DaliEventHandler _applicationResumeEventHandler; private AUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationResetEventCallbackDelegate(IntPtr application); - private AUIApplicationResetEventHandler _applicationResetEventHandler; + private DaliEventHandler _applicationResetEventHandler; private AUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationResizeEventCallbackDelegate(IntPtr application); - private AUIApplicationResizeEventHandler _applicationResizeEventHandler; + private DaliEventHandler _applicationResizeEventHandler; private AUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application); - private AUIApplicationLanguageChangedEventHandler _applicationLanguageChangedEventHandler; + private DaliEventHandler _applicationLanguageChangedEventHandler; private AUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationRegionChangedEventCallbackDelegate(IntPtr application); - private AUIApplicationRegionChangedEventHandler _applicationRegionChangedEventHandler; + private DaliEventHandler _applicationRegionChangedEventHandler; private AUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationBatteryLowEventCallbackDelegate(IntPtr application); - private AUIApplicationBatteryLowEventHandler _applicationBatteryLowEventHandler; + private DaliEventHandler _applicationBatteryLowEventHandler; private AUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationMemoryLowEventCallbackDelegate(IntPtr application); - private AUIApplicationMemoryLowEventHandler _applicationMemoryLowEventHandler; + private DaliEventHandler _applicationMemoryLowEventHandler; private AUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void AUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp); - private AUIApplicationAppControlEventHandler _applicationAppControlEventHandler; + private DaliEventHandler _applicationAppControlEventHandler; private AUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate; /** * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationInitEventHandler) provided by the user. - * Initialized signal is emitted when application is initialised + * (in the type of AUIApplicationInitEventHandler - DaliEventHandler) + * provided by the user. Initialized signal is emitted when application is initialised */ - public event AUIApplicationInitEventHandler Initialized + public event DaliEventHandler Initialized { add { @@ -452,10 +418,10 @@ /** * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationTerminateEventHandler) provided by the user. - * Terminated signal is emitted when application is terminated + * (in the type of AUIApplicationTerminateEventHandler-DaliEventHandler) + * provided by the user. Terminated signal is emitted when application is terminated */ - public event AUIApplicationTerminateEventHandler Terminated + public event DaliEventHandler Terminated { add { @@ -503,10 +469,10 @@ /** * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationPauseEventHandler) provided by the user. - * Paused signal is emitted when application is paused + * (in the type of AUIApplicationPauseEventHandler-DaliEventHandler) + * provided by the user. Paused signal is emitted when application is paused */ - public event AUIApplicationPauseEventHandler Paused + public event DaliEventHandler Paused { add { @@ -554,10 +520,10 @@ /** * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationResumeEventHandler) provided by the user. - * Resumed signal is emitted when application is resumed + * (in the type of AUIApplicationResumeEventHandler-DaliEventHandler) + * provided by the user. Resumed signal is emitted when application is resumed */ - public event AUIApplicationResumeEventHandler Resumed + public event DaliEventHandler Resumed { add { @@ -605,10 +571,10 @@ /** * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationResetEventHandler) provided by the user. - * Reset signal is emitted when application is reset + * (in the type of AUIApplicationResetEventHandler-DaliEventHandler) + * provided by the user. Reset signal is emitted when application is reset */ - public event AUIApplicationResetEventHandler Reset + public event DaliEventHandler Reset { add { @@ -656,10 +622,10 @@ /** * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationResizeEventHandler) provided by the user. - * Resized signal is emitted when application is resized + * (in the type of AUIApplicationResizeEventHandler-DaliEventHandler) + * provided by the user. Resized signal is emitted when application is resized */ - public event AUIApplicationResizeEventHandler Resized + public event DaliEventHandler Resized { add { @@ -707,10 +673,10 @@ /** * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationLanguageChangedEventHandler) provided by the user. - * LanguageChanged signal is emitted when the region of the device is changed. + * (in the type of AUIApplicationLanguageChangedEventHandler-DaliEventHandler) + * provided by the user. LanguageChanged signal is emitted when the region of the device is changed. */ - public event AUIApplicationLanguageChangedEventHandler LanguageChanged + public event DaliEventHandler LanguageChanged { add { @@ -758,10 +724,10 @@ /** * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationRegionChangedEventHandler) provided by the user. - * RegionChanged signal is emitted when the region of the device is changed. + * (in the type of AUIApplicationRegionChangedEventHandler-DaliEventHandler) + * provided by the user. RegionChanged signal is emitted when the region of the device is changed. */ - public event AUIApplicationRegionChangedEventHandler RegionChanged + public event DaliEventHandler RegionChanged { add { @@ -809,10 +775,10 @@ /** * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationBatteryLowEventHandler) provided by the user. - * BatteryLow signal is emitted when the battery level of the device is low. + * (in the type of AUIApplicationBatteryLowEventHandler-DaliEventHandler) + * provided by the user. BatteryLow signal is emitted when the battery level of the device is low. */ - public event AUIApplicationBatteryLowEventHandler BatteryLow + public event DaliEventHandler BatteryLow { add { @@ -860,10 +826,10 @@ /** * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationMemoryLowEventHandler) provided by the user. - * MemoryLow signal is emitted when the memory level of the device is low. + * (in the type of AUIApplicationMemoryLowEventHandler-DaliEventHandler) + * provided by the user. MemoryLow signal is emitted when the memory level of the device is low. */ - public event AUIApplicationMemoryLowEventHandler MemoryLow + public event DaliEventHandler MemoryLow { add { @@ -911,10 +877,10 @@ /** * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler - * (in the type of AUIApplicationAppControlEventHandler) provided by the user. - * AppControl signal is emitted when another application sends a launch request to the application. + * (in the type of AUIApplicationAppControlEventHandler-DaliEventHandler) + * provided by the user. AppControl signal is emitted when another application sends a launch request to the application. */ - public event AUIApplicationAppControlEventHandler AppControl + public event DaliEventHandler AppControl { add { diff --git a/plugins/dali-swig/SWIG/events/builder-event.i b/plugins/dali-swig/SWIG/events/builder-event.i index ad55258..db58063 100644 --- a/plugins/dali-swig/SWIG/events/builder-event.i +++ b/plugins/dali-swig/SWIG/events/builder-event.i @@ -33,14 +33,11 @@ } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void QuitEventHandler(object source, QuitEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void QuitEventCallbackDelegate(); - private QuitEventHandler _builderQuitEventHandler; + private DaliEventHandler _builderQuitEventHandler; private QuitEventCallbackDelegate _builderQuitEventCallbackDelegate; - public event QuitEventHandler Quit + public event DaliEventHandler Quit { add { diff --git a/plugins/dali-swig/SWIG/events/button-event.i b/plugins/dali-swig/SWIG/events/button-event.i index e766482..e568870 100644 --- a/plugins/dali-swig/SWIG/events/button-event.i +++ b/plugins/dali-swig/SWIG/events/button-event.i @@ -97,40 +97,29 @@ public class StateChangedEventArgs : EventArgs } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ClickedEventHandler(object source, ClickedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool PressedEventHandler(object source, PressedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ReleasedEventHandler(object source, ReleasedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool StateChangedEventHandler(object source, StateChangedEventArgs e); [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ClickedCallbackDelegate(global::System.IntPtr data); - private ClickedEventHandler _buttonClickedEventHandler; + private DaliEventHandlerWithReturnType _buttonClickedEventHandler; private ClickedCallbackDelegate _buttonClickedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool PressedCallbackDelegate(global::System.IntPtr data); - private PressedEventHandler _buttonPressedEventHandler; + private DaliEventHandlerWithReturnType _buttonPressedEventHandler; private PressedCallbackDelegate _buttonPressedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ReleasedCallbackDelegate(global::System.IntPtr data); - private ReleasedEventHandler _buttonReleasedEventHandler; + private DaliEventHandlerWithReturnType _buttonReleasedEventHandler; private ReleasedCallbackDelegate _buttonReleasedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool StateChangedCallbackDelegate(global::System.IntPtr data); - private StateChangedEventHandler _buttonStateChangedEventHandler; + private DaliEventHandlerWithReturnType _buttonStateChangedEventHandler; private StateChangedCallbackDelegate _buttonStateChangedCallbackDelegate; - public event ClickedEventHandler Clicked + public event DaliEventHandlerWithReturnType Clicked { add { @@ -171,13 +160,13 @@ public class StateChangedEventArgs : EventArgs if (_buttonClickedEventHandler != null) { //here we send all data to user event handlers - return _buttonClickedEventHandler(this, e); + return _buttonClickedEventHandler(this, e,true); } return false; } - public event PressedEventHandler Pressed + public event DaliEventHandlerWithReturnType Pressed { add { @@ -218,13 +207,13 @@ public class StateChangedEventArgs : EventArgs if (_buttonPressedEventHandler != null) { //here we send all data to user event handlers - return _buttonPressedEventHandler(this, e); + return _buttonPressedEventHandler(this, e,true); } return false; } - public event ReleasedEventHandler Released + public event DaliEventHandlerWithReturnType Released { add { @@ -265,13 +254,13 @@ public class StateChangedEventArgs : EventArgs if (_buttonReleasedEventHandler != null) { //here we send all data to user event handlers - return _buttonReleasedEventHandler(this, e); + return _buttonReleasedEventHandler(this, e, true); } return false; } - public event StateChangedEventHandler StateChanged + public event DaliEventHandlerWithReturnType StateChanged { add { @@ -312,7 +301,7 @@ public class StateChangedEventArgs : EventArgs if (_buttonStateChangedEventHandler != null) { //here we send all data to user event handlers - return _buttonStateChangedEventHandler(this, e); + return _buttonStateChangedEventHandler(this, e, true); } return false; } diff --git a/plugins/dali-swig/SWIG/events/control-event.i b/plugins/dali-swig/SWIG/events/control-event.i index a5418de..83eb9c4 100644 --- a/plugins/dali-swig/SWIG/events/control-event.i +++ b/plugins/dali-swig/SWIG/events/control-event.i @@ -121,35 +121,26 @@ public class KeyEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void KeyInputFocusGainedEventHandler(object source, KeyInputFocusGainedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void KeyInputFocusLostEventHandler(object source, KeyInputFocusLostEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool KeyEventHandler(object source, KeyEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr view); - private KeyInputFocusGainedEventHandler _KeyInputFocusGainedEventHandler; + private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control); + private DaliEventHandler _KeyInputFocusGainedEventHandler; private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void KeyInputFocusLostCallbackDelegate(IntPtr view); - private KeyInputFocusLostEventHandler _KeyInputFocusLostEventHandler; + private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control); + private DaliEventHandler _KeyInputFocusLostEventHandler; private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool KeyCallbackDelegate(IntPtr view, IntPtr keyEvent); - private KeyEventHandler _KeyEventHandler; + private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent); + private DaliEventHandlerWithReturnType _KeyEventHandler; private KeyCallbackDelegate _KeyCallbackDelegate; /** * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyInputFocusGainedEventHandler) provided by the user. - * KeyInputFocusGained signal is emitted when the view gets Key Input Focus. + * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler) + * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus. */ - public event KeyInputFocusGainedEventHandler KeyInputFocusGained + public event DaliEventHandler KeyInputFocusGained { add { @@ -197,10 +188,10 @@ public class KeyEventArgs : EventArgs /** * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyInputFocusLostEventHandler) provided by the user. - * KeyInputFocusLost signal is emitted when the view loses Key Input Focus. + * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler) + * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus. */ - public event KeyInputFocusLostEventHandler KeyInputFocusLost + public event DaliEventHandler KeyInputFocusLost { add { @@ -247,10 +238,10 @@ public class KeyEventArgs : EventArgs /** * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyEventEventHandler) provided by the user. - * KeyPressed signal is emitted when key event is received. + * (in the type of KeyEventEventHandler-DaliEventHandlerWithReturnType) + * provided by the user. KeyPressed signal is emitted when key event is received. */ - public event KeyEventHandler KeyPressed + public event DaliEventHandlerWithReturnType KeyPressed { add { @@ -292,7 +283,7 @@ public class KeyEventArgs : EventArgs if (_KeyEventHandler != null) { //here we send all data to user event handlers - return _KeyEventHandler(this, e); + return _KeyEventHandler(this, e, true); } return false; diff --git a/plugins/dali-swig/SWIG/events/gaussian-blur-view-event.i b/plugins/dali-swig/SWIG/events/gaussian-blur-view-event.i index 1ab5c1b..19e1a46 100644 --- a/plugins/dali-swig/SWIG/events/gaussian-blur-view-event.i +++ b/plugins/dali-swig/SWIG/events/gaussian-blur-view-event.i @@ -46,14 +46,11 @@ public class FinishedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FinishedEventHandler(object source, FinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FinishedEventCallbackDelegate(IntPtr application); - private FinishedEventHandler _gaussianFinishedEventHandler; + private DaliEventHandler _gaussianFinishedEventHandler; private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate; - public event FinishedEventHandler Finished + public event DaliEventHandler Finished { add { diff --git a/plugins/dali-swig/SWIG/events/image-event.i b/plugins/dali-swig/SWIG/events/image-event.i index e42b869..6aff41b 100644 --- a/plugins/dali-swig/SWIG/events/image-event.i +++ b/plugins/dali-swig/SWIG/events/image-event.i @@ -52,19 +52,16 @@ public class UploadedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void UploadedEventHandler(object source, UploadedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void UploadedEventCallbackDelegate(IntPtr image); - private UploadedEventHandler _imageUploadedEventHandler; + private DaliEventHandler _imageUploadedEventHandler; private UploadedEventCallbackDelegate _imageUploadedEventCallbackDelegate; /** * @brief Event for Uploaded signal which can be used to subscribe/unsubscribe the event handler - * (in the type of UploadedEventHandler) provided by the user. - * Uploaded signal is emitted when the image data gets uploaded to GL. + * (in the type of UploadedEventHandler-DaliEventHandler) + * provided by the user. Uploaded signal is emitted when the image data gets uploaded to GL. */ - public event UploadedEventHandler Uploaded + public event DaliEventHandler Uploaded { add { diff --git a/plugins/dali-swig/SWIG/events/itemview-event.i b/plugins/dali-swig/SWIG/events/itemview-event.i index 608bbff..d70708a 100644 --- a/plugins/dali-swig/SWIG/events/itemview-event.i +++ b/plugins/dali-swig/SWIG/events/itemview-event.i @@ -32,14 +32,11 @@ using System.Runtime.InteropServices; } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void LayoutActivatedEventHandler(object source, LayoutActivatedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void LayoutActivatedEventCallbackDelegate(); - private LayoutActivatedEventHandler _itemViewLayoutActivatedEventHandler; + private DaliEventHandler _itemViewLayoutActivatedEventHandler; private LayoutActivatedEventCallbackDelegate _itemViewLayoutActivatedEventCallbackDelegate; - public event LayoutActivatedEventHandler LayoutActivated + public event DaliEventHandler LayoutActivated { add { diff --git a/plugins/dali-swig/SWIG/events/keyboardFocusManager-event.i b/plugins/dali-swig/SWIG/events/keyboardFocusManager-event.i index cca3b4a..2cb8e4f 100644 --- a/plugins/dali-swig/SWIG/events/keyboardFocusManager-event.i +++ b/plugins/dali-swig/SWIG/events/keyboardFocusManager-event.i @@ -137,35 +137,26 @@ public class FocusedActorEnterKeyEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FocusChangedEventHandler(object source, FocusChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FocusGroupChangedEventHandler(object source, FocusGroupChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FocusedActorEnterKeyEventHandler(object source, FocusedActorEnterKeyEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusChangedEventCallbackDelegate(IntPtr actorCurrent, IntPtr actorNext); - private FocusChangedEventHandler _keyboardFocusManagerFocusChangedEventHandler; + private DaliEventHandler _keyboardFocusManagerFocusChangedEventHandler; private FocusChangedEventCallbackDelegate _keyboardFocusManagerFocusChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusGroupChangedEventCallbackDelegate(IntPtr currentFocusedActor, bool forwardDirection); - private FocusGroupChangedEventHandler _keyboardFocusManagerFocusGroupChangedEventHandler; + private DaliEventHandler _keyboardFocusManagerFocusGroupChangedEventHandler; private FocusGroupChangedEventCallbackDelegate _keyboardFocusManagerFocusGroupChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusedActorEnterKeyEventCallbackDelegate(IntPtr actor); - private FocusedActorEnterKeyEventHandler _keyboardFocusManagerFocusedActorEnterKeyEventHandler; + private DaliEventHandler _keyboardFocusManagerFocusedActorEnterKeyEventHandler; private FocusedActorEnterKeyEventCallbackDelegate _keyboardFocusManagerFocusedActorEnterKeyEventCallbackDelegate; /** * @brief Event for FocusChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of FocusChangedEventHandler) provided by the user. + * (in the type of FocusChangedEventHandler-DaliEventHandler) provided by the user. * FocusChanged signal is emitted after the current focused actor has been changed. */ - public event FocusChangedEventHandler FocusChanged + public event DaliEventHandler FocusChanged { add { @@ -214,10 +205,10 @@ public class FocusedActorEnterKeyEventArgs : EventArgs /** * @brief Event for FocusGroupChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of FocusGroupChangedEventHandler) provided by the user. - * FocusGroupChanged signal is emitted when the focus group has been changed. + * (in the type of FocusGroupChangedEventHandler-DaliEventHandler) + * provided by the user. FocusGroupChanged signal is emitted when the focus group has been changed. */ - public event FocusGroupChangedEventHandler FocusGroupChanged + public event DaliEventHandler FocusGroupChanged { add { @@ -266,10 +257,10 @@ public class FocusedActorEnterKeyEventArgs : EventArgs /** * @brief Event for FocusedActorEnterKeyPressed signal which can be used to subscribe/unsubscribe the event handler - * (in the type of FocusedActorEnterKeyEventHandler) provided by the user. + * (in the type of FocusedActorEnterKeyEventHandler-DaliEventHandler) provided by the user. * FocusedActorEnterKeyPressed signal is emitted when the current focused actor has the enter key pressed on it. */ - public event FocusedActorEnterKeyEventHandler FocusedActorEnterKeyPressed + public event DaliEventHandler FocusedActorEnterKeyPressed { add { diff --git a/plugins/dali-swig/SWIG/events/longpressgesture-event.i b/plugins/dali-swig/SWIG/events/longpressgesture-event.i index 252aec2..0d155a5 100644 --- a/plugins/dali-swig/SWIG/events/longpressgesture-event.i +++ b/plugins/dali-swig/SWIG/events/longpressgesture-event.i @@ -57,15 +57,12 @@ public class DetectedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void DetectedEventHandler(object source, DetectedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr longPressGesture); - private DetectedEventHandler _longPressGestureEventHandler; + private DaliEventHandler _longPressGestureEventHandler; private DetectedCallbackDelegate _longPressGestureCallbackDelegate; - public event DetectedEventHandler Detected + public event DaliEventHandler Detected { add { diff --git a/plugins/dali-swig/SWIG/events/objectregistry-event.i b/plugins/dali-swig/SWIG/events/objectregistry-event.i index 83be37d..8792035 100644 --- a/plugins/dali-swig/SWIG/events/objectregistry-event.i +++ b/plugins/dali-swig/SWIG/events/objectregistry-event.i @@ -63,24 +63,18 @@ public class ObjectDestroyedEventArgs : EventArgs } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ObjectCreatedEventHandler(object source, ObjectCreatedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ObjectDestroyedEventHandler(object source, ObjectDestroyedEventArgs e); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ObjectCreatedEventCallbackDelegate(IntPtr baseHandle); - private ObjectCreatedEventHandler _objectRegistryObjectCreatedEventHandler; + private DaliEventHandler _objectRegistryObjectCreatedEventHandler; private ObjectCreatedEventCallbackDelegate _objectRegistryObjectCreatedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ObjectDestroyedEventCallbackDelegate(IntPtr fefObject); - private ObjectDestroyedEventHandler _objectRegistryObjectDestroyedEventHandler; + private DaliEventHandler _objectRegistryObjectDestroyedEventHandler; private ObjectDestroyedEventCallbackDelegate _objectRegistryObjectDestroyedEventCallbackDelegate; - public event ObjectCreatedEventHandler ObjectCreated + public event DaliEventHandler ObjectCreated { add { @@ -126,7 +120,7 @@ public class ObjectDestroyedEventArgs : EventArgs } } - public event ObjectDestroyedEventHandler ObjectDestroyed + public event DaliEventHandler ObjectDestroyed { add { diff --git a/plugins/dali-swig/SWIG/events/pageturnview-event.i b/plugins/dali-swig/SWIG/events/pageturnview-event.i index 1c491e4..8be2725 100644 --- a/plugins/dali-swig/SWIG/events/pageturnview-event.i +++ b/plugins/dali-swig/SWIG/events/pageturnview-event.i @@ -149,38 +149,26 @@ public class PageTurnFinishedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void PagePanStartedEventHandler(object source, PagePanStartedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void PagePanFinishedEventHandler(object source, PagePanFinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void PageTurnStartedEventHandler(object source, PageTurnStartedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void PageTurnFinishedEventHandler(object source, PageTurnFinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void PagePanStartedCallbackDelegate(IntPtr page); - private PagePanStartedEventHandler _pageTurnViewPagePanStartedEventHandler; + private DaliEventHandler _pageTurnViewPagePanStartedEventHandler; private PagePanStartedCallbackDelegate _pageTurnViewPagePanStartedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void PagePanFinishedCallbackDelegate(IntPtr page); - private PagePanFinishedEventHandler _pageTurnViewPagePanFinishedEventHandler; + private DaliEventHandler _pageTurnViewPagePanFinishedEventHandler; private PagePanFinishedCallbackDelegate _pageTurnViewPagePanFinishedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void PageTurnStartedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward); - private PageTurnStartedEventHandler _pageTurnViewPageTurnStartedEventHandler; + private DaliEventHandler _pageTurnViewPageTurnStartedEventHandler; private PageTurnStartedCallbackDelegate _pageTurnViewPageTurnStartedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void PageTurnFinishedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward); - private PageTurnFinishedEventHandler _pageTurnViewPageTurnFinishedEventHandler; + private DaliEventHandler _pageTurnViewPageTurnFinishedEventHandler; private PageTurnFinishedCallbackDelegate _pageTurnViewPageTurnFinishedCallbackDelegate; - public event PagePanStartedEventHandler PagePanStarted + public event DaliEventHandler PagePanStarted { add { @@ -226,7 +214,7 @@ public class PageTurnFinishedEventArgs : EventArgs } } - public event PagePanFinishedEventHandler PagePanFinished + public event DaliEventHandler PagePanFinished { add { @@ -273,7 +261,7 @@ public class PageTurnFinishedEventArgs : EventArgs } - public event PageTurnStartedEventHandler PageTurnStarted + public event DaliEventHandler PageTurnStarted { add { @@ -323,7 +311,7 @@ public class PageTurnFinishedEventArgs : EventArgs } - public event PageTurnFinishedEventHandler PageTurnFinished + public event DaliEventHandler PageTurnFinished { add { diff --git a/plugins/dali-swig/SWIG/events/pangesture-event.i b/plugins/dali-swig/SWIG/events/pangesture-event.i index db32481..d284012 100644 --- a/plugins/dali-swig/SWIG/events/pangesture-event.i +++ b/plugins/dali-swig/SWIG/events/pangesture-event.i @@ -59,15 +59,12 @@ public class DetectedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void DetectedEventHandler(object source, DetectedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr panGesture); - private DetectedEventHandler _panGestureEventHandler; + private DaliEventHandler _panGestureEventHandler; private DetectedCallbackDelegate _panGestureCallbackDelegate; - public event DetectedEventHandler Detected + public event DaliEventHandler Detected { add { diff --git a/plugins/dali-swig/SWIG/events/pinchgesture-event.i b/plugins/dali-swig/SWIG/events/pinchgesture-event.i index abdcced..6aabba1 100644 --- a/plugins/dali-swig/SWIG/events/pinchgesture-event.i +++ b/plugins/dali-swig/SWIG/events/pinchgesture-event.i @@ -57,16 +57,13 @@ public class DetectedEventArgs : EventArgs } } -[UnmanagedFunctionPointer(CallingConvention.StdCall)] -public delegate void DetectedEventHandler(object source, DetectedEventArgs e); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr pinchGesture); - private DetectedEventHandler _pinchGestureEventHandler; + private DaliEventHandler _pinchGestureEventHandler; private DetectedCallbackDelegate _pinchGestureCallbackDelegate; - public event DetectedEventHandler Detected + public event DaliEventHandler Detected { add { diff --git a/plugins/dali-swig/SWIG/events/popup-event.i b/plugins/dali-swig/SWIG/events/popup-event.i index cc819cf..fd2b16f 100644 --- a/plugins/dali-swig/SWIG/events/popup-event.i +++ b/plugins/dali-swig/SWIG/events/popup-event.i @@ -49,46 +49,31 @@ using System.Runtime.InteropServices; } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void OutsideTouchedEventHandler(object source, OutsideTouchedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ShowingEventHandler(object source, ShowingEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ShownEventHandler(object source, ShownEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void HidingEventHandler(object source, HidingEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void HiddenEventHandler(object source, HiddenEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void OutsideTouchedEventCallbackDelegate(); - private OutsideTouchedEventHandler _popUpOutsideTouchedEventHandler; + private DaliEventHandler _popUpOutsideTouchedEventHandler; private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ShowingEventCallbackDelegate(); - private ShowingEventHandler _popUpShowingEventHandler; + private DaliEventHandler _popUpShowingEventHandler; private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ShownEventCallbackDelegate(); - private ShownEventHandler _popUpShownEventHandler; + private DaliEventHandler _popUpShownEventHandler; private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void HidingEventCallbackDelegate(); - private HidingEventHandler _popUpHidingEventHandler; + private DaliEventHandler _popUpHidingEventHandler; private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void HiddenEventCallbackDelegate(); - private HiddenEventHandler _popUpHiddenEventHandler; + private DaliEventHandler _popUpHiddenEventHandler; private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate; - public event OutsideTouchedEventHandler OutsideTouched + public event DaliEventHandler OutsideTouched { add { @@ -131,7 +116,7 @@ using System.Runtime.InteropServices; } } - public event ShowingEventHandler Showing + public event DaliEventHandler Showing { add { @@ -175,7 +160,7 @@ using System.Runtime.InteropServices; } - public event ShownEventHandler Shown + public event DaliEventHandler Shown { add { @@ -218,7 +203,7 @@ using System.Runtime.InteropServices; } } - public event HidingEventHandler Hiding + public event DaliEventHandler Hiding { add { @@ -261,7 +246,7 @@ using System.Runtime.InteropServices; } } - public event HiddenEventHandler Hidden + public event DaliEventHandler Hidden { add { diff --git a/plugins/dali-swig/SWIG/events/propertynotification-event.i b/plugins/dali-swig/SWIG/events/propertynotification-event.i index 17bce47..23869ce 100644 --- a/plugins/dali-swig/SWIG/events/propertynotification-event.i +++ b/plugins/dali-swig/SWIG/events/propertynotification-event.i @@ -54,19 +54,16 @@ public class NotifyEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void NotifyEventHandler(object source, NotifyEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NotifyEventCallbackDelegate(IntPtr propertyNotification); - private NotifyEventHandler _propertyNotificationNotifyEventHandler; + private DaliEventHandler _propertyNotificationNotifyEventHandler; private NotifyEventCallbackDelegate _propertyNotificationNotifyEventCallbackDelegate; /** * @brief Event for Notified signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NotifyEventHandler) provided by the user. + * (in the type of NotifyEventHandler-DaliEventHandler) provided by the user. * Notified signal is emitted when the notification upon a condition of the property being met, has occurred. */ - public event NotifyEventHandler Notified + public event DaliEventHandler Notified { add { diff --git a/plugins/dali-swig/SWIG/events/rendertask-event.i b/plugins/dali-swig/SWIG/events/rendertask-event.i index 729e8a3..9c3f25b 100644 --- a/plugins/dali-swig/SWIG/events/rendertask-event.i +++ b/plugins/dali-swig/SWIG/events/rendertask-event.i @@ -46,15 +46,12 @@ public class FinishedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void RenderTaskEventHandler(object source, FinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void RenderTaskCallbackDelegate(IntPtr renderTask); - private RenderTaskEventHandler _renderTaskEventHandler; + private DaliEventHandler _renderTaskEventHandler; private RenderTaskCallbackDelegate _renderTaskCallbackDelegate; - public event RenderTaskEventHandler Finished + public event DaliEventHandler Finished { add { diff --git a/plugins/dali-swig/SWIG/events/resourceimage-event.i b/plugins/dali-swig/SWIG/events/resourceimage-event.i index aa601eb..6afb522 100644 --- a/plugins/dali-swig/SWIG/events/resourceimage-event.i +++ b/plugins/dali-swig/SWIG/events/resourceimage-event.i @@ -44,14 +44,11 @@ public class LoadingFinishedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void LoadingFinishedEventHandler(object source, LoadingFinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void LoadingFinishedEventCallbackDelegate(IntPtr ResourceImage); - private LoadingFinishedEventHandler _resourceImageLoadingFinishedEventHandler; + private DaliEventHandler _resourceImageLoadingFinishedEventHandler; private LoadingFinishedEventCallbackDelegate _resourceImageLoadingFinishedEventCallbackDelegate; - public event LoadingFinishedEventHandler LoadingFinished + public event DaliEventHandler LoadingFinished { add { diff --git a/plugins/dali-swig/SWIG/events/scrollable-event.i b/plugins/dali-swig/SWIG/events/scrollable-event.i index 1ab5d13..713e728 100644 --- a/plugins/dali-swig/SWIG/events/scrollable-event.i +++ b/plugins/dali-swig/SWIG/events/scrollable-event.i @@ -78,30 +78,21 @@ public class CompletedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void StartedEventHandler(object source, StartedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void UpdatedEventHandler(object source, UpdatedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void CompletedEventHandler(object source, CompletedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void StartedCallbackDelegate(IntPtr vector2); - private StartedEventHandler _scrollableStartedEventHandler; + private DaliEventHandler _scrollableStartedEventHandler; private StartedCallbackDelegate _scrollableStartedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void UpdatedCallbackDelegate(IntPtr vector2); - private UpdatedEventHandler _scrollableUpdatedEventHandler; + private DaliEventHandler _scrollableUpdatedEventHandler; private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void CompletedCallbackDelegate(IntPtr vector2); - private CompletedEventHandler _scrollableCompletedEventHandler; + private DaliEventHandler _scrollableCompletedEventHandler; private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate; - public event StartedEventHandler ScrollStarted + public event DaliEventHandler ScrollStarted { add { @@ -147,7 +138,7 @@ public class CompletedEventArgs : EventArgs } - public event UpdatedEventHandler ScrollUpdated + public event DaliEventHandler ScrollUpdated { add { @@ -193,7 +184,7 @@ public class CompletedEventArgs : EventArgs } - public event CompletedEventHandler ScrollCompleted + public event DaliEventHandler ScrollCompleted { add { diff --git a/plugins/dali-swig/SWIG/events/scrollbar-event.i b/plugins/dali-swig/SWIG/events/scrollbar-event.i index 256be79..d51fb3d 100644 --- a/plugins/dali-swig/SWIG/events/scrollbar-event.i +++ b/plugins/dali-swig/SWIG/events/scrollbar-event.i @@ -51,22 +51,16 @@ public class ScrollPositionIntervalReachedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void PanFinishedEventHandler(object source, PanFinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ScrollPositionIntervalReachedEventHandler(object source, ScrollPositionIntervalReachedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void PanFinishedEventCallbackDelegate(); - private PanFinishedEventHandler _scrollBarPanFinishedEventHandler; + private DaliEventHandler _scrollBarPanFinishedEventHandler; private PanFinishedEventCallbackDelegate _scrollBarPanFinishedEventCallbackDelegate; - + [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ScrollPositionIntervalReachedEventCallbackDelegate(); - private ScrollPositionIntervalReachedEventHandler _scrollBarScrollPositionIntervalReachedEventHandler; + private DaliEventHandler _scrollBarScrollPositionIntervalReachedEventHandler; private ScrollPositionIntervalReachedEventCallbackDelegate _scrollBarScrollPositionIntervalReachedEventCallbackDelegate; - public event PanFinishedEventHandler PanFinished + public event DaliEventHandler PanFinished { add { @@ -110,7 +104,7 @@ public class ScrollPositionIntervalReachedEventArgs : EventArgs } - public event ScrollPositionIntervalReachedEventHandler ScrollPositionIntervalReached + public event DaliEventHandler ScrollPositionIntervalReached { add { diff --git a/plugins/dali-swig/SWIG/events/scrollview-event.i b/plugins/dali-swig/SWIG/events/scrollview-event.i index 733a502..97622fa 100644 --- a/plugins/dali-swig/SWIG/events/scrollview-event.i +++ b/plugins/dali-swig/SWIG/events/scrollview-event.i @@ -51,23 +51,19 @@ public class SnapStartedEventArgs : EventArgs } } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void SnapStartedEventHandler(object source, SnapStartedEventArgs e); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void SnapStartedCallbackDelegate(IntPtr data); - private SnapStartedEventHandler _scrollViewSnapStartedEventHandler; + private DaliEventHandler _scrollViewSnapStartedEventHandler; private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate; /** * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler - * (in the type of SnapStartedEventHandler) provided by the user. + * (in the type of SnapStartedEventHandler-DaliEventHandler) provided by the user. * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target * position, scale, rotation for the snap or flick). * */ - public event SnapStartedEventHandler SnapStarted + public event DaliEventHandler SnapStarted { add { diff --git a/plugins/dali-swig/SWIG/events/slider-event.i b/plugins/dali-swig/SWIG/events/slider-event.i index 8adf35e..53906d6 100644 --- a/plugins/dali-swig/SWIG/events/slider-event.i +++ b/plugins/dali-swig/SWIG/events/slider-event.i @@ -116,31 +116,23 @@ public class MarkReachedEventArgs : EventArgs } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool ValueChangedEventHandler(object source, ValueChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool SlidingFinishedEventHandler(object source, SlidingFinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool MarkReachedEventHandler(object source, MarkReachedEventArgs e); [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ValueChangedCallbackDelegate(IntPtr slider, float slideValue); - private ValueChangedEventHandler _sliderValueChangedEventHandler; + private DaliEventHandlerWithReturnType _sliderValueChangedEventHandler; private ValueChangedCallbackDelegate _sliderValueChangedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool SlidingFinishedCallbackDelegate(IntPtr slider, float slideValue); - private SlidingFinishedEventHandler _sliderSlidingFinishedEventHandler; + private DaliEventHandlerWithReturnType _sliderSlidingFinishedEventHandler; private SlidingFinishedCallbackDelegate _sliderSlidingFinishedCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool MarkReachedCallbackDelegate(IntPtr slider, int slideValue); - private MarkReachedEventHandler _sliderMarkReachedEventHandler; + private DaliEventHandlerWithReturnType _sliderMarkReachedEventHandler; private MarkReachedCallbackDelegate _sliderMarkReachedCallbackDelegate; - public event ValueChangedEventHandler ValueChanged + public event DaliEventHandlerWithReturnType ValueChanged { add { @@ -183,12 +175,12 @@ public class MarkReachedEventArgs : EventArgs if (_sliderValueChangedEventHandler != null) { //here we send all page to user event handlers - return _sliderValueChangedEventHandler(this, e); + return _sliderValueChangedEventHandler(this, e, true); } return false; } - public event SlidingFinishedEventHandler SlidingFinished + public event DaliEventHandlerWithReturnType SlidingFinished { add { @@ -231,12 +223,12 @@ public class MarkReachedEventArgs : EventArgs if (_sliderSlidingFinishedEventHandler != null) { //here we send all page to user event handlers - return _sliderSlidingFinishedEventHandler(this, e); + return _sliderSlidingFinishedEventHandler(this, e, true); } return false; } - public event MarkReachedEventHandler MarkReached + public event DaliEventHandlerWithReturnType MarkReached { add { @@ -279,7 +271,7 @@ public class MarkReachedEventArgs : EventArgs if (_sliderMarkReachedEventHandler != null) { //here we send all page to user event handlers - return _sliderMarkReachedEventHandler(this, e); + return _sliderMarkReachedEventHandler(this, e, true); } return false; } diff --git a/plugins/dali-swig/SWIG/events/stage-event.i b/plugins/dali-swig/SWIG/events/stage-event.i index 62f372a..1ee8579 100644 --- a/plugins/dali-swig/SWIG/events/stage-event.i +++ b/plugins/dali-swig/SWIG/events/stage-event.i @@ -134,70 +134,50 @@ public class SceneCreatedEventArgs : EventArgs { } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void TouchEventHandler(object source, TouchEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void WheelEventHandler(object source, WheelEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void KeyEventHandler(object source, KeyEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void EventProcessingFinishedEventHandler(object source, EventProcessingFinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ContextLostEventHandler(object source, ContextLostEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void ContextRegainedEventHandler(object source, ContextRegainedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void SceneCreatedEventHandler(object source, SceneCreatedEventArgs e); [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void StageTouchCallbackDelegate(IntPtr data); - private TouchEventHandler _stageTouchEventHandler; + private DaliEventHandler _stageTouchEventHandler; private StageTouchCallbackDelegate _stageTouchCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void WheelCallbackDelegate(IntPtr data); - private WheelEventHandler _stageWheelEventHandler; + private DaliEventHandler _stageWheelEventHandler; private WheelCallbackDelegate _stageWheelCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void KeyCallbackDelegate(IntPtr data); - private KeyEventHandler _stageKeyEventHandler; + private DaliEventHandler _stageKeyEventHandler; private KeyCallbackDelegate _stageKeyCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void EventProcessingFinishedEventCallbackDelegate(); - private EventProcessingFinishedEventHandler _stageEventProcessingFinishedEventHandler; + private DaliEventHandler _stageEventProcessingFinishedEventHandler; private EventProcessingFinishedEventCallbackDelegate _stageEventProcessingFinishedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ContextLostEventCallbackDelegate(); - private ContextLostEventHandler _stageContextLostEventHandler; + private DaliEventHandler _stageContextLostEventHandler; private ContextLostEventCallbackDelegate _stageContextLostEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ContextRegainedEventCallbackDelegate(); - private ContextRegainedEventHandler _stageContextRegainedEventHandler; + private DaliEventHandler _stageContextRegainedEventHandler; private ContextRegainedEventCallbackDelegate _stageContextRegainedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void SceneCreatedEventCallbackDelegate(); - private SceneCreatedEventHandler _stageSceneCreatedEventHandler; + private DaliEventHandler _stageSceneCreatedEventHandler; private SceneCreatedEventCallbackDelegate _stageSceneCreatedEventCallbackDelegate; /** * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler - * (in the type of TouchEventHandler) provided by the user. + * (in the type of TouchEventHandler-DaliEventHandler) provided by the user. * Touched signal is emitted when the screen is touched and when the touch ends * (i.e. the down & up touch events only). * */ - public event TouchEventHandler Touched + public event DaliEventHandler Touched { add { @@ -245,11 +225,11 @@ public class SceneCreatedEventArgs : EventArgs /** * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler - * (in the type of WheelEventHandler) provided by the user. + * (in the type of WheelEventHandler-DaliEventHandler) provided by the user. * WheelMoved signal is emitted is emitted when wheel event is received. * */ - public event WheelEventHandler WheelMoved + public event DaliEventHandler WheelMoved { add { @@ -297,11 +277,11 @@ public class SceneCreatedEventArgs : EventArgs /** * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler - * (in the type of KeyEventHandler) provided by the user. + * (in the type of KeyEventHandler-DaliEventHandler) provided by the user. * KeyPressed signal is emitted is emitted when key event is received. * */ - public event KeyEventHandler KeyPressed + public event DaliEventHandler KeyPressed { add { @@ -349,11 +329,11 @@ public class SceneCreatedEventArgs : EventArgs /** * @brief Event for EventProcessingFinished signal which can be used to subscribe/unsubscribe the event handler - * (in the type of EventProcessingFinishedEventHandler) provided by the user. - * EventProcessingFinished signal is emitted just after the event processing is finished. + * (in the type of EventProcessingFinishedEventHandler-DaliEventHandler) + * provided by the user. EventProcessingFinished signal is emitted just after the event processing is finished. * */ - public event EventProcessingFinishedEventHandler EventProcessingFinished + public event DaliEventHandler EventProcessingFinished { add { @@ -398,11 +378,11 @@ public class SceneCreatedEventArgs : EventArgs /** * @brief Event for ContextLost signal which can be used to subscribe/unsubscribe the event handler - * (in the type of ContextLostEventHandler) provided by the user. + * (in the type of ContextLostEventHandler-DaliEventHandler) provided by the user. * ContextLost signal is emitted when the GL context is lost (Platform specific behaviour). * */ - public event ContextLostEventHandler ContextLost + public event DaliEventHandler ContextLost { add { @@ -447,12 +427,12 @@ public class SceneCreatedEventArgs : EventArgs /** * @brief Event for ContextRegained signal which can be used to subscribe/unsubscribe the event handler - * (in the type of ContextRegainedEventHandler) provided by the user. - * ContextRegained signal is emitted when the GL context is regained (Platform specific + * (in the type of ContextRegainedEventHandler-DaliEventHandler) + * provided by the user. ContextRegained signal is emitted when the GL context is regained (Platform specific * behaviour). * */ - public event ContextRegainedEventHandler ContextRegained + public event DaliEventHandler ContextRegained { add { @@ -497,11 +477,11 @@ public class SceneCreatedEventArgs : EventArgs /** * @brief Event for SceneCreated signal which can be used to subscribe/unsubscribe the event handler - * (in the type of SceneCreatedEventHandler) provided by the user. + * (in the type of SceneCreatedEventHandler-DaliEventHandler) provided by the user. * SceneCreated signal is emitted after the initial scene is created. * */ - public event SceneCreatedEventHandler SceneCreated + public event DaliEventHandler SceneCreated { add { diff --git a/plugins/dali-swig/SWIG/events/stylemanager-event.i b/plugins/dali-swig/SWIG/events/stylemanager-event.i index 9aac4bd..30b68b1 100644 --- a/plugins/dali-swig/SWIG/events/stylemanager-event.i +++ b/plugins/dali-swig/SWIG/events/stylemanager-event.i @@ -72,20 +72,17 @@ public class StyleChangedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void StyleChangedEventHandler(object source, StyleChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void StyleChangedCallbackDelegate(IntPtr styleManager, Dali.StyleChangeType styleChange); - private StyleChangedEventHandler _styleManagerStyleChangedEventHandler; + private DaliEventHandler _styleManagerStyleChangedEventHandler; private StyleChangedCallbackDelegate _styleManagerStyleChangedCallbackDelegate; /** * @brief Event for StyleChanged signal which can be used to subscribe/unsubscribe the - * event handler (in the type of StyleChangedEventHandler) provided by the user. - * StyleChanged signal is is emitted after the style (e.g. theme/font change) has changed + * event handler (in the type of StyleChangedEventHandler-DaliEventHandler) + * provided by the user. StyleChanged signal is is emitted after the style (e.g. theme/font change) has changed * and the controls have been informed. */ - public event StyleChangedEventHandler StyleChanged + public event DaliEventHandler StyleChanged { add { diff --git a/plugins/dali-swig/SWIG/events/tapgesture-event.i b/plugins/dali-swig/SWIG/events/tapgesture-event.i index 3e99e45..503031b 100644 --- a/plugins/dali-swig/SWIG/events/tapgesture-event.i +++ b/plugins/dali-swig/SWIG/events/tapgesture-event.i @@ -58,15 +58,12 @@ public class DetectedEventArgs : EventArgs } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void DetectedEventHandler(object source, DetectedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr TapGesture); - private DetectedEventHandler _tapGestureEventHandler; + private DaliEventHandler _tapGestureEventHandler; private DetectedCallbackDelegate _tapGestureCallbackDelegate; - public event DetectedEventHandler Detected + public event DaliEventHandler Detected { add { diff --git a/plugins/dali-swig/SWIG/events/texteditor-event.i b/plugins/dali-swig/SWIG/events/texteditor-event.i index 72da6ce..738ea21 100644 --- a/plugins/dali-swig/SWIG/events/texteditor-event.i +++ b/plugins/dali-swig/SWIG/events/texteditor-event.i @@ -50,20 +50,18 @@ public class TextChangedEventArgs : EventArgs } } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void TextChangedEventHandler(object source, TextChangedEventArgs e); [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void TextChangedCallbackDelegate(IntPtr textEditor); - private TextChangedEventHandler _textEditorTextChangedEventHandler; + private DaliEventHandler _textEditorTextChangedEventHandler; private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate; /** * @brief Event for TextChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of TextChangedEventHandler) provided by the user. - * TextChanged signal is emitted when the text changes. + * (in the type of TextChangedEventHandler-DaliEventHandler) + * provided by the user. TextChanged signal is emitted when the text changes. */ - public event TextChangedEventHandler TextChanged + public event DaliEventHandler TextChanged { add { diff --git a/plugins/dali-swig/SWIG/events/textfield-event.i b/plugins/dali-swig/SWIG/events/textfield-event.i index 59d89a0..55a430d 100644 --- a/plugins/dali-swig/SWIG/events/textfield-event.i +++ b/plugins/dali-swig/SWIG/events/textfield-event.i @@ -61,23 +61,18 @@ public class MaxLengthReachedEventArgs : EventArgs } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void TextChangedEventHandler(object source, TextChangedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void MaxLengthReachedEventHandler(object source, MaxLengthReachedEventArgs e); [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void TextChangedCallbackDelegate(IntPtr textField); - private TextChangedEventHandler _textFieldTextChangedEventHandler; + private DaliEventHandler _textFieldTextChangedEventHandler; private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate; - + [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField); - private MaxLengthReachedEventHandler _textFieldMaxLengthReachedEventHandler; + private DaliEventHandler _textFieldMaxLengthReachedEventHandler; private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate; - public event TextChangedEventHandler TextChanged + public event DaliEventHandler TextChanged { add { @@ -123,7 +118,7 @@ public class MaxLengthReachedEventArgs : EventArgs } - public event MaxLengthReachedEventHandler MaxLengthReached + public event DaliEventHandler MaxLengthReached { add { diff --git a/plugins/dali-swig/SWIG/events/timer-event.i b/plugins/dali-swig/SWIG/events/timer-event.i index a8a5f0e..e6fb89a 100644 --- a/plugins/dali-swig/SWIG/events/timer-event.i +++ b/plugins/dali-swig/SWIG/events/timer-event.i @@ -35,19 +35,16 @@ using System.Runtime.InteropServices; } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool TickEventHandler(object source, TickEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool TickCallbackDelegate(IntPtr data); - private TickEventHandler _timerTickEventHandler; + private DaliEventHandlerWithReturnType _timerTickEventHandler; private TickCallbackDelegate _timerTickCallbackDelegate; /** * @brief Event for Ticked signal which can be used to subscribe/unsubscribe the event handler - * (in the type of TickEventHandler) provided by the user. - * Ticked signal is emitted after specified time interval. + * (in the type of TickEventHandler-DaliEventHandlerWithReturnType) + * provided by the user. Ticked signal is emitted after specified time interval. */ - public event TickEventHandler Ticked + public event DaliEventHandlerWithReturnType Ticked { add { @@ -86,7 +83,7 @@ using System.Runtime.InteropServices; if (_timerTickEventHandler != null) { //here we send all data to user event handlers - return _timerTickEventHandler(this, e); + return _timerTickEventHandler(this, e, true); } return false; } diff --git a/plugins/dali-swig/SWIG/events/videoview-event.i b/plugins/dali-swig/SWIG/events/videoview-event.i index 887e15e..7ef03e3 100644 --- a/plugins/dali-swig/SWIG/events/videoview-event.i +++ b/plugins/dali-swig/SWIG/events/videoview-event.i @@ -53,19 +53,16 @@ public class FinishedEventArgs : EventArgs [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void FinishedEventHandler(object source, FinishedEventArgs e); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FinishedCallbackDelegate(IntPtr data); - private FinishedEventHandler _videoViewFinishedEventHandler; + private DaliEventHandler _videoViewFinishedEventHandler; private FinishedCallbackDelegate _videoViewFinishedCallbackDelegate; /** * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler - * (in the type of FinishedEventHandler) provided by the user. + * (in the type of FinishedEventHandler-DaliEventHandler) provided by the user. * Finished signal is emitted when a video playback have finished. */ - public event FinishedEventHandler Finished + public event DaliEventHandler Finished { add { diff --git a/plugins/dali-swig/examples/dali-test.cs b/plugins/dali-swig/examples/dali-test.cs index 98eaab5..ac4bc85 100644 --- a/plugins/dali-swig/examples/dali-test.cs +++ b/plugins/dali-swig/examples/dali-test.cs @@ -33,7 +33,7 @@ namespace MyCSharpExample _application = application; Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() ); - _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize); + _application.Initialized += Initialize; Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() ); } diff --git a/plugins/dali-swig/examples/hello-world.cs b/plugins/dali-swig/examples/hello-world.cs index c2caeb5..28fd1dd 100755 --- a/plugins/dali-swig/examples/hello-world.cs +++ b/plugins/dali-swig/examples/hello-world.cs @@ -40,7 +40,7 @@ namespace MyCSharpExample public Example(Dali.Application application) { _application = application; - _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize); + _application.Initialized += Initialize; } public void Initialize(object source, AUIApplicationInitEventArgs e) @@ -49,7 +49,7 @@ namespace MyCSharpExample Stage stage = Stage.GetCurrent(); stage.BackgroundColor = NDalic.WHITE; - stage.Touched += new Dali.Stage.TouchEventHandler(OnStageTouched); + stage.Touched += OnStageTouched; // Add a _text label to the stage _text = new TextLabel("Hello Mono World"); @@ -89,7 +89,7 @@ namespace MyCSharpExample _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Quaternion( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.LINEAR), new TimePeriod(0.5f, 0.5f)); // Connect the signal callback for animaiton finished signal - _animation.Finished += new Dali.Animation.FinishedEventHandler(AnimationFinished); + _animation.Finished += AnimationFinished; // Play the _animation _animation.Play(); diff --git a/plugins/dali-swig/examples/scroll-view.cs b/plugins/dali-swig/examples/scroll-view.cs index 09b6d4d..9710c0e 100644 --- a/plugins/dali-swig/examples/scroll-view.cs +++ b/plugins/dali-swig/examples/scroll-view.cs @@ -36,7 +36,7 @@ namespace MyCSharpExample public Example(Dali.Application application) { _application = application; - _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize); + _application.Initialized += Initialize; } @@ -118,7 +118,7 @@ namespace MyCSharpExample _scrollView.Add(_scrollBar); // Connect to the OnRelayout signal - _scrollView.OnRelayoutEvent += new Dali.View.OnRelayoutEventHandler(OnScrollViewRelayout); + _scrollView.OnRelayoutEvent += OnScrollViewRelayout; } private void OnScrollViewRelayout(object source, View.OnRelayoutEventArgs e) diff --git a/plugins/dali-swig/manual/csharp/DaliEventHandler.cs b/plugins/dali-swig/manual/csharp/DaliEventHandler.cs new file mode 100644 index 0000000..1df1557 --- /dev/null +++ b/plugins/dali-swig/manual/csharp/DaliEventHandler.cs @@ -0,0 +1,12 @@ +namespace Dali { + + using System; + using System.Runtime.InteropServices; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void DaliEventHandler(T source, U e); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate R DaliEventHandlerWithReturnType(T source, U e, R ret); + +} -- 2.7.4