fm/event/fm_events.rs
1use crossterm::event::Event;
2
3use crate::event::ActionMap;
4
5/// Internal and terminal events.
6/// Most of events are sent from the terminal emulator.
7/// Here we wrap them with a few internal variants.
8/// It allows us to capture all events at the same place and force some actions internally.
9pub enum FmEvents {
10 /// A refresh is required
11 Refresh,
12 /// User has saved its filenames and we can rename/create them
13 BulkExecute,
14 /// The first file in file queue has been copied
15 FileCopied,
16 /// Event from the terminal itself (restart, resize, key, mouse etc.)
17 Term(Event),
18 /// Action sent directly to be dispatched and executed
19 Action(ActionMap),
20 /// IPC event received from external process
21 Ipc(String),
22 /// Empty events. Used to:
23 /// - to check if a new preview should be attached
24 /// - to send a "tick" to the fuzzy matcher if it's set
25 UpdateTick,
26}