pub struct FileManager { /* private fields */ }Expand description
File manager state
Implementations§
Source§impl FileManager
impl FileManager
Sourcepub fn new() -> Result<Self, KernelError>
pub fn new() -> Result<Self, KernelError>
Create a new file manager
Sourcepub fn refresh_directory(&mut self) -> Result<(), KernelError>
pub fn refresh_directory(&mut self) -> Result<(), KernelError>
Refresh directory listing
Sourcepub fn process_input(&mut self, event: InputEvent) -> Result<(), KernelError>
pub fn process_input(&mut self, event: InputEvent) -> Result<(), KernelError>
Process input event
Sourcepub fn render(
&self,
buf: &mut [u8],
width: usize,
_height: usize,
) -> Result<(), KernelError>
pub fn render( &self, buf: &mut [u8], width: usize, _height: usize, ) -> Result<(), KernelError>
Render file manager to a BGRA pixel buffer.
buf is widthheight4 bytes in BGRA format.
Sourcepub fn surface_id(&self) -> u32
pub fn surface_id(&self) -> u32
Get compositor surface ID
Sourcepub fn render_to_surface(&self)
pub fn render_to_surface(&self)
Render file manager contents to its compositor surface.
The surface includes a 28px title bar; content is at y-offset 28.