Copyright | (c) 2016-19 Brian W Bush |
---|---|
License | MIT |
Maintainer | Brian W Bush <code@functionally.io> |
Stability | Beta |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Event types.
Synopsis
- data Event
- = KeyEvent { }
- | SpecialKeyEvent {
- specialKey :: SpecialKey
- toggle :: Maybe Toggle
- modifiers :: Maybe Modifiers
- mousePosition :: Maybe (Double, Double)
- | MouseEvent {
- button :: ButtonState
- modifiers :: Maybe Modifiers
- mousePosition :: Maybe (Double, Double)
- | ButtonEvent { }
- | ButtonsEvent {
- buttons :: [ButtonState]
- | PositionEvent {
- mousePosition :: Maybe (Double, Double)
- | MotionEvent { }
- | RotationEvent { }
- | JoystickEvent { }
- | FingerEvent { }
- | PointerEvent {
- pointerPosition :: (Double, Double, Double)
- | AnalogEvent {
- axis :: Int
- analogValue :: Double
- | DialEvent { }
- | LocationEvent { }
- | OrientationEvent {
- orientation :: (Double, Double, Double, Double)
- | EventError { }
- data SpecialKey
- data Toggle
- data Modifiers = Modifiers {
- shiftModifier :: Bool
- ctrlModifier :: Bool
- altModifier :: Bool
- data Button
- type ButtonState = (Button, Toggle)
- data Hand
- data Finger
Types
An event.
KeyEvent | A character from a keyboard. |
SpecialKeyEvent | A special key from a keyboard. |
| |
MouseEvent | A button press on a mouse. |
| |
ButtonEvent | The press of of a button. |
| |
ButtonsEvent | The pressing of several buttons. |
| |
PositionEvent | The movement of a mouse. |
| |
MotionEvent | Motion. |
| |
RotationEvent | Rotation. |
| |
JoystickEvent | Joystick position. |
| |
FingerEvent | Moving a finger. |
PointerEvent | Moving a pointer. |
| |
AnalogEvent | An analog value. |
| |
DialEvent | A dial value. |
LocationEvent | Location in space. |
OrientationEvent | Orientation in space. |
| |
EventError | An error. |
Instances
data SpecialKey Source #
A special key.
KeyF1 | F1 |
KeyF2 | F2 |
KeyF3 | F3 |
KeyF4 | F4 |
KeyF5 | F5 |
KeyF6 | F6 |
KeyF7 | F7 |
KeyF8 | F8 |
KeyF9 | F9 |
KeyF10 | F10 |
KeyF11 | F11 |
KeyF12 | F12 |
KeyLeft | left arrow |
KeyUp | up arrow |
KeyRight | right arrow |
KeyDown | down arrow |
KeyPageUp | page up |
KeyPageDown | page down |
KeyHome | home |
KeyEnd | end |
KeyInsert | insert |
KeyNumLock | number lock |
KeyBegin | begin |
KeyDelete | delete |
KeyShiftL | left shift |
KeyShiftR | right shift |
KeyCtrlL | left control |
KeyCtrlR | right control |
KeyAltL | left alt |
KeyAltR | right alt |
KeyUnknown Int | unknown, with a specified index |
Instances
The state of a button.
Instances
Bounded Toggle Source # | |
Enum Toggle Source # | |
Defined in Network.UI.Kafka.Types | |
Eq Toggle Source # | |
Ord Toggle Source # | |
Read Toggle Source # | |
Show Toggle Source # | |
Generic Toggle Source # | |
ToJSON Toggle Source # | |
Defined in Network.UI.Kafka.Types | |
FromJSON Toggle Source # | |
Binary Toggle Source # | |
Serialize Toggle Source # | |
type Rep Toggle Source # | |
Keyboard modifiers.
Modifiers | |
|
Instances
Eq Modifiers Source # | |
Ord Modifiers Source # | |
Defined in Network.UI.Kafka.Types | |
Read Modifiers Source # | |
Show Modifiers Source # | |
Generic Modifiers Source # | |
ToJSON Modifiers Source # | |
Defined in Network.UI.Kafka.Types | |
FromJSON Modifiers Source # | |
Binary Modifiers Source # | |
Serialize Modifiers Source # | |
type Rep Modifiers Source # | |
Defined in Network.UI.Kafka.Types type Rep Modifiers = D1 (MetaData "Modifiers" "Network.UI.Kafka.Types" "kafka-device-1.0.0.0-EqsHhyPPoUkHjkzPUXhYxI" False) (C1 (MetaCons "Modifiers" PrefixI True) (S1 (MetaSel (Just "shiftModifier") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: (S1 (MetaSel (Just "ctrlModifier") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "altModifier") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))) |
A button.
LeftButton | left mouse button |
MiddleButton | middle mouse button |
RightButton | right mouse button |
WheelUp | mouse wheel upward |
WheelDown | mouse wheel downward |
IndexButton Int | button specified by an index |
LetterButton Char | button specified by a letter |
Instances
type ButtonState = (Button, Toggle) Source #
A button and its state.
A hand.
A finger.
Thumb | thumb |
IndexFinger | first or index finger |
MiddleFinger | second or middle finger |
RingFinger | third of ring finger |
Pinky | fourth finger or pinky |
Instances
Bounded Finger Source # | |
Enum Finger Source # | |
Defined in Network.UI.Kafka.Types | |
Eq Finger Source # | |
Ord Finger Source # | |
Read Finger Source # | |
Show Finger Source # | |
Generic Finger Source # | |
ToJSON Finger Source # | |
Defined in Network.UI.Kafka.Types | |
FromJSON Finger Source # | |
Binary Finger Source # | |
Serialize Finger Source # | |
type Rep Finger Source # | |
Defined in Network.UI.Kafka.Types type Rep Finger = D1 (MetaData "Finger" "Network.UI.Kafka.Types" "kafka-device-1.0.0.0-EqsHhyPPoUkHjkzPUXhYxI" False) ((C1 (MetaCons "Thumb" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "IndexFinger" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "MiddleFinger" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "RingFinger" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Pinky" PrefixI False) (U1 :: Type -> Type)))) |