Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Children(val tag: Int)

Annotates a Widget property as representing child widgets which are contained within the enclosing widget. Children in a Widget class must have a unique tag among all @Children annotations in the class. The type of the property must be () -> Unit.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Default(val expression: String)

Annotates a Property with an associated default expression. The expression is not type-checked and will be used verbatim in the generated code.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Modifier(val tag: Int, val scopes: KClass<*>)

Annotates a data class which represents a modifier for a Widget.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Property(val tag: Int)

Annotates a Widget property which represents a property on the associated UI widget. Properties in a Widget class must have a unique tag among all @Property annotations in the class.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Schema(val members: Array<KClass<*>>, val dependencies: Array<Schema.Dependency> = [], val reservedWidgets: IntArray = [], val reservedModifiers: IntArray = [])

Annotates an otherwise unused type with a set of Widget-annotated or Modifier-annotated classes which are all part of this schema.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Widget(val tag: Int, val reservedProperties: IntArray = [], val reservedChildren: IntArray = [])

Annotates a data class which represents a widget in a UI tree. Each widget in a Schema must have a unique tag among all @Widget annotations in the Schema.