Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype IconSource = IconSource (ManagedPtr IconSource)
- noIconSource :: Maybe IconSource
- data IconSourceCopyMethodInfo
- iconSourceCopy :: (HasCallStack, MonadIO m) => IconSource -> m IconSource
- data IconSourceFreeMethodInfo
- iconSourceFree :: (HasCallStack, MonadIO m) => IconSource -> m ()
- data IconSourceGetDirectionMethodInfo
- iconSourceGetDirection :: (HasCallStack, MonadIO m) => IconSource -> m TextDirection
- data IconSourceGetDirectionWildcardedMethodInfo
- iconSourceGetDirectionWildcarded :: (HasCallStack, MonadIO m) => IconSource -> m Bool
- data IconSourceGetFilenameMethodInfo
- iconSourceGetFilename :: (HasCallStack, MonadIO m) => IconSource -> m [Char]
- data IconSourceGetIconNameMethodInfo
- iconSourceGetIconName :: (HasCallStack, MonadIO m) => IconSource -> m Text
- data IconSourceGetPixbufMethodInfo
- iconSourceGetPixbuf :: (HasCallStack, MonadIO m) => IconSource -> m Pixbuf
- data IconSourceGetSizeMethodInfo
- iconSourceGetSize :: (HasCallStack, MonadIO m) => IconSource -> m Int32
- data IconSourceGetSizeWildcardedMethodInfo
- iconSourceGetSizeWildcarded :: (HasCallStack, MonadIO m) => IconSource -> m Bool
- data IconSourceGetStateMethodInfo
- iconSourceGetState :: (HasCallStack, MonadIO m) => IconSource -> m StateType
- data IconSourceGetStateWildcardedMethodInfo
- iconSourceGetStateWildcarded :: (HasCallStack, MonadIO m) => IconSource -> m Bool
- iconSourceNew :: (HasCallStack, MonadIO m) => m IconSource
- data IconSourceSetDirectionMethodInfo
- iconSourceSetDirection :: (HasCallStack, MonadIO m) => IconSource -> TextDirection -> m ()
- data IconSourceSetDirectionWildcardedMethodInfo
- iconSourceSetDirectionWildcarded :: (HasCallStack, MonadIO m) => IconSource -> Bool -> m ()
- data IconSourceSetFilenameMethodInfo
- iconSourceSetFilename :: (HasCallStack, MonadIO m) => IconSource -> [Char] -> m ()
- data IconSourceSetIconNameMethodInfo
- iconSourceSetIconName :: (HasCallStack, MonadIO m) => IconSource -> Maybe Text -> m ()
- data IconSourceSetPixbufMethodInfo
- iconSourceSetPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => IconSource -> a -> m ()
- data IconSourceSetSizeMethodInfo
- iconSourceSetSize :: (HasCallStack, MonadIO m) => IconSource -> Int32 -> m ()
- data IconSourceSetSizeWildcardedMethodInfo
- iconSourceSetSizeWildcarded :: (HasCallStack, MonadIO m) => IconSource -> Bool -> m ()
- data IconSourceSetStateMethodInfo
- iconSourceSetState :: (HasCallStack, MonadIO m) => IconSource -> StateType -> m ()
- data IconSourceSetStateWildcardedMethodInfo
- iconSourceSetStateWildcarded :: (HasCallStack, MonadIO m) => IconSource -> Bool -> m ()
Exported types
newtype IconSource Source #
Methods
copy
data IconSourceCopyMethodInfo Source #
((~) * signature (m IconSource), MonadIO m) => MethodInfo * IconSourceCopyMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m IconSource | Returns: a new |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Creates a copy of source
; mostly useful for language bindings.
free
data IconSourceFreeMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * IconSourceFreeMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m () |
getDirection
data IconSourceGetDirectionMethodInfo Source #
((~) * signature (m TextDirection), MonadIO m) => MethodInfo * IconSourceGetDirectionMethodInfo IconSource signature Source # | |
iconSourceGetDirection Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m TextDirection | Returns: text direction this source matches |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Obtains the text direction this icon source applies to. The return value is only useful/meaningful if the text direction is not wildcarded.
getDirectionWildcarded
data IconSourceGetDirectionWildcardedMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * IconSourceGetDirectionWildcardedMethodInfo IconSource signature Source # | |
iconSourceGetDirectionWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Gets the value set by iconSourceSetDirectionWildcarded
.
getFilename
data IconSourceGetFilenameMethodInfo Source #
((~) * signature (m [Char]), MonadIO m) => MethodInfo * IconSourceGetFilenameMethodInfo IconSource signature Source # | |
iconSourceGetFilename Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m [Char] | Returns: image filename. This string must not be modified or freed. |
getIconName
data IconSourceGetIconNameMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * IconSourceGetIconNameMethodInfo IconSource signature Source # | |
iconSourceGetIconName Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Text | Returns: icon name. This string must not be modified or freed. |
getPixbuf
data IconSourceGetPixbufMethodInfo Source #
((~) * signature (m Pixbuf), MonadIO m) => MethodInfo * IconSourceGetPixbufMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Pixbuf | Returns: source pixbuf |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Retrieves the source pixbuf, or Nothing
if none is set.
In addition, if a filename source is in use, this
function in some cases will return the pixbuf from
loaded from the filename. This is, for example, true
for the GtkIconSource passed to the Style
render_icon()
virtual function. The reference count on the pixbuf is
not incremented.
getSize
data IconSourceGetSizeMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * IconSourceGetSizeMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Int32 | Returns: icon size ( |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Obtains the icon size this source applies to. The return value is only useful/meaningful if the icon size is not wildcarded.
getSizeWildcarded
data IconSourceGetSizeWildcardedMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * IconSourceGetSizeWildcardedMethodInfo IconSource signature Source # | |
iconSourceGetSizeWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Gets the value set by iconSourceSetSizeWildcarded
.
getState
data IconSourceGetStateMethodInfo Source #
((~) * signature (m StateType), MonadIO m) => MethodInfo * IconSourceGetStateMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m StateType | Returns: widget state this source matches |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Obtains the widget state this icon source applies to. The return value is only useful/meaningful if the widget state is not wildcarded.
getStateWildcarded
data IconSourceGetStateWildcardedMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * IconSourceGetStateWildcardedMethodInfo IconSource signature Source # | |
iconSourceGetStateWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Gets the value set by iconSourceSetStateWildcarded
.
new
:: (HasCallStack, MonadIO m) | |
=> m IconSource | Returns: a new |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Creates a new IconSource
. A IconSource
contains a Pixbuf
(or
image filename) that serves as the base image for one or more of the
icons in a IconSet
, along with a specification for which icons in the
icon set will be based on that pixbuf or image file. An icon set contains
a set of icons that represent “the same” logical concept in different states,
different global text directions, and different sizes.
So for example a web browser’s “Back to Previous Page” icon might
point in a different direction in Hebrew and in English; it might
look different when insensitive; and it might change size depending
on toolbar mode (small/large icons). So a single icon set would
contain all those variants of the icon. IconSet
contains a list
of IconSource
from which it can derive specific icon variants in
the set.
In the simplest case, IconSet
contains one source pixbuf from
which it derives all variants. The convenience function
iconSetNewFromPixbuf
handles this case; if you only have
one source pixbuf, just use that function.
If you want to use a different base pixbuf for different icon
variants, you create multiple icon sources, mark which variants
they’ll be used to create, and add them to the icon set with
iconSetAddSource
.
By default, the icon source has all parameters wildcarded. That is, the icon source will be used as the base icon for any desired text direction, widget state, or icon size.
setDirection
data IconSourceSetDirectionMethodInfo Source #
((~) * signature (TextDirection -> m ()), MonadIO m) => MethodInfo * IconSourceSetDirectionMethodInfo IconSource signature Source # | |
iconSourceSetDirection Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> TextDirection |
|
-> m () |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Sets the text direction this icon source is intended to be used with.
Setting the text direction on an icon source makes no difference
if the text direction is wildcarded. Therefore, you should usually
call iconSourceSetDirectionWildcarded
to un-wildcard it
in addition to calling this function.
setDirectionWildcarded
data IconSourceSetDirectionWildcardedMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m) => MethodInfo * IconSourceSetDirectionWildcardedMethodInfo IconSource signature Source # | |
iconSourceSetDirectionWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)Use IconTheme
instead.
If the text direction is wildcarded, this source can be used
as the base image for an icon in any TextDirection
.
If the text direction is not wildcarded, then the
text direction the icon source applies to should be set
with iconSourceSetDirection
, and the icon source
will only be used with that text direction.
IconSet
prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
setFilename
data IconSourceSetFilenameMethodInfo Source #
((~) * signature ([Char] -> m ()), MonadIO m) => MethodInfo * IconSourceSetFilenameMethodInfo IconSource signature Source # | |
iconSourceSetFilename Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> [Char] |
|
-> m () |
setIconName
data IconSourceSetIconNameMethodInfo Source #
((~) * signature (Maybe Text -> m ()), MonadIO m) => MethodInfo * IconSourceSetIconNameMethodInfo IconSource signature Source # | |
iconSourceSetIconName Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> Maybe Text |
|
-> m () |
setPixbuf
data IconSourceSetPixbufMethodInfo Source #
((~) * signature (a -> m ()), MonadIO m, IsPixbuf a) => MethodInfo * IconSourceSetPixbufMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m, IsPixbuf a) | |
=> IconSource |
|
-> a |
|
-> m () |
setSize
data IconSourceSetSizeMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * IconSourceSetSizeMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Sets the icon size this icon source is intended to be used with.
Setting the icon size on an icon source makes no difference
if the size is wildcarded. Therefore, you should usually
call iconSourceSetSizeWildcarded
to un-wildcard it
in addition to calling this function.
setSizeWildcarded
data IconSourceSetSizeWildcardedMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m) => MethodInfo * IconSourceSetSizeWildcardedMethodInfo IconSource signature Source # | |
iconSourceSetSizeWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)Use IconTheme
instead.
If the icon size is wildcarded, this source can be used as the base
image for an icon of any size. If the size is not wildcarded, then
the size the source applies to should be set with
iconSourceSetSize
and the icon source will only be used
with that specific size.
IconSet
prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
IconSet
will normally scale wildcarded source images to produce
an appropriate icon at a given size, but will not change the size
of source images that match exactly.
setState
data IconSourceSetStateMethodInfo Source #
((~) * signature (StateType -> m ()), MonadIO m) => MethodInfo * IconSourceSetStateMethodInfo IconSource signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> StateType |
|
-> m () |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Sets the widget state this icon source is intended to be used with.
Setting the widget state on an icon source makes no difference
if the state is wildcarded. Therefore, you should usually
call iconSourceSetStateWildcarded
to un-wildcard it
in addition to calling this function.
setStateWildcarded
data IconSourceSetStateWildcardedMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m) => MethodInfo * IconSourceSetStateWildcardedMethodInfo IconSource signature Source # | |
iconSourceSetStateWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)Use IconTheme
instead.
If the widget state is wildcarded, this source can be used as the
base image for an icon in any StateType
. If the widget state
is not wildcarded, then the state the source applies to should be
set with iconSourceSetState
and the icon source will
only be used with that specific state.
IconSet
prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
IconSet
will normally transform wildcarded source images to
produce an appropriate icon for a given state, for example
lightening an image on prelight, but will not modify source images
that match exactly.