gi-gdk-3.0.24: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gdk.Structs.EventKey

Description

Describes a key press or key release event.

Synopsis

Exported types

newtype EventKey Source #

Memory-managed wrapper type.

Constructors

EventKey (ManagedPtr EventKey) 

Instances

Instances details
Eq EventKey Source # 
Instance details

Defined in GI.Gdk.Structs.EventKey

BoxedPtr EventKey Source # 
Instance details

Defined in GI.Gdk.Structs.EventKey

CallocPtr EventKey Source # 
Instance details

Defined in GI.Gdk.Structs.EventKey

ManagedPtrNewtype EventKey Source # 
Instance details

Defined in GI.Gdk.Structs.EventKey

Methods

toManagedPtr :: EventKey -> ManagedPtr EventKey

tag ~ 'AttrSet => Constructible EventKey tag Source # 
Instance details

Defined in GI.Gdk.Structs.EventKey

Methods

new :: MonadIO m => (ManagedPtr EventKey -> EventKey) -> [AttrOp EventKey tag] -> m EventKey

newZeroEventKey :: MonadIO m => m EventKey Source #

Construct a EventKey struct initialized to zero.

Methods

Properties

group

the keyboard group.

getEventKeyGroup :: MonadIO m => EventKey -> m Word8 Source #

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

get eventKey #group

setEventKeyGroup :: MonadIO m => EventKey -> Word8 -> m () Source #

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

set eventKey [ #group := value ]

hardwareKeycode

the raw code of the key that was pressed or released.

getEventKeyHardwareKeycode :: MonadIO m => EventKey -> m Word16 Source #

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

get eventKey #hardwareKeycode

setEventKeyHardwareKeycode :: MonadIO m => EventKey -> Word16 -> m () Source #

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

set eventKey [ #hardwareKeycode := value ]

isModifier

a flag that indicates if hardwareKeycode is mapped to a modifier. Since 2.10

getEventKeyIsModifier :: MonadIO m => EventKey -> m Word32 Source #

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

get eventKey #isModifier

setEventKeyIsModifier :: MonadIO m => EventKey -> Word32 -> m () Source #

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

set eventKey [ #isModifier := value ]

keyval

the key that was pressed or released. See the gdk/gdkkeysyms.h header file for a complete list of GDK key codes.

getEventKeyKeyval :: MonadIO m => EventKey -> m Word32 Source #

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

get eventKey #keyval

setEventKeyKeyval :: MonadIO m => EventKey -> Word32 -> m () Source #

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

set eventKey [ #keyval := value ]

length

the length of string.

getEventKeyLength :: MonadIO m => EventKey -> m Int32 Source #

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

get eventKey #length

setEventKeyLength :: MonadIO m => EventKey -> Int32 -> m () Source #

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

set eventKey [ #length := value ]

sendEvent

True if the event was sent explicitly.

getEventKeySendEvent :: MonadIO m => EventKey -> m Int8 Source #

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

get eventKey #sendEvent

setEventKeySendEvent :: MonadIO m => EventKey -> Int8 -> m () Source #

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

set eventKey [ #sendEvent := value ]

state

a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

getEventKeyState :: MonadIO m => EventKey -> m [ModifierType] Source #

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

get eventKey #state

setEventKeyState :: MonadIO m => EventKey -> [ModifierType] -> m () Source #

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

set eventKey [ #state := value ]

string

a string containing an approximation of the text that would result from this keypress. The only correct way to handle text input of text is using input methods (see GtkIMContext), so this field is deprecated and should never be used. (unicodeToKeyval provides a non-deprecated way of getting an approximate translation for a key.) The string is encoded in the encoding of the current locale (Note: this for backwards compatibility: strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated. In some cases, the translation of the key code will be a single NUL byte, in which case looking at length is necessary to distinguish it from the an empty translation.

clearEventKeyString :: MonadIO m => EventKey -> m () Source #

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

clear #string

getEventKeyString :: MonadIO m => EventKey -> m (Maybe Text) Source #

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

get eventKey #string

setEventKeyString :: MonadIO m => EventKey -> CString -> m () Source #

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

set eventKey [ #string := value ]

time

the time of the event in milliseconds.

getEventKeyTime :: MonadIO m => EventKey -> m Word32 Source #

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

get eventKey #time

setEventKeyTime :: MonadIO m => EventKey -> Word32 -> m () Source #

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

set eventKey [ #time := value ]

type

the type of the event (EventTypeKeyPress or EventTypeKeyRelease).

getEventKeyType :: MonadIO m => EventKey -> m EventType Source #

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

get eventKey #type

setEventKeyType :: MonadIO m => EventKey -> EventType -> m () Source #

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

set eventKey [ #type := value ]

window

the window which received the event.

clearEventKeyWindow :: MonadIO m => EventKey -> m () Source #

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

clear #window

getEventKeyWindow :: MonadIO m => EventKey -> m (Maybe Window) Source #

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

get eventKey #window

setEventKeyWindow :: MonadIO m => EventKey -> Ptr Window -> m () Source #

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

set eventKey [ #window := value ]