[−][src]Struct wlroots::output::Output
Methods
impl Output[src]
impl Outputpub fn choose_best_mode(&mut self)[src]
pub fn choose_best_mode(&mut self)Sets the best modesetting for an output.
NOTE You cannot call this when the output will be removed.
I'm still marking it as safe though because we protect against that action in the output destruction callback.
pub fn set_mode(&mut self, mode: Mode) -> bool[src]
pub fn set_mode(&mut self, mode: Mode) -> boolSet this to be the current mode for the Output.
pub fn set_custom_mode(&mut self, size: Size, refresh: i32) -> bool[src]
pub fn set_custom_mode(&mut self, size: Size, refresh: i32) -> boolSet a custom mode for this output.
pub fn name(&self) -> String[src]
pub fn name(&self) -> StringGets the name of the output in UTF-8.
pub fn make(&self) -> String[src]
pub fn make(&self) -> StringGets the make of the output in UTF-8.
pub fn model(&self) -> String[src]
pub fn model(&self) -> StringGets the model of the output in UTF-8.
pub fn serial(&self) -> String[src]
pub fn serial(&self) -> StringGets the serial of the output in UTF-8.
pub fn enabled(&self) -> bool[src]
pub fn enabled(&self) -> boolDetermines if the output is enabled or not.
pub fn scale(&self) -> c_float[src]
pub fn scale(&self) -> c_floatGet the scale of the output
pub fn needs_swap(&self) -> bool[src]
pub fn needs_swap(&self) -> boolDetermines if the output should have its buffers swapped or not.
pub fn refresh_rate(&self) -> i32[src]
pub fn refresh_rate(&self) -> i32Get the refresh rate of the output.
pub fn current_mode<'output>(&'output self) -> Option<Mode<'output>>[src]
pub fn current_mode<'output>(&'output self) -> Option<Mode<'output>>pub fn layout_space_pos(&self) -> (i32, i32)[src]
pub fn layout_space_pos(&self) -> (i32, i32)Gets the output position in layout space reported to clients.
pub fn subpixel(&self) -> Subpixel[src]
pub fn subpixel(&self) -> SubpixelGet subpixel information about the output.
pub fn get_transform(&self) -> Transform[src]
pub fn get_transform(&self) -> TransformGet the transform information about the output.
pub fn render_software_cursors<'a, U>(&self, damage: U) where
U: Into<Option<&'a mut PixmanRegion>>, [src]
pub fn render_software_cursors<'a, U>(&self, damage: U) where
U: Into<Option<&'a mut PixmanRegion>>, Renders software cursors. This is a utility function that can be called when compositors render.
If Cursor is used along with an OutputLayout then this is not necessary.
pub fn schedule_frame(&mut self)[src]
pub fn schedule_frame(&mut self)Manually schedules a frame event.
If a frame event is already pending, it is a no-op.
pub unsafe fn make_current(&mut self) -> (bool, Option<c_int>)[src]
pub unsafe fn make_current(&mut self) -> (bool, Option<c_int>)Make this output the current output.
Unsafety
This is done for rendering purposes, and you should really use
a GenericRenderer instead in order to do this.
Sometimes however you need to do e.g opengl rendering and we haven't wrapped that. If that's the case, call this first and then swap the buffers.
Returns the drawing buffer age in number of frames in number of frames, or None if unknown. This is useful for damage tracking.
pub unsafe fn swap_buffers<'a, T, U>(&mut self, when: T, damage: U) -> bool where
T: Into<Option<Duration>>,
U: Into<Option<&'a mut PixmanRegion>>, [src]
pub unsafe fn swap_buffers<'a, T, U>(&mut self, when: T, damage: U) -> bool where
T: Into<Option<Duration>>,
U: Into<Option<&'a mut PixmanRegion>>, Swaps the buffers and draws whatever is in the back buffer on the screen.
If the time of the frame is not known, set when to None.
If the compositor does not support damage tracking, set damage to None
Unsafety
This is done for rendering purposes, but if called multiple times then you could cause a deadlock.
You should try to use a GenericRenderer, but sometimes it's necessary to
do your own manual rendering in a compositor. In that case, call make_current,
do your rendering, and then call this function.
pub fn frame_pending(&self) -> bool[src]
pub fn frame_pending(&self) -> boolDetermines if a frame is pending or not.
pub fn size(&self) -> (i32, i32)[src]
pub fn size(&self) -> (i32, i32)Get the dimensions of the output as (width, height).
pub fn physical_size(&self) -> (i32, i32)[src]
pub fn physical_size(&self) -> (i32, i32)Get the physical dimensions of the output as (width, height).
pub fn transformed_resolution(&self) -> (c_int, c_int)[src]
pub fn transformed_resolution(&self) -> (c_int, c_int)Computes the transformed output resolution
pub fn effective_resolution(&self) -> (c_int, c_int)[src]
pub fn effective_resolution(&self) -> (c_int, c_int)Computes the transformed and scaled output resolution.
pub fn transform_matrix(&self) -> [c_float; 9][src]
pub fn transform_matrix(&self) -> [c_float; 9]pub fn transform(&mut self, transform: Transform)[src]
pub fn transform(&mut self, transform: Transform)pub fn modes<'output>(&'output self) -> Vec<Mode<'output>>[src]
pub fn modes<'output>(&'output self) -> Vec<Mode<'output>>Get the modes associated with this output.
Note that some backends may have zero modes.
pub fn enable(&mut self, enable: bool) -> bool[src]
pub fn enable(&mut self, enable: bool) -> boolEnables or disables an output.
pub fn set_gamma(&mut self, size: usize, r: u16, g: u16, b: u16) -> bool[src]
pub fn set_gamma(&mut self, size: usize, r: u16, g: u16, b: u16) -> boolSets the gamma based on the size.
pub fn get_gamma_size(&self) -> usize[src]
pub fn get_gamma_size(&self) -> usizeGet the gamma size.
pub fn set_position(&mut self, origin: Origin)[src]
pub fn set_position(&mut self, origin: Origin)Sets the position of this output.
pub fn set_scale(&mut self, scale: c_float)[src]
pub fn set_scale(&mut self, scale: c_float)Set the scale applied to this output.
pub fn damage(&mut self) -> &mut Damage[src]
pub fn damage(&mut self) -> &mut DamageTrait Implementations
impl Handleable<*mut wlr_output_damage, wlr_output> for Output[src]
impl Handleable<*mut wlr_output_damage, wlr_output> for Outputfn weak_reference(&self) -> Handle[src]
fn weak_reference(&self) -> HandleCreates a weak reference to the resource.
impl Drop for Output[src]
impl Drop for Outputimpl Debug for Output[src]
impl Debug for OutputAuto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more