slint/api/sixtyfps-rs
Simon Hausmann ae1178dd55 Make the modifiers simple booleans in the key event
This will give a nicer API to expose to .60. If the struct weren't
repr(C) then the booleans would be nicely packed, but alas that's not
happening. On the other hand we're not keeping many instances of them
around.
2021-01-22 13:47:52 +01:00
..
sixtyfps-build Bump version 2020-12-14 08:49:54 +01:00
sixtyfps-macros Bump version 2020-12-14 08:49:54 +01:00
build.rs Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Cargo.toml By default, enable the GL backend also on desktop 2021-01-14 08:53:13 +01:00
compile_fail_tests.rs Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
docs Remove trailing slash from docs symlink 2020-09-07 11:22:55 +02:00
docs.rs Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop() 2021-01-19 09:50:22 +01:00
lib.rs Make the modifiers simple booleans in the key event 2021-01-22 13:47:52 +01:00
README.md Bump version 2020-12-14 08:49:54 +01:00
sixtyfps-docs-integration.html Prepare the compiler to be async 2020-10-30 15:00:04 +01:00

SixtyFPS-rs

Crates.io Docs.rs

A Rust UI toolkit

SixtyFPS is a UI toolkit that supports different programming languages. SixtyFPS-rs is the Rust API to interact with a SixtyFPS UI design from Rust.

The complete Rust documentation can be viewed online at https://sixtyfps.io/docs/rust/sixtyfps/.

Getting Started

The crate documentation shows how to use this crate.

Hello World

The most basic "Hello world" application can be achieved with a few lines of code:

In your Cargo.toml add:

[dependencies]
sixtyfps = "0.0.4"

And in your main.rs:

sixtyfps::sixtyfps!{
    HelloWorld := Window {
        Text {
            text: "hello world";
            color: green;
        }
    }
}
fn main() {
    HelloWorld::new().run();
}

The sixtyfps crate documentation contains more advanced examples and alternative ways to use this crate.

More examples

You can quickly try out the examples by cloning this repo and running them with cargo run

# Runs the "printerdemo" example
cargo run --release --bin printerdemo