dear-imgui-2.3.0: Haskell bindings for Dear ImGui.
Safe HaskellSafe-Inferred
LanguageHaskell2010

DearImGui.SDL

Contents

Description

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

SDL2

sdl2NewFrame :: MonadIO m => m () Source #

Wraps ImGui_ImplSDL2_NewFrame.

sdl2Shutdown :: MonadIO m => m () Source #

Wraps ImGui_ImplSDL2_Shutdown.

pollEventWithImGui :: MonadIO m => m (Maybe Event) Source #

Call the SDL2 pollEvent function, while also dispatching the event to Dear ImGui. You should use this in your application instead of pollEvent.

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.