Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.ThemedIcon
Description
GThemedIcon
is an implementation of Icon
that supports icon
themes.
GThemedIcon
contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. GThemedIcon
does
not provide actual pixmaps for icons, just the icon names.
Ideally something like Gtk.IconTheme.choose_icon()
should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.
Synopsis
- newtype ThemedIcon = ThemedIcon (ManagedPtr ThemedIcon)
- class (GObject o, IsDescendantOf ThemedIcon o) => IsThemedIcon o
- toThemedIcon :: (MonadIO m, IsThemedIcon o) => o -> m ThemedIcon
- type family ResolveThemedIconMethod (t :: Symbol) o where ...
- data ThemedIconAppendNameMethodInfo
- themedIconAppendName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m ()
- data ThemedIconGetNamesMethodInfo
- themedIconGetNames :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> m [Text]
- themedIconNew :: (HasCallStack, MonadIO m) => Text -> m ThemedIcon
- themedIconNewFromNames :: (HasCallStack, MonadIO m) => [Text] -> m ThemedIcon
- themedIconNewWithDefaultFallbacks :: (HasCallStack, MonadIO m) => Text -> m ThemedIcon
- data ThemedIconPrependNameMethodInfo
- themedIconPrependName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m ()
- data ThemedIconNamePropertyInfo
- constructThemedIconName :: (IsThemedIcon o, MonadIO m) => Text -> m (GValueConstruct o)
- themedIconName :: AttrLabelProxy "name"
- data ThemedIconNamesPropertyInfo
- constructThemedIconNames :: (IsThemedIcon o, MonadIO m) => [Text] -> m (GValueConstruct o)
- getThemedIconNames :: (MonadIO m, IsThemedIcon o) => o -> m [Text]
- themedIconNames :: AttrLabelProxy "names"
- data ThemedIconUseDefaultFallbacksPropertyInfo
- constructThemedIconUseDefaultFallbacks :: (IsThemedIcon o, MonadIO m) => Bool -> m (GValueConstruct o)
- getThemedIconUseDefaultFallbacks :: (MonadIO m, IsThemedIcon o) => o -> m Bool
- themedIconUseDefaultFallbacks :: AttrLabelProxy "useDefaultFallbacks"
Exported types
newtype ThemedIcon Source #
Memory-managed wrapper type.
Constructors
ThemedIcon (ManagedPtr ThemedIcon) |
Instances
class (GObject o, IsDescendantOf ThemedIcon o) => IsThemedIcon o Source #
Type class for types which can be safely cast to ThemedIcon
, for instance with toThemedIcon
.
Instances
(GObject o, IsDescendantOf ThemedIcon o) => IsThemedIcon o Source # | |
Defined in GI.Gio.Objects.ThemedIcon |
toThemedIcon :: (MonadIO m, IsThemedIcon o) => o -> m ThemedIcon Source #
Cast to ThemedIcon
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
appendName, bindProperty, bindPropertyFull, equal, forceFloating, freezeNotify, getv, hash, isFloating, notify, notifyByPspec, prependName, ref, refSink, runDispose, serialize, stealData, stealQdata, thawNotify, toString, unref, watchClosure.
Getters
getData, getNames, getProperty, getQdata.
Setters
type family ResolveThemedIconMethod (t :: Symbol) o where ... Source #
Equations
appendName
data ThemedIconAppendNameMethodInfo Source #
Instances
(signature ~ (Text -> m ()), MonadIO m, IsThemedIcon a) => OverloadedMethod ThemedIconAppendNameMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.ThemedIcon Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ThemedIconAppendNameMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.ThemedIcon Methods |
Arguments
:: (HasCallStack, MonadIO m, IsThemedIcon a) | |
=> a |
|
-> Text |
|
-> 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
data ThemedIconGetNamesMethodInfo Source #
Instances
(signature ~ m [Text], MonadIO m, IsThemedIcon a) => OverloadedMethod ThemedIconGetNamesMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.ThemedIcon Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ThemedIconGetNamesMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.ThemedIcon Methods |
Arguments
:: (HasCallStack, MonadIO m, IsThemedIcon a) | |
=> a |
|
-> m [Text] | Returns: a list of icon names. |
Gets the names of icons from within icon
.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m ThemedIcon | Returns: a new |
Creates a new themed icon for iconname
.
newFromNames
themedIconNewFromNames Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Text] |
|
-> m ThemedIcon | Returns: a new |
Creates a new themed icon for iconnames
.
newWithDefaultFallbacks
themedIconNewWithDefaultFallbacks Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m ThemedIcon | Returns: a new |
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
data ThemedIconPrependNameMethodInfo Source #
Instances
(signature ~ (Text -> m ()), MonadIO m, IsThemedIcon a) => OverloadedMethod ThemedIconPrependNameMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.ThemedIcon Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ThemedIconPrependNameMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.ThemedIcon Methods |
themedIconPrependName Source #
Arguments
:: (HasCallStack, MonadIO m, IsThemedIcon a) | |
=> a |
|
-> Text |
|
-> 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
The icon name.
data ThemedIconNamePropertyInfo Source #
Instances
constructThemedIconName :: (IsThemedIcon o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
themedIconName :: AttrLabelProxy "name" Source #
names
A Nothing
-terminated array of icon names.
data ThemedIconNamesPropertyInfo Source #
Instances
AttrInfo ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon Associated Types
Methods attrGet :: AttrBaseTypeConstraint ThemedIconNamesPropertyInfo o => o -> IO (AttrGetType ThemedIconNamesPropertyInfo) # attrSet :: (AttrBaseTypeConstraint ThemedIconNamesPropertyInfo o, AttrSetTypeConstraint ThemedIconNamesPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint ThemedIconNamesPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint ThemedIconNamesPropertyInfo o, AttrSetTypeConstraint ThemedIconNamesPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint ThemedIconNamesPropertyInfo o, AttrTransferTypeConstraint ThemedIconNamesPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType ThemedIconNamesPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrLabel ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrOrigin ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrTransferType ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint ThemedIconNamesPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon |
constructThemedIconNames :: (IsThemedIcon o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “names
” property. This is rarely needed directly, but it is used by new
.
getThemedIconNames :: (MonadIO m, IsThemedIcon o) => o -> m [Text] Source #
Get the value of the “names
” property.
When overloading is enabled, this is equivalent to
get
themedIcon #names
themedIconNames :: AttrLabelProxy "names" Source #
useDefaultFallbacks
Whether to use the default fallbacks found by shortening the icon name at '-' characters. If the "names" array has more than one element, ignores any past the first.
For example, if the icon name was "gnome-dev-cdrom-audio", the array would become
C code
{ "gnome-dev-cdrom-audio", "gnome-dev-cdrom", "gnome-dev", "gnome", NULL };
data ThemedIconUseDefaultFallbacksPropertyInfo Source #
Instances
AttrInfo ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon Associated Types
Methods attrGet :: AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo o => o -> IO (AttrGetType ThemedIconUseDefaultFallbacksPropertyInfo) # attrSet :: (AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo o, AttrSetTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo o, AttrSetTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo o, AttrTransferTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType ThemedIconUseDefaultFallbacksPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrLabel ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.ThemedIcon | |||||||||||||||||||||||||||||||||
type AttrOrigin ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructThemedIconUseDefaultFallbacks :: (IsThemedIcon o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “use-default-fallbacks
” property. This is rarely needed directly, but it is used by new
.
getThemedIconUseDefaultFallbacks :: (MonadIO m, IsThemedIcon o) => o -> m Bool Source #
Get the value of the “use-default-fallbacks
” property.
When overloading is enabled, this is equivalent to
get
themedIcon #useDefaultFallbacks
themedIconUseDefaultFallbacks :: AttrLabelProxy "useDefaultFallbacks" Source #