Skip to main content

Crate eave_api

Crate eave_api 

Source
Expand description

The plugin API for eave.

A plugin is a crate that implements Widget for one or more types and exports a register function:

ⓘ
pub fn register(registry: &mut eave_api::Registry) {
    registry.widget::<Clock>("clock");
}

Widgets describe their UI with the closed vocabulary in ui. They never pick colors, fonts or spacing, and they never touch the bar’s layout or surfaces: the host owns all of that.

Re-exports§

pub use effect::Effect;
pub use effect::Nudge;

Modules§

time
Timers, for the few things that have no event source (clocks, /proc counters), and one-shot delays (Task::future(sleep(..)), e.g. to show something for a moment).
ui
The closed UI vocabulary widgets build their views from.

Structs§

Effect
What Widget::update asks for: async work, plus requests to the host.
NoConfig
The Widget::Config of a widget without options. Rejects any option it is given.
Registry
The widgets every plugin makes available, by the name config.toml uses. Cheap to clone: names and function pointers.
Subscription
A request to listen to external events.
Task
A set of concurrent actions to be performed by the iced runtime.

Enums§

Nudge
Which way something just went, so the host can give the widget’s island a nudge that way.

Constants§

API_VERSION
The version of this API. eave-build checks plugin manifests against it.

Traits§

Widget
Something that sits in the bar, with an optional popover.