pub trait IconThemeExt: 'static {
Show 18 methods fn add_resource_path(&self, path: &str); fn append_search_path(&self, path: impl AsRef<Path>); fn example_icon_name(&self) -> Option<GString>; fn has_icon(&self, icon_name: &str) -> bool; fn list_contexts(&self) -> Vec<GString>; fn list_icons(&self, context: Option<&str>) -> Vec<GString>; fn load_icon(
        &self,
        icon_name: &str,
        size: i32,
        flags: IconLookupFlags
    ) -> Result<Option<Pixbuf>, Error>; fn load_icon_for_scale(
        &self,
        icon_name: &str,
        size: i32,
        scale: i32,
        flags: IconLookupFlags
    ) -> Result<Option<Pixbuf>, Error>; fn load_surface(
        &self,
        icon_name: &str,
        size: i32,
        scale: i32,
        for_window: Option<&Window>,
        flags: IconLookupFlags
    ) -> Result<Option<Surface>, Error>; fn lookup_by_gicon(
        &self,
        icon: &impl IsA<Icon>,
        size: i32,
        flags: IconLookupFlags
    ) -> Option<IconInfo>; fn lookup_by_gicon_for_scale(
        &self,
        icon: &impl IsA<Icon>,
        size: i32,
        scale: i32,
        flags: IconLookupFlags
    ) -> Option<IconInfo>; fn lookup_icon(
        &self,
        icon_name: &str,
        size: i32,
        flags: IconLookupFlags
    ) -> Option<IconInfo>; fn lookup_icon_for_scale(
        &self,
        icon_name: &str,
        size: i32,
        scale: i32,
        flags: IconLookupFlags
    ) -> Option<IconInfo>; fn prepend_search_path(&self, path: impl AsRef<Path>); fn rescan_if_needed(&self) -> bool; fn set_custom_theme(&self, theme_name: Option<&str>); fn set_screen(&self, screen: &Screen); fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
Expand description

Trait containing all IconTheme methods.

Implementors

IconTheme

Required Methods

Adds a resource path that will be looked at when looking for icons, similar to search paths.

This function should be used to make application-specific icons available as part of the icon theme.

The resources are considered as part of the hicolor icon theme and must be located in subdirectories that are defined in the hicolor icon theme, such as ``path/16x16/actions/run.png. Icons that are directly placed in the resource path instead of a subdirectory are also considered as ultimate fallback.

path

a resource path

Appends a directory to the search path. See gtk_icon_theme_set_search_path().

path

directory name to append to the icon path

Implementors