gi-atk-2.0.28: Atk bindings

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

GI.Atk.Structs.Attribute

Contents

- Exported types
- Methods
  - setFree
- Properties
  - name
  - value

Description

AtkAttribute is a string name/value pair representing a generic attribute. This can be used to expose additional information from an accessible object as a whole (see `objectGetAttributes`) or an document (see `documentGetAttributes`). In the case of text attributes (see `textGetDefaultAttributes`), `TextAttribute` enum defines all the possible text attribute names. You can use `textAttributeGetName` to get the string name from the enum value. See also `textAttributeForName` and `textAttributeGetValue` for more information.

A string name/value pair representing a generic attribute.

Synopsis

- newtype Attribute = Attribute (ManagedPtr Attribute)
- newZeroAttribute :: MonadIO m => m Attribute
- attributeSetFree :: (HasCallStack, MonadIO m) => [Ptr ()] -> m ()
- clearAttributeName :: MonadIO m => Attribute -> m ()
- getAttributeName :: MonadIO m => Attribute -> m (Maybe Text)
- setAttributeName :: MonadIO m => Attribute -> CString -> m ()
- clearAttributeValue :: MonadIO m => Attribute -> m ()
- getAttributeValue :: MonadIO m => Attribute -> m (Maybe Text)
- setAttributeValue :: MonadIO m => Attribute -> CString -> m ()

# Exported types

newtype Attribute Source #

Memory-managed wrapper type.

Constructors

Attribute (ManagedPtr Attribute) |

#### Instances

Instances details

Eq Attribute Source # |
Instance details Defined in GI.Atk.Structs.Attribute Methods (==) :: Attribute -> Attribute -> Bool Source # (/=) :: Attribute -> Attribute -> Bool Source #
BoxedPtr Attribute Source # |
Instance details Defined in GI.Atk.Structs.Attribute Methods boxedPtrCopy :: Attribute -> IO Attribute Source # boxedPtrFree :: Attribute -> IO () Source #
CallocPtr Attribute Source # |
Instance details Defined in GI.Atk.Structs.Attribute Methods boxedPtrCalloc :: IO (Ptr Attribute) Source #
ManagedPtrNewtype Attribute Source # |
Instance details Defined in GI.Atk.Structs.Attribute Methods toManagedPtr :: Attribute -> ManagedPtr Attribute Source #
tag ~ 'AttrSet => Constructible Attribute tag Source # |
Instance details Defined in GI.Atk.Structs.Attribute Methods new :: MonadIO m => (ManagedPtr Attribute -> Attribute) -> [AttrOp Attribute tag] -> m Attribute Source #

newZeroAttribute :: MonadIO m => m Attribute Source #

Construct a `Attribute` struct initialized to zero.

# Methods

## setFree

attributeSetFree Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [Ptr ()] | `attribSet`: The `AtkAttributeSet` to free
-> m () |

Frees the memory used by an `AtkAttributeSet`, including all its `AtkAttributes`.

# Properties

## name

The attribute name.

clearAttributeName :: MonadIO m => Attribute -> m () Source #

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

    clear #name

getAttributeName :: MonadIO m => Attribute -> m (Maybe Text) Source #

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

    get attribute #name

setAttributeName :: MonadIO m => Attribute -> CString -> m () Source #

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

    set attribute [ #name := value ]

## value

the value of the attribute, represented as a string.

clearAttributeValue :: MonadIO m => Attribute -> m () Source #

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

    clear #value

getAttributeValue :: MonadIO m => Attribute -> m (Maybe Text) Source #

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

    get attribute #value

setAttributeValue :: MonadIO m => Attribute -> CString -> m () Source #

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

    set attribute [ #value := value ]