gi-atk-2.0.18: Atk bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Atk.Interfaces.Image

Contents

- Exported types
- Methods
  - getImageDescription
  - getImageLocale
  - getImagePosition
  - getImageSize
  - setImageDescription

Description

`Image` should be implemented by `Object` subtypes on behalf of components which display image/pixmap information onscreen, and which provide information (other than just widget borders, etc.) via that image content. For instance, icons, buttons with icons, toolbar elements, and image viewing panes typically should implement `Image`.

`Image` primarily provides two types of information: coordinate information (useful for screen review mode of screenreaders, and for use by onscreen magnifiers), and descriptive information. The descriptive information is provided for alternative, text-only presentation of the most significant information present in the image.

Synopsis

- newtype Image = Image (ManagedPtr Image)
- noImage :: Maybe Image
- class ManagedPtrNewtype a => IsImage a
- imageGetImageDescription :: (HasCallStack, MonadIO m, IsImage a) => a -> m Text
- imageGetImageLocale :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Maybe Text)
- imageGetImagePosition :: (HasCallStack, MonadIO m, IsImage a) => a -> CoordType -> m (Int32, Int32)
- imageGetImageSize :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Int32, Int32)
- imageSetImageDescription :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> m Bool

# Exported types

newtype Image Source #

Memory-managed wrapper type.

Constructors

Image (ManagedPtr Image) |

Instances

WrappedPtr Image Source # |
Instance details Defined in GI.Atk.Interfaces.Image Methods wrappedPtrCalloc :: IO (Ptr Image) Source # wrappedPtrCopy :: Image -> IO Image Source # wrappedPtrFree :: Maybe (FunPtr (Ptr Image -> IO ())) Source #
IsImage Image Source # |
Instance details Defined in GI.Atk.Interfaces.Image

noImage :: Maybe Image Source #

A convenience alias for `Nothing` :: `Maybe` `Image`.

class ManagedPtrNewtype a => IsImage a Source #

Type class for types which implement `Image`.

Instances

IsImage Image Source # |
Instance details Defined in GI.Atk.Interfaces.Image
IsImage NoOpObject Source # |
Instance details Defined in GI.Atk.Objects.NoOpObject

# Methods

## getImageDescription

imageGetImageDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `Object` instance that implements AtkImageIface
-> m Text | Returns: a string representing the image description

Get a textual description of this image.

## getImageLocale

imageGetImageLocale Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: An `Image`
-> m (Maybe Text) | Returns: a string corresponding to the POSIX `LC_MESSAGES` locale used by the image description, or `Nothing` if the image does not specify a locale.

Retrieves the locale identifier associated to the `Image`.

Since: 1.12

## getImagePosition

imageGetImagePosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `Object` instance that implements AtkImageIface
-> CoordType | `coordType`: specifies whether the coordinates are relative to the screen or to the components top level window
-> m (Int32, Int32) |

Gets the position of the image in the form of a point specifying the images top-left corner.

## getImageSize

imageGetImageSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `Object` instance that implements AtkImageIface
-> m (Int32, Int32) |

Get the width and height in pixels for the specified image. The values of `width` and `height` are returned as -1 if the values cannot be obtained (for instance, if the object is not onscreen).

## setImageDescription

imageSetImageDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsImage a) |
=> a | `image`: a `Object` instance that implements AtkImageIface
-> Text | `description`: a string description to set for `image`
-> m Bool | Returns: boolean TRUE, or FALSE if operation could not be completed.

Sets the textual description for this image.