Crate smithay_client_toolkit
source · [−]Expand description
Smithay Client Toolkit
Provides various utilities and abstractions for comunicating with various Wayland compositors.
Environment
The crate is structured around the Environment
type,
which binds the wayland globals for you using a set of modular handlers. This type is used in conjunction
with the environment!
if you want full control, or by using the
default_environment!
macro to automatically bring in all
SCTK modules.
The various modules work by adding methods to the Environment
type, giving you more capabilities as more modules are activated.
Event Loops
SCTK integrates with calloop
to provide an event loop abstraction. Indeed most Wayland
apps will need to handle more event sources than the single Wayland connection. These are
necessary to handle things like keyboard repetition, copy-paste, or animated cursors.
WaylandSource
is an adapter to insert a Wayland EventQueue
into
a calloop event loop. And some of the modules of SCTK will provide you with other event sources
that you need to insert into calloop for them to work correctly.
Modules
Helpers to handle data device related actions
Environment management utilities
Types and functions related to graphical outputs
Helpers to handle primary selection related actions.
Re-exports of some crates, for convenience
Types for automatically handling seats
Unified shell surface handling
Various small utilities helping you to write clients
Window abstraction
Macros
Declare a batteries-included SCTK environment
Macro for declaring an environment
Initialize a batteries-included SCTK environment
Structs
An error representing the fact that a required global was missing
An adapter to insert a Wayland EventQueue
into a calloop event loop
Functions
Returns a list of outputs the surface is displayed on.
Returns the current suggested scale factor of a surface.