[−][src]Struct wlroots::backend::Headless
In this backend the only resource the compositor uses is the Wayland file descriptor. It doesn't try to grab actual keyboard/pointers and it doesn't render anything.
This backend is useful for testing as you can easily add "fake" inputs and outputs.
Methods
impl Headless
[src]
impl Headless
pub unsafe fn new(
display: *mut wl_display,
render_setup_func: Option<UnsafeRenderSetupFunction>
) -> Self
[src]
pub unsafe fn new(
display: *mut wl_display,
render_setup_func: Option<UnsafeRenderSetupFunction>
) -> Self
Creates a headless backend.
A headless backend has no outputs or inputs by default.
pub fn add_output(&self, width: c_uint, height: c_uint) -> Option<Handle>
[src]
pub fn add_output(&self, width: c_uint, height: c_uint) -> Option<Handle>
Create a new headless output backed by an in-memory EGL framebuffer.
You can read pixels from this framebuffer via Renderer::read_pixels
but it is otherwise not displayed.
pub fn add_input_device(
&self,
input_type: wlr_input_device_type
) -> Option<Handle>
[src]
pub fn add_input_device(
&self,
input_type: wlr_input_device_type
) -> Option<Handle>
Creates a new input device.
The caller is responsible for manually raising any event signals on the new input device if it wants to simulate input events.
pub fn is_headless_input_device(&self, input_device: &Device) -> bool
[src]
pub fn is_headless_input_device(&self, input_device: &Device) -> bool
pub fn is_headless_output(&self, output: &Output) -> bool
[src]
pub fn is_headless_output(&self, output: &Output) -> bool
pub unsafe fn as_ptr(&self) -> *mut wlr_backend
[src]
pub unsafe fn as_ptr(&self) -> *mut wlr_backend
Trait Implementations
impl Eq for Headless
[src]
impl Eq for Headless
impl PartialEq<Headless> for Headless
[src]
impl PartialEq<Headless> for Headless
fn eq(&self, other: &Headless) -> bool
[src]
fn eq(&self, other: &Headless) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Headless) -> bool
[src]
fn ne(&self, other: &Headless) -> bool
This method tests for !=
.
impl Hash for Headless
[src]
impl Hash for Headless
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Headless
[src]
impl Debug for Headless
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<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 T
Mutably 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