gi-gobject-2.0.31: GObject 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.GObject.Structs.EnumValue

Contents

- Exported types
- Methods
- Properties
  - value
  - valueName
  - valueNick

Description

A structure which contains a single enum value, its name, and its nickname.

Synopsis

- newtype EnumValue = EnumValue (ManagedPtr EnumValue)
- newZeroEnumValue :: MonadIO m => m EnumValue
- getEnumValueValue :: MonadIO m => EnumValue -> m Int32
- setEnumValueValue :: MonadIO m => EnumValue -> Int32 -> m ()
- clearEnumValueValueName :: MonadIO m => EnumValue -> m ()
- getEnumValueValueName :: MonadIO m => EnumValue -> m (Maybe Text)
- setEnumValueValueName :: MonadIO m => EnumValue -> CString -> m ()
- clearEnumValueValueNick :: MonadIO m => EnumValue -> m ()
- getEnumValueValueNick :: MonadIO m => EnumValue -> m (Maybe Text)
- setEnumValueValueNick :: MonadIO m => EnumValue -> CString -> m ()

# Exported types

newtype EnumValue Source #

Memory-managed wrapper type.

Constructors

EnumValue (ManagedPtr EnumValue) |

#### Instances

Instances details

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

newZeroEnumValue :: MonadIO m => m EnumValue Source #

Construct a `EnumValue` struct initialized to zero.

# Methods

# Properties

## value

the enum value

getEnumValueValue :: MonadIO m => EnumValue -> m Int32 Source #

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

    get enumValue #value

setEnumValueValue :: MonadIO m => EnumValue -> Int32 -> m () Source #

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

    set enumValue [ #value := value ]

## valueName

the name of the value

clearEnumValueValueName :: MonadIO m => EnumValue -> m () Source #

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

    clear #valueName

getEnumValueValueName :: MonadIO m => EnumValue -> m (Maybe Text) Source #

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

    get enumValue #valueName

setEnumValueValueName :: MonadIO m => EnumValue -> CString -> m () Source #

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

    set enumValue [ #valueName := value ]

## valueNick

the nickname of the value

clearEnumValueValueNick :: MonadIO m => EnumValue -> m () Source #

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

    clear #valueNick

getEnumValueValueNick :: MonadIO m => EnumValue -> m (Maybe Text) Source #

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

    get enumValue #valueNick

setEnumValueValueNick :: MonadIO m => EnumValue -> CString -> m () Source #

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

    set enumValue [ #valueNick := value ]