Add wchar32 and disable-obsolete flags (#127)

This commit is contained in:
Alexander Bondarenko
2022-02-13 19:05:49 +03:00
committed by GitHub
parent af6ba9e989
commit ccdff36774
2 changed files with 41 additions and 10 deletions

View File

@ -1,11 +1,17 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE CPP #-}
module DearImGui.Structs where
-- base
import Data.Word
( Word32, Word16 )
( Word32
#ifndef IMGUI_USE_WCHAR32
, Word16
#endif
)
import Foreign
( Storable(..), castPtr, plusPtr )
@ -96,5 +102,8 @@ data ImGuiListClipper
type ImU32 = Word32
-- | Single wide character (used mostly in glyph management)
#ifdef IMGUI_USE_WCHAR32
type ImWchar = Word32
#else
type ImWchar = Word16
-- FIXME: consider IMGUI_USE_WCHAR32
#endif