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 HaskellNone
LanguageHaskell2010

Monomer.Event.Core

Description

Core functions for SDL event processing and conversion.

Synopsis

Documentation

isActionEvent :: EventPayload -> Bool Source #

Checks if an SDL event is an action event. Currently only mouse and keyboard events are considered as such (touch events should be added in the future). This is used for triggering automatic rendering of a frame. For other events, widgets must request rendering explicitly.

convertEvents Source #

Arguments

:: Double

Device pixel rate.

-> Double

Event pixel rate.

-> Point

Mouse position.

-> [EventPayload]

List of SDL events.

-> [SystemEvent]

List of Monomer events.

Converts SDL events to Monomer's SystemEvent

translateEvent Source #

Arguments

:: Point

Offset to apply

-> SystemEvent

Source SystemEvent

-> SystemEvent

Updated SystemEvent

Adds a given offset to mouse related SystemEvents.