HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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

Relative Mouse Mode

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

Mouse and Touch Input

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, …

Identifies mouse scroll direction.

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

Mouse State

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

Warping the Mouse

datadata WarpMouseOrigin
#

Constructors

Instances6Eq, Data, Ord, Show, Generic, Rep

Cursor Visibility

Cursor Shape

newtypenewtype Cursor
#
Instances1Eq
  • Eq CursorDefined in sdl2-2.5.6.1 · 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 = [ " " , " " , " " , " " , " " , " " , " " , " " ]