sdl2-2.5.5.0: Both high- and low-level bindings to the SDL library (version 2.0.6+).

Safe Haskell | Safe-Inferred
Language | Haskell2010

SDL.Video

Contents

- Window Management
- Window Actions
- Window Attributes
- Renderer Management
- Clipboard Handling
- Display
- Screen Savers
- Message Box

Synopsis

- module SDL.Video.OpenGL
- module SDL.Video.Renderer
- data Window
- createWindow :: MonadIO m => Text -> WindowConfig -> m Window
- defaultWindow :: WindowConfig
- data WindowConfig = WindowConfig {
  - windowBorder :: Bool
  - windowHighDPI :: Bool
  - windowInputGrabbed :: Bool
  - windowMode :: WindowMode
  - windowGraphicsContext :: WindowGraphicsContext
  - windowPosition :: WindowPosition
  - windowResizable :: Bool
  - windowInitialSize :: V2 CInt
  - windowVisible :: Bool
  }
- data WindowGraphicsContext
  - = NoGraphicsContext
  - | OpenGLContext OpenGLConfig
  - | VulkanContext
- data WindowMode
  - = Fullscreen
  - | FullscreenDesktop
  - | Maximized
  - | Minimized
  - | Windowed
- data WindowPosition
  - = Centered
  - | Wherever
  - | Absolute (Point V2 CInt)
- destroyWindow :: MonadIO m => Window -> m ()
- hideWindow :: MonadIO m => Window -> m ()
- raiseWindow :: MonadIO m => Window -> m ()
- showWindow :: MonadIO m => Window -> m ()
- windowMinimumSize :: Window -> StateVar (V2 CInt)
- windowMaximumSize :: Window -> StateVar (V2 CInt)
- windowOpacity :: Window -> StateVar CFloat
- windowSize :: Window -> StateVar (V2 CInt)
- windowBordered :: Window -> StateVar Bool
- windowBrightness :: Window -> StateVar Float
- windowGammaRamp :: Window -> StateVar (V3 (Vector Word16))
- windowGrab :: Window -> StateVar Bool
- setWindowMode :: MonadIO m => Window -> WindowMode -> m ()
- getWindowAbsolutePosition :: MonadIO m => Window -> m (V2 CInt)
- getWindowBordersSize :: MonadIO m => Window -> m (Maybe (V4 CInt))
- setWindowIcon :: MonadIO m => Window -> Surface -> m ()
- setWindowPosition :: MonadIO m => Window -> WindowPosition -> m ()
- windowTitle :: Window -> StateVar Text
- windowData :: Window -> CString -> StateVar (Ptr ())
- getWindowConfig :: MonadIO m => Window -> m WindowConfig
- getWindowPixelFormat :: MonadIO m => Window -> m PixelFormat
- data PixelFormat
  - = Unknown !Word32
  - | Index1LSB
  - | Index1MSB
  - | Index4LSB
  - | Index4MSB
  - | Index8
  - | RGB332
  - | RGB444
  - | RGB555
  - | BGR555
  - | ARGB4444
  - | RGBA4444
  - | ABGR4444
  - | BGRA4444
  - | ARGB1555
  - | RGBA5551
  - | ABGR1555
  - | BGRA5551
  - | RGB565
  - | BGR565
  - | RGB24
  - | BGR24
  - | RGB888
  - | RGBX8888
  - | BGR888
  - | BGRX8888
  - | ARGB8888
  - | RGBA8888
  - | ABGR8888
  - | BGRA8888
  - | ARGB2101010
  - | YV12
  - | IYUV
  - | YUY2
  - | UYVY
  - | YVYU
- createRenderer :: MonadIO m => Window -> CInt -> RendererConfig -> m Renderer
- createSoftwareRenderer :: MonadIO m => Surface -> m Renderer
- destroyRenderer :: MonadIO m => Renderer -> m ()
- getClipboardText :: MonadIO m => m Text
- hasClipboardText :: MonadIO m => m Bool
- setClipboardText :: MonadIO m => Text -> m ()
- getDisplays :: MonadIO m => m [Display]
- data Display = Display {
  - displayName :: String
  - displayBoundsPosition :: Point V2 CInt
  - displayBoundsSize :: V2 CInt
  - displayModes :: [DisplayMode]
  }
- data DisplayMode = DisplayMode {
  - displayModeFormat :: PixelFormat
  - displayModeSize :: V2 CInt
  - displayModeRefreshRate :: CInt
  }
- data VideoDriver = VideoDriver {
  - videoDriverName :: String
  }
- screenSaverEnabled :: StateVar Bool
- showSimpleMessageBox :: MonadIO m => Maybe Window -> MessageKind -> Text -> Text -> m ()
- data MessageKind
  - = Error
  - | Warning
  - | Information

# Documentation

module SDL.Video.OpenGL

module SDL.Video.Renderer

# Window Management

data Window Source #

#### Instances

Instances details

Data Window Source # |

Instance details

Defined in SDL.Internal.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Window -> c Window Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Window Source #

toConstr :: Window -> Constr Source #

dataTypeOf :: Window -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Window) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Window) Source #

gmapT :: (forall b. Data b => b -> b) -> Window -> Window Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Window -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Window -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Window -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Window -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Window -> m Window Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Window -> m Window Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Window -> m Window Source #

Generic Window Source # |
Instance details Defined in SDL.Internal.Types Associated Types type Rep Window :: Type -> Type Source # Methods from :: Window -> Rep Window x Source # to :: Rep Window x -> Window Source #
Show Window Source # |
Instance details Defined in SDL.Internal.Types Methods showsPrec :: Int -> Window -> ShowS Source # show :: Window -> String Source # showList :: [Window] -> ShowS Source #
Eq Window Source # |
Instance details Defined in SDL.Internal.Types Methods (==) :: Window -> Window -> Bool Source # (/=) :: Window -> Window -> Bool Source #
Ord Window Source # |
Instance details Defined in SDL.Internal.Types Methods compare :: Window -> Window -> Ordering Source # (<) :: Window -> Window -> Bool Source # (<=) :: Window -> Window -> Bool Source # (>) :: Window -> Window -> Bool Source # (>=) :: Window -> Window -> Bool Source # max :: Window -> Window -> Window Source # min :: Window -> Window -> Window Source #
type Rep Window Source # |
Instance details Defined in SDL.Internal.Types type Rep Window = D1 ('MetaData "Window" "SDL.Internal.Types" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'True) (C1 ('MetaCons "Window" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Window)))

createWindow :: MonadIO m => Text -> WindowConfig -> m Window Source #

Create a window with the given title and configuration.

Throws `SDLException` on failure.

defaultWindow :: WindowConfig Source #

Default configuration for windows. Use the record update syntax to override any of the defaults.

    defaultWindow = WindowConfig
      { windowBorder          = True
      , windowHighDPI         = False
      , windowInputGrabbed    = False
      , windowMode            = Windowed
      , windowGraphicsContext = NoGraphicsContext
      , windowPosition        = Wherever
      , windowResizable       = False
      , windowInitialSize     = V2 800 600
      , windowVisible         = True
      }

data WindowConfig Source #

Constructors

WindowConfig |

Fields

- windowBorder :: Bool

  Defaults to `True`.

- windowHighDPI :: Bool

  Defaults to `False`. Can not be changed after window creation.

- windowInputGrabbed :: Bool

  Defaults to `False`. Whether the mouse shall be confined to the window.

- windowMode :: WindowMode

  Defaults to `Windowed`.

- windowGraphicsContext :: WindowGraphicsContext

  Defaults to `NoGraphicsContext`. Can not be changed after window creation.

- windowPosition :: WindowPosition

  Defaults to `Wherever`.

- windowResizable :: Bool

  Defaults to `False`. Whether the window can be resized by the user. It is still possible to programatically change the size by changing `windowSize`.

- windowInitialSize :: V2 CInt

  Defaults to `(800, 600)`. If you set `windowHighDPI` flag, window size in screen coordinates may differ from the size in pixels. Use `glGetDrawableSize` or `vkGetDrawableSize` to get size in pixels.

- windowVisible :: Bool

  Defaults to `True`.

#### Instances

Instances details

Generic WindowConfig Source # |
Instance details Defined in SDL.Video Associated Types type Rep WindowConfig :: Type -> Type Source # Methods from :: WindowConfig -> Rep WindowConfig x Source # to :: Rep WindowConfig x -> WindowConfig Source #
Read WindowConfig Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS WindowConfig Source # readList :: ReadS [WindowConfig] Source # readPrec :: ReadPrec WindowConfig Source # readListPrec :: ReadPrec [WindowConfig] Source #
Show WindowConfig Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> WindowConfig -> ShowS Source # show :: WindowConfig -> String Source # showList :: [WindowConfig] -> ShowS Source #
Eq WindowConfig Source # |
Instance details Defined in SDL.Video Methods (==) :: WindowConfig -> WindowConfig -> Bool Source # (/=) :: WindowConfig -> WindowConfig -> Bool Source #
Ord WindowConfig Source # |

Instance details

Defined in SDL.Video

Methods

compare :: WindowConfig -> WindowConfig -> Ordering Source #

(<) :: WindowConfig -> WindowConfig -> Bool Source #

(<=) :: WindowConfig -> WindowConfig -> Bool Source #

(>) :: WindowConfig -> WindowConfig -> Bool Source #

(>=) :: WindowConfig -> WindowConfig -> Bool Source #

max :: WindowConfig -> WindowConfig -> WindowConfig Source #

min :: WindowConfig -> WindowConfig -> WindowConfig Source #

type Rep WindowConfig Source # |

Instance details

Defined in SDL.Video

type Rep WindowConfig = D1 ('MetaData "WindowConfig" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "WindowConfig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "windowBorder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "windowHighDPI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "windowInputGrabbed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "windowMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WindowMode))) :*: ((S1 ('MetaSel ('Just "windowGraphicsContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WindowGraphicsContext) :*: S1 ('MetaSel ('Just "windowPosition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WindowPosition)) :*: (S1 ('MetaSel ('Just "windowResizable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "windowInitialSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V2 CInt)) :*: S1 ('MetaSel ('Just "windowVisible") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))))

data WindowGraphicsContext Source #

Configuration of additional graphics context that will be created for window.

Can not be changed after window creation.

Constructors

NoGraphicsContext | Window will be created without any additional graphics context.
OpenGLContext OpenGLConfig | Window will be created with OpenGL support with parameters from `OpenGLConfig`.

VulkanContext

Window will be created with Vulkan support. The following functions will be implicitly called by SDL C library:

1. analogue of `vkLoadLibrary` `Nothing` will be called automatically before first window creation;
2. analogue of `vkUnloadLibrary` will be called after last window destruction.

#### Instances

Instances details

Generic WindowGraphicsContext Source # |
Instance details Defined in SDL.Video Associated Types type Rep WindowGraphicsContext :: Type -> Type Source # Methods from :: WindowGraphicsContext -> Rep WindowGraphicsContext x Source # to :: Rep WindowGraphicsContext x -> WindowGraphicsContext Source #
Read WindowGraphicsContext Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS WindowGraphicsContext Source # readList :: ReadS [WindowGraphicsContext] Source # readPrec :: ReadPrec WindowGraphicsContext Source # readListPrec :: ReadPrec [WindowGraphicsContext] Source #
Show WindowGraphicsContext Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> WindowGraphicsContext -> ShowS Source # show :: WindowGraphicsContext -> String Source # showList :: [WindowGraphicsContext] -> ShowS Source #
Eq WindowGraphicsContext Source # |
Instance details Defined in SDL.Video Methods (==) :: WindowGraphicsContext -> WindowGraphicsContext -> Bool Source # (/=) :: WindowGraphicsContext -> WindowGraphicsContext -> Bool Source #
Ord WindowGraphicsContext Source # |

Instance details

Defined in SDL.Video

Methods

compare :: WindowGraphicsContext -> WindowGraphicsContext -> Ordering Source #

(<) :: WindowGraphicsContext -> WindowGraphicsContext -> Bool Source #

(<=) :: WindowGraphicsContext -> WindowGraphicsContext -> Bool Source #

(>) :: WindowGraphicsContext -> WindowGraphicsContext -> Bool Source #

(>=) :: WindowGraphicsContext -> WindowGraphicsContext -> Bool Source #

max :: WindowGraphicsContext -> WindowGraphicsContext -> WindowGraphicsContext Source #

min :: WindowGraphicsContext -> WindowGraphicsContext -> WindowGraphicsContext Source #

type Rep WindowGraphicsContext Source # |

Instance details

Defined in SDL.Video

type Rep WindowGraphicsContext = D1 ('MetaData "WindowGraphicsContext" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "NoGraphicsContext" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OpenGLContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OpenGLConfig)) :+: C1 ('MetaCons "VulkanContext" 'PrefixI 'False) (U1 :: Type -> Type)))

data WindowMode Source #

Constructors

Fullscreen | Real fullscreen with a video mode change
FullscreenDesktop | Fake fullscreen that takes the size of the desktop
Maximized |
Minimized |
Windowed |

#### Instances

Instances details

Data WindowMode Source # |

Instance details

Defined in SDL.Video

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WindowMode -> c WindowMode Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WindowMode Source #

toConstr :: WindowMode -> Constr Source #

dataTypeOf :: WindowMode -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WindowMode) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WindowMode) Source #

gmapT :: (forall b. Data b => b -> b) -> WindowMode -> WindowMode Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WindowMode -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WindowMode -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> WindowMode -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WindowMode -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WindowMode -> m WindowMode Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowMode -> m WindowMode Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowMode -> m WindowMode Source #

Bounded WindowMode Source # |
Instance details Defined in SDL.Video Methods minBound :: WindowMode Source # maxBound :: WindowMode Source #
Enum WindowMode Source # |

Instance details

Defined in SDL.Video

Methods

succ :: WindowMode -> WindowMode Source #

pred :: WindowMode -> WindowMode Source #

toEnum :: Int -> WindowMode Source #

fromEnum :: WindowMode -> Int Source #

enumFrom :: WindowMode -> [WindowMode] Source #

enumFromThen :: WindowMode -> WindowMode -> [WindowMode] Source #

enumFromTo :: WindowMode -> WindowMode -> [WindowMode] Source #

enumFromThenTo :: WindowMode -> WindowMode -> WindowMode -> [WindowMode] Source #

Generic WindowMode Source # |
Instance details Defined in SDL.Video Associated Types type Rep WindowMode :: Type -> Type Source # Methods from :: WindowMode -> Rep WindowMode x Source # to :: Rep WindowMode x -> WindowMode Source #
Read WindowMode Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS WindowMode Source # readList :: ReadS [WindowMode] Source # readPrec :: ReadPrec WindowMode Source # readListPrec :: ReadPrec [WindowMode] Source #
Show WindowMode Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> WindowMode -> ShowS Source # show :: WindowMode -> String Source # showList :: [WindowMode] -> ShowS Source #
Eq WindowMode Source # |
Instance details Defined in SDL.Video Methods (==) :: WindowMode -> WindowMode -> Bool Source # (/=) :: WindowMode -> WindowMode -> Bool Source #
Ord WindowMode Source # |

Instance details

Defined in SDL.Video

Methods

compare :: WindowMode -> WindowMode -> Ordering Source #

(<) :: WindowMode -> WindowMode -> Bool Source #

(<=) :: WindowMode -> WindowMode -> Bool Source #

(>) :: WindowMode -> WindowMode -> Bool Source #

(>=) :: WindowMode -> WindowMode -> Bool Source #

max :: WindowMode -> WindowMode -> WindowMode Source #

min :: WindowMode -> WindowMode -> WindowMode Source #

FromNumber WindowMode Word32 Source # |
Instance details Defined in SDL.Video Methods fromNumber :: Word32 -> WindowMode Source #
ToNumber WindowMode Word32 Source # |
Instance details Defined in SDL.Video Methods toNumber :: WindowMode -> Word32 Source #
type Rep WindowMode Source # |

Instance details

Defined in SDL.Video

type Rep WindowMode = D1 ('MetaData "WindowMode" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) ((C1 ('MetaCons "Fullscreen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FullscreenDesktop" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Maximized" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Minimized" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Windowed" 'PrefixI 'False) (U1 :: Type -> Type))))

data WindowPosition Source #

Constructors

Centered |
Wherever | Let the window mananger decide where it's best to place the window.
Absolute (Point V2 CInt) |

#### Instances

Instances details

Generic WindowPosition Source # |
Instance details Defined in SDL.Video Associated Types type Rep WindowPosition :: Type -> Type Source # Methods from :: WindowPosition -> Rep WindowPosition x Source # to :: Rep WindowPosition x -> WindowPosition Source #
Read WindowPosition Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS WindowPosition Source # readList :: ReadS [WindowPosition] Source # readPrec :: ReadPrec WindowPosition Source # readListPrec :: ReadPrec [WindowPosition] Source #
Show WindowPosition Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> WindowPosition -> ShowS Source # show :: WindowPosition -> String Source # showList :: [WindowPosition] -> ShowS Source #
Eq WindowPosition Source # |
Instance details Defined in SDL.Video Methods (==) :: WindowPosition -> WindowPosition -> Bool Source # (/=) :: WindowPosition -> WindowPosition -> Bool Source #
Ord WindowPosition Source # |

Instance details

Defined in SDL.Video

Methods

compare :: WindowPosition -> WindowPosition -> Ordering Source #

(<) :: WindowPosition -> WindowPosition -> Bool Source #

(<=) :: WindowPosition -> WindowPosition -> Bool Source #

(>) :: WindowPosition -> WindowPosition -> Bool Source #

(>=) :: WindowPosition -> WindowPosition -> Bool Source #

max :: WindowPosition -> WindowPosition -> WindowPosition Source #

min :: WindowPosition -> WindowPosition -> WindowPosition Source #

type Rep WindowPosition Source # |

Instance details

Defined in SDL.Video

type Rep WindowPosition = D1 ('MetaData "WindowPosition" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "Centered" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Wherever" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Absolute" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point V2 CInt)))))

destroyWindow :: MonadIO m => Window -> m () Source #

Destroy the given window. The `Window` handler may not be used afterwards.

# Window Actions

hideWindow :: MonadIO m => Window -> m () Source #

Hide a window.

See `SDL_HideWindow` for C documentation.

raiseWindow :: MonadIO m => Window -> m () Source #

Raise the window above other windows and set the input focus.

See `SDL_RaiseWindow` for C documentation.

showWindow :: MonadIO m => Window -> m () Source #

Show a window.

See `SDL_ShowWindow` for C documentation.

# Window Attributes

windowMinimumSize :: Window -> StateVar (V2 CInt) Source #

Get or set the minimum size of a window's client area.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

See `SDL_SetWindowMinimumSize` and `SDL_GetWindowMinimumSize` for C documentation.

windowMaximumSize :: Window -> StateVar (V2 CInt) Source #

Get or set the maximum size of a window's client area.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

See `SDL_SetWindowMaximumSize` and `SDL_GetWindowMaximumSize` for C documentation.

windowOpacity :: Window -> StateVar CFloat Source #

Get or set the opacity of a window.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

See `SDL_SetWindowOpacity` and `SDL_GetWindowOpacity` for C documentation.

windowSize :: Window -> StateVar (V2 CInt) Source #

Get or set the size of a window's client area. Values beyond the maximum supported size are clamped.

If window was created with `windowHighDPI` flag, this size may differ from the size in pixels. Use `glGetDrawableSize` or `vkGetDrawableSize` to get size in pixels.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

See `SDL_SetWindowSize` and `SDL_GetWindowSize` for C documentation.

windowBordered :: Window -> StateVar Bool Source #

Get or set if the window should have a border.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

windowBrightness :: Window -> StateVar Float Source #

Get or set the window's brightness, where 0.0 is completely dark and 1.0 is normal brightness.

Throws `SDLException` if the hardware does not support gamma correction, or if the system has run out of memory.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

windowGammaRamp :: Window -> StateVar (V3 (Vector Word16)) Source #

Gets or sets the gamma ramp for the display that owns a given window.

Note that the data for the gamma ramp - the `V3` (`Vector` `Word16`) - must contain 256 element arrays. This triple is a set of translation vectors for each of the 16-bit red, green and blue channels.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

Despite the name and signature, this method retrieves the gamma ramp of the entire display, not an individual window. A window is considered to be owned by the display that contains the window's center pixel.

windowGrab :: Window -> StateVar Bool Source #

Get or set whether the mouse shall be confined to the window.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

setWindowMode :: MonadIO m => Window -> WindowMode -> m () Source #

Change between window modes.

Throws `SDLException` on failure.

getWindowAbsolutePosition :: MonadIO m => Window -> m (V2 CInt) Source #

Get the position of the window.

getWindowBordersSize :: MonadIO m => Window -> m (Maybe (V4 CInt)) Source #

Get the size of a window's borders (decorations) around the client area (top, left, bottom, right).

See `SDL_GetWindowBordersSize` for C documentation.

setWindowIcon :: MonadIO m => Window -> Surface -> m () Source #

Set the icon for a window.

setWindowPosition :: MonadIO m => Window -> WindowPosition -> m () Source #

Set the position of the window.

windowTitle :: Window -> StateVar Text Source #

Get or set the title of the window. If the window has no title, then an empty string is returned.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

See `SDL_SetWindowTitle` and `SDL_GetWindowTitle` for C documentation.

windowData :: Window -> CString -> StateVar (Ptr ()) Source #

Get or set the pointer to arbitrary user data associated with the given window and name.

This `StateVar` can be modified using `$=` and the current value retrieved with `get`.

getWindowConfig :: MonadIO m => Window -> m WindowConfig Source #

Retrieve the configuration of the given window.

Note that `NoGraphicsContext` will be returned instead of potential OpenGL parameters used during the creation of the window.

getWindowPixelFormat :: MonadIO m => Window -> m PixelFormat Source #

Get the pixel format that is used for the given window.

data PixelFormat Source #

Constructors

Unknown !Word32 |
Index1LSB |
Index1MSB |
Index4LSB |
Index4MSB |
Index8 |
RGB332 |
RGB444 |
RGB555 |
BGR555 |
ARGB4444 |
RGBA4444 |
ABGR4444 |
BGRA4444 |
ARGB1555 |
RGBA5551 |
ABGR1555 |
BGRA5551 |
RGB565 |
BGR565 |
RGB24 |
BGR24 |
RGB888 |
RGBX8888 |
BGR888 |
BGRX8888 |
ARGB8888 |
RGBA8888 |
ABGR8888 |
BGRA8888 |
ARGB2101010 |
YV12 |
IYUV |
YUY2 |
UYVY |
YVYU |

#### Instances

Instances details

Data PixelFormat Source # |

Instance details

Defined in SDL.Video.Renderer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PixelFormat -> c PixelFormat Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PixelFormat Source #

toConstr :: PixelFormat -> Constr Source #

dataTypeOf :: PixelFormat -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PixelFormat) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PixelFormat) Source #

gmapT :: (forall b. Data b => b -> b) -> PixelFormat -> PixelFormat Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PixelFormat -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PixelFormat -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat Source #

Generic PixelFormat Source # |
Instance details Defined in SDL.Video.Renderer Associated Types type Rep PixelFormat :: Type -> Type Source # Methods from :: PixelFormat -> Rep PixelFormat x Source # to :: Rep PixelFormat x -> PixelFormat Source #
Read PixelFormat Source # |
Instance details Defined in SDL.Video.Renderer Methods readsPrec :: Int -> ReadS PixelFormat Source # readList :: ReadS [PixelFormat] Source # readPrec :: ReadPrec PixelFormat Source # readListPrec :: ReadPrec [PixelFormat] Source #
Show PixelFormat Source # |
Instance details Defined in SDL.Video.Renderer Methods showsPrec :: Int -> PixelFormat -> ShowS Source # show :: PixelFormat -> String Source # showList :: [PixelFormat] -> ShowS Source #
Eq PixelFormat Source # |
Instance details Defined in SDL.Video.Renderer Methods (==) :: PixelFormat -> PixelFormat -> Bool Source # (/=) :: PixelFormat -> PixelFormat -> Bool Source #
Ord PixelFormat Source # |

Instance details

Defined in SDL.Video.Renderer

Methods

compare :: PixelFormat -> PixelFormat -> Ordering Source #

(<) :: PixelFormat -> PixelFormat -> Bool Source #

(<=) :: PixelFormat -> PixelFormat -> Bool Source #

(>) :: PixelFormat -> PixelFormat -> Bool Source #

(>=) :: PixelFormat -> PixelFormat -> Bool Source #

max :: PixelFormat -> PixelFormat -> PixelFormat Source #

min :: PixelFormat -> PixelFormat -> PixelFormat Source #

FromNumber PixelFormat Word32 Source # |
Instance details Defined in SDL.Video.Renderer Methods fromNumber :: Word32 -> PixelFormat Source #
ToNumber PixelFormat Word32 Source # |
Instance details Defined in SDL.Video.Renderer Methods toNumber :: PixelFormat -> Word32 Source #
type Rep PixelFormat Source # |

Instance details

Defined in SDL.Video.Renderer

type Rep PixelFormat = D1 ('MetaData "PixelFormat" "SDL.Video.Renderer" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (((((C1 ('MetaCons "Unknown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :+: C1 ('MetaCons "Index1LSB" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Index1MSB" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Index4LSB" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Index4MSB" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Index8" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RGB332" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RGB444" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RGB555" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "BGR555" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ARGB4444" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RGBA4444" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ABGR4444" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BGRA4444" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ARGB1555" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RGBA5551" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ABGR1555" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BGRA5551" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "RGB565" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BGR565" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RGB24" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BGR24" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "RGB888" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RGBX8888" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BGR888" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BGRX8888" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ARGB8888" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "RGBA8888" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ABGR8888" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BGRA8888" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ARGB2101010" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "YV12" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IYUV" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "YUY2" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UYVY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "YVYU" 'PrefixI 'False) (U1 :: Type -> Type)))))))

# Renderer Management

createRenderer :: MonadIO m => Window -> CInt -> RendererConfig -> m Renderer Source #

createSoftwareRenderer :: MonadIO m => Surface -> m Renderer Source #

Create a 2D software rendering context for the given surface.

See `https://wiki.libsdl.org/SDL_CreateSoftwareRenderer`

destroyRenderer :: MonadIO m => Renderer -> m () Source #

# Clipboard Handling

getClipboardText :: MonadIO m => m Text Source #

Get the text from the clipboard.

Throws `SDLException` on failure.

hasClipboardText :: MonadIO m => m Bool Source #

Checks if the clipboard exists, and has some text in it.

setClipboardText :: MonadIO m => Text -> m () Source #

Replace the contents of the clipboard with the given text.

Throws `SDLException` on failure.

# Display

getDisplays :: MonadIO m => m [Display] Source #

Throws `SDLException` on failure.

data Display Source #

Constructors

Display |

Fields

- displayName :: String
- displayBoundsPosition :: Point V2 CInt

  Position of the desktop area represented by the display, with the primary display located at `(0, 0)`.

- displayBoundsSize :: V2 CInt

  Size of the desktop area represented by the display.

- displayModes :: [DisplayMode]

#### Instances

Instances details

Generic Display Source # |
Instance details Defined in SDL.Video Associated Types type Rep Display :: Type -> Type Source # Methods from :: Display -> Rep Display x Source # to :: Rep Display x -> Display Source #
Read Display Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS Display Source # readList :: ReadS [Display] Source # readPrec :: ReadPrec Display Source # readListPrec :: ReadPrec [Display] Source #
Show Display Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> Display -> ShowS Source # show :: Display -> String Source # showList :: [Display] -> ShowS Source #
Eq Display Source # |
Instance details Defined in SDL.Video Methods (==) :: Display -> Display -> Bool Source # (/=) :: Display -> Display -> Bool Source #
Ord Display Source # |
Instance details Defined in SDL.Video Methods compare :: Display -> Display -> Ordering Source # (<) :: Display -> Display -> Bool Source # (<=) :: Display -> Display -> Bool Source # (>) :: Display -> Display -> Bool Source # (>=) :: Display -> Display -> Bool Source # max :: Display -> Display -> Display Source # min :: Display -> Display -> Display Source #
type Rep Display Source # |

Instance details

Defined in SDL.Video

type Rep Display = D1 ('MetaData "Display" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "Display" 'PrefixI 'True) ((S1 ('MetaSel ('Just "displayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "displayBoundsPosition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point V2 CInt))) :*: (S1 ('MetaSel ('Just "displayBoundsSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V2 CInt)) :*: S1 ('MetaSel ('Just "displayModes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DisplayMode]))))

data DisplayMode Source #

Constructors

DisplayMode |

Fields

- displayModeFormat :: PixelFormat
- displayModeSize :: V2 CInt
- displayModeRefreshRate :: CInt

  Display's refresh rate in hertz, or `0` if unspecified.

#### Instances

Instances details

Generic DisplayMode Source # |
Instance details Defined in SDL.Video Associated Types type Rep DisplayMode :: Type -> Type Source # Methods from :: DisplayMode -> Rep DisplayMode x Source # to :: Rep DisplayMode x -> DisplayMode Source #
Read DisplayMode Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS DisplayMode Source # readList :: ReadS [DisplayMode] Source # readPrec :: ReadPrec DisplayMode Source # readListPrec :: ReadPrec [DisplayMode] Source #
Show DisplayMode Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> DisplayMode -> ShowS Source # show :: DisplayMode -> String Source # showList :: [DisplayMode] -> ShowS Source #
Eq DisplayMode Source # |
Instance details Defined in SDL.Video Methods (==) :: DisplayMode -> DisplayMode -> Bool Source # (/=) :: DisplayMode -> DisplayMode -> Bool Source #
Ord DisplayMode Source # |

Instance details

Defined in SDL.Video

Methods

compare :: DisplayMode -> DisplayMode -> Ordering Source #

(<) :: DisplayMode -> DisplayMode -> Bool Source #

(<=) :: DisplayMode -> DisplayMode -> Bool Source #

(>) :: DisplayMode -> DisplayMode -> Bool Source #

(>=) :: DisplayMode -> DisplayMode -> Bool Source #

max :: DisplayMode -> DisplayMode -> DisplayMode Source #

min :: DisplayMode -> DisplayMode -> DisplayMode Source #

type Rep DisplayMode Source # |

Instance details

Defined in SDL.Video

type Rep DisplayMode = D1 ('MetaData "DisplayMode" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "DisplayMode" 'PrefixI 'True) (S1 ('MetaSel ('Just "displayModeFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PixelFormat) :*: (S1 ('MetaSel ('Just "displayModeSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V2 CInt)) :*: S1 ('MetaSel ('Just "displayModeRefreshRate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))))

data VideoDriver Source #

Constructors

VideoDriver |

Fields

- videoDriverName :: String

#### Instances

Instances details

Data VideoDriver Source # |

Instance details

Defined in SDL.Video

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VideoDriver -> c VideoDriver Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c VideoDriver Source #

toConstr :: VideoDriver -> Constr Source #

dataTypeOf :: VideoDriver -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c VideoDriver) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VideoDriver) Source #

gmapT :: (forall b. Data b => b -> b) -> VideoDriver -> VideoDriver Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VideoDriver -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VideoDriver -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> VideoDriver -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> VideoDriver -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> VideoDriver -> m VideoDriver Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VideoDriver -> m VideoDriver Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VideoDriver -> m VideoDriver Source #

Generic VideoDriver Source # |
Instance details Defined in SDL.Video Associated Types type Rep VideoDriver :: Type -> Type Source # Methods from :: VideoDriver -> Rep VideoDriver x Source # to :: Rep VideoDriver x -> VideoDriver Source #
Read VideoDriver Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS VideoDriver Source # readList :: ReadS [VideoDriver] Source # readPrec :: ReadPrec VideoDriver Source # readListPrec :: ReadPrec [VideoDriver] Source #
Show VideoDriver Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> VideoDriver -> ShowS Source # show :: VideoDriver -> String Source # showList :: [VideoDriver] -> ShowS Source #
Eq VideoDriver Source # |
Instance details Defined in SDL.Video Methods (==) :: VideoDriver -> VideoDriver -> Bool Source # (/=) :: VideoDriver -> VideoDriver -> Bool Source #
Ord VideoDriver Source # |

Instance details

Defined in SDL.Video

Methods

compare :: VideoDriver -> VideoDriver -> Ordering Source #

(<) :: VideoDriver -> VideoDriver -> Bool Source #

(<=) :: VideoDriver -> VideoDriver -> Bool Source #

(>) :: VideoDriver -> VideoDriver -> Bool Source #

(>=) :: VideoDriver -> VideoDriver -> Bool Source #

max :: VideoDriver -> VideoDriver -> VideoDriver Source #

min :: VideoDriver -> VideoDriver -> VideoDriver Source #

type Rep VideoDriver Source # |
Instance details Defined in SDL.Video type Rep VideoDriver = D1 ('MetaData "VideoDriver" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "VideoDriver" 'PrefixI 'True) (S1 ('MetaSel ('Just "videoDriverName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

# Screen Savers

Screen savers should be disabled when the sudden enablement of the monitor's power saving features would be inconvenient for when the user hasn't provided any input for some period of time, such as during video playback.

Screen savers are disabled by default upon the initialization of the video subsystem.

screenSaverEnabled :: StateVar Bool Source #

Get or set whether to allow the screen to be blanked by a screen saver.

Screen savers are re-enabled, if needed, when SDL quits.

# Message Box

showSimpleMessageBox :: MonadIO m => Maybe Window -> MessageKind -> Text -> Text -> m () Source #

Show a simple message box with the given title and a message. Consider writing your messages to `stderr` too.

Throws `SDLException` if there are no available video targets.

data MessageKind Source #

Constructors

Error |
Warning |
Information |

#### Instances

Instances details

Data MessageKind Source # |

Instance details

Defined in SDL.Video

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MessageKind -> c MessageKind Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MessageKind Source #

toConstr :: MessageKind -> Constr Source #

dataTypeOf :: MessageKind -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MessageKind) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MessageKind) Source #

gmapT :: (forall b. Data b => b -> b) -> MessageKind -> MessageKind Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MessageKind -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MessageKind -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> MessageKind -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MessageKind -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MessageKind -> m MessageKind Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MessageKind -> m MessageKind Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MessageKind -> m MessageKind Source #

Bounded MessageKind Source # |
Instance details Defined in SDL.Video Methods minBound :: MessageKind Source # maxBound :: MessageKind Source #
Enum MessageKind Source # |

Instance details

Defined in SDL.Video

Methods

succ :: MessageKind -> MessageKind Source #

pred :: MessageKind -> MessageKind Source #

toEnum :: Int -> MessageKind Source #

fromEnum :: MessageKind -> Int Source #

enumFrom :: MessageKind -> [MessageKind] Source #

enumFromThen :: MessageKind -> MessageKind -> [MessageKind] Source #

enumFromTo :: MessageKind -> MessageKind -> [MessageKind] Source #

enumFromThenTo :: MessageKind -> MessageKind -> MessageKind -> [MessageKind] Source #

Generic MessageKind Source # |
Instance details Defined in SDL.Video Associated Types type Rep MessageKind :: Type -> Type Source # Methods from :: MessageKind -> Rep MessageKind x Source # to :: Rep MessageKind x -> MessageKind Source #
Read MessageKind Source # |
Instance details Defined in SDL.Video Methods readsPrec :: Int -> ReadS MessageKind Source # readList :: ReadS [MessageKind] Source # readPrec :: ReadPrec MessageKind Source # readListPrec :: ReadPrec [MessageKind] Source #
Show MessageKind Source # |
Instance details Defined in SDL.Video Methods showsPrec :: Int -> MessageKind -> ShowS Source # show :: MessageKind -> String Source # showList :: [MessageKind] -> ShowS Source #
Eq MessageKind Source # |
Instance details Defined in SDL.Video Methods (==) :: MessageKind -> MessageKind -> Bool Source # (/=) :: MessageKind -> MessageKind -> Bool Source #
Ord MessageKind Source # |

Instance details

Defined in SDL.Video

Methods

compare :: MessageKind -> MessageKind -> Ordering Source #

(<) :: MessageKind -> MessageKind -> Bool Source #

(<=) :: MessageKind -> MessageKind -> Bool Source #

(>) :: MessageKind -> MessageKind -> Bool Source #

(>=) :: MessageKind -> MessageKind -> Bool Source #

max :: MessageKind -> MessageKind -> MessageKind Source #

min :: MessageKind -> MessageKind -> MessageKind Source #

ToNumber MessageKind Word32 Source # |
Instance details Defined in SDL.Video Methods toNumber :: MessageKind -> Word32 Source #
type Rep MessageKind Source # |
Instance details Defined in SDL.Video type Rep MessageKind = D1 ('MetaData "MessageKind" "SDL.Video" "sdl2-2.5.5.0-1rHVQtCfQoNJ4T4oR9opIh" 'False) (C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Information" 'PrefixI 'False) (U1 :: Type -> Type)))