42 lines
836 B
Rust
42 lines
836 B
Rust
#![no_std]
|
|
use alloc::vec::Vec;
|
|
use bincode::{Decode, Encode};
|
|
|
|
#[derive(Encode, Decode, PartialEq, Debug)]
|
|
pub struct WindowOption {
|
|
// funct: WindowFunction,
|
|
symbol: char,
|
|
}
|
|
// #[derive(Encode, Decode, PartialEq, Debug)]
|
|
pub type WindowBar = Vec<WindowOption>;
|
|
|
|
pub type WindowID = u64;
|
|
#[derive(Encode, Decode, PartialEq, Debug)]
|
|
pub struct Window {
|
|
bar: WindowBar,
|
|
}
|
|
|
|
// TODO: Seperate out this versioning into ableos-ver
|
|
#[derive(Encode, Decode, PartialEq, Debug)]
|
|
pub struct Version {
|
|
pub major: u8,
|
|
pub minor: u8,
|
|
pub patch: u8,
|
|
}
|
|
|
|
pub type WindowFunction = fn() -> ();
|
|
|
|
#[derive(Encode, Decode, PartialEq, Debug)]
|
|
pub enum Protocol {
|
|
Version(Version),
|
|
|
|
WindowCreate(Window),
|
|
WindowClose(WindowID),
|
|
|
|
ReturnWindowID(WindowID),
|
|
// WindowAccess(WindowID),
|
|
}
|
|
|
|
#[test]
|
|
fn test_version() {}
|