add opcodes for updating status bar and running busy animations

This commit is contained in:
bunnie 2023-10-20 00:40:26 +08:00
parent e2594a3000
commit 8401d924e0

View file

@ -36,10 +36,20 @@ pub enum ChatOp {
/// Find a Post by timestamp and Author
PostFind,
PostFlag,
/// Run or stop the busy animation.
SetBusyAnimationState,
/// Update just the state of the busy animation, if any. Internal opcode.
UpdateBusy,
/// exit the application
Quit,
}
#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)]
pub(crate) enum BusyAnimOp {
Start,
Pump,
}
#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)]
pub enum IconOp {
PostMenu = 0,
@ -120,3 +130,11 @@ pub enum AuthorFlag {
Hidden,
Right,
}
#[derive(Archive, Serialize, Deserialize, Debug)]
pub struct BusyMessage {
/// If None, restores the last non-busy status bar message, and stops the animation.
/// If Some, updates the status bar to contain the busy message and
/// starts the animation running.
pub busy_msg: Option<xous_ipc::String<128>>,
}