gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.Image

Contents

- Exported types
- Methods
  - clear
  - getGicon
  - getIconName
  - getIconSize
  - getPaintable
  - getPixelSize
  - getStorageType
  - new
  - newFromFile
  - newFromGicon
  - newFromIconName
  - newFromPaintable
  - newFromPixbuf
  - newFromResource
  - setFromFile
  - setFromGicon
  - setFromIconName
  - setFromPaintable
  - setFromPixbuf
  - setFromResource
  - setIconSize
  - setPixelSize
- Properties
  - file
  - gicon
  - iconName
  - iconSize
  - paintable
  - pixelSize
  - resource
  - storageType
  - useFallback

Description

Displays an image.

<picture> <source srcset="image-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkImage" src="image.png"> </picture>

Various kinds of object can be displayed as an image; most typically, you would load a `GdkTexture` from a file, using the convenience function `imageNewFromFile`, for instance:

### c code

    GtkWidget *image = gtk_image_new_from_file ("myfile.png");

If the file isn’t loaded successfully, the image will contain a “broken image” icon similar to that used in many web browsers.

If you want to handle errors in loading the file yourself, for example by displaying an error message, then load the image with an image loading framework such as libglycin, then create the `GtkImage` with `imageNewFromPaintable`.

Sometimes an application will want to avoid depending on external data files, such as image files. See the documentation of `GResource` inside GIO, for details. In this case, Image:resource, `imageNewFromResource`, and `imageSetFromResource` should be used.

`GtkImage` displays its image as an icon, with a size that is determined by the application. See `Picture` if you want to show an image at is actual size.

## CSS nodes

`GtkImage` has a single CSS node with the name `image`. The style classes `.normal-icons` or `.large-icons` may appear, depending on the Image:iconSize property.

## Accessibility

`GtkImage` uses the `AccessibleRoleImg` role.

Synopsis

- newtype Image = Image (ManagedPtr Image)
- class (GObject o, IsDescendantOf Image o) => IsImage o
- toImage :: (MonadIO m, IsImage o) => o -> m Image
- imageClear :: (HasCallStack, MonadIO m, IsImage a) => a -> m ()
- imageGetGicon :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Maybe Icon)
- imageGetIconName :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Maybe Text)
- imageGetIconSize :: (HasCallStack, MonadIO m, IsImage a) => a -> m IconSize
- imageGetPaintable :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Maybe Paintable)
- imageGetPixelSize :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- imageGetStorageType :: (HasCallStack, MonadIO m, IsImage a) => a -> m ImageType
- imageNew :: (HasCallStack, MonadIO m) => m Image
- imageNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m Image
- imageNewFromGicon :: (HasCallStack, MonadIO m, IsIcon a) => a -> m Image
- imageNewFromIconName :: (HasCallStack, MonadIO m) => Maybe Text -> m Image
- imageNewFromPaintable :: (HasCallStack, MonadIO m, IsPaintable a) => Maybe a -> m Image
- imageNewFromPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => Maybe a -> m Image
- imageNewFromResource :: (HasCallStack, MonadIO m) => Text -> m Image
- imageSetFromFile :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe [Char] -> m ()
- imageSetFromGicon :: (HasCallStack, MonadIO m, IsImage a, IsIcon b) => a -> b -> m ()
- imageSetFromIconName :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe Text -> m ()
- imageSetFromPaintable :: (HasCallStack, MonadIO m, IsImage a, IsPaintable b) => a -> Maybe b -> m ()
- imageSetFromPixbuf :: (HasCallStack, MonadIO m, IsImage a, IsPixbuf b) => a -> Maybe b -> m ()
- imageSetFromResource :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe Text -> m ()
- imageSetIconSize :: (HasCallStack, MonadIO m, IsImage a) => a -> IconSize -> m ()
- imageSetPixelSize :: (HasCallStack, MonadIO m, IsImage a) => a -> Int32 -> m ()
- clearImageFile :: (MonadIO m, IsImage o) => o -> m ()
- constructImageFile :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o)
- getImageFile :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- setImageFile :: (MonadIO m, IsImage o) => o -> Text -> m ()
- constructImageGicon :: (IsImage o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o)
- getImageGicon :: (MonadIO m, IsImage o) => o -> m (Maybe Icon)
- setImageGicon :: (MonadIO m, IsImage o, IsIcon a) => o -> a -> m ()
- clearImageIconName :: (MonadIO m, IsImage o) => o -> m ()
- constructImageIconName :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o)
- getImageIconName :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- setImageIconName :: (MonadIO m, IsImage o) => o -> Text -> m ()
- constructImageIconSize :: (IsImage o, MonadIO m) => IconSize -> m (GValueConstruct o)
- getImageIconSize :: (MonadIO m, IsImage o) => o -> m IconSize
- setImageIconSize :: (MonadIO m, IsImage o) => o -> IconSize -> m ()
- clearImagePaintable :: (MonadIO m, IsImage o) => o -> m ()
- constructImagePaintable :: (IsImage o, MonadIO m, IsPaintable a) => a -> m (GValueConstruct o)
- getImagePaintable :: (MonadIO m, IsImage o) => o -> m (Maybe Paintable)
- setImagePaintable :: (MonadIO m, IsImage o, IsPaintable a) => o -> a -> m ()
- constructImagePixelSize :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getImagePixelSize :: (MonadIO m, IsImage o) => o -> m Int32
- setImagePixelSize :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- clearImageResource :: (MonadIO m, IsImage o) => o -> m ()
- constructImageResource :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o)
- getImageResource :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- setImageResource :: (MonadIO m, IsImage o) => o -> Text -> m ()
- getImageStorageType :: (MonadIO m, IsImage o) => o -> m ImageType
- constructImageUseFallback :: (IsImage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getImageUseFallback :: (MonadIO m, IsImage o) => o -> m Bool
- setImageUseFallback :: (MonadIO m, IsImage o) => o -> Bool -> m ()

# Exported types

newtype Image Source #

Memory-managed wrapper type.

Constructors

Image (ManagedPtr Image) |

#### Instances

Instances details

Eq Image Source # |
Instance details Defined in GI.Gtk.Objects.Image Methods (==) :: Image -> Image -> Bool Source # (/=) :: Image -> Image -> Bool Source #
GObject Image Source # |
Instance details Defined in GI.Gtk.Objects.Image
ManagedPtrNewtype Image Source # |
Instance details Defined in GI.Gtk.Objects.Image Methods toManagedPtr :: Image -> ManagedPtr Image Source #
TypedObject Image Source # |
Instance details Defined in GI.Gtk.Objects.Image Methods glibType :: IO GType Source #
HasParentTypes Image Source # |
Instance details Defined in GI.Gtk.Objects.Image
IsGValue (Maybe Image) Source # | Convert `Image` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.Image Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Image -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Image) Source #
type ParentTypes Image Source # |
Instance details Defined in GI.Gtk.Objects.Image type ParentTypes Image = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf Image o) => IsImage o Source #

Type class for types which can be safely cast to `Image`, for instance with `toImage`.

#### Instances

Instances details

(GObject o, IsDescendantOf Image o) => IsImage o Source # |
Instance details Defined in GI.Gtk.Objects.Image

toImage :: (MonadIO m, IsImage o) => o -> m Image Source #

Cast to `Image`, 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

Expand

#### Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, clear, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getGicon, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getIconName, getIconSize, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPaintable, getPangoContext, getParent, getPixelSize, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStorageType, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setFromFile, setFromGicon, setFromIconName, setFromPaintable, setFromPixbuf, setFromResource, setHalign, setHasTooltip, setHexpand, setHexpandSet, setIconSize, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setPixelSize, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## clear

imageClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m () |

Resets the image to be empty.

## getGicon

imageGetGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m (Maybe Icon) | Returns: a `GIcon`

Gets the `GIcon` being displayed by the `GtkImage`.

The storage type of the image must be `ImageTypeEmpty` or `ImageTypeGicon` (see `imageGetStorageType`). The caller of this function does not own a reference to the returned `GIcon`.

## getIconName

imageGetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m (Maybe Text) | Returns: the icon name

Gets the icon name and size being displayed by the `GtkImage`.

The storage type of the image must be `ImageTypeEmpty` or `ImageTypeIconName` (see `imageGetStorageType`). The returned string is owned by the `GtkImage` and should not be freed.

## getIconSize

imageGetIconSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m IconSize | Returns: the image size used by icons

Gets the icon size used by the `image` when rendering icons.

## getPaintable

imageGetPaintable Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m (Maybe Paintable) | Returns: the displayed paintable

Gets the image `GdkPaintable` being displayed by the `GtkImage`.

The storage type of the image must be `ImageTypeEmpty` or `ImageTypePaintable` (see `imageGetStorageType`). The caller of this function does not own a reference to the returned paintable.

## getPixelSize

imageGetPixelSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m Int32 | Returns: the pixel size used for named icons.

Gets the pixel size used for named icons.

## getStorageType

imageGetStorageType Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> m ImageType | Returns: image representation being used

Gets the type of representation being used by the `GtkImage` to store image data.

If the `GtkImage` has no image data, the return value will be `ImageTypeEmpty`.

## new

imageNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Image | Returns: a newly created `GtkImage` widget.

Creates a new empty `GtkImage` widget.

## newFromFile

imageNewFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [Char] | `filename`: a filename
-> m Image | Returns: a new `GtkImage`

Creates a new `GtkImage` displaying the file `filename`.

If the file isn’t found or can’t be loaded, the resulting `GtkImage` will display a “broken image” icon. This function never returns `Nothing`, it always returns a valid `GtkImage` widget.

If you need to detect failures to load the file, use an image loading framework such as libglycin to load the file yourself, then create the `GtkImage` from the texture.

The storage type (see `imageGetStorageType`) of the returned image is not defined, it will be whatever is appropriate for displaying the file.

## newFromGicon

imageNewFromGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsIcon a) |
=> a | `icon`: an icon
-> m Image | Returns: a new `GtkImage` displaying the themed icon

Creates a `GtkImage` displaying an icon from the current icon theme.

If the icon name isn’t known, a “broken image” icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.

## newFromIconName

imageNewFromIconName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Maybe Text | `iconName`: an icon name
-> m Image | Returns: a new `GtkImage` displaying the themed icon

Creates a `GtkImage` displaying an icon from the current icon theme.

If the icon name isn’t known, a “broken image” icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.

## newFromPaintable

imageNewFromPaintable Source #

Arguments

:: (HasCallStack, MonadIO m, IsPaintable a) |
=> Maybe a | `paintable`: a `GdkPaintable`
-> m Image | Returns: a new `GtkImage`

Creates a new `GtkImage` displaying `paintable`.

The `GtkImage` does not assume a reference to the paintable; you still need to unref it if you own references. `GtkImage` will add its own reference rather than adopting yours.

The `GtkImage` will track changes to the `paintable` and update its size and contents in response to it.

Note that paintables are still subject to the icon size that is set on the image. If you want to display a paintable at its intrinsic size, use `Picture` instead.

If `paintable` is a `SymbolicPaintable`, then it will be recolored with the symbolic palette from the theme.

## newFromPixbuf

imageNewFromPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a) |
=> Maybe a | `pixbuf`: a `GdkPixbuf`
-> m Image | Returns: a new `GtkImage`

Deprecated: (Since version 4.12)Use `imageNewFromPaintable` and`textureNewForPixbuf` instead

Creates a new `GtkImage` displaying `pixbuf`.

The `GtkImage` does not assume a reference to the pixbuf; you still need to unref it if you own references. `GtkImage` will add its own reference rather than adopting yours.

This is a helper for `imageNewFromPaintable`, and you can't get back the exact pixbuf once this is called, only a texture.

Note that this function just creates an `GtkImage` from the pixbuf. The `GtkImage` created will not react to state changes. Should you want that, you should use `imageNewFromIconName`.

## newFromResource

imageNewFromResource Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `resourcePath`: a resource path
-> m Image | Returns: a new `GtkImage`

Creates a new `GtkImage` displaying the resource file `resourcePath`.

If the file isn’t found or can’t be loaded, the resulting `GtkImage` will display a “broken image” icon. This function never returns `Nothing`, it always returns a valid `GtkImage` widget.

If you need to detect failures to load the file, use an image loading framework such as libglycin to load the file yourself, then create the `GtkImage` from the texture.

The storage type (see `imageGetStorageType`) of the returned image is not defined, it will be whatever is appropriate for displaying the file.

## setFromFile

imageSetFromFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> Maybe [Char] | `filename`: a filename
-> m () |

Sets a `GtkImage` to show a file.

See `imageNewFromFile` for details.

::: warning Note that this function should not be used with untrusted data. Use a proper image loading framework such as libglycin, which can load many image formats into a `GdkTexture`, and then use `imageSetFromPaintable`.

## setFromGicon

imageSetFromGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a, IsIcon b) |
=> a | `image`: a `GtkImage`
-> b | `icon`: an icon
-> m () |

Sets a `GtkImage` to show a `GIcon`.

See `imageNewFromGicon` for details.

## setFromIconName

imageSetFromIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> Maybe Text | `iconName`: an icon name
-> m () |

Sets a `GtkImage` to show a named icon.

See `imageNewFromIconName` for details.

## setFromPaintable

imageSetFromPaintable Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a, IsPaintable b) |
=> a | `image`: a `GtkImage`
-> Maybe b | `paintable`: a `GdkPaintable`
-> m () |

Sets a `GtkImage` to show a `GdkPaintable`.

See `imageNewFromPaintable` for details.

## setFromPixbuf

imageSetFromPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a, IsPixbuf b) |
=> a | `image`: a `GtkImage`
-> Maybe b | `pixbuf`: a `GdkPixbuf` or `NULL`
-> m () |

Deprecated: (Since version 4.12)Use `imageSetFromPaintable` instead

Sets a `GtkImage` to show a `GdkPixbuf`.

See `imageNewFromPixbuf` for details.

Note: This is a helper for `imageSetFromPaintable`, and you can't get back the exact pixbuf once this is called, only a paintable.

## setFromResource

imageSetFromResource Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> Maybe Text | `resourcePath`: a resource path
-> m () |

Sets a `GtkImage` to show a resource.

See `imageNewFromResource` for details.

## setIconSize

imageSetIconSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> IconSize | `iconSize`: the new icon size
-> m () |

Suggests an icon size to the theme for named icons.

## setPixelSize

imageSetPixelSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `GtkImage`
-> Int32 | `pixelSize`: the new pixel size
-> m () |

Sets the pixel size to use for named icons.

If the pixel size is set to a value != -1, it is used instead of the icon size set by `imageSetIconSize`.

# Properties

## file

A path to the file to display.

clearImageFile :: (MonadIO m, IsImage o) => o -> m () Source #

Set the value of the “`file`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #file

constructImageFile :: (IsImage o, MonadIO m) => Text -> 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`.

getImageFile :: (MonadIO m, IsImage o) => o -> m (Maybe Text) Source #

Get the value of the “`file`” property. When overloading is enabled, this is equivalent to

    get image #file

setImageFile :: (MonadIO m, IsImage o) => o -> Text -> m () Source #

Set the value of the “`file`” property. When overloading is enabled, this is equivalent to

    set image [ #file := value ]

## gicon

The `GIcon` displayed in the GtkImage.

For themed icons, If the icon theme is changed, the image will be updated automatically.

constructImageGicon :: (IsImage o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`gicon`” property. This is rarely needed directly, but it is used by `new`.

getImageGicon :: (MonadIO m, IsImage o) => o -> m (Maybe Icon) Source #

Get the value of the “`gicon`” property. When overloading is enabled, this is equivalent to

    get image #gicon

setImageGicon :: (MonadIO m, IsImage o, IsIcon a) => o -> a -> m () Source #

Set the value of the “`gicon`” property. When overloading is enabled, this is equivalent to

    set image [ #gicon := value ]

## iconName

The name of the icon in the icon theme.

If the icon theme is changed, the image will be updated automatically.

clearImageIconName :: (MonadIO m, IsImage o) => o -> m () Source #

Set the value of the “`icon-name`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #iconName

constructImageIconName :: (IsImage 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`.

getImageIconName :: (MonadIO m, IsImage o) => o -> m (Maybe Text) Source #

Get the value of the “`icon-name`” property. When overloading is enabled, this is equivalent to

    get image #iconName

setImageIconName :: (MonadIO m, IsImage o) => o -> Text -> m () Source #

Set the value of the “`icon-name`” property. When overloading is enabled, this is equivalent to

    set image [ #iconName := value ]

## iconSize

The symbolic size to display icons at.

constructImageIconSize :: (IsImage o, MonadIO m) => IconSize -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`icon-size`” property. This is rarely needed directly, but it is used by `new`.

getImageIconSize :: (MonadIO m, IsImage o) => o -> m IconSize Source #

Get the value of the “`icon-size`” property. When overloading is enabled, this is equivalent to

    get image #iconSize

setImageIconSize :: (MonadIO m, IsImage o) => o -> IconSize -> m () Source #

Set the value of the “`icon-size`” property. When overloading is enabled, this is equivalent to

    set image [ #iconSize := value ]

## paintable

The `GdkPaintable` to display.

clearImagePaintable :: (MonadIO m, IsImage o) => o -> m () Source #

Set the value of the “`paintable`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #paintable

constructImagePaintable :: (IsImage o, MonadIO m, IsPaintable a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`paintable`” property. This is rarely needed directly, but it is used by `new`.

getImagePaintable :: (MonadIO m, IsImage o) => o -> m (Maybe Paintable) Source #

Get the value of the “`paintable`” property. When overloading is enabled, this is equivalent to

    get image #paintable

setImagePaintable :: (MonadIO m, IsImage o, IsPaintable a) => o -> a -> m () Source #

Set the value of the “`paintable`” property. When overloading is enabled, this is equivalent to

    set image [ #paintable := value ]

## pixelSize

The size in pixels to display icons at.

If set to a value != -1, this property overrides the Image:iconSize property for images of type `GTK_IMAGE_ICON_NAME`.

constructImagePixelSize :: (IsImage o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`pixel-size`” property. This is rarely needed directly, but it is used by `new`.

getImagePixelSize :: (MonadIO m, IsImage o) => o -> m Int32 Source #

Get the value of the “`pixel-size`” property. When overloading is enabled, this is equivalent to

    get image #pixelSize

setImagePixelSize :: (MonadIO m, IsImage o) => o -> Int32 -> m () Source #

Set the value of the “`pixel-size`” property. When overloading is enabled, this is equivalent to

    set image [ #pixelSize := value ]

## resource

A path to a resource file to display.

clearImageResource :: (MonadIO m, IsImage o) => o -> m () Source #

Set the value of the “`resource`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #resource

constructImageResource :: (IsImage o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`resource`” property. This is rarely needed directly, but it is used by `new`.

getImageResource :: (MonadIO m, IsImage o) => o -> m (Maybe Text) Source #

Get the value of the “`resource`” property. When overloading is enabled, this is equivalent to

    get image #resource

setImageResource :: (MonadIO m, IsImage o) => o -> Text -> m () Source #

Set the value of the “`resource`” property. When overloading is enabled, this is equivalent to

    set image [ #resource := value ]

## storageType

The representation being used for image data.

getImageStorageType :: (MonadIO m, IsImage o) => o -> m ImageType Source #

Get the value of the “`storage-type`” property. When overloading is enabled, this is equivalent to

    get image #storageType

## useFallback

Whether the icon displayed in the `GtkImage` will use standard icon names fallback.

The value of this property is only relevant for images of type `ImageTypeIconName` and `ImageTypeGicon`.

constructImageUseFallback :: (IsImage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`use-fallback`” property. This is rarely needed directly, but it is used by `new`.

getImageUseFallback :: (MonadIO m, IsImage o) => o -> m Bool Source #

Get the value of the “`use-fallback`” property. When overloading is enabled, this is equivalent to

    get image #useFallback

setImageUseFallback :: (MonadIO m, IsImage o) => o -> Bool -> m () Source #

Set the value of the “`use-fallback`” property. When overloading is enabled, this is equivalent to

    set image [ #useFallback := value ]