[NUI][AT-SPI] Add IAtspiTable and IAtspiTableCell interfaces (#5304)
authorArtur Świgoń <aswigon@yandex.com>
Wed, 31 May 2023 07:20:47 +0000 (09:20 +0200)
committerGitHub <noreply@github.com>
Wed, 31 May 2023 07:20:47 +0000 (16:20 +0900)
Co-authored-by: Artur Świgoń <a.swigon@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.ControlDevel.cs
src/Tizen.NUI/src/public/Accessibility/IAtspiTable.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/Accessibility/IAtspiTableCell.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibilityEnum.cs
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibilityWrappers.cs

index 3ed46a0..07c3da8 100755 (executable)
@@ -388,11 +388,147 @@ namespace Tizen.NUI
                 public delegate IntPtr AccessibilityGetValueText(IntPtr self);
                 [EditorBrowsable(EditorBrowsableState.Never)]
                 public AccessibilityGetValueText GetValueText; // 38
+
+                public delegate int AccessibilityGetRowCount(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetRowCount GetRowCount; // 39
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate int AccessibilityGetColumnCount(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetColumnCount GetColumnCount; // 40
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate int AccessibilityGetSelectedRowCount(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetSelectedRowCount GetSelectedRowCount; // 41
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate int AccessibilityGetSelectedColumnCount(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetSelectedColumnCount GetSelectedColumnCount; // 42
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetCaption(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetCaption GetCaption; // 43
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetSummary(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetSummary GetSummary; // 44
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetCell(IntPtr self, int row, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetCell GetCell; // 45
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate ulong AccessibilityGetChildIndex(IntPtr self, int row, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetChildIndex GetChildIndex; // 46
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetPositionByChildIndex(IntPtr self, ulong childIndex);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetPositionByChildIndex GetPositionByChildIndex; // 47
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetRowDescription(IntPtr self, int row);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetRowDescription GetRowDescription; // 48
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetColumnDescription(IntPtr self, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetColumnDescription GetColumnDescription; // 49
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetRowHeader(IntPtr self, int row);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetRowHeader GetRowHeader; // 50
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetColumnHeader(IntPtr self, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetColumnHeader GetColumnHeader; // 51
+
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate void AccessibilityGetSelectedRowsColumnsCallback(int index, IntPtr userData);
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate void AccessibilityGetSelectedRows(IntPtr self, AccessibilityGetSelectedRowsColumnsCallback callback, IntPtr userData);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetSelectedRows GetSelectedRows; // 52
+
+                // Reuses the callback type from GetSelectedRows
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate void AccessibilityGetSelectedColumns(IntPtr self, AccessibilityGetSelectedRowsColumnsCallback callback, IntPtr userData);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetSelectedColumns GetSelectedColumns; // 53
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityIsRowSelected(IntPtr self, int row);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityIsRowSelected IsRowSelected; // 54
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityIsColumnSelected(IntPtr self, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityIsColumnSelected IsColumnSelected; // 55
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityIsCellSelected(IntPtr self, int row, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityIsCellSelected IsCellSelected; // 56
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityAddRowSelection(IntPtr self, int row);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityAddRowSelection AddRowSelection; // 57
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityAddColumnSelection(IntPtr self, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityAddColumnSelection AddColumnSelection; // 58
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityRemoveRowSelection(IntPtr self, int row);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityRemoveRowSelection RemoveRowSelection; // 59
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate bool AccessibilityRemoveColumnSelection(IntPtr self, int column);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityRemoveColumnSelection RemoveColumnSelection; // 60
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetTable(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetTable GetTable; // 61
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate IntPtr AccessibilityGetCellPosition(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetCellPosition GetCellPosition; // 62
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate int AccessibilityGetCellRowSpan(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetCellRowSpan GetCellRowSpan; // 63
+
+                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+                public delegate int AccessibilityGetCellColumnSpan(IntPtr self);
+                [EditorBrowsable(EditorBrowsableState.Never)]
+                public AccessibilityGetCellColumnSpan GetCellColumnSpan; // 64
             }
 
             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Accessibility_DuplicateString")]
             public static extern IntPtr DaliAccessibilityDuplicateString(string arg);
 
+            [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Accessibility_MakeIntPair")]
+            public static extern IntPtr DaliAccessibilityMakeIntPair(int first, int second);
+
             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Accessibility_SetAccessibilityDelegate")]
             public static extern IntPtr DaliAccessibilitySetAccessibilityDelegate(IntPtr arg1_accessibilityDelegate, uint arg2_accessibilityDelegateSize);
         }
diff --git a/src/Tizen.NUI/src/public/Accessibility/IAtspiTable.cs b/src/Tizen.NUI/src/public/Accessibility/IAtspiTable.cs
new file mode 100644 (file)
index 0000000..5aa7b7b
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright(c) 2023 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.Collections.Generic;
+using System.ComponentModel;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Accessibility
+{
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public interface IAtspiTable
+    {
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetRowCount();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetColumnCount();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetSelectedRowCount();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetSelectedColumnCount();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        View AccessibilityGetCaption();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        View AccessibilityGetSummary();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        IAtspiTableCell AccessibilityGetCell(int row, int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetChildIndex(int row, int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        Tuple<int, int> AccessibilityGetPositionByChildIndex(int childIndex);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        string AccessibilityGetRowDescription(int row);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        string AccessibilityGetColumnDescription(int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        View AccessibilityGetRowHeader(int row);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        View AccessibilityGetColumnHeader(int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        IEnumerable<int> AccessibilityGetSelectedRows();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        IEnumerable<int> AccessibilityGetSelectedColumns();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityIsRowSelected(int row);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityIsColumnSelected(int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityIsCellSelected(int row, int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityAddRowSelection(int row);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityAddColumnSelection(int column);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityRemoveRowSelection(int row);
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        bool AccessibilityRemoveColumnSelection(int column);
+    }
+}
diff --git a/src/Tizen.NUI/src/public/Accessibility/IAtspiTableCell.cs b/src/Tizen.NUI/src/public/Accessibility/IAtspiTableCell.cs
new file mode 100644 (file)
index 0000000..3dbc966
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright(c) 2023 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;
+
+namespace Tizen.NUI.Accessibility
+{
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public interface IAtspiTableCell
+    {
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        IAtspiTable AccessibilityGetTable();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        Tuple<int, int> AccessibilityGetCellPosition();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetCellRowSpan();
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        int AccessibilityGetCellColumnSpan();
+    }
+}
index b89c7c1..55608ca 100755 (executable)
@@ -54,6 +54,16 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         Selection = 21,
+        /// <summary>
+        /// Accessibility interface which can represent a table
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        Table = 23,
+        /// <summary>
+        /// Accessibility interface which can represent a table cell
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        TableCell = 24,
     }
 
     /// <summary>
index 7aa4a96..5404598 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using Tizen.NUI.Accessibility;
 
@@ -32,6 +33,8 @@ namespace Tizen.NUI.BaseComponents
             InitializeAccessibilityDelegateComponentInterface();
             InitializeAccessibilityDelegateEditableTextInterface();
             InitializeAccessibilityDelegateSelectionInterface();
+            InitializeAccessibilityDelegateTableInterface();
+            InitializeAccessibilityDelegateTableCellInterface();
             InitializeAccessibilityDelegateTextInterface();
             InitializeAccessibilityDelegateValueInterface();
             InitializeAccessibilityDelegateTizenExtensions();
@@ -46,7 +49,14 @@ namespace Tizen.NUI.BaseComponents
 
         private static View GetViewFromRefObject(IntPtr refObjectPtr)
         {
-            return Registry.GetManagedBaseHandleFromRefObject(refObjectPtr) as View;
+            View view = Registry.GetManagedBaseHandleFromRefObject(refObjectPtr) as View;
+
+            if (view is null)
+            {
+                NUILog.Error($"RefObject 0x{refObjectPtr:x} is not a View");
+            }
+
+            return view;
         }
 
         private static T GetInterfaceFromRefObject<T>(IntPtr refObjectPtr)
@@ -60,6 +70,8 @@ namespace Tizen.NUI.BaseComponents
                 return atspiInterface;
             }
 
+            NUILog.Error($"RefObject 0x{refObjectPtr:x} is not a {typeof(T).FullName}");
+
             return default(T);
         }
 
@@ -78,6 +90,11 @@ namespace Tizen.NUI.BaseComponents
             return Interop.Rectangle.NewRectangle(rect.X, rect.Y, rect.Width, rect.Height);
         }
 
+        private static IntPtr DuplicateIntPair(Tuple<int, int> pair)
+        {
+            return Interop.ControlDevel.DaliAccessibilityMakeIntPair(pair.Item1, pair.Item2);
+        }
+
         //
         // Accessible interface
         //
@@ -155,6 +172,16 @@ namespace Tizen.NUI.BaseComponents
                 flags |= (1U << (int)AccessibilityInterface.Selection);
             }
 
+            if (view is IAtspiTable)
+            {
+                flags |= (1U << (int)AccessibilityInterface.Table);
+            }
+
+            if (view is IAtspiTableCell)
+            {
+                flags |= (1U << (int)AccessibilityInterface.TableCell);
+            }
+
             if (view is IAtspiText)
             {
                 flags |= (1U << (int)AccessibilityInterface.Text);
@@ -322,6 +349,226 @@ namespace Tizen.NUI.BaseComponents
         }
 
         //
+        // Table interface
+        //
+
+        private static void InitializeAccessibilityDelegateTableInterface()
+        {
+            var ad = Interop.ControlDevel.AccessibilityDelegate.Instance;
+
+            ad.AddColumnSelection      = AccessibilityAddColumnSelectionWrapper;
+            ad.AddRowSelection         = AccessibilityAddRowSelectionWrapper;
+            ad.GetCaption              = AccessibilityGetCaptionWrapper;
+            ad.GetCell                 = AccessibilityGetCellWrapper;
+            ad.GetChildIndex           = AccessibilityGetChildIndexWrapper;
+            ad.GetColumnCount          = AccessibilityGetColumnCountWrapper;
+            ad.GetColumnDescription    = AccessibilityGetColumnDescriptionWrapper;
+            ad.GetColumnHeader         = AccessibilityGetColumnHeaderWrapper;
+            ad.GetPositionByChildIndex = AccessibilityGetPositionByChildIndexWrapper;
+            ad.GetRowCount             = AccessibilityGetRowCountWrapper;
+            ad.GetRowDescription       = AccessibilityGetRowDescriptionWrapper;
+            ad.GetRowHeader            = AccessibilityGetRowHeaderWrapper;
+            ad.GetSelectedColumnCount  = AccessibilityGetSelectedColumnCountWrapper;
+            ad.GetSelectedColumns      = AccessibilityGetSelectedColumnsWrapper;
+            ad.GetSelectedRowCount     = AccessibilityGetSelectedRowCountWrapper;
+            ad.GetSelectedRows         = AccessibilityGetSelectedRowsWrapper;
+            ad.GetSummary              = AccessibilityGetSummaryWrapper;
+            ad.IsCellSelected          = AccessibilityIsCellSelectedWrapper;
+            ad.IsColumnSelected        = AccessibilityIsColumnSelectedWrapper;
+            ad.IsRowSelected           = AccessibilityIsRowSelectedWrapper;
+            ad.RemoveColumnSelection   = AccessibilityRemoveColumnSelectionWrapper;
+            ad.RemoveRowSelection      = AccessibilityRemoveRowSelectionWrapper;
+        }
+
+        private static bool AccessibilityAddColumnSelectionWrapper(IntPtr self, int column)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityAddColumnSelection(column);
+        }
+
+        private static bool AccessibilityAddRowSelectionWrapper(IntPtr self, int row)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityAddRowSelection(row);
+        }
+
+        private static IntPtr AccessibilityGetCaptionWrapper(IntPtr self)
+        {
+            View caption = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetCaption();
+
+            return View.getCPtr(caption).Handle;
+        }
+
+        private static IntPtr AccessibilityGetCellWrapper(IntPtr self, int row, int column)
+        {
+            IAtspiTableCell cell = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetCell(row, column);
+
+            if (cell is View view)
+            {
+                return View.getCPtr(view).Handle;
+            }
+
+            NUILog.Error("Cannot get Actor handle from IAtspiTableCell");
+
+            return IntPtr.Zero;
+        }
+
+        private static ulong AccessibilityGetChildIndexWrapper(IntPtr self, int row, int column)
+        {
+            return (ulong)GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetChildIndex(row, column);
+        }
+
+        private static int AccessibilityGetColumnCountWrapper(IntPtr self)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetColumnCount();
+        }
+
+        private static IntPtr AccessibilityGetColumnDescriptionWrapper(IntPtr self, int column)
+        {
+            string description = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetColumnDescription(column);
+
+            return DuplicateString(description);
+        }
+
+        private static IntPtr AccessibilityGetColumnHeaderWrapper(IntPtr self, int column)
+        {
+            View header = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetColumnHeader(column);
+
+            return View.getCPtr(header).Handle;
+        }
+
+        private static IntPtr AccessibilityGetPositionByChildIndexWrapper(IntPtr self, ulong childIndex)
+        {
+            Tuple<int, int> position = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetPositionByChildIndex((int)childIndex);
+
+            return DuplicateIntPair(position);
+        }
+
+        private static int AccessibilityGetRowCountWrapper(IntPtr self)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetRowCount();
+        }
+
+        private static IntPtr AccessibilityGetRowDescriptionWrapper(IntPtr self, int row)
+        {
+            string description = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetRowDescription(row);
+
+            return DuplicateString(description);
+        }
+
+        private static IntPtr AccessibilityGetRowHeaderWrapper(IntPtr self, int row)
+        {
+            View header = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetRowHeader(row);
+
+            return View.getCPtr(header).Handle;
+        }
+
+        private static int AccessibilityGetSelectedColumnCountWrapper(IntPtr self)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetSelectedColumnCount();
+        }
+
+        private static void AccessibilityGetSelectedColumnsWrapper(IntPtr self, Interop.ControlDevel.AccessibilityDelegate.AccessibilityGetSelectedRowsColumnsCallback callback, IntPtr userData)
+        {
+            IEnumerable<int> columns = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetSelectedColumns();
+
+            foreach (int column in columns)
+            {
+                callback(column, userData);
+            }
+        }
+
+        private static int AccessibilityGetSelectedRowCountWrapper(IntPtr self)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetSelectedRowCount();
+        }
+
+        private static void AccessibilityGetSelectedRowsWrapper(IntPtr self, Interop.ControlDevel.AccessibilityDelegate.AccessibilityGetSelectedRowsColumnsCallback callback, IntPtr userData)
+        {
+            IEnumerable<int> rows = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetSelectedRows();
+
+            foreach (int row in rows)
+            {
+                callback(row, userData);
+            }
+        }
+
+        private static IntPtr AccessibilityGetSummaryWrapper(IntPtr self)
+        {
+            View summary = GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityGetSummary();
+
+            return View.getCPtr(summary).Handle;
+        }
+
+        private static bool AccessibilityIsCellSelectedWrapper(IntPtr self, int row, int column)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityIsCellSelected(row, column);
+        }
+
+        private static bool AccessibilityIsColumnSelectedWrapper(IntPtr self, int column)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityIsColumnSelected(column);
+        }
+
+        private static bool AccessibilityIsRowSelectedWrapper(IntPtr self, int row)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityIsRowSelected(row);
+        }
+
+        private static bool AccessibilityRemoveColumnSelectionWrapper(IntPtr self, int column)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityRemoveColumnSelection(column);
+        }
+
+        private static bool AccessibilityRemoveRowSelectionWrapper(IntPtr self, int row)
+        {
+            return GetInterfaceFromRefObject<IAtspiTable>(self).AccessibilityRemoveRowSelection(row);
+        }
+
+        //
+        // TableCell interface
+        //
+
+        private static void InitializeAccessibilityDelegateTableCellInterface()
+        {
+            var ad = Interop.ControlDevel.AccessibilityDelegate.Instance;
+
+            ad.GetCellColumnSpan = AccessibilityGetCellColumnSpanWrapper;
+            ad.GetCellPosition   = AccessibilityGetCellPositionWrapper;
+            ad.GetCellRowSpan    = AccessibilityGetCellRowSpanWrapper;
+            ad.GetTable          = AccessibilityGetTableWrapper;
+        }
+
+        private static int AccessibilityGetCellColumnSpanWrapper(IntPtr self)
+        {
+            return GetInterfaceFromRefObject<IAtspiTableCell>(self).AccessibilityGetCellColumnSpan();
+        }
+
+        private static IntPtr AccessibilityGetCellPositionWrapper(IntPtr self)
+        {
+            Tuple<int, int> position = GetInterfaceFromRefObject<IAtspiTableCell>(self).AccessibilityGetCellPosition();
+
+            return DuplicateIntPair(position);
+        }
+
+        private static int AccessibilityGetCellRowSpanWrapper(IntPtr self)
+        {
+            return GetInterfaceFromRefObject<IAtspiTableCell>(self).AccessibilityGetCellRowSpan();
+        }
+
+        private static IntPtr AccessibilityGetTableWrapper(IntPtr self)
+        {
+            IAtspiTable table = GetInterfaceFromRefObject<IAtspiTableCell>(self).AccessibilityGetTable();
+
+            if (table is View view)
+            {
+                return View.getCPtr(view).Handle;
+            }
+
+            NUILog.Error("Cannot get Actor handle from IAtspiTable");
+
+            return IntPtr.Zero;
+        }
+
+        //
         // Text interface
         //