[NUI][AT-SPI] Remove interops for SetAccessibilityConstructor()
authorArtur Świgoń <a.swigon@samsung.com>
Tue, 15 Feb 2022 13:59:39 +0000 (14:59 +0100)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 16 Mar 2022 00:11:16 +0000 (09:11 +0900)
The method name SetAccessibilityConstructor() in NUI has always been
misleading, because it actually never had an 'accessibilityConstructor'
parameter in the first place. With the recent addition of bindings for
Accessible::GetInterfaces(), all NUI controls use the same Accessible
implementation (NUIViewAccessible) anyway. However, as this method is
currently used in many places, it is kept as a wrapper for setting
AccessibilityRole (and interface flags) and will be removed if/when we
decide to switch to AT-SPI interfaces as native C# interfaces. Then, all
usages of SetAccessibilityConstructor() would be replaced by simply
setting AccessibilityRole (and interface flags won't be needed).

src/Tizen.NUI/src/internal/Interop/Interop.ControlDevel.cs
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibility.cs

index d143e48..5db4643 100755 (executable)
@@ -177,8 +177,6 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Accessibility_Accessible_SetHighlightActor")]
             public static extern void DaliAccessibilityAccessibleSetHighlightActor(global::System.Runtime.InteropServices.HandleRef arg1);
 
-            // SetAccessibilityConstructor
-
             // Keep this structure layout binary compatible with the respective C++ structure!
             [EditorBrowsable(EditorBrowsableState.Never)]
             [StructLayout(LayoutKind.Sequential)]
@@ -396,9 +394,6 @@ namespace Tizen.NUI
                 public AccessibilityGetRangeExtents GetRangeExtents; // 37
             }
 
-            [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Toolkit_DevelControl_SetAccessibilityConstructor_NUI")]
-            public static extern void DaliToolkitDevelControlSetAccessibilityConstructor(HandleRef arg1_self, int arg2_role);
-
             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Accessibility_DuplicateString")]
             public static extern IntPtr DaliAccessibilityDuplicateString(string arg);
 
index defaeb8..81dd87a 100755 (executable)
@@ -465,8 +465,7 @@ namespace Tizen.NUI.BaseComponents
         {
             // We have to store the interface flags until we remove SetAccessibilityConstructor and switch to native C# interfaces
             AtspiInterfaceFlags = (1U << (int)accessibilityInterface);
-            Interop.ControlDevel.DaliToolkitDevelControlSetAccessibilityConstructor(SwigCPtr, (int)role);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            AccessibilityRole = role;
         }
 
         [EditorBrowsable(EditorBrowsableState.Never)]