/** * Returns a cached instance if such is available or a new one is created. The returned instance * is initialized from the given <code>info</code>. * * @param info The other info. * @return An instance. */ public static AccessibilityWindowInfoCompat obtain(AccessibilityWindowInfoCompat info) { return wrapNonNullInstance(IMPL.obtain(info.mInfo)); }
/** * Return an instance back to be reused. * * <p><strong>Note:</strong> You must not touch the object after calling this function. * * @throws IllegalStateException If the info is already recycled. */ public void recycle() { IMPL.recycle(mInfo); }
/** * Gets the number of child windows. * * @return The child count. */ public int getChildCount() { return IMPL.getChildCount(mInfo); }
/** * Gets the child window at a given index. * * @param index The index. * @return The child. */ public AccessibilityWindowInfoCompat getChild(int index) { return wrapNonNullInstance(IMPL.getChild(mInfo, index)); }
/** * Gets if this window has input focus. * * @return Whether has input focus. */ public boolean isFocused() { return IMPL.isFocused(mInfo); }
/** * Gets if this window has accessibility focus. * * @return Whether has accessibility focus. */ public boolean isAccessibilityFocused() { return IMPL.isAccessibilityFocused(mInfo); }
/** * Gets the bounds of this window in the screen. * * @param outBounds The out window bounds. */ public void getBoundsInScreen(Rect outBounds) { IMPL.getBoundsInScreen(mInfo, outBounds); }
/** * Gets if this window is active. An active window is the one the user is currently touching or * the window has input focus and the user is not touching any window. * * @return Whether this is the active window. */ public boolean isActive() { return IMPL.isActive(mInfo); }
/** * Gets the unique window id. * * @return windowId The window id. */ public int getId() { return IMPL.getId(mInfo); }
/** * Gets the parent window if such. * * @return The parent window. */ public AccessibilityWindowInfoCompat getParent() { return wrapNonNullInstance(IMPL.getParent(mInfo)); }
/** * Gets the root node in the window's hierarchy. * * @return The root node. */ public AccessibilityNodeInfoCompat getRoot() { return AccessibilityNodeInfoCompat.wrapNonNullInstance(IMPL.getRoot(mInfo)); }
/** * Gets the layer which determines the Z-order of the window. Windows with greater layer appear on * top of windows with lesser layer. * * @return The window layer. */ public int getLayer() { return IMPL.getLayer(mInfo); }
/** * Gets the type of the window. * * @return The type. * @see #TYPE_APPLICATION * @see #TYPE_INPUT_METHOD * @see #TYPE_SYSTEM * @see #TYPE_ACCESSIBILITY_OVERLAY */ public int getType() { return IMPL.getType(mInfo); }