Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
SDL2 specific functions backend for Dear ImGui.
Modules for initialising a backend with SDL2 can be found under the corresponding backend, e.g. DearImGui.SDL.OpenGL.
Synopsis
- sdl2NewFrame :: MonadIO m => m ()
- sdl2Shutdown :: MonadIO m => m ()
- pollEventWithImGui :: MonadIO m => m (Maybe Event)
- pollEventsWithImGui :: MonadIO m => m [Event]
- dispatchRawEvent :: MonadIO m => Ptr Event -> m Bool
SDL2
sdl2NewFrame :: MonadIO m => m () Source #
Wraps ImGui_ImplSDL2_NewFrame
.
sdl2Shutdown :: MonadIO m => m () Source #
Wraps ImGui_ImplSDL2_Shutdown
.
pollEventsWithImGui :: MonadIO m => m [Event] Source #
Like the SDL2 pollEvents
function, while also dispatching the events to
Dear ImGui. See pollEventWithImGui
.
Raw
dispatchRawEvent :: MonadIO m => Ptr Event -> m Bool Source #
Dispatch a raw Event
value to Dear ImGui.
You may want this function instead of pollEventWithImGui
if you do not use
sdl2
's higher-level Event
type (e.g. your application has its own polling
mechanism).
It is your application's responsibility to both manage the input
pointer's memory and to fill the memory location with a raw Event
value.