    -- GENERATED by C->Haskell Compiler, version 0.28.8 Switcheroo, 25 November 2017 (Haskell)
    -- Edit the ORIGNAL .chs file instead!

    {-# LINE 1 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module      :  GI.Cairo.Render.Internal.Drawing.Cairo
    -- Copyright   :  (c) Paolo Martini 2005
    -- License     :  BSD-style (see cairo/COPYRIGHT)
    --
    -- Maintainer  :  p.martini@neuralnoise.com
    -- Stability   :  experimental
    -- Portability :  portable
    --
    -- The cairo drawing context functions.
    -----------------------------------------------------------------------------

    module GI.Cairo.Render.Internal.Drawing.Cairo where
    import qualified Foreign.C.Types as C2HSImp
    import qualified Foreign.Ptr as C2HSImp

    import GI.Cairo.Render.Types
    {-# LINE 18 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    import Data.GI.Base(wrapBoxed, withManagedPtr)
    import Foreign
    import Foreign.C

    {-# LINE 24 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    create :: (Surface) -> IO ((CairoPtr))
    create :: Surface -> IO CairoPtr
    create Surface
    a1 =
      Surface -> (Ptr Surface -> IO CairoPtr) -> IO CairoPtr
    forall {b}. Surface -> (Ptr Surface -> IO b) -> IO b
    withSurface Surface
    a1 ((Ptr Surface -> IO CairoPtr) -> IO CairoPtr)
    -> (Ptr Surface -> IO CairoPtr) -> IO CairoPtr
    forall a b. (a -> b) -> a -> b
    $ \Ptr Surface
    a1' ->
      Ptr Surface -> IO CairoPtr
    create'_ Ptr Surface
    a1' IO CairoPtr -> (CairoPtr -> IO CairoPtr) -> IO CairoPtr
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \CairoPtr
    res ->
      let {res' = id res} in
      () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (res')

    {-# LINE 26 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    save :: (Cairo) -> IO ()
    save a1 =
      withManagedPtr a1 $ \a1' ->
      save'_ a1' >>
      return ()

    {-# LINE 27 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    restore :: (Cairo) -> IO ()
    restore a1 =
      withManagedPtr a1 $ \a1' ->
      restore'_ a1' >>
      return ()

    {-# LINE 28 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    status :: (Cairo) -> IO ((Status))
    status a1 =
      withManagedPtr a1 $ \a1' ->
      status'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')

    {-# LINE 29 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getTarget :: (Cairo) -> IO ((Surface))
    getTarget a1 =
      withManagedPtr a1 $ \a1' ->
      getTarget'_ a1' >>= \res ->
      mkSurface res >>= \res' ->
      return (res')

    {-# LINE 30 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    pushGroup :: (Cairo) -> IO ()
    pushGroup a1 =
      withManagedPtr a1 $ \a1' ->
      pushGroup'_ a1' >>
      return ()

    {-# LINE 31 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    pushGroupWithContent :: (Cairo) -> (Content) -> IO ()
    pushGroupWithContent a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      pushGroupWithContent'_ a1' a2' >>
      return ()

    {-# LINE 32 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    popGroup :: (Cairo) -> IO ((Pattern))
    popGroup a1 =
      withManagedPtr a1 $ \a1' ->
      popGroup'_ a1' >>= \res ->
      let {res' = id res} in
      return (res')

    {-# LINE 33 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    popGroupToSource :: (Cairo) -> IO ()
    popGroupToSource a1 =
      withManagedPtr a1 $ \a1' ->
      popGroupToSource'_ a1' >>
      return ()

    {-# LINE 34 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setSourceRGB :: (Cairo) -> (Double) -> (Double) -> (Double) -> IO ()
    setSourceRGB a1 a2 a3 a4 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      setSourceRGB'_ a1' a2' a3' a4' >>
      return ()

    {-# LINE 35 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setSourceRGBA :: (Cairo) -> (Double) -> (Double) -> (Double) -> (Double) -> IO ()
    setSourceRGBA a1 a2 a3 a4 a5 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      let {a5' = realToFrac a5} in
      setSourceRGBA'_ a1' a2' a3' a4' a5' >>
      return ()

    {-# LINE 36 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setSource :: (Cairo) -> (Pattern) -> IO ()
    setSource a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = id a2} in
      setSource'_ a1' a2' >>
      return ()

    {-# LINE 37 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setSourceSurface :: (Cairo) -> (Surface) -> (Double) -> (Double) -> IO ()
    setSourceSurface a1 a2 a3 a4 =
      withManagedPtr a1 $ \a1' ->
      withSurface a2 $ \a2' ->
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      setSourceSurface'_ a1' a2' a3' a4' >>
      return ()

    {-# LINE 38 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getSource :: (Cairo) -> IO ((Pattern))
    getSource a1 =
      withManagedPtr a1 $ \a1' ->
      getSource'_ a1' >>= \res ->
      let {res' = id res} in
      return (res')

    {-# LINE 39 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setAntialias :: (Cairo) -> (Antialias) -> IO ()
    setAntialias a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      setAntialias'_ a1' a2' >>
      return ()

    {-# LINE 40 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getAntialias :: (Cairo) -> IO ((Antialias))
    getAntialias a1 =
      withManagedPtr a1 $ \a1' ->
      getAntialias'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')

    {-# LINE 41 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setDash context xs offset =
      withManagedPtr context $ \ctxt ->
        withArrayLen (map (cFloatConv) xs) $ \len ptr ->
          cairo_set_dash ctxt ptr (cIntConv len) (cFloatConv offset)
    setFillRule :: (Cairo) -> (FillRule) -> IO ()
    setFillRule a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      setFillRule'_ a1' a2' >>
      return ()

    {-# LINE 46 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getFillRule :: (Cairo) -> IO ((FillRule))
    getFillRule a1 =
      withManagedPtr a1 $ \a1' ->
      getFillRule'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')

    {-# LINE 47 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setLineCap :: (Cairo) -> (LineCap) -> IO ()
    setLineCap a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      setLineCap'_ a1' a2' >>
      return ()

    {-# LINE 48 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getLineCap :: (Cairo) -> IO ((LineCap))
    getLineCap a1 =
      withManagedPtr a1 $ \a1' ->
      getLineCap'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')

    {-# LINE 49 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setLineJoin :: (Cairo) -> (LineJoin) -> IO ()
    setLineJoin a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      setLineJoin'_ a1' a2' >>
      return ()

    {-# LINE 50 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getLineJoin :: (Cairo) -> IO ((LineJoin))
    getLineJoin a1 =
      withManagedPtr a1 $ \a1' ->
      getLineJoin'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')

    {-# LINE 51 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setLineWidth :: (Cairo) -> (Double) -> IO ()
    setLineWidth a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      setLineWidth'_ a1' a2' >>
      return ()

    {-# LINE 52 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getLineWidth :: (Cairo) -> IO ((Double))
    getLineWidth a1 =
      withManagedPtr a1 $ \a1' ->
      getLineWidth'_ a1' >>= \res ->
      let {res' = realToFrac res} in
      return (res')

    {-# LINE 53 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setMiterLimit :: (Cairo) -> (Double) -> IO ()
    setMiterLimit a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      setMiterLimit'_ a1' a2' >>
      return ()

    {-# LINE 54 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getMiterLimit :: (Cairo) -> IO ((Double))
    getMiterLimit a1 =
      withManagedPtr a1 $ \a1' ->
      getMiterLimit'_ a1' >>= \res ->
      let {res' = realToFrac res} in
      return (res')

    {-# LINE 55 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setOperator :: (Cairo) -> (Operator) -> IO ()
    setOperator a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      setOperator'_ a1' a2' >>
      return ()

    {-# LINE 56 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getOperator :: (Cairo) -> IO ((Operator))
    getOperator a1 =
      withManagedPtr a1 $ \a1' ->
      getOperator'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')

    {-# LINE 57 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    setTolerance :: (Cairo) -> (Double) -> IO ()
    setTolerance a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      setTolerance'_ a1' a2' >>
      return ()

    {-# LINE 58 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    getTolerance :: (Cairo) -> IO ((Double))
    getTolerance a1 =
      withManagedPtr a1 $ \a1' ->
      getTolerance'_ a1' >>= \res ->
      let {res' = realToFrac res} in
      return (res')

    {-# LINE 59 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    clip :: (Cairo) -> IO ()
    clip a1 =
      withManagedPtr a1 $ \a1' ->
      clip'_ a1' >>
      return ()

    {-# LINE 60 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    clipPreserve :: (Cairo) -> IO ()
    clipPreserve a1 =
      withManagedPtr a1 $ \a1' ->
      clipPreserve'_ a1' >>
      return ()

    {-# LINE 61 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    resetClip :: (Cairo) -> IO ()
    resetClip a1 =
      withManagedPtr a1 $ \a1' ->
      resetClip'_ a1' >>
      return ()

    {-# LINE 62 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    clipExtents :: (Cairo) -> IO ((Double), (Double), (Double), (Double))
    clipExtents a1 =
      withManagedPtr a1 $ \a1' ->
      alloca $ \a2' ->
      alloca $ \a3' ->
      alloca $ \a4' ->
      alloca $ \a5' ->
      clipExtents'_ a1' a2' a3' a4' a5' >>
      peekFloatConv  a2'>>= \a2'' ->
      peekFloatConv  a3'>>= \a3'' ->
      peekFloatConv  a4'>>= \a4'' ->
      peekFloatConv  a5'>>= \a5'' ->
      return (a2'', a3'', a4'', a5'')

    {-# LINE 63 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    fill :: (Cairo) -> IO ()
    fill a1 =
      withManagedPtr a1 $ \a1' ->
      fill'_ a1' >>
      return ()

    {-# LINE 64 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    fillPreserve :: (Cairo) -> IO ()
    fillPreserve a1 =
      withManagedPtr a1 $ \a1' ->
      fillPreserve'_ a1' >>
      return ()

    {-# LINE 65 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    fillExtents :: (Cairo) -> IO ((Double), (Double), (Double), (Double))
    fillExtents a1 =
      withManagedPtr a1 $ \a1' ->
      alloca $ \a2' ->
      alloca $ \a3' ->
      alloca $ \a4' ->
      alloca $ \a5' ->
      fillExtents'_ a1' a2' a3' a4' a5' >>
      peekFloatConv  a2'>>= \a2'' ->
      peekFloatConv  a3'>>= \a3'' ->
      peekFloatConv  a4'>>= \a4'' ->
      peekFloatConv  a5'>>= \a5'' ->
      return (a2'', a3'', a4'', a5'')

    {-# LINE 66 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    inFill :: (Cairo) -> (Double) -> (Double) -> IO ((Bool))
    inFill a1 a2 a3 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      inFill'_ a1' a2' a3' >>= \res ->
      let {res' = cToBool res} in
      return (res')

    {-# LINE 67 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    mask :: (Cairo) -> (Pattern) -> IO ()
    mask a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = id a2} in
      mask'_ a1' a2' >>
      return ()

    {-# LINE 68 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    maskSurface :: (Cairo) -> (Surface) -> (Double) -> (Double) -> IO ()
    maskSurface a1 a2 a3 a4 =
      withManagedPtr a1 $ \a1' ->
      withSurface a2 $ \a2' ->
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      maskSurface'_ a1' a2' a3' a4' >>
      return ()

    {-# LINE 69 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    paint :: (Cairo) -> IO ()
    paint a1 =
      withManagedPtr a1 $ \a1' ->
      paint'_ a1' >>
      return ()

    {-# LINE 70 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    paintWithAlpha :: (Cairo) -> (Double) -> IO ()
    paintWithAlpha a1 a2 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      paintWithAlpha'_ a1' a2' >>
      return ()

    {-# LINE 71 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    stroke :: (Cairo) -> IO ()
    stroke a1 =
      withManagedPtr a1 $ \a1' ->
      stroke'_ a1' >>
      return ()

    {-# LINE 72 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    strokePreserve :: (Cairo) -> IO ()
    strokePreserve a1 =
      withManagedPtr a1 $ \a1' ->
      strokePreserve'_ a1' >>
      return ()

    {-# LINE 73 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    strokeExtents :: (Cairo) -> IO ((Double), (Double), (Double), (Double))
    strokeExtents a1 =
      withManagedPtr a1 $ \a1' ->
      alloca $ \a2' ->
      alloca $ \a3' ->
      alloca $ \a4' ->
      alloca $ \a5' ->
      strokeExtents'_ a1' a2' a3' a4' a5' >>
      peekFloatConv  a2'>>= \a2'' ->
      peekFloatConv  a3'>>= \a3'' ->
      peekFloatConv  a4'>>= \a4'' ->
      peekFloatConv  a5'>>= \a5'' ->
      return (a2'', a3'', a4'', a5'')

    {-# LINE 74 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    inStroke :: (Cairo) -> (Double) -> (Double) -> IO ((Bool))
    inStroke a1 a2 a3 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      inStroke'_ a1' a2' a3' >>= \res ->
      let {res' = cToBool res} in
      return (res')

    {-# LINE 75 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    copyPage :: (Cairo) -> IO ()
    copyPage a1 =
      withManagedPtr a1 $ \a1' ->
      copyPage'_ a1' >>
      return ()

    {-# LINE 76 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    showPage :: (Cairo) -> IO ()
    showPage a1 =
      withManagedPtr a1 $ \a1' ->
      showPage'_ a1' >>
      return ()

    {-# LINE 77 "./GI/Cairo/Render/Internal/Drawing/Cairo.chs" #-}

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_create"
      create'_ :: ((SurfacePtr) -> (IO (CairoPtr)))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_save"
      save'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_restore"
      restore'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_status"
      status'_ :: ((CairoPtr) -> (IO C2HSImp.CInt))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_target"
      getTarget'_ :: ((CairoPtr) -> (IO (SurfacePtr)))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_push_group"
      pushGroup'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_push_group_with_content"
      pushGroupWithContent'_ :: ((CairoPtr) -> (C2HSImp.CInt -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_pop_group"
      popGroup'_ :: ((CairoPtr) -> (IO (Pattern)))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_pop_group_to_source"
      popGroupToSource'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_source_rgb"
      setSourceRGB'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ())))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_source_rgba"
      setSourceRGBA'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_source"
      setSource'_ :: ((CairoPtr) -> ((Pattern) -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_source_surface"
      setSourceSurface'_ :: ((CairoPtr) -> ((SurfacePtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ())))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_source"
      getSource'_ :: ((CairoPtr) -> (IO (Pattern)))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_antialias"
      setAntialias'_ :: ((CairoPtr) -> (C2HSImp.CInt -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_antialias"
      getAntialias'_ :: ((CairoPtr) -> (IO C2HSImp.CInt))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_dash"
      cairo_set_dash :: ((CairoPtr) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (C2HSImp.CInt -> (C2HSImp.CDouble -> (IO ())))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_fill_rule"
      setFillRule'_ :: ((CairoPtr) -> (C2HSImp.CInt -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_fill_rule"
      getFillRule'_ :: ((CairoPtr) -> (IO C2HSImp.CInt))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_line_cap"
      setLineCap'_ :: ((CairoPtr) -> (C2HSImp.CInt -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_line_cap"
      getLineCap'_ :: ((CairoPtr) -> (IO C2HSImp.CInt))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_line_join"
      setLineJoin'_ :: ((CairoPtr) -> (C2HSImp.CInt -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_line_join"
      getLineJoin'_ :: ((CairoPtr) -> (IO C2HSImp.CInt))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_line_width"
      setLineWidth'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_line_width"
      getLineWidth'_ :: ((CairoPtr) -> (IO C2HSImp.CDouble))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_miter_limit"
      setMiterLimit'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_miter_limit"
      getMiterLimit'_ :: ((CairoPtr) -> (IO C2HSImp.CDouble))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_operator"
      setOperator'_ :: ((CairoPtr) -> (C2HSImp.CInt -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_operator"
      getOperator'_ :: ((CairoPtr) -> (IO C2HSImp.CInt))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_set_tolerance"
      setTolerance'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_get_tolerance"
      getTolerance'_ :: ((CairoPtr) -> (IO C2HSImp.CDouble))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_clip"
      clip'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_clip_preserve"
      clipPreserve'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_reset_clip"
      resetClip'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_clip_extents"
      clipExtents'_ :: ((CairoPtr) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (IO ()))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_fill"
      fill'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_fill_preserve"
      fillPreserve'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_fill_extents"
      fillExtents'_ :: ((CairoPtr) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (IO ()))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_in_fill"
      inFill'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO C2HSImp.CInt))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_mask"
      mask'_ :: ((CairoPtr) -> ((Pattern) -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_mask_surface"
      maskSurface'_ :: ((CairoPtr) -> ((SurfacePtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ())))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_paint"
      paint'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_paint_with_alpha"
      paintWithAlpha'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_stroke"
      stroke'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_stroke_preserve"
      strokePreserve'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_stroke_extents"
      strokeExtents'_ :: ((CairoPtr) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (IO ()))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_in_stroke"
      inStroke'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO C2HSImp.CInt))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_copy_page"
      copyPage'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Cairo.chs.h cairo_show_page"
      showPage'_ :: ((CairoPtr) -> (IO ()))