fltkhs-0.7.0.0: src/Graphics/UI/FLTK/LowLevel/BMPImage.chs
{-# 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' { `CString' } -> `Ptr ()' id #}
bmpImageNew :: T.Text -> IO (Either UnknownError (Ref BMPImage))
bmpImageNew filename' = do
ptr <- withText filename' bmpImageNew'
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"
-- @