Module

FRP.Event.Mouse

Package
purescript-behaviors
Repository
paf31/purescript-behaviors

#Mouse Source

newtype Mouse

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

#getMouse Source

getMouse :: Effect Mouse

Get a handle for working with the mouse.

#move Source

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

Create an Event which fires when the mouse moves

#down Source

down :: Event Int

Create an Event which fires when a mouse button is pressed

#up Source

up :: Event Int

Create an Event which fires when a mouse button is released

#withPosition Source

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

Create an event which also returns the current mouse position.

#withButtons Source

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

Create an event which also returns the current mouse buttons.