Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype IconSource = IconSource (ManagedPtr IconSource)
- iconSourceCopy :: (HasCallStack, MonadIO m) => IconSource -> m IconSource
- iconSourceFree :: (HasCallStack, MonadIO m) => IconSource -> m ()
- iconSourceGetDirection :: (HasCallStack, MonadIO m) => IconSource -> m TextDirection
- iconSourceGetDirectionWildcarded :: (HasCallStack, MonadIO m) => IconSource -> m Bool
- iconSourceGetFilename :: (HasCallStack, MonadIO m) => IconSource -> m [Char]
- iconSourceGetIconName :: (HasCallStack, MonadIO m) => IconSource -> m Text
- iconSourceGetPixbuf :: (HasCallStack, MonadIO m) => IconSource -> m Pixbuf
- iconSourceGetSize :: (HasCallStack, MonadIO m) => IconSource -> m Int32
- iconSourceGetSizeWildcarded :: (HasCallStack, MonadIO m) => IconSource -> m Bool
- iconSourceGetState :: (HasCallStack, MonadIO m) => IconSource -> m StateType
- iconSourceGetStateWildcarded :: (HasCallStack, MonadIO m) => IconSource -> m Bool
- iconSourceNew :: (HasCallStack, MonadIO m) => m IconSource
- iconSourceSetDirection :: (HasCallStack, MonadIO m) => IconSource -> TextDirection -> m ()
- iconSourceSetDirectionWildcarded :: (HasCallStack, MonadIO m) => IconSource -> Bool -> m ()
- iconSourceSetFilename :: (HasCallStack, MonadIO m) => IconSource -> [Char] -> m ()
- iconSourceSetIconName :: (HasCallStack, MonadIO m) => IconSource -> Maybe Text -> m ()
- iconSourceSetPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => IconSource -> a -> m ()
- iconSourceSetSize :: (HasCallStack, MonadIO m) => IconSource -> Int32 -> m ()
- iconSourceSetSizeWildcarded :: (HasCallStack, MonadIO m) => IconSource -> Bool -> m ()
- iconSourceSetState :: (HasCallStack, MonadIO m) => IconSource -> StateType -> m ()
- iconSourceSetStateWildcarded :: (HasCallStack, MonadIO m) => IconSource -> Bool -> m ()
Exported types
newtype IconSource Source #
Memory-managed wrapper type.
IconSource (ManagedPtr IconSource) |
Instances
Eq IconSource Source # | |
Defined in GI.Gtk.Structs.IconSource (==) :: IconSource -> IconSource -> Bool # (/=) :: IconSource -> IconSource -> Bool # | |
GBoxed IconSource Source # | |
Defined in GI.Gtk.Structs.IconSource | |
ManagedPtrNewtype IconSource Source # | |
Defined in GI.Gtk.Structs.IconSource toManagedPtr :: IconSource -> ManagedPtr IconSource | |
TypedObject IconSource Source # | |
Defined in GI.Gtk.Structs.IconSource | |
HasParentTypes IconSource Source # | |
Defined in GI.Gtk.Structs.IconSource | |
IsGValue (Maybe IconSource) Source # | Convert |
Defined in GI.Gtk.Structs.IconSource gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe IconSource -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe IconSource) | |
type ParentTypes IconSource Source # | |
Defined in GI.Gtk.Structs.IconSource |
Methods
Click to display all available methods, including inherited ones
copy
:: (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
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m () |
getDirection
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
iconSourceGetDirectionWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Gets the value set by iconSourceSetDirectionWildcarded
.
getFilename
iconSourceGetFilename Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m [Char] | Returns: image filename. This string must not be modified or freed. |
getIconName
iconSourceGetIconName Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Text | Returns: icon name. This string must not be modified or freed. |
getPixbuf
:: (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
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Int32 | Returns: icon size (t |
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
iconSourceGetSizeWildcarded Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use IconTheme
instead.
Gets the value set by iconSourceSetSizeWildcarded
.
getState
:: (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
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
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
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
iconSourceSetFilename Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> [Char] |
|
-> m () |
setIconName
iconSourceSetIconName Source #
:: (HasCallStack, MonadIO m) | |
=> IconSource |
|
-> Maybe Text |
|
-> m () |
setPixbuf
:: (HasCallStack, MonadIO m, IsPixbuf a) | |
=> IconSource |
|
-> a |
|
-> m () |
setSize
:: (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
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
:: (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
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.