gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

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

Exported types

newtype ThemedIcon Source #

Memory-managed wrapper type.

Instances

Instances details
Eq ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

GObject ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

ManagedPtrNewtype ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

TypedObject ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Methods

glibType :: IO GType #

HasParentTypes ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

HasAttributeList ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

(info ~ ResolveThemedIconMethod t ThemedIcon, OverloadedMethod info ThemedIcon p, HasField t ThemedIcon p) => HasField (t :: Symbol) ThemedIcon (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Methods

getField :: ThemedIcon -> p #

(info ~ ResolveThemedIconMethod t ThemedIcon, OverloadedMethodInfo info ThemedIcon) => IsLabel t (MethodProxy info ThemedIcon) Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

(info ~ ResolveThemedIconMethod t ThemedIcon, OverloadedMethod info ThemedIcon p) => IsLabel t (ThemedIcon -> p) Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Methods

fromLabel :: ThemedIcon -> p #

IsGValue (Maybe ThemedIcon) Source #

Convert ThemedIcon to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttributeList ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type ParentTypes ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type SignalList ThemedIcon Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

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

Instances details
(GObject o, IsDescendantOf ThemedIcon o) => IsThemedIcon o Source # 
Instance details

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

type family ResolveThemedIconMethod (t :: Symbol) o where ... Source #

Equations

ResolveThemedIconMethod "appendName" o = ThemedIconAppendNameMethodInfo 
ResolveThemedIconMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveThemedIconMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveThemedIconMethod "equal" o = IconEqualMethodInfo 
ResolveThemedIconMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveThemedIconMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveThemedIconMethod "getv" o = ObjectGetvMethodInfo 
ResolveThemedIconMethod "hash" o = IconHashMethodInfo 
ResolveThemedIconMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveThemedIconMethod "notify" o = ObjectNotifyMethodInfo 
ResolveThemedIconMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveThemedIconMethod "prependName" o = ThemedIconPrependNameMethodInfo 
ResolveThemedIconMethod "ref" o = ObjectRefMethodInfo 
ResolveThemedIconMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveThemedIconMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveThemedIconMethod "serialize" o = IconSerializeMethodInfo 
ResolveThemedIconMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveThemedIconMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveThemedIconMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveThemedIconMethod "toString" o = IconToStringMethodInfo 
ResolveThemedIconMethod "unref" o = ObjectUnrefMethodInfo 
ResolveThemedIconMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveThemedIconMethod "getData" o = ObjectGetDataMethodInfo 
ResolveThemedIconMethod "getNames" o = ThemedIconGetNamesMethodInfo 
ResolveThemedIconMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveThemedIconMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveThemedIconMethod "setData" o = ObjectSetDataMethodInfo 
ResolveThemedIconMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveThemedIconMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveThemedIconMethod l o = MethodResolutionFailed l o :: Type 

appendName

data ThemedIconAppendNameMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m ()), MonadIO m, IsThemedIcon a) => OverloadedMethod ThemedIconAppendNameMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo ThemedIconAppendNameMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

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

data ThemedIconGetNamesMethodInfo Source #

Instances

Instances details
(signature ~ m [Text], MonadIO m, IsThemedIcon a) => OverloadedMethod ThemedIconGetNamesMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo ThemedIconGetNamesMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

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

data ThemedIconPrependNameMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m ()), MonadIO m, IsThemedIcon a) => OverloadedMethod ThemedIconPrependNameMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo ThemedIconPrependNameMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

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

The icon name.

data ThemedIconNamePropertyInfo Source #

Instances

Instances details
AttrInfo ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrAllowedOps ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrBaseTypeConstraint ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrGetType ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrLabel ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrOrigin ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrSetTypeConstraint ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferType ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferTypeConstraint ThemedIconNamePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

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.

names

A Nothing-terminated array of icon names.

data ThemedIconNamesPropertyInfo Source #

Instances

Instances details
AttrInfo ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrAllowedOps ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrBaseTypeConstraint ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrGetType ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrLabel ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrOrigin ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrSetTypeConstraint ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferType ThemedIconNamesPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferTypeConstraint ThemedIconNamesPropertyInfo Source # 
Instance details

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

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

Instances details
AttrInfo ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

Associated Types

type AttrAllowedOps ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrGetType ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrSetTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferType ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrLabel ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrOrigin ThemedIconUseDefaultFallbacksPropertyInfo 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrAllowedOps ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrBaseTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrGetType ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrLabel ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrOrigin ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrSetTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferType ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

type AttrTransferTypeConstraint ThemedIconUseDefaultFallbacksPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.ThemedIcon

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