Expand description
Platform abstraction for Druid toolkit.
druid-shell
is an abstraction around a given platform UI & application
framework. It provides common types, which then defer to a platform-defined
implementation.
§Env
For testing and debugging, druid-shell
can change its behavior based on environment
variables. Here is a list of environment variables that druid-shell
supports:
DRUID_SHELL_DISABLE_X11_PRESENT
: if this is set anddruid-shell
is using thex11
backend, it will avoid using the Present extension.
Re-exports§
pub use piet::image_crate as image;
pub use piet::kurbo;
pub use piet_common as piet;
pub use raw_window_handle;
pub use keyboard_types;
Modules§
Macros§
- accel
- Convenience macro for defining accelerator tables.
Structs§
- Application
- The top level application object.
- Clipboard
- A handle to the system clipboard.
- Clipboard
Format - Data coupled with a type identifier.
- Counter
- An incrementing counter for generating unique ids.
- Cursor
Desc - A platform-independent description of a custom cursor.
- File
Dialog Options - Options for file dialogs.
- File
Dialog Token - A token that uniquely identifies a file dialog request.
- File
Info - Information about the path to be opened or saved.
- File
Spec - A description of a filetype, for specifying allowed types in a file dialog.
- HotKey
- A description of a keyboard shortcut.
- Idle
Handle - A handle that can enqueue tasks on the window loop.
- Idle
Token - A token that uniquely identifies a idle schedule.
- KeyEvent
- Information about a keyboard event.
- Menu
- A menu object.
- Modifiers
- The modifiers.
- Monitor
- Monitor struct containing data about a monitor on the system
- Mouse
Buttons - A set of
MouseButton
s. - Mouse
Event - Information about the mouse event.
- Region
- A union of rectangles, useful for describing an area that needs to be repainted.
- Scale
- Coordinate scaling between pixels and display points.
- Scaled
Area - A specific area scaling state.
- Screen
- Information about the screen and monitors
- Text
Field Token - Uniquely identifies a text input field inside a window.
- Timer
Token - A token that uniquely identifies a running timer.
- Window
Builder - A builder type for creating new windows.
- Window
Handle - A handle to a platform window object.
Enums§
- Code
- Code is the physical position of a key.
- Cursor
- Mouse cursors.
- Error
- Shell errors.
- KeyState
- Describes the state the key is in.
- Location
- The location attribute contains an indication of the logical location of the key on the device.
- Mouse
Button - An indicator of which mouse button was pressed.
- RawMods
- A representation of the active modifier keys.
- SysMods
- A platform-agnostic representation of keyboard modifiers, for command handling.
- Window
Level - Levels in the window system - Z order for display purposes. Describes the purpose of a window and should be mapped appropriately to match platform conventions.
- Window
State - Contains the different states a Window can be in.
Traits§
- AppHandler
- A top-level handler that is not associated with any window.
- IntoKey
- A convenience trait for creating Key objects.
- Scalable
- The
Scalable
trait describes how coordinates should be translated from display points into pixels and vice versa using aScale
. - WinHandler
- App behavior, supplied by the app.