Package-level declarations

Provides the input method runtime, which drives a model from user input, and which keeps track of the current input context and state.

Types

Link copied to clipboard
data class K3ComputedKey(val x: Int, val y: Int, val width: Int, val height: Int, val data: K3Key, val keytop: K3StringOrDescriptor)
Link copied to clipboard
data class K3ComputedLayout(val keys: List<K3ComputedKey>)
Link copied to clipboard
class K3Content(val selection: K3TextRange = K3TextRange.Zero, val composition: K3TextRange? = null, val surroundingText: K3SurroundingText = K3SurroundingText.Empty, val inputContext: K3String = K3String.Empty)

Describes a snapshot of the tracked content state.

Link copied to clipboard
interface K3Editor

Represents the editor this input method is controlling. Broadly speaking, this interface is the high-level abstraction of the actual platform-specific connection to the application we are inputting text to.

Link copied to clipboard
abstract class K3InputMethod<S : K3InputMethodState<S, E>, E : K3Editor, U : K3InputMethod.UpdateStateScope<S, E>>(initialState: S)

The input method is the main class of the k3lp runtime, which manages the input method state and which provides thread-safe state update mechanisms.

Link copied to clipboard
abstract class K3InputMethodState<S : K3InputMethodState<S, E>, E : K3Editor>(val model: K3Model, val editor: E, val content: K3Content, val touchLayerId: K3LayerId)

Represents the current input method state.

Link copied to clipboard
class K3SurroundingText(val textBefore: String = "", val textSelected: String = "", val textAfter: String = "")

Describes the known surrounding text of a selection.

Link copied to clipboard
class K3TextRange(val start: Int, val end: Int)

A selection range from start to end in a text.

Properties

Link copied to clipboard
const val PRECISION_FACTOR: Int = 1000

Functions

Link copied to clipboard
Link copied to clipboard
fun doComputeLayout(model: K3Model, totalWidthPx: Int, totalHeightPx: Int, deviceWidthMm: Int, layerId: K3LayerId): K3ComputedLayout?