2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.Runtime.InteropServices;
23 internal partial class AccessibilityManager
25 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
26 private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager);
27 private DaliEventHandlerWithReturnType<object, StatusChangedEventArgs, bool> _accessibilityManagerStatusChangedEventHandler;
28 private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate;
30 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
31 private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager);
32 private DaliEventHandlerWithReturnType<object, ActionNextEventArgs, bool> _accessibilityManagerActionNextEventHandler;
33 private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate;
35 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
36 private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager);
37 private DaliEventHandlerWithReturnType<object, ActionPreviousEventArgs, bool> _accessibilityManagerActionPreviousEventHandler;
38 private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate;
40 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
41 private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager);
42 private DaliEventHandlerWithReturnType<object, ActionActivateEventArgs, bool> _accessibilityManagerActionActivateEventHandler;
43 private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate;
45 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
46 private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager);
47 private DaliEventHandlerWithReturnType<object, ActionReadEventArgs, bool> _accessibilityManagerActionReadEventHandler;
48 private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate;
50 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
51 private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager);
52 private DaliEventHandlerWithReturnType<object, ActionOverEventArgs, bool> _accessibilityManagerActionOverEventHandler;
53 private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate;
55 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
56 private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager);
57 private DaliEventHandlerWithReturnType<object, ActionReadNextEventArgs, bool> _accessibilityManagerActionReadNextEventHandler;
58 private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate;
60 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
61 private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager);
62 private DaliEventHandlerWithReturnType<object, ActionReadPreviousEventArgs, bool> _accessibilityManagerActionReadPreviousEventHandler;
63 private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate;
65 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
66 private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager);
67 private DaliEventHandlerWithReturnType<object, ActionUpEventArgs, bool> _accessibilityManagerActionUpEventHandler;
68 private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate;
70 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
71 private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager);
72 private DaliEventHandlerWithReturnType<object, ActionDownEventArgs, bool> _accessibilityManagerActionDownEventHandler;
73 private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate;
75 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
76 private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager);
77 private DaliEventHandlerWithReturnType<object, ActionClearFocusEventArgs, bool> _accessibilityManagerActionClearFocusEventHandler;
78 private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate;
80 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
81 private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager);
82 private DaliEventHandlerWithReturnType<object, ActionBackEventArgs, bool> _accessibilityManagerActionBackEventHandler;
83 private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate;
85 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
86 private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager);
87 private DaliEventHandlerWithReturnType<object, ActionScrollUpEventArgs, bool> _accessibilityManagerActionScrollUpEventHandler;
88 private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate;
90 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
91 private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager);
92 private DaliEventHandlerWithReturnType<object, ActionScrollDownEventArgs, bool> _accessibilityManagerActionScrollDownEventHandler;
93 private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate;
95 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
96 private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager);
97 private DaliEventHandlerWithReturnType<object, ActionPageLeftEventArgs, bool> _accessibilityManagerActionPageLeftEventHandler;
98 private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate;
100 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
101 private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager);
102 private DaliEventHandlerWithReturnType<object, ActionPageRightEventArgs, bool> _accessibilityManagerActionPageRightEventHandler;
103 private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate;
105 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
106 private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager);
107 private DaliEventHandlerWithReturnType<object, ActionPageUpEventArgs, bool> _accessibilityManagerActionPageUpEventHandler;
108 private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate;
110 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
111 private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager);
112 private DaliEventHandlerWithReturnType<object, ActionPageDownEventArgs, bool> _accessibilityManagerActionPageDownEventHandler;
113 private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate;
115 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
116 private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager);
117 private DaliEventHandlerWithReturnType<object, ActionMoveToFirstEventArgs, bool> _accessibilityManagerActionMoveToFirstEventHandler;
118 private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate;
120 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
121 private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager);
122 private DaliEventHandlerWithReturnType<object, ActionMoveToLastEventArgs, bool> _accessibilityManagerActionMoveToLastEventHandler;
123 private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate;
125 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
126 private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager);
127 private DaliEventHandlerWithReturnType<object, ActionReadFromTopEventArgs, bool> _accessibilityManagerActionReadFromTopEventHandler;
128 private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate;
130 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
131 private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager);
132 private DaliEventHandlerWithReturnType<object, ActionReadFromNextEventArgs, bool> _accessibilityManagerActionReadFromNextEventHandler;
133 private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate;
135 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
136 private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager);
137 private DaliEventHandlerWithReturnType<object, ActionZoomEventArgs, bool> _accessibilityManagerActionZoomEventHandler;
138 private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate;
140 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
141 private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager);
142 private DaliEventHandlerWithReturnType<object, ActionReadIndicatorInformationEventArgs, bool> _accessibilityManagerActionReadIndicatorInformationEventHandler;
143 private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate;
145 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
146 private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager);
147 private DaliEventHandlerWithReturnType<object, ActionReadPauseResumeEventArgs, bool> _accessibilityManagerActionReadPauseResumeEventHandler;
148 private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate;
150 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
151 private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager);
152 private DaliEventHandlerWithReturnType<object, ActionStartStopEventArgs, bool> _accessibilityManagerActionStartStopEventHandler;
153 private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate;
156 // To be replaced by a new event that takes Touch
157 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
158 private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent);
159 private DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> _accessibilityManagerActionScrollEventHandler;
160 private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate;
163 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
164 private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2);
165 private DaliEventHandler<object, FocusChangedEventArgs> _accessibilityManagerFocusChangedEventHandler;
166 private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate;
168 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
169 private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view);
170 private DaliEventHandler<object, FocusedViewActivatedEventArgs> _accessibilityManagerFocusedViewActivatedEventHandler;
171 private FocusedViewActivatedEventCallbackDelegate _accessibilityManagerFocusedViewActivatedEventCallbackDelegate;
173 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
174 private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction);
175 private DaliEventHandler<object, FocusOvershotEventArgs> _accessibilityManagerFocusOvershotEventHandler;
176 private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate;
178 public event DaliEventHandlerWithReturnType<object, StatusChangedEventArgs, bool> StatusChanged
184 // Restricted to only one listener
185 if (_accessibilityManagerStatusChangedEventHandler == null)
187 _accessibilityManagerStatusChangedEventHandler += value;
189 _accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged);
190 this.StatusChangedSignal().Connect(_accessibilityManagerStatusChangedEventCallbackDelegate);
199 if (_accessibilityManagerStatusChangedEventHandler != null)
201 this.StatusChangedSignal().Disconnect(_accessibilityManagerStatusChangedEventCallbackDelegate);
204 _accessibilityManagerStatusChangedEventHandler -= value;
209 public event DaliEventHandlerWithReturnType<object, ActionNextEventArgs, bool> ActionNext
215 // Restricted to only one listener
216 if (_accessibilityManagerActionNextEventHandler == null)
218 _accessibilityManagerActionNextEventHandler += value;
220 _accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext);
221 this.ActionNextSignal().Connect(_accessibilityManagerActionNextEventCallbackDelegate);
230 if (_accessibilityManagerActionNextEventHandler != null)
232 this.ActionNextSignal().Disconnect(_accessibilityManagerActionNextEventCallbackDelegate);
235 _accessibilityManagerActionNextEventHandler -= value;
240 public event DaliEventHandlerWithReturnType<object, ActionPreviousEventArgs, bool> ActionPrevious
246 // Restricted to only one listener
247 if (_accessibilityManagerActionPreviousEventHandler == null)
249 _accessibilityManagerActionPreviousEventHandler += value;
251 _accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious);
252 this.ActionPreviousSignal().Connect(_accessibilityManagerActionPreviousEventCallbackDelegate);
261 if (_accessibilityManagerActionPreviousEventHandler != null)
263 this.ActionPreviousSignal().Disconnect(_accessibilityManagerActionPreviousEventCallbackDelegate);
266 _accessibilityManagerActionPreviousEventHandler -= value;
271 public event DaliEventHandlerWithReturnType<object, ActionActivateEventArgs, bool> ActionActivate
277 // Restricted to only one listener
278 if (_accessibilityManagerActionActivateEventHandler == null)
280 _accessibilityManagerActionActivateEventHandler += value;
282 _accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate);
283 this.ActionActivateSignal().Connect(_accessibilityManagerActionActivateEventCallbackDelegate);
292 if (_accessibilityManagerActionActivateEventHandler != null)
294 this.ActionActivateSignal().Disconnect(_accessibilityManagerActionActivateEventCallbackDelegate);
297 _accessibilityManagerActionActivateEventHandler -= value;
302 public event DaliEventHandlerWithReturnType<object, ActionReadEventArgs, bool> ActionRead
308 // Restricted to only one listener
309 if (_accessibilityManagerActionReadEventHandler == null)
311 _accessibilityManagerActionReadEventHandler += value;
313 _accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead);
314 this.ActionReadSignal().Connect(_accessibilityManagerActionReadEventCallbackDelegate);
323 if (_accessibilityManagerActionReadEventHandler != null)
325 this.ActionReadSignal().Disconnect(_accessibilityManagerActionReadEventCallbackDelegate);
328 _accessibilityManagerActionReadEventHandler -= value;
333 public event DaliEventHandlerWithReturnType<object, ActionOverEventArgs, bool> ActionOver
339 // Restricted to only one listener
340 if (_accessibilityManagerActionOverEventHandler == null)
342 _accessibilityManagerActionOverEventHandler += value;
344 _accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver);
345 this.ActionOverSignal().Connect(_accessibilityManagerActionOverEventCallbackDelegate);
354 if (_accessibilityManagerActionOverEventHandler != null)
356 this.ActionOverSignal().Disconnect(_accessibilityManagerActionOverEventCallbackDelegate);
359 _accessibilityManagerActionOverEventHandler -= value;
364 public event DaliEventHandlerWithReturnType<object, ActionReadNextEventArgs, bool> ActionReadNext
370 // Restricted to only one listener
371 if (_accessibilityManagerActionReadNextEventHandler == null)
373 _accessibilityManagerActionReadNextEventHandler += value;
375 _accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext);
376 this.ActionReadNextSignal().Connect(_accessibilityManagerActionReadNextEventCallbackDelegate);
385 if (_accessibilityManagerActionReadNextEventHandler != null)
387 this.ActionReadNextSignal().Disconnect(_accessibilityManagerActionReadNextEventCallbackDelegate);
390 _accessibilityManagerActionReadNextEventHandler -= value;
395 public event DaliEventHandlerWithReturnType<object, ActionReadPreviousEventArgs, bool> ActionReadPrevious
401 // Restricted to only one listener
402 if (_accessibilityManagerActionReadPreviousEventHandler == null)
404 _accessibilityManagerActionReadPreviousEventHandler += value;
406 _accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious);
407 this.ActionReadPreviousSignal().Connect(_accessibilityManagerActionReadPreviousEventCallbackDelegate);
416 if (_accessibilityManagerActionReadPreviousEventHandler != null)
418 this.ActionReadPreviousSignal().Disconnect(_accessibilityManagerActionReadPreviousEventCallbackDelegate);
421 _accessibilityManagerActionReadPreviousEventHandler -= value;
426 public event DaliEventHandlerWithReturnType<object, ActionUpEventArgs, bool> ActionUp
432 // Restricted to only one listener
433 if (_accessibilityManagerActionUpEventHandler == null)
435 _accessibilityManagerActionUpEventHandler += value;
437 _accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp);
438 this.ActionUpSignal().Connect(_accessibilityManagerActionUpEventCallbackDelegate);
447 if (_accessibilityManagerActionUpEventHandler != null)
449 this.ActionUpSignal().Disconnect(_accessibilityManagerActionUpEventCallbackDelegate);
452 _accessibilityManagerActionUpEventHandler -= value;
457 public event DaliEventHandlerWithReturnType<object, ActionDownEventArgs, bool> ActionDown
463 // Restricted to only one listener
464 if (_accessibilityManagerActionDownEventHandler == null)
466 _accessibilityManagerActionDownEventHandler += value;
468 _accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown);
469 this.ActionDownSignal().Connect(_accessibilityManagerActionDownEventCallbackDelegate);
478 if (_accessibilityManagerActionDownEventHandler != null)
480 this.ActionDownSignal().Disconnect(_accessibilityManagerActionDownEventCallbackDelegate);
483 _accessibilityManagerActionDownEventHandler -= value;
488 public event DaliEventHandlerWithReturnType<object, ActionClearFocusEventArgs, bool> ActionClearFocus
494 // Restricted to only one listener
495 if (_accessibilityManagerActionClearFocusEventHandler == null)
497 _accessibilityManagerActionClearFocusEventHandler += value;
499 _accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus);
500 this.ActionClearFocusSignal().Connect(_accessibilityManagerActionClearFocusEventCallbackDelegate);
509 if (_accessibilityManagerActionClearFocusEventHandler != null)
511 this.ActionClearFocusSignal().Disconnect(_accessibilityManagerActionClearFocusEventCallbackDelegate);
514 _accessibilityManagerActionClearFocusEventHandler -= value;
519 public event DaliEventHandlerWithReturnType<object, ActionBackEventArgs, bool> ActionBack
525 // Restricted to only one listener
526 if (_accessibilityManagerActionBackEventHandler == null)
528 _accessibilityManagerActionBackEventHandler += value;
530 _accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack);
531 this.ActionBackSignal().Connect(_accessibilityManagerActionBackEventCallbackDelegate);
540 if (_accessibilityManagerActionBackEventHandler != null)
542 this.ActionBackSignal().Disconnect(_accessibilityManagerActionBackEventCallbackDelegate);
545 _accessibilityManagerActionBackEventHandler -= value;
550 public event DaliEventHandlerWithReturnType<object, ActionScrollUpEventArgs, bool> ActionScrollUp
556 // Restricted to only one listener
557 if (_accessibilityManagerActionScrollUpEventHandler == null)
559 _accessibilityManagerActionScrollUpEventHandler += value;
561 _accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp);
562 this.ActionScrollUpSignal().Connect(_accessibilityManagerActionScrollUpEventCallbackDelegate);
571 if (_accessibilityManagerActionScrollUpEventHandler != null)
573 this.ActionScrollUpSignal().Disconnect(_accessibilityManagerActionScrollUpEventCallbackDelegate);
576 _accessibilityManagerActionScrollUpEventHandler -= value;
581 public event DaliEventHandlerWithReturnType<object, ActionScrollDownEventArgs, bool> ActionScrollDown
587 // Restricted to only one listener
588 if (_accessibilityManagerActionScrollDownEventHandler == null)
590 _accessibilityManagerActionScrollDownEventHandler += value;
592 _accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown);
593 this.ActionScrollDownSignal().Connect(_accessibilityManagerActionScrollDownEventCallbackDelegate);
602 if (_accessibilityManagerActionScrollDownEventHandler != null)
604 this.ActionScrollDownSignal().Disconnect(_accessibilityManagerActionScrollDownEventCallbackDelegate);
607 _accessibilityManagerActionScrollDownEventHandler -= value;
612 public event DaliEventHandlerWithReturnType<object, ActionPageLeftEventArgs, bool> ActionPageLeft
618 // Restricted to only one listener
619 if (_accessibilityManagerActionPageLeftEventHandler == null)
621 _accessibilityManagerActionPageLeftEventHandler += value;
623 _accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft);
624 this.ActionPageLeftSignal().Connect(_accessibilityManagerActionPageLeftEventCallbackDelegate);
633 if (_accessibilityManagerActionPageLeftEventHandler != null)
635 this.ActionPageLeftSignal().Disconnect(_accessibilityManagerActionPageLeftEventCallbackDelegate);
638 _accessibilityManagerActionPageLeftEventHandler -= value;
643 public event DaliEventHandlerWithReturnType<object, ActionPageRightEventArgs, bool> ActionPageRight
649 // Restricted to only one listener
650 if (_accessibilityManagerActionPageRightEventHandler == null)
652 _accessibilityManagerActionPageRightEventHandler += value;
654 _accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight);
655 this.ActionPageRightSignal().Connect(_accessibilityManagerActionPageRightEventCallbackDelegate);
664 if (_accessibilityManagerActionPageRightEventHandler != null)
666 this.ActionPageRightSignal().Disconnect(_accessibilityManagerActionPageRightEventCallbackDelegate);
669 _accessibilityManagerActionPageRightEventHandler -= value;
674 public event DaliEventHandlerWithReturnType<object, ActionPageUpEventArgs, bool> ActionPageUp
680 // Restricted to only one listener
681 if (_accessibilityManagerActionPageUpEventHandler == null)
683 _accessibilityManagerActionPageUpEventHandler += value;
685 _accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp);
686 this.ActionPageUpSignal().Connect(_accessibilityManagerActionPageUpEventCallbackDelegate);
695 if (_accessibilityManagerActionPageUpEventHandler != null)
697 this.ActionPageUpSignal().Disconnect(_accessibilityManagerActionPageUpEventCallbackDelegate);
700 _accessibilityManagerActionPageUpEventHandler -= value;
705 public event DaliEventHandlerWithReturnType<object, ActionPageDownEventArgs, bool> ActionPageDown
711 // Restricted to only one listener
712 if (_accessibilityManagerActionPageDownEventHandler == null)
714 _accessibilityManagerActionPageDownEventHandler += value;
716 _accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown);
717 this.ActionPageDownSignal().Connect(_accessibilityManagerActionPageDownEventCallbackDelegate);
726 if (_accessibilityManagerActionPageDownEventHandler != null)
728 this.ActionPageDownSignal().Disconnect(_accessibilityManagerActionPageDownEventCallbackDelegate);
731 _accessibilityManagerActionPageDownEventHandler -= value;
736 public event DaliEventHandlerWithReturnType<object, ActionMoveToFirstEventArgs, bool> ActionMoveToFirst
742 // Restricted to only one listener
743 if (_accessibilityManagerActionMoveToFirstEventHandler == null)
745 _accessibilityManagerActionMoveToFirstEventHandler += value;
747 _accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst);
748 this.ActionMoveToFirstSignal().Connect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate);
757 if (_accessibilityManagerActionMoveToFirstEventHandler != null)
759 this.ActionMoveToFirstSignal().Disconnect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate);
762 _accessibilityManagerActionMoveToFirstEventHandler -= value;
767 public event DaliEventHandlerWithReturnType<object, ActionMoveToLastEventArgs, bool> ActionMoveToLast
773 // Restricted to only one listener
774 if (_accessibilityManagerActionMoveToLastEventHandler == null)
776 _accessibilityManagerActionMoveToLastEventHandler += value;
778 _accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast);
779 this.ActionMoveToLastSignal().Connect(_accessibilityManagerActionMoveToLastEventCallbackDelegate);
788 if (_accessibilityManagerActionMoveToLastEventHandler != null)
790 this.ActionMoveToLastSignal().Disconnect(_accessibilityManagerActionMoveToLastEventCallbackDelegate);
793 _accessibilityManagerActionMoveToLastEventHandler -= value;
798 public event DaliEventHandlerWithReturnType<object, ActionReadFromTopEventArgs, bool> ActionReadFromTop
804 // Restricted to only one listener
805 if (_accessibilityManagerActionReadFromTopEventHandler == null)
807 _accessibilityManagerActionReadFromTopEventHandler += value;
809 _accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop);
810 this.ActionReadFromTopSignal().Connect(_accessibilityManagerActionReadFromTopEventCallbackDelegate);
819 if (_accessibilityManagerActionReadFromTopEventHandler != null)
821 this.ActionReadFromTopSignal().Disconnect(_accessibilityManagerActionReadFromTopEventCallbackDelegate);
824 _accessibilityManagerActionReadFromTopEventHandler -= value;
829 public event DaliEventHandlerWithReturnType<object, ActionReadFromNextEventArgs, bool> ActionReadFromNext
835 // Restricted to only one listener
836 if (_accessibilityManagerActionReadFromNextEventHandler == null)
838 _accessibilityManagerActionReadFromNextEventHandler += value;
840 _accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext);
841 this.ActionReadFromNextSignal().Connect(_accessibilityManagerActionReadFromNextEventCallbackDelegate);
850 if (_accessibilityManagerActionReadFromNextEventHandler != null)
852 this.ActionReadFromNextSignal().Disconnect(_accessibilityManagerActionReadFromNextEventCallbackDelegate);
855 _accessibilityManagerActionReadFromNextEventHandler -= value;
860 public event DaliEventHandlerWithReturnType<object, ActionZoomEventArgs, bool> ActionZoom
866 // Restricted to only one listener
867 if (_accessibilityManagerActionZoomEventHandler == null)
869 _accessibilityManagerActionZoomEventHandler += value;
871 _accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom);
872 this.ActionZoomSignal().Connect(_accessibilityManagerActionZoomEventCallbackDelegate);
881 if (_accessibilityManagerActionZoomEventHandler != null)
883 this.ActionZoomSignal().Disconnect(_accessibilityManagerActionZoomEventCallbackDelegate);
886 _accessibilityManagerActionZoomEventHandler -= value;
891 public event DaliEventHandlerWithReturnType<object, ActionReadIndicatorInformationEventArgs, bool> ActionReadIndicatorInformation
897 // Restricted to only one listener
898 if (_accessibilityManagerActionReadIndicatorInformationEventHandler == null)
900 _accessibilityManagerActionReadIndicatorInformationEventHandler += value;
902 _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate = new ActionReadIndicatorInformationEventCallbackDelegate(OnActionReadIndicatorInformation);
903 this.ActionReadIndicatorInformationSignal().Connect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate);
912 if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null)
914 this.ActionReadIndicatorInformationSignal().Disconnect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate);
917 _accessibilityManagerActionReadIndicatorInformationEventHandler -= value;
922 public event DaliEventHandlerWithReturnType<object, ActionReadPauseResumeEventArgs, bool> ActionReadPauseResume
928 // Restricted to only one listener
929 if (_accessibilityManagerActionReadPauseResumeEventHandler == null)
931 _accessibilityManagerActionReadPauseResumeEventHandler += value;
933 _accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume);
934 this.ActionReadPauseResumeSignal().Connect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
943 if (_accessibilityManagerActionReadPauseResumeEventHandler != null)
945 this.ActionReadPauseResumeSignal().Disconnect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
948 _accessibilityManagerActionReadPauseResumeEventHandler -= value;
953 public event DaliEventHandlerWithReturnType<object, ActionStartStopEventArgs, bool> ActionStartStop
959 // Restricted to only one listener
960 if (_accessibilityManagerActionStartStopEventHandler == null)
962 _accessibilityManagerActionStartStopEventHandler += value;
964 _accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop);
965 this.ActionStartStopSignal().Connect(_accessibilityManagerActionStartStopEventCallbackDelegate);
974 if (_accessibilityManagerActionStartStopEventHandler != null)
976 this.ActionStartStopSignal().Disconnect(_accessibilityManagerActionStartStopEventCallbackDelegate);
979 _accessibilityManagerActionStartStopEventHandler -= value;
985 // To be replaced by a new event that takes Touch
986 public event DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> ActionScroll
992 // Restricted to only one listener
993 if (_accessibilityManagerActionScrollEventHandler == null)
995 _accessibilityManagerActionScrollEventHandler += value;
997 _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll);
998 this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate);
1007 if (_accessibilityManagerActionScrollEventHandler != null)
1009 this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate);
1012 _accessibilityManagerActionScrollEventHandler -= value;
1017 // Callback for AccessibilityManager ActionScrollSignal
1018 private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent)
1020 ActionScrollEventArgs e = new ActionScrollEventArgs();
1022 // Populate all members of "e" (ActionScrollEventArgs) with real data
1023 e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager);
1024 e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent);
1026 if (_accessibilityManagerActionScrollEventHandler != null)
1028 //here we send all data to user event handlers
1029 return _accessibilityManagerActionScrollEventHandler(this, e);
1035 public event DaliEventHandler<object, FocusChangedEventArgs> FocusChanged
1041 // Restricted to only one listener
1042 if (_accessibilityManagerFocusChangedEventHandler == null)
1044 _accessibilityManagerFocusChangedEventHandler += value;
1046 _accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged);
1047 this.FocusChangedSignal().Connect(_accessibilityManagerFocusChangedEventCallbackDelegate);
1056 if (_accessibilityManagerFocusChangedEventHandler != null)
1058 this.FocusChangedSignal().Disconnect(_accessibilityManagerFocusChangedEventCallbackDelegate);
1061 _accessibilityManagerFocusChangedEventHandler -= value;
1066 public event DaliEventHandler<object, FocusedViewActivatedEventArgs> FocusedViewActivated
1072 // Restricted to only one listener
1073 if (_accessibilityManagerFocusedViewActivatedEventHandler == null)
1075 _accessibilityManagerFocusedViewActivatedEventHandler += value;
1077 _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated);
1078 this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate);
1087 if (_accessibilityManagerFocusedViewActivatedEventHandler != null)
1089 this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate);
1092 _accessibilityManagerFocusedViewActivatedEventHandler -= value;
1097 public event DaliEventHandler<object, FocusOvershotEventArgs> FocusOvershot
1103 // Restricted to only one listener
1104 if (_accessibilityManagerFocusOvershotEventHandler == null)
1106 _accessibilityManagerFocusOvershotEventHandler += value;
1108 _accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot);
1109 this.FocusOvershotSignal().Connect(_accessibilityManagerFocusOvershotEventCallbackDelegate);
1118 if (_accessibilityManagerFocusOvershotEventHandler != null)
1120 this.FocusOvershotSignal().Disconnect(_accessibilityManagerFocusOvershotEventCallbackDelegate);
1123 _accessibilityManagerFocusOvershotEventHandler -= value;