Struct xcursor::CursorTheme
source · pub struct CursorTheme {
pub(crate) theme: CursorThemeIml,
pub(crate) search_paths: Vec<PathBuf>,
}
Expand description
A cursor theme.
Fields§
§theme: CursorThemeIml
§search_paths: Vec<PathBuf>
Global search path for themes.
Implementations§
source§impl CursorTheme
impl CursorTheme
sourcepub fn load(name: &str) -> Self
pub fn load(name: &str) -> Self
Search for a theme with the given name in the given search paths, and returns an XCursorTheme which represents it. If no inheritance can be determined, then the themes inherits from the “default” theme.
sourcepub fn load_icon(&self, icon_name: &str) -> Option<PathBuf>
pub fn load_icon(&self, icon_name: &str) -> Option<PathBuf>
Try to load an icon from the theme. If the icon is not found within this theme’s directories, then the function looks at the theme from which this theme is inherited.
sourcepub fn load_icon_with_depth(&self, icon_name: &str) -> Option<(PathBuf, usize)>
pub fn load_icon_with_depth(&self, icon_name: &str) -> Option<(PathBuf, usize)>
Try to load an icon from the theme, returning it with its inheritance depth.
If the icon is not found within this theme’s directories, then the function looks at the theme from which this theme is inherited. The second element of the returned tuple indicates how many levels of inheritance were traversed before the icon was found.
Trait Implementations§
source§impl Clone for CursorTheme
impl Clone for CursorTheme
source§fn clone(&self) -> CursorTheme
fn clone(&self) -> CursorTheme
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CursorTheme
impl Debug for CursorTheme
source§impl PartialEq for CursorTheme
impl PartialEq for CursorTheme
source§fn eq(&self, other: &CursorTheme) -> bool
fn eq(&self, other: &CursorTheme) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CursorTheme
impl StructuralPartialEq for CursorTheme
Auto Trait Implementations§
impl Freeze for CursorTheme
impl RefUnwindSafe for CursorTheme
impl Send for CursorTheme
impl Sync for CursorTheme
impl Unpin for CursorTheme
impl UnwindSafe for CursorTheme
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more