Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
sealed class Frame<out T>
Link copied to clipboard
@Immutable
class Scene<T> : Comparable<Scene<*>>
Link copied to clipboard
fun interface SceneContent<T>
Link copied to clipboard
fun interface SceneDecorator
Link copied to clipboard
class SceneFormat(val size: IntSize, val density: Density)
Link copied to clipboard

What mode for a Scene is active. Scenes can be displayed multiple times and in multiple locations. It is useful for a scene to know what mode it is in, so it can change how it is rendered or perform different effects. For example, a scene may have an animation, which is not useful to play when the scene is being previewed.

Link copied to clipboard
@Stable
interface SceneScope<T>
Link copied to clipboard
@Stable
class Storyboard
Link copied to clipboard
sealed interface StoryboardBuilder

Properties

Link copied to clipboard
val DefaultEnterTransition: (AdvanceDirection) -> EnterTransition
Link copied to clipboard
val DefaultExitTransition: (AdvanceDirection) -> ExitTransition
Link copied to clipboard
val LocalSceneMode: ProvidableCompositionLocal<SceneMode?>
Link copied to clipboard
val LocalStoryboard: ProvidableCompositionLocal<Storyboard?>

Functions

Link copied to clipboard
operator fun <T : Comparable<T>> Frame<T>.compareTo(other: Frame<T>): Int
Link copied to clipboard
Link copied to clipboard
fun <T, R> Frame<T>.map(transform: (T) -> R): Frame<R>
Link copied to clipboard
Link copied to clipboard
fun <T> SceneScope<T>.Render(content: SceneContent<T>)
Link copied to clipboard
fun <T> StoryboardBuilder.scene(vararg states: T, enterTransition: (AdvanceDirection) -> EnterTransition = DefaultEnterTransition, exitTransition: (AdvanceDirection) -> ExitTransition = DefaultExitTransition, content: SceneContent<T>): Scene<T>
Link copied to clipboard
fun StoryboardBuilder.sceneForBoolean(enterTransition: (AdvanceDirection) -> EnterTransition = DefaultEnterTransition, exitTransition: (AdvanceDirection) -> ExitTransition = DefaultExitTransition, content: SceneContent<Boolean>): Scene<Boolean>
Link copied to clipboard
inline fun <T : Enum<T>> StoryboardBuilder.sceneForEnum(noinline enterTransition: (AdvanceDirection) -> EnterTransition = DefaultEnterTransition, noinline exitTransition: (AdvanceDirection) -> ExitTransition = DefaultExitTransition, content: SceneContent<T>): Scene<T>
Link copied to clipboard
fun StoryboardBuilder.sceneForTransition(enterTransition: (AdvanceDirection) -> EnterTransition = DefaultEnterTransition, exitTransition: (AdvanceDirection) -> ExitTransition = DefaultExitTransition, content: SceneContent<Nothing>): Scene<Nothing>
Link copied to clipboard
fun SceneFormat.toDpSize(): DpSize
Link copied to clipboard
fun <T, R : T> Frame<R>.toState(start: T = when { sceneScope.states.isNotEmpty() -> sceneScope.states.first() else -> error("implicit conversion to state requires non-empty states") }, end: T = when { sceneScope.states.isNotEmpty() -> sceneScope.states.last() else -> error("implicit conversion to state requires non-empty states") }): T

fun <T> Frame<T>.toState(start: T, end: T): T

Converts the Frame of type T to just a value of type T; where start is the default representation for Frame.Start, and end is the default representation for Frame.End.