packages feed

dear-imgui-impl-sdl2-1.0.0: src/DearImGui/Raw/Impl/SDL2.hsc

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

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

module DearImGui.Raw.Impl.SDL2
  ( SDL_Event
  , SDL_GameController
  , SDL_Renderer
  , SDL_Window
  , getContentScaleForDisplay
  , getContentScaleForWindow
  , initForD3D
  , initForMetal
  , initForOpenGL
  , initForOther
  , initForSDLRenderer
  , initForVulkan
  , newFrame
  , processEvent
  , setGamepadMode
  , setMouseCaptureMode
  , shutdown
  ) where

import DearImGui.Raw.Impl.SDL2.Enums.ImGui_ImplSDL2_GamepadMode (ImGui_ImplSDL2_GamepadMode)
import DearImGui.Raw.Impl.SDL2.Enums.ImGui_ImplSDL2_MouseCaptureMode (ImGui_ImplSDL2_MouseCaptureMode)
import Foreign.C.Types
import Foreign.Ptr (Ptr)

#include "dcimgui_impl_sdl2.h"

-- structs (opaque)

data SDL_Event

data SDL_Renderer

data SDL_Window

data SDL_GameController

-- functions

-- C: float ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_GetContentScaleForDisplay"
  getContentScaleForDisplay
    :: CInt -- ^ display_index
    -> IO Float

-- C: float ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_GetContentScaleForWindow"
  getContentScaleForWindow
    :: (Ptr SDL_Window) -- ^ window
    -> IO Float

-- C: bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_InitForD3D"
  initForD3D
    :: (Ptr SDL_Window) -- ^ window
    -> IO CBool

-- C: bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_InitForMetal"
  initForMetal
    :: (Ptr SDL_Window) -- ^ window
    -> IO CBool

-- C: bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_InitForOpenGL"
  initForOpenGL
    :: (Ptr SDL_Window) -- ^ window
    -> (Ptr ()) -- ^ sdl_gl_context
    -> IO CBool

-- C: bool ImGui_ImplSDL2_InitForOther(SDL_Window* window)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_InitForOther"
  initForOther
    :: (Ptr SDL_Window) -- ^ window
    -> IO CBool

-- C: bool ImGui_ImplSDL2_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_InitForSDLRenderer"
  initForSDLRenderer
    :: (Ptr SDL_Window) -- ^ window
    -> (Ptr SDL_Renderer) -- ^ renderer
    -> IO CBool

-- C: bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_InitForVulkan"
  initForVulkan
    :: (Ptr SDL_Window) -- ^ window
    -> IO CBool

-- C: void ImGui_ImplSDL2_NewFrame()
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_NewFrame"
  newFrame :: IO ()

-- C: bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_ProcessEvent"
  processEvent
    :: (Ptr SDL_Event) -- ^ event
    -> IO CBool

-- C: void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, _SDL_GameController** manual_gamepads_array, int manual_gamepads_count)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_SetGamepadMode"
  setGamepadMode
    :: ImGui_ImplSDL2_GamepadMode -- ^ mode
    -> (Ptr (Ptr SDL_GameController)) -- ^ manual_gamepads_array
    -> CInt -- ^ manual_gamepads_count
    -> IO ()

-- C: void ImGui_ImplSDL2_SetMouseCaptureMode(ImGui_ImplSDL2_MouseCaptureMode mode)
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_SetMouseCaptureMode"
  setMouseCaptureMode
    :: ImGui_ImplSDL2_MouseCaptureMode -- ^ mode
    -> IO ()

-- C: void ImGui_ImplSDL2_Shutdown()
foreign import capi safe "dcimgui_impl_sdl2.h cImGui_ImplSDL2_Shutdown"
  shutdown :: IO ()