⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

MultiOutputManager

Struct MultiOutputManager 

Source
pub struct MultiOutputManager { /* private fields */ }
Expand description

Multi-output display manager

Implementations§

Source§

impl MultiOutputManager

Source

pub const fn new() -> Self

Create a new multi-output manager

Source

pub fn init(&mut self)

Initialize the multi-output manager

Source

pub fn add_output( &mut self, connector_id: u32, crtc_id: u32, width: u32, height: u32, refresh_hz: u32, ) -> Result<u32, KernelError>

Add a new display output

The output is placed to the right of all existing outputs by default.

Source

pub fn remove_output(&mut self, output_id: u32) -> Result<(), KernelError>

Remove a display output by ID

Source

pub fn set_position( &mut self, output_id: u32, x: i32, y: i32, ) -> Result<(), KernelError>

Set the position of an output in virtual desktop coordinates

Source

pub fn set_primary(&mut self, output_id: u32) -> Result<(), KernelError>

Set the primary output

Source

pub fn get_outputs(&self) -> &[DisplayOutput]

Get list of active outputs

Source

pub fn get_total_size(&self) -> (u32, u32)

Get total virtual desktop size

Source

pub fn point_to_output(&self, x: i32, y: i32) -> Option<(u32, i32, i32)>

Map a point in virtual desktop coordinates to a specific output

Returns (output_id, local_x, local_y) or None if the point is outside all outputs.

Source

pub fn primary_output(&self) -> Option<&DisplayOutput>

Get the primary output

Source

pub fn get_output(&self, output_id: u32) -> Option<&DisplayOutput>

Get a specific output by ID

Source

pub fn get_output_mut(&mut self, output_id: u32) -> Option<&mut DisplayOutput>

Get a mutable reference to a specific output by ID

Source

pub fn flip(&self, output_id: u32, _buffer_id: u32) -> Result<(), KernelError>

Schedule a page flip on a specific output

In a real implementation this would issue a DRM page flip ioctl.

Source

pub fn handle_hotplug( &mut self, connector_id: u32, connected: bool, width: u32, height: u32, refresh_hz: u32, ) -> Result<(), KernelError>

Handle a DRM connector hotplug event

If connected=true and the connector is new, adds an output. If connected=false, removes the associated output.

Source

pub fn auto_layout(&mut self)

Arrange outputs left-to-right based on their current order

Source

pub fn num_outputs(&self) -> usize

Get the number of active outputs

Source

pub fn is_initialized(&self) -> bool

Check if the manager is initialized

Trait Implementations§

Source§

impl Default for MultiOutputManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for MultiOutputManager

§

impl RefUnwindSafe for MultiOutputManager

§

impl Send for MultiOutputManager

§

impl Sync for MultiOutputManager

§

impl Unpin for MultiOutputManager

§

impl UnwindSafe for MultiOutputManager

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.