kafka-device-glut-1.0.2.1: GLUT events via a Kafka message broker

Copyright(c) 2016-19 Brian W Bush
LicenseMIT
MaintainerBrian W Bush <code@functionally.io>
StabilityProduction
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Network.UI.Kafka.GLUT

Contents

Description

Synopsis

Event handling.

data GlutCallback Source #

Constructors

KeyboardMouse

Key presses and mouse button clicks.

Motion

Mouse motion while a button is depressed.

PassiveMotion

Mouse motion.

Spaceball

Spaceball tracking and button clicks.

Joystick

Joystick tracking and button clicks.

Instances
Bounded GlutCallback Source # 
Instance details

Defined in Network.UI.Kafka.GLUT

Enum GlutCallback Source # 
Instance details

Defined in Network.UI.Kafka.GLUT

Eq GlutCallback Source # 
Instance details

Defined in Network.UI.Kafka.GLUT

Ord GlutCallback Source # 
Instance details

Defined in Network.UI.Kafka.GLUT

Read GlutCallback Source # 
Instance details

Defined in Network.UI.Kafka.GLUT

Show GlutCallback Source # 
Instance details

Defined in Network.UI.Kafka.GLUT

glutLoop Source #

Arguments

:: TopicConnection

The Kafka topic name and connection information.

-> Sensor

The name of the sensor producing events.

-> [GlutCallback]

Which callbacks to enable.

-> IO (ExitAction, LoopAction)

Action to create the exit and loop actions.

Internal.

interpretKeyboardMouse Source #

Arguments

:: Key

The key.

-> KeyState

The state of the key.

-> Modifiers

The modifier keys.

-> Position

The mouse position.

-> Event

The corresponding event.

Interpret key presses and mouse clickes.

interpretMotion Source #

Arguments

:: Position

The mouse position.

-> Event

The corresponding event.

Interpret mouse motion.

interpretSpaceball Source #

Arguments

:: SpaceballInput

The the spaceball input.

-> Event

The corresponding event.

Interpret a spaceball event.

interpretJoystick Source #

Arguments

:: JoystickButtons

The state of joystick buttons.

-> JoystickPosition

The joystick position.

-> Event

The corresponding event.

Interpret a joystick event.

setCallbacks Source #

Arguments

:: [GlutCallback]

Which callbacks to enable.

-> (Event -> IO ())

The action for handling GLUT events.

-> IO ()

Action to create the GLUT callbacks for the channel.

clearCallbacks Source #

Arguments

:: [GlutCallback]

Which callbacks to enable.

-> IO ()

Action to create the GLUT callbacks for the channel.

Clear callbacks for the specified event types.