# dear-imgui-impl-sdl3
Platform backend for [Dear ImGui] on SDL3 windows.
Pair it with a renderer backend.
```haskell
{-# LANGUAGE BlockArguments #-}
import Control.Monad (when)
import Data.Function (fix)
import DearImGui.Impl.SDL3 qualified as ImplSDL3
import Foreign.Marshal.Alloc (alloca)
import Foreign.Ptr (Ptr)
import SDL3.Sys qualified as SDL3
forEachEvent :: (Ptr SDL3.SDL_Event -> IO ()) -> IO ()
forEachEvent handle = alloca \event -> fix \next -> do
pending <- ImplSDL3.pollEvent event
when pending do
handle event
next
```
[Dear ImGui]: https://github.com/ocornut/imgui