| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Gtk.Structs.IconSet
Description
No description available in the introspection data.
Synopsis
- newtype IconSet = IconSet (ManagedPtr IconSet)
- iconSetAddSource :: (HasCallStack, MonadIO m) => IconSet -> IconSource -> m ()
- iconSetCopy :: (HasCallStack, MonadIO m) => IconSet -> m IconSet
- iconSetGetSizes :: (HasCallStack, MonadIO m) => IconSet -> m [Int32]
- iconSetNew :: (HasCallStack, MonadIO m) => m IconSet
- iconSetNewFromPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m IconSet
- iconSetRef :: (HasCallStack, MonadIO m) => IconSet -> m IconSet
- iconSetRenderIcon :: (HasCallStack, MonadIO m, IsStyle a, IsWidget b) => IconSet -> Maybe a -> TextDirection -> StateType -> Int32 -> Maybe b -> Maybe Text -> m Pixbuf
- iconSetRenderIconPixbuf :: (HasCallStack, MonadIO m, IsStyleContext a) => IconSet -> a -> Int32 -> m Pixbuf
- iconSetRenderIconSurface :: (HasCallStack, MonadIO m, IsStyleContext a, IsWindow b) => IconSet -> a -> Int32 -> Int32 -> Maybe b -> m Surface
- iconSetUnref :: (HasCallStack, MonadIO m) => IconSet -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq IconSet Source # | |
| GBoxed IconSet Source # | |
Defined in GI.Gtk.Structs.IconSet | |
| ManagedPtrNewtype IconSet Source # | |
Defined in GI.Gtk.Structs.IconSet Methods toManagedPtr :: IconSet -> ManagedPtr IconSet | |
| TypedObject IconSet Source # | |
Defined in GI.Gtk.Structs.IconSet Methods glibType :: IO GType | |
| IsGValue IconSet Source # | Convert |
Defined in GI.Gtk.Structs.IconSet | |
| HasParentTypes IconSet Source # | |
Defined in GI.Gtk.Structs.IconSet | |
| type ParentTypes IconSet Source # | |
Defined in GI.Gtk.Structs.IconSet type ParentTypes IconSet = '[] :: [Type] | |
Methods
Overloaded methods
addSource
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IconSet |
|
| -> IconSource |
|
| -> m () |
Deprecated: (Since version 3.10)Use IconTheme instead.
Icon sets have a list of IconSource, which they use as base
icons for rendering icons in different states and sizes. Icons are
scaled, made to look insensitive, etc. in
iconSetRenderIcon, but IconSet needs base images to
work with. The base images and when to use them are described by
a IconSource.
This function copies source, so you can reuse the same source immediately
without affecting the icon set.
An example of when you’d use this function: 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, and you might add a separate source for each one.
You should nearly always add a “default” icon source with all
fields wildcarded, which will be used as a fallback if no more
specific source matches. IconSet always prefers more specific
icon sources to more generic icon sources. The order in which you
add the sources to the icon set does not matter.
iconSetNewFromPixbuf creates a new icon set with a
default icon source based on the given pixbuf.
copy
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IconSet |
|
| -> m IconSet | Returns: a new |
Deprecated: (Since version 3.10)Use IconTheme instead.
Copies iconSet by value.
getSizes
new
Deprecated: (Since version 3.10)Use IconTheme instead.
Creates a new IconSet. A IconSet represents a single icon
in various sizes and widget states. It can provide a Pixbuf
for a given size and state on request, and automatically caches
some of the rendered Pixbuf objects.
Normally you would use widgetRenderIconPixbuf instead of
using IconSet directly. The one case where you’d use
IconSet is to create application-specific icon sets to place in
a IconFactory.
newFromPixbuf
Arguments
| :: (HasCallStack, MonadIO m, IsPixbuf a) | |
| => a |
|
| -> m IconSet | Returns: a new |
Deprecated: (Since version 3.10)Use IconTheme instead.
Creates a new IconSet with pixbuf as the default/fallback
source image. If you don’t add any additional IconSource to the
icon set, all variants of the icon will be created from pixbuf,
using scaling, pixelation, etc. as required to adjust the icon size
or make the icon look insensitive/prelighted.
ref
Deprecated: (Since version 3.10)Use IconTheme instead.
Increments the reference count on iconSet.
renderIcon
Arguments
| :: (HasCallStack, MonadIO m, IsStyle a, IsWidget b) | |
| => IconSet |
|
| -> Maybe a |
|
| -> TextDirection |
|
| -> StateType |
|
| -> Int32 |
|
| -> Maybe b |
|
| -> Maybe Text |
|
| -> m Pixbuf | Returns: a |
Deprecated: (Since version 3.0)Use iconSetRenderIconPixbuf instead
Renders an icon using styleRenderIcon. In most cases,
widgetRenderIcon is better, since it automatically provides
most of the arguments from the current widget settings. This
function never returns Nothing; if the icon can’t be rendered
(perhaps because an image file fails to load), a default "missing
image" icon will be returned instead.
renderIconPixbuf
iconSetRenderIconPixbuf Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStyleContext a) | |
| => IconSet |
|
| -> a |
|
| -> Int32 |
|
| -> m Pixbuf | Returns: a |
Deprecated: (Since version 3.10)Use IconTheme instead.
Renders an icon using renderIconPixbuf. In most cases,
widgetRenderIconPixbuf is better, since it automatically provides
most of the arguments from the current widget settings. This
function never returns Nothing; if the icon can’t be rendered
(perhaps because an image file fails to load), a default "missing
image" icon will be returned instead.
Since: 3.0
renderIconSurface
iconSetRenderIconSurface Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStyleContext a, IsWindow b) | |
| => IconSet |
|
| -> a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> Maybe b |
|
| -> m Surface | Returns: a |
Deprecated: (Since version 3.10)Use IconTheme instead.
Renders an icon using renderIconPixbuf and converts it to a
cairo surface.
This function never returns Nothing; if the icon can’t be rendered
(perhaps because an image file fails to load), a default "missing
image" icon will be returned instead.
Since: 3.10