-- GENERATED by C->Haskell Compiler, version 0.13.13 (gtk2hs branch) "Bin IO", 27 May 2012 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  Graphics.Rendering.Cairo.Internal.Surfaces.Surface
-- Copyright   :  (c) Paolo Martini 2005
-- License     :  BSD-style (see doc/COPYRIGHT)
--
-- Maintainer  :  p.martini@neuralnoise.com
-- Stability   :  experimental
-- Portability :  portable
--
-- Base class for surfaces.
-----------------------------------------------------------------------------

module Graphics.Rendering.Cairo.Internal.Surfaces.Surface where

import Graphics.Rendering.Cairo.Types
{-# LINE 16 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}

import Foreign
import Foreign.C


{-# LINE 21 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}

surfaceCreateSimilar :: Surface -> Content -> Int -> Int -> IO (Surface)
surfaceCreateSimilar a1 a2 a3 a4 =
  withSurface a1 $ \a1' -> 
  let {a2' = cFromEnum a2} in 
  let {a3' = cIntConv a3} in 
  let {a4' = cIntConv a4} in 
  surfaceCreateSimilar'_ a1' a2' a3' a4' >>= \res ->
  mkSurface res >>= \res' ->
  return (res')
{-# LINE 23 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceDestroy :: Surface -> IO ()
surfaceDestroy a1 =
  withSurface a1 $ \a1' -> 
  surfaceDestroy'_ a1' >>= \res ->
  return ()
{-# LINE 24 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceFinish :: Surface -> IO ()
surfaceFinish a1 =
  withSurface a1 $ \a1' -> 
  surfaceFinish'_ a1' >>= \res ->
  return ()
{-# LINE 25 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceFlush :: Surface -> IO ()
surfaceFlush a1 =
  withSurface a1 $ \a1' -> 
  surfaceFlush'_ a1' >>= \res ->
  return ()
{-# LINE 26 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceGetFontOptions :: Surface -> FontOptions -> IO ()
surfaceGetFontOptions a1 a2 =
  withSurface a1 $ \a1' -> 
  withFontOptions a2 $ \a2' -> 
  surfaceGetFontOptions'_ a1' a2' >>= \res ->
  return ()
{-# LINE 27 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceGetContent :: Surface -> IO (Content)
surfaceGetContent a1 =
  withSurface a1 $ \a1' -> 
  surfaceGetContent'_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')
{-# LINE 28 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceMarkDirty :: Surface -> IO ()
surfaceMarkDirty a1 =
  withSurface a1 $ \a1' -> 
  surfaceMarkDirty'_ a1' >>= \res ->
  return ()
{-# LINE 29 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceMarkDirtyRectangle :: Surface -> Int -> Int -> Int -> Int -> IO ()
surfaceMarkDirtyRectangle a1 a2 a3 a4 a5 =
  withSurface a1 $ \a1' -> 
  let {a2' = cIntConv a2} in 
  let {a3' = cIntConv a3} in 
  let {a4' = cIntConv a4} in 
  let {a5' = cIntConv a5} in 
  surfaceMarkDirtyRectangle'_ a1' a2' a3' a4' a5' >>= \res ->
  return ()
{-# LINE 30 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceReference :: Surface -> IO ()
surfaceReference a1 =
  withSurface a1 $ \a1' -> 
  surfaceReference'_ a1' >>= \res ->
  return ()
{-# LINE 31 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceSetDeviceOffset :: Surface -> Double -> Double -> IO ()
surfaceSetDeviceOffset a1 a2 a3 =
  withSurface a1 $ \a1' -> 
  let {a2' = cFloatConv a2} in 
  let {a3' = cFloatConv a3} in 
  surfaceSetDeviceOffset'_ a1' a2' a3' >>= \res ->
  return ()
{-# LINE 32 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}
surfaceStatus :: Surface -> IO (Status)
surfaceStatus a1 =
  withSurface a1 $ \a1' -> 
  surfaceStatus'_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')
{-# LINE 33 "./Graphics/Rendering/Cairo/Internal/Surfaces/Surface.chs" #-}

foreign import ccall safe "cairo_surface_create_similar"
  surfaceCreateSimilar'_ :: ((Ptr Surface) -> (CInt -> (CInt -> (CInt -> (IO (Ptr Surface))))))

foreign import ccall safe "cairo_surface_destroy"
  surfaceDestroy'_ :: ((Ptr Surface) -> (IO ()))

foreign import ccall safe "cairo_surface_finish"
  surfaceFinish'_ :: ((Ptr Surface) -> (IO ()))

foreign import ccall safe "cairo_surface_flush"
  surfaceFlush'_ :: ((Ptr Surface) -> (IO ()))

foreign import ccall safe "cairo_surface_get_font_options"
  surfaceGetFontOptions'_ :: ((Ptr Surface) -> ((Ptr FontOptions) -> (IO ())))

foreign import ccall safe "cairo_surface_get_content"
  surfaceGetContent'_ :: ((Ptr Surface) -> (IO CInt))

foreign import ccall safe "cairo_surface_mark_dirty"
  surfaceMarkDirty'_ :: ((Ptr Surface) -> (IO ()))

foreign import ccall safe "cairo_surface_mark_dirty_rectangle"
  surfaceMarkDirtyRectangle'_ :: ((Ptr Surface) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))

foreign import ccall safe "cairo_surface_reference"
  surfaceReference'_ :: ((Ptr Surface) -> (IO (Ptr Surface)))

foreign import ccall safe "cairo_surface_set_device_offset"
  surfaceSetDeviceOffset'_ :: ((Ptr Surface) -> (CDouble -> (CDouble -> (IO ()))))

foreign import ccall safe "cairo_surface_status"
  surfaceStatus'_ :: ((Ptr Surface) -> (IO CInt))