minimal protocol for y

master
Able 2022-01-15 08:45:29 -06:00
commit f69d05deb7
Signed by: able
GPG Key ID: D164AF5F5700BE51
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() {}