monomer-1.0.0.1: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Monomer.Event.Types

Description

Basic types for Monomer events.

Synopsis

Documentation

newtype KeyCode Source #

Keycode for keyboard events. Used instead of Scancodes to avoid mappings.

Constructors

KeyCode 

Fields

Instances

Instances details
Eq KeyCode Source # 
Instance details

Defined in Monomer.Event.Types

Methods

(==) :: KeyCode -> KeyCode -> Bool #

(/=) :: KeyCode -> KeyCode -> Bool #

Ord KeyCode Source # 
Instance details

Defined in Monomer.Event.Types

Show KeyCode Source # 
Instance details

Defined in Monomer.Event.Types

HasKeys InputStatus (Map KeyCode KeyStatus) Source # 
Instance details

Defined in Monomer.Event.Lens

data KeyStatus Source #

Status of a keyboard key.

Constructors

KeyPressed 
KeyReleased 

Instances

Instances details
Eq KeyStatus Source # 
Instance details

Defined in Monomer.Event.Types

Show KeyStatus Source # 
Instance details

Defined in Monomer.Event.Types

HasKeys InputStatus (Map KeyCode KeyStatus) Source # 
Instance details

Defined in Monomer.Event.Lens

data Button Source #

Button of a pointer device (mouse).

Constructors

BtnLeft 
BtnMiddle 
BtnRight 

Instances

Instances details
Eq Button Source # 
Instance details

Defined in Monomer.Event.Types

Methods

(==) :: Button -> Button -> Bool #

(/=) :: Button -> Button -> Bool #

Ord Button Source # 
Instance details

Defined in Monomer.Event.Types

Show Button Source # 
Instance details

Defined in Monomer.Event.Types

HasButtons InputStatus (Map Button ButtonState) Source # 
Instance details

Defined in Monomer.Event.Lens

HasMainButton (AppConfig e) (Maybe Button) Source # 
Instance details

Defined in Monomer.Main.Lens

HasContextButton (AppConfig e) (Maybe Button) Source # 
Instance details

Defined in Monomer.Main.Lens

HasMainButton (WidgetEnv s e) Button Source # 
Instance details

Defined in Monomer.Core.Lens

HasContextButton (WidgetEnv s e) Button Source # 
Instance details

Defined in Monomer.Core.Lens

data ButtonState Source #

Status of a mouse button.

Constructors

BtnPressed 
BtnReleased 

Instances

Instances details
Eq ButtonState Source # 
Instance details

Defined in Monomer.Event.Types

Show ButtonState Source # 
Instance details

Defined in Monomer.Event.Types

HasButtons InputStatus (Map Button ButtonState) Source # 
Instance details

Defined in Monomer.Event.Lens

data WheelDirection Source #

Movement direction in which wheel values are positive.

Constructors

WheelNormal 
WheelFlipped 

Instances

Instances details
Eq WheelDirection Source # 
Instance details

Defined in Monomer.Event.Types

Show WheelDirection Source # 
Instance details

Defined in Monomer.Event.Types

data ClipboardData Source #

Types of clipboard content.

Instances

Instances details
Eq ClipboardData Source # 
Instance details

Defined in Monomer.Event.Types

Show ClipboardData Source # 
Instance details

Defined in Monomer.Event.Types

type DragMsg i = (Eq i, Typeable i) Source #

Constraints for drag event messages.

data WidgetDragMsg Source #

Drag message container.

Constructors

forall i.DragMsg i => WidgetDragMsg i 

data SystemEvent Source #

Supported Monomer SystemEvents

Constructors

Click Point Button Int

Click (press and release) of a mouse button. Includes mouse position and click count.

ButtonAction Point Button ButtonState Int

Click or release of a mouse button. Includes times pressed/released and mouse position.

WheelScroll Point Point WheelDirection

Mouse wheel movement. Includes mouse position, move size in both axes and wheel direction.

KeyAction KeyMod KeyCode KeyStatus

Keyboard key action. Includes modifiers, keyCode and pressed/released. This event should not be used for text input.

TextInput Text

Processed keyboard events. Some Unicode characters require several key presses to produce the result. This event provides the final result.

Clipboard ClipboardData

Provides current clipboard contents to a requesting widget.

Focus Path

Target now has focus. Includes path of the previously focused widget.

Blur Path

Target has lost focus. Includes path of the next focused widget.

Enter Point

Mouse has entered the assigned viewport.

Move Point

Mouse has moved inside the assigned viewport. This event keeps being received if the main mouse button is pressed, even if the mouse is outside the assigned bounds or even the window.

Leave Point

Mouse has left the assigned viewport. This event is not received until the main mouse button has been pressed.

Drag Point Path WidgetDragMsg

A drag action is active and the mouse is inside the current viewport. The messsage can be used to decide if it applies to the current widget. This event is not received by the widget which initiated the drag action, even if dragging over it.

Drop Point Path WidgetDragMsg

A drag action was active and the main button was released inside the current viewport.

Instances

Instances details
Eq SystemEvent Source # 
Instance details

Defined in Monomer.Event.Types

Show SystemEvent Source # 
Instance details

Defined in Monomer.Event.Types

data InputStatus Source #

Status of input devices.

Constructors

InputStatus 

Fields

Instances

Instances details
Eq InputStatus Source # 
Instance details

Defined in Monomer.Event.Types

Show InputStatus Source # 
Instance details

Defined in Monomer.Event.Types

Default InputStatus Source # 
Instance details

Defined in Monomer.Event.Types

Methods

def :: InputStatus #

HasMousePosPrev InputStatus Point Source # 
Instance details

Defined in Monomer.Event.Lens

HasMousePos InputStatus Point Source # 
Instance details

Defined in Monomer.Event.Lens

HasKeyMod InputStatus KeyMod Source # 
Instance details

Defined in Monomer.Event.Lens

HasKeys InputStatus (Map KeyCode KeyStatus) Source # 
Instance details

Defined in Monomer.Event.Lens

HasButtons InputStatus (Map Button ButtonState) Source # 
Instance details

Defined in Monomer.Event.Lens

HasInputStatus (WidgetEnv s e) InputStatus Source # 
Instance details

Defined in Monomer.Core.Lens

HasInputStatus (MonomerCtx s e) InputStatus Source # 
Instance details

Defined in Monomer.Main.Lens

data KeyMod Source #

Keyboard modifiers. True indicates the key is pressed.

Note: The fn function in Macs cannot be detected individually.

Instances

Instances details
Eq KeyMod Source # 
Instance details

Defined in Monomer.Event.Types

Methods

(==) :: KeyMod -> KeyMod -> Bool #

(/=) :: KeyMod -> KeyMod -> Bool #

Show KeyMod Source # 
Instance details

Defined in Monomer.Event.Types

Default KeyMod Source # 
Instance details

Defined in Monomer.Event.Types

Methods

def :: KeyMod #

HasKeyMod InputStatus KeyMod Source # 
Instance details

Defined in Monomer.Event.Lens

HasRightShift KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasRightGUI KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasRightCtrl KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasRightAlt KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasNumLock KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasLeftShift KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasLeftGUI KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasLeftCtrl KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasLeftAlt KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasCapsLock KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens

HasAltGr KeyMod Bool Source # 
Instance details

Defined in Monomer.Event.Lens