androidx.compose.remote.creation.compose.state

Interfaces

MutableRemoteState

A readable and writable Remote Compose State value.

RemotePaint

A paint object used for remote drawing operations.

RemoteState

A readable but not writable Remote Compose State value.

RemoteStateScope

Scope for accessing remote state IDs.

Classes

BaseRemoteState

Common base interface for all Remote types.

MutableRemoteBitmap

A mutable implementation of RemoteBitmap that holds its value in a MutableState.

MutableRemoteBoolean

A mutable implementation of RemoteBoolean.

MutableRemoteFloat

A mutable implementation of RemoteFloat.

MutableRemoteInt

A mutable implementation of RemoteInt.

MutableRemoteLong

A mutable implementation of RemoteLong.

MutableRemoteString

An implementation of RemoteString that holds its value in a MutableState.

RemoteBitmap

Abstract base class for all remote bitmap representations in Compose Remote, this class extends RemoteState.

RemoteBoolean

A class representing a remote boolean value.

RemoteColor

Represents a color that can be used with canvas APIs.

RemoteDp

Represents a Density-independent pixel (Dp) value.

RemoteFloat

Abstract base class for all remote float representations.

RemoteInt

Abstract base class for all remote integer representations.

RemoteLong

Abstract base class for all remote long representations.

RemoteState.Domain

Represents the domain (namespace) for named remote states.

RemoteString

Abstract base class for all remote string representations.

RemoteTextUnit

Represents a TextUnit value (Sp or Em) backed by a RemoteFloat.

Objects

RemoteState.Domain.System

The system-defined domain, used for platform-level or framework state.

RemoteState.Domain.User

The default user-defined domain.

Composables

rememberMutableRemoteBoolean

Factory composable for mutable remote boolean state.

rememberMutableRemoteFloat

Remembers a remote float expression based on RemoteFloatContext.

rememberMutableRemoteInt

Factory composable for mutable remote integer state.

rememberMutableRemoteString

Factory composable for mutable remote string state.

rememberNamedRemoteBitmap

Remembers a named remote bitmap expression.

rememberNamedRemoteBoolean

Remembers a named remote boolean expression.

rememberNamedRemoteColor

Remembers a named remote color expression.

rememberNamedRemoteDp

Remembers a named remote Dp expression.

rememberNamedRemoteFloat

Remembers a named remote float expression.

rememberNamedRemoteInt

Remembers a named remote integer expression.

rememberNamedRemoteLong

Remembers a named remote long expression.

rememberNamedRemoteString

Remembers a named remote string expression.

Top-level functions summary

RemoteFloat

Returns the absolute value of the given RemoteFloat.

RemoteFloat

Computes the arc cosine of the given RemoteFloat.

RemoteFloat

Computes the arc sine of the given RemoteFloat.

RemoteFloat

Computes the arc tangent of the given RemoteFloat value.

RemoteFloat

Returns the angle theta from the conversion of rectangular coordinates (b, a) to polar coordinates (r, theta).

RemoteFloat

Returns the cube root of a RemoteFloat.

RemoteFloat

Returns the smallest RemoteFloat that is greater than or equal to a and is a mathematical integer.

RemoteFloat
clamp(value: RemoteFloat, min: RemoteFloat, max: RemoteFloat)

Restricts the given value to the range defined by min and max.

RemoteFloat

Returns the first floating-point argument with the sign of the second floating-point argument.

RemoteFloat

Computes the cosine of the given RemoteFloat.

RemoteFloat

Returns Euler's number e raised to the power of the given RemoteFloat value a.

RemoteFloat

Returns the largest (closest to positive infinity) RemoteFloat value that is less than or equal to a and is equal to a mathematical integer.

RemoteFloat
lerp(from: RemoteFloat, to: RemoteFloat, tween: RemoteFloat)

Computes from + (to - from) * tween.

RemoteFloat
RemoteFloat

Computes the base-10 logarithm of the RemoteFloat.

RemoteFloat

Computes a multiply-add operation: a * b + c.

RemoteFloat

Returns the greater of two RemoteFloat values.

RemoteFloat

Returns the smaller of two RemoteFloat values.

RemoteFloat

Raises a to the power of b.

RemoteFloat

Returns the value of the given RemoteFloat rounded to the nearest integer.

RemoteFloat

Returns the sign of the given RemoteFloat.

RemoteFloat

Computes the sine of the given RemoteFloat.

RemoteFloat

Returns the positive square root of the given RemoteFloat.

RemoteFloat

Computes the trigonometric tangent of an angle in radians.

RemoteFloat

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

RemoteFloat

Converts the given RemoteFloat value in degrees to radians.

RemoteColor
tween(from: RemoteColor, to: RemoteColor, tween: RemoteFloat)

Creates a remote color that interpolates between two RemoteColors based on a tween factor.

Extension functions summary

RemoteDp

Converts this RemoteFloat to a RemoteDp directly (1:1)

Extension properties summary

RemoteBitmap

Extension property to convert a ImageBitmap to a RemoteBitmap.

RemoteBoolean

Extension property to convert a Boolean to a RemoteBoolean.

RemoteColor

Extension property to convert a Color to a RemoteColor.

RemoteDp

Extension property to convert a Float to a RemoteDp.

RemoteDp

Extension property to convert an Int to a RemoteDp.

RemoteFloat

Extension property to convert a Float to a RemoteFloat.

RemoteFloat

Extension property to convert an Int to a RemoteFloat.

RemoteInt

Extension property to convert an Int to a RemoteInt.

RemoteString

Extension property to convert a String to a RemoteString.

RemoteTextUnit

Extension property to convert an Int to a RemoteTextUnit in Sp.

Top-level functions

fun abs(a: RemoteFloat): RemoteFloat

Returns the absolute value of the given RemoteFloat.

Parameters
a: RemoteFloat

The RemoteFloat whose absolute value is to be determined.

Returns
RemoteFloat

A RemoteFloat representing the absolute value of a.

fun acos(a: RemoteFloat): RemoteFloat

Computes the arc cosine of the given RemoteFloat.

Parameters
a: RemoteFloat

The value whose arc cosine is to be computed.

Returns
RemoteFloat

The arc cosine of a in radians.

fun asin(a: RemoteFloat): RemoteFloat

Computes the arc sine of the given RemoteFloat.

Parameters
a: RemoteFloat

The value whose arc sine is to be computed.

Returns
RemoteFloat

The arc sine of a in radians.

fun atan(a: RemoteFloat): RemoteFloat

Computes the arc tangent of the given RemoteFloat value.

Parameters
a: RemoteFloat

The value whose arc tangent is to be computed.

Returns
RemoteFloat

The arc tangent of a, in radians, in the range of -pi/2 to pi/2.

fun atan2(a: RemoteFloat, b: RemoteFloat): RemoteFloat

Returns the angle theta from the conversion of rectangular coordinates (b, a) to polar coordinates (r, theta).

Parameters
a: RemoteFloat

The y-coordinate

b: RemoteFloat

The x-coordinate

fun cbrt(a: RemoteFloat): RemoteFloat

Returns the cube root of a RemoteFloat.

fun ceil(a: RemoteFloat): RemoteFloat

Returns the smallest RemoteFloat that is greater than or equal to a and is a mathematical integer.

fun clamp(value: RemoteFloat, min: RemoteFloat, max: RemoteFloat): RemoteFloat

Restricts the given value to the range defined by min and max.

Parameters
value: RemoteFloat

The RemoteFloat value to be clamped

min: RemoteFloat

The lower bound of the range

max: RemoteFloat

The upper bound of the range

fun copySign(a: RemoteFloat, b: RemoteFloat): RemoteFloat

Returns the first floating-point argument with the sign of the second floating-point argument.

Parameters
a: RemoteFloat

The value whose magnitude is used.

b: RemoteFloat

The value whose sign is used.

fun cos(a: RemoteFloat): RemoteFloat

Computes the cosine of the given RemoteFloat.

Parameters
a: RemoteFloat

The value in radians whose cosine is to be computed.

Returns
RemoteFloat

The cosine of a.

fun exp(a: RemoteFloat): RemoteFloat

Returns Euler's number e raised to the power of the given RemoteFloat value a.

fun floor(a: RemoteFloat): RemoteFloat

Returns the largest (closest to positive infinity) RemoteFloat value that is less than or equal to a and is equal to a mathematical integer.

fun lerp(from: RemoteFloat, to: RemoteFloat, tween: RemoteFloat): RemoteFloat

Computes from + (to - from) * tween.

Parameters
from: RemoteFloat

The RemoteFloat we're interpolating from, i.e. when tween is 0, lerp evaluates to from

to: RemoteFloat

The RemoteFloat we're interpolating towards, i.e. when tween is 1, lerp evaluates to to

tween: RemoteFloat

The ratio between from and to that controls the result.

fun log(a: RemoteFloat): RemoteFloat

Computes the base-10 logarithm of the RemoteFloat.

Parameters
a: RemoteFloat

The value whose logarithm is to be computed.

fun mad(a: RemoteFloat, b: RemoteFloat, c: RemoteFloat): RemoteFloat

Computes a multiply-add operation: a * b + c.

Parameters
a: RemoteFloat

The first multiplier

b: RemoteFloat

The second multiplier

c: RemoteFloat

The value to be added to the product of a and b

fun max(a: RemoteFloat, b: RemoteFloat): RemoteFloat

Returns the greater of two RemoteFloat values.

Parameters
a: RemoteFloat

The first RemoteFloat value.

b: RemoteFloat

The second RemoteFloat value.

Returns
RemoteFloat

The larger of a and b.

fun min(a: RemoteFloat, b: RemoteFloat): RemoteFloat

Returns the smaller of two RemoteFloat values.

Parameters
a: RemoteFloat

The first RemoteFloat value

b: RemoteFloat

The second RemoteFloat value

Returns
RemoteFloat

A RemoteFloat representing the minimum of a and b

fun pow(a: RemoteFloat, b: RemoteFloat): RemoteFloat

Raises a to the power of b.

Parameters
a: RemoteFloat

The base value.

b: RemoteFloat

The exponent value.

Returns
RemoteFloat

A RemoteFloat representing a raised to the power of b.

fun round(a: RemoteFloat): RemoteFloat

Returns the value of the given RemoteFloat rounded to the nearest integer.

Parameters
a: RemoteFloat

The RemoteFloat to be rounded.

fun sign(a: RemoteFloat): RemoteFloat

Returns the sign of the given RemoteFloat.

Parameters
a: RemoteFloat

The value whose sign is to be returned.

Returns
RemoteFloat

1.0 if the value is positive, -1.0 if it is negative, and 0.0 if it is zero.

fun sin(a: RemoteFloat): RemoteFloat

Computes the sine of the given RemoteFloat.

Parameters
a: RemoteFloat

The angle in radians.

Returns
RemoteFloat

The sine of a.

fun sqrt(a: RemoteFloat): RemoteFloat

Returns the positive square root of the given RemoteFloat.

fun tan(a: RemoteFloat): RemoteFloat

Computes the trigonometric tangent of an angle in radians.

Parameters
a: RemoteFloat

The angle in radians.

fun toDeg(a: RemoteFloat): RemoteFloat

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

Parameters
a: RemoteFloat

An angle, in radians

Returns
RemoteFloat

The measurement of the angle a in degrees

fun toRad(a: RemoteFloat): RemoteFloat

Converts the given RemoteFloat value in degrees to radians.

fun tween(from: RemoteColor, to: RemoteColor, tween: RemoteFloat): RemoteColor

Creates a remote color that interpolates between two RemoteColors based on a tween factor. This allows for dynamic color transitions where both the start/end colors and the interpolation factor can be remote expressions.

Parameters
from: RemoteColor

The starting RemoteColor.

to: RemoteColor

The ending RemoteColor.

tween: RemoteFloat

A RemoteFloat representing the interpolation factor in range 0..1.

Returns
RemoteColor

A new RemoteColor representing the tweened color.

Extension functions

fun RemoteFloat.asRemoteDp(): RemoteDp

Converts this RemoteFloat to a RemoteDp directly (1:1)

Extension properties

val ImageBitmap.rbRemoteBitmap

Extension property to convert a ImageBitmap to a RemoteBitmap.

val Boolean.rbRemoteBoolean

Extension property to convert a Boolean to a RemoteBoolean.

val Color.rcRemoteColor

Extension property to convert a Color to a RemoteColor.

val Float.rdpRemoteDp

Extension property to convert a Float to a RemoteDp.

val Int.rdpRemoteDp

Extension property to convert an Int to a RemoteDp.

val Float.rfRemoteFloat

Extension property to convert a Float to a RemoteFloat.

val Int.rfRemoteFloat

Extension property to convert an Int to a RemoteFloat.

val Int.riRemoteInt

Extension property to convert an Int to a RemoteInt.

val String.rsRemoteString

Extension property to convert a String to a RemoteString.

val Int.rspRemoteTextUnit

Extension property to convert an Int to a RemoteTextUnit in Sp.