/* * Copyright(c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using System.ComponentModel; using System.Runtime.InteropServices; namespace Tizen.NUI.Accessibility { public partial class AccessibilityManager { [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerStatusChangedEventHandler; private StatusChangedEventCallbackDelegate accessibilityManagerStatusChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionNextEventHandler; private ActionNextEventCallbackDelegate accessibilityManagerActionNextEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionPreviousEventHandler; private ActionPreviousEventCallbackDelegate accessibilityManagerActionPreviousEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionActivateEventHandler; private ActionActivateEventCallbackDelegate accessibilityManagerActionActivateEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionReadEventHandler; private ActionReadEventCallbackDelegate accessibilityManagerActionReadEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionOverEventHandler; private ActionOverEventCallbackDelegate accessibilityManagerActionOverEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionReadNextEventHandler; private ActionReadNextEventCallbackDelegate accessibilityManagerActionReadNextEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionReadPreviousEventHandler; private ActionReadPreviousEventCallbackDelegate accessibilityManagerActionReadPreviousEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionUpEventHandler; private ActionUpEventCallbackDelegate accessibilityManagerActionUpEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionDownEventHandler; private ActionDownEventCallbackDelegate accessibilityManagerActionDownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionClearFocusEventHandler; private ActionClearFocusEventCallbackDelegate accessibilityManagerActionClearFocusEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionBackEventHandler; private ActionBackEventCallbackDelegate accessibilityManagerActionBackEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionScrollUpEventHandler; private ActionScrollUpEventCallbackDelegate accessibilityManagerActionScrollUpEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionScrollDownEventHandler; private ActionScrollDownEventCallbackDelegate accessibilityManagerActionScrollDownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionPageLeftEventHandler; private ActionPageLeftEventCallbackDelegate accessibilityManagerActionPageLeftEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionPageRightEventHandler; private ActionPageRightEventCallbackDelegate accessibilityManagerActionPageRightEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionPageUpEventHandler; private ActionPageUpEventCallbackDelegate accessibilityManagerActionPageUpEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionPageDownEventHandler; private ActionPageDownEventCallbackDelegate accessibilityManagerActionPageDownEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionMoveToFirstEventHandler; private ActionMoveToFirstEventCallbackDelegate accessibilityManagerActionMoveToFirstEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionMoveToLastEventHandler; private ActionMoveToLastEventCallbackDelegate accessibilityManagerActionMoveToLastEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionReadFromTopEventHandler; private ActionReadFromTopEventCallbackDelegate accessibilityManagerActionReadFromTopEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionReadFromNextEventHandler; private ActionReadFromNextEventCallbackDelegate accessibilityManagerActionReadFromNextEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionZoomEventHandler; private ActionZoomEventCallbackDelegate accessibilityManagerActionZoomEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionReadPauseResumeEventHandler; private ActionReadPauseResumeEventCallbackDelegate accessibilityManagerActionReadPauseResumeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); private ReturnTypeEventHandler accessibilityManagerActionStartStopEventHandler; private ActionStartStopEventCallbackDelegate accessibilityManagerActionStartStopEventCallbackDelegate; /* // To be replaced by a new event that takes Touch [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent); private EventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; */ [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2); private EventHandler accessibilityManagerFocusChangedEventHandler; private FocusChangedEventCallbackDelegate accessibilityManagerFocusChangedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view); private EventHandler accessibilityManagerFocusedViewActivatedEventHandler; private FocusedViewActivatedEventCallbackDelegate accessibilityManagerFocusedViewActivatedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction); private EventHandler accessibilityManagerFocusOvershotEventHandler; private FocusOvershotEventCallbackDelegate accessibilityManagerFocusOvershotEventCallbackDelegate; // Accessibility action signals /// /// This is emitted when accessibility(screen-reader) feature turned on or off. /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler StatusChanged { add { // Restricted to only one listener if (accessibilityManagerStatusChangedEventHandler == null) { accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged); this.StatusChangedSignal().Connect(accessibilityManagerStatusChangedEventCallbackDelegate); } accessibilityManagerStatusChangedEventHandler += value; } remove { accessibilityManagerStatusChangedEventHandler -= value; if (accessibilityManagerStatusChangedEventHandler == null && StatusChangedSignal().Empty() == false) { this.StatusChangedSignal().Disconnect(accessibilityManagerStatusChangedEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick down). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionNext { add { // Restricted to only one listener if (accessibilityManagerActionNextEventHandler == null) { accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext); this.ActionNextSignal().Connect(accessibilityManagerActionNextEventCallbackDelegate); } accessibilityManagerActionNextEventHandler += value; } remove { accessibilityManagerActionNextEventHandler -= value; if (accessibilityManagerActionNextEventHandler == null && ActionNextSignal().Empty() == false) { this.ActionNextSignal().Disconnect(accessibilityManagerActionNextEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick up). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionPrevious { add { // Restricted to only one listener if (accessibilityManagerActionPreviousEventHandler == null) { accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious); this.ActionPreviousSignal().Connect(accessibilityManagerActionPreviousEventCallbackDelegate); } accessibilityManagerActionPreviousEventHandler += value; } remove { accessibilityManagerActionPreviousEventHandler -= value; if (accessibilityManagerActionPreviousEventHandler == null && ActionPreviousSignal().Empty() == false) { this.ActionPreviousSignal().Disconnect(accessibilityManagerActionPreviousEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to activate the current focused view (by one finger double tap). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionActivate { add { // Restricted to only one listener if (accessibilityManagerActionActivateEventHandler == null) { accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate); this.ActionActivateSignal().Connect(accessibilityManagerActionActivateEventCallbackDelegate); } accessibilityManagerActionActivateEventHandler += value; } remove { accessibilityManagerActionActivateEventHandler -= value; if (accessibilityManagerActionActivateEventHandler == null && ActionActivateSignal().Empty() == false) { this.ActionActivateSignal().Disconnect(accessibilityManagerActionActivateEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to focus and read the view (by one finger tap). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionRead { add { // Restricted to only one listener if (accessibilityManagerActionReadEventHandler == null) { accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead); this.ActionReadSignal().Connect(accessibilityManagerActionReadEventCallbackDelegate); } accessibilityManagerActionReadEventHandler += value; } remove { accessibilityManagerActionReadEventHandler -= value; if (accessibilityManagerActionReadEventHandler == null && ActionReadSignal().Empty() == false) { this.ActionReadSignal().Disconnect(accessibilityManagerActionReadEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to focus and read the view (by one finger move). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionOver { add { // Restricted to only one listener if (accessibilityManagerActionOverEventHandler == null) { accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver); this.ActionOverSignal().Connect(accessibilityManagerActionOverEventCallbackDelegate); } accessibilityManagerActionOverEventHandler += value; } remove { accessibilityManagerActionOverEventHandler -= value; if (accessibilityManagerActionOverEventHandler == null && ActionOverSignal().Empty() == false) { this.ActionOverSignal().Disconnect(accessibilityManagerActionOverEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick right). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionReadNext { add { // Restricted to only one listener if (accessibilityManagerActionReadNextEventHandler == null) { accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext); this.ActionReadNextSignal().Connect(accessibilityManagerActionReadNextEventCallbackDelegate); } accessibilityManagerActionReadNextEventHandler += value; } remove { accessibilityManagerActionReadNextEventHandler -= value; if (accessibilityManagerActionReadNextEventHandler == null && ActionReadNextSignal().Empty() == false) { this.ActionReadNextSignal().Disconnect(accessibilityManagerActionReadNextEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick left). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionReadPrevious { add { // Restricted to only one listener if (accessibilityManagerActionReadPreviousEventHandler == null) { accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious); this.ActionReadPreviousSignal().Connect(accessibilityManagerActionReadPreviousEventCallbackDelegate); } accessibilityManagerActionReadPreviousEventHandler += value; } remove { accessibilityManagerActionReadPreviousEventHandler -= value; if (accessibilityManagerActionReadPreviousEventHandler == null && ActionReadPreviousSignal().Empty() == false) { this.ActionReadPreviousSignal().Disconnect(accessibilityManagerActionReadPreviousEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to change the value when the current focused view is a slider /// (by double finger down and move up and right). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionUp { add { // Restricted to only one listener if (accessibilityManagerActionUpEventHandler == null) { accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp); this.ActionUpSignal().Connect(accessibilityManagerActionUpEventCallbackDelegate); } accessibilityManagerActionUpEventHandler += value; } remove { accessibilityManagerActionUpEventHandler -= value; if (accessibilityManagerActionUpEventHandler == null && ActionUpSignal().Empty() == false) { this.ActionUpSignal().Disconnect(accessibilityManagerActionUpEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to change the value when the current focused view is a slider /// (by double finger down and move down and left). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionDown { add { // Restricted to only one listener if (accessibilityManagerActionDownEventHandler == null) { accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown); this.ActionDownSignal().Connect(accessibilityManagerActionDownEventCallbackDelegate); } accessibilityManagerActionDownEventHandler += value; } remove { accessibilityManagerActionDownEventHandler -= value; if (accessibilityManagerActionDownEventHandler == null && ActionDownSignal().Empty() == false) { this.ActionDownSignal().Disconnect(accessibilityManagerActionDownEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to clear the focus from the current focused view /// if any, so that no view is focused in the focus chain. /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionClearFocus { add { // Restricted to only one listener if (accessibilityManagerActionClearFocusEventHandler == null) { accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus); this.ActionClearFocusSignal().Connect(accessibilityManagerActionClearFocusEventCallbackDelegate); } accessibilityManagerActionClearFocusEventHandler += value; } remove { accessibilityManagerActionClearFocusEventHandler -= value; if (accessibilityManagerActionClearFocusEventHandler == null && ActionClearFocusSignal().Empty() == false) { this.ActionClearFocusSignal().Disconnect(accessibilityManagerActionClearFocusEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to navigate back (by two fingers circle draw). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionBack { add { // Restricted to only one listener if (accessibilityManagerActionBackEventHandler == null) { accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack); this.ActionBackSignal().Connect(accessibilityManagerActionBackEventCallbackDelegate); } accessibilityManagerActionBackEventHandler += value; } remove { accessibilityManagerActionBackEventHandler -= value; if (accessibilityManagerActionBackEventHandler == null && ActionBackSignal().Empty() == false) { this.ActionBackSignal().Disconnect(accessibilityManagerActionBackEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to scroll up the list (by two finger swipe up). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionScrollUp { add { // Restricted to only one listener if (accessibilityManagerActionScrollUpEventHandler == null) { accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp); this.ActionScrollUpSignal().Connect(accessibilityManagerActionScrollUpEventCallbackDelegate); } accessibilityManagerActionScrollUpEventHandler += value; } remove { accessibilityManagerActionScrollUpEventHandler -= value; if (accessibilityManagerActionScrollUpEventHandler == null && ActionScrollUpSignal().Empty() == false) { this.ActionScrollUpSignal().Disconnect(accessibilityManagerActionScrollUpEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to scroll down the list (by two finger swipe down). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionScrollDown { add { // Restricted to only one listener if (accessibilityManagerActionScrollDownEventHandler == null) { accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown); this.ActionScrollDownSignal().Connect(accessibilityManagerActionScrollDownEventCallbackDelegate); } accessibilityManagerActionScrollDownEventHandler += value; } remove { accessibilityManagerActionScrollDownEventHandler -= value; if (accessibilityManagerActionScrollDownEventHandler == null && ActionScrollDownSignal().Empty() == false) { this.ActionScrollDownSignal().Disconnect(accessibilityManagerActionScrollDownEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to scroll left to the previous page (by two finger swipe left). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionPageLeft { add { // Restricted to only one listener if (accessibilityManagerActionPageLeftEventHandler == null) { accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft); this.ActionPageLeftSignal().Connect(accessibilityManagerActionPageLeftEventCallbackDelegate); } accessibilityManagerActionPageLeftEventHandler += value; } remove { accessibilityManagerActionPageLeftEventHandler -= value; if (accessibilityManagerActionPageLeftEventHandler == null && ActionPageLeftSignal().Empty() == false) { this.ActionPageLeftSignal().Disconnect(accessibilityManagerActionPageLeftEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to scroll right to the next page (by two finger swipe right). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionPageRight { add { // Restricted to only one listener if (accessibilityManagerActionPageRightEventHandler == null) { accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight); this.ActionPageRightSignal().Connect(accessibilityManagerActionPageRightEventCallbackDelegate); } accessibilityManagerActionPageRightEventHandler += value; } remove { accessibilityManagerActionPageRightEventHandler -= value; if (accessibilityManagerActionPageRightEventHandler == null && ActionPageRightSignal().Empty() == false) { this.ActionPageRightSignal().Disconnect(accessibilityManagerActionPageRightEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to scroll up to the previous page (by one finger swipe left and right). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionPageUp { add { // Restricted to only one listener if (accessibilityManagerActionPageUpEventHandler == null) { accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp); this.ActionPageUpSignal().Connect(accessibilityManagerActionPageUpEventCallbackDelegate); } accessibilityManagerActionPageUpEventHandler += value; } remove { accessibilityManagerActionPageUpEventHandler -= value; if (accessibilityManagerActionPageUpEventHandler == null && ActionPageUpSignal().Empty() == false) { this.ActionPageUpSignal().Disconnect(accessibilityManagerActionPageUpEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to scroll down to the next page (by one finger swipe right and left). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionPageDown { add { // Restricted to only one listener if (accessibilityManagerActionPageDownEventHandler == null) { accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown); this.ActionPageDownSignal().Connect(accessibilityManagerActionPageDownEventCallbackDelegate); } accessibilityManagerActionPageDownEventHandler += value; } remove { accessibilityManagerActionPageDownEventHandler -= value; if (accessibilityManagerActionPageDownEventHandler == null && ActionPageDownSignal().Empty() == false) { this.ActionPageDownSignal().Disconnect(accessibilityManagerActionPageDownEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move the focus to the first item on the screen /// (by one finger swipe up and down). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionMoveToFirst { add { // Restricted to only one listener if (accessibilityManagerActionMoveToFirstEventHandler == null) { accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst); this.ActionMoveToFirstSignal().Connect(accessibilityManagerActionMoveToFirstEventCallbackDelegate); } accessibilityManagerActionMoveToFirstEventHandler += value; } remove { accessibilityManagerActionMoveToFirstEventHandler -= value; if (accessibilityManagerActionMoveToFirstEventHandler == null && ActionMoveToFirstSignal().Empty() == false) { this.ActionMoveToFirstSignal().Disconnect(accessibilityManagerActionMoveToFirstEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move the focus to the last item on the screen /// (by one finger swipe down and up). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionMoveToLast { add { // Restricted to only one listener if (accessibilityManagerActionMoveToLastEventHandler == null) { accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast); this.ActionMoveToLastSignal().Connect(accessibilityManagerActionMoveToLastEventCallbackDelegate); } accessibilityManagerActionMoveToLastEventHandler += value; } remove { accessibilityManagerActionMoveToLastEventHandler -= value; if (accessibilityManagerActionMoveToLastEventHandler == null && ActionMoveToLastSignal().Empty() == false) { this.ActionMoveToLastSignal().Disconnect(accessibilityManagerActionMoveToLastEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to focus and read from the first item on the top continuously /// (by three fingers single tap). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionReadFromTop { add { // Restricted to only one listener if (accessibilityManagerActionReadFromTopEventHandler == null) { accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop); this.ActionReadFromTopSignal().Connect(accessibilityManagerActionReadFromTopEventCallbackDelegate); } accessibilityManagerActionReadFromTopEventHandler += value; } remove { accessibilityManagerActionReadFromTopEventHandler -= value; if (accessibilityManagerActionReadFromTopEventHandler == null && ActionReadFromTopSignal().Empty() == false) { this.ActionReadFromTopSignal().Disconnect(accessibilityManagerActionReadFromTopEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to move the focus to and read from the next item continuously /// (by three fingers double tap). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionReadFromNext { add { // Restricted to only one listener if (accessibilityManagerActionReadFromNextEventHandler == null) { accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext); this.ActionReadFromNextSignal().Connect(accessibilityManagerActionReadFromNextEventCallbackDelegate); } accessibilityManagerActionReadFromNextEventHandler += value; } remove { accessibilityManagerActionReadFromNextEventHandler -= value; if (accessibilityManagerActionReadFromNextEventHandler == null && ActionReadFromNextSignal().Empty() == false) { this.ActionReadFromNextSignal().Disconnect(accessibilityManagerActionReadFromNextEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to zoom (by one finger triple tap) /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionZoom { add { // Restricted to only one listener if (accessibilityManagerActionZoomEventHandler == null) { accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom); this.ActionZoomSignal().Connect(accessibilityManagerActionZoomEventCallbackDelegate); } accessibilityManagerActionZoomEventHandler += value; } remove { accessibilityManagerActionZoomEventHandler -= value; if (accessibilityManagerActionZoomEventHandler == null && ActionZoomSignal().Empty() == false) { this.ActionZoomSignal().Disconnect(accessibilityManagerActionZoomEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to pause/resume the current speech (by two fingers single tap). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionReadPauseResume { add { // Restricted to only one listener if (accessibilityManagerActionReadPauseResumeEventHandler == null) { accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume); this.ActionReadPauseResumeSignal().Connect(accessibilityManagerActionReadPauseResumeEventCallbackDelegate); } accessibilityManagerActionReadPauseResumeEventHandler += value; } remove { accessibilityManagerActionReadPauseResumeEventHandler -= value; if (accessibilityManagerActionReadPauseResumeEventHandler == null && ActionReadPauseResumeSignal().Empty() == false) { this.ActionReadPauseResumeSignal().Disconnect(accessibilityManagerActionReadPauseResumeEventCallbackDelegate); } } } /// /// This is emitted when accessibility action is received to start/stop the current action (by two fingers double tap). /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event ReturnTypeEventHandler ActionStartStop { add { // Restricted to only one listener if (accessibilityManagerActionStartStopEventHandler == null) { accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop); this.ActionStartStopSignal().Connect(accessibilityManagerActionStartStopEventCallbackDelegate); } accessibilityManagerActionStartStopEventHandler += value; } remove { accessibilityManagerActionStartStopEventHandler -= value; if (accessibilityManagerActionStartStopEventHandler == null && ActionStartStopSignal().Empty() == false) { this.ActionStartStopSignal().Disconnect(accessibilityManagerActionStartStopEventCallbackDelegate); } } } /* // To be replaced by a new event that takes Touch public event DaliEventHandlerWithReturnType ActionScroll { add { lock(this) { // Restricted to only one listener if (_accessibilityManagerActionScrollEventHandler == null) { _accessibilityManagerActionScrollEventHandler += value; _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll); this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate); } } } remove { lock(this) { if (_accessibilityManagerActionScrollEventHandler != null) { this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate); } _accessibilityManagerActionScrollEventHandler -= value; } } } // Callback for AccessibilityManager ActionScrollSignal private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent) { ActionScrollEventArgs e = new ActionScrollEventArgs(); // Populate all members of "e" (ActionScrollEventArgs) with real data e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager); e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent); if (_accessibilityManagerActionScrollEventHandler != null) { //here we send all data to user event handlers return _accessibilityManagerActionScrollEventHandler(this, e); } return false; } */ // Common Signals /// /// This signal is emitted when the current focused view is changed. /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event EventHandler FocusChanged { add { // Restricted to only one listener if (accessibilityManagerFocusChangedEventHandler == null) { accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged); this.FocusChangedSignal().Connect(accessibilityManagerFocusChangedEventCallbackDelegate); } accessibilityManagerFocusChangedEventHandler += value; } remove { accessibilityManagerFocusChangedEventHandler -= value; if (accessibilityManagerFocusChangedEventHandler == null && FocusChangedSignal().Empty() == false) { this.FocusChangedSignal().Disconnect(accessibilityManagerFocusChangedEventCallbackDelegate); } } } /// /// This signal is emitted when the current focused view is activated. /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event EventHandler FocusedViewActivated { add { // Restricted to only one listener if (accessibilityManagerFocusedViewActivatedEventHandler == null) { accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); this.FocusedViewActivatedSignal().Connect(accessibilityManagerFocusedViewActivatedEventCallbackDelegate); } accessibilityManagerFocusedViewActivatedEventHandler += value; } remove { accessibilityManagerFocusedViewActivatedEventHandler -= value; if (accessibilityManagerFocusedViewActivatedEventHandler == null && FocusedViewActivatedSignal().Empty() == false) { this.FocusedViewActivatedSignal().Disconnect(accessibilityManagerFocusedViewActivatedEventCallbackDelegate); } } } /// /// This signal is emitted when there is no way to move focus further. /// /// The signal to connect to /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public event EventHandler FocusOvershot { add { // Restricted to only one listener if (accessibilityManagerFocusOvershotEventHandler == null) { accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot); this.FocusOvershotSignal().Connect(accessibilityManagerFocusOvershotEventCallbackDelegate); } accessibilityManagerFocusOvershotEventHandler += value; } remove { accessibilityManagerFocusOvershotEventHandler -= value; if (accessibilityManagerFocusOvershotEventHandler == null && FocusOvershotSignal().Empty() == false) { this.FocusOvershotSignal().Disconnect(accessibilityManagerFocusOvershotEventCallbackDelegate); } } } } }