From 3f80337d74c5fb80923f6760ca5922841d80b26c Mon Sep 17 00:00:00 2001 From: Seoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com> Date: Mon, 23 Mar 2020 21:36:08 +0900 Subject: [PATCH] [NUI] Make AccessibilityManager APIs as public ones (#1482) - Move AccessibilityManager class from internal to public - Make Tizen.NUI.Accessibility namespace --- .../src/internal/AccessibilityActionSignal.cs | 16 +- .../internal/AccessibilityFocusOvershotSignal.cs | 15 +- src/Tizen.NUI/src/internal/AccessibilityManager.cs | 914 ---------------- .../src/internal/AccessibilityManagerEvent.cs | 1128 ------------------- .../src/internal/AccessibilityManagerEventArgs.cs | 754 ------------- .../Interop/Interop.AccessibilityManager.cs | 5 +- .../public/{ => Accessibility}/Accessibility.cs | 2 +- .../public/Accessibility/AccessibilityManager.cs | 1046 ++++++++++++++++++ .../Accessibility/AccessibilityManagerEvent.cs | 1136 ++++++++++++++++++++ .../Accessibility/AccessibilityManagerEventArgs.cs | 137 +++ .../Samples/AccessibilityManagerSample.cs | 112 ++ 11 files changed, 2450 insertions(+), 2815 deletions(-) delete mode 100755 src/Tizen.NUI/src/internal/AccessibilityManager.cs delete mode 100755 src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs delete mode 100755 src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs rename src/Tizen.NUI/src/public/{ => Accessibility}/Accessibility.cs (99%) create mode 100755 src/Tizen.NUI/src/public/Accessibility/AccessibilityManager.cs create mode 100755 src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEvent.cs create mode 100755 src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEventArgs.cs create mode 100755 test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/AccessibilityManagerSample.cs diff --git a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs index e38acce..2f797f6 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs @@ -15,6 +15,8 @@ * */ +using Tizen.NUI.Accessibility; + namespace Tizen.NUI { @@ -28,19 +30,19 @@ namespace Tizen.NUI protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { - Interop.AccessibilityManage.delete_AccessibilityActionSignal(swigCPtr); + Interop.AccessibilityManager.delete_AccessibilityActionSignal(swigCPtr); } public bool Empty() { - bool ret = Interop.AccessibilityManage.AccessibilityActionSignal_Empty(swigCPtr); + bool ret = Interop.AccessibilityManager.AccessibilityActionSignal_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint GetConnectionCount() { - uint ret = Interop.AccessibilityManage.AccessibilityActionSignal_GetConnectionCount(swigCPtr); + uint ret = Interop.AccessibilityManager.AccessibilityActionSignal_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -49,7 +51,7 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - Interop.AccessibilityManage.AccessibilityActionSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + Interop.AccessibilityManager.AccessibilityActionSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } @@ -58,19 +60,19 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - Interop.AccessibilityManage.AccessibilityActionSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + Interop.AccessibilityManager.AccessibilityActionSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } public bool Emit(AccessibilityManager arg) { - bool ret = Interop.AccessibilityManage.AccessibilityActionSignal_Emit(swigCPtr, AccessibilityManager.getCPtr(arg)); + bool ret = Interop.AccessibilityManager.AccessibilityActionSignal_Emit(swigCPtr, AccessibilityManager.getCPtr(arg)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - public AccessibilityActionSignal() : this(Interop.AccessibilityManage.new_AccessibilityActionSignal(), true) + public AccessibilityActionSignal() : this(Interop.AccessibilityManager.new_AccessibilityActionSignal(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs index fc27dc2..e1b6b78 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs @@ -18,6 +18,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; + using Tizen.NUI.Accessibility; internal class AccessibilityFocusOvershotSignal : Disposable { @@ -28,19 +29,19 @@ namespace Tizen.NUI protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { - Interop.AccessibilityManage.delete_AccessibilityFocusOvershotSignal(swigCPtr); + Interop.AccessibilityManager.delete_AccessibilityFocusOvershotSignal(swigCPtr); } public bool Empty() { - bool ret = Interop.AccessibilityManage.AccessibilityFocusOvershotSignal_Empty(swigCPtr); + bool ret = Interop.AccessibilityManager.AccessibilityFocusOvershotSignal_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint GetConnectionCount() { - uint ret = Interop.AccessibilityManage.AccessibilityFocusOvershotSignal_GetConnectionCount(swigCPtr); + uint ret = Interop.AccessibilityManager.AccessibilityFocusOvershotSignal_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -49,7 +50,7 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - Interop.AccessibilityManage.AccessibilityFocusOvershotSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + Interop.AccessibilityManager.AccessibilityFocusOvershotSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } @@ -58,18 +59,18 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - Interop.AccessibilityManage.AccessibilityFocusOvershotSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + Interop.AccessibilityManager.AccessibilityFocusOvershotSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } public void Emit(View arg1, AccessibilityManager.FocusOvershotDirection arg2) { - Interop.AccessibilityManage.AccessibilityFocusOvershotSignal_Emit(swigCPtr, View.getCPtr(arg1), (int)arg2); + Interop.AccessibilityManager.AccessibilityFocusOvershotSignal_Emit(swigCPtr, View.getCPtr(arg1), (int)arg2); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public AccessibilityFocusOvershotSignal() : this(Interop.AccessibilityManage.new_AccessibilityFocusOvershotSignal(), true) + public AccessibilityFocusOvershotSignal() : this(Interop.AccessibilityManager.new_AccessibilityFocusOvershotSignal(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/AccessibilityManager.cs b/src/Tizen.NUI/src/internal/AccessibilityManager.cs deleted file mode 100755 index d72424d..0000000 --- a/src/Tizen.NUI/src/internal/AccessibilityManager.cs +++ /dev/null @@ -1,914 +0,0 @@ -/* - * Copyright(c) 2019 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 Tizen.NUI.BaseComponents; - -namespace Tizen.NUI -{ - internal partial class AccessibilityManager : BaseHandle - { - - internal AccessibilityManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.AccessibilityManage.AccessibilityManager_SWIGUpcast(cPtr), cMemoryOwn) - { - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityManager obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) - { - Interop.AccessibilityManage.delete_AccessibilityManager(swigCPtr); - } - - // Callback for AccessibilityManager StatusChangedSignal - private bool OnStatusChanged(IntPtr data) - { - StatusChangedEventArgs e = new StatusChangedEventArgs(); - - // Populate all members of "e" (StatusChangedEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerStatusChangedEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerStatusChangedEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionNextSignal - private bool OnActionNext(IntPtr data) - { - ActionNextEventArgs e = new ActionNextEventArgs(); - - // Populate all members of "e" (ActionNextEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionNextEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionNextEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionPreviousSignal - private bool OnActionPrevious(IntPtr data) - { - ActionPreviousEventArgs e = new ActionPreviousEventArgs(); - - // Populate all members of "e" (ActionPreviousEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionPreviousEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPreviousEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionActivateSignal - private bool OnActionActivate(IntPtr data) - { - ActionActivateEventArgs e = new ActionActivateEventArgs(); - - // Populate all members of "e" (ActionActivateEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionActivateEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionActivateEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionReadSignal - private bool OnActionRead(IntPtr data) - { - ActionReadEventArgs e = new ActionReadEventArgs(); - - // Populate all members of "e" (ActionReadEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionOverSignal - private bool OnActionOver(IntPtr data) - { - ActionOverEventArgs e = new ActionOverEventArgs(); - - // Populate all members of "e" (ActionOverEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionOverEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionOverEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionReadNextSignal - private bool OnActionReadNext(IntPtr data) - { - ActionReadNextEventArgs e = new ActionReadNextEventArgs(); - - // Populate all members of "e" (ActionReadNextEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadNextEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadNextEventHandler(this, e); - } - return false; - } - - - // Callback for AccessibilityManager ActionReadPreviousSignal - private bool OnActionReadPrevious(IntPtr data) - { - ActionReadPreviousEventArgs e = new ActionReadPreviousEventArgs(); - - // Populate all members of "e" (ActionReadPreviousEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadPreviousEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadPreviousEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionUpSignal - private bool OnActionUp(IntPtr data) - { - ActionUpEventArgs e = new ActionUpEventArgs(); - - // Populate all members of "e" (ActionUpEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionUpEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionUpEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionDownSignal - private bool OnActionDown(IntPtr data) - { - ActionDownEventArgs e = new ActionDownEventArgs(); - - // Populate all members of "e" (ActionDownEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionDownEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionDownEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionClearFocusSignal - private bool OnActionClearFocus(IntPtr data) - { - ActionClearFocusEventArgs e = new ActionClearFocusEventArgs(); - - // Populate all members of "e" (ActionClearFocusEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionClearFocusEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionClearFocusEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionBackSignal - private bool OnActionBack(IntPtr data) - { - ActionBackEventArgs e = new ActionBackEventArgs(); - - // Populate all members of "e" (ActionBackEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionBackEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionBackEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionScrollUpSignal - private bool OnActionScrollUp(IntPtr data) - { - ActionScrollUpEventArgs e = new ActionScrollUpEventArgs(); - - // Populate all members of "e" (ActionScrollUpEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionScrollUpEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionScrollUpEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionScrollDownSignal - private bool OnActionScrollDown(IntPtr data) - { - ActionScrollDownEventArgs e = new ActionScrollDownEventArgs(); - - // Populate all members of "e" (ActionScrollDownEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionScrollDownEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionScrollDownEventHandler(this, e); - } - return false; - } - - - // Callback for AccessibilityManager ActionPageLeftSignal - private bool OnActionPageLeft(IntPtr data) - { - ActionPageLeftEventArgs e = new ActionPageLeftEventArgs(); - - // Populate all members of "e" (ActionPageLeftEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionPageLeftEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageLeftEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionPageRightSignal - private bool OnActionPageRight(IntPtr data) - { - ActionPageRightEventArgs e = new ActionPageRightEventArgs(); - - // Populate all members of "e" (ActionPageRightEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionPageRightEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageRightEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionPageUpSignal - private bool OnActionPageUp(IntPtr data) - { - ActionPageUpEventArgs e = new ActionPageUpEventArgs(); - - // Populate all members of "e" (ActionPageUpEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionPageUpEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageUpEventHandler(this, e); - } - return false; - } - - - // Callback for AccessibilityManager ActionPageDownSignal - private bool OnActionPageDown(IntPtr data) - { - ActionPageDownEventArgs e = new ActionPageDownEventArgs(); - - // Populate all members of "e" (ActionPageDownEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionPageDownEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionPageDownEventHandler(this, e); - } - return false; - } - - - // Callback for AccessibilityManager ActionMoveToFirstSignal - private bool OnActionMoveToFirst(IntPtr data) - { - ActionMoveToFirstEventArgs e = new ActionMoveToFirstEventArgs(); - - // Populate all members of "e" (ActionMoveToFirstEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionMoveToFirstEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionMoveToFirstEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionMoveToLastSignal - private bool OnActionMoveToLast(IntPtr data) - { - ActionMoveToLastEventArgs e = new ActionMoveToLastEventArgs(); - - // Populate all members of "e" (ActionMoveToLastEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionMoveToLastEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionMoveToLastEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionReadFromTopSignal - private bool OnActionReadFromTop(IntPtr data) - { - ActionReadFromTopEventArgs e = new ActionReadFromTopEventArgs(); - - // Populate all members of "e" (ActionReadFromTopEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadFromTopEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadFromTopEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionReadFromNextSignal - private bool OnActionReadFromNext(IntPtr data) - { - ActionReadFromNextEventArgs e = new ActionReadFromNextEventArgs(); - - // Populate all members of "e" (ActionReadFromNextEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadFromNextEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadFromNextEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionZoomSignal - private bool OnActionZoom(IntPtr data) - { - ActionZoomEventArgs e = new ActionZoomEventArgs(); - - // Populate all members of "e" (ActionZoomEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionZoomEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionZoomEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionReadIndicatorInformationSignal - private bool OnActionReadIndicatorInformation(IntPtr data) - { - ActionReadIndicatorInformationEventArgs e = new ActionReadIndicatorInformationEventArgs(); - - // Populate all members of "e" (ActionReadIndicatorInformationEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadIndicatorInformationEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionReadPauseResumeSignal - private bool OnActionReadPauseResume(IntPtr data) - { - ActionReadPauseResumeEventArgs e = new ActionReadPauseResumeEventArgs(); - - // Populate all members of "e" (ActionReadPauseResumeEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionReadPauseResumeEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionReadPauseResumeEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager ActionStartStopSignal - private bool OnActionStartStop(IntPtr data) - { - ActionStartStopEventArgs e = new ActionStartStopEventArgs(); - - // Populate all members of "e" (ActionStartStopEventArgs) with real data - e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data); - - if (_accessibilityManagerActionStartStopEventHandler != null) - { - //here we send all data to user event handlers - return _accessibilityManagerActionStartStopEventHandler(this, e); - } - return false; - } - - // Callback for AccessibilityManager FocusChangedSignal - private void OnFocusChanged(IntPtr view1, IntPtr view2) - { - FocusChangedEventArgs e = new FocusChangedEventArgs(); - - // Populate all members of "e" (FocusChangedEventArgs) with real data - e.ViewCurrent = Registry.GetManagedBaseHandleFromNativePtr(view1) as View; - e.ViewNext = Registry.GetManagedBaseHandleFromNativePtr(view2) as View; - - if (_accessibilityManagerFocusChangedEventHandler != null) - { - //here we send all data to user event handlers - _accessibilityManagerFocusChangedEventHandler(this, e); - } - } - - // Callback for AccessibilityManager FocusedViewActivatedSignal - private void OnFocusedViewActivated(IntPtr view) - { - FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs(); - - // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data - e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View; - - if (_accessibilityManagerFocusedViewActivatedEventHandler != null) - { - //here we send all data to user event handlers - _accessibilityManagerFocusedViewActivatedEventHandler(this, e); - } - } - - // Callback for AccessibilityManager FocusOvershotSignal - private void OnFocusOvershot(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction) - { - FocusOvershotEventArgs e = new FocusOvershotEventArgs(); - - // Populate all members of "e" (FocusOvershotEventArgs) with real data - e.CurrentFocusedView = Registry.GetManagedBaseHandleFromNativePtr(currentFocusedView) as View; - e.FocusOvershotDirection = direction; - - if (_accessibilityManagerFocusOvershotEventHandler != null) - { - //here we send all data to user event handlers - _accessibilityManagerFocusOvershotEventHandler(this, e); - } - } - - - public static AccessibilityManager GetAccessibilityManagerFromPtr(global::System.IntPtr cPtr) - { - AccessibilityManager ret = new AccessibilityManager(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public AccessibilityManager() : this(Interop.AccessibilityManage.new_AccessibilityManager(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static AccessibilityManager Get() - { - AccessibilityManager ret = new AccessibilityManager(Interop.AccessibilityManage.AccessibilityManager_Get(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text) - { - Interop.AccessibilityManage.AccessibilityManager_SetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type, text); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type) - { - string ret = Interop.AccessibilityManage.AccessibilityManager_GetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFocusOrder(View view, uint order) - { - Interop.AccessibilityManage.AccessibilityManager_SetFocusOrder(swigCPtr, View.getCPtr(view), order); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public uint GetFocusOrder(View view) - { - uint ret = Interop.AccessibilityManage.AccessibilityManager_GetFocusOrder(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GenerateNewFocusOrder() - { - uint ret = Interop.AccessibilityManage.AccessibilityManager_GenerateNewFocusOrder(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetViewByFocusOrder(uint order) - { - View ret = new View(Interop.AccessibilityManage.AccessibilityManager_GetActorByFocusOrder(swigCPtr, order), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool SetCurrentFocusView(View view) - { - bool ret = Interop.AccessibilityManage.AccessibilityManager_SetCurrentFocusActor(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetCurrentFocusView() - { - View ret = new View(Interop.AccessibilityManage.AccessibilityManager_GetCurrentFocusActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetCurrentFocusGroup() - { - View ret = new View(Interop.AccessibilityManage.AccessibilityManager_GetCurrentFocusGroup(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetCurrentFocusOrder() - { - uint ret = Interop.AccessibilityManage.AccessibilityManager_GetCurrentFocusOrder(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool MoveFocusForward() - { - bool ret = Interop.AccessibilityManage.AccessibilityManager_MoveFocusForward(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool MoveFocusBackward() - { - bool ret = Interop.AccessibilityManage.AccessibilityManager_MoveFocusBackward(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void ClearFocus() - { - Interop.AccessibilityManage.AccessibilityManager_ClearFocus(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public new void Reset() - { - Interop.AccessibilityManage.AccessibilityManager_Reset(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetFocusGroup(View view, bool isFocusGroup) - { - Interop.AccessibilityManage.AccessibilityManager_SetFocusGroup(swigCPtr, View.getCPtr(view), isFocusGroup); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool IsFocusGroup(View view) - { - bool ret = Interop.AccessibilityManage.AccessibilityManager_IsFocusGroup(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetGroupMode(bool enabled) - { - Interop.AccessibilityManage.AccessibilityManager_SetGroupMode(swigCPtr, enabled); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetGroupMode() - { - bool ret = Interop.AccessibilityManage.AccessibilityManager_GetGroupMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetWrapMode(bool wrapped) - { - Interop.AccessibilityManage.AccessibilityManager_SetWrapMode(swigCPtr, wrapped); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetWrapMode() - { - bool ret = Interop.AccessibilityManage.AccessibilityManager_GetWrapMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFocusIndicatorView(View indicator) - { - Interop.AccessibilityManage.AccessibilityManager_SetFocusIndicatorActor(swigCPtr, View.getCPtr(indicator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetFocusIndicatorView() - { - View ret = new View(Interop.AccessibilityManage.AccessibilityManager_GetFocusIndicatorActor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public View GetFocusGroup(View view) - { - View ret = new View(Interop.AccessibilityManage.AccessibilityManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector2 GetReadPosition() - { - Vector2 ret = new Vector2(Interop.AccessibilityManage.AccessibilityManager_GetReadPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public FocusChangedSignal FocusChangedSignal() - { - FocusChangedSignal ret = new FocusChangedSignal(Interop.AccessibilityManage.AccessibilityManager_FocusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityFocusOvershotSignal FocusOvershotSignal() - { - AccessibilityFocusOvershotSignal ret = new AccessibilityFocusOvershotSignal(Interop.AccessibilityManage.AccessibilityManager_FocusOvershotSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ViewSignal FocusedViewActivatedSignal() - { - ViewSignal ret = new ViewSignal(Interop.AccessibilityManage.AccessibilityManager_FocusedActorActivatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal StatusChangedSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_StatusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionNextSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionNextSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPreviousSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionPreviousSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionActivateSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionActivateSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionOverSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionOverSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadNextSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadNextSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadPreviousSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadPreviousSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionUpSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionUpSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionDownSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionDownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionClearFocusSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionClearFocusSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionBackSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionBackSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionScrollUpSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionScrollUpSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionScrollDownSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionScrollDownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageLeftSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionPageLeftSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageRightSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionPageRightSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageUpSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionPageUpSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionPageDownSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionPageDownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionMoveToFirstSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionMoveToFirstSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionMoveToLastSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionMoveToLastSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadFromTopSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadFromTopSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadFromNextSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadFromNextSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionZoomSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionZoomSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadIndicatorInformationSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadIndicatorInformationSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionReadPauseResumeSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionReadPauseResumeSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AccessibilityActionSignal ActionStartStopSignal() - { - AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManage.AccessibilityManager_ActionStartStopSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ActionScrollSignal() - { - SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(Interop.AccessibilityManage.AccessibilityManager_ActionScrollSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// 3 - public enum AccessibilityAttribute - { - ACCESSIBILITY_LABEL = 0, - ACCESSIBILITY_TRAIT, - ACCESSIBILITY_VALUE, - ACCESSIBILITY_HINT, - ACCESSIBILITY_ATTRIBUTE_NUM - } - - /// 3 - public enum FocusOvershotDirection - { - OVERSHOT_PREVIOUS = -1, - OVERSHOT_NEXT = 1 - } - } -} diff --git a/src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs b/src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs deleted file mode 100755 index 802dd76..0000000 --- a/src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs +++ /dev/null @@ -1,1128 +0,0 @@ -/* - * Copyright(c) 2019 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.Runtime.InteropServices; - -namespace Tizen.NUI -{ - internal partial class AccessibilityManager - { - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; - private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; - private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; - private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; - private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; - private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; - private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; - private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; - private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; - private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; - private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; - private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; - private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; - private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; - private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; - private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; - private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; - private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; - private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; - private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; - private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; - private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; - private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; - private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadIndicatorInformationEventHandler; - private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; - private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _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 DaliEventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; - private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; - */ - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2); - private DaliEventHandler _accessibilityManagerFocusChangedEventHandler; - private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view); - private DaliEventHandler _accessibilityManagerFocusedViewActivatedEventHandler; - private FocusedViewActivatedEventCallbackDelegate _accessibilityManagerFocusedViewActivatedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction); - private DaliEventHandler _accessibilityManagerFocusOvershotEventHandler; - private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate; - - public event DaliEventHandlerWithReturnType StatusChanged - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerStatusChangedEventHandler == null) - { - _accessibilityManagerStatusChangedEventHandler += value; - - _accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged); - this.StatusChangedSignal().Connect(_accessibilityManagerStatusChangedEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerStatusChangedEventHandler != null) - { - this.StatusChangedSignal().Disconnect(_accessibilityManagerStatusChangedEventCallbackDelegate); - } - - _accessibilityManagerStatusChangedEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionNext - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionNextEventHandler == null) - { - _accessibilityManagerActionNextEventHandler += value; - - _accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext); - this.ActionNextSignal().Connect(_accessibilityManagerActionNextEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionNextEventHandler != null) - { - this.ActionNextSignal().Disconnect(_accessibilityManagerActionNextEventCallbackDelegate); - } - - _accessibilityManagerActionNextEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionPrevious - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionPreviousEventHandler == null) - { - _accessibilityManagerActionPreviousEventHandler += value; - - _accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious); - this.ActionPreviousSignal().Connect(_accessibilityManagerActionPreviousEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionPreviousEventHandler != null) - { - this.ActionPreviousSignal().Disconnect(_accessibilityManagerActionPreviousEventCallbackDelegate); - } - - _accessibilityManagerActionPreviousEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionActivate - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionActivateEventHandler == null) - { - _accessibilityManagerActionActivateEventHandler += value; - - _accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate); - this.ActionActivateSignal().Connect(_accessibilityManagerActionActivateEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionActivateEventHandler != null) - { - this.ActionActivateSignal().Disconnect(_accessibilityManagerActionActivateEventCallbackDelegate); - } - - _accessibilityManagerActionActivateEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionRead - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadEventHandler == null) - { - _accessibilityManagerActionReadEventHandler += value; - - _accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead); - this.ActionReadSignal().Connect(_accessibilityManagerActionReadEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadEventHandler != null) - { - this.ActionReadSignal().Disconnect(_accessibilityManagerActionReadEventCallbackDelegate); - } - - _accessibilityManagerActionReadEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionOver - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionOverEventHandler == null) - { - _accessibilityManagerActionOverEventHandler += value; - - _accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver); - this.ActionOverSignal().Connect(_accessibilityManagerActionOverEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionOverEventHandler != null) - { - this.ActionOverSignal().Disconnect(_accessibilityManagerActionOverEventCallbackDelegate); - } - - _accessibilityManagerActionOverEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionReadNext - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadNextEventHandler == null) - { - _accessibilityManagerActionReadNextEventHandler += value; - - _accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext); - this.ActionReadNextSignal().Connect(_accessibilityManagerActionReadNextEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadNextEventHandler != null) - { - this.ActionReadNextSignal().Disconnect(_accessibilityManagerActionReadNextEventCallbackDelegate); - } - - _accessibilityManagerActionReadNextEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionReadPrevious - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadPreviousEventHandler == null) - { - _accessibilityManagerActionReadPreviousEventHandler += value; - - _accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious); - this.ActionReadPreviousSignal().Connect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadPreviousEventHandler != null) - { - this.ActionReadPreviousSignal().Disconnect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); - } - - _accessibilityManagerActionReadPreviousEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionUp - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionUpEventHandler == null) - { - _accessibilityManagerActionUpEventHandler += value; - - _accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp); - this.ActionUpSignal().Connect(_accessibilityManagerActionUpEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionUpEventHandler != null) - { - this.ActionUpSignal().Disconnect(_accessibilityManagerActionUpEventCallbackDelegate); - } - - _accessibilityManagerActionUpEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionDown - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionDownEventHandler == null) - { - _accessibilityManagerActionDownEventHandler += value; - - _accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown); - this.ActionDownSignal().Connect(_accessibilityManagerActionDownEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionDownEventHandler != null) - { - this.ActionDownSignal().Disconnect(_accessibilityManagerActionDownEventCallbackDelegate); - } - - _accessibilityManagerActionDownEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionClearFocus - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionClearFocusEventHandler == null) - { - _accessibilityManagerActionClearFocusEventHandler += value; - - _accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus); - this.ActionClearFocusSignal().Connect(_accessibilityManagerActionClearFocusEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionClearFocusEventHandler != null) - { - this.ActionClearFocusSignal().Disconnect(_accessibilityManagerActionClearFocusEventCallbackDelegate); - } - - _accessibilityManagerActionClearFocusEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionBack - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionBackEventHandler == null) - { - _accessibilityManagerActionBackEventHandler += value; - - _accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack); - this.ActionBackSignal().Connect(_accessibilityManagerActionBackEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionBackEventHandler != null) - { - this.ActionBackSignal().Disconnect(_accessibilityManagerActionBackEventCallbackDelegate); - } - - _accessibilityManagerActionBackEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionScrollUp - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionScrollUpEventHandler == null) - { - _accessibilityManagerActionScrollUpEventHandler += value; - - _accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp); - this.ActionScrollUpSignal().Connect(_accessibilityManagerActionScrollUpEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionScrollUpEventHandler != null) - { - this.ActionScrollUpSignal().Disconnect(_accessibilityManagerActionScrollUpEventCallbackDelegate); - } - - _accessibilityManagerActionScrollUpEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionScrollDown - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionScrollDownEventHandler == null) - { - _accessibilityManagerActionScrollDownEventHandler += value; - - _accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown); - this.ActionScrollDownSignal().Connect(_accessibilityManagerActionScrollDownEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionScrollDownEventHandler != null) - { - this.ActionScrollDownSignal().Disconnect(_accessibilityManagerActionScrollDownEventCallbackDelegate); - } - - _accessibilityManagerActionScrollDownEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionPageLeft - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionPageLeftEventHandler == null) - { - _accessibilityManagerActionPageLeftEventHandler += value; - - _accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft); - this.ActionPageLeftSignal().Connect(_accessibilityManagerActionPageLeftEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionPageLeftEventHandler != null) - { - this.ActionPageLeftSignal().Disconnect(_accessibilityManagerActionPageLeftEventCallbackDelegate); - } - - _accessibilityManagerActionPageLeftEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionPageRight - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionPageRightEventHandler == null) - { - _accessibilityManagerActionPageRightEventHandler += value; - - _accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight); - this.ActionPageRightSignal().Connect(_accessibilityManagerActionPageRightEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionPageRightEventHandler != null) - { - this.ActionPageRightSignal().Disconnect(_accessibilityManagerActionPageRightEventCallbackDelegate); - } - - _accessibilityManagerActionPageRightEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionPageUp - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionPageUpEventHandler == null) - { - _accessibilityManagerActionPageUpEventHandler += value; - - _accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp); - this.ActionPageUpSignal().Connect(_accessibilityManagerActionPageUpEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionPageUpEventHandler != null) - { - this.ActionPageUpSignal().Disconnect(_accessibilityManagerActionPageUpEventCallbackDelegate); - } - - _accessibilityManagerActionPageUpEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionPageDown - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionPageDownEventHandler == null) - { - _accessibilityManagerActionPageDownEventHandler += value; - - _accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown); - this.ActionPageDownSignal().Connect(_accessibilityManagerActionPageDownEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionPageDownEventHandler != null) - { - this.ActionPageDownSignal().Disconnect(_accessibilityManagerActionPageDownEventCallbackDelegate); - } - - _accessibilityManagerActionPageDownEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionMoveToFirst - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionMoveToFirstEventHandler == null) - { - _accessibilityManagerActionMoveToFirstEventHandler += value; - - _accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst); - this.ActionMoveToFirstSignal().Connect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionMoveToFirstEventHandler != null) - { - this.ActionMoveToFirstSignal().Disconnect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); - } - - _accessibilityManagerActionMoveToFirstEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionMoveToLast - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionMoveToLastEventHandler == null) - { - _accessibilityManagerActionMoveToLastEventHandler += value; - - _accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast); - this.ActionMoveToLastSignal().Connect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionMoveToLastEventHandler != null) - { - this.ActionMoveToLastSignal().Disconnect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); - } - - _accessibilityManagerActionMoveToLastEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionReadFromTop - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadFromTopEventHandler == null) - { - _accessibilityManagerActionReadFromTopEventHandler += value; - - _accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop); - this.ActionReadFromTopSignal().Connect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadFromTopEventHandler != null) - { - this.ActionReadFromTopSignal().Disconnect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); - } - - _accessibilityManagerActionReadFromTopEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionReadFromNext - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadFromNextEventHandler == null) - { - _accessibilityManagerActionReadFromNextEventHandler += value; - - _accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext); - this.ActionReadFromNextSignal().Connect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadFromNextEventHandler != null) - { - this.ActionReadFromNextSignal().Disconnect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); - } - - _accessibilityManagerActionReadFromNextEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionZoom - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionZoomEventHandler == null) - { - _accessibilityManagerActionZoomEventHandler += value; - - _accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom); - this.ActionZoomSignal().Connect(_accessibilityManagerActionZoomEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionZoomEventHandler != null) - { - this.ActionZoomSignal().Disconnect(_accessibilityManagerActionZoomEventCallbackDelegate); - } - - _accessibilityManagerActionZoomEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionReadIndicatorInformation - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadIndicatorInformationEventHandler == null) - { - _accessibilityManagerActionReadIndicatorInformationEventHandler += value; - - _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate = new ActionReadIndicatorInformationEventCallbackDelegate(OnActionReadIndicatorInformation); - this.ActionReadIndicatorInformationSignal().Connect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null) - { - this.ActionReadIndicatorInformationSignal().Disconnect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate); - } - - _accessibilityManagerActionReadIndicatorInformationEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionReadPauseResume - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionReadPauseResumeEventHandler == null) - { - _accessibilityManagerActionReadPauseResumeEventHandler += value; - - _accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume); - this.ActionReadPauseResumeSignal().Connect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionReadPauseResumeEventHandler != null) - { - this.ActionReadPauseResumeSignal().Disconnect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); - } - - _accessibilityManagerActionReadPauseResumeEventHandler -= value; - } - } - } - - public event DaliEventHandlerWithReturnType ActionStartStop - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerActionStartStopEventHandler == null) - { - _accessibilityManagerActionStartStopEventHandler += value; - - _accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop); - this.ActionStartStopSignal().Connect(_accessibilityManagerActionStartStopEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerActionStartStopEventHandler != null) - { - this.ActionStartStopSignal().Disconnect(_accessibilityManagerActionStartStopEventCallbackDelegate); - } - - _accessibilityManagerActionStartStopEventHandler -= value; - } - } - } - - /* - // 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; - } - */ - - public event DaliEventHandler FocusChanged - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerFocusChangedEventHandler == null) - { - _accessibilityManagerFocusChangedEventHandler += value; - - _accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged); - this.FocusChangedSignal().Connect(_accessibilityManagerFocusChangedEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerFocusChangedEventHandler != null) - { - this.FocusChangedSignal().Disconnect(_accessibilityManagerFocusChangedEventCallbackDelegate); - } - - _accessibilityManagerFocusChangedEventHandler -= value; - } - } - } - - public event DaliEventHandler FocusedViewActivated - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerFocusedViewActivatedEventHandler == null) - { - _accessibilityManagerFocusedViewActivatedEventHandler += value; - - _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); - this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerFocusedViewActivatedEventHandler != null) - { - this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); - } - - _accessibilityManagerFocusedViewActivatedEventHandler -= value; - } - } - } - - public event DaliEventHandler FocusOvershot - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerFocusOvershotEventHandler == null) - { - _accessibilityManagerFocusOvershotEventHandler += value; - - _accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot); - this.FocusOvershotSignal().Connect(_accessibilityManagerFocusOvershotEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerFocusOvershotEventHandler != null) - { - this.FocusOvershotSignal().Disconnect(_accessibilityManagerFocusOvershotEventCallbackDelegate); - } - - _accessibilityManagerFocusOvershotEventHandler -= value; - } - } - } - } -} diff --git a/src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs b/src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs deleted file mode 100755 index 28cf77e..0000000 --- a/src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs +++ /dev/null @@ -1,754 +0,0 @@ -/* - * Copyright(c) 2019 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 Tizen.NUI.BaseComponents; - -namespace Tizen.NUI -{ - internal partial class AccessibilityManager - { - /** - * @brief Event arguments that passed via StatusChanged signal - * - */ - /// 3 - public class StatusChangedEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionNext signal - * - */ - /// 3 - public class ActionNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPrevious signal - * - */ - /// 3 - public class ActionPreviousEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionActivate signal - * - */ - /// 3 - public class ActionActivateEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionRead signal - * - */ - /// 3 - public class ActionReadEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionOver signal - * - */ - /// 3 - public class ActionOverEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadNext signal - * - */ - /// 3 - public class ActionReadNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadPrevious signal - * - */ - /// 3 - public class ActionReadPreviousEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionUp signal - * - */ - /// 3 - public class ActionUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionDown signal - * - */ - /// 3 - public class ActionDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionClearFocus signal - * - */ - /// 3 - public class ActionClearFocusEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionBack signal - * - */ - /// 3 - public class ActionBackEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionScrollUp signal - * - */ - /// 3 - public class ActionScrollUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionScrollDown signal - * - */ - /// 3 - public class ActionScrollDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageLeft signal - * - */ - /// 3 - public class ActionPageLeftEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageRight signal - * - */ - /// 3 - public class ActionPageRightEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageUp signal - * - */ - /// 3 - public class ActionPageUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageDown signal - * - */ - /// 3 - public class ActionPageDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionMoveToFirst signal - * - */ - /// 3 - public class ActionMoveToFirstEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionMoveToLast signal - * - */ - /// 3 - public class ActionMoveToLastEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadFromTop signal - * - */ - /// 3 - public class ActionReadFromTopEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadFromNext signal - * - */ - /// 3 - public class ActionReadFromNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionZoom signal - * - */ - /// 3 - public class ActionZoomEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadIndicatorInformation signal - * - */ - /// 3 - public class ActionReadIndicatorInformationEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadPauseResume signal - * - */ - /// 3 - public class ActionReadPauseResumeEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionStartStop signal - * - */ - /// 3 - public class ActionStartStopEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /* - // To be replaced by a new event that takes Touch - public class ActionScrollEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - private TouchEvent _touchEvent; - - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - - public TouchEvent TouchEvent - { - get - { - return _touchEvent; - } - set - { - _touchEvent = value; - } - } - } - */ - - /** - * @brief Event arguments that passed via ActionPageUp signal - * - */ - /// 3 - public class FocusChangedEventArgs : EventArgs - { - private View _viewCurrent; - private View _viewNext; - - /// 3 - public View ViewCurrent - { - get - { - return _viewCurrent; - } - set - { - _viewCurrent = value; - } - } - - /// 3 - public View ViewNext - { - get - { - return _viewNext; - } - set - { - _viewNext = value; - } - } - } - - /** - * @brief Event arguments that passed via FocusedViewActivated signal - * - */ - /// 3 - public class FocusedViewActivatedEventArgs : EventArgs - { - private View _view; - - - /// 3 - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } - - /** - * @brief Event arguments that passed via FocusOvershot signal - * - */ - /// 3 - public class FocusOvershotEventArgs : EventArgs - { - private View _currentFocusedView; - private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection; - - /// 3 - public View CurrentFocusedView - { - get - { - return _currentFocusedView; - } - set - { - _currentFocusedView = value; - } - } - - /// 3 - public AccessibilityManager.FocusOvershotDirection FocusOvershotDirection - { - get - { - return _focusOvershotDirection; - } - set - { - _focusOvershotDirection = value; - } - } - } - } -} diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.AccessibilityManager.cs b/src/Tizen.NUI/src/internal/Interop/Interop.AccessibilityManager.cs index 63f648b..409f728 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.AccessibilityManager.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.AccessibilityManager.cs @@ -6,7 +6,7 @@ namespace Tizen.NUI { internal static partial class Interop { - internal static partial class AccessibilityManage + internal static partial class AccessibilityManager { [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_AccessibilityManager")] public static extern global::System.IntPtr new_AccessibilityManager(); @@ -167,9 +167,6 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AccessibilityManager_ActionZoomSignal")] public static extern global::System.IntPtr AccessibilityManager_ActionZoomSignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AccessibilityManager_ActionReadIndicatorInformationSignal")] - public static extern global::System.IntPtr AccessibilityManager_ActionReadIndicatorInformationSignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_AccessibilityManager_ActionReadPauseResumeSignal")] public static extern global::System.IntPtr AccessibilityManager_ActionReadPauseResumeSignal(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/public/Accessibility.cs b/src/Tizen.NUI/src/public/Accessibility/Accessibility.cs similarity index 99% rename from src/Tizen.NUI/src/public/Accessibility.cs rename to src/Tizen.NUI/src/public/Accessibility/Accessibility.cs index ec68539..4643d16 100755 --- a/src/Tizen.NUI/src/public/Accessibility.cs +++ b/src/Tizen.NUI/src/public/Accessibility/Accessibility.cs @@ -23,7 +23,7 @@ using Tizen.NUI.BaseComponents; using tlog = Tizen.Log; #endif -namespace Tizen.NUI +namespace Tizen.NUI.Accessibility { /// /// Accessibility provides Dali-ATSPI interface which has funtionality of Screen-Reader and general accessibility diff --git a/src/Tizen.NUI/src/public/Accessibility/AccessibilityManager.cs b/src/Tizen.NUI/src/public/Accessibility/AccessibilityManager.cs new file mode 100755 index 0000000..1d1fc14 --- /dev/null +++ b/src/Tizen.NUI/src/public/Accessibility/AccessibilityManager.cs @@ -0,0 +1,1046 @@ +/* + * Copyright(c) 2020 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 Tizen.NUI.BaseComponents; + +namespace Tizen.NUI.Accessibility +{ + /// + /// AccessibilityManager manages registration of views in an accessibility focus chain and changing the focused view within that chain. + /// This class provides the functionality of registering the focus order and description of views and maintaining the focus chain. + /// It provides functionality of setting the focus and moving the focus forward and backward. + /// It also draws a highlight for the focused view and emits a signal when the focus is changed. + /// + /// 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 partial class AccessibilityManager : BaseHandle + { + private static readonly AccessibilityManager instance = AccessibilityManager.Get(); + + internal AccessibilityManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.AccessibilityManager.AccessibilityManager_SWIGUpcast(cPtr), cMemoryOwn) + { + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityManager obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + /// This will not be public opened. + [EditorBrowsable(EditorBrowsableState.Never)] + protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) + { + Interop.AccessibilityManager.delete_AccessibilityManager(swigCPtr); + } + + // Callback for AccessibilityManager StatusChangedSignal + private bool OnStatusChanged(IntPtr data) + { + if (_accessibilityManagerStatusChangedEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerStatusChangedEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionNextSignal + private bool OnActionNext(IntPtr data) + { + if (_accessibilityManagerActionNextEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionNextEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionPreviousSignal + private bool OnActionPrevious(IntPtr data) + { + if (_accessibilityManagerActionPreviousEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPreviousEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionActivateSignal + private bool OnActionActivate(IntPtr data) + { + if (_accessibilityManagerActionActivateEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionActivateEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionReadSignal + private bool OnActionRead(IntPtr data) + { + + if (_accessibilityManagerActionReadEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionOverSignal + private bool OnActionOver(IntPtr data) + { + if (_accessibilityManagerActionOverEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionOverEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionReadNextSignal + private bool OnActionReadNext(IntPtr data) + { + if (_accessibilityManagerActionReadNextEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadNextEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionReadPreviousSignal + private bool OnActionReadPrevious(IntPtr data) + { + if (_accessibilityManagerActionReadPreviousEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadPreviousEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionUpSignal + private bool OnActionUp(IntPtr data) + { + if (_accessibilityManagerActionUpEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionUpEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionDownSignal + private bool OnActionDown(IntPtr data) + { + if (_accessibilityManagerActionDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionDownEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionClearFocusSignal + private bool OnActionClearFocus(IntPtr data) + { + if (_accessibilityManagerActionClearFocusEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionClearFocusEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionBackSignal + private bool OnActionBack(IntPtr data) + { + if (_accessibilityManagerActionBackEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionBackEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionScrollUpSignal + private bool OnActionScrollUp(IntPtr data) + { + if (_accessibilityManagerActionScrollUpEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionScrollUpEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionScrollDownSignal + private bool OnActionScrollDown(IntPtr data) + { + if (_accessibilityManagerActionScrollDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionScrollDownEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionPageLeftSignal + private bool OnActionPageLeft(IntPtr data) + { + if (_accessibilityManagerActionPageLeftEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageLeftEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionPageRightSignal + private bool OnActionPageRight(IntPtr data) + { + if (_accessibilityManagerActionPageRightEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageRightEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionPageUpSignal + private bool OnActionPageUp(IntPtr data) + { + if (_accessibilityManagerActionPageUpEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageUpEventHandler(instance, null); + } + return false; + } + + + // Callback for AccessibilityManager ActionPageDownSignal + private bool OnActionPageDown(IntPtr data) + { + if (_accessibilityManagerActionPageDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionPageDownEventHandler(instance, null); + } + return false; + } + + + // Callback for AccessibilityManager ActionMoveToFirstSignal + private bool OnActionMoveToFirst(IntPtr data) + { + if (_accessibilityManagerActionMoveToFirstEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionMoveToFirstEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionMoveToLastSignal + private bool OnActionMoveToLast(IntPtr data) + { + if (_accessibilityManagerActionMoveToLastEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionMoveToLastEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionReadFromTopSignal + private bool OnActionReadFromTop(IntPtr data) + { + if (_accessibilityManagerActionReadFromTopEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadFromTopEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionReadFromNextSignal + private bool OnActionReadFromNext(IntPtr data) + { + if (_accessibilityManagerActionReadFromNextEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadFromNextEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionZoomSignal + private bool OnActionZoom(IntPtr data) + { + if (_accessibilityManagerActionZoomEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionZoomEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionReadPauseResumeSignal + private bool OnActionReadPauseResume(IntPtr data) + { + if (_accessibilityManagerActionReadPauseResumeEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionReadPauseResumeEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager ActionStartStopSignal + private bool OnActionStartStop(IntPtr data) + { + if (_accessibilityManagerActionStartStopEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionStartStopEventHandler(instance, null); + } + return false; + } + + // Callback for AccessibilityManager FocusChangedSignal + private void OnFocusChanged(IntPtr view1, IntPtr view2) + { + FocusChangedEventArgs e = new FocusChangedEventArgs(); + + // Populate all members of "e" (FocusChangedEventArgs) with real data + e.ViewCurrent = Registry.GetManagedBaseHandleFromNativePtr(view1) as View; + e.ViewNext = Registry.GetManagedBaseHandleFromNativePtr(view2) as View; + + if (_accessibilityManagerFocusChangedEventHandler != null) + { + //here we send all data to user event handlers + _accessibilityManagerFocusChangedEventHandler(this, e); + } + } + + // Callback for AccessibilityManager FocusedViewActivatedSignal + private void OnFocusedViewActivated(IntPtr view) + { + FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs(); + + // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data + e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View; + + if (_accessibilityManagerFocusedViewActivatedEventHandler != null) + { + //here we send all data to user event handlers + _accessibilityManagerFocusedViewActivatedEventHandler(this, e); + } + } + + // Callback for AccessibilityManager FocusOvershotSignal + private void OnFocusOvershot(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction) + { + FocusOvershotEventArgs e = new FocusOvershotEventArgs(); + + // Populate all members of "e" (FocusOvershotEventArgs) with real data + e.CurrentFocusedView = Registry.GetManagedBaseHandleFromNativePtr(currentFocusedView) as View; + e.FocusOvershotDirection = direction; + + if (_accessibilityManagerFocusOvershotEventHandler != null) + { + //here we send all data to user event handlers + _accessibilityManagerFocusOvershotEventHandler(this, e); + } + } + + /// + /// Enumeration for accessibility that needs four information which will be read by screen-reader. + /// + /// Reading order : Label -> Trait -> Optional (Value and Hint) + /// + /// 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 enum AccessibilityAttribute + { + /// + /// Simple text which contained in components, such as Ok or Cancel in case of a button + /// + /// 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)] + Label = 0, + /// + /// Description of components trait, such as Button in case of a button + /// + /// 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)] + Trait, + /// + /// Current value of components (Optional) + /// + /// 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)] + Value, + /// + /// Hint for action (Optional) + /// + /// 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)] + Hint, + /// + /// The number of attributes + /// + /// 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)] + AttributeNumber + } + + /// + /// Enumeration for overshoot direction. + /// + /// 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 enum FocusOvershotDirection + { + /// + /// Try to move previous of the first view + /// + /// 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)] + Previous = -1, + /// + /// Try to move next of the last view + /// + /// 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)] + Next = 1 + } + + + /// + /// Creates an AccessibilityManager handle. + /// + /// 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 AccessibilityManager() : this(Interop.AccessibilityManager.new_AccessibilityManager(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets the singleton of AccessibilityManager object. + /// + /// A handle to the AccessibilityManager + /// 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 static AccessibilityManager Instance + { + get + { + return instance; + } + } + + /// + /// Sets the information of the specified view's accessibility attribute. + /// + /// The view to be set with + /// The attribute type the text to be set with + /// The text for the view's accessibility information + /// 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 void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text) + { + Interop.AccessibilityManager.AccessibilityManager_SetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type, text); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets the text of the specified view's accessibility attribute. + /// + /// The view to be queried + /// The attribute type to be queried + /// The text of the view's accessibility information + /// 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 string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type) + { + string ret = Interop.AccessibilityManager.AccessibilityManager_GetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets the focus order of the view. + /// The focus order of each view in the focus chain is unique. + /// If there is another view assigned with the same focus order already, the new view will be inserted to the focus chain with that focus order, + /// and the focus order of the original view and all the views followed in the focus chain will be increased accordingly. + /// If the focus order assigned to the view is 0, it means that view's focus order is undefined + /// (e.g. the view has a description but with no focus order being set yet) and therefore that view is not focusable. + /// + /// the view to be set with + /// the focus order to be set with + /// 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 void SetFocusOrder(View view, uint order) + { + Interop.AccessibilityManager.AccessibilityManager_SetFocusOrder(swigCPtr, View.getCPtr(view), order); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets the focus order of the view. + /// When the focus order is 0, it means the focus order of the view is undefined. + /// + /// the view to be set with + /// The focus order of the view + /// 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 uint GetFocusOrder(View view) + { + uint ret = Interop.AccessibilityManager.AccessibilityManager_GetFocusOrder(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Generates a new focus order number which can be used to assign to views + /// which need to be appended to the end of the current focus order chain. + /// The new number will be an increment over the very last focus order number in the focus chain. + /// If the focus chain is empty then the function returns 1, + /// else the number returned will be FOLast + 1 where FOLast is the focus order of the very last control in the focus chain. + /// + /// The focus order of the view + /// 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 uint GenerateNewFocusOrder() + { + uint ret = Interop.AccessibilityManager.AccessibilityManager_GenerateNewFocusOrder(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the view that has the specified focus order. + /// It will return an empty handle if no view in the window has the specified focus order. + /// + /// The focus order of the view + /// The view that has the specified focus order or an empty handle if no view in the stage has the specified focus order + /// 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 View GetViewByFocusOrder(uint order) + { + View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetActorByFocusOrder(swigCPtr, order), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Moves the focus to the specified view. + /// Only one view can be focused at the same time. The view must have a defined focus order + /// and must be focusable, visible and in the window. + /// + /// the view to be set with + /// Whether the focus is successful or not + /// 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 bool SetCurrentFocusView(View view) + { + bool ret = Interop.AccessibilityManager.AccessibilityManager_SetCurrentFocusActor(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the current focused view. + /// + /// A handle to the current focused view or an empty handle if no view is focused + /// 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 View GetCurrentFocusView() + { + View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the focus group of current focused view. + /// + /// A handle to the immediate parent of the current focused view which is also a focus group, or an empty handle if no view is focused + /// 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 View GetCurrentFocusGroup() + { + View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusGroup(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the focus order of currently focused view. + /// + /// The focus order of the currently focused view or 0 if no view is in focus + /// 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 uint GetCurrentFocusOrder() + { + uint ret = Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusOrder(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Moves the focus to the next focusable view in the focus chain (according to the focus traversal order). + /// When the focus movement is wrapped around, the focus will be moved to the first focusable view when it reaches the end of the focus chain. + /// + /// True if the moving was successful + /// 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 bool MoveFocusForward() + { + bool ret = Interop.AccessibilityManager.AccessibilityManager_MoveFocusForward(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Moves the focus to the previous focusable view in the focus chain (according to the focus traversal order). + /// When the focus movement is wrapped around, the focus will be moved to the last focusable view + /// when it reaches the beginning of the focus chain. + /// + /// True if the moving was successful + /// 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 bool MoveFocusBackward() + { + bool ret = Interop.AccessibilityManager.AccessibilityManager_MoveFocusBackward(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Clears the focus from the current focused view if any, so that no view is focused in the focus chain. + /// It will emit focus changed signal without current focused view. + /// + /// 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 void ClearFocus() + { + Interop.AccessibilityManager.AccessibilityManager_ClearFocus(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Clears every registered focusable view from focus-manager. + /// + /// 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 new void Reset() + { + Interop.AccessibilityManager.AccessibilityManager_Reset(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Sets whether an view is a focus group that can limit the scope of focus movement to its child views in the focus chain. + /// + /// the view to be set as a focus group + /// Whether to set the view to be a focus group or not + /// 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 void SetFocusGroup(View view, bool isFocusGroup) + { + Interop.AccessibilityManager.AccessibilityManager_SetFocusGroup(swigCPtr, View.getCPtr(view), isFocusGroup); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Checks whether the view is set as a focus group or not. + /// + /// the view to be checked + /// Whether the view is set as a focus group + /// 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 bool IsFocusGroup(View view) + { + bool ret = Interop.AccessibilityManager.AccessibilityManager_IsFocusGroup(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets whether the group mode is enabled or not. + /// When the group mode is enabled, the focus movement will be limited to the child views of the current focus group including the current focus group itself. + /// The current focus group is the closest ancestor of the current focused view that is set as a focus group. + /// + /// Whether the group mode is enabled or not + /// 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 void SetGroupMode(bool enabled) + { + Interop.AccessibilityManager.AccessibilityManager_SetGroupMode(swigCPtr, enabled); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets whether the group mode is enabled or not. + /// + /// 6 + /// Whether the group mode is enabled or not. + /// 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 bool GetGroupMode() + { + bool ret = Interop.AccessibilityManager.AccessibilityManager_GetGroupMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets whether focus will be moved to the beginning of the focus chain when it reaches the end or vice versa. + /// When both the wrap mode and the group mode are enabled, focus will be wrapped within the current focus group. + /// Focus will not be wrapped in default. + /// + /// Whether the focus movement is wrapped around or not + /// 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 void SetWrapMode(bool wrapped) + { + Interop.AccessibilityManager.AccessibilityManager_SetWrapMode(swigCPtr, wrapped); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets whether the wrap mode is enabled or not. + /// + /// Whether the wrap mode is enabled or not. + /// 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 bool GetWrapMode() + { + bool ret = Interop.AccessibilityManager.AccessibilityManager_GetWrapMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets the focus indicator view. + /// This will replace the default focus indicator view in AccessibilityManager and + /// will be added to the focused view as a highlight. + /// + /// The indicator view to be added + /// 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 void SetFocusIndicatorView(View indicator) + { + Interop.AccessibilityManager.AccessibilityManager_SetFocusIndicatorActor(swigCPtr, View.getCPtr(indicator)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets the focus indicator view. + /// + /// A handle to the focus indicator view + /// 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 View GetFocusIndicatorView() + { + View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetFocusIndicatorActor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Returns the closest ancestor of the given view that is a focus group. + /// + /// The view to be checked for its focus group + /// The focus group the given view belongs to or an empty handle if the given view doesn't belong to any focus group + /// 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 View GetFocusGroup(View view) + { + View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Returns the current position of the read action. + /// + /// The current event position + /// 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 Vector2 GetReadPosition() + { + Vector2 ret = new Vector2(Interop.AccessibilityManager.AccessibilityManager_GetReadPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal static AccessibilityManager Get() + { + AccessibilityManager ret = new AccessibilityManager(Interop.AccessibilityManager.AccessibilityManager_Get(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + // Signals - AccessibilityManagerEvent.cs + internal FocusChangedSignal FocusChangedSignal() + { + FocusChangedSignal ret = new FocusChangedSignal(Interop.AccessibilityManager.AccessibilityManager_FocusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityFocusOvershotSignal FocusOvershotSignal() + { + AccessibilityFocusOvershotSignal ret = new AccessibilityFocusOvershotSignal(Interop.AccessibilityManager.AccessibilityManager_FocusOvershotSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ViewSignal FocusedViewActivatedSignal() + { + ViewSignal ret = new ViewSignal(Interop.AccessibilityManager.AccessibilityManager_FocusedActorActivatedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal StatusChangedSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_StatusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionNextSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionNextSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionPreviousSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPreviousSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionActivateSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionActivateSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionReadSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionOverSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionOverSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionReadNextSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadNextSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionReadPreviousSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadPreviousSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionUpSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionUpSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionDownSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionDownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionClearFocusSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionClearFocusSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionBackSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionBackSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionScrollUpSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionScrollUpSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionScrollDownSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionScrollDownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionPageLeftSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageLeftSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionPageRightSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageRightSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionPageUpSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageUpSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionPageDownSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageDownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionMoveToFirstSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionMoveToFirstSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionMoveToLastSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionMoveToLastSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionReadFromTopSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadFromTopSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionReadFromNextSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadFromNextSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionZoomSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionZoomSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionReadPauseResumeSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadPauseResumeSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal AccessibilityActionSignal ActionStartStopSignal() + { + AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionStartStopSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ActionScrollSignal() + { + SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(Interop.AccessibilityManager.AccessibilityManager_ActionScrollSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } +} diff --git a/src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEvent.cs b/src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEvent.cs new file mode 100755 index 0000000..a72a45b --- /dev/null +++ b/src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEvent.cs @@ -0,0 +1,1136 @@ +/* + * Copyright(c) 2020 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 EventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; + private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; + private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; + private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; + private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; + private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; + private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; + private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; + private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; + private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; + private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; + private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; + private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; + private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; + private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; + private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; + private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; + private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; + private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; + private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; + private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; + private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; + private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; + private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; + private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); + private EventHandlerWithReturnType _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 EventHandlerWithReturnType StatusChanged + { + add + { + // Restricted to only one listener + if (_accessibilityManagerStatusChangedEventHandler == null) + { + _accessibilityManagerStatusChangedEventHandler += value; + + _accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged); + this.StatusChangedSignal().Connect(_accessibilityManagerStatusChangedEventCallbackDelegate); + } + } + + remove + { + + if (_accessibilityManagerStatusChangedEventHandler != null) + { + this.StatusChangedSignal().Disconnect(_accessibilityManagerStatusChangedEventCallbackDelegate); + } + + _accessibilityManagerStatusChangedEventHandler -= value; + + } + } + + /// + /// 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 EventHandlerWithReturnType ActionNext + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionNextEventHandler == null) + { + _accessibilityManagerActionNextEventHandler += value; + + _accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext); + this.ActionNextSignal().Connect(_accessibilityManagerActionNextEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionNextEventHandler != null) + { + this.ActionNextSignal().Disconnect(_accessibilityManagerActionNextEventCallbackDelegate); + } + + _accessibilityManagerActionNextEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionPrevious + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionPreviousEventHandler == null) + { + _accessibilityManagerActionPreviousEventHandler += value; + + _accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious); + this.ActionPreviousSignal().Connect(_accessibilityManagerActionPreviousEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionPreviousEventHandler != null) + { + this.ActionPreviousSignal().Disconnect(_accessibilityManagerActionPreviousEventCallbackDelegate); + } + + _accessibilityManagerActionPreviousEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionActivate + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionActivateEventHandler == null) + { + _accessibilityManagerActionActivateEventHandler += value; + + _accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate); + this.ActionActivateSignal().Connect(_accessibilityManagerActionActivateEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionActivateEventHandler != null) + { + this.ActionActivateSignal().Disconnect(_accessibilityManagerActionActivateEventCallbackDelegate); + } + + _accessibilityManagerActionActivateEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionRead + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionReadEventHandler == null) + { + _accessibilityManagerActionReadEventHandler += value; + + _accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead); + this.ActionReadSignal().Connect(_accessibilityManagerActionReadEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionReadEventHandler != null) + { + this.ActionReadSignal().Disconnect(_accessibilityManagerActionReadEventCallbackDelegate); + } + + _accessibilityManagerActionReadEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionOver + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionOverEventHandler == null) + { + _accessibilityManagerActionOverEventHandler += value; + + _accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver); + this.ActionOverSignal().Connect(_accessibilityManagerActionOverEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionOverEventHandler != null) + { + this.ActionOverSignal().Disconnect(_accessibilityManagerActionOverEventCallbackDelegate); + } + + _accessibilityManagerActionOverEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionReadNext + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionReadNextEventHandler == null) + { + _accessibilityManagerActionReadNextEventHandler += value; + + _accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext); + this.ActionReadNextSignal().Connect(_accessibilityManagerActionReadNextEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionReadNextEventHandler != null) + { + this.ActionReadNextSignal().Disconnect(_accessibilityManagerActionReadNextEventCallbackDelegate); + } + + _accessibilityManagerActionReadNextEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionReadPrevious + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionReadPreviousEventHandler == null) + { + _accessibilityManagerActionReadPreviousEventHandler += value; + + _accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious); + this.ActionReadPreviousSignal().Connect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionReadPreviousEventHandler != null) + { + this.ActionReadPreviousSignal().Disconnect(_accessibilityManagerActionReadPreviousEventCallbackDelegate); + } + + _accessibilityManagerActionReadPreviousEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionUp + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionUpEventHandler == null) + { + _accessibilityManagerActionUpEventHandler += value; + + _accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp); + this.ActionUpSignal().Connect(_accessibilityManagerActionUpEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionUpEventHandler != null) + { + this.ActionUpSignal().Disconnect(_accessibilityManagerActionUpEventCallbackDelegate); + } + + _accessibilityManagerActionUpEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionDown + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionDownEventHandler == null) + { + _accessibilityManagerActionDownEventHandler += value; + + _accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown); + this.ActionDownSignal().Connect(_accessibilityManagerActionDownEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionDownEventHandler != null) + { + this.ActionDownSignal().Disconnect(_accessibilityManagerActionDownEventCallbackDelegate); + } + + _accessibilityManagerActionDownEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionClearFocus + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionClearFocusEventHandler == null) + { + _accessibilityManagerActionClearFocusEventHandler += value; + + _accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus); + this.ActionClearFocusSignal().Connect(_accessibilityManagerActionClearFocusEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionClearFocusEventHandler != null) + { + this.ActionClearFocusSignal().Disconnect(_accessibilityManagerActionClearFocusEventCallbackDelegate); + } + + _accessibilityManagerActionClearFocusEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionBack + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionBackEventHandler == null) + { + _accessibilityManagerActionBackEventHandler += value; + + _accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack); + this.ActionBackSignal().Connect(_accessibilityManagerActionBackEventCallbackDelegate); + } + } + + remove + { + + if (_accessibilityManagerActionBackEventHandler != null) + { + this.ActionBackSignal().Disconnect(_accessibilityManagerActionBackEventCallbackDelegate); + } + + _accessibilityManagerActionBackEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionScrollUp + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionScrollUpEventHandler == null) + { + _accessibilityManagerActionScrollUpEventHandler += value; + + _accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp); + this.ActionScrollUpSignal().Connect(_accessibilityManagerActionScrollUpEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionScrollUpEventHandler != null) + { + this.ActionScrollUpSignal().Disconnect(_accessibilityManagerActionScrollUpEventCallbackDelegate); + } + + _accessibilityManagerActionScrollUpEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionScrollDown + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionScrollDownEventHandler == null) + { + _accessibilityManagerActionScrollDownEventHandler += value; + + _accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown); + this.ActionScrollDownSignal().Connect(_accessibilityManagerActionScrollDownEventCallbackDelegate); + } + } + + remove + { + + if (_accessibilityManagerActionScrollDownEventHandler != null) + { + this.ActionScrollDownSignal().Disconnect(_accessibilityManagerActionScrollDownEventCallbackDelegate); + } + + _accessibilityManagerActionScrollDownEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionPageLeft + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionPageLeftEventHandler == null) + { + _accessibilityManagerActionPageLeftEventHandler += value; + + _accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft); + this.ActionPageLeftSignal().Connect(_accessibilityManagerActionPageLeftEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionPageLeftEventHandler != null) + { + this.ActionPageLeftSignal().Disconnect(_accessibilityManagerActionPageLeftEventCallbackDelegate); + } + + _accessibilityManagerActionPageLeftEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionPageRight + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionPageRightEventHandler == null) + { + _accessibilityManagerActionPageRightEventHandler += value; + + _accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight); + this.ActionPageRightSignal().Connect(_accessibilityManagerActionPageRightEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionPageRightEventHandler != null) + { + this.ActionPageRightSignal().Disconnect(_accessibilityManagerActionPageRightEventCallbackDelegate); + } + + _accessibilityManagerActionPageRightEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionPageUp + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionPageUpEventHandler == null) + { + _accessibilityManagerActionPageUpEventHandler += value; + + _accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp); + this.ActionPageUpSignal().Connect(_accessibilityManagerActionPageUpEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionPageUpEventHandler != null) + { + this.ActionPageUpSignal().Disconnect(_accessibilityManagerActionPageUpEventCallbackDelegate); + } + + _accessibilityManagerActionPageUpEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionPageDown + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionPageDownEventHandler == null) + { + _accessibilityManagerActionPageDownEventHandler += value; + + _accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown); + this.ActionPageDownSignal().Connect(_accessibilityManagerActionPageDownEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionPageDownEventHandler != null) + { + this.ActionPageDownSignal().Disconnect(_accessibilityManagerActionPageDownEventCallbackDelegate); + } + + _accessibilityManagerActionPageDownEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionMoveToFirst + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionMoveToFirstEventHandler == null) + { + _accessibilityManagerActionMoveToFirstEventHandler += value; + + _accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst); + this.ActionMoveToFirstSignal().Connect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionMoveToFirstEventHandler != null) + { + this.ActionMoveToFirstSignal().Disconnect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate); + } + + _accessibilityManagerActionMoveToFirstEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionMoveToLast + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionMoveToLastEventHandler == null) + { + _accessibilityManagerActionMoveToLastEventHandler += value; + + _accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast); + this.ActionMoveToLastSignal().Connect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionMoveToLastEventHandler != null) + { + this.ActionMoveToLastSignal().Disconnect(_accessibilityManagerActionMoveToLastEventCallbackDelegate); + } + + _accessibilityManagerActionMoveToLastEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionReadFromTop + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionReadFromTopEventHandler == null) + { + _accessibilityManagerActionReadFromTopEventHandler += value; + + _accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop); + this.ActionReadFromTopSignal().Connect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionReadFromTopEventHandler != null) + { + this.ActionReadFromTopSignal().Disconnect(_accessibilityManagerActionReadFromTopEventCallbackDelegate); + } + + _accessibilityManagerActionReadFromTopEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionReadFromNext + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionReadFromNextEventHandler == null) + { + _accessibilityManagerActionReadFromNextEventHandler += value; + + _accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext); + this.ActionReadFromNextSignal().Connect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionReadFromNextEventHandler != null) + { + this.ActionReadFromNextSignal().Disconnect(_accessibilityManagerActionReadFromNextEventCallbackDelegate); + } + + _accessibilityManagerActionReadFromNextEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionZoom + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionZoomEventHandler == null) + { + _accessibilityManagerActionZoomEventHandler += value; + + _accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom); + this.ActionZoomSignal().Connect(_accessibilityManagerActionZoomEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionZoomEventHandler != null) + { + this.ActionZoomSignal().Disconnect(_accessibilityManagerActionZoomEventCallbackDelegate); + } + + _accessibilityManagerActionZoomEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionReadPauseResume + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionReadPauseResumeEventHandler == null) + { + _accessibilityManagerActionReadPauseResumeEventHandler += value; + + _accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume); + this.ActionReadPauseResumeSignal().Connect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionReadPauseResumeEventHandler != null) + { + this.ActionReadPauseResumeSignal().Disconnect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate); + } + + _accessibilityManagerActionReadPauseResumeEventHandler -= value; + } + } + + /// + /// 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 EventHandlerWithReturnType ActionStartStop + { + add + { + // Restricted to only one listener + if (_accessibilityManagerActionStartStopEventHandler == null) + { + _accessibilityManagerActionStartStopEventHandler += value; + + _accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop); + this.ActionStartStopSignal().Connect(_accessibilityManagerActionStartStopEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerActionStartStopEventHandler != null) + { + this.ActionStartStopSignal().Disconnect(_accessibilityManagerActionStartStopEventCallbackDelegate); + } + + _accessibilityManagerActionStartStopEventHandler -= value; + } + } + + /* + // 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) + { + _accessibilityManagerFocusChangedEventHandler += value; + + _accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged); + this.FocusChangedSignal().Connect(_accessibilityManagerFocusChangedEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerFocusChangedEventHandler != null) + { + this.FocusChangedSignal().Disconnect(_accessibilityManagerFocusChangedEventCallbackDelegate); + } + + _accessibilityManagerFocusChangedEventHandler -= value; + } + } + + /// + /// 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) + { + _accessibilityManagerFocusedViewActivatedEventHandler += value; + + _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); + this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerFocusedViewActivatedEventHandler != null) + { + this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); + } + + _accessibilityManagerFocusedViewActivatedEventHandler -= value; + } + } + + /// + /// 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) + { + _accessibilityManagerFocusOvershotEventHandler += value; + + _accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot); + this.FocusOvershotSignal().Connect(_accessibilityManagerFocusOvershotEventCallbackDelegate); + } + } + + remove + { + if (_accessibilityManagerFocusOvershotEventHandler != null) + { + this.FocusOvershotSignal().Disconnect(_accessibilityManagerFocusOvershotEventCallbackDelegate); + } + + _accessibilityManagerFocusOvershotEventHandler -= value; + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEventArgs.cs b/src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEventArgs.cs new file mode 100755 index 0000000..07d4344 --- /dev/null +++ b/src/Tizen.NUI/src/public/Accessibility/AccessibilityManagerEventArgs.cs @@ -0,0 +1,137 @@ +/* + * Copyright(c) 2020 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 Tizen.NUI.BaseComponents; + +namespace Tizen.NUI.Accessibility +{ + public partial class AccessibilityManager + { + /// + /// Event arguments that passed via FocusChangedEvent signal + /// + /// 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 class FocusChangedEventArgs : EventArgs + { + private View _viewCurrent; + private View _viewNext; + + /// 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 View ViewCurrent + { + get + { + return _viewCurrent; + } + set + { + _viewCurrent = value; + } + } + + /// 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 View ViewNext + { + get + { + return _viewNext; + } + set + { + _viewNext = value; + } + } + } + + /// + /// Event arguments that passed via FocusedViewActivated signal + /// + /// 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 class FocusedViewActivatedEventArgs : EventArgs + { + private View _view; + + + /// 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 View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + /// + /// Event arguments that passed via FocusOvershot signal + /// + /// 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 class FocusOvershotEventArgs : EventArgs + { + private View _currentFocusedView; + private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection; + + /// 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 View CurrentFocusedView + { + get + { + return _currentFocusedView; + } + set + { + _currentFocusedView = value; + } + } + + /// 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 AccessibilityManager.FocusOvershotDirection FocusOvershotDirection + { + get + { + return _focusOvershotDirection; + } + set + { + _focusOvershotDirection = value; + } + } + } + } +} diff --git a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/AccessibilityManagerSample.cs b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/AccessibilityManagerSample.cs new file mode 100755 index 0000000..2be51ab --- /dev/null +++ b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/AccessibilityManagerSample.cs @@ -0,0 +1,112 @@ + +using System; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.Accessibility; + +/////////////////////////////////////////////////////////////////////////////////////////////// +/// How to turn on and test Accessibility /// +/// There are two ways to turn on screen reader (TTS) in the target /// +/// 1) Settings > Accessibility > Screen reader > On /// +/// 2) Open Terminal and use command : /// +/// # vconftool set -f -t bool db/setting/accessibility/tts 1 /// +/// If you turn off screen reader, type and execute text based command below : /// +/// # vconftool set -f -t bool db/setting/accessibility/tts 0 /// +/////////////////////////////////////////////////////////////////////////////////////////////// + +namespace Tizen.NUI.Samples +{ + public class AccessibilityManagerSample : IExample + { + const string tag = "NUITEST"; + + const int mRow = 3; + const int mColumn = 3; + const int mContents = mRow * mColumn; + + public void Activate() + { + Window window = NUIApplication.GetDefaultWindow(); + window.BackgroundColor = Color.White; + Size2D windowSize = window.WindowSize; + + // Create Table + TableView table = new TableView(mRow, mColumn) + { + PositionUsesPivotPoint = true, + PivotPoint = PivotPoint.Center, + ParentOrigin = ParentOrigin.Center, + Size = new Size((float)(windowSize.Width * 0.8), (float)(windowSize.Height * 0.8)), + BackgroundColor = new Color(0.2f, 0.5f, 0.5f, 1.0f), + CellPadding = new Vector2(10, 10), + }; + window.GetDefaultLayer().Add(table); + + uint exampleCount = 0; + + // Fill the contents in TableView + for (uint row = 0; row < mRow; row++) + { + for (uint column = 0; column < mColumn; column++) + { + TextLabel content = CreateText(); + content.Name = "TextLabel" + exampleCount; + content.Text = "Row" + row + " - Column" + column; + + /////////////////////////////////////////////////////////////////////////////////////////////// + /// How to set Accessibility attribute to components /// + /// 1. Create AccessibilityManager. /// + /// 2. Set the focus order of each view and the index of order should start 1 (one). /// + /// 3. Set the information of each view's accessibility attribute. /// + /// There are four attributes, which will be read by screen reader. /// + /// And the order of reading is : Label -> Trait -> Value (Optional) -> Hint (Optional) /// + /////////////////////////////////////////////////////////////////////////////////////////////// + + AccessibilityManager manager = AccessibilityManager.Instance; + manager.SetFocusOrder(content, ++exampleCount); + manager.SetAccessibilityAttribute(content, + AccessibilityManager.AccessibilityAttribute.Label, content.Name); + manager.SetAccessibilityAttribute(content, + AccessibilityManager.AccessibilityAttribute.Trait, "Tile"); + manager.SetAccessibilityAttribute(content, + AccessibilityManager.AccessibilityAttribute.Hint, "You can run this example"); + + table.AddChild(content, new TableView.CellPosition(row, column)); + } + } + + // You can connect with various Accessibility action signals. + // AccessibilityManager provides functionality of setting the focus and moving forward and backward. + // All touch interactions for screen will work with one more finger and tap. + + AccessibilityManager.Instance.FocusedViewActivated += OnFocusedView; + } + + TextLabel CreateText() + { + TextLabel label = new TextLabel(); + label.PositionUsesPivotPoint = true; + label.PivotPoint = PivotPoint.Center; + label.ParentOrigin = ParentOrigin.Center; + label.MultiLine = true; + label.HorizontalAlignment = HorizontalAlignment.Center; + label.VerticalAlignment = VerticalAlignment.Center; + label.HeightResizePolicy = ResizePolicyType.FillToParent; + label.Focusable = true; + return label; + } + + // Do something with activated View, for example, launching another application. + private void OnFocusedView(object source, AccessibilityManager.FocusedViewActivatedEventArgs args) + { + if (args.View) + { + // Here, in the sample, if one finger double tap, the following log will shows in terminal. + Tizen.Log.Error(tag, "The current focused view is "+ args.View.Name +"\n"); + } + } + + public void Deactivate() + { + } + } +} \ No newline at end of file -- 2.7.4