Module

FRP.Event.Mouse

#Mouse

newtype Mouse

A handle for creating events from the mouse position and buttons.

#getMouse

getMouse :: Effect Mouse

Get a handle for working with the mouse.

#disposeMouse

#move

move :: Mouse -> Event { x :: Int, y :: Int }

Create an Event which fires when the mouse moves

#down

down :: Event Int

Create an Event which fires when a mouse button is pressed

#up

up :: Event Int

Create an Event which fires when a mouse button is released

#withPosition

withPosition :: forall a. Mouse -> Event a -> Event { value :: a, pos :: Maybe { x :: Int, y :: Int } }

Create an event which also returns the current mouse position.

#withButtons

withButtons :: forall a. Mouse -> Event a -> Event { value :: a, buttons :: Set Int }

Create an event which also returns the current mouse buttons.

Modules