minimal protocol for y
This commit is contained in:
commit
01dce2cd93
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
Cargo.lock
|
8
Cargo.toml
Normal file
8
Cargo.toml
Normal 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
35
src/lib.rs
Normal 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() {}
|
Loading…
Reference in a new issue