ableos_userland/libraries/able_graphics_library/src/lib.rs

44 lines
959 B
Rust

#![no_std]
use cursor::{Cursor, CursorStates};
#[macro_use]
extern crate alloc;
pub mod color;
pub mod cursor;
pub mod engine3d;
pub mod ptmode;
pub const VERSION: versioning::Version = versioning::Version {
major: 0,
minor: 1,
patch: 2,
};
#[derive(Clone, Copy, Debug)]
pub enum GraphicsMode {
// A simple single or double buffer
RawPixels,
// The 3D engine will be the ableOS equivelent of OpenGL or Vulkan
Engine3D,
// The PTMode is a simple tile graphics mode similar to the Nintendo Entertainment System or Super Nintendo Entertainment System
// as well as providing a freeform 'Limitless' (within reason) mode
PTMode,
}
pub struct GraphicsSettings {
mode: GraphicsMode,
cursor: Cursor,
}
impl GraphicsSettings {
pub fn get_mode(&self) -> GraphicsMode {
self.mode
}
pub fn set_cursor_state(&mut self, c_state: CursorStates) {
self.cursor.cursor_state = c_state;
}
}