xkbcommon-0.0.3: Haskell bindings for libxkbcommon

Safe HaskellNone
LanguageHaskell98

Text.XkbCommon.InternalTypes

Description

This module is intended to be used only when interoperating with other C libraries. For other usecases, Types is probably preferable.

Synopsis

Documentation

data Context Source #

Context is the exposed datatype of an xkbcommon context (struct xkb_context)

defaultFlags :: ContextFlags Source #

Default ContextFlags: consider RMLVO prefs from the environment variables, and search for Keymap files in the default paths.

pureFlags :: ContextFlags Source #

Pure ContextFlags: don't consider env vars or default search paths, which are system-dependent.

data Keymap Source #

Keymap represents a compiled keymap object. (struct xkb_keymap)

withKeymap :: Keymap -> (Ptr CKeymap -> IO a) -> IO a Source #

data RMLVO Source #

The RMLVO type specifies preferences for keymap creation (struct xkb_rule_names)

Constructors

RMLVO 

Instances

noPrefs :: RMLVO Source #

Specify that no specific keymap is preferred by the program. Depending on the specified ContextFlags during Context creation, RMLVO specifications may be loaded from environment variables.

data KeyboardState Source #

KeyboardState represents the state of a connected keyboard. (struct xkb_state)

toKeyboardState :: InternalKeyboardState -> KeyboardState Source #

fromKeyboardState :: KeyboardState -> InternalKeyboardState Source #

newtype Direction Source #

In a key event, a key can be pressed/moved down (keyDown) or released/moved up (keyUp).

Constructors

Direction Word32 

newtype Keysym Source #

One graphical symbol (usually on-screen). This is the end product of libxkbcommon. Some keysyms are not graphical characters, but can also represent e.g. Left or Right arrow keys. Refer to the libxkbcommon documentation for details.

NOTE that XKB_KEY_NoSymbol is represented by a Nothing in haskell-xkbcommon.

(xkb_keysym_t)

Constructors

Keysym Int 

Instances

newtype CLogLevel Source #

Constructors

CLogLevel Word32 

newtype CKeycode Source #

One keyboard key. Events on keys are the input of libxkbcommon.

Constructors

CKeycode 

Fields

newtype CLayoutIndex Source #

Index of a keyboard layout.

The layout index is a state component which detemines which keyboard layout is active. These may be different alphabets, different key arrangements, etc.

Layout indexes are consecutive. The first layout has index 0.

Each layout is not required to have a name, and the names are not guaranteed to be unique (though they are usually provided and unique). Therefore, it is not safe to use the name as a unique identifier for a layout. Layout names are case-sensitive.

Layouts are also called "groups" by XKB.

Constructors

CLayoutIndex Word32 

newtype CModIndex Source #

Index of a modifier.

A modifier is a state component which changes the way keys are interpreted. A keymap defines a set of modifiers, such as Alt, Shift, Num Lock or Meta, and specifies which keys may activate which modifiers (in a many-to-many relationship, i.e. a key can activate several modifiers, and a modifier may be activated by several keys. Different keymaps do this differently).

When retrieving the keysyms for a key, the active modifier set is consulted; this detemines the correct shift level to use within the currently active layout (see CLevelIndex).

Modifier indexes are consecutive. The first modifier has index 0.

Constructors

CModIndex 

Fields

newtype CLevelIndex Source #

Index of a shift level.

Constructors

CLevelIndex Word32