module Graphics.UI.FLTK.LowLevel.ImageSurface
(
imageSurfaceNew
)
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Foreign.C.Types
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
imageSurfaceNew' :: (Int) -> (Int) -> IO ((Ptr ()))
imageSurfaceNew' a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
imageSurfaceNew''_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
imageSurfaceNew :: Size -> IO (Ref ImageSurface)
imageSurfaceNew (Size (Width w') (Height h')) = imageSurfaceNew' w' h' >>= toRef
imageSurfaceDestroy' :: (Ptr ()) -> IO ()
imageSurfaceDestroy' a1 =
let {a1' = id a1} in
imageSurfaceDestroy''_ a1' >>
return ()
instance (impl ~ (IO ())) => Op (Destroy ()) ImageSurface orig impl where
runOp _ _ image_surface = withRef image_surface $ \image_surfacePtr -> imageSurfaceDestroy' image_surfacePtr
className' :: (Ptr ()) -> IO ((String))
className' a1 =
let {a1' = id a1} in
className''_ a1' >>= \res ->
let {res' = unsafeFromCString res} in
return (res')
instance (impl ~ ( IO (String))) => Op (ClassName ()) ImageSurface orig impl where
runOp _ _ image_surface = withRef image_surface $ \image_surfacePtr -> className' image_surfacePtr
setCurrent' :: (Ptr ()) -> IO ()
setCurrent' a1 =
let {a1' = id a1} in
setCurrent''_ a1' >>
return ()
instance (impl ~ ( IO ())) => Op (SetCurrent ()) ImageSurface orig impl where
runOp _ _ image_surface = withRef image_surface $ \image_surfacePtr -> setCurrent' image_surfacePtr
draw' :: (Ptr ()) -> (Ptr ()) -> (Int) -> (Int) -> IO ()
draw' a1 a2 a3 a4 =
let {a1' = id a1} in
let {a2' = id a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
draw''_ a1' a2' a3' a4' >>
return ()
instance (Parent a Widget, impl ~ ( Ref a -> Position -> IO ())) => Op (Draw ()) ImageSurface orig impl where
runOp _ _ image_surface widget (Position (X delta_x) (Y delta_y)) = withRef image_surface $ \image_surfacePtr -> withRef widget $ \widgetPtr -> draw' image_surfacePtr widgetPtr delta_x delta_y
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/ImageSurface.chs.h Fl_Image_Surface_New"
imageSurfaceNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/ImageSurface.chs.h Fl_Image_Surface_Destroy"
imageSurfaceDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/ImageSurface.chs.h Fl_Image_Surface_class_name"
className''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/ImageSurface.chs.h Fl_Image_Surface_set_current"
setCurrent''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/ImageSurface.chs.h Fl_Image_Surface_draw"
draw''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ())))))