| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.SDL.Window
Synopsis
- data Window = Window
- data WindowSize = WindowSize {}
- newtype WindowTitle = WindowTitle String
- handleNewWindow :: HookContext -> System ()
- handleWindowRemove :: HookContext -> System ()
- data WindowFlag
- flagToBit :: WindowFlag -> SDL_WindowFlags
- newtype WindowFlags = WindowFlags [WindowFlag]
- flagsToBit :: WindowFlags -> SDL_WindowFlags
- data WindowPlugin
- handleWindowEvents :: System ()
- handleWindowEvent :: SDLMessage SDL_WindowEvent -> System ()
Documentation
A component that will create a new window when added to an entity, and destroy it when removed.
Windows can be configured by inserting a WindowSize, WindowTitle, WindowFlags alongside this component.
Constructors
| Window |
Instances
| Component Window Source # | |||||
Defined in Mischief.SDL.Window Associated Types
| |||||
| type IsExclusiveRel Window Source # | |||||
Defined in Mischief.SDL.Window | |||||
data WindowSize Source #
The size of a window in pixels.
Constructors
| WindowSize | |
Instances
| Default WindowSize Source # | |||||
Defined in Mischief.SDL.Window Methods def :: WindowSize # | |||||
| Component WindowSize Source # | |||||
Defined in Mischief.SDL.Window Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook WindowSize] # onSet :: [Hook WindowSize] # onRemove :: [Hook WindowSize] # onAddRel :: [HookRel WindowSize] # onSetRel :: [HookRel WindowSize] # onRemoveRel :: [HookRel WindowSize] # | |||||
| type IsExclusiveRel WindowSize Source # | |||||
Defined in Mischief.SDL.Window | |||||
newtype WindowTitle Source #
The displayed title (or name) of a window.
Constructors
| WindowTitle String |
Instances
| Default WindowTitle Source # | |||||
Defined in Mischief.SDL.Window Methods def :: WindowTitle # | |||||
| Component WindowTitle Source # | |||||
Defined in Mischief.SDL.Window Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook WindowTitle] # onSet :: [Hook WindowTitle] # onRemove :: [Hook WindowTitle] # onAddRel :: [HookRel WindowTitle] # onSetRel :: [HookRel WindowTitle] # onRemoveRel :: [HookRel WindowTitle] # | |||||
| type IsExclusiveRel WindowTitle Source # | |||||
Defined in Mischief.SDL.Window | |||||
handleNewWindow :: HookContext -> System () Source #
handleWindowRemove :: HookContext -> System () Source #
data WindowFlag Source #
These correspond to the SDL3 Window Flags.
The most important ones are WindowFullscreen and WindowResizable.
newtype WindowFlags Source #
A list of WindowFlags specifying various configurations for the window. The only one set by default is WindowResizable.
Constructors
| WindowFlags [WindowFlag] |
Instances
| Default WindowFlags Source # | |||||
Defined in Mischief.SDL.Window Methods def :: WindowFlags # | |||||
| Component WindowFlags Source # | |||||
Defined in Mischief.SDL.Window Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook WindowFlags] # onSet :: [Hook WindowFlags] # onRemove :: [Hook WindowFlags] # onAddRel :: [HookRel WindowFlags] # onSetRel :: [HookRel WindowFlags] # onRemoveRel :: [HookRel WindowFlags] # | |||||
| type IsExclusiveRel WindowFlags Source # | |||||
Defined in Mischief.SDL.Window | |||||
data WindowPlugin Source #
Plugin adding windowing functionality.
Instances
| Plugin WindowPlugin Source # | |
Defined in Mischief.SDL.Window | |
handleWindowEvents :: System () Source #
handleWindowEvent :: SDLMessage SDL_WindowEvent -> System () Source #