packages feed

dear-imgui-raw-1.0.0: src/DearImGui/Raw/ImGuiIO.hsc

{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE PatternSynonyms #-}

-- This file was generated by dear-bindings-ffi. Do not edit by hand.

module DearImGui.Raw.ImGuiIO
  ( ImGuiIO
  , addFocusEvent
  , addInputCharacter
  , addInputCharacterUTF16
  , addInputCharactersUTF8
  , addKeyAnalogEvent
  , addKeyEvent
  , addMouseButtonEvent
  , addMousePosEvent
  , addMouseSourceEvent
  , addMouseViewportEvent
  , addMouseWheelEvent
  , clearEventsQueue
  , clearInputKeys
  , clearInputMouse
  , destroy
  , init
  , keysDataLength
  , mouseClickedCountLength
  , mouseClickedLastCountLength
  , mouseClickedLength
  , mouseClickedPosLength
  , mouseClickedTimeLength
  , mouseDoubleClickedLength
  , mouseDownDurationLength
  , mouseDownDurationPrevLength
  , mouseDownLength
  , mouseDownOwnedLength
  , mouseDownOwnedUnlessPopupCloseLength
  , mouseDragMaxDistanceAbsLength
  , mouseDragMaxDistanceSqrLength
  , mouseReleasedLength
  , mouseReleasedTimeLength
  , setAppAcceptingEvents
  , setKeyEventNativeData
  , withDefault
  ) where

import Control.Exception (bracket_)
import DearImGui.Raw (ImGuiID, ImGuiKeyChord, ImU16, ImWchar, ImWchar16)
import DearImGui.Raw.Enums.ImGuiBackendFlags (ImGuiBackendFlags)
import DearImGui.Raw.Enums.ImGuiColorEditFlags (ImGuiColorEditFlags)
import DearImGui.Raw.Enums.ImGuiConfigFlags (ImGuiConfigFlags)
import DearImGui.Raw.Enums.ImGuiKey (ImGuiKey)
import DearImGui.Raw.Enums.ImGuiMouseSource (ImGuiMouseSource)
import DearImGui.Raw.ImFont (ImFont)
import DearImGui.Raw.ImFontAtlas (ImFontAtlas)
import DearImGui.Raw.ImGuiContext (ImGuiContext)
import DearImGui.Raw.ImGuiKeyData (ImGuiKeyData)
import DearImGui.Raw.ImVec2 (ImVec2)
import DearImGui.Raw.ImVector (ImVector)
import Foreign.C.String (CString)
import Foreign.C.Types
import Foreign.Marshal.Alloc (alloca)
import Foreign.Ptr (Ptr, plusPtr)
import Foreign.Storable (Storable (..))
import GHC.Records (HasField (..))
import Prelude hiding (init)

#include "dcimgui_nodefaultargfunctions.h"

-- structs (opaque)

data ImGuiIO
instance Storable ImGuiIO where
  sizeOf _    = #{size ImGuiIO}
  alignment _ = #{alignment ImGuiIO}
  peek _ = error "ImGuiIO: opaque struct, peek not supported in v0"
  poke _ _ = error "ImGuiIO: opaque struct, poke not supported in v0"

instance HasField "configFlags" (Ptr ImGuiIO) (Ptr ImGuiConfigFlags) where
  getField = #{ptr ImGuiIO, ConfigFlags}

instance HasField "backendFlags" (Ptr ImGuiIO) (Ptr ImGuiBackendFlags) where
  getField = #{ptr ImGuiIO, BackendFlags}

instance HasField "displaySize" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, DisplaySize}

instance HasField "displayFramebufferScale" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, DisplayFramebufferScale}

instance HasField "deltaTime" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, DeltaTime}

instance HasField "iniSavingRate" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, IniSavingRate}

instance HasField "iniFilename" (Ptr ImGuiIO) (Ptr CString) where
  getField = #{ptr ImGuiIO, IniFilename}

instance HasField "logFilename" (Ptr ImGuiIO) (Ptr CString) where
  getField = #{ptr ImGuiIO, LogFilename}

instance HasField "userData" (Ptr ImGuiIO) (Ptr (Ptr ())) where
  getField = #{ptr ImGuiIO, UserData}

instance HasField "fonts" (Ptr ImGuiIO) (Ptr (Ptr ImFontAtlas)) where
  getField = #{ptr ImGuiIO, Fonts}

instance HasField "fontDefault" (Ptr ImGuiIO) (Ptr (Ptr ImFont)) where
  getField = #{ptr ImGuiIO, FontDefault}

instance HasField "fontAllowUserScaling" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, FontAllowUserScaling}

instance HasField "configNavSwapGamepadButtons" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavSwapGamepadButtons}

instance HasField "configNavMoveSetMousePos" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavMoveSetMousePos}

instance HasField "configNavCaptureKeyboard" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavCaptureKeyboard}

instance HasField "configNavEscapeClearFocusItem" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavEscapeClearFocusItem}

instance HasField "configNavEscapeClearFocusWindow" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavEscapeClearFocusWindow}

instance HasField "configNavCursorVisibleAuto" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavCursorVisibleAuto}

instance HasField "configNavCursorVisibleAlways" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigNavCursorVisibleAlways}

instance HasField "configDockingNoSplit" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDockingNoSplit}

instance HasField "configDockingNoDockingOver" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDockingNoDockingOver}

instance HasField "configDockingWithShift" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDockingWithShift}

instance HasField "configDockingAlwaysTabBar" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDockingAlwaysTabBar}

instance HasField "configDockingTransparentPayload" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDockingTransparentPayload}

instance HasField "configViewportsNoAutoMerge" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigViewportsNoAutoMerge}

instance HasField "configViewportsNoTaskBarIcon" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigViewportsNoTaskBarIcon}

instance HasField "configViewportsNoDecoration" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigViewportsNoDecoration}

instance HasField "configViewportsNoDefaultParent" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigViewportsNoDefaultParent}

instance HasField "configViewportsPlatformFocusSetsImGuiFocus" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigViewportsPlatformFocusSetsImGuiFocus}

instance HasField "configDpiScaleFonts" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDpiScaleFonts}

instance HasField "configDpiScaleViewports" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDpiScaleViewports}

instance HasField "configMacOSXBehaviors" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigMacOSXBehaviors}

instance HasField "configInputTrickleEventQueue" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigInputTrickleEventQueue}

instance HasField "configInputTextCursorBlink" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigInputTextCursorBlink}

instance HasField "configInputTextEnterKeepActive" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigInputTextEnterKeepActive}

instance HasField "configColorEditFlags" (Ptr ImGuiIO) (Ptr ImGuiColorEditFlags) where
  getField = #{ptr ImGuiIO, ConfigColorEditFlags}

instance HasField "configDragClickToInputText" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDragClickToInputText}

instance HasField "configWindowsResizeFromEdges" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigWindowsResizeFromEdges}

instance HasField "configWindowsMoveFromTitleBarOnly" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigWindowsMoveFromTitleBarOnly}

instance HasField "configWindowsCopyContentsWithCtrlC" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigWindowsCopyContentsWithCtrlC}

instance HasField "configScrollbarScrollByPage" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigScrollbarScrollByPage}

instance HasField "configIniSettingsSaveLastUsedDate" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigIniSettingsSaveLastUsedDate}

instance HasField "configIniSettingsAutoDiscardMonths" (Ptr ImGuiIO) (Ptr CInt) where
  getField = #{ptr ImGuiIO, ConfigIniSettingsAutoDiscardMonths}

instance HasField "configDebugIniSettings" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugIniSettings}

instance HasField "mouseDrawCursor" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseDrawCursor}

instance HasField "configMemoryCompactTimer" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, ConfigMemoryCompactTimer}

instance HasField "mouseDoubleClickTime" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseDoubleClickTime}

instance HasField "mouseDoubleClickMaxDist" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseDoubleClickMaxDist}

instance HasField "mouseSingleClickDelay" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseSingleClickDelay}

instance HasField "mouseDragThreshold" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseDragThreshold}

instance HasField "keyRepeatDelay" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, KeyRepeatDelay}

instance HasField "keyRepeatRate" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, KeyRepeatRate}

instance HasField "configErrorRecovery" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigErrorRecovery}

instance HasField "configErrorRecoveryEnableAssert" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigErrorRecoveryEnableAssert}

instance HasField "configErrorRecoveryEnableDebugLog" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigErrorRecoveryEnableDebugLog}

instance HasField "configErrorRecoveryEnableTooltip" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigErrorRecoveryEnableTooltip}

instance HasField "configDebugIsDebuggerPresent" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugIsDebuggerPresent}

instance HasField "configDebugHighlightIdConflicts" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugHighlightIdConflicts}

instance HasField "configDebugHighlightIdConflictsShowItemPicker" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugHighlightIdConflictsShowItemPicker}

instance HasField "configDebugBeginReturnValueOnce" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugBeginReturnValueOnce}

instance HasField "configDebugBeginReturnValueLoop" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugBeginReturnValueLoop}

instance HasField "configDebugIgnoreFocusLoss" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugIgnoreFocusLoss}

instance HasField "configDebugDrawListDefaultsToStrokeLegacy" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, ConfigDebugDrawListDefaultsToStrokeLegacy}

instance HasField "backendPlatformName" (Ptr ImGuiIO) (Ptr CString) where
  getField = #{ptr ImGuiIO, BackendPlatformName}

instance HasField "backendRendererName" (Ptr ImGuiIO) (Ptr CString) where
  getField = #{ptr ImGuiIO, BackendRendererName}

instance HasField "backendPlatformUserData" (Ptr ImGuiIO) (Ptr (Ptr ())) where
  getField = #{ptr ImGuiIO, BackendPlatformUserData}

instance HasField "backendRendererUserData" (Ptr ImGuiIO) (Ptr (Ptr ())) where
  getField = #{ptr ImGuiIO, BackendRendererUserData}

instance HasField "backendLanguageUserData" (Ptr ImGuiIO) (Ptr (Ptr ())) where
  getField = #{ptr ImGuiIO, BackendLanguageUserData}

instance HasField "wantCaptureMouse" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, WantCaptureMouse}

instance HasField "wantCaptureKeyboard" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, WantCaptureKeyboard}

instance HasField "wantTextInput" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, WantTextInput}

instance HasField "wantSetMousePos" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, WantSetMousePos}

instance HasField "wantSaveIniSettings" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, WantSaveIniSettings}

instance HasField "navActive" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, NavActive}

instance HasField "navVisible" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, NavVisible}

instance HasField "framerate" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, Framerate}

instance HasField "metricsRenderVertices" (Ptr ImGuiIO) (Ptr CInt) where
  getField = #{ptr ImGuiIO, MetricsRenderVertices}

instance HasField "metricsRenderIndices" (Ptr ImGuiIO) (Ptr CInt) where
  getField = #{ptr ImGuiIO, MetricsRenderIndices}

instance HasField "metricsRenderWindows" (Ptr ImGuiIO) (Ptr CInt) where
  getField = #{ptr ImGuiIO, MetricsRenderWindows}

instance HasField "metricsActiveWindows" (Ptr ImGuiIO) (Ptr CInt) where
  getField = #{ptr ImGuiIO, MetricsActiveWindows}

instance HasField "mouseDelta" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, MouseDelta}

instance HasField "ctx" (Ptr ImGuiIO) (Ptr (Ptr ImGuiContext)) where
  getField = #{ptr ImGuiIO, Ctx}

instance HasField "mousePos" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, MousePos}

instance HasField "mouseDown" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseDown}

mouseDownLength :: Int
mouseDownLength = #{const 5}

instance HasField "mouseWheel" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseWheel}

instance HasField "mouseWheelH" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseWheelH}

instance HasField "mouseSource" (Ptr ImGuiIO) (Ptr ImGuiMouseSource) where
  getField = #{ptr ImGuiIO, MouseSource}

instance HasField "mouseHoveredViewport" (Ptr ImGuiIO) (Ptr ImGuiID) where
  getField = #{ptr ImGuiIO, MouseHoveredViewport}

instance HasField "keyCtrl" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, KeyCtrl}

instance HasField "keyShift" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, KeyShift}

instance HasField "keyAlt" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, KeyAlt}

instance HasField "keySuper" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, KeySuper}

instance HasField "keyMods" (Ptr ImGuiIO) (Ptr ImGuiKeyChord) where
  getField = #{ptr ImGuiIO, KeyMods}

instance HasField "keysData" (Ptr ImGuiIO) (Ptr ImGuiKeyData) where
  getField = #{ptr ImGuiIO, KeysData}

keysDataLength :: Int
keysDataLength = #{const ImGuiKey_NamedKey_COUNT}

instance HasField "wantCaptureMouseUnlessPopupClose" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, WantCaptureMouseUnlessPopupClose}

instance HasField "mousePosPrev" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, MousePosPrev}

instance HasField "mouseClickedPos" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, MouseClickedPos}

mouseClickedPosLength :: Int
mouseClickedPosLength = #{const 5}

instance HasField "mouseClickedTime" (Ptr ImGuiIO) (Ptr Double) where
  getField = #{ptr ImGuiIO, MouseClickedTime}

mouseClickedTimeLength :: Int
mouseClickedTimeLength = #{const 5}

instance HasField "mouseClicked" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseClicked}

mouseClickedLength :: Int
mouseClickedLength = #{const 5}

instance HasField "mouseDoubleClicked" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseDoubleClicked}

mouseDoubleClickedLength :: Int
mouseDoubleClickedLength = #{const 5}

instance HasField "mouseClickedCount" (Ptr ImGuiIO) (Ptr ImU16) where
  getField = #{ptr ImGuiIO, MouseClickedCount}

mouseClickedCountLength :: Int
mouseClickedCountLength = #{const 5}

instance HasField "mouseClickedLastCount" (Ptr ImGuiIO) (Ptr ImU16) where
  getField = #{ptr ImGuiIO, MouseClickedLastCount}

mouseClickedLastCountLength :: Int
mouseClickedLastCountLength = #{const 5}

instance HasField "mouseReleased" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseReleased}

mouseReleasedLength :: Int
mouseReleasedLength = #{const 5}

instance HasField "mouseReleasedTime" (Ptr ImGuiIO) (Ptr Double) where
  getField = #{ptr ImGuiIO, MouseReleasedTime}

mouseReleasedTimeLength :: Int
mouseReleasedTimeLength = #{const 5}

instance HasField "mouseDownOwned" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseDownOwned}

mouseDownOwnedLength :: Int
mouseDownOwnedLength = #{const 5}

instance HasField "mouseDownOwnedUnlessPopupClose" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseDownOwnedUnlessPopupClose}

mouseDownOwnedUnlessPopupCloseLength :: Int
mouseDownOwnedUnlessPopupCloseLength = #{const 5}

instance HasField "mouseWheelRequestAxisSwap" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseWheelRequestAxisSwap}

instance HasField "mouseCtrlLeftAsRightClick" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, MouseCtrlLeftAsRightClick}

instance HasField "mouseDownDuration" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseDownDuration}

mouseDownDurationLength :: Int
mouseDownDurationLength = #{const 5}

instance HasField "mouseDownDurationPrev" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseDownDurationPrev}

mouseDownDurationPrevLength :: Int
mouseDownDurationPrevLength = #{const 5}

instance HasField "mouseDragMaxDistanceAbs" (Ptr ImGuiIO) (Ptr ImVec2) where
  getField = #{ptr ImGuiIO, MouseDragMaxDistanceAbs}

mouseDragMaxDistanceAbsLength :: Int
mouseDragMaxDistanceAbsLength = #{const 5}

instance HasField "mouseDragMaxDistanceSqr" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, MouseDragMaxDistanceSqr}

mouseDragMaxDistanceSqrLength :: Int
mouseDragMaxDistanceSqrLength = #{const 5}

instance HasField "penPressure" (Ptr ImGuiIO) (Ptr Float) where
  getField = #{ptr ImGuiIO, PenPressure}

instance HasField "appFocusLost" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, AppFocusLost}

instance HasField "appAcceptingEvents" (Ptr ImGuiIO) (Ptr CBool) where
  getField = #{ptr ImGuiIO, AppAcceptingEvents}

instance HasField "inputQueueSurrogate" (Ptr ImGuiIO) (Ptr ImWchar16) where
  getField = #{ptr ImGuiIO, InputQueueSurrogate}

instance HasField "inputQueueCharacters" (Ptr ImGuiIO) (Ptr (ImVector ImWchar)) where
  getField = #{ptr ImGuiIO, InputQueueCharacters}

foreign import capi unsafe "DearImGuiWrappers.h ImGuiIO_Init_wrap"
  init
    :: Ptr ImGuiIO
    -> IO ()

foreign import capi unsafe "DearImGuiWrappers.h ImGuiIO_Destroy_wrap"
  destroy
    :: Ptr ImGuiIO
    -> IO ()

withDefault :: (Ptr ImGuiIO -> IO a) -> IO a
withDefault k = alloca $ \p -> bracket_ (init p) (destroy p) (k p)

-- functions

-- C: void AddFocusEvent(ImGuiIO* self, bool focused)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddFocusEvent"
  addFocusEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> CBool -- ^ focused
    -> IO ()

-- C: void AddInputCharacter(ImGuiIO* self, unsigned int c)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddInputCharacter"
  addInputCharacter
    :: (Ptr ImGuiIO) -- ^ self
    -> CUInt -- ^ c
    -> IO ()

-- C: void AddInputCharacterUTF16(ImGuiIO* self, ImWchar16 c)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddInputCharacterUTF16"
  addInputCharacterUTF16
    :: (Ptr ImGuiIO) -- ^ self
    -> ImWchar16 -- ^ c
    -> IO ()

-- C: void AddInputCharactersUTF8(ImGuiIO* self, const char* str)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddInputCharactersUTF8"
  addInputCharactersUTF8
    :: (Ptr ImGuiIO) -- ^ self
    -> CString -- ^ str
    -> IO ()

-- C: void AddKeyAnalogEvent(ImGuiIO* self, ImGuiKey key, bool down, float v)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddKeyAnalogEvent"
  addKeyAnalogEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> ImGuiKey -- ^ key
    -> CBool -- ^ down
    -> Float -- ^ v
    -> IO ()

-- C: void AddKeyEvent(ImGuiIO* self, ImGuiKey key, bool down)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddKeyEvent"
  addKeyEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> ImGuiKey -- ^ key
    -> CBool -- ^ down
    -> IO ()

-- C: void AddMouseButtonEvent(ImGuiIO* self, int button, bool down)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddMouseButtonEvent"
  addMouseButtonEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> CInt -- ^ button
    -> CBool -- ^ down
    -> IO ()

-- C: void AddMousePosEvent(ImGuiIO* self, float x, float y)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddMousePosEvent"
  addMousePosEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> Float -- ^ x
    -> Float -- ^ y
    -> IO ()

-- C: void AddMouseSourceEvent(ImGuiIO* self, ImGuiMouseSource source)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddMouseSourceEvent"
  addMouseSourceEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> ImGuiMouseSource -- ^ source
    -> IO ()

-- C: void AddMouseViewportEvent(ImGuiIO* self, ImGuiID id)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddMouseViewportEvent"
  addMouseViewportEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> ImGuiID -- ^ id
    -> IO ()

-- C: void AddMouseWheelEvent(ImGuiIO* self, float wheel_x, float wheel_y)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_AddMouseWheelEvent"
  addMouseWheelEvent
    :: (Ptr ImGuiIO) -- ^ self
    -> Float -- ^ wheel_x
    -> Float -- ^ wheel_y
    -> IO ()

-- C: void ClearEventsQueue(ImGuiIO* self)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_ClearEventsQueue"
  clearEventsQueue
    :: (Ptr ImGuiIO) -- ^ self
    -> IO ()

-- C: void ClearInputKeys(ImGuiIO* self)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_ClearInputKeys"
  clearInputKeys
    :: (Ptr ImGuiIO) -- ^ self
    -> IO ()

-- C: void ClearInputMouse(ImGuiIO* self)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_ClearInputMouse"
  clearInputMouse
    :: (Ptr ImGuiIO) -- ^ self
    -> IO ()

-- C: void SetAppAcceptingEvents(ImGuiIO* self, bool accepting_events)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_SetAppAcceptingEvents"
  setAppAcceptingEvents
    :: (Ptr ImGuiIO) -- ^ self
    -> CBool -- ^ accepting_events
    -> IO ()

-- C: void SetKeyEventNativeData(ImGuiIO* self, ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index)
foreign import capi unsafe "dcimgui_nodefaultargfunctions.h ImGuiIO_SetKeyEventNativeData"
  setKeyEventNativeData
    :: (Ptr ImGuiIO) -- ^ self
    -> ImGuiKey -- ^ key
    -> CInt -- ^ native_keycode
    -> CInt -- ^ native_scancode
    -> CInt -- ^ native_legacy_index
    -> IO ()