gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.IconPaintable

Description

Contains information found when looking up an icon in an icon theme and supports painting it as a Paintable.

Synopsis

Exported types

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

Instances details
(GObject o, IsDescendantOf IconPaintable o) => IsIconPaintable o Source # 
Instance details

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

Overloaded methods

getFile

iconPaintableGetFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconPaintable a) 
=> a

self: a IconPaintable

-> m (Maybe File)

Returns: the File for the icon, or Nothing. Free with objectUnref.

Gets the File that was used to load the icon, or Nothing if the icon was not loaded from a file.

getIconName

iconPaintableGetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconPaintable a) 
=> a

self: a IconPaintable

-> m (Maybe [Char])

Returns: the themed icon-name for the icon, or Nothing if its not a themed icon.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsIconPaintable a) 
=> a

self: a IconPaintable

-> m Bool

Returns: True if the icon is symbolic, False otherwise

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.

newForFile

iconPaintableNewForFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File

-> Int32

size: desired icon size

-> Int32

scale: the desired scale

-> m IconPaintable

Returns: a IconPaintable containing for the icon. Unref with objectUnref

Creates a IconPaintable for a file with a given size and scale IconPaintable. The icon can then be rendered by using it as a Paintable.

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