Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Basic types for Monomer events.
Synopsis
- newtype KeyCode = KeyCode {}
- data KeyStatus
- data Button
- data ButtonState
- data WheelDirection
- data ClipboardData
- type DragMsg i = (Eq i, Typeable i)
- data WidgetDragMsg = forall i.DragMsg i => WidgetDragMsg i
- data SystemEvent
- = Click Point Button Int
- | ButtonAction Point Button ButtonState Int
- | WheelScroll Point Point WheelDirection
- | KeyAction KeyMod KeyCode KeyStatus
- | TextInput Text
- | Clipboard ClipboardData
- | Focus Path
- | Blur Path
- | Enter Point
- | Move Point
- | Leave Point
- | Drag Point Path WidgetDragMsg
- | Drop Point Path WidgetDragMsg
- data InputStatus = InputStatus {}
- data KeyMod = KeyMod {
- _kmLeftShift :: Bool
- _kmRightShift :: Bool
- _kmLeftCtrl :: Bool
- _kmRightCtrl :: Bool
- _kmLeftAlt :: Bool
- _kmRightAlt :: Bool
- _kmLeftGUI :: Bool
- _kmRightGUI :: Bool
- _kmNumLock :: Bool
- _kmCapsLock :: Bool
- _kmAltGr :: Bool
Documentation
Keycode for keyboard events. Used instead of Scancodes to avoid mappings.
Status of a keyboard key.
Button of a pointer device (mouse).
Instances
Eq Button Source # | |
Ord Button Source # | |
Show Button Source # | |
HasButtons InputStatus (Map Button ButtonState) Source # | |
Defined in Monomer.Event.Lens | |
HasMainButton (AppConfig e) (Maybe Button) Source # | |
Defined in Monomer.Main.Lens | |
HasContextButton (AppConfig e) (Maybe Button) Source # | |
Defined in Monomer.Main.Lens | |
HasMainButton (WidgetEnv s e) Button Source # | |
Defined in Monomer.Core.Lens | |
HasContextButton (WidgetEnv s e) Button Source # | |
Defined in Monomer.Core.Lens |
data ButtonState Source #
Status of a mouse button.
Instances
Eq ButtonState Source # | |
Defined in Monomer.Event.Types (==) :: ButtonState -> ButtonState -> Bool # (/=) :: ButtonState -> ButtonState -> Bool # | |
Show ButtonState Source # | |
Defined in Monomer.Event.Types showsPrec :: Int -> ButtonState -> ShowS # show :: ButtonState -> String # showList :: [ButtonState] -> ShowS # | |
HasButtons InputStatus (Map Button ButtonState) Source # | |
Defined in Monomer.Event.Lens |
data WheelDirection Source #
Movement direction in which wheel values are positive.
Instances
Eq WheelDirection Source # | |
Defined in Monomer.Event.Types (==) :: WheelDirection -> WheelDirection -> Bool # (/=) :: WheelDirection -> WheelDirection -> Bool # | |
Show WheelDirection Source # | |
Defined in Monomer.Event.Types showsPrec :: Int -> WheelDirection -> ShowS # show :: WheelDirection -> String # showList :: [WheelDirection] -> ShowS # |
data ClipboardData Source #
Types of clipboard content.
Instances
Eq ClipboardData Source # | |
Defined in Monomer.Event.Types (==) :: ClipboardData -> ClipboardData -> Bool # (/=) :: ClipboardData -> ClipboardData -> Bool # | |
Show ClipboardData Source # | |
Defined in Monomer.Event.Types showsPrec :: Int -> ClipboardData -> ShowS # show :: ClipboardData -> String # showList :: [ClipboardData] -> ShowS # |
data WidgetDragMsg Source #
Drag message container.
forall i.DragMsg i => WidgetDragMsg i |
Instances
Eq WidgetDragMsg Source # | |
Defined in Monomer.Event.Types (==) :: WidgetDragMsg -> WidgetDragMsg -> Bool # (/=) :: WidgetDragMsg -> WidgetDragMsg -> Bool # | |
Show WidgetDragMsg Source # | |
Defined in Monomer.Event.Types showsPrec :: Int -> WidgetDragMsg -> ShowS # show :: WidgetDragMsg -> String # showList :: [WidgetDragMsg] -> ShowS # | |
HasDragData DragAction WidgetDragMsg Source # | |
Defined in Monomer.Main.Lens | |
HasDragStatus (WidgetEnv s e) (Maybe (Path, WidgetDragMsg)) Source # | |
Defined in Monomer.Core.Lens dragStatus :: Lens' (WidgetEnv s e) (Maybe (Path, WidgetDragMsg)) Source # |
data SystemEvent Source #
Supported Monomer SystemEvents
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
Eq SystemEvent Source # | |
Defined in Monomer.Event.Types (==) :: SystemEvent -> SystemEvent -> Bool # (/=) :: SystemEvent -> SystemEvent -> Bool # | |
Show SystemEvent Source # | |
Defined in Monomer.Event.Types showsPrec :: Int -> SystemEvent -> ShowS # show :: SystemEvent -> String # showList :: [SystemEvent] -> ShowS # |
data InputStatus Source #
Status of input devices.
InputStatus | |
|
Instances
Keyboard modifiers. True indicates the key is pressed.
Note: The fn function in Macs cannot be detected individually.
KeyMod | |
|