gi-gio-2.0.14: Gio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.ThemedIcon

Contents

Description

ThemedIcon is an implementation of Icon that supports icon themes. ThemedIcon contains a list of all of the icons present in an icon theme, so that icons can be looked up quickly. ThemedIcon does not provide actual pixmaps for icons, just the icon names. Ideally something like gtk_icon_theme_choose_icon() should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.

Synopsis

Exported types

Methods

appendName

themedIconAppendName Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemedIcon a) 
=> a

icon: a ThemedIcon

-> Text

iconname: name of icon to append to list of icons from within icon.

-> m () 

Append a name to the list of icons from within icon.

Note that doing so invalidates the hash computed by prior calls to iconHash.

getNames

themedIconGetNames Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemedIcon a) 
=> a

icon: a ThemedIcon.

-> m [Text]

Returns: a list of icon names.

Gets the names of icons from within icon.

new

themedIconNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

iconname: a string containing an icon name.

-> m ThemedIcon

Returns: a new ThemedIcon.

Creates a new themed icon for iconname.

newFromNames

themedIconNewFromNames Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Text]

iconnames: an array of strings containing icon names.

-> m ThemedIcon

Returns: a new ThemedIcon

Creates a new themed icon for iconnames.

newWithDefaultFallbacks

themedIconNewWithDefaultFallbacks Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

iconname: a string containing an icon name

-> m ThemedIcon

Returns: a new ThemedIcon.

Creates a new themed icon for iconname, and all the names that can be created by shortening iconname at '-' characters.

In the following example, icon1 and icon2 are equivalent:

C code

const char *names[] = {
  "gnome-dev-cdrom-audio",
  "gnome-dev-cdrom",
  "gnome-dev",
  "gnome"
};

icon1 = g_themed_icon_new_from_names (names, 4);
icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");

prependName

themedIconPrependName Source #

Arguments

:: (HasCallStack, MonadIO m, IsThemedIcon a) 
=> a

icon: a ThemedIcon

-> Text

iconname: name of icon to prepend to list of icons from within icon.

-> m () 

Prepend a name to the list of icons from within icon.

Note that doing so invalidates the hash computed by prior calls to iconHash.

Since: 2.18

Properties

name

names

useDefaultFallbacks