minimal protocol for y

This commit is contained in:
Able 2022-01-15 08:45:29 -06:00
commit 01dce2cd93
3 changed files with 45 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/target
Cargo.lock

8
Cargo.toml Normal file
View file

@ -0,0 +1,8 @@
[package]
name = "y-compositor-protocol"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

35
src/lib.rs Normal file
View file

@ -0,0 +1,35 @@
pub struct WindowOption {
funct: WindowFunction,
symbol: char,
}
pub type WindowBar = Vec<WindowOption>;
pub type WindowID = u64;
pub struct Window {
bar: WindowBar,
}
// TODO: Seperate out this versioning into ableos-ver
#[repr(C)]
pub struct Version {
pub major: u8,
pub minor: u8,
pub patch: u8,
}
pub type WindowFunction = fn() -> ();
pub enum Protocol {
Version(Version),
WindowCreate(Window),
WindowClose(WindowID),
ReturnWindowID(WindowID),
// WindowAccess(WindowID),
}
#[test]
fn test_version() {}