[−][src]Struct wlroots::cursor::xcursor::Manager
xcursor::Manager dynamically loads xcursor themes at sizes necessary for use on outputs at
arbitrary scale factors. You should call load
for each output you will show your cursor on,
with the scale factor parameter set to that output's scale factor.
Methods
impl Manager
[src]
impl Manager
pub fn create<T: Into<Option<String>>>(name: T, size: u32) -> Option<Self>
[src]
pub fn create<T: Into<Option<String>>>(name: T, size: u32) -> Option<Self>
Create a new xcursor::Manager
.
pub fn name(&self) -> String
[src]
pub fn name(&self) -> String
Get the name of the theme this Manager
manages.
pub fn size(&self) -> u32
[src]
pub fn size(&self) -> u32
Get the base size (when scale = 1) in pixels for the theme.
pub fn get_xcursor<'manager, T: Into<Option<String>>>(
&'manager self,
name: T,
scale: f32
) -> Option<XCursor<'manager>>
[src]
pub fn get_xcursor<'manager, T: Into<Option<String>>>(
&'manager self,
name: T,
scale: f32
) -> Option<XCursor<'manager>>
Retrieves a XCursor
for the given cursor name at the given scale factor, or None if this
Manager
has not loaded a cursor theme at the requested scale.
pub fn scaled_themes<'manager>(&'manager self) -> Vec<ManagerTheme<'manager>>
[src]
pub fn scaled_themes<'manager>(&'manager self) -> Vec<ManagerTheme<'manager>>
Get a list of all the scaled xcursor::ManagerTheme
s managed by this
manager.
pub fn load(&self, scale: f32) -> bool
[src]
pub fn load(&self, scale: f32) -> bool
Ensures an xcursor theme at the given scale factor is loaded in the manager.
Returns false if the scaled theme was successfully loaded and true otherwise
pub fn set_cursor_image(&mut self, name: String, cursor: &Cursor)
[src]
pub fn set_cursor_image(&mut self, name: String, cursor: &Cursor)
Set a Cursor
's cursor image to the specified cursor name for all scale
factors. The Cursor
will take over from this point and ensure the correct
cursor is used on each output, assuming an OutputLayout
is attached to
it.
Trait Implementations
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