Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links from Rust and C++ to the common platform backend docs #3347

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions api/cpp/docs/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ Slint uses [Corrosion](https://github.com/corrosion-rs/corrosion) to build Slint

Furthermore, you can set the `SLINT_TARGET_CARGO_FLAGS` cache variable to specify additional flags for the Slint runtime during the build.

### Back-Ends
### Platform Backends

Slint needs a back-end that acts as liaison between Slint and the OS. Several
back-ends can be built into the Slint library at the same time, but only one
is used a run time.
In Slint, a backend is the module that encapsulates the interaction with the operating system,
in particular the windowing sub-system. Multiple backends can be compiled into Slint and one
backend is selected for use at run-time on application start-up. You can configure Slint without
any built-in backends, and instead develop your own backend by implementing Slint's platform
abstraction and window adapter interfaces.

#### Compile Time Back-End Selection
For more information about the available backends, their system requirements, and configuration
options, see the [Platform Backend Documentation](slint-reference:src/advanced/backends.html).

#### Compile Time Backend Selection

By default Slint will include both the Qt and
[winit](https://crates.io/crates/winit) back-ends -- if both are detected at
Expand All @@ -122,13 +127,13 @@ compile time. You can enable or disable back-ends using the
you would disable the `SLINT_FEATURE_BACKEND_WINIT` option in your CMake
project configuration.

The winit back-end needs a renderer. `SLINT_FEATURE_RENDERER_FEMTOVG` is
the only stable renderer, the other ones are experimental. If you disable the
`SLINT_FEATURE_BACKEND_WINIT`, you will also want to disable the renderer!
The winit back-end needs a renderer. `SLINT_FEATURE_RENDERER_FEMTOVG` and
`SLINT_FEATURE_RENDERER_SKIA` are the only stable renderers, the other ones are
experimental.

#### Run Time Back-End Selection
#### Run Time Backend Selection

It's also possible to select any of the compiled in back-ends and renderer at
It's also possible to select any of the compiled in backends and renderer at
runtime, using the `SLINT_BACKEND` environment variable.

* `SLINT_BACKEND=Qt` selects the Qt back-end
Expand Down
4 changes: 4 additions & 0 deletions api/cpp/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
# Annotate h1/h2 elements with anchors
myst_heading_anchors = 2

myst_url_schemes = {
"slint-reference": f"https://slint.dev/releases/{version}/docs/slint/{{{{path}}}}",
}

rst_epilog = """
.. |ListView| replace:: :code:`ListView`
.. _ListView: ../../slint/src/builtins/widgets.html#listview
Expand Down
1 change: 1 addition & 0 deletions api/rs/slint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This crate is the main entry point for embedding user interfaces designed with

*/
#![doc = concat!("* [The Slint Language Documentation](https://slint.dev/releases/", env!("CARGO_PKG_VERSION"), "/docs/slint)")]
#![doc = concat!("* [Platform Backends](https://slint.dev/releases/", env!("CARGO_PKG_VERSION"), "/docs/slint/src/advanced/backends.html)")]
/*! * [Slint on Microcontrollers](docs::mcu)

## How to use this crate:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/src/advanced/backends.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->

# Backends
# Platform Backends

In Slint, a backend is the module that encapsulates the interaction with the operating system,
in particular the windowing sub-system. Multiple backends can be compiled into Slint and one
Expand Down
Loading