Package com.valhalla.sdk.api.methods
Class Widgets
java.lang.Object
com.valhalla.sdk.api.methods.Widgets
Widget-tree queries over the latest immutable native snapshot.
Widget IDs are packed as groupId << 16 | childId. Population is
adapter-dependent, so check the relevant client capability and handle empty
results. Coordinates describe the native game surface, not Command Center
desktop coordinates.
-
Method Summary
Modifier and TypeMethodDescriptionall()Returns all decoded widgets.Selects all widgets accepted by a filter.at(int pointX, int pointY) Finds the topmost visible widget containing a native-surface point.children(int packedParentId) Selects direct child snapshots by packed parent identifier.static intCounts widgets accepted by a filter.Finds the first widget whose full text equals a value, ignoring case.Finds the first native-enumerated widget accepted by a filter.get(int packedId) Finds a widget by packed identifier.get(int groupId, int childId) Finds a widget by group and child identifiers.group(int groupId) Selects every widget in a group.static booleanisVisible(int packedId) Tests a packed widget's native visibility flag.visible()Returns visible widget snapshots.Selects visible widgets accepted by a filter.Selects widgets whose text contains a fragment, ignoring case.
-
Method Details
-
all
Returns all decoded widgets.- Returns:
- every widget decoded in the latest native snapshot
-
all
Selects all widgets accepted by a filter.- Parameters:
filter- widget predicate- Returns:
- matching snapshots in native enumeration order
-
get
Finds a widget by packed identifier.- Parameters:
packedId-groupId << 16 | childId- Returns:
- matching widget, or empty
-
get
Finds a widget by group and child identifiers.- Parameters:
groupId- non-negative widget groupchildId- child identifier from 0 through 65,535- Returns:
- matching widget, or empty for invalid input or no match
-
visible
Returns visible widget snapshots.- Returns:
- all snapshots whose native visibility flag is set
-
visible
Selects visible widgets accepted by a filter.- Parameters:
filter- widget predicate- Returns:
- matching visible snapshots
-
isVisible
public static boolean isVisible(int packedId) Tests a packed widget's native visibility flag.- Parameters:
packedId- packed widget identifier- Returns:
truewhen a matching snapshot exists and is visible
-
group
Selects every widget in a group.- Parameters:
groupId- non-negative widget group- Returns:
- matching snapshots, or an empty list for invalid input
-
children
Selects direct child snapshots by packed parent identifier.- Parameters:
packedParentId- packed parent widget identifier- Returns:
- matching children in native enumeration order
-
first
Finds the first native-enumerated widget accepted by a filter.- Parameters:
filter- widget predicate- Returns:
- first matching snapshot, or empty
-
withText
Selects widgets whose text contains a fragment, ignoring case.- Parameters:
text- text fragment- Returns:
- matching snapshots, or an empty list for
null
-
exactText
Finds the first widget whose full text equals a value, ignoring case.- Parameters:
text- exact widget text- Returns:
- first matching snapshot, or empty
-
at
Finds the topmost visible widget containing a native-surface point.Reverse enumeration is used as the snapshot's z-order approximation.
- Parameters:
pointX- native-surface X coordinatepointY- native-surface Y coordinate- Returns:
- containing widget, or empty
-
count
Counts widgets accepted by a filter.- Parameters:
filter- widget predicate- Returns:
- number of matching snapshots
-