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

pub struct Theme { /* fields omitted */ }

Wrapper for an xcursor theme from the X11 xcursor library.

Xcursor (mostly) follows the freedesktop.org spec for theming icons.

Methods

impl Theme
[src]

Loads the named xcursor theme at the given cursor size (in pixels).

This is useful if you need cursor images for your compositor to use when a client-side cursors is not available or you wish to override client-side cursors for a particular UI interaction (such as using a grab cursor when moving a window around)

The default search path it uses is ~/.icons, /usr/share/icons, /usr/share/pixmaps. Within each of these directories, it searches for a directory using the theme name. Within the theme directory, it looks for cursor files in the 'cursors' subdirectory. It uses the first cursor file found along the path.

If necessary, Xcursor also looks for a "index.theme" file in each theme directory to find inherited themes and searches along the path for those themes as well.

If no name is given, defaults to "default". If no theme can be found None is returned.

Get the name of this theme.

If the name returned by wlroots was malformed, or nonexistent, then the value will be None.

Get the size of the images.

Get the number of cursors in this theme.

Gets all the cursors from this theme.

Get the cursor with the provided name (e.g. "left_ptr"), if it exists.

Constructs a Theme from a raw pointer.

Unsafety

Takes ownership of the cursor theme. When the Theme is dropped it calls wlr_cursor_theme_destroy.

Trait Implementations

impl Drop for Theme
[src]

Executes the destructor for this type. Read more

impl Eq for Theme
[src]

impl PartialOrd<Theme> for 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 PartialEq<Theme> for Theme
[src]

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

This method tests for !=.

impl Ord for 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 Hash for Theme
[src]

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

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

impl Debug for Theme
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for Theme

impl !Sync for 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