InjectionScope
-
Cmn
interface InjectionScope : Density
KeyInjectionScope |
The receiver scope of the key input injection lambda from |
MouseInjectionScope |
The receiver scope of the mouse input injection lambda from |
MultiModalInjectionScope |
The receiver scope of the multi-modal input injection lambda from |
RotaryInjectionScope |
The receiver scope of rotary input injection lambda from |
TouchInjectionScope |
The receiver scope of the touch input injection lambda from |
TrackpadInjectionScope |
The receiver scope of the trackpad input injection lambda from |
The receiver scope for input injection lambdas that are tied to a specific node, such as performTouchInput and performMouseInput.
The properties exposed here (e.g., center, width, height) are derived from the SemanticsNode of the SemanticsNodeInteraction on which the injection method was called.
Summary
Public functions |
||
|---|---|---|
Unit |
advanceEventTime(durationMillis: Long)Adds the given |
Cmn
|
open Offset |
percentOffset(x: Float, y: Float)Creates an |
Cmn
|
Public properties |
||
|---|---|---|
open Float |
The y-coordinate for the bottom of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The center of the bottom edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The bottom left corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The bottom right corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The center of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The center of the left edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The center of the right edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Float |
The x-coordinate for the center of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Float |
The y-coordinate for the center of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Long |
The default time between two successive events. |
Cmn
|
open Int |
The height of the node in px. |
Cmn
|
open Float |
The x-coordinate for the left edge of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Float |
The x-coordinate for the right edge of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Float |
The y-coordinate for the top of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The center of the top edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The top left corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
open Offset |
The top right corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node. |
Cmn
|
ViewConfiguration |
The |
Cmn
|
IntSize |
The size of the visible part of the node we're interacting with in px, i.e. its clipped bounds. |
Cmn
|
open Int |
The width of the node in px. |
Cmn
|
Inherited functions |
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||||||||||||
Inherited properties |
|---|
Public functions
advanceEventTime
fun advanceEventTime(durationMillis: Long = eventPeriodMillis): Unit
Adds the given durationMillis to the current event time, delaying the next event by that time.
percentOffset
open fun percentOffset(x: Float = 0.0f, y: Float = 0.0f): Offset
Creates an Offset relative to the size of the node we're interacting with. x and y are fractions of the width and height, between -1 and 1.
Note that percentOffset(1f, 1f) != bottomRight, see right and bottom.
For example: percentOffset(.5f, .5f) is the same as the center; centerLeft + percentOffset(.1f, 0f) is a point 10% inward from the middle of the left edge; and bottomRight - percentOffset(.2f, .1f) is a point 20% to the left and 10% to the top of the bottom right corner.
Public properties
bottom
open val bottom: Float
The y-coordinate for the bottom of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that, unless height == 0, bottom != height. In particular, bottom == height - 1f, because pixels are 0-based. If height == 0, bottom == 0 too.
bottomCenter
open val bottomCenter: Offset
The center of the bottom edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that bottomCenter.y != height, see bottom.
bottomLeft
open val bottomLeft: Offset
The bottom left corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that bottomLeft.y != height, see bottom.
bottomRight
open val bottomRight: Offset
The bottom right corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that bottomRight.x != width and bottomRight.y != height, see right and bottom.
center
open val center: Offset
The center of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
centerLeft
open val centerLeft: Offset
The center of the left edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
centerRight
open val centerRight: Offset
The center of the right edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that centerRight.x != width, see right.
centerX
open val centerX: Float
The x-coordinate for the center of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
centerY
open val centerY: Float
The y-coordinate for the center of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
left
open val left: Float
The x-coordinate for the left edge of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
right
open val right: Float
The x-coordinate for the right edge of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that, unless width == 0, right != width. In particular, right == width - 1f, because pixels are 0-based. If width == 0, right == 0 too.
top
open val top: Float
The y-coordinate for the top of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
topCenter
open val topCenter: Offset
The center of the top edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
topLeft
open val topLeft: Offset
The top left corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
topRight
open val topRight: Offset
The top right corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Note that topRight.x != width, see right.
viewConfiguration
val viewConfiguration: ViewConfiguration
The ViewConfiguration in use by the SemanticsNode from the SemanticsNodeInteraction on which the input injection method is called.
visibleSize
val visibleSize: IntSize
The size of the visible part of the node we're interacting with in px, i.e. its clipped bounds.