@@ -32,6 +32,12 @@ module DearImGui.Raw
3232 , getDrawData
3333 , checkVersion
3434
35+ -- ** Configuration
36+ , getConfigFlags
37+ , setConfigFlags
38+ , addConfigFlags
39+ , removeConfigFlags
40+
3541 -- * Demo, Debug, Information
3642 , showDemoWindow
3743 , showMetricsWindow
@@ -451,6 +457,27 @@ checkVersion = liftIO do
451457 [C. exp | void { IMGUI_CHECKVERSION(); } |]
452458
453459
460+ -- | Get the current ImGuiIO ConfigFlags
461+ getConfigFlags :: MonadIO m => m ImGuiConfigFlags
462+ getConfigFlags = liftIO do
463+ [C. exp | ImGuiConfigFlags { GetIO().ConfigFlags } |]
464+
465+ -- | Set the ImGuiIO ConfigFlags
466+ setConfigFlags :: MonadIO m => ImGuiConfigFlags -> m ()
467+ setConfigFlags flags = liftIO do
468+ [C. block | void { GetIO().ConfigFlags = $(ImGuiConfigFlags flags); } |]
469+
470+ -- | Modify ConfigFlags by OR-ing with additional flags
471+ addConfigFlags :: MonadIO m => ImGuiConfigFlags -> m ()
472+ addConfigFlags flags = liftIO do
473+ [C. block | void { GetIO().ConfigFlags |= $(ImGuiConfigFlags flags); } |]
474+
475+ -- | Remove flags from ConfigFlags
476+ removeConfigFlags :: MonadIO m => ImGuiConfigFlags -> m ()
477+ removeConfigFlags flags = liftIO do
478+ [C. block | void { GetIO().ConfigFlags &= ~$(ImGuiConfigFlags flags); } |]
479+
480+
454481-- | Create demo window. Demonstrate most ImGui features. Call this to learn
455482-- about the library! Try to make it always available in your application!
456483showDemoWindow :: (MonadIO m ) => m ()
0 commit comments