guion/
aliases.rs

1//! Aliases for deep/nested types inside Env
2#![allow(type_alias_bounds)]
3use super::*;
4
5pub type ERenderer<E: Env> = <E::Backend as Backend<E>>::Renderer;
6pub type EEvent<E: Env> = <E::Backend as Backend<E>>::Event;
7pub type EEDest<E: Env> = <EEvent<E> as Event<E>>::Dest;
8pub type EEKey<E: Env> = <EEvent<E> as Event<E>>::Key;
9pub type EEFilter<E: Env> = <E::Backend as Backend<E>>::EventFilter;
10pub type EStyle<E: Env> = <E::Backend as Backend<E>>::Style;
11pub type ESize<E: Env> = <E::Backend as Backend<E>>::Size;
12
13pub type ESSelector<E: Env> = <EStyle<E> as Style<E>>::Selector;
14pub type ESGlyphs<E: Env> = <EStyle<E> as Style<E>>::Glyphs;
15pub type ESGlyph<E: Env> = <ESGlyphs<E> as Glyphs<E>>::Glyph;
16pub type ESFont<E: Env> = <EStyle<E> as Style<E>>::Font;
17pub type ESColor<E: Env> = <EStyle<E> as Style<E>>::Color;
18pub type ESCursor<E: Env> = <EStyle<E> as Style<E>>::Cursor;
19pub type ECHandler<E: Env> = <E::Context as Context<E>>::Handler;
20pub type ECQueue<E: Env> = <E::Context as Context<E>>::Queue;
21
22pub type ECStdState<E: Env> = <E::Context as CtxStdState<E>>::T;
23pub type EPressedKey<E: Env> = <ECStdState<E> as StdState<E>>::K;
24
25pub type CtxRef<'a,E: Env> = (&'a E::Storage,&'a mut E::Context);
26pub type CtxRefR<'a,E: Env> = (&'a E::Storage,&'a E::Context);
27pub type CtxRefM<'a,E: Env> = (&'a mut E::Storage,&'a mut E::Context);
28
29/// Reference to a [`Widget`](Widget) or [immediate widget](AsWidget)
30pub type WidgetRef<'a,E: Env> = Box<(dyn Widget<E>+'a)>;
31/// Reference to a [`Widget`](WidgetMut) or [immediate widget](AsWidgetMut)
32pub type WidgetRefMut<'a,E: Env> = Box<(dyn WidgetMut<E>+'a)>;