public class AccessibilityWindow extends Object
SystemCapability.Accessibility#ABILITY| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
TYPE_ACCESSIBILITY_OVERLAY |
Indicates an accessibility overlay window.
|
static int |
TYPE_APPLICATION |
Indicates an application window.
|
static int |
TYPE_INPUT_METHOD |
Indicates an input method window.
|
static int |
TYPE_SPLIT_SCREEN_DIVIDER |
Indicates a split-screen window.
|
static int |
TYPE_SYSTEM |
Indicates a system window.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static AccessibilityWindow |
get() |
Obtains an
AccessibilityWindow instance. |
static AccessibilityWindow |
get(AccessibilityWindow srcWindow) |
Obtains an
AccessibilityWindow instance cloned from the source window. |
Optional<AccessibilityInfo> |
getAnchor() |
Obtains an anchor accessibility node that anchors this window to another window.
|
Optional<AccessibilityWindow> |
getChild(int index) |
Obtains information about the accessibility child window at a specified index.
|
int |
getChildNum() |
Obtains the quantity of child windows.
|
Optional<AccessibilityWindow> |
getParent() |
Obtains information about the parent window of this window.
|
Rect |
getRectInScreen() |
Obtains the display area of this window on the screen.
|
Optional<AccessibilityInfo> |
getRootAccessibilityInfo() |
Obtains information about the root node in the window hierarchy.
|
int |
getWindowId() |
Obtains the window ID.
|
int |
getWindowLayer() |
Obtains the window layers that are hierarchically ordered.
|
CharSequence |
getWindowTitle() |
Obtains the window title.
|
int |
getWindowType() |
Obtains the window type.
|
boolean |
isAccessibilityFocused() |
Checks whether this window has gained accessibility focus.
|
boolean |
isActive() |
Checks whether this window is active.
|
boolean |
isFocused() |
Checks whether this window has gained focus.
|
public static final int TYPE_ACCESSIBILITY_OVERLAY
public static final int TYPE_APPLICATION
public static final int TYPE_INPUT_METHOD
public static final int TYPE_SPLIT_SCREEN_DIVIDER
public static final int TYPE_SYSTEM
public static AccessibilityWindow get()
AccessibilityWindow instance.public static AccessibilityWindow get(AccessibilityWindow srcWindow)
AccessibilityWindow instance cloned from the source window.srcWindow - Indicates the source window.public int getWindowId()
public int getWindowType()
TYPE_APPLICATION,
TYPE_INPUT_METHOD,
TYPE_SYSTEM,
TYPE_ACCESSIBILITY_OVERLAY,
TYPE_SPLIT_SCREEN_DIVIDERpublic int getWindowLayer()
public CharSequence getWindowTitle()
public Rect getRectInScreen()
public boolean isAccessibilityFocused()
true if this window has gained accessibility focus; returns false otherwise.public boolean isFocused()
true if this window has gained focus; returns false otherwise.public boolean isActive()
true if this window is active; returns false otherwise.public int getChildNum()
public Optional<AccessibilityWindow> getChild(int index)
index - Indicates the index of the child window.public Optional<AccessibilityWindow> getParent()
public Optional<AccessibilityInfo> getRootAccessibilityInfo()
public Optional<AccessibilityInfo> getAnchor()