Crate smithay_client_toolkit[−][src]
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
data_device | Helpers to handle data device related actions |
environment | Environment management utilities |
output | Types and functions related to graphical outputs |
primary_selection | Helpers to handle primary selection related actions. |
reexports | Re-exports of some crates, for convenience |
seat | Types for automatically handling seats |
shell | Unified shell surface handling |
shm | Various small utilities helping you to write clients |
window | Window abstraction |
Macros
default_environment | Declare a batteries-included SCTK environment |
environment | Macro for declaring an environment |
new_default_environment | Initialize a batteries-included SCTK environment |
Structs
WaylandSource | An adapter to insert a Wayland |
Functions
get_surface_outputs | Returns a list of outputs the surface is displayed on. |
get_surface_scale_factor | Returns the current suggested scale factor of a surface. |