[][src]Struct wlroots::cursor::xcursor::XCursor

pub struct XCursor<'theme> { /* fields omitted */ }

Wrapper for an xcursor from the X11 xcursor library.

The cursor must live as long as the Theme that it comes from.

Methods

impl<'theme> XCursor<'theme>
[src]

Get all the image frames associated with an xcursor.

Get a specific frame of the image from the animation. Returns None if the index is out of bounds.

We suggest paring this with XCursor::frame to avoid going out of bounds.

Returns the current frame number for an animated cursor give a monotonic time reference in milliseconds.

e.g. if it's been animating for 500 milliseconds duration should be constructed from Duration::from_millis(500).

Get the number of animation frames for the cursor.

Length of the animation in milliseconds.

Constructs an XCursor from a raw pointer

Unsafety

This lifetime is unbounded, but it must not outlive the xcursor manager that the pointer came from.

Trait Implementations

impl<'theme> Eq for XCursor<'theme>
[src]

impl<'theme> PartialOrd<XCursor<'theme>> for XCursor<'theme>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'theme> PartialEq<XCursor<'theme>> for XCursor<'theme>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'theme> Ord for XCursor<'theme>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<'theme> Hash for XCursor<'theme>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'theme> Debug for XCursor<'theme>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'theme> !Send for XCursor<'theme>

impl<'theme> !Sync for XCursor<'theme>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 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