Namespace slint::platform#

Detailed Description#

Use the types in this namespace when implementing a custom Slint platform.

Slint comes with built-in support for different windowing systems, called backends. A backend is a module that implements the Class Platform interface in this namespace, interacts with a windowing system, and uses one of Slint’s renderers to display a scene to the windowing system. A typical Slint application uses one of the built-in backends. Implement your own Class Platform if you’re using Slint in an environment without a windowing system, such as with microcontrollers, or you’re embedding a Slint UI as plugin in other applications.

Examples of custom platform implementation can be found in the Slint repository:

The entry point to re-implement a platform is the Class Platform class. Derive from Class Platform, and call Function slint::platform::set_platform to set it as the Slint platform.

Another important class to subclass is the Class WindowAdapter.