radar-g/radar-g/src/components/control_panel/messages.rs
2024-08-23 16:12:27 +08:00

36 lines
747 B
Rust

use chrono::{DateTime, Duration, Utc};
use tokio::sync::oneshot;
#[derive(Debug)]
pub enum TimelineMsg {
Rewind(Duration),
FastForward(Duration),
SetStart(DateTime<Utc>),
Disable,
Enable,
}
#[derive(Debug)]
pub enum ControlPanelInputMsg {
TimeLine(TimelineMsg),
Selection(Option<DateTime<Utc>>),
SetThumb(
Vec<(
Option<gtk::gdk::Texture>,
Option<oneshot::Receiver<gtk::gdk::Texture>>,
DateTime<Utc>,
)>,
),
SetThumbByDate((DateTime<Utc>, Option<gtk::gdk::Texture>)),
SelectionRewind,
SelectionFastForward,
SetKey(String),
Disable,
Enable,
}
#[derive(Debug)]
pub enum ControlPanelOutputMsg {
OpenFile((String, DateTime<Utc>)),
}