Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Contains information found when looking up an icon in GtkIconTheme
.
GtkIconPaintable
implements GdkPaintable
.
Synopsis
- newtype IconPaintable = IconPaintable (ManagedPtr IconPaintable)
- class (GObject o, IsDescendantOf IconPaintable o) => IsIconPaintable o
- toIconPaintable :: (MonadIO m, IsIconPaintable o) => o -> m IconPaintable
- iconPaintableGetFile :: (HasCallStack, MonadIO m, IsIconPaintable a) => a -> m (Maybe File)
- iconPaintableGetIconName :: (HasCallStack, MonadIO m, IsIconPaintable a) => a -> m (Maybe [Char])
- iconPaintableIsSymbolic :: (HasCallStack, MonadIO m, IsIconPaintable a) => a -> m Bool
- iconPaintableNewForFile :: (HasCallStack, MonadIO m, IsFile a) => a -> Int32 -> Int32 -> m IconPaintable
- constructIconPaintableFile :: (IsIconPaintable o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getIconPaintableFile :: (MonadIO m, IsIconPaintable o) => o -> m (Maybe File)
- constructIconPaintableIconName :: (IsIconPaintable o, MonadIO m) => Text -> m (GValueConstruct o)
- getIconPaintableIconName :: (MonadIO m, IsIconPaintable o) => o -> m (Maybe Text)
- constructIconPaintableIsSymbolic :: (IsIconPaintable o, MonadIO m) => Bool -> m (GValueConstruct o)
- getIconPaintableIsSymbolic :: (MonadIO m, IsIconPaintable o) => o -> m Bool
Exported types
newtype IconPaintable Source #
Memory-managed wrapper type.
IconPaintable (ManagedPtr IconPaintable) |
Instances
Eq IconPaintable Source # | |
Defined in GI.Gtk.Objects.IconPaintable (==) :: IconPaintable -> IconPaintable -> Bool # (/=) :: IconPaintable -> IconPaintable -> Bool # | |
GObject IconPaintable Source # | |
Defined in GI.Gtk.Objects.IconPaintable | |
ManagedPtrNewtype IconPaintable Source # | |
Defined in GI.Gtk.Objects.IconPaintable toManagedPtr :: IconPaintable -> ManagedPtr IconPaintable | |
TypedObject IconPaintable Source # | |
Defined in GI.Gtk.Objects.IconPaintable | |
HasParentTypes IconPaintable Source # | |
Defined in GI.Gtk.Objects.IconPaintable | |
IsGValue (Maybe IconPaintable) Source # | Convert |
Defined in GI.Gtk.Objects.IconPaintable gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe IconPaintable -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe IconPaintable) | |
type ParentTypes IconPaintable Source # | |
Defined in GI.Gtk.Objects.IconPaintable |
class (GObject o, IsDescendantOf IconPaintable o) => IsIconPaintable o Source #
Type class for types which can be safely cast to IconPaintable
, for instance with toIconPaintable
.
Instances
(GObject o, IsDescendantOf IconPaintable o) => IsIconPaintable o Source # | |
Defined in GI.Gtk.Objects.IconPaintable |
toIconPaintable :: (MonadIO m, IsIconPaintable o) => o -> m IconPaintable Source #
Cast to IconPaintable
, 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
bindProperty, bindPropertyFull, computeConcreteSize, forceFloating, freezeNotify, getv, invalidateContents, invalidateSize, isFloating, isSymbolic, notify, notifyByPspec, ref, refSink, runDispose, snapshot, snapshotSymbolic, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCurrentImage, getData, getFile, getFlags, getIconName, getIntrinsicAspectRatio, getIntrinsicHeight, getIntrinsicWidth, getProperty, getQdata.
Setters
getFile
:: (HasCallStack, MonadIO m, IsIconPaintable a) | |
=> a |
|
-> m (Maybe File) | Returns: the |
Gets the GFile
that was used to load the icon.
Returns Nothing
if the icon was not loaded from a file.
getIconName
iconPaintableGetIconName Source #
:: (HasCallStack, MonadIO m, IsIconPaintable a) | |
=> a |
|
-> m (Maybe [Char]) | Returns: the themed icon-name for the
icon, or |
Get the icon name being used for this icon.
When an icon looked up in the icon theme was not available, the
icon theme may use fallback icons - either those specified to
iconThemeLookupIcon
or the always-available
"image-missing". The icon chosen is returned by this function.
If the icon was created without an icon theme, this function
returns Nothing
.
isSymbolic
iconPaintableIsSymbolic Source #
:: (HasCallStack, MonadIO m, IsIconPaintable a) | |
=> a |
|
-> m Bool |
Checks if the icon is symbolic or not.
This currently uses only the file name and not the file contents for determining this. This behaviour may change in the future.
Note that to render a symbolic GtkIconPaintable
properly (with
recoloring), you have to set its icon name on a GtkImage
.
newForFile
iconPaintableNewForFile Source #
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m IconPaintable | Returns: a |
Creates a GtkIconPaintable
for a file with a given size and scale.
The icon can then be rendered by using it as a GdkPaintable
.
Properties
file
The file representing the icon, if any.
constructIconPaintableFile :: (IsIconPaintable o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “file
” property. This is rarely needed directly, but it is used by new
.
getIconPaintableFile :: (MonadIO m, IsIconPaintable o) => o -> m (Maybe File) Source #
Get the value of the “file
” property.
When overloading is enabled, this is equivalent to
get
iconPaintable #file
iconName
The icon name that was chosen during lookup.
constructIconPaintableIconName :: (IsIconPaintable o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “icon-name
” property. This is rarely needed directly, but it is used by new
.
getIconPaintableIconName :: (MonadIO m, IsIconPaintable o) => o -> m (Maybe Text) Source #
Get the value of the “icon-name
” property.
When overloading is enabled, this is equivalent to
get
iconPaintable #iconName
isSymbolic
Whether the icon is symbolic or not.
constructIconPaintableIsSymbolic :: (IsIconPaintable o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “is-symbolic
” property. This is rarely needed directly, but it is used by new
.
getIconPaintableIsSymbolic :: (MonadIO m, IsIconPaintable o) => o -> m Bool Source #
Get the value of the “is-symbolic
” property.
When overloading is enabled, this is equivalent to
get
iconPaintable #isSymbolic