dear-imgui-raw-internal-1.0.0: src/DearImGui/Raw/Internal/ImGuiPackedDate.hsc
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE PatternSynonyms #-}
-- This file was generated by dear-bindings-ffi. Do not edit by hand.
module DearImGui.Raw.Internal.ImGuiPackedDate
( ImGuiPackedDate
, destroy
, init
, isValid
, subtractMonths
, unpack
, withDefault
) where
import Control.Exception (bracket_)
import Foreign.C.Types
import Foreign.Marshal.Alloc (alloca)
import Foreign.Ptr (Ptr)
import Foreign.Storable (Storable (..))
import Prelude hiding (init)
#include "dcimgui_nodefaultargfunctions_internal.h"
-- structs (opaque)
data ImGuiPackedDate
instance Storable ImGuiPackedDate where
sizeOf _ = #{size ImGuiPackedDate}
alignment _ = #{alignment ImGuiPackedDate}
peek _ = error "ImGuiPackedDate: opaque struct, peek not supported in v0"
poke _ _ = error "ImGuiPackedDate: opaque struct, poke not supported in v0"
foreign import capi unsafe "DearImGuiWrappers.h ImGuiPackedDate_Init_wrap"
init
:: Ptr ImGuiPackedDate
-> IO ()
foreign import capi unsafe "DearImGuiWrappers.h ImGuiPackedDate_Destroy_wrap"
destroy
:: Ptr ImGuiPackedDate
-> IO ()
withDefault :: (Ptr ImGuiPackedDate -> IO a) -> IO a
withDefault k = alloca $ \p -> bracket_ (init p) (destroy p) (k p)
-- functions
-- C: bool IsValid(ImGuiPackedDate* self)
foreign import capi unsafe "dcimgui_nodefaultargfunctions_internal.h ImGuiPackedDate_IsValid"
isValid
:: (Ptr ImGuiPackedDate) -- ^ self
-> IO CBool
-- C: void SubtractMonths(ImGuiPackedDate* self, int m)
foreign import capi unsafe "dcimgui_nodefaultargfunctions_internal.h ImGuiPackedDate_SubtractMonths"
subtractMonths
:: (Ptr ImGuiPackedDate) -- ^ self
-> CInt -- ^ m
-> IO ()
-- C: int Unpack(const ImGuiPackedDate* self)
foreign import capi unsafe "dcimgui_nodefaultargfunctions_internal.h ImGuiPackedDate_Unpack"
unpack
:: (Ptr ImGuiPackedDate) -- ^ self
-> IO CInt