Package-level declarations

Types

Link copied to clipboard
sealed interface ImageSize

The size of the GTK Image. The possible values correspond to GTK's IconSize, plus the Specific class to represent an exact value that will be set with Image.setPixelSize.

Link copied to clipboard
data class Mark(val value: Double, val position: PositionType, val markup: String? = null)
Link copied to clipboard
data class Offset(val name: String, val value: Double)
Link copied to clipboard
interface PopoverScope
Link copied to clipboard
sealed interface ProgressBarState
Link copied to clipboard
sealed interface RadioGroupState
Link copied to clipboard
sealed interface SelectionMode<M : SelectionModel<ListIndexModel.ListIndex>>

Functions

Link copied to clipboard
@Composable
fun Box(modifier: Modifier = Modifier, orientation: Orientation = Orientation.HORIZONTAL, spacing: Int = 0, homogeneous: Boolean = false, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun Button(onClick: () -> Unit, modifier: Modifier = Modifier, hasFrame: Boolean = true, child: @Composable () -> Unit = {})
@Composable
fun Button(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, hasFrame: Boolean = true)
Link copied to clipboard
@Composable
fun Calendar(modifier: Modifier = Modifier, date: LocalDate = LocalDate(year = DateTime.nowLocal().year, month = Month.JANUARY, dayOfMonth = 1), showDayNames: Boolean = true, showHeading: Boolean = true, showWeekNumber: Boolean = false, onDaySelect: (date: LocalDate) -> Unit? = null, onNextMonth: () -> Unit? = null, onNextYear: () -> Unit? = null, onPreviousMonth: () -> Unit? = null, onPreviousYear: () -> Unit? = null)
@Composable
fun Calendar(modifier: Modifier = Modifier, day: Int = 1, month: Int = 0, showDayNames: Boolean = true, showHeading: Boolean = true, showWeekNumber: Boolean = false, year: Int = DateTime.nowLocal().year, onDaySelect: (day: Int, month: Int, year: Int) -> Unit? = null, onNextMonth: () -> Unit? = null, onNextYear: () -> Unit? = null, onPreviousMonth: () -> Unit? = null, onPreviousYear: () -> Unit? = null)
Link copied to clipboard
@Composable
fun CenterBox(modifier: Modifier = Modifier, orientation: Orientation = Orientation.HORIZONTAL, start: @Composable () -> Unit = {}, end: @Composable () -> Unit = {}, baselinePosition: BaselinePosition = BaselinePosition.CENTER, shrinkCenterLast: Boolean = true, center: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun CheckButton(active: Boolean, onActiveRequest: (active: Boolean) -> Unit, modifier: Modifier = Modifier, inconsistent: Boolean = false, useUnderline: Boolean = false)

Creates a CheckButton without a label or custom child content.

@Composable
fun CheckButton(active: Boolean, onActiveRequest: (active: Boolean) -> Unit, modifier: Modifier = Modifier, inconsistent: Boolean = false, useUnderline: Boolean = false, child: @Composable () -> Unit)

Creates a CheckButton with a custom child composable as its content.

@Composable
fun CheckButton(active: Boolean, label: String, onActiveRequest: (active: Boolean) -> Unit, modifier: Modifier = Modifier, inconsistent: Boolean = false, useUnderline: Boolean = false)

Creates a CheckButton with a simple text label.

Link copied to clipboard
@Composable
fun Entry(text: String, onTextChange: (String) -> Unit, modifier: Modifier = Modifier, attributes: AttrList = emptyAttributes, placeholderText: String? = null, editable: Boolean = true, visibility: Boolean = true, activatesDefault: Boolean = false, alignment: Float = 0.0f, hasFrame: Boolean = true, inputHints: InputHints = InputHints.NONE, inputPurpose: InputPurpose = InputPurpose.FREE_FORM, invisibleChar: Char? = null, maxLength: Int = 0, progressFraction: Double = 0.0, tabs: TabArray? = null, enableUndo: Boolean = true, maxWidthChars: Int = -1, widthChars: Int = -1)

TODO:

Link copied to clipboard
@Composable
fun FlowBox(modifier: Modifier = Modifier, orientation: Orientation = Orientation.HORIZONTAL, activateOnSingleClick: Boolean = true, columnSpacing: Int = 0, rowSpacing: Int = 0, horizontalAdjustment: Adjustment = nullAdjustment, verticalAdjustment: Adjustment = nullAdjustment, homogeneous: Boolean = false, maxChildrenPerLine: Int = 7, minChildrenPerLine: Int = 0, content: @Composable () -> Unit)

TODO:

Link copied to clipboard
@Composable
fun Frame(modifier: Modifier = Modifier, labelXAlign: Float = 0.0f, label: @Composable () -> Unit? = null, child: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun <T : GObject> GridView(model: SelectionModel<T>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, minColumns: Int = 1, maxColumns: Int = 7, singleClickActivate: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, child: @Composable (item: T) -> Unit)

Creates a org.gnome.gtk.GridView bound to the given model. Each element is a composable created using child.

@Composable
fun <M : SelectionModel<ListIndexModel.ListIndex>> GridView(items: Int, selectionMode: SelectionMode<M>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, minColumns: Int = 1, maxColumns: Int = 7, singleClickActivate: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, child: @Composable (index: Int) -> Unit): M

Creates a org.gnome.gtk.GridView with items items. Each element is a composable created using child.

Link copied to clipboard
@Composable
fun GtkApplicationWindow(title: String?, onClose: () -> Unit, modifier: Modifier = Modifier, styles: List<CssProvider> = emptyList(), decorated: Boolean = true, defaultHeight: Int = 0, defaultWidth: Int = 0, deletable: Boolean = true, fullscreen: Boolean = false, maximized: Boolean = false, handleMenubarAccel: Boolean = true, modal: Boolean = false, resizable: Boolean = true, init: ApplicationWindow.() -> Unit = {}, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun HorizontalBox(modifier: Modifier = Modifier, spacing: Int = 0, homogeneous: Boolean = false, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun HorizontalSeparator(modifier: Modifier = Modifier)
Link copied to clipboard
@Composable
fun IconButton(icon: ImageSource.Icon, onClick: () -> Unit, modifier: Modifier = Modifier, hasFrame: Boolean = true)
Link copied to clipboard
@Composable
fun Image(image: ImageSource?, modifier: Modifier = Modifier, iconSize: ImageSize = ImageSize.Inherit)

Composable for GTK's org.gnome.gtk.Image. Generally used to display an icon.

Link copied to clipboard
@Composable
fun Label(text: String, modifier: Modifier = Modifier, ellipsize: EllipsizeMode = EllipsizeMode.NONE, justify: Justification = Justification.LEFT, lines: Int = -1, maxWidthChars: Int = -1, naturalWrapMode: NaturalWrapMode = NaturalWrapMode.INHERIT, selectable: Boolean = false, singleLineMode: Boolean = false, useMarkup: Boolean = false, useUnderline: Boolean = false, widthChars: Int = -1, wrap: Boolean = false, wrapMode: WrapMode = WrapMode.WORD, xAlign: Float = 0.5f, yAlign: Float = 0.5f, onActivateCurrentLink: () -> Unit? = null, onActivateLink: (uri: String) -> Boolean? = null, onCopyClipboard: () -> Unit? = null)
Link copied to clipboard
@Composable
fun LevelBar(value: Double, modifier: Modifier = Modifier, orientation: Orientation = Orientation.HORIZONTAL, inverted: Boolean = false, maxValue: Double = 1.0, minValue: Double = 0.0, mode: LevelBarMode = LevelBarMode.CONTINUOUS, offsets: List<Offset> = emptyList())
Link copied to clipboard
@Composable
fun LinkButton(label: String, uri: String, modifier: Modifier = Modifier, visited: Boolean = false, onActivateLink: () -> Boolean = { false })
Link copied to clipboard
@Composable
fun ListBox(modifier: Modifier = Modifier, activateOnSingleClick: Boolean = true, adjustment: Adjustment? = null, selectionMode: SelectionMode = SelectionMode.SINGLE, showSeparators: Boolean = false, placeholder: @Composable () -> Unit = {}, content: @Composable () -> Unit)

TODO:

Link copied to clipboard
@Composable
fun <T : GObject> ListView(model: SelectionModel<T>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, singleClickActivate: Boolean = false, showSeparators: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, child: @Composable (item: T) -> Unit)

Creates a org.gnome.gtk.ListView bound to the given model. Each element is a composable created using child.

@Composable
fun <M : SelectionModel<ListIndexModel.ListIndex>> ListView(items: Int, selectionMode: SelectionMode<M>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, singleClickActivate: Boolean = false, showSeparators: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, child: @Composable (index: Int) -> Unit): M

Creates a org.gnome.gtk.ListView with items items. Each element is a composable created using child.

Link copied to clipboard
@Composable
fun Overlay(mainChild: @Composable () -> Unit, modifier: Modifier = Modifier, overlays: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun Picture(image: ImageSource.PaintableFactory?, modifier: Modifier = Modifier, alternativeText: String? = null, canShrink: Boolean = true, contentFit: ContentFit = ContentFit.CONTAIN)
Link copied to clipboard
@Composable
fun Popover(trigger: @Composable PopoverScope.() -> Unit, modifier: Modifier = Modifier, arrow: Boolean = true, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun ProgressBar(state: ProgressBarState, modifier: Modifier = Modifier, ellipsize: EllipsizeMode = EllipsizeMode.NONE, inverted: Boolean = false, pulseStep: Double = 0.1, showText: Boolean = false, text: String? = null)
Link copied to clipboard
@Composable
fun RadioButton(state: RadioGroupState, active: Boolean, onSelect: () -> Unit, modifier: Modifier = Modifier, inconsistent: Boolean = false, useUnderline: Boolean = false)

Creates a RadioButton without a label or custom child content.

@Composable
fun RadioButton(state: RadioGroupState, active: Boolean, onSelect: () -> Unit, modifier: Modifier = Modifier, inconsistent: Boolean = false, useUnderline: Boolean = false, child: @Composable () -> Unit)

Creates a RadioButton with a custom child composable as its content.

@Composable
fun RadioButton(state: RadioGroupState, active: Boolean, label: String, onSelect: () -> Unit, modifier: Modifier = Modifier, inconsistent: Boolean = false, useUnderline: Boolean = false)

Creates a RadioButton with a simple text label.

Link copied to clipboard
@Composable
fun <Item : GObject> rememberMultiSelectionModel(items: List<Item>): MultiSelection<Item>
Link copied to clipboard
@Composable
fun <Item : GObject> rememberNoSelectionModel(items: List<Item>): NoSelection<Item>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Composable
fun <M : SelectionModel<ListIndexModel.ListIndex>> rememberSelectionModel(itemsCount: Int, selectionMode: SelectionMode<M>): M
Link copied to clipboard
@Composable
fun <Item : GObject> rememberSingleSelectionModel(items: List<Item>): SingleSelection<Item>
Link copied to clipboard
@Composable
fun Revealer(reveal: Boolean, modifier: Modifier = Modifier, transitionType: RevealerTransitionType = RevealerTransitionType.NONE, transitionDuration: Int = 0, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun Scale(value: Double, onChange: (ScrollType, Double) -> Unit, modifier: Modifier = Modifier, orientation: Orientation = Orientation.HORIZONTAL, lower: Double = 0.0, upper: Double = 100.0, digits: Int = 1, drawValue: Boolean = true, hasOrigin: Boolean = true, valuePosition: PositionType = PositionType.TOP, fillLevel: Double = Double.MAX_VALUE, flippable: Boolean = true, stepIncrements: Double = 0.0, pageIncrements: Double = 0.0, inverted: Boolean = false, showFillLevel: Boolean = false, marks: List<Mark> = emptyList())
Link copied to clipboard
@Composable
fun ScrolledWindow(modifier: Modifier = Modifier, horizontalScrollbarPolicy: PolicyType = PolicyType.AUTOMATIC, verticalScrollbarPolicy: PolicyType = PolicyType.AUTOMATIC, kineticScrolling: Boolean = true, minContentHeight: Int? = null, maxContentHeight: Int? = null, minContentWidth: Int? = null, maxContentWidth: Int? = null, overlayScrolling: Boolean = true, placement: CornerType = CornerType.TOP_LEFT, propagateNaturalHeight: Boolean = false, propagateNaturalWidth: Boolean = false, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun Separator(modifier: Modifier = Modifier, orientation: Orientation = Orientation.HORIZONTAL)
Link copied to clipboard
@Composable
fun Spinner(modifier: Modifier = Modifier, spinning: Boolean = false)
Link copied to clipboard
@Composable
fun Switch(active: Boolean, onToggle: (Boolean) -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
@Composable
fun ToggleButton(active: Boolean, onToggle: () -> Unit, modifier: Modifier = Modifier, hasFrame: Boolean = true, child: @Composable () -> Unit = {})
@Composable
fun ToggleButton(label: String, active: Boolean, onToggle: () -> Unit, modifier: Modifier = Modifier, hasFrame: Boolean = true)
Link copied to clipboard
@Composable
fun VerticalBox(modifier: Modifier = Modifier, spacing: Int = 0, homogeneous: Boolean = false, content: @Composable () -> Unit)
Link copied to clipboard
@Composable
fun VerticalSeparator(modifier: Modifier = Modifier)
Link copied to clipboard
@Composable
fun WindowControls(modifier: Modifier = Modifier, side: PackType = PackType.START)