packages feed

dear-imgui-raw-internal-1.0.0: src/DearImGui/Raw/Internal/ImChunkStream.hsc

{-# LANGUAGE CApiFFI #-}

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

module DearImGui.Raw.Internal.ImChunkStream
  ( ImChunkStream (..)
  ) where

import DearImGui.Raw.ImVector (ImVector)
import Foreign.C.Types
import Foreign.Storable (Storable (..))

#include "dcimgui_nodefaultargfunctions_internal.h"

-- | Generic counterpart to dear_bindings's flattened
-- @ImChunkStream_T@ instantiations. The phantom @t@ documents
-- the element type; the C struct stores raw bytes only.
data ImChunkStream t = ImChunkStream
  { buf :: ImVector CChar
  }
  deriving (Eq, Show)

instance Storable (ImChunkStream t) where
  sizeOf _    = #{size ImChunkStream_ImGuiTableSettings}
  alignment _ = #{alignment ImChunkStream_ImGuiTableSettings}
  peek p = ImChunkStream <$> #{peek ImChunkStream_ImGuiTableSettings, Buf} p
  poke p v = #{poke ImChunkStream_ImGuiTableSettings, Buf} p v.buf