public override AccessibleObject Navigate(AccessibleNavigation navdir) { try { object o = acc.accNavigate((int)navdir, this.id); return(Wrap(o)); } catch (Exception) { return(null); } }
// InitializeLifetimeService not delgated. /// <summary> /// Move in various directions from the recipient. /// </summary> /// <param name="navdir"></param> /// <returns></returns> public override AccessibleObject Navigate(AccessibleNavigation navdir) { IAccessible acc = (IAccessible)(m_acc.accNavigate((int)navdir, null)); if (acc == null) { return(null); } if (acc == m_acc) // probably unlikely... { return(this); } return(new AccessibleObjectFromIAccessible(acc)); }
public static IEnumerable <IAccessible> GetChildren(IAccessible parent) { var children = new object[parent.accChildCount]; var result = AccessibleChildren(parent, 0, children.Length, children, out var count); if (result != 0 && result != 1) { return(Enumerable.Empty <IAccessible>()); } if (count == 1 && children[0] is int) { if (!(parent.accNavigate(NAVDIR_FIRSTCHILD, 0) is IAccessible child)) { return(Enumerable.Empty <IAccessible>()); } return(new[] { child }); } return(children.OfType <IAccessible>()); }
public static IEnumerable <IAccessible> GetChildren(IAccessible parent) { var children = new object[parent.accChildCount]; int count; var result = AccessibleChildren(parent, 0, children.Length, children, out count); if (result != 0 && result != 1) { return(new IAccessible[0]); } if (count == 1 && children[0] is int) { var child = parent.accNavigate(NAVDIR_FIRSTCHILD, 0) as IAccessible; if (child == null) { return(new IAccessible[0]); } return(new[] { child }); } return(children.OfType <IAccessible>()); }
object?IAccessibleInternal.accNavigate(int navDir, object childID) => AsNativeAccessible(publicIAccessible.accNavigate(navDir, childID));
object UnsafeNativeMethods.IAccessibleInternal.accNavigate(int navDir, object childID) { IntSecurity.UnmanagedCode.Assert(); return(AsNativeAccessible(publicIAccessible.accNavigate(navDir, childID))); }