Crate druid_shell[][src]

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 and druid-shell is using the x11 backend, it will avoid using the Present extension.

Re-exports

pub use image;
pub use kurbo;
pub use piet_common as piet;
pub use keyboard_types;

Modules

Platorm specific extensions.

Types and functions for cross-platform text input.

Structs

The top level application object.

A handle to the system clipboard.

Data coupled with a type identifier.

An incrementing counter for generating unique ids.

A platform-independent description of a custom cursor.

Options for file dialogs.

A token that uniquely identifies a file dialog request.

Information about the path to be opened or saved.

A description of a filetype, for specifiying allowed types in a file dialog.

A description of a keyboard shortcut.

A handle that can enqueue tasks on the window loop.

A token that uniquely identifies a idle schedule.

Information about a keyboard event.

A menu object.

The modifiers.

Monitor struct containing data about a monitor on the system

Information about the mouse event.

A union of rectangles, useful for describing an area that needs to be repainted.

Coordinate scaling between pixels and display points.

A specific area scaling state.

Information about the screen and monitors

Uniquely identifies a text input field inside a window.

A token that uniquely identifies a running timer.

A builder type for creating new windows.

A handle to a platform window object.

Enums

Code is the physical position of a key.

Mouse cursors.

Shell errors.

Describes the state the key is in.

The location attribute contains an indication of the logical location of the key on the device.

An indicator of which mouse button was pressed.

A representation of the active modifier keys.

A platform-agnostic representation of keyboard modifiers, for command handling.

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.

Contains the different states a Window can be in.

Traits

A top-level handler that is not associated with any window.

A convenience trait for creating Key objects.

The Scalable trait describes how coordinates should be translated from display points into pixels and vice versa using a Scale.

App behavior, supplied by the app.

Type Definitions

A type identifer for the system clipboard.

The meaning (mapped value) of a keypress.