slint/api/sixtyfps-rs
Simon Hausmann 1e4921de13 Fix LSP server staying alive when closing preview window
* Provide an internal behavior parameter to run_event_loop() that we can use
from the preview to not quit when the last window was closed.
* Fix Drop for the winit event loop GraphicsWindow to drop the backend window correctly
  when unmapping, not when the graphics window dies. Otherwise QuitOnLastWindowClosed doesn't work.
2021-04-06 12:11:55 +02:00
..
sixtyfps-build Create a Diagnostic quen the main .60 file can't be loaded 2021-03-15 11:44:20 +01:00
sixtyfps-macros Create a Diagnostic quen the main .60 file can't be loaded 2021-03-15 11:44:20 +01:00
build.rs Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Cargo.toml Rust: fix compilation when using bindings in global 2021-02-16 15:16:01 +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 Rename call_* to invoke_* for callbacks 2021-03-15 17:01:05 +01:00
lib.rs Fix LSP server staying alive when closing preview window 2021-04-06 12:11:55 +02:00
README.md Update version number everywhere 2021-01-28 16:34:13 +01:00
sixtyfps-docs-integration.html For the master documentation, use the master version of the interpreter 2021-02-03 15:50:34 +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.5"

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