commit f69d05deb717a254736b69e43ed929e508d38660 Author: Able Date: Sat Jan 15 08:45:29 2022 -0600 minimal protocol for y diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96ef6c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..b7d541e --- /dev/null +++ b/Cargo.toml @@ -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] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..da447c6 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,35 @@ +pub struct WindowOption { + funct: WindowFunction, + symbol: char, +} + +pub type WindowBar = Vec; + +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() {}