[NUI][AT-SPI] Add Accessibility.StopReading() (#2814)
authorArtur Świgoń <aswigon@yandex.com>
Fri, 2 Apr 2021 10:34:09 +0000 (12:34 +0200)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Tue, 20 Apr 2021 06:13:00 +0000 (15:13 +0900)
Co-authored-by: Artur Świgoń <a.swigon@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Accessibility.cs
src/Tizen.NUI/src/public/Accessibility/Accessibility.cs

index c3fde0d..873f4e2 100755 (executable)
@@ -29,6 +29,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "csharp_dali_accessibility_pause_resume")]
             public static extern void PauseResume(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "csharp_dali_accessibility_stop_reading")]
+            public static extern void StopReading(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
         }
     }
 }
index fa82f9d..f36489d 100755 (executable)
@@ -110,6 +110,18 @@ namespace Tizen.NUI.Accessibility
         }
 
         /// <summary>
+        /// Cancels anything screen-reader is reading / has queued to read
+        /// </summary>
+        /// <param name="alsoNonDiscardable">whether to cancel non-discardable readings as well</param>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void StopReading(bool alsoNonDiscardable)
+        {
+            Interop.Accessibility.StopReading(View.getCPtr(dummy), alsoNonDiscardable);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
         ///  Get View that is used to highlight widget.
         /// </summary>
         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)