HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

  • Packagesdl2-2.5.5.0
  • Exports22
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceMouse.hs

Relative Mouse Mode

3 declarations
datadata LocationMode
#
Instances9Bounded, Enum, Eq, Data, Ord, Read, …

Mouse and Touch Input

3 declarations
datadata MouseButton
#
Instances9Eq, Data, Ord, Read, Show, Generic, …
datadata MouseDevice
#

Identifies what kind of mouse-like device this is.

Constructors

  • Mouse !Int

    An actual mouse. The number identifies which mouse.

  • Touch

    Some sort of touch device.

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata MouseScrollDirection
#

Identifies mouse scroll direction.

Instances10Bounded, Enum, Eq, Data, Ord, Read, …

Mouse State

5 declarations
datadata ModalLocation
#
Instances6Eq, Ord, Read, Show, Generic, Rep

Warping the Mouse

2 declarations
datadata WarpMouseOrigin
#

Constructors

Instances6Eq, Data, Ord, Show, Generic, Rep

Cursor Visibility

1 declaration

Cursor Shape

8 declarations
newtypenewtype Cursor
#
Instances1Eq
  • Eq CursorDefined in sdl2-2.5.5.0 · SDL.Input.Mouse
valuecreateCursor
  1. :: MonadIO m
  2. => Vector Word8

    Whether this part of the cursor is black. Use False for white and True for black.

  3. -> Vector Word8

    Whether or not pixels are visible. Use True for visible and False for transparent.

  4. -> V2 CInt

    The width and height of the cursor.

  5. -> Point V2 CInt

    The X- and Y-axis location of the upper left corner of the cursor relative to the actual mouse position

  6. -> m Cursor
#

Create a cursor using the specified bitmap data and mask (in MSB format).

valuecreateCursorFrom
  1. :: MonadIO m
  2. => Point V2 CInt

    The X- and Y-axis location of the upper left corner of the cursor relative to the actual mouse position

  3. -> [[Char]]
  4. -> m Cursor
#

Create a cursor from a bit art painting of it.

The number of columns must be a multiple of 8.

Symbols used: (space) - transparent, . - visible black, # (or anything else) - visible white.

A minimal cursor template: source8x8 :: [[Char]] source8x8 = [ " " , " " , " " , " " , " " , " " , " " , " " ]