#[repr(i32)]pub enum BridgeKind {
Show 36 variants
Pressed = 0,
TextChanged = 1,
ToggleChanged = 2,
ValueChanged = 3,
SelectionChanged = 4,
NavBack = 5,
FrameChanged = 6,
Deeplink = 7,
PresentButton = 8,
PresentText = 9,
PresentDismissed = 10,
Gesture = 11,
Custom = 12,
MenuAction = 13,
Lifecycle = 14,
PresentFile = 15,
FocusChanged = 16,
Submitted = 17,
WindowResized = 18,
SafeArea = 19,
WindowClosed = 20,
WindowFocused = 21,
ValueCommitted = 22,
SearchChanged = 23,
NavPresentation = 24,
AppearanceChanged = 25,
CoverHidden = 26,
LinkActivated = 27,
UndoInvoked = 28,
ToolbarChanged = 30,
ListActivated = 31,
DocumentOpened = 32,
ReduceMotionChanged = 33,
Key = 29,
WindowStateChanged = 34,
RefreshRequested = 35,
}Expand description
One numeric event kind. as i32 is the wire value.
Variants§
Pressed = 0
Click/press. No payload.
TextChanged = 1
text = the field’s full new text.
ToggleChanged = 2
num != 0 ⇒ on.
ValueChanged = 3
num = the new value.
SelectionChanged = 4
num = the selected index.
num == 1 ⇒ the native side already popped (predictive back / up arrow).
FrameChanged = 6
Nav/tab page size report; text = "w,h" in px (Rust divides by density).
Deeplink = 7
Warm deep link; text = the route.
PresentButton = 8
Modal answered with a button; num = the button index.
PresentText = 9
Modal answered with text; text = the entry.
PresentDismissed = 10
Modal dismissed.
Gesture = 11
Gesture; num = phase (0 tap, 1 began, 2 changed, 3 ended), text = "x,y,tx,ty" px.
Custom = 12
Piece-defined open channel (Event::Custom with an empty tag): the piece reads the
raw num/text payload.
MenuAction = 13
Menu selection; the event’s node id is the chosen action’s dispatch id.
Lifecycle = 14
App lifecycle; num = the phase code (day_spec::Lifecycle order).
PresentFile = 15
File-picker answer; text = chosen locators joined by the unit separator.
FocusChanged = 16
num != 0 ⇒ gained keyboard focus.
Submitted = 17
IME action / Return.
WindowResized = 18
Root size change; text = "w,h" in px. Routed to WINDOW_NODE as a window
resize (the rail rotation, late inset passes, and the soft keyboard ride).
SafeArea = 19
Safe-area report from an edge-to-edge backend; text =
"top,bottom,leading,trailing" in px (Rust divides by density and feeds
day_core::set_safe_area). Node id ignored; no Event is emitted.
WindowClosed = 20
A secondary window closed (docs/windows.md); the node id is the window’s root.
WindowFocused = 21
A secondary window’s key/active state changed; num != 0 ⇒ focused.
ValueCommitted = 22
num = the settled value: the drag ended (see Event::ValueCommitted). A backend
that cannot tell a settled value from a moving one sends only ValueChanged.
SearchChanged = 23
Inline search on a .searchable() navigation surface (docs/search.md): the field’s
new text, against the nav host’s node. num = 1 ⇒ the text was submitted (Return or
the keyboard’s Search key), decoding to crate::Event::SearchSubmitted.
The toolkit’s own adaptive nav container changed presentation and is reporting it
(docs/size-classes.md). num = 1.0 for split, 0.0 for stacked.
AppearanceChanged = 25
The system switched between light and dark appearance. No payload; node id ignored
and no Event is emitted; Rust calls day_core::note_appearance_changed, the same
thing AppKit’s and GTK’s own scheme observers do.
CoverHidden = 26
A fullscreen cover’s hide transition finished (docs/cover.md); no payload, and the
node id is the cover’s. Decodes to crate::Event::CoverHidden.
LinkActivated = 27
A styled text run’s link was tapped (docs/text-runs.md); text = the run’s target.
Decodes to crate::Event::LinkActivated.
UndoInvoked = 28
The platform’s own undo affordance fired (⌘Z, a three-finger swipe, the Edit menu
through a native front); num != 0 ⇒ redo.
ToolbarChanged = 30
A toolbar item produced a value (docs/toolbars.md): the node id is the item’s
dispatch action; text = "on" with num != 0 ⇒ a toggle turned on, "on" with
0 ⇒ off, "sel" with num = the chosen segment, "text:<query>" ⇒ a search
item’s new text, "submit:<query>" ⇒ that text submitted. Decodes to
crate::Event::ToolbarChanged. A plain toolbar button sends MenuAction.
ListActivated = 31
An activated list row; num is its current index.
DocumentOpened = 32
External document copied into app storage; text = its local locator.
ReduceMotionChanged = 33
The user’s reduce-motion setting flipped (docs/accessibility.md). No payload; node
id ignored and no Event is emitted; Rust calls day_core::note_motion_changed, as
the desktop backends’ own observers do.
Key = 29
A non-text key reached the focused node (docs/menus.md); text = the day key name
("ArrowLeft", "5", …), num = the crate::KeyEvent modifier mask. Decodes to
crate::Event::Key.
WindowStateChanged = 34
A window’s display state changed (docs/windows.md): num = the
crate::WindowState code (0 normal, 1 minimized, 2 maximized, 3 fullscreen), against
the window’s root node, or crate::WINDOW_NODE for the primary. Decodes to
crate::Event::WindowStateChanged through crate::WindowState::from_code.
RefreshRequested = 35
Native pull-to-refresh request; no payload.
Implementations§
Source§impl BridgeKind
impl BridgeKind
Sourcepub const ALL: [BridgeKind; 36]
pub const ALL: [BridgeKind; 36]
Every variant, for uniqueness/parity tests and exhaustive dispatch.
Trait Implementations§
Source§impl Clone for BridgeKind
impl Clone for BridgeKind
Source§fn clone(&self) -> BridgeKind
fn clone(&self) -> BridgeKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more