ableos/ableos/src/experiments/y_compositor/window.rs

38 lines
752 B
Rust
Raw Normal View History

2022-07-31 06:54:01 +00:00
// use crate::driver_traits::graphics::Point;
2022-01-07 16:31:47 +00:00
2022-04-11 22:23:11 +00:00
pub type MenuBar = Vec<MenuOption>;
2022-01-07 16:31:47 +00:00
pub struct MenuOption {
symbol: char,
}
2021-11-16 06:09:27 +00:00
pub struct Window {
2022-01-07 16:31:47 +00:00
title: String,
2022-07-31 06:54:01 +00:00
// position: Point,
2021-11-16 06:09:27 +00:00
fullscreen: bool,
}
2022-04-11 22:23:11 +00:00
2021-11-16 06:09:27 +00:00
// all of these should return a result
impl Window {
2022-07-31 06:54:01 +00:00
pub fn new(title: String, /*position: Point,*/ fullscreen: bool) -> Self {
2022-01-07 16:31:47 +00:00
Self {
title,
2022-07-31 06:54:01 +00:00
// position,
2022-01-07 16:31:47 +00:00
fullscreen,
}
}
pub fn fullscreen(&mut self) {
2021-11-16 06:09:27 +00:00
self.fullscreen = true;
}
pub fn revert_fullscreen(&mut self) {
self.fullscreen = false;
}
pub fn set_title(&mut self) {
todo!();
}
2022-07-31 06:54:01 +00:00
pub fn set_position(&mut self /*pos: Point*/) {
// self.position = pos;
2021-11-16 06:09:27 +00:00
}
}