Skip to main content

FbdevOutput

Struct FbdevOutput 

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

A framebuffer device as the output of the platform.

Implementations§

Source§

impl FbdevOutput

Source

pub fn new(file_name: Option<&str>) -> Result<Arc<Self>>

Opens the framebuffer device file_name, or the one the environment variable FRAMEBUFFER names, or /dev/fb0.

Source

pub fn with_format( file_name: Option<&str>, format: Option<PixelFormat>, ) -> Result<Arc<Self>>

Opens a framebuffer device and asks it for format.

Source

pub fn with_options(options: FbDevOutputOptions) -> Result<Arc<Self>>

Opens the framebuffer device of the options.

Source

pub fn with_device( device: Box<dyn IFbDevice>, options: FbDevOutputOptions, ) -> Result<Arc<Self>>

The output over a device that is already open. An addition: with a FileFbDevice the output runs without a framebuffer device.

Source

pub fn id(&self) -> &str

The identification string of the device.

Source

pub fn var_screen_info(&self) -> fb_var_screeninfo

The variable information of the device the output draws with. An addition, for diagnostics.

Source

pub fn fix_screen_info(&self) -> fb_fix_screeninfo

The fixed information of the device the output draws with. An addition, for diagnostics.

Source

pub fn dispose(&self)

Releases the mapped memory (once the frame that uses it has ended) and closes the device.

Trait Implementations§

Source§

impl IFramebufferPlatformSurface for FbdevOutput

Source§

fn create_framebuffer_render_target(&self) -> Rc<dyn IFramebufferRenderTarget>

Creates the framebuffer render target of the surface.
Source§

impl IOutputBackend for FbdevOutput

Source§

fn pixel_size(&self) -> PixelSize

Source§

fn scaling(&self) -> f64

Source§

fn set_scaling(&self, value: f64)

Source§

fn as_render_surface(self: Arc<Self>) -> Arc<dyn IPlatformRenderSurface> ⓘ

The output as the render surface of the top-level.
Source§

fn as_gl_output_backend(&self) -> Option<&dyn IGlOutputBackend>

The output as one that renders with OpenGL (the reference tests the type).
Source§

fn as_surface_orientation(&self) -> Option<&dyn ISurfaceOrientation>

The output as one that has an orientation (the reference tests the type).
Source§

impl IPlatformRenderSurface for FbdevOutput

Source§

fn as_framebuffer_surface(&self) -> Option<&dyn IFramebufferPlatformSurface>

The surface as a framebuffer surface, if it is one.
Source§

fn as_any(&self) -> &dyn Any

Lets the backend recover the concrete surface type.
Source§

fn is_ready(&self) -> bool

Whether the surface is ready to be rendered to.
Source§

fn try_get_surface_kind(&self, _kind: TypeId) -> Option<Rc<dyn Any>>

The surface viewed as a surface kind defined outside this crate: for TypeId::of::<dyn IFoo>() the result holds an Rc<dyn IFoo>.
Source§

fn text_rendering_parameters(&self) -> Option<PlatformTextRenderingParameters>

The text rendering settings of the platform for this surface, when the platform knows them: the render backend asks for them every frame (they follow the settings of the system and the display the surface is on). A backend asks every surface of a top-level and takes the first answer; None from all of them gives the defaults of the backend (docs/porting/text-rendering.md).

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.