-- GENERATED by C->Haskell Compiler, version 0.28.1 Switcheroo, 1 April 2016 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/GIFImage.chs" #-}
{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.GIFImage
    (
     gifImageNew
     -- * Hierarchy
     --
     -- $hierarchy

    )
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp





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
gifImageNew' :: (T.Text) -> IO ((Ptr ()))
gifImageNew' a1 =
  let {a1' = unsafeToCString a1} in 
  gifImageNew''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 21 "src/Graphics/UI/FLTK/LowLevel/GIFImage.chs" #-}

gifImageNew :: T.Text -> IO (Either UnknownError (Ref GIFImage))
gifImageNew filename' = do
  ptr <- gifImageNew' filename'
  ref' <- (toRef ptr :: IO (Ref GIFImage))
  checkImage ref'

-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Image"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.RGBImage"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.GIFImage"
-- @

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/GIFImage.chs.h Fl_GIF_Image_New"
  gifImageNew''_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))