{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/CopySurface.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables, UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.CopySurface
(
copySurfaceNew
)
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.Dispatch
import qualified Data.Text as T
copySurfaceNew' :: (Int) -> (Int) -> IO ((Ptr ()))
copySurfaceNew' a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
copySurfaceNew''_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 25 "src/Graphics/UI/FLTK/LowLevel/CopySurface.chs" #-}
copySurfaceNew :: Size -> IO (Ref CopySurface)
copySurfaceNew (Size (Width w') (Height h')) = copySurfaceNew' w' h' >>= toRef
copySurfaceDestroy' :: (Ptr ()) -> IO ()
copySurfaceDestroy' a1 =
let {a1' = id a1} in
copySurfaceDestroy''_ a1' >>
return ()
{-# LINE 29 "src/Graphics/UI/FLTK/LowLevel/CopySurface.chs" #-}
instance (impl ~ (IO ())) => Op (Destroy ()) CopySurface orig impl where
runOp _ _ copy_surface = withRef copy_surface $ \copy_surfacePtr -> copySurfaceDestroy' copy_surfacePtr
className' :: (Ptr () ) -> IO ((T.Text))
className' a1 =
let {a1' = id a1} in
className''_ a1' >>= \res ->
let {res' = unsafeFromCString res} in
return (res')
{-# LINE 33 "src/Graphics/UI/FLTK/LowLevel/CopySurface.chs" #-}
instance (impl ~ (IO (T.Text))) => Op (ClassName ()) Image orig impl where
runOp _ _ copy_surface = withRef copy_surface $ \copy_surfacePtr -> className' copy_surfacePtr
setCurrent' :: (Ptr ()) -> IO ()
setCurrent' a1 =
let {a1' = id a1} in
setCurrent''_ a1' >>
return ()
{-# LINE 37 "src/Graphics/UI/FLTK/LowLevel/CopySurface.chs" #-}
instance (impl ~ ( IO ())) => Op (SetCurrent ()) CopySurface orig impl where
runOp _ _ copy_surface = withRef copy_surface $ \copy_surfacePtr -> setCurrent' copy_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 ()
{-# LINE 41 "src/Graphics/UI/FLTK/LowLevel/CopySurface.chs" #-}
instance (Parent a Widget, impl ~ ( Ref a -> Position -> IO ())) => Op (Draw ()) CopySurface orig impl where
runOp _ _ copy_surface widget (Position (X delta_x) (Y delta_y)) = withRef copy_surface $ \copy_surfacePtr -> withRef widget $ \widgetPtr -> draw' copy_surfacePtr widgetPtr delta_x delta_y
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/CopySurface.chs.h Fl_Copy_Surface_New"
copySurfaceNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/CopySurface.chs.h Fl_Copy_Surface_Destroy"
copySurfaceDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/CopySurface.chs.h Fl_Copy_Surface_class_name"
className''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/CopySurface.chs.h Fl_Copy_Surface_set_current"
setCurrent''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/CopySurface.chs.h Fl_Copy_Surface_draw"
draw''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ())))))