gi-atk-2.0.22: Atk bindings

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

GI.Atk.Structs.KeyEventStruct

Contents

- Exported types
- Methods
  - Overloaded methods
- Properties
  - keycode
  - keyval
  - length
  - state
  - string
  - timestamp
  - type

Description

Encapsulates information about a key event.

Synopsis

- newtype KeyEventStruct = KeyEventStruct (ManagedPtr KeyEventStruct)
- newZeroKeyEventStruct :: MonadIO m => m KeyEventStruct
- getKeyEventStructKeycode :: MonadIO m => KeyEventStruct -> m Word16
- setKeyEventStructKeycode :: MonadIO m => KeyEventStruct -> Word16 -> m ()
- getKeyEventStructKeyval :: MonadIO m => KeyEventStruct -> m Word32
- setKeyEventStructKeyval :: MonadIO m => KeyEventStruct -> Word32 -> m ()
- getKeyEventStructLength :: MonadIO m => KeyEventStruct -> m Int32
- setKeyEventStructLength :: MonadIO m => KeyEventStruct -> Int32 -> m ()
- getKeyEventStructState :: MonadIO m => KeyEventStruct -> m Word32
- setKeyEventStructState :: MonadIO m => KeyEventStruct -> Word32 -> m ()
- clearKeyEventStructString :: MonadIO m => KeyEventStruct -> m ()
- getKeyEventStructString :: MonadIO m => KeyEventStruct -> m (Maybe Text)
- setKeyEventStructString :: MonadIO m => KeyEventStruct -> CString -> m ()
- getKeyEventStructTimestamp :: MonadIO m => KeyEventStruct -> m Word32
- setKeyEventStructTimestamp :: MonadIO m => KeyEventStruct -> Word32 -> m ()
- getKeyEventStructType :: MonadIO m => KeyEventStruct -> m Int32
- setKeyEventStructType :: MonadIO m => KeyEventStruct -> Int32 -> m ()

# Exported types

newtype KeyEventStruct Source #

Memory-managed wrapper type.

Constructors

KeyEventStruct (ManagedPtr KeyEventStruct) |

#### Instances

Instances details

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

newZeroKeyEventStruct :: MonadIO m => m KeyEventStruct Source #

Construct a `KeyEventStruct` struct initialized to zero.

# Methods

## Overloaded methods

# Properties

## keycode

The raw hardware code that generated the key event. This field is raraly useful.

getKeyEventStructKeycode :: MonadIO m => KeyEventStruct -> m Word16 Source #

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

    get keyEventStruct #keycode

setKeyEventStructKeycode :: MonadIO m => KeyEventStruct -> Word16 -> m () Source #

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

    set keyEventStruct [ #keycode := value ]

## keyval

A guint representing a keysym value corresponding to those used by GDK and X11: see /usr/X11/include/keysymdef.h.

getKeyEventStructKeyval :: MonadIO m => KeyEventStruct -> m Word32 Source #

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

    get keyEventStruct #keyval

setKeyEventStructKeyval :: MonadIO m => KeyEventStruct -> Word32 -> m () Source #

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

    set keyEventStruct [ #keyval := value ]

## length

The length of member `string`.

getKeyEventStructLength :: MonadIO m => KeyEventStruct -> m Int32 Source #

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

    get keyEventStruct #length

setKeyEventStructLength :: MonadIO m => KeyEventStruct -> Int32 -> m () Source #

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

    set keyEventStruct [ #length := value ]

## state

A bitmask representing the state of the modifier keys immediately after the event takes place. The meaning of the bits is currently defined to match the bitmask used by GDK in GdkEventType.state, see http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html`GdkEventKey`

getKeyEventStructState :: MonadIO m => KeyEventStruct -> m Word32 Source #

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

    get keyEventStruct #state

setKeyEventStructState :: MonadIO m => KeyEventStruct -> Word32 -> m () Source #

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

    set keyEventStruct [ #state := value ]

## string

A string containing one of the following: either a string approximating the text that would result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress. Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". "0", "semicolon", "aacute". Keypad keys have the prefix "KP".

clearKeyEventStructString :: MonadIO m => KeyEventStruct -> m () Source #

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

    clear #string

getKeyEventStructString :: MonadIO m => KeyEventStruct -> m (Maybe Text) Source #

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

    get keyEventStruct #string

setKeyEventStructString :: MonadIO m => KeyEventStruct -> CString -> m () Source #

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

    set keyEventStruct [ #string := value ]

## timestamp

A timestamp in milliseconds indicating when the event occurred. These timestamps are relative to a starting point which should be considered arbitrary, and only used to compare the dispatch times of events to one another.

getKeyEventStructTimestamp :: MonadIO m => KeyEventStruct -> m Word32 Source #

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

    get keyEventStruct #timestamp

setKeyEventStructTimestamp :: MonadIO m => KeyEventStruct -> Word32 -> m () Source #

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

    set keyEventStruct [ #timestamp := value ]

## type

An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE

getKeyEventStructType :: MonadIO m => KeyEventStruct -> m Int32 Source #

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

    get keyEventStruct #type

setKeyEventStructType :: MonadIO m => KeyEventStruct -> Int32 -> m () Source #

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

    set keyEventStruct [ #type := value ]