{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.UI.FLTK.LowLevel.BMPImage ( bmpImageNew -- * Hierarchy -- -- $hierarchy ) where #include "Fl_ExportMacros.h" #include "Fl_Types.h" #include "Fl_BMP_ImageC.h" import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum) import Graphics.UI.FLTK.LowLevel.Fl_Types import Graphics.UI.FLTK.LowLevel.Utils import Graphics.UI.FLTK.LowLevel.Hierarchy import Graphics.UI.FLTK.LowLevel.RGBImage import qualified Data.Text as T {# fun Fl_BMP_Image_New as bmpImageNew' { unsafeToCString `T.Text' } -> `Ptr ()' id #} bmpImageNew :: T.Text -> IO (Either UnknownError (Ref BMPImage)) bmpImageNew filename' = do ptr <- bmpImageNew' filename' ref' <- (toRef ptr :: IO (Ref BMPImage)) checkImage ref' -- $hierarchy -- @ -- "Graphics.UI.FLTK.LowLevel.Image" -- | -- v -- "Graphics.UI.FLTK.LowLevel.RGBImage" -- | -- v -- "Graphics.UI.FLTK.LowLevel.BMPImage" -- @