-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Cogl.Functions
    ( 

 -- * Methods


-- ** beginGl #method:beginGl#

    beginGl                                 ,


-- ** checkExtension #method:checkExtension#

    checkExtension                          ,


-- ** clear' #method:clear'#

    clear'                                  ,


-- ** clipEnsure #method:clipEnsure#

    clipEnsure                              ,


-- ** clipPop #method:clipPop#

    clipPop                                 ,


-- ** clipPush #method:clipPush#

    clipPush                                ,


-- ** clipPushRectangle #method:clipPushRectangle#

    clipPushRectangle                       ,


-- ** clipPushWindowRect #method:clipPushWindowRect#

    clipPushWindowRect                      ,


-- ** clipPushWindowRectangle #method:clipPushWindowRectangle#

    clipPushWindowRectangle                 ,


-- ** clipStackRestore #method:clipStackRestore#

    clipStackRestore                        ,


-- ** clipStackSave #method:clipStackSave#

    clipStackSave                           ,


-- ** clutterCheckExtensionCLUTTER #method:clutterCheckExtensionCLUTTER#

    clutterCheckExtensionCLUTTER            ,


-- ** clutterWinsysHasFeatureCLUTTER #method:clutterWinsysHasFeatureCLUTTER#

    clutterWinsysHasFeatureCLUTTER          ,


-- ** createProgram #method:createProgram#

    createProgram                           ,


-- ** createShader #method:createShader#

    createShader                            ,


-- ** debugMatrixPrint #method:debugMatrixPrint#

    debugMatrixPrint                        ,


-- ** disableFog #method:disableFog#

    disableFog                              ,


-- ** doubleToInt #method:doubleToInt#

    doubleToInt                             ,


-- ** doubleToUint #method:doubleToUint#

    doubleToUint                            ,


-- ** endGl #method:endGl#

    endGl                                   ,


-- ** featuresAvailable #method:featuresAvailable#

    featuresAvailable                       ,


-- ** flush #method:flush#

    flush                                   ,


-- ** frustum #method:frustum#

    frustum                                 ,


-- ** getBackfaceCullingEnabled #method:getBackfaceCullingEnabled#

    getBackfaceCullingEnabled               ,


-- ** getBitmasks #method:getBitmasks#

    getBitmasks                             ,


-- ** getDepthTestEnabled #method:getDepthTestEnabled#

    getDepthTestEnabled                     ,


-- ** getFeatures #method:getFeatures#

    getFeatures                             ,


-- ** getModelviewMatrix #method:getModelviewMatrix#

    getModelviewMatrix                      ,


-- ** getOptionGroup #method:getOptionGroup#

    getOptionGroup                          ,


-- ** getProjectionMatrix #method:getProjectionMatrix#

    getProjectionMatrix                     ,


-- ** getSource #method:getSource#

    getSource                               ,


-- ** getViewport #method:getViewport#

    getViewport                             ,


-- ** gtypeMatrixGetType #method:gtypeMatrixGetType#

    gtypeMatrixGetType                      ,


-- ** handleGetType #method:handleGetType#

    handleGetType                           ,


-- ** handleRef #method:handleRef#

    handleRef                               ,


-- ** handleUnref #method:handleUnref#

    handleUnref                             ,


-- ** isBitmap #method:isBitmap#

    isBitmap                                ,


-- ** isMaterial #method:isMaterial#

    isMaterial                              ,


-- ** isOffscreen #method:isOffscreen#

    isOffscreen                             ,


-- ** isProgram #method:isProgram#

    isProgram                               ,


-- ** isShader #method:isShader#

    isShader                                ,


-- ** isTexture #method:isTexture#

    isTexture                               ,


-- ** isVertexBuffer #method:isVertexBuffer#

    isVertexBuffer                          ,


-- ** isVertexBufferIndices #method:isVertexBufferIndices#

    isVertexBufferIndices                   ,


-- ** onscreenClutterBackendSetSizeCLUTTER #method:onscreenClutterBackendSetSizeCLUTTER#

    onscreenClutterBackendSetSizeCLUTTER    ,


-- ** ortho #method:ortho#

    ortho                                   ,


-- ** perspective #method:perspective#

    perspective                             ,


-- ** polygon #method:polygon#

    polygon                                 ,


-- ** popDrawBuffer #method:popDrawBuffer#

    popDrawBuffer                           ,


-- ** popFramebuffer #method:popFramebuffer#

    popFramebuffer                          ,


-- ** popMatrix #method:popMatrix#

    popMatrix                               ,


-- ** popSource #method:popSource#

    popSource                               ,


-- ** programAttachShader #method:programAttachShader#

    programAttachShader                     ,


-- ** programGetUniformLocation #method:programGetUniformLocation#

    programGetUniformLocation               ,


-- ** programLink #method:programLink#

    programLink                             ,


-- ** programRef #method:programRef#

    programRef                              ,


-- ** programSetUniform1f #method:programSetUniform1f#

    programSetUniform1f                     ,


-- ** programSetUniform1i #method:programSetUniform1i#

    programSetUniform1i                     ,


-- ** programSetUniformFloat #method:programSetUniformFloat#

    programSetUniformFloat                  ,


-- ** programSetUniformInt #method:programSetUniformInt#

    programSetUniformInt                    ,


-- ** programSetUniformMatrix #method:programSetUniformMatrix#

    programSetUniformMatrix                 ,


-- ** programUniform1f #method:programUniform1f#

    programUniform1f                        ,


-- ** programUniform1i #method:programUniform1i#

    programUniform1i                        ,


-- ** programUniformFloat #method:programUniformFloat#

    programUniformFloat                     ,


-- ** programUniformInt #method:programUniformInt#

    programUniformInt                       ,


-- ** programUniformMatrix #method:programUniformMatrix#

    programUniformMatrix                    ,


-- ** programUnref #method:programUnref#

    programUnref                            ,


-- ** programUse #method:programUse#

    programUse                              ,


-- ** pushDrawBuffer #method:pushDrawBuffer#

    pushDrawBuffer                          ,


-- ** pushMatrix #method:pushMatrix#

    pushMatrix                              ,


-- ** pushSource #method:pushSource#

    pushSource                              ,


-- ** readPixels #method:readPixels#

    readPixels                              ,


-- ** rectangle #method:rectangle#

    rectangle                               ,


-- ** rectangleWithMultitextureCoords #method:rectangleWithMultitextureCoords#

    rectangleWithMultitextureCoords         ,


-- ** rectangleWithTextureCoords #method:rectangleWithTextureCoords#

    rectangleWithTextureCoords              ,


-- ** rectangles #method:rectangles#

    rectangles                              ,


-- ** rectanglesWithTextureCoords #method:rectanglesWithTextureCoords#

    rectanglesWithTextureCoords             ,


-- ** rotate #method:rotate#

    rotate                                  ,


-- ** scale #method:scale#

    scale                                   ,


-- ** setBackfaceCullingEnabled #method:setBackfaceCullingEnabled#

    setBackfaceCullingEnabled               ,


-- ** setDepthTestEnabled #method:setDepthTestEnabled#

    setDepthTestEnabled                     ,


-- ** setDrawBuffer #method:setDrawBuffer#

    setDrawBuffer                           ,


-- ** setFog #method:setFog#

    setFog                                  ,


-- ** setModelviewMatrix #method:setModelviewMatrix#

    setModelviewMatrix                      ,


-- ** setProjectionMatrix #method:setProjectionMatrix#

    setProjectionMatrix                     ,


-- ** setSource #method:setSource#

    setSource                               ,


-- ** setSourceColor #method:setSourceColor#

    setSourceColor                          ,


-- ** setSourceColor4f #method:setSourceColor4f#

    setSourceColor4f                        ,


-- ** setSourceColor4ub #method:setSourceColor4ub#

    setSourceColor4ub                       ,


-- ** setSourceTexture #method:setSourceTexture#

    setSourceTexture                        ,


-- ** setViewport #method:setViewport#

    setViewport                             ,


-- ** shaderCompile #method:shaderCompile#

    shaderCompile                           ,


-- ** shaderGetInfoLog #method:shaderGetInfoLog#

    shaderGetInfoLog                        ,


-- ** shaderGetType #method:shaderGetType#

    shaderGetType                           ,


-- ** shaderIsCompiled #method:shaderIsCompiled#

    shaderIsCompiled                        ,


-- ** shaderRef #method:shaderRef#

    shaderRef                               ,


-- ** shaderSource #method:shaderSource#

    shaderSource                            ,


-- ** shaderUnref #method:shaderUnref#

    shaderUnref                             ,


-- ** sqrti #method:sqrti#

    sqrti                                   ,


-- ** transform #method:transform#

    transform                               ,


-- ** translate #method:translate#

    translate                               ,


-- ** vertexBufferAdd #method:vertexBufferAdd#

    vertexBufferAdd                         ,


-- ** vertexBufferDelete #method:vertexBufferDelete#

    vertexBufferDelete                      ,


-- ** vertexBufferDisable #method:vertexBufferDisable#

    vertexBufferDisable                     ,


-- ** vertexBufferDraw #method:vertexBufferDraw#

    vertexBufferDraw                        ,


-- ** vertexBufferDrawElements #method:vertexBufferDrawElements#

    vertexBufferDrawElements                ,


-- ** vertexBufferEnable #method:vertexBufferEnable#

    vertexBufferEnable                      ,


-- ** vertexBufferGetNVertices #method:vertexBufferGetNVertices#

    vertexBufferGetNVertices                ,


-- ** vertexBufferIndicesGetForQuads #method:vertexBufferIndicesGetForQuads#

    vertexBufferIndicesGetForQuads          ,


-- ** vertexBufferIndicesGetType #method:vertexBufferIndicesGetType#

    vertexBufferIndicesGetType              ,


-- ** vertexBufferNew #method:vertexBufferNew#

    vertexBufferNew                         ,


-- ** vertexBufferRef #method:vertexBufferRef#

    vertexBufferRef                         ,


-- ** vertexBufferSubmit #method:vertexBufferSubmit#

    vertexBufferSubmit                      ,


-- ** vertexBufferUnref #method:vertexBufferUnref#

    vertexBufferUnref                       ,


-- ** viewport #method:viewport#

    viewport                                ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import {-# SOURCE #-} qualified GI.Cogl.Enums as Cogl.Enums
import {-# SOURCE #-} qualified GI.Cogl.Flags as Cogl.Flags
import {-# SOURCE #-} qualified GI.Cogl.Interfaces.Texture as Cogl.Texture
import {-# SOURCE #-} qualified GI.Cogl.Structs.Color as Cogl.Color
import {-# SOURCE #-} qualified GI.Cogl.Structs.Matrix as Cogl.Matrix
import {-# SOURCE #-} qualified GI.Cogl.Structs.TextureVertex as Cogl.TextureVertex
import qualified GI.GLib.Structs.OptionGroup as GLib.OptionGroup

-- function viewport
-- Args: [ Arg
--           { argCName = "width"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Width of the viewport"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Height of the viewport"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_viewport" cogl_viewport :: 
    Word32 ->                               -- width : TBasicType TUInt
    Word32 ->                               -- height : TBasicType TUInt
    IO ()

{-# DEPRECATED viewport ["(Since version 1.8)","Use cogl_framebuffer_set_viewport instead"] #-}
-- | Replace the current viewport with the given values.
-- 
-- /Since: 0.8.2/
viewport ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -- ^ /@width@/: Width of the viewport
    -> Word32
    -- ^ /@height@/: Height of the viewport
    -> m ()
viewport :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word32 -> Word32 -> m ()
viewport Word32
width Word32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Word32 -> Word32 -> IO ()
cogl_viewport Word32
width Word32
height
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_unref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a @CoglHandle." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_unref" cogl_vertex_buffer_unref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED vertexBufferUnref ["(Since version 1.2)","Use @/cogl_object_unref()/@ instead"] #-}
-- | Decrement the reference count for a vertex buffer
vertexBufferUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a /@coglHandle@/.
    -> m ()
vertexBufferUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
vertexBufferUnref Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_vertex_buffer_unref Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_submit
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_submit" cogl_vertex_buffer_submit :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED vertexBufferSubmit ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Submits all the user added attributes to the GPU; once submitted, the
-- attributes can be used for drawing.
-- 
-- You should aim to minimize calls to this function since it implies
-- validating your data; it potentially incurs a transport cost (especially if
-- you are using GLX indirect rendering) and potentially a format conversion
-- cost if the GPU doesn\'t natively support any of the given attribute formats.
vertexBufferSubmit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> m ()
vertexBufferSubmit :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
vertexBufferSubmit Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_vertex_buffer_submit Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_ref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a @CoglHandle." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_ref" cogl_vertex_buffer_ref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO (Ptr ())

{-# DEPRECATED vertexBufferRef ["(Since version 1.2)","Use @/cogl_object_ref()/@ instead"] #-}
-- | Increment the reference count for a vertex buffer
vertexBufferRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a /@coglHandle@/.
    -> m (Ptr ())
    -- ^ __Returns:__ the /@handle@/.
vertexBufferRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m (Ptr ())
vertexBufferRef Ptr ()
handle = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- Ptr () -> IO (Ptr ())
cogl_vertex_buffer_ref Ptr ()
handle
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function vertex_buffer_new
-- Args: [ Arg
--           { argCName = "n_vertices"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The number of vertices that your attributes will correspond to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_new" cogl_vertex_buffer_new :: 
    Word32 ->                               -- n_vertices : TBasicType TUInt
    IO (Ptr ())

{-# DEPRECATED vertexBufferNew ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Creates a new vertex buffer that you can use to add attributes.
vertexBufferNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -- ^ /@nVertices@/: The number of vertices that your attributes will correspond to.
    -> m (Ptr ())
    -- ^ __Returns:__ a new @/CoglHandle/@
vertexBufferNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word32 -> m (Ptr ())
vertexBufferNew Word32
nVertices = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- Word32 -> IO (Ptr ())
cogl_vertex_buffer_new Word32
nVertices
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function vertex_buffer_indices_get_type
-- Args: [ Arg
--           { argCName = "indices"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An indices handle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Cogl" , name = "IndicesType" })
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_indices_get_type" cogl_vertex_buffer_indices_get_type :: 
    Ptr () ->                               -- indices : TBasicType TPtr
    IO CUInt

{-# DEPRECATED vertexBufferIndicesGetType ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Queries back the data type used for the given indices
vertexBufferIndicesGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@indices@/: An indices handle
    -> m Cogl.Enums.IndicesType
    -- ^ __Returns:__ The CoglIndicesType used
vertexBufferIndicesGetType :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m IndicesType
vertexBufferIndicesGetType Ptr ()
indices = IO IndicesType -> m IndicesType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IndicesType -> m IndicesType)
-> IO IndicesType -> m IndicesType
forall a b. (a -> b) -> a -> b
$ do
    CUInt
result <- Ptr () -> IO CUInt
cogl_vertex_buffer_indices_get_type Ptr ()
indices
    let result' :: IndicesType
result' = (Int -> IndicesType
forall a. Enum a => Int -> a
toEnum (Int -> IndicesType) -> (CUInt -> Int) -> CUInt -> IndicesType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    IndicesType -> IO IndicesType
forall (m :: * -> *) a. Monad m => a -> m a
return IndicesType
result'


-- function vertex_buffer_indices_get_for_quads
-- Args: [ Arg
--           { argCName = "n_indices"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the number of indices in the vertex buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_indices_get_for_quads" cogl_vertex_buffer_indices_get_for_quads :: 
    Word32 ->                               -- n_indices : TBasicType TUInt
    IO (Ptr ())

{-# DEPRECATED vertexBufferIndicesGetForQuads ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Creates a vertex buffer containing the indices needed to draw pairs
-- of triangles from a list of vertices grouped as quads. There will
-- be at least /@nIndices@/ entries in the buffer (but there may be
-- more).
-- 
-- The indices will follow this pattern:
-- 
-- 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7 ... etc
-- 
-- For example, if you submit vertices for a quad like like that shown
-- in \<xref linkend=\"quad-indices-order\"\/> then you can request 6
-- indices to render two triangles like those shown in \<xref
-- linkend=\"quad-indices-triangles\"\/>.
-- 
-- \<figure id=\"quad-indices-order\">
--   \<title>Example of vertices submitted to form a quad\<\/title>
--   \<graphic fileref=\"quad-indices-order.png\" format=\"PNG\"\/>
-- \<\/figure>
-- 
-- \<figure id=\"quad-indices-triangles\">
--   \<title>Illustration of the triangle indices that will be generated\<\/title>
--   \<graphic fileref=\"quad-indices-triangles.png\" format=\"PNG\"\/>
-- \<\/figure>
vertexBufferIndicesGetForQuads ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    -- ^ /@nIndices@/: the number of indices in the vertex buffer.
    -> m (Ptr ())
    -- ^ __Returns:__ A @/CoglHandle/@ containing the indices. The handled is
    -- owned by Cogl and should not be modified or unref\'d.
vertexBufferIndicesGetForQuads :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word32 -> m (Ptr ())
vertexBufferIndicesGetForQuads Word32
nIndices = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- Word32 -> IO (Ptr ())
cogl_vertex_buffer_indices_get_for_quads Word32
nIndices
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function vertex_buffer_get_n_vertices
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_get_n_vertices" cogl_vertex_buffer_get_n_vertices :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Word32

{-# DEPRECATED vertexBufferGetNVertices ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Retrieves the number of vertices that /@handle@/ represents
vertexBufferGetNVertices ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> m Word32
    -- ^ __Returns:__ the number of vertices
vertexBufferGetNVertices :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Word32
vertexBufferGetNVertices Ptr ()
handle = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Word32
result <- Ptr () -> IO Word32
cogl_vertex_buffer_get_n_vertices Ptr ()
handle
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function vertex_buffer_enable
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attribute_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The name of the attribute you want to enable"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_enable" cogl_vertex_buffer_enable :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CString ->                              -- attribute_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED vertexBufferEnable ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Enables a previosuly disabled attribute.
-- 
-- Since it can be costly to add and remove new attributes to buffers; to make
-- individual buffers more reuseable it is possible to enable and disable
-- attributes before using a buffer for drawing.
-- 
-- You don\'t need to call 'GI.Cogl.Functions.vertexBufferSubmit' after using this function
vertexBufferEnable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> T.Text
    -- ^ /@attributeName@/: The name of the attribute you want to enable
    -> m ()
vertexBufferEnable :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Text -> m ()
vertexBufferEnable Ptr ()
handle Text
attributeName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
attributeName' <- Text -> IO CString
textToCString Text
attributeName
    Ptr () -> CString -> IO ()
cogl_vertex_buffer_enable Ptr ()
handle CString
attributeName'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attributeName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_draw_elements
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "VerticesMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A #CoglVerticesMode specifying how the vertices should be\n   interpreted."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "indices"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A CoglHandle for a set of indices allocated via\n   cogl_vertex_buffer_indices_new ()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "min_index"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Specifies the minimum vertex index contained in indices"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "max_index"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Specifies the maximum vertex index contained in indices"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "indices_offset"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "An offset into named indices. The offset marks the first\n   index to use for drawing."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Specifies the number of vertices you want to draw."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_draw_elements" cogl_vertex_buffer_draw_elements :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CUInt ->                                -- mode : TInterface (Name {namespace = "Cogl", name = "VerticesMode"})
    Ptr () ->                               -- indices : TBasicType TPtr
    Int32 ->                                -- min_index : TBasicType TInt
    Int32 ->                                -- max_index : TBasicType TInt
    Int32 ->                                -- indices_offset : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    IO ()

{-# DEPRECATED vertexBufferDrawElements ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | This function lets you use an array of indices to specify the vertices
-- within your vertex buffer that you want to draw. The indices themselves
-- are created by calling cogl_vertex_buffer_indices_new ()
-- 
-- Any un-submitted attribute changes are automatically submitted before
-- drawing.
vertexBufferDrawElements ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> Cogl.Enums.VerticesMode
    -- ^ /@mode@/: A t'GI.Cogl.Enums.VerticesMode' specifying how the vertices should be
    --    interpreted.
    -> Ptr ()
    -- ^ /@indices@/: A CoglHandle for a set of indices allocated via
    --    cogl_vertex_buffer_indices_new ()
    -> Int32
    -- ^ /@minIndex@/: Specifies the minimum vertex index contained in indices
    -> Int32
    -- ^ /@maxIndex@/: Specifies the maximum vertex index contained in indices
    -> Int32
    -- ^ /@indicesOffset@/: An offset into named indices. The offset marks the first
    --    index to use for drawing.
    -> Int32
    -- ^ /@count@/: Specifies the number of vertices you want to draw.
    -> m ()
vertexBufferDrawElements :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr ()
-> VerticesMode
-> Ptr ()
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
vertexBufferDrawElements Ptr ()
handle VerticesMode
mode Ptr ()
indices Int32
minIndex Int32
maxIndex Int32
indicesOffset Int32
count = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VerticesMode -> Int) -> VerticesMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VerticesMode -> Int
forall a. Enum a => a -> Int
fromEnum) VerticesMode
mode
    Ptr ()
-> CUInt -> Ptr () -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
cogl_vertex_buffer_draw_elements Ptr ()
handle CUInt
mode' Ptr ()
indices Int32
minIndex Int32
maxIndex Int32
indicesOffset Int32
count
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_draw
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "VerticesMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A #CoglVerticesMode specifying how the vertices should be\n  interpreted."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "first"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Specifies the index of the first vertex you want to draw with"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Specifies the number of vertices you want to draw."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_draw" cogl_vertex_buffer_draw :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CUInt ->                                -- mode : TInterface (Name {namespace = "Cogl", name = "VerticesMode"})
    Int32 ->                                -- first : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    IO ()

{-# DEPRECATED vertexBufferDraw ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Allows you to draw geometry using all or a subset of the
-- vertices in a vertex buffer.
-- 
-- Any un-submitted attribute changes are automatically submitted before
-- drawing.
vertexBufferDraw ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> Cogl.Enums.VerticesMode
    -- ^ /@mode@/: A t'GI.Cogl.Enums.VerticesMode' specifying how the vertices should be
    --   interpreted.
    -> Int32
    -- ^ /@first@/: Specifies the index of the first vertex you want to draw with
    -> Int32
    -- ^ /@count@/: Specifies the number of vertices you want to draw.
    -> m ()
vertexBufferDraw :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> VerticesMode -> Int32 -> Int32 -> m ()
vertexBufferDraw Ptr ()
handle VerticesMode
mode Int32
first Int32
count = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VerticesMode -> Int) -> VerticesMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VerticesMode -> Int
forall a. Enum a => a -> Int
fromEnum) VerticesMode
mode
    Ptr () -> CUInt -> Int32 -> Int32 -> IO ()
cogl_vertex_buffer_draw Ptr ()
handle CUInt
mode' Int32
first Int32
count
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_disable
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attribute_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The name of the attribute you want to disable"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_disable" cogl_vertex_buffer_disable :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CString ->                              -- attribute_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED vertexBufferDisable ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Disables a previosuly added attribute.
-- 
-- Since it can be costly to add and remove new attributes to buffers; to make
-- individual buffers more reuseable it is possible to enable and disable
-- attributes before using a buffer for drawing.
-- 
-- You don\'t need to call 'GI.Cogl.Functions.vertexBufferSubmit' after using this
-- function.
vertexBufferDisable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> T.Text
    -- ^ /@attributeName@/: The name of the attribute you want to disable
    -> m ()
vertexBufferDisable :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Text -> m ()
vertexBufferDisable Ptr ()
handle Text
attributeName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
attributeName' <- Text -> IO CString
textToCString Text
attributeName
    Ptr () -> CString -> IO ()
cogl_vertex_buffer_disable Ptr ()
handle CString
attributeName'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attributeName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_delete
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attribute_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The name of a previously added attribute"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_delete" cogl_vertex_buffer_delete :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CString ->                              -- attribute_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED vertexBufferDelete ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Deletes an attribute from a buffer. You will need to call
-- 'GI.Cogl.Functions.vertexBufferSubmit' or issue a draw call to commit this
-- change to the GPU.
vertexBufferDelete ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> T.Text
    -- ^ /@attributeName@/: The name of a previously added attribute
    -> m ()
vertexBufferDelete :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Text -> m ()
vertexBufferDelete Ptr ()
handle Text
attributeName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
attributeName' <- Text -> IO CString
textToCString Text
attributeName
    Ptr () -> CString -> IO ()
cogl_vertex_buffer_delete Ptr ()
handle CString
attributeName'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attributeName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function vertex_buffer_add
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A vertex buffer handle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attribute_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The name of your attribute. It should be a valid GLSL\n  variable name and standard attribute types must use one of following\n  built-in names: (Note: they correspond to the built-in names of GLSL)\n  <itemizedlist>\n    <listitem>\"gl_Color\"</listitem>\n    <listitem>\"gl_Normal\"</listitem>\n    <listitem>\"gl_MultiTexCoord0, gl_MultiTexCoord1, ...\"</listitem>\n    <listitem>\"gl_Vertex\"</listitem>\n  </itemizedlist>\n  To support adding multiple variations of the same attribute the name\n  can have a detail component, E.g. \"gl_Color::active\" or\n  \"gl_Color::inactive\""
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_components"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The number of components per attribute and must be 1, 2,\n  3 or 4"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "type"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "AttributeType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #CoglAttributeType specifying the data type of each component."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "normalized"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "If %TRUE, this specifies that values stored in an integer\n  format should be mapped into the range [-1.0, 1.0] or [0.0, 1.0]\n  for unsigned values. If %FALSE they are converted to floats\n  directly."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stride"
--           , argType = TBasicType TUInt16
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "This specifies the number of bytes from the start of one attribute\n  value to the start of the next value (for the same attribute). So, for\n  example, with a position interleved with color like this:\n  XYRGBAXYRGBAXYRGBA, then if each letter represents a byte, the\n  stride for both attributes is 6. The special value 0 means the\n  values are stored sequentially in memory."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pointer"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "This addresses the first attribute in the vertex array. This\n  must remain valid until you either call cogl_vertex_buffer_submit() or\n  issue a draw call."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_vertex_buffer_add" cogl_vertex_buffer_add :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CString ->                              -- attribute_name : TBasicType TUTF8
    Word8 ->                                -- n_components : TBasicType TUInt8
    CUInt ->                                -- type : TInterface (Name {namespace = "Cogl", name = "AttributeType"})
    Int32 ->                                -- normalized : TBasicType TInt
    Word16 ->                               -- stride : TBasicType TUInt16
    Ptr () ->                               -- pointer : TBasicType TPtr
    IO ()

{-# DEPRECATED vertexBufferAdd ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Adds an attribute to a buffer, or replaces a previously added
-- attribute with the same name.
-- 
-- You either can use one of the built-in names such as \"gl_Vertex\", or
-- \"gl_MultiTexCoord0\" to add standard attributes, like positions, colors
-- and normals, or you can add custom attributes for use in shaders.
-- 
-- The number of vertices declared when calling 'GI.Cogl.Functions.vertexBufferNew'
-- determines how many attribute values will be read from the supplied
-- /@pointer@/.
-- 
-- The data for your attribute isn\'t copied anywhere until you call
-- 'GI.Cogl.Functions.vertexBufferSubmit', or issue a draw call which automatically
-- submits pending attribute changes. so the supplied pointer must remain
-- valid until then. If you are updating an existing attribute (done by
-- re-adding it) then you still need to re-call 'GI.Cogl.Functions.vertexBufferSubmit'
-- to commit the changes to the GPU. Be carefull to minimize the number
-- of calls to 'GI.Cogl.Functions.vertexBufferSubmit', though.
-- 
-- \<note>If you are interleving attributes it is assumed that each interleaved
-- attribute starts no farther than +- stride bytes from the other attributes
-- it is interleved with. I.e. this is ok:
-- \<programlisting>
-- |-0-0-0-0-0-0-0-0-0-0|
-- \<\/programlisting>
-- This is not ok:
-- \<programlisting>
-- |- - - - -0-0-0-0-0-0 0 0 0 0|
-- \<\/programlisting>
-- (Though you can have multiple groups of interleved attributes)\<\/note>
vertexBufferAdd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A vertex buffer handle
    -> T.Text
    -- ^ /@attributeName@/: The name of your attribute. It should be a valid GLSL
    --   variable name and standard attribute types must use one of following
    --   built-in names: (Note: they correspond to the built-in names of GLSL)
    --   \<itemizedlist>
    --     \<listitem>\"gl_Color\"\<\/listitem>
    --     \<listitem>\"gl_Normal\"\<\/listitem>
    --     \<listitem>\"gl_MultiTexCoord0, gl_MultiTexCoord1, ...\"\<\/listitem>
    --     \<listitem>\"gl_Vertex\"\<\/listitem>
    --   \<\/itemizedlist>
    --   To support adding multiple variations of the same attribute the name
    --   can have a detail component, E.g. \"gl_Color[active](#g:signal:active)\" or
    --   \"gl_Color[inactive](#g:signal:inactive)\"
    -> Word8
    -- ^ /@nComponents@/: The number of components per attribute and must be 1, 2,
    --   3 or 4
    -> Cogl.Enums.AttributeType
    -- ^ /@type@/: a t'GI.Cogl.Enums.AttributeType' specifying the data type of each component.
    -> Int32
    -- ^ /@normalized@/: If 'P.True', this specifies that values stored in an integer
    --   format should be mapped into the range [-1.0, 1.0] or [0.0, 1.0]
    --   for unsigned values. If 'P.False' they are converted to floats
    --   directly.
    -> Word16
    -- ^ /@stride@/: This specifies the number of bytes from the start of one attribute
    --   value to the start of the next value (for the same attribute). So, for
    --   example, with a position interleved with color like this:
    --   XYRGBAXYRGBAXYRGBA, then if each letter represents a byte, the
    --   stride for both attributes is 6. The special value 0 means the
    --   values are stored sequentially in memory.
    -> Ptr ()
    -- ^ /@pointer@/: This addresses the first attribute in the vertex array. This
    --   must remain valid until you either call 'GI.Cogl.Functions.vertexBufferSubmit' or
    --   issue a draw call.
    -> m ()
vertexBufferAdd :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr ()
-> Text
-> Word8
-> AttributeType
-> Int32
-> Word16
-> Ptr ()
-> m ()
vertexBufferAdd Ptr ()
handle Text
attributeName Word8
nComponents AttributeType
type_ Int32
normalized Word16
stride Ptr ()
pointer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
attributeName' <- Text -> IO CString
textToCString Text
attributeName
    let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (AttributeType -> Int) -> AttributeType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AttributeType -> Int
forall a. Enum a => a -> Int
fromEnum) AttributeType
type_
    Ptr ()
-> CString -> Word8 -> CUInt -> Int32 -> Word16 -> Ptr () -> IO ()
cogl_vertex_buffer_add Ptr ()
handle CString
attributeName' Word8
nComponents CUInt
type_' Int32
normalized Word16
stride Ptr ()
pointer
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attributeName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function translate
-- Args: [ Arg
--           { argCName = "x"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Distance to translate along the x-axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Distance to translate along the y-axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Distance to translate along the z-axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_translate" cogl_translate :: 
    CFloat ->                               -- x : TBasicType TFloat
    CFloat ->                               -- y : TBasicType TFloat
    CFloat ->                               -- z : TBasicType TFloat
    IO ()

{-# DEPRECATED translate ["(Since version 1.10)","Use @/cogl_framebuffer_translate()/@ instead"] #-}
-- | Multiplies the current model-view matrix by one that translates the
-- model along all three axes according to the given values.
translate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@x@/: Distance to translate along the x-axis
    -> Float
    -- ^ /@y@/: Distance to translate along the y-axis
    -> Float
    -- ^ /@z@/: Distance to translate along the z-axis
    -> m ()
translate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> m ()
translate Float
x Float
y Float
z = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let x' :: CFloat
x' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x
    let y' :: CFloat
y' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y
    let z' :: CFloat
z' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z
    CFloat -> CFloat -> CFloat -> IO ()
cogl_translate CFloat
x' CFloat
y' CFloat
z'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function transform
-- Args: [ Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Matrix" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the matrix to multiply with the current model-view"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_transform" cogl_transform :: 
    Ptr Cogl.Matrix.Matrix ->               -- matrix : TInterface (Name {namespace = "Cogl", name = "Matrix"})
    IO ()

{-# DEPRECATED transform ["(Since version 1.10)","Use @/cogl_framebuffer_transform()/@ instead"] #-}
-- | Multiplies the current model-view matrix by the given matrix.
-- 
-- /Since: 1.4/
transform ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Matrix.Matrix
    -- ^ /@matrix@/: the matrix to multiply with the current model-view
    -> m ()
transform :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Matrix -> m ()
transform Matrix
matrix = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Matrix
matrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
matrix
    Ptr Matrix -> IO ()
cogl_transform Ptr Matrix
matrix'
    Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Matrix
matrix
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function sqrti
-- Args: [ Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "integer value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_sqrti" cogl_sqrti :: 
    Int32 ->                                -- x : TBasicType TInt
    IO Int32

-- | Very fast fixed point implementation of square root for integers.
-- 
-- This function is at least 6x faster than clib @/sqrt()/@ on x86, and (this is
-- not a typo!) about 500x faster on ARM without FPU. It\'s error is less than
-- 5% for arguments smaller than 'GI.Cogl.Constants.SQRTI_ARG_5_PERCENT' and less than 10%
-- for narguments smaller than 'GI.Cogl.Constants.SQRTI_ARG_10_PERCENT'. The maximum
-- argument that can be passed to this function is 'GI.Cogl.Constants.SQRTI_ARG_MAX'.
-- 
-- /Since: 1.0/
sqrti ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@x@/: integer value
    -> m Int32
    -- ^ __Returns:__ integer square root.
sqrti :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> m Int32
sqrti Int32
x = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Int32 -> IO Int32
cogl_sqrti Int32
x
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function shader_unref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle to a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_unref" cogl_shader_unref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED shaderUnref ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Removes a reference to a shader. If it was the last reference the
-- shader object will be destroyed.
shaderUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A @/CoglHandle/@ to a shader.
    -> m ()
shaderUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
shaderUnref Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_shader_unref Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function shader_source
-- Args: [ Arg
--           { argCName = "shader"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#CoglHandle for a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Shader source." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_source" cogl_shader_source :: 
    Ptr () ->                               -- shader : TBasicType TPtr
    CString ->                              -- source : TBasicType TUTF8
    IO ()

{-# DEPRECATED shaderSource ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Replaces the current source associated with a shader with a new
-- one.
-- 
-- Please see \<link
-- linkend=\"cogl-Shaders-and-Programmable-Pipeline.description\">above\<\/link>
-- for a description of the recommended format for the shader code.
shaderSource ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@shader@/: @/CoglHandle/@ for a shader.
    -> T.Text
    -- ^ /@source@/: Shader source.
    -> m ()
shaderSource :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Text -> m ()
shaderSource Ptr ()
shader Text
source = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
source' <- Text -> IO CString
textToCString Text
source
    Ptr () -> CString -> IO ()
cogl_shader_source Ptr ()
shader CString
source'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
source'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function shader_ref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle to a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_ref" cogl_shader_ref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO (Ptr ())

{-# DEPRECATED shaderRef ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Add an extra reference to a shader.
shaderRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A @/CoglHandle/@ to a shader.
    -> m (Ptr ())
    -- ^ __Returns:__ /@handle@/
shaderRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m (Ptr ())
shaderRef Ptr ()
handle = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- Ptr () -> IO (Ptr ())
cogl_shader_ref Ptr ()
handle
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function shader_is_compiled
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#CoglHandle for a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_is_compiled" cogl_shader_is_compiled :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Int32

{-# DEPRECATED shaderIsCompiled ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Retrieves whether a shader @/CoglHandle/@ has been compiled
shaderIsCompiled ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: @/CoglHandle/@ for a shader.
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the shader object has sucessfully be compiled
shaderIsCompiled :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
shaderIsCompiled Ptr ()
handle = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_shader_is_compiled Ptr ()
handle
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function shader_get_type
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#CoglHandle for a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Cogl" , name = "ShaderType" })
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_get_type" cogl_shader_get_type :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO CUInt

{-# DEPRECATED shaderGetType ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Retrieves the type of a shader @/CoglHandle/@
shaderGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: @/CoglHandle/@ for a shader.
    -> m Cogl.Enums.ShaderType
    -- ^ __Returns:__ 'GI.Cogl.Enums.ShaderTypeVertex' if the shader is a vertex processor
    --          or 'GI.Cogl.Enums.ShaderTypeFragment' if the shader is a frament processor
shaderGetType :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m ShaderType
shaderGetType Ptr ()
handle = IO ShaderType -> m ShaderType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShaderType -> m ShaderType) -> IO ShaderType -> m ShaderType
forall a b. (a -> b) -> a -> b
$ do
    CUInt
result <- Ptr () -> IO CUInt
cogl_shader_get_type Ptr ()
handle
    let result' :: ShaderType
result' = (Int -> ShaderType
forall a. Enum a => Int -> a
toEnum (Int -> ShaderType) -> (CUInt -> Int) -> CUInt -> ShaderType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    ShaderType -> IO ShaderType
forall (m :: * -> *) a. Monad m => a -> m a
return ShaderType
result'


-- function shader_get_info_log
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#CoglHandle for a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_get_info_log" cogl_shader_get_info_log :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO CString

{-# DEPRECATED shaderGetInfoLog ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Retrieves the information log for a coglobject, can be used in conjunction
-- with @/cogl_shader_get_parameteriv()/@ to retrieve the compiler warnings\/error
-- messages that caused a shader to not compile correctly, mainly useful for
-- debugging purposes.
shaderGetInfoLog ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: @/CoglHandle/@ for a shader.
    -> m T.Text
    -- ^ __Returns:__ a newly allocated string containing the info log. Use
    --   'GI.GLib.Functions.free' to free it
shaderGetInfoLog :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m Text
shaderGetInfoLog Ptr ()
handle = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    CString
result <- Ptr () -> IO CString
cogl_shader_get_info_log Ptr ()
handle
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"shaderGetInfoLog" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function shader_compile
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#CoglHandle for a shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_shader_compile" cogl_shader_compile :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED shaderCompile ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Compiles the shader, no return value, but the shader is now ready
-- for linking into a program. Note that calling this function is
-- optional. If it is not called then the shader will be automatically
-- compiled when it is linked.
shaderCompile ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: @/CoglHandle/@ for a shader.
    -> m ()
shaderCompile :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
shaderCompile Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_shader_compile Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_viewport
-- Args: [ Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X offset of the viewport"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y offset of the viewport"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Width of the viewport"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Height of the viewport"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_viewport" cogl_set_viewport :: 
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

{-# DEPRECATED setViewport ["(Since version 1.8)","Use @/cogl_framebuffer_set_viewport()/@ instead"] #-}
-- | Replaces the current viewport with the given values.
-- 
-- /Since: 1.2/
setViewport ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@x@/: X offset of the viewport
    -> Int32
    -- ^ /@y@/: Y offset of the viewport
    -> Int32
    -- ^ /@width@/: Width of the viewport
    -> Int32
    -- ^ /@height@/: Height of the viewport
    -> m ()
setViewport :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> Int32 -> Int32 -> m ()
setViewport Int32
x Int32
y Int32
width Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Int32 -> Int32 -> Int32 -> Int32 -> IO ()
cogl_set_viewport Int32
x Int32
y Int32
width Int32
height
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_source_texture
-- Args: [ Arg
--           { argCName = "texture"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Texture" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #CoglTexture you want as your source"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_source_texture" cogl_set_source_texture :: 
    Ptr Cogl.Texture.Texture ->             -- texture : TInterface (Name {namespace = "Cogl", name = "Texture"})
    IO ()

{-# DEPRECATED setSourceTexture ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | This is a convenience function for creating a material with the first
-- layer set to /@texture@/ and setting that material as the source with
-- cogl_set_source.
-- 
-- Note: There is no interaction between calls to cogl_set_source_color
-- and cogl_set_source_texture. If you need to blend a texture with a color then
-- you can create a simple material like this:
-- \<programlisting>
-- material = cogl_material_new ();
-- cogl_material_set_color4ub (material, 0xff, 0x00, 0x00, 0x80);
-- cogl_material_set_layer (material, 0, tex_handle);
-- cogl_set_source (material);
-- \<\/programlisting>
-- 
-- /Since: 1.0/
setSourceTexture ::
    (B.CallStack.HasCallStack, MonadIO m, Cogl.Texture.IsTexture a) =>
    a
    -- ^ /@texture@/: The @/CoglTexture/@ you want as your source
    -> m ()
setSourceTexture :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTexture a) =>
a -> m ()
setSourceTexture a
texture = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Texture
texture' <- a -> IO (Ptr Texture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
texture
    Ptr Texture -> IO ()
cogl_set_source_texture Ptr Texture
texture'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
texture
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_source_color4ub
-- Args: [ Arg
--           { argCName = "red"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value of the red channel, between 0 and 255"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "green"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value of the green channel, between 0 and 255"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "blue"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value of the blue channel, between 0 and 255"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "alpha"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value of the alpha channel, between 0 and 255"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_source_color4ub" cogl_set_source_color4ub :: 
    Word8 ->                                -- red : TBasicType TUInt8
    Word8 ->                                -- green : TBasicType TUInt8
    Word8 ->                                -- blue : TBasicType TUInt8
    Word8 ->                                -- alpha : TBasicType TUInt8
    IO ()

{-# DEPRECATED setSourceColor4ub ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | This is a convenience function for creating a solid fill source material
-- from the given color using unsigned bytes for each component. This
-- color will be used for any subsequent drawing operation.
-- 
-- The value for each component is an unsigned byte in the range
-- between 0 and 255.
-- 
-- /Since: 1.0/
setSourceColor4ub ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word8
    -- ^ /@red@/: value of the red channel, between 0 and 255
    -> Word8
    -- ^ /@green@/: value of the green channel, between 0 and 255
    -> Word8
    -- ^ /@blue@/: value of the blue channel, between 0 and 255
    -> Word8
    -- ^ /@alpha@/: value of the alpha channel, between 0 and 255
    -> m ()
setSourceColor4ub :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word8 -> Word8 -> Word8 -> Word8 -> m ()
setSourceColor4ub Word8
red Word8
green Word8
blue Word8
alpha = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Word8 -> Word8 -> Word8 -> Word8 -> IO ()
cogl_set_source_color4ub Word8
red Word8
green Word8
blue Word8
alpha
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_source_color4f
-- Args: [ Arg
--           { argCName = "red"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value of the red channel, between 0 and %1.0"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "green"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "value of the green channel, between 0 and %1.0"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "blue"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value of the blue channel, between 0 and %1.0"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "alpha"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "value of the alpha channel, between 0 and %1.0"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_source_color4f" cogl_set_source_color4f :: 
    CFloat ->                               -- red : TBasicType TFloat
    CFloat ->                               -- green : TBasicType TFloat
    CFloat ->                               -- blue : TBasicType TFloat
    CFloat ->                               -- alpha : TBasicType TFloat
    IO ()

{-# DEPRECATED setSourceColor4f ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | This is a convenience function for creating a solid fill source material
-- from the given color using normalized values for each component. This color
-- will be used for any subsequent drawing operation.
-- 
-- The value for each component is a fixed point number in the range
-- between 0 and @/1/@.0. If the values passed in are outside that
-- range, they will be clamped.
-- 
-- /Since: 1.0/
setSourceColor4f ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@red@/: value of the red channel, between 0 and @/1/@.0
    -> Float
    -- ^ /@green@/: value of the green channel, between 0 and @/1/@.0
    -> Float
    -- ^ /@blue@/: value of the blue channel, between 0 and @/1/@.0
    -> Float
    -- ^ /@alpha@/: value of the alpha channel, between 0 and @/1/@.0
    -> m ()
setSourceColor4f :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
setSourceColor4f Float
red Float
green Float
blue Float
alpha = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let red' :: CFloat
red' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
red
    let green' :: CFloat
green' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
green
    let blue' :: CFloat
blue' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
blue
    let alpha' :: CFloat
alpha' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
alpha
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_set_source_color4f CFloat
red' CFloat
green' CFloat
blue' CFloat
alpha'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_source_color
-- Args: [ Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Cogl" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglColor" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_source_color" cogl_set_source_color :: 
    Ptr Cogl.Color.Color ->                 -- color : TInterface (Name {namespace = "Cogl", name = "Color"})
    IO ()

{-# DEPRECATED setSourceColor ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | This is a convenience function for creating a solid fill source material
-- from the given color. This color will be used for any subsequent drawing
-- operation.
-- 
-- The color will be premultiplied by Cogl, so the color should be
-- non-premultiplied. For example: use (1.0, 0.0, 0.0, 0.5) for
-- semi-transparent red.
-- 
-- See also 'GI.Cogl.Functions.setSourceColor4ub' and 'GI.Cogl.Functions.setSourceColor4f'
-- if you already have the color components.
-- 
-- /Since: 1.0/
setSourceColor ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Color.Color
    -- ^ /@color@/: a t'GI.Cogl.Structs.Color.Color'
    -> m ()
setSourceColor :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Color -> m ()
setSourceColor Color
color = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Color
color' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
color
    Ptr Color -> IO ()
cogl_set_source_color Ptr Color
color'
    Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Color
color
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_source
-- Args: [ Arg
--           { argCName = "material"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglMaterial" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_source" cogl_set_source :: 
    Ptr () ->                               -- material : TBasicType TPtr
    IO ()

{-# DEPRECATED setSource ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | This function changes the material at the top of the source stack.
-- The material at the top of this stack defines the GPU state used to
-- process subsequent primitives, such as rectangles drawn with
-- 'GI.Cogl.Functions.rectangle' or vertices drawn using 'GI.Cogl.Functions.vertexBufferDraw'.
-- 
-- /Since: 1.0/
setSource ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@material@/: A t'GI.Cogl.Structs.Material.Material'
    -> m ()
setSource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
setSource Ptr ()
material = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_set_source Ptr ()
material
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_projection_matrix
-- Args: [ Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Matrix" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new projection matrix"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_projection_matrix" cogl_set_projection_matrix :: 
    Ptr Cogl.Matrix.Matrix ->               -- matrix : TInterface (Name {namespace = "Cogl", name = "Matrix"})
    IO ()

{-# DEPRECATED setProjectionMatrix ["(Since version 1.10)","Use @/cogl_framebuffer_set_projection_matrix()/@","                  instead"] #-}
-- | Loads matrix as the new projection matrix.
setProjectionMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Matrix.Matrix
    -- ^ /@matrix@/: the new projection matrix
    -> m ()
setProjectionMatrix :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Matrix -> m ()
setProjectionMatrix Matrix
matrix = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Matrix
matrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
matrix
    Ptr Matrix -> IO ()
cogl_set_projection_matrix Ptr Matrix
matrix'
    Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Matrix
matrix
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_modelview_matrix
-- Args: [ Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Matrix" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new model-view matrix"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_modelview_matrix" cogl_set_modelview_matrix :: 
    Ptr Cogl.Matrix.Matrix ->               -- matrix : TInterface (Name {namespace = "Cogl", name = "Matrix"})
    IO ()

{-# DEPRECATED setModelviewMatrix ["(Since version 1.10)","Use @/cogl_framebuffer_set_modelview_matrix()/@","                  instead"] #-}
-- | Loads /@matrix@/ as the new model-view matrix.
setModelviewMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Matrix.Matrix
    -- ^ /@matrix@/: the new model-view matrix
    -> m ()
setModelviewMatrix :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Matrix -> m ()
setModelviewMatrix Matrix
matrix = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Matrix
matrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
matrix
    Ptr Matrix -> IO ()
cogl_set_modelview_matrix Ptr Matrix
matrix'
    Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Matrix
matrix
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_fog
-- Args: [ Arg
--           { argCName = "fog_color"
--           , argType = TInterface Name { namespace = "Cogl" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The color of the fog"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "FogMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A #CoglFogMode that determines the equation used to calculate the\n  fogging blend factor."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "density"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Used by %COGL_FOG_MODE_EXPONENTIAL and by\n  %COGL_FOG_MODE_EXPONENTIAL_SQUARED equations."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z_near"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Position along Z axis where no fogging should be applied"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z_far"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Position along Z axis where full fogging should be applied"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_fog" cogl_set_fog :: 
    Ptr Cogl.Color.Color ->                 -- fog_color : TInterface (Name {namespace = "Cogl", name = "Color"})
    CUInt ->                                -- mode : TInterface (Name {namespace = "Cogl", name = "FogMode"})
    CFloat ->                               -- density : TBasicType TFloat
    CFloat ->                               -- z_near : TBasicType TFloat
    CFloat ->                               -- z_far : TBasicType TFloat
    IO ()

{-# DEPRECATED setFog ["(Since version 1.16)","Use @/CoglSnippet/@ shader api for fog"] #-}
-- | Enables fogging. Fogging causes vertices that are further away from the eye
-- to be rendered with a different color. The color is determined according to
-- the chosen fog mode; at it\'s simplest the color is linearly interpolated so
-- that vertices at /@zNear@/ are drawn fully with their original color and
-- vertices at /@zFar@/ are drawn fully with /@fogColor@/. Fogging will remain
-- enabled until you call 'GI.Cogl.Functions.disableFog'.
-- 
-- \<note>The fogging functions only work correctly when primitives use
-- unmultiplied alpha colors. By default Cogl will premultiply textures
-- and 'GI.Cogl.Functions.setSourceColor' will premultiply colors, so unless you
-- explicitly load your textures requesting an unmultiplied internal format
-- and use 'GI.Cogl.Structs.Material.materialSetColor' you can only use fogging with fully
-- opaque primitives. This might improve in the future when we can depend
-- on fragment shaders.\<\/note>
setFog ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Color.Color
    -- ^ /@fogColor@/: The color of the fog
    -> Cogl.Enums.FogMode
    -- ^ /@mode@/: A t'GI.Cogl.Enums.FogMode' that determines the equation used to calculate the
    --   fogging blend factor.
    -> Float
    -- ^ /@density@/: Used by 'GI.Cogl.Enums.FogModeExponential' and by
    --   'GI.Cogl.Enums.FogModeExponentialSquared' equations.
    -> Float
    -- ^ /@zNear@/: Position along Z axis where no fogging should be applied
    -> Float
    -- ^ /@zFar@/: Position along Z axis where full fogging should be applied
    -> m ()
setFog :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Color -> FogMode -> Float -> Float -> Float -> m ()
setFog Color
fogColor FogMode
mode Float
density Float
zNear Float
zFar = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Color
fogColor' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
fogColor
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (FogMode -> Int) -> FogMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FogMode -> Int
forall a. Enum a => a -> Int
fromEnum) FogMode
mode
    let density' :: CFloat
density' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
density
    let zNear' :: CFloat
zNear' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
zNear
    let zFar' :: CFloat
zFar' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
zFar
    Ptr Color -> CUInt -> CFloat -> CFloat -> CFloat -> IO ()
cogl_set_fog Ptr Color
fogColor' CUInt
mode' CFloat
density' CFloat
zNear' CFloat
zFar'
    Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Color
fogColor
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_draw_buffer
-- Args: [ Arg
--           { argCName = "target"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "BufferTarget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A #CoglBufferTarget that specifies what kind of framebuffer you\n         are setting as the render target."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offscreen"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "If you are setting a framebuffer of type COGL_OFFSCREEN_BUFFER\n            then this is a CoglHandle for the offscreen buffer."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_draw_buffer" cogl_set_draw_buffer :: 
    CUInt ->                                -- target : TInterface (Name {namespace = "Cogl", name = "BufferTarget"})
    Ptr () ->                               -- offscreen : TBasicType TPtr
    IO ()

{-# DEPRECATED setDrawBuffer ["(Since version 1.16)","The latest drawing apis take explicit","                  @/CoglFramebuffer/@ arguments so this stack of","                  framebuffers shouldn\\'t be used anymore."] #-}
-- | Redirects all subsequent drawing to the specified framebuffer. This
-- can either be an offscreen buffer created with
-- cogl_offscreen_new_to_texture () or you can revert to your original
-- on screen window buffer.
setDrawBuffer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Cogl.Flags.BufferTarget]
    -- ^ /@target@/: A t'GI.Cogl.Flags.BufferTarget' that specifies what kind of framebuffer you
    --          are setting as the render target.
    -> Ptr ()
    -- ^ /@offscreen@/: If you are setting a framebuffer of type COGL_OFFSCREEN_BUFFER
    --             then this is a CoglHandle for the offscreen buffer.
    -> m ()
setDrawBuffer :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[BufferTarget] -> Ptr () -> m ()
setDrawBuffer [BufferTarget]
target Ptr ()
offscreen = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let target' :: CUInt
target' = [BufferTarget] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [BufferTarget]
target
    CUInt -> Ptr () -> IO ()
cogl_set_draw_buffer CUInt
target' Ptr ()
offscreen
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_depth_test_enabled
-- Args: [ Arg
--           { argCName = "setting"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE to enable depth testing or %FALSE to disable."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_depth_test_enabled" cogl_set_depth_test_enabled :: 
    Int32 ->                                -- setting : TBasicType TInt
    IO ()

{-# DEPRECATED setDepthTestEnabled ["(Since version 1.16)","Use @/cogl_pipeline_set_depth_state()/@ instead"] #-}
-- | Sets whether depth testing is enabled. If it is disabled then the
-- order that actors are layered on the screen depends solely on the
-- order specified using @/clutter_actor_raise()/@ and
-- @/clutter_actor_lower()/@, otherwise it will also take into account the
-- actor\'s depth. Depth testing is disabled by default.
setDepthTestEnabled ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@setting@/: 'P.True' to enable depth testing or 'P.False' to disable.
    -> m ()
setDepthTestEnabled :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> m ()
setDepthTestEnabled Int32
setting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Int32 -> IO ()
cogl_set_depth_test_enabled Int32
setting
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function set_backface_culling_enabled
-- Args: [ Arg
--           { argCName = "setting"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE to enable backface culling or %FALSE to disable."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_set_backface_culling_enabled" cogl_set_backface_culling_enabled :: 
    Int32 ->                                -- setting : TBasicType TInt
    IO ()

{-# DEPRECATED setBackfaceCullingEnabled ["(Since version 1.16)","Use @/cogl_pipeline_set_cull_face_mode()/@ instead"] #-}
-- | Sets whether textures positioned so that their backface is showing
-- should be hidden. This can be used to efficiently draw two-sided
-- textures or fully closed cubes without enabling depth testing. This
-- only affects calls to the cogl_rectangle* family of functions and
-- cogl_vertex_buffer_draw*. Backface culling is disabled by default.
setBackfaceCullingEnabled ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@setting@/: 'P.True' to enable backface culling or 'P.False' to disable.
    -> m ()
setBackfaceCullingEnabled :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> m ()
setBackfaceCullingEnabled Int32
setting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Int32 -> IO ()
cogl_set_backface_culling_enabled Int32
setting
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function scale
-- Args: [ Arg
--           { argCName = "x"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scale along the x-axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scale along the y-axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scale along the z-axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_scale" cogl_scale :: 
    CFloat ->                               -- x : TBasicType TFloat
    CFloat ->                               -- y : TBasicType TFloat
    CFloat ->                               -- z : TBasicType TFloat
    IO ()

{-# DEPRECATED scale ["(Since version 1.10)","Use @/cogl_framebuffer_pop_matrix()/@ instead"] #-}
-- | Multiplies the current model-view matrix by one that scales the x,
-- y and z axes by the given values.
scale ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@x@/: Amount to scale along the x-axis
    -> Float
    -- ^ /@y@/: Amount to scale along the y-axis
    -> Float
    -- ^ /@z@/: Amount to scale along the z-axis
    -> m ()
scale :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> m ()
scale Float
x Float
y Float
z = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let x' :: CFloat
x' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x
    let y' :: CFloat
y' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y
    let z' :: CFloat
z' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z
    CFloat -> CFloat -> CFloat -> IO ()
cogl_scale CFloat
x' CFloat
y' CFloat
z'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function rotate
-- Args: [ Arg
--           { argCName = "angle"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Angle in degrees to rotate."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X-component of vertex to rotate around."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y-component of vertex to rotate around."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Z-component of vertex to rotate around."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_rotate" cogl_rotate :: 
    CFloat ->                               -- angle : TBasicType TFloat
    CFloat ->                               -- x : TBasicType TFloat
    CFloat ->                               -- y : TBasicType TFloat
    CFloat ->                               -- z : TBasicType TFloat
    IO ()

{-# DEPRECATED rotate ["(Since version 1.10)","Use @/cogl_framebuffer_rotate()/@ instead"] #-}
-- | Multiplies the current model-view matrix by one that rotates the
-- model around the vertex specified by /@x@/, /@y@/ and /@z@/. The rotation
-- follows the right-hand thumb rule so for example rotating by 10
-- degrees about the vertex (0, 0, 1) causes a small counter-clockwise
-- rotation.
rotate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@angle@/: Angle in degrees to rotate.
    -> Float
    -- ^ /@x@/: X-component of vertex to rotate around.
    -> Float
    -- ^ /@y@/: Y-component of vertex to rotate around.
    -> Float
    -- ^ /@z@/: Z-component of vertex to rotate around.
    -> m ()
rotate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
rotate Float
angle Float
x Float
y Float
z = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let angle' :: CFloat
angle' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
angle
    let x' :: CFloat
x' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x
    let y' :: CFloat
y' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y
    let z' :: CFloat
z' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_rotate CFloat
angle' CFloat
x' CFloat
y' CFloat
z'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function rectangles_with_texture_coords
-- Args: [ Arg
--           { argCName = "verts"
--           , argType = TCArray False (-1) (-1) (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of vertices"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_rects"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of rectangles to draw"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_rectangles_with_texture_coords" cogl_rectangles_with_texture_coords :: 
    Ptr CFloat ->                           -- verts : TCArray False (-1) (-1) (TBasicType TFloat)
    Word32 ->                               -- n_rects : TBasicType TUInt
    IO ()

-- | Draws a series of rectangles in the same way that
-- 'GI.Cogl.Functions.rectangleWithTextureCoords' does. In some situations it can give a
-- significant performance boost to use this function rather than
-- calling 'GI.Cogl.Functions.rectangleWithTextureCoords' separately for each rectangle.
-- 
-- /@verts@/ should point to an array of @/float/@s with
-- /@nRects@/ * 8 elements. Each group of 8 values corresponds to the
-- parameters x1, y1, x2, y2, tx1, ty1, tx2 and ty2 and have the same
-- meaning as in 'GI.Cogl.Functions.rectangleWithTextureCoords'.
-- 
-- /Since: 0.8.6/
rectanglesWithTextureCoords ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Float]
    -- ^ /@verts@/: an array of vertices
    -> Word32
    -- ^ /@nRects@/: number of rectangles to draw
    -> m ()
rectanglesWithTextureCoords :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[Float] -> Word32 -> m ()
rectanglesWithTextureCoords [Float]
verts Word32
nRects = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CFloat
verts' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
verts
    Ptr CFloat -> Word32 -> IO ()
cogl_rectangles_with_texture_coords Ptr CFloat
verts' Word32
nRects
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
verts'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function rectangles
-- Args: [ Arg
--           { argCName = "verts"
--           , argType = TCArray False (-1) (-1) (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of vertices"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_rects"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of rectangles to draw"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_rectangles" cogl_rectangles :: 
    Ptr CFloat ->                           -- verts : TCArray False (-1) (-1) (TBasicType TFloat)
    Word32 ->                               -- n_rects : TBasicType TUInt
    IO ()

-- | Draws a series of rectangles in the same way that
-- 'GI.Cogl.Functions.rectangle' does. In some situations it can give a
-- significant performance boost to use this function rather than
-- calling 'GI.Cogl.Functions.rectangle' separately for each rectangle.
-- 
-- /@verts@/ should point to an array of @/float/@s with
-- /@nRects@/ * 4 elements. Each group of 4 values corresponds to the
-- parameters x1, y1, x2, and y2, and have the same
-- meaning as in 'GI.Cogl.Functions.rectangle'.
-- 
-- /Since: 1.0/
rectangles ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Float]
    -- ^ /@verts@/: an array of vertices
    -> Word32
    -- ^ /@nRects@/: number of rectangles to draw
    -> m ()
rectangles :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[Float] -> Word32 -> m ()
rectangles [Float]
verts Word32
nRects = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CFloat
verts' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
verts
    Ptr CFloat -> Word32 -> IO ()
cogl_rectangles Ptr CFloat
verts' Word32
nRects
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
verts'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function rectangle_with_texture_coords
-- Args: [ Arg
--           { argCName = "x1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "x coordinate upper left on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "y coordinate upper left on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "x coordinate lower right on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "y coordinate lower right on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tx1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "x part of texture coordinate to use for upper left pixel"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ty1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "y part of texture coordinate to use for upper left pixel"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tx2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "x part of texture coordinate to use for lower right pixel"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ty2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "y part of texture coordinate to use for left pixel"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_rectangle_with_texture_coords" cogl_rectangle_with_texture_coords :: 
    CFloat ->                               -- x1 : TBasicType TFloat
    CFloat ->                               -- y1 : TBasicType TFloat
    CFloat ->                               -- x2 : TBasicType TFloat
    CFloat ->                               -- y2 : TBasicType TFloat
    CFloat ->                               -- tx1 : TBasicType TFloat
    CFloat ->                               -- ty1 : TBasicType TFloat
    CFloat ->                               -- tx2 : TBasicType TFloat
    CFloat ->                               -- ty2 : TBasicType TFloat
    IO ()

-- | Draw a rectangle using the current material and supply texture coordinates
-- to be used for the first texture layer of the material. To draw the entire
-- texture pass in /@tx1@/=0.0 /@ty1@/=0.0 /@tx2@/=1.0 /@ty2@/=1.0.
-- 
-- /Since: 1.0/
rectangleWithTextureCoords ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@x1@/: x coordinate upper left on screen.
    -> Float
    -- ^ /@y1@/: y coordinate upper left on screen.
    -> Float
    -- ^ /@x2@/: x coordinate lower right on screen.
    -> Float
    -- ^ /@y2@/: y coordinate lower right on screen.
    -> Float
    -- ^ /@tx1@/: x part of texture coordinate to use for upper left pixel
    -> Float
    -- ^ /@ty1@/: y part of texture coordinate to use for upper left pixel
    -> Float
    -- ^ /@tx2@/: x part of texture coordinate to use for lower right pixel
    -> Float
    -- ^ /@ty2@/: y part of texture coordinate to use for left pixel
    -> m ()
rectangleWithTextureCoords :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m ()
rectangleWithTextureCoords Float
x1 Float
y1 Float
x2 Float
y2 Float
tx1 Float
ty1 Float
tx2 Float
ty2 = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let x1' :: CFloat
x1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x1
    let y1' :: CFloat
y1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y1
    let x2' :: CFloat
x2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x2
    let y2' :: CFloat
y2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y2
    let tx1' :: CFloat
tx1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
tx1
    let ty1' :: CFloat
ty1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
ty1
    let tx2' :: CFloat
tx2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
tx2
    let ty2' :: CFloat
ty2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
ty2
    CFloat
-> CFloat
-> CFloat
-> CFloat
-> CFloat
-> CFloat
-> CFloat
-> CFloat
-> IO ()
cogl_rectangle_with_texture_coords CFloat
x1' CFloat
y1' CFloat
x2' CFloat
y2' CFloat
tx1' CFloat
ty1' CFloat
tx2' CFloat
ty2'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function rectangle_with_multitexture_coords
-- Args: [ Arg
--           { argCName = "x1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "x coordinate upper left on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "y coordinate upper left on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "x coordinate lower right on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "y coordinate lower right on screen."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tex_coords"
--           , argType = TCArray False (-1) (-1) (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "An array containing groups of\n  4 float values: [tx1, ty1, tx2, ty2] that are interpreted as two texture\n  coordinates; one for the upper left texel, and one for the lower right\n  texel. Each value should be between 0.0 and 1.0, where the coordinate\n  (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the\n  bottom right."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tex_coords_len"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The length of the tex_coords array. (e.g. for one layer\n  and one group of texture coordinates, this would be 4)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_rectangle_with_multitexture_coords" cogl_rectangle_with_multitexture_coords :: 
    CFloat ->                               -- x1 : TBasicType TFloat
    CFloat ->                               -- y1 : TBasicType TFloat
    CFloat ->                               -- x2 : TBasicType TFloat
    CFloat ->                               -- y2 : TBasicType TFloat
    Ptr CFloat ->                           -- tex_coords : TCArray False (-1) (-1) (TBasicType TFloat)
    Int32 ->                                -- tex_coords_len : TBasicType TInt
    IO ()

-- | This function draws a rectangle using the current source material to
-- texture or fill with. As a material may contain multiple texture layers
-- this interface lets you supply texture coordinates for each layer of the
-- material.
-- 
-- The first pair of coordinates are for the first layer (with the smallest
-- layer index) and if you supply less texture coordinates than there are
-- layers in the current source material then default texture coordinates
-- (0.0, 0.0, 1.0, 1.0) are generated.
-- 
-- /Since: 1.0/
rectangleWithMultitextureCoords ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@x1@/: x coordinate upper left on screen.
    -> Float
    -- ^ /@y1@/: y coordinate upper left on screen.
    -> Float
    -- ^ /@x2@/: x coordinate lower right on screen.
    -> Float
    -- ^ /@y2@/: y coordinate lower right on screen.
    -> [Float]
    -- ^ /@texCoords@/: An array containing groups of
    --   4 float values: [tx1, ty1, tx2, ty2] that are interpreted as two texture
    --   coordinates; one for the upper left texel, and one for the lower right
    --   texel. Each value should be between 0.0 and 1.0, where the coordinate
    --   (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the
    --   bottom right.
    -> Int32
    -- ^ /@texCoordsLen@/: The length of the tex_coords array. (e.g. for one layer
    --   and one group of texture coordinates, this would be 4)
    -> m ()
rectangleWithMultitextureCoords :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> [Float] -> Int32 -> m ()
rectangleWithMultitextureCoords Float
x1 Float
y1 Float
x2 Float
y2 [Float]
texCoords Int32
texCoordsLen = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let x1' :: CFloat
x1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x1
    let y1' :: CFloat
y1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y1
    let x2' :: CFloat
x2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x2
    let y2' :: CFloat
y2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y2
    Ptr CFloat
texCoords' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
texCoords
    CFloat
-> CFloat -> CFloat -> CFloat -> Ptr CFloat -> Int32 -> IO ()
cogl_rectangle_with_multitexture_coords CFloat
x1' CFloat
y1' CFloat
x2' CFloat
y2' Ptr CFloat
texCoords' Int32
texCoordsLen
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
texCoords'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function rectangle
-- Args: [ Arg
--           { argCName = "x_1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of the top-left corner"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of the top-left corner"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x_2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of the bottom-right corner"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_2"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of the bottom-right corner"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_rectangle" cogl_rectangle :: 
    CFloat ->                               -- x_1 : TBasicType TFloat
    CFloat ->                               -- y_1 : TBasicType TFloat
    CFloat ->                               -- x_2 : TBasicType TFloat
    CFloat ->                               -- y_2 : TBasicType TFloat
    IO ()

-- | Fills a rectangle at the given coordinates with the current source material
rectangle ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@x1@/: X coordinate of the top-left corner
    -> Float
    -- ^ /@y1@/: Y coordinate of the top-left corner
    -> Float
    -- ^ /@x2@/: X coordinate of the bottom-right corner
    -> Float
    -- ^ /@y2@/: Y coordinate of the bottom-right corner
    -> m ()
rectangle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
rectangle Float
x1 Float
y1 Float
x2 Float
y2 = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let x1' :: CFloat
x1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x1
    let y1' :: CFloat
y1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y1
    let x2' :: CFloat
x2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x2
    let y2' :: CFloat
y2' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y2
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_rectangle CFloat
x1' CFloat
y1' CFloat
x2' CFloat
y2'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function read_pixels
-- Args: [ Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The window x position to start reading from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The window y position to start reading from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The width of the rectangle you want to read"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The height of the rectangle you want to read"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "source"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "ReadPixelsFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Identifies which auxillary buffer you want to read\n         (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "PixelFormat" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The pixel format you want the result in\n         (only COGL_PIXEL_FORMAT_RGBA_8888 supported currently)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pixels"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The location to write the pixel data."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_read_pixels" cogl_read_pixels :: 
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    CUInt ->                                -- source : TInterface (Name {namespace = "Cogl", name = "ReadPixelsFlags"})
    CUInt ->                                -- format : TInterface (Name {namespace = "Cogl", name = "PixelFormat"})
    Word8 ->                                -- pixels : TBasicType TUInt8
    IO ()

{-# DEPRECATED readPixels ["(Since version 1.16)","Use @/cogl_framebuffer_read_pixels()/@ instead"] #-}
-- | This reads a rectangle of pixels from the current framebuffer where
-- position (0, 0) is the top left. The pixel at (x, y) is the first
-- read, and the data is returned with a rowstride of (width * 4).
-- 
-- Currently Cogl assumes that the framebuffer is in a premultiplied
-- format so if /@format@/ is non-premultiplied it will convert it. To
-- read the pixel values without any conversion you should either
-- specify a format that doesn\'t use an alpha channel or use one of
-- the formats ending in PRE.
readPixels ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@x@/: The window x position to start reading from
    -> Int32
    -- ^ /@y@/: The window y position to start reading from
    -> Int32
    -- ^ /@width@/: The width of the rectangle you want to read
    -> Int32
    -- ^ /@height@/: The height of the rectangle you want to read
    -> [Cogl.Flags.ReadPixelsFlags]
    -- ^ /@source@/: Identifies which auxillary buffer you want to read
    --          (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)
    -> Cogl.Enums.PixelFormat
    -- ^ /@format@/: The pixel format you want the result in
    --          (only COGL_PIXEL_FORMAT_RGBA_8888 supported currently)
    -> Word8
    -- ^ /@pixels@/: The location to write the pixel data.
    -> m ()
readPixels :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32
-> Int32
-> Int32
-> Int32
-> [ReadPixelsFlags]
-> PixelFormat
-> Word8
-> m ()
readPixels Int32
x Int32
y Int32
width Int32
height [ReadPixelsFlags]
source PixelFormat
format Word8
pixels = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let source' :: CUInt
source' = [ReadPixelsFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ReadPixelsFlags]
source
    let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PixelFormat -> Int) -> PixelFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum) PixelFormat
format
    Int32
-> Int32 -> Int32 -> Int32 -> CUInt -> CUInt -> Word8 -> IO ()
cogl_read_pixels Int32
x Int32
y Int32
width Int32
height CUInt
source' CUInt
format' Word8
pixels
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function push_source
-- Args: [ Arg
--           { argCName = "material"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglMaterial" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_push_source" cogl_push_source :: 
    Ptr () ->                               -- material : TBasicType TPtr
    IO ()

{-# DEPRECATED pushSource ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | Pushes the given /@material@/ to the top of the source stack. The
-- material at the top of this stack defines the GPU state used to
-- process later primitives as defined by 'GI.Cogl.Functions.setSource'.
-- 
-- /Since: 1.6/
pushSource ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@material@/: A t'GI.Cogl.Structs.Material.Material'
    -> m ()
pushSource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
pushSource Ptr ()
material = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_push_source Ptr ()
material
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function push_matrix
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_push_matrix" cogl_push_matrix :: 
    IO ()

{-# DEPRECATED pushMatrix ["(Since version 1.10)","Use @/cogl_framebuffer_push_matrix()/@ instead"] #-}
-- | Stores the current model-view matrix on the matrix stack. The matrix
-- can later be restored with 'GI.Cogl.Functions.popMatrix'.
pushMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
pushMatrix :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
pushMatrix  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_push_matrix
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function push_draw_buffer
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_push_draw_buffer" cogl_push_draw_buffer :: 
    IO ()

{-# DEPRECATED pushDrawBuffer ["(Since version 1.16)","The latest drawing apis take explicit","                  @/CoglFramebuffer/@ arguments so this stack of","                  framebuffers shouldn\\'t be used anymore."] #-}
-- | Save 'GI.Cogl.Functions.setDrawBuffer' state.
pushDrawBuffer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
pushDrawBuffer :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
pushDrawBuffer  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_push_draw_buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_use
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #CoglHandle for a shader program or %COGL_INVALID_HANDLE."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_use" cogl_program_use :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED programUse ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Activate a specific shader program replacing that part of the GL
-- rendering pipeline, if passed in @/COGL_INVALID_HANDLE/@ the default
-- behavior of GL is reinstated.
-- 
-- This function affects the global state of the current Cogl
-- context. It is much more efficient to attach the shader to a
-- specific material used for rendering instead by calling
-- 'GI.Cogl.Structs.Material.materialSetUserProgram'.
programUse ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@ for a shader program or @/COGL_INVALID_HANDLE/@.
    -> m ()
programUse :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
programUse Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_program_use Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_unref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle to a program."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_unref" cogl_program_unref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED programUnref ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Removes a reference to a program. If it was the last reference the
-- program object will be destroyed.
programUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A @/CoglHandle/@ to a program.
    -> m ()
programUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
programUnref Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_program_unref Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_uniform_matrix
-- Args: [ Arg
--           { argCName = "uniform_no"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the uniform to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Size of matrix." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Size of array of uniforms."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "transpose"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether to transpose the matrix when setting the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TCArray False (-1) 2 (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "count"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "Size of array of uniforms."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_uniform_matrix" cogl_program_uniform_matrix :: 
    Int32 ->                                -- uniform_no : TBasicType TInt
    Int32 ->                                -- size : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    Int32 ->                                -- transpose : TBasicType TInt
    Ptr CFloat ->                           -- value : TCArray False (-1) 2 (TBasicType TFloat)
    IO ()

{-# DEPRECATED programUniformMatrix ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Changes the value of a matrix uniform, or uniform array in the
-- currently used (see 'GI.Cogl.Functions.programUse') shader program. The /@size@/
-- parameter is used to determine the square size of the matrix.
programUniformMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@uniformNo@/: the uniform to set.
    -> Int32
    -- ^ /@size@/: Size of matrix.
    -> Int32
    -- ^ /@transpose@/: Whether to transpose the matrix when setting the uniform.
    -> [Float]
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programUniformMatrix :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> Int32 -> [Float] -> m ()
programUniformMatrix Int32
uniformNo Int32
size Int32
transpose [Float]
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let count :: Int32
count = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Float] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Float]
value
    Ptr CFloat
value' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
value
    Int32 -> Int32 -> Int32 -> Int32 -> Ptr CFloat -> IO ()
cogl_program_uniform_matrix Int32
uniformNo Int32
size Int32
count Int32
transpose Ptr CFloat
value'
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_uniform_int
-- Args: [ Arg
--           { argCName = "uniform_no"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the uniform to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Size of int vector."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Size of array of uniforms."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TCArray False (-1) 2 (TBasicType TInt)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "count"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "Size of array of uniforms."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_uniform_int" cogl_program_uniform_int :: 
    Int32 ->                                -- uniform_no : TBasicType TInt
    Int32 ->                                -- size : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    Ptr Int32 ->                            -- value : TCArray False (-1) 2 (TBasicType TInt)
    IO ()

{-# DEPRECATED programUniformInt ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Changes the value of a int vector uniform, or uniform array in the
-- currently used (see 'GI.Cogl.Functions.programUse') shader program.
programUniformInt ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@uniformNo@/: the uniform to set.
    -> Int32
    -- ^ /@size@/: Size of int vector.
    -> [Int32]
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programUniformInt :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> [Int32] -> m ()
programUniformInt Int32
uniformNo Int32
size [Int32]
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let count :: Int32
count = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Int32]
value
    Ptr Int32
value' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
value
    Int32 -> Int32 -> Int32 -> Ptr Int32 -> IO ()
cogl_program_uniform_int Int32
uniformNo Int32
size Int32
count Ptr Int32
value'
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_uniform_float
-- Args: [ Arg
--           { argCName = "uniform_no"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the uniform to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Size of float vector."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Size of array of uniforms."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TCArray False (-1) 2 (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "count"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "Size of array of uniforms."
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_uniform_float" cogl_program_uniform_float :: 
    Int32 ->                                -- uniform_no : TBasicType TInt
    Int32 ->                                -- size : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    Ptr CFloat ->                           -- value : TCArray False (-1) 2 (TBasicType TFloat)
    IO ()

{-# DEPRECATED programUniformFloat ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Changes the value of a float vector uniform, or uniform array in the
-- currently used (see 'GI.Cogl.Functions.programUse') shader program.
programUniformFloat ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@uniformNo@/: the uniform to set.
    -> Int32
    -- ^ /@size@/: Size of float vector.
    -> [Float]
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programUniformFloat :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> [Float] -> m ()
programUniformFloat Int32
uniformNo Int32
size [Float]
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let count :: Int32
count = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Float] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Float]
value
    Ptr CFloat
value' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
value
    Int32 -> Int32 -> Int32 -> Ptr CFloat -> IO ()
cogl_program_uniform_float Int32
uniformNo Int32
size Int32
count Ptr CFloat
value'
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_uniform_1i
-- Args: [ Arg
--           { argCName = "uniform_no"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the uniform to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_uniform_1i" cogl_program_uniform_1i :: 
    Int32 ->                                -- uniform_no : TBasicType TInt
    Int32 ->                                -- value : TBasicType TInt
    IO ()

{-# DEPRECATED programUniform1i ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Changes the value of an integer uniform in the currently
-- used (see 'GI.Cogl.Functions.programUse') shader program.
programUniform1i ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@uniformNo@/: the uniform to set.
    -> Int32
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programUniform1i :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> m ()
programUniform1i Int32
uniformNo Int32
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Int32 -> Int32 -> IO ()
cogl_program_uniform_1i Int32
uniformNo Int32
value
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_uniform_1f
-- Args: [ Arg
--           { argCName = "uniform_no"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the uniform to set."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_uniform_1f" cogl_program_uniform_1f :: 
    Int32 ->                                -- uniform_no : TBasicType TInt
    CFloat ->                               -- value : TBasicType TFloat
    IO ()

{-# DEPRECATED programUniform1f ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Changes the value of a floating point uniform in the currently
-- used (see 'GI.Cogl.Functions.programUse') shader program.
programUniform1f ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@uniformNo@/: the uniform to set.
    -> Float
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programUniform1f :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Float -> m ()
programUniform1f Int32
uniformNo Float
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let value' :: CFloat
value' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
value
    Int32 -> CFloat -> IO ()
cogl_program_uniform_1f Int32
uniformNo CFloat
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_set_uniform_matrix
-- Args: [ Arg
--           { argCName = "program"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle for a linked program"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uniform_location"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the uniform location retrieved from\n   cogl_program_get_uniform_location()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dimensions"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The dimensions of the matrix. So for for example pass\n   2 for a 2x2 matrix or 3 for 3x3."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "For uniform arrays this is the array length otherwise just\npass 1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "transpose"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether to transpose the matrix when setting the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TCArray False (-1) 3 (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "count"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "For uniform arrays this is the array length otherwise just\npass 1"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_set_uniform_matrix" cogl_program_set_uniform_matrix :: 
    Ptr () ->                               -- program : TBasicType TPtr
    Int32 ->                                -- uniform_location : TBasicType TInt
    Int32 ->                                -- dimensions : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    Int32 ->                                -- transpose : TBasicType TInt
    Ptr CFloat ->                           -- value : TCArray False (-1) 3 (TBasicType TFloat)
    IO ()

{-# DEPRECATED programSetUniformMatrix ["(Since version 1.16)","Use @/CoglSnippet/@ api instead"] #-}
-- | Changes the value of a matrix uniform, or uniform array in the
-- given linked /@program@/.
-- 
-- /Since: 1.4/
programSetUniformMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@program@/: A @/CoglHandle/@ for a linked program
    -> Int32
    -- ^ /@uniformLocation@/: the uniform location retrieved from
    --    'GI.Cogl.Functions.programGetUniformLocation'.
    -> Int32
    -- ^ /@dimensions@/: The dimensions of the matrix. So for for example pass
    --    2 for a 2x2 matrix or 3 for 3x3.
    -> Int32
    -- ^ /@transpose@/: Whether to transpose the matrix when setting the uniform.
    -> [Float]
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programSetUniformMatrix :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Int32 -> Int32 -> Int32 -> [Float] -> m ()
programSetUniformMatrix Ptr ()
program Int32
uniformLocation Int32
dimensions Int32
transpose [Float]
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let count :: Int32
count = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Float] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Float]
value
    Ptr CFloat
value' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
value
    Ptr () -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr CFloat -> IO ()
cogl_program_set_uniform_matrix Ptr ()
program Int32
uniformLocation Int32
dimensions Int32
count Int32
transpose Ptr CFloat
value'
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_set_uniform_int
-- Args: [ Arg
--           { argCName = "program"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle for a linked program"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uniform_location"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the uniform location retrieved from\n   cogl_program_get_uniform_location()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_components"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The number of components for the uniform. For\nexample with glsl you'd use 3 for a vec3 or 4 for a vec4."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "For uniform arrays this is the array length otherwise just\npass 1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TCArray False (-1) 3 (TBasicType TInt)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform[s]."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "count"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "For uniform arrays this is the array length otherwise just\npass 1"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_set_uniform_int" cogl_program_set_uniform_int :: 
    Ptr () ->                               -- program : TBasicType TPtr
    Int32 ->                                -- uniform_location : TBasicType TInt
    Int32 ->                                -- n_components : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    Ptr Int32 ->                            -- value : TCArray False (-1) 3 (TBasicType TInt)
    IO ()

{-# DEPRECATED programSetUniformInt ["(Since version 1.16)","Use @/CoglSnippet/@ api instead"] #-}
-- | Changes the value of a int vector uniform, or uniform array for
-- the given linked /@program@/.
-- 
-- /Since: 1.4/
programSetUniformInt ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@program@/: A @/CoglHandle/@ for a linked program
    -> Int32
    -- ^ /@uniformLocation@/: the uniform location retrieved from
    --    'GI.Cogl.Functions.programGetUniformLocation'.
    -> Int32
    -- ^ /@nComponents@/: The number of components for the uniform. For
    -- example with glsl you\'d use 3 for a vec3 or 4 for a vec4.
    -> [Int32]
    -- ^ /@value@/: the new value of the uniform[s].
    -> m ()
programSetUniformInt :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Int32 -> Int32 -> [Int32] -> m ()
programSetUniformInt Ptr ()
program Int32
uniformLocation Int32
nComponents [Int32]
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let count :: Int32
count = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Int32]
value
    Ptr Int32
value' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
value
    Ptr () -> Int32 -> Int32 -> Int32 -> Ptr Int32 -> IO ()
cogl_program_set_uniform_int Ptr ()
program Int32
uniformLocation Int32
nComponents Int32
count Ptr Int32
value'
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_set_uniform_float
-- Args: [ Arg
--           { argCName = "program"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle for a linked program"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uniform_location"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the uniform location retrieved from\n   cogl_program_get_uniform_location()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_components"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The number of components for the uniform. For\nexample with glsl you'd use 3 for a vec3 or 4 for a vec4."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "count"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "For uniform arrays this is the array length otherwise just\npass 1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TCArray False (-1) 3 (TBasicType TFloat)
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform[s]."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "count"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText =
--                        Just
--                          "For uniform arrays this is the array length otherwise just\npass 1"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_set_uniform_float" cogl_program_set_uniform_float :: 
    Ptr () ->                               -- program : TBasicType TPtr
    Int32 ->                                -- uniform_location : TBasicType TInt
    Int32 ->                                -- n_components : TBasicType TInt
    Int32 ->                                -- count : TBasicType TInt
    Ptr CFloat ->                           -- value : TCArray False (-1) 3 (TBasicType TFloat)
    IO ()

{-# DEPRECATED programSetUniformFloat ["(Since version 1.16)","Use @/CoglSnippet/@ api instead"] #-}
-- | Changes the value of a float vector uniform, or uniform array for
-- the given linked /@program@/.
-- 
-- /Since: 1.4/
programSetUniformFloat ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@program@/: A @/CoglHandle/@ for a linked program
    -> Int32
    -- ^ /@uniformLocation@/: the uniform location retrieved from
    --    'GI.Cogl.Functions.programGetUniformLocation'.
    -> Int32
    -- ^ /@nComponents@/: The number of components for the uniform. For
    -- example with glsl you\'d use 3 for a vec3 or 4 for a vec4.
    -> [Float]
    -- ^ /@value@/: the new value of the uniform[s].
    -> m ()
programSetUniformFloat :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Int32 -> Int32 -> [Float] -> m ()
programSetUniformFloat Ptr ()
program Int32
uniformLocation Int32
nComponents [Float]
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let count :: Int32
count = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Float] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Float]
value
    Ptr CFloat
value' <- ((Float -> CFloat) -> [Float] -> IO (Ptr CFloat)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Float]
value
    Ptr () -> Int32 -> Int32 -> Int32 -> Ptr CFloat -> IO ()
cogl_program_set_uniform_float Ptr ()
program Int32
uniformLocation Int32
nComponents Int32
count Ptr CFloat
value'
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_set_uniform_1i
-- Args: [ Arg
--           { argCName = "program"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle for a linked program"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uniform_location"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the uniform location retrieved from\n   cogl_program_get_uniform_location()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_set_uniform_1i" cogl_program_set_uniform_1i :: 
    Ptr () ->                               -- program : TBasicType TPtr
    Int32 ->                                -- uniform_location : TBasicType TInt
    Int32 ->                                -- value : TBasicType TInt
    IO ()

{-# DEPRECATED programSetUniform1i ["(Since version 1.16)","Use @/CoglSnippet/@ api instead"] #-}
-- | Changes the value of an integer uniform for the given linked
-- /@program@/.
-- 
-- /Since: 1.4/
programSetUniform1i ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@program@/: A @/CoglHandle/@ for a linked program
    -> Int32
    -- ^ /@uniformLocation@/: the uniform location retrieved from
    --    'GI.Cogl.Functions.programGetUniformLocation'.
    -> Int32
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programSetUniform1i :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Int32 -> Int32 -> m ()
programSetUniform1i Ptr ()
program Int32
uniformLocation Int32
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> Int32 -> Int32 -> IO ()
cogl_program_set_uniform_1i Ptr ()
program Int32
uniformLocation Int32
value
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_set_uniform_1f
-- Args: [ Arg
--           { argCName = "program"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle for a linked program"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uniform_location"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the uniform location retrieved from\n   cogl_program_get_uniform_location()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new value of the uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_set_uniform_1f" cogl_program_set_uniform_1f :: 
    Ptr () ->                               -- program : TBasicType TPtr
    Int32 ->                                -- uniform_location : TBasicType TInt
    CFloat ->                               -- value : TBasicType TFloat
    IO ()

{-# DEPRECATED programSetUniform1f ["(Since version 1.16)","Use @/CoglSnippet/@ api instead"] #-}
-- | Changes the value of a floating point uniform for the given linked
-- /@program@/.
-- 
-- /Since: 1.4/
programSetUniform1f ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@program@/: A @/CoglHandle/@ for a linked program
    -> Int32
    -- ^ /@uniformLocation@/: the uniform location retrieved from
    --    'GI.Cogl.Functions.programGetUniformLocation'.
    -> Float
    -- ^ /@value@/: the new value of the uniform.
    -> m ()
programSetUniform1f :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Int32 -> Float -> m ()
programSetUniform1f Ptr ()
program Int32
uniformLocation Float
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let value' :: CFloat
value' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
value
    Ptr () -> Int32 -> CFloat -> IO ()
cogl_program_set_uniform_1f Ptr ()
program Int32
uniformLocation CFloat
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_ref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglHandle to a program."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_ref" cogl_program_ref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO (Ptr ())

{-# DEPRECATED programRef ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Add an extra reference to a program.
programRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A @/CoglHandle/@ to a program.
    -> m (Ptr ())
    -- ^ __Returns:__ /@handle@/
programRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m (Ptr ())
programRef Ptr ()
handle = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- Ptr () -> IO (Ptr ())
cogl_program_ref Ptr ()
handle
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function program_link
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle for a shader program."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_link" cogl_program_link :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

{-# DEPRECATED programLink ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Links a program making it ready for use. Note that calling this
-- function is optional. If it is not called the program will
-- automatically be linked the first time it is used.
programLink ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@ for a shader program.
    -> m ()
programLink :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
programLink Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_program_link Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function program_get_uniform_location
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle for a shader program."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uniform_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of a uniform."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_get_uniform_location" cogl_program_get_uniform_location :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    CString ->                              -- uniform_name : TBasicType TUTF8
    IO Int32

{-# DEPRECATED programGetUniformLocation ["(Since version 1.16)","Use @/CoglSnippet/@ api instead"] #-}
-- | Retrieve the location (offset) of a uniform variable in a shader program,
-- a uniform is a variable that is constant for all vertices\/fragments for a
-- shader object and is possible to modify as an external parameter.
programGetUniformLocation ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@ for a shader program.
    -> T.Text
    -- ^ /@uniformName@/: the name of a uniform.
    -> m Int32
    -- ^ __Returns:__ the offset of a uniform in a specified program.
    --   This uniform can be set using 'GI.Cogl.Functions.programUniform1f' when the
    --   program is in use.
programGetUniformLocation :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Text -> m Int32
programGetUniformLocation Ptr ()
handle Text
uniformName = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    CString
uniformName' <- Text -> IO CString
textToCString Text
uniformName
    Int32
result <- Ptr () -> CString -> IO Int32
cogl_program_get_uniform_location Ptr ()
handle CString
uniformName'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uniformName'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function program_attach_shader
-- Args: [ Arg
--           { argCName = "program_handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle for a shdaer program."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "shader_handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #CoglHandle for a vertex of fragment shader."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_program_attach_shader" cogl_program_attach_shader :: 
    Ptr () ->                               -- program_handle : TBasicType TPtr
    Ptr () ->                               -- shader_handle : TBasicType TPtr
    IO ()

{-# DEPRECATED programAttachShader ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Attaches a shader to a program object. A program can have multiple
-- vertex or fragment shaders but only one of them may provide a
-- @/main()/@ function. It is allowed to use a program with only a vertex
-- shader or only a fragment shader.
programAttachShader ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@programHandle@/: a @/CoglHandle/@ for a shdaer program.
    -> Ptr ()
    -- ^ /@shaderHandle@/: a @/CoglHandle/@ for a vertex of fragment shader.
    -> m ()
programAttachShader :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> Ptr () -> m ()
programAttachShader Ptr ()
programHandle Ptr ()
shaderHandle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> Ptr () -> IO ()
cogl_program_attach_shader Ptr ()
programHandle Ptr ()
shaderHandle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function pop_source
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_pop_source" cogl_pop_source :: 
    IO ()

{-# DEPRECATED popSource ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | Removes the material at the top of the source stack. The material
-- at the top of this stack defines the GPU state used to process
-- later primitives as defined by 'GI.Cogl.Functions.setSource'.
-- 
-- /Since: 1.6/
popSource ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
popSource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
popSource  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_pop_source
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function pop_matrix
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_pop_matrix" cogl_pop_matrix :: 
    IO ()

{-# DEPRECATED popMatrix ["(Since version 1.10)","Use @/cogl_framebuffer_pop_matrix()/@ instead"] #-}
-- | Restores the current model-view matrix from the matrix stack.
popMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
popMatrix :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
popMatrix  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_pop_matrix
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function pop_framebuffer
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_pop_framebuffer" cogl_pop_framebuffer :: 
    IO ()

{-# DEPRECATED popFramebuffer ["(Since version 1.16)","The latest drawing apis take explicit","                  @/CoglFramebuffer/@ arguments so this stack of","                  framebuffers shouldn\\'t be used anymore."] #-}
-- | Restores the framebuffer that was previously at the top of the stack.
-- All subsequent drawing will be redirected to this framebuffer.
-- 
-- /Since: 1.2/
popFramebuffer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
popFramebuffer :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
popFramebuffer  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_pop_framebuffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function pop_draw_buffer
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_pop_draw_buffer" cogl_pop_draw_buffer :: 
    IO ()

{-# DEPRECATED popDrawBuffer ["(Since version 1.16)","The latest drawing apis take explicit","                  @/CoglFramebuffer/@ arguments so this stack of","                  framebuffers shouldn\\'t be used anymore."] #-}
-- | Restore 'GI.Cogl.Functions.setDrawBuffer' state.
popDrawBuffer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
popDrawBuffer :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
popDrawBuffer  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_pop_draw_buffer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function polygon
-- Args: [ Arg
--           { argCName = "vertices"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "TextureVertex" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An array of #CoglTextureVertex structs"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_vertices"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The length of the vertices array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "use_color"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "%TRUE if the color member of #CoglTextureVertex should be used"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_polygon" cogl_polygon :: 
    Ptr Cogl.TextureVertex.TextureVertex -> -- vertices : TInterface (Name {namespace = "Cogl", name = "TextureVertex"})
    Word32 ->                               -- n_vertices : TBasicType TUInt
    Int32 ->                                -- use_color : TBasicType TInt
    IO ()

-- | Draws a convex polygon using the current source material to fill \/ texture
-- with according to the texture coordinates passed.
-- 
-- If /@useColor@/ is 'P.True' then the color will be changed for each vertex using
-- the value specified in the color member of t'GI.Cogl.Structs.TextureVertex.TextureVertex'. This can be
-- used for example to make the texture fade out by setting the alpha value of
-- the color.
-- 
-- All of the texture coordinates must be in the range [0,1] and repeating the
-- texture is not supported.
-- 
-- Because of the way this function is implemented it will currently
-- only work if either the texture is not sliced or the backend is not
-- OpenGL ES and the minifying and magnifying functions are both set
-- to COGL_MATERIAL_FILTER_NEAREST.
-- 
-- /Since: 1.0/
polygon ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.TextureVertex.TextureVertex
    -- ^ /@vertices@/: An array of t'GI.Cogl.Structs.TextureVertex.TextureVertex' structs
    -> Word32
    -- ^ /@nVertices@/: The length of the vertices array
    -> Int32
    -- ^ /@useColor@/: 'P.True' if the color member of t'GI.Cogl.Structs.TextureVertex.TextureVertex' should be used
    -> m ()
polygon :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TextureVertex -> Word32 -> Int32 -> m ()
polygon TextureVertex
vertices Word32
nVertices Int32
useColor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TextureVertex
vertices' <- TextureVertex -> IO (Ptr TextureVertex)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextureVertex
vertices
    Ptr TextureVertex -> Word32 -> Int32 -> IO ()
cogl_polygon Ptr TextureVertex
vertices' Word32
nVertices Int32
useColor
    TextureVertex -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextureVertex
vertices
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function perspective
-- Args: [ Arg
--           { argCName = "fovy"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Vertical field of view angle in degrees."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "aspect"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The (width over height) aspect ratio for display"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z_near"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The distance to the near clipping plane (Must be positive)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z_far"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The distance to the far clipping plane (Must be positive)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_perspective" cogl_perspective :: 
    CFloat ->                               -- fovy : TBasicType TFloat
    CFloat ->                               -- aspect : TBasicType TFloat
    CFloat ->                               -- z_near : TBasicType TFloat
    CFloat ->                               -- z_far : TBasicType TFloat
    IO ()

{-# DEPRECATED perspective ["(Since version 1.10)","Use @/cogl_framebuffer_perspective()/@ instead"] #-}
-- | Replaces the current projection matrix with a perspective matrix
-- based on the provided values.
-- 
-- \<note>You should be careful not to have to great a /@zFar@/ \/ /@zNear@/
-- ratio since that will reduce the effectiveness of depth testing
-- since there wont be enough precision to identify the depth of
-- objects near to each other.\<\/note>
perspective ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@fovy@/: Vertical field of view angle in degrees.
    -> Float
    -- ^ /@aspect@/: The (width over height) aspect ratio for display
    -> Float
    -- ^ /@zNear@/: The distance to the near clipping plane (Must be positive)
    -> Float
    -- ^ /@zFar@/: The distance to the far clipping plane (Must be positive)
    -> m ()
perspective :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
perspective Float
fovy Float
aspect Float
zNear Float
zFar = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let fovy' :: CFloat
fovy' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
fovy
    let aspect' :: CFloat
aspect' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
aspect
    let zNear' :: CFloat
zNear' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
zNear
    let zFar' :: CFloat
zFar' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
zFar
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_perspective CFloat
fovy' CFloat
aspect' CFloat
zNear' CFloat
zFar'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function ortho
-- Args: [ Arg
--           { argCName = "left"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The coordinate for the left clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "right"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The coordinate for the right clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bottom"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The coordinate for the bottom clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "top"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The coordinate for the top clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "near"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The <emphasis>distance</emphasis> to the near clipping\n  plane (negative if the plane is behind the viewer)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "far"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The <emphasis>distance</emphasis> for the far clipping\n  plane (negative if the plane is behind the viewer)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_ortho" cogl_ortho :: 
    CFloat ->                               -- left : TBasicType TFloat
    CFloat ->                               -- right : TBasicType TFloat
    CFloat ->                               -- bottom : TBasicType TFloat
    CFloat ->                               -- top : TBasicType TFloat
    CFloat ->                               -- near : TBasicType TFloat
    CFloat ->                               -- far : TBasicType TFloat
    IO ()

{-# DEPRECATED ortho ["(Since version 1.10)","Use @/cogl_framebuffer_orthographic()/@ instead"] #-}
-- | Replaces the current projection matrix with an orthographic projection
-- matrix. See \<xref linkend=\"cogl-ortho-matrix\"\/> to see how the matrix is
-- calculated.
-- 
-- \<figure id=\"cogl-ortho-matrix\">
--   \<title>\<\/title>
--   \<graphic fileref=\"cogl_ortho.png\" format=\"PNG\"\/>
-- \<\/figure>
-- 
-- \<note>This function copies the arguments from OpenGL\'s @/glOrtho()/@ even
-- though they are unnecessarily confusing due to the z near and z far
-- arguments actually being a \"distance\" from the origin, where
-- negative values are behind the viewer, instead of coordinates for
-- the z clipping planes which would have been consistent with the
-- left, right bottom and top arguments.\<\/note>
-- 
-- /Since: 1.0/
ortho ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@left@/: The coordinate for the left clipping plane
    -> Float
    -- ^ /@right@/: The coordinate for the right clipping plane
    -> Float
    -- ^ /@bottom@/: The coordinate for the bottom clipping plane
    -> Float
    -- ^ /@top@/: The coordinate for the top clipping plane
    -> Float
    -- ^ /@near@/: The \<emphasis>distance\<\/emphasis> to the near clipping
    --   plane (negative if the plane is behind the viewer)
    -> Float
    -- ^ /@far@/: The \<emphasis>distance\<\/emphasis> for the far clipping
    --   plane (negative if the plane is behind the viewer)
    -> m ()
ortho :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> Float -> Float -> m ()
ortho Float
left Float
right Float
bottom Float
top Float
near Float
far = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let left' :: CFloat
left' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
left
    let right' :: CFloat
right' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
right
    let bottom' :: CFloat
bottom' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
bottom
    let top' :: CFloat
top' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
top
    let near' :: CFloat
near' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
near
    let far' :: CFloat
far' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
far
    CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_ortho CFloat
left' CFloat
right' CFloat
bottom' CFloat
top' CFloat
near' CFloat
far'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function onscreen_clutter_backend_set_size_CLUTTER
-- Args: [ Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_onscreen_clutter_backend_set_size_CLUTTER" cogl_onscreen_clutter_backend_set_size_CLUTTER :: 
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | /No description available in the introspection data./
onscreenClutterBackendSetSizeCLUTTER ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -> Int32
    -> m ()
onscreenClutterBackendSetSizeCLUTTER :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> m ()
onscreenClutterBackendSetSizeCLUTTER Int32
width Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Int32 -> Int32 -> IO ()
cogl_onscreen_clutter_backend_set_size_CLUTTER Int32
width Int32
height
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function is_vertex_buffer_indices
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_vertex_buffer_indices" cogl_is_vertex_buffer_indices :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Int32

{-# DEPRECATED isVertexBufferIndices ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Checks whether /@handle@/ is a handle to the indices for a vertex
-- buffer object
-- 
-- /Since: 1.4/
isVertexBufferIndices ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the handle is indices, and 'P.False'
    --   otherwise
isVertexBufferIndices :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isVertexBufferIndices Ptr ()
handle = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_vertex_buffer_indices Ptr ()
handle
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_vertex_buffer
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle for a vertex buffer object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_vertex_buffer" cogl_is_vertex_buffer :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Int32

{-# DEPRECATED isVertexBuffer ["(Since version 1.16)","Use the @/CoglPrimitive/@ api instead"] #-}
-- | Checks whether /@handle@/ is a Vertex Buffer Object
-- 
-- /Since: 1.0/
isVertexBuffer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@ for a vertex buffer object
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the handle is a VBO, and 'P.False'
    --   otherwise
isVertexBuffer :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isVertexBuffer Ptr ()
handle = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_vertex_buffer Ptr ()
handle
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_texture
-- Args: [ Arg
--           { argCName = "object"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglObject pointer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_texture" cogl_is_texture :: 
    Ptr () ->                               -- object : TBasicType TPtr
    IO Int32

-- | Gets whether the given object references a texture object.
isTexture ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@object@/: A @/CoglObject/@ pointer
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the /@object@/ references a texture, and
    --   'P.False' otherwise
isTexture :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isTexture Ptr ()
object = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_texture Ptr ()
object
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_shader
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A CoglHandle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_shader" cogl_is_shader :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Int32

{-# DEPRECATED isShader ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Gets whether the given handle references an existing shader object.
isShader ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A CoglHandle
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the handle references a shader,
    --   'P.False' otherwise
isShader :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isShader Ptr ()
handle = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_shader Ptr ()
handle
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_program
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A CoglHandle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_program" cogl_is_program :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Int32

{-# DEPRECATED isProgram ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Gets whether the given handle references an existing program object.
isProgram ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A CoglHandle
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the handle references a program,
    --   'P.False' otherwise
isProgram :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isProgram Ptr ()
handle = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_program Ptr ()
handle
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_offscreen
-- Args: [ Arg
--           { argCName = "object"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A pointer to a #CoglObject"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_offscreen" cogl_is_offscreen :: 
    Ptr () ->                               -- object : TBasicType TPtr
    IO Int32

-- | Determines whether the given @/CoglObject/@ references an offscreen
-- framebuffer object.
isOffscreen ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@object@/: A pointer to a @/CoglObject/@
    -> m Int32
    -- ^ __Returns:__ 'P.True' if /@object@/ is a t'GI.Cogl.Objects.Offscreen.Offscreen' framebuffer,
    --          'P.False' otherwise
isOffscreen :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isOffscreen Ptr ()
object = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_offscreen Ptr ()
object
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_material
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A CoglHandle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_material" cogl_is_material :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO Int32

{-# DEPRECATED isMaterial ["(Since version 1.16)","Use @/cogl_is_pipeline()/@ instead"] #-}
-- | Gets whether the given handle references an existing material object.
isMaterial ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: A CoglHandle
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the handle references a t'GI.Cogl.Structs.Material.Material',
    --   'P.False' otherwise
isMaterial :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isMaterial Ptr ()
handle = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_material Ptr ()
handle
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function is_bitmap
-- Args: [ Arg
--           { argCName = "object"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglObject pointer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_is_bitmap" cogl_is_bitmap :: 
    Ptr () ->                               -- object : TBasicType TPtr
    IO Int32

-- | Checks whether /@object@/ is a t'GI.Cogl.Objects.Bitmap.Bitmap'
-- 
-- /Since: 1.0/
isBitmap ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@object@/: a @/CoglObject/@ pointer
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the passed /@object@/ represents a bitmap,
    --   and 'P.False' otherwise
isBitmap :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Int32
isBitmap Ptr ()
object = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> IO Int32
cogl_is_bitmap Ptr ()
object
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function handle_unref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_handle_unref" cogl_handle_unref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO ()

-- | Drecreases the reference count of /@handle@/ by 1; if the reference
-- count reaches 0, the resources allocated by /@handle@/ will be freed
handleUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@
    -> m ()
handleUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m ()
handleUnref Ptr ()
handle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr () -> IO ()
cogl_handle_unref Ptr ()
handle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function handle_ref
-- Args: [ Arg
--           { argCName = "handle"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #CoglHandle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_handle_ref" cogl_handle_ref :: 
    Ptr () ->                               -- handle : TBasicType TPtr
    IO (Ptr ())

-- | Increases the reference count of /@handle@/ by 1
handleRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@handle@/: a @/CoglHandle/@
    -> m (Ptr ())
    -- ^ __Returns:__ the handle, with its reference count increased
handleRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m (Ptr ())
handleRef Ptr ()
handle = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- Ptr () -> IO (Ptr ())
cogl_handle_ref Ptr ()
handle
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function handle_get_type
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_handle_get_type" cogl_handle_get_type :: 
    IO CGType

-- | /No description available in the introspection data./
handleGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m GType
handleGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
handleGetType  = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
    CGType
result <- IO CGType
cogl_handle_get_type
    let result' :: GType
result' = CGType -> GType
GType CGType
result
    GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'


-- function gtype_matrix_get_type
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_gtype_matrix_get_type" cogl_gtype_matrix_get_type :: 
    IO CGType

{-# DEPRECATED gtypeMatrixGetType ["(Since version 1.18)","Use @/cogl_matrix_get_gtype()/@ instead."] #-}
-- | /No description available in the introspection data./
gtypeMatrixGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m GType
    -- ^ __Returns:__ the GType for the registered \"CoglMatrix\" boxed type. This
    -- can be used for example to define GObject properties that accept a
    -- t'GI.Cogl.Structs.Matrix.Matrix' value.
gtypeMatrixGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
gtypeMatrixGetType  = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
    CGType
result <- IO CGType
cogl_gtype_matrix_get_type
    let result' :: GType
result' = CGType -> GType
GType CGType
result
    GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'


-- function get_viewport
-- Args: [ Arg
--           { argCName = "v"
--           , argType = TCArray False 4 (-1) (TBasicType TFloat)
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "pointer to a 4 element array\n  of #float<!-- -->s to receive the viewport dimensions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_viewport" cogl_get_viewport :: 
    Ptr (Ptr CFloat) ->                     -- v : TCArray False 4 (-1) (TBasicType TFloat)
    IO ()

{-# DEPRECATED getViewport ["(Since version 1.10)","Use @/cogl_framebuffer_get_viewport4fv()/@","                  instead"] #-}
-- | Stores the current viewport in /@v@/. /@v@/[0] and /@v@/[1] get the x and y
-- position of the viewport and /@v@/[2] and /@v@/[3] get the width and
-- height.
getViewport ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ([Float])
getViewport :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [Float]
getViewport  = IO [Float] -> m [Float]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Float] -> m [Float]) -> IO [Float] -> m [Float]
forall a b. (a -> b) -> a -> b
$ do
    Ptr (Ptr CFloat)
v <- IO (Ptr (Ptr CFloat))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr CFloat))
    Ptr (Ptr CFloat) -> IO ()
cogl_get_viewport Ptr (Ptr CFloat)
v
    Ptr CFloat
v' <- Ptr (Ptr CFloat) -> IO (Ptr CFloat)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr CFloat)
v
    [Float]
v'' <- ((CFloat -> Float) -> Integer -> Ptr CFloat -> IO [Float]
forall a b c.
(Integral a, Storable b) =>
(b -> c) -> a -> Ptr b -> IO [c]
unpackMapStorableArrayWithLength CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac Integer
4) Ptr CFloat
v'
    Ptr CFloat -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CFloat
v'
    Ptr (Ptr CFloat) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CFloat)
v
    [Float] -> IO [Float]
forall (m :: * -> *) a. Monad m => a -> m a
return [Float]
v''


-- function get_source
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_source" cogl_get_source :: 
    IO (Ptr ())

{-# DEPRECATED getSource ["(Since version 1.16)","Latest drawing apis all take an explicit","                  @/CoglPipeline/@ argument so this stack of","                  t'GI.Cogl.Structs.Material.Material's shouldn\\'t be used."] #-}
-- | Returns the current source material as previously set using
-- 'GI.Cogl.Functions.setSource'.
-- 
-- \<note>You should typically consider the returned material immutable
-- and not try to change any of its properties unless you own a
-- reference to that material. At times you may be able to get a
-- reference to an internally managed materials and the result of
-- modifying such materials is undefined.\<\/note>
-- 
-- /Since: 1.6/
getSource ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m (Ptr ())
    -- ^ __Returns:__ The current source material.
getSource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m (Ptr ())
getSource  = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- IO (Ptr ())
cogl_get_source
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function get_projection_matrix
-- Args: [ Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Matrix" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the projection matrix"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_projection_matrix" cogl_get_projection_matrix :: 
    Ptr Cogl.Matrix.Matrix ->               -- matrix : TInterface (Name {namespace = "Cogl", name = "Matrix"})
    IO ()

{-# DEPRECATED getProjectionMatrix ["(Since version 1.10)","Use @/cogl_framebuffer_get_projection_matrix()/@","                  instead"] #-}
-- | Stores the current projection matrix in /@matrix@/.
getProjectionMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m (Cogl.Matrix.Matrix)
getProjectionMatrix :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Matrix
getProjectionMatrix  = IO Matrix -> m Matrix
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Matrix -> m Matrix) -> IO Matrix -> m Matrix
forall a b. (a -> b) -> a -> b
$ do
    Ptr Matrix
matrix <- Int -> IO (Ptr Matrix)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
152 :: IO (Ptr Cogl.Matrix.Matrix)
    Ptr Matrix -> IO ()
cogl_get_projection_matrix Ptr Matrix
matrix
    Matrix
matrix' <- ((ManagedPtr Matrix -> Matrix) -> Ptr Matrix -> IO Matrix
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Matrix -> Matrix
Cogl.Matrix.Matrix) Ptr Matrix
matrix
    Matrix -> IO Matrix
forall (m :: * -> *) a. Monad m => a -> m a
return Matrix
matrix'


-- function get_option_group
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GLib" , name = "OptionGroup" })
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_option_group" cogl_get_option_group :: 
    IO (Ptr GLib.OptionGroup.OptionGroup)

{-# DEPRECATED getOptionGroup ["(Since version 1.16)","Not replaced"] #-}
-- | Retrieves the t'GI.GLib.Structs.OptionGroup.OptionGroup' used by Cogl to parse the command
-- line options. Clutter uses this to handle the Cogl command line
-- options during its initialization process.
-- 
-- /Since: 1.0/
getOptionGroup ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m GLib.OptionGroup.OptionGroup
    -- ^ __Returns:__ a t'GI.GLib.Structs.OptionGroup.OptionGroup'
getOptionGroup :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m OptionGroup
getOptionGroup  = IO OptionGroup -> m OptionGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OptionGroup -> m OptionGroup)
-> IO OptionGroup -> m OptionGroup
forall a b. (a -> b) -> a -> b
$ do
    Ptr OptionGroup
result <- IO (Ptr OptionGroup)
cogl_get_option_group
    Text -> Ptr OptionGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"getOptionGroup" Ptr OptionGroup
result
    OptionGroup
result' <- ((ManagedPtr OptionGroup -> OptionGroup)
-> Ptr OptionGroup -> IO OptionGroup
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OptionGroup -> OptionGroup
GLib.OptionGroup.OptionGroup) Ptr OptionGroup
result
    OptionGroup -> IO OptionGroup
forall (m :: * -> *) a. Monad m => a -> m a
return OptionGroup
result'


-- function get_modelview_matrix
-- Args: [ Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Matrix" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the model-view matrix"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_modelview_matrix" cogl_get_modelview_matrix :: 
    Ptr Cogl.Matrix.Matrix ->               -- matrix : TInterface (Name {namespace = "Cogl", name = "Matrix"})
    IO ()

{-# DEPRECATED getModelviewMatrix ["(Since version 1.10)","Use @/cogl_framebuffer_get_modelview_matrix()/@","                  instead"] #-}
-- | Stores the current model-view matrix in /@matrix@/.
getModelviewMatrix ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m (Cogl.Matrix.Matrix)
getModelviewMatrix :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Matrix
getModelviewMatrix  = IO Matrix -> m Matrix
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Matrix -> m Matrix) -> IO Matrix -> m Matrix
forall a b. (a -> b) -> a -> b
$ do
    Ptr Matrix
matrix <- Int -> IO (Ptr Matrix)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
152 :: IO (Ptr Cogl.Matrix.Matrix)
    Ptr Matrix -> IO ()
cogl_get_modelview_matrix Ptr Matrix
matrix
    Matrix
matrix' <- ((ManagedPtr Matrix -> Matrix) -> Ptr Matrix -> IO Matrix
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Matrix -> Matrix
Cogl.Matrix.Matrix) Ptr Matrix
matrix
    Matrix -> IO Matrix
forall (m :: * -> *) a. Monad m => a -> m a
return Matrix
matrix'


-- function get_features
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Cogl" , name = "FeatureFlags" })
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_features" cogl_get_features :: 
    IO CUInt

{-# DEPRECATED getFeatures ["(Since version 1.10)","Use @/cogl_foreach_feature()/@ instead"] #-}
-- | Returns all of the features supported by COGL.
-- 
-- /Since: 0.8/
getFeatures ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m [Cogl.Flags.FeatureFlags]
    -- ^ __Returns:__ A logical OR of all the supported COGL features.
getFeatures :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [FeatureFlags]
getFeatures  = IO [FeatureFlags] -> m [FeatureFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [FeatureFlags] -> m [FeatureFlags])
-> IO [FeatureFlags] -> m [FeatureFlags]
forall a b. (a -> b) -> a -> b
$ do
    CUInt
result <- IO CUInt
cogl_get_features
    let result' :: [FeatureFlags]
result' = CUInt -> [FeatureFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    [FeatureFlags] -> IO [FeatureFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [FeatureFlags]
result'


-- function get_depth_test_enabled
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_depth_test_enabled" cogl_get_depth_test_enabled :: 
    IO Int32

{-# DEPRECATED getDepthTestEnabled ["(Since version 1.16)","Use @/cogl_pipeline_set_depth_state()/@ instead"] #-}
-- | Queries if depth testing has been enabled via @/cogl_set_depth_test_enable()/@
getDepthTestEnabled ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Int32
    -- ^ __Returns:__ 'P.True' if depth testing is enabled, and 'P.False' otherwise
getDepthTestEnabled :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Int32
getDepthTestEnabled  = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- IO Int32
cogl_get_depth_test_enabled
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function get_bitmasks
-- Args: [ Arg
--           { argCName = "red"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Return location for the number of red bits or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "green"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Return location for the number of green bits or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "blue"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Return location for the number of blue bits or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "alpha"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Return location for the number of alpha bits or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_bitmasks" cogl_get_bitmasks :: 
    Ptr Int32 ->                            -- red : TBasicType TInt
    Ptr Int32 ->                            -- green : TBasicType TInt
    Ptr Int32 ->                            -- blue : TBasicType TInt
    Ptr Int32 ->                            -- alpha : TBasicType TInt
    IO ()

{-# DEPRECATED getBitmasks ["(Since version 1.8)","Use cogl_framebuffer_get_red\\/green\\/blue\\/@/alpha_bits()/@","                 instead"] #-}
-- | Gets the number of bitplanes used for each of the color components
-- in the color buffer. Pass 'P.Nothing' for any of the arguments if the
-- value is not required.
getBitmasks ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ((Int32, Int32, Int32, Int32))
getBitmasks :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
m (Int32, Int32, Int32, Int32)
getBitmasks  = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Int32
red <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
green <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
blue <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
alpha <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
cogl_get_bitmasks Ptr Int32
red Ptr Int32
green Ptr Int32
blue Ptr Int32
alpha
    Int32
red' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
red
    Int32
green' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
green
    Int32
blue' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
blue
    Int32
alpha' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
alpha
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
red
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
green
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
blue
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
alpha
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
red', Int32
green', Int32
blue', Int32
alpha')


-- function get_backface_culling_enabled
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_get_backface_culling_enabled" cogl_get_backface_culling_enabled :: 
    IO Int32

{-# DEPRECATED getBackfaceCullingEnabled ["(Since version 1.16)","Use @/cogl_pipeline_get_cull_face_mode()/@ instead"] #-}
-- | Queries if backface culling has been enabled via
-- 'GI.Cogl.Functions.setBackfaceCullingEnabled'
getBackfaceCullingEnabled ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Int32
    -- ^ __Returns:__ 'P.True' if backface culling is enabled, and 'P.False' otherwise
getBackfaceCullingEnabled :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Int32
getBackfaceCullingEnabled  = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- IO Int32
cogl_get_backface_culling_enabled
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function frustum
-- Args: [ Arg
--           { argCName = "left"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position of the left clipping plane where it\n  intersects the near clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "right"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position of the right clipping plane where it\n  intersects the near clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bottom"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position of the bottom clipping plane where it\n  intersects the near clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "top"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position of the top clipping plane where it intersects\n  the near clipping plane"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z_near"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The distance to the near clipping plane (Must be positive)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "z_far"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The distance to the far clipping plane (Must be positive)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_frustum" cogl_frustum :: 
    CFloat ->                               -- left : TBasicType TFloat
    CFloat ->                               -- right : TBasicType TFloat
    CFloat ->                               -- bottom : TBasicType TFloat
    CFloat ->                               -- top : TBasicType TFloat
    CFloat ->                               -- z_near : TBasicType TFloat
    CFloat ->                               -- z_far : TBasicType TFloat
    IO ()

{-# DEPRECATED frustum ["(Since version 1.10)","Use @/cogl_framebuffer_frustum()/@ instead"] #-}
-- | Replaces the current projection matrix with a perspective matrix
-- for a given viewing frustum defined by 4 side clip planes that
-- all cross through the origin and 2 near and far clip planes.
-- 
-- /Since: 0.8.2/
frustum ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@left@/: X position of the left clipping plane where it
    --   intersects the near clipping plane
    -> Float
    -- ^ /@right@/: X position of the right clipping plane where it
    --   intersects the near clipping plane
    -> Float
    -- ^ /@bottom@/: Y position of the bottom clipping plane where it
    --   intersects the near clipping plane
    -> Float
    -- ^ /@top@/: Y position of the top clipping plane where it intersects
    --   the near clipping plane
    -> Float
    -- ^ /@zNear@/: The distance to the near clipping plane (Must be positive)
    -> Float
    -- ^ /@zFar@/: The distance to the far clipping plane (Must be positive)
    -> m ()
frustum :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> Float -> Float -> m ()
frustum Float
left Float
right Float
bottom Float
top Float
zNear Float
zFar = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let left' :: CFloat
left' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
left
    let right' :: CFloat
right' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
right
    let bottom' :: CFloat
bottom' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
bottom
    let top' :: CFloat
top' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
top
    let zNear' :: CFloat
zNear' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
zNear
    let zFar' :: CFloat
zFar' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
zFar
    CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_frustum CFloat
left' CFloat
right' CFloat
bottom' CFloat
top' CFloat
zNear' CFloat
zFar'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function flush
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_flush" cogl_flush :: 
    IO ()

-- | This function should only need to be called in exceptional circumstances.
-- 
-- As an optimization Cogl drawing functions may batch up primitives
-- internally, so if you are trying to use raw GL outside of Cogl you stand a
-- better chance of being successful if you ask Cogl to flush any batched
-- geometry before making your state changes.
-- 
-- It only ensure that the underlying driver is issued all the commands
-- necessary to draw the batched primitives. It provides no guarantees about
-- when the driver will complete the rendering.
-- 
-- This provides no guarantees about the GL state upon returning and to avoid
-- confusing Cogl you should aim to restore any changes you make before
-- resuming use of Cogl.
-- 
-- If you are making state changes with the intention of affecting Cogl drawing
-- primitives you are 100% on your own since you stand a good chance of
-- conflicting with Cogl internals. For example clutter-gst which currently
-- uses direct GL calls to bind ARBfp programs will very likely break when Cogl
-- starts to use ARBfb programs itself for the material API.
-- 
-- /Since: 1.0/
flush ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
flush :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
flush  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_flush
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function features_available
-- Args: [ Arg
--           { argCName = "features"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "FeatureFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A bitmask of features to check for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_features_available" cogl_features_available :: 
    CUInt ->                                -- features : TInterface (Name {namespace = "Cogl", name = "FeatureFlags"})
    IO Int32

{-# DEPRECATED featuresAvailable ["(Since version 1.10)","Use @/cogl_has_feature()/@ instead"] #-}
-- | Checks whether the given COGL features are available. Multiple
-- features can be checked for by or-ing them together with the \'|\'
-- operator. 'P.True' is only returned if all of the requested features
-- are available.
featuresAvailable ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Cogl.Flags.FeatureFlags]
    -- ^ /@features@/: A bitmask of features to check for
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the features are available, 'P.False' otherwise.
featuresAvailable :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[FeatureFlags] -> m Int32
featuresAvailable [FeatureFlags]
features = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let features' :: CUInt
features' = [FeatureFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [FeatureFlags]
features
    Int32
result <- CUInt -> IO Int32
cogl_features_available CUInt
features'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function end_gl
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_end_gl" cogl_end_gl :: 
    IO ()

{-# DEPRECATED endGl ["(Since version 1.16)","Use the @/CoglGLES2Context/@ api instead"] #-}
-- | This is the counterpart to 'GI.Cogl.Functions.beginGl' used to delimit blocks of drawing
-- code using raw OpenGL. Please refer to 'GI.Cogl.Functions.beginGl' for full details.
-- 
-- /Since: 1.0/
endGl ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
endGl :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
endGl  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_end_gl
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function double_to_uint
-- Args: [ Arg
--           { argCName = "value"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_double_to_uint" cogl_double_to_uint :: 
    CDouble ->                              -- value : TBasicType TDouble
    IO Word32

-- | /No description available in the introspection data./
doubleToUint ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Double
    -> m Word32
doubleToUint :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Double -> m Word32
doubleToUint Double
value = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    let value' :: CDouble
value' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
value
    Word32
result <- CDouble -> IO Word32
cogl_double_to_uint CDouble
value'
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function double_to_int
-- Args: [ Arg
--           { argCName = "value"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_double_to_int" cogl_double_to_int :: 
    CDouble ->                              -- value : TBasicType TDouble
    IO Int32

-- | /No description available in the introspection data./
doubleToInt ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Double
    -> m Int32
doubleToInt :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Double -> m Int32
doubleToInt Double
value = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let value' :: CDouble
value' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
value
    Int32
result <- CDouble -> IO Int32
cogl_double_to_int CDouble
value'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function disable_fog
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_disable_fog" cogl_disable_fog :: 
    IO ()

{-# DEPRECATED disableFog ["(Since version 1.16)","Use @/CoglSnippet/@ shader api for fog"] #-}
-- | This function disables fogging, so primitives drawn afterwards will not be
-- blended with any previously set fog color.
disableFog ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
disableFog :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
disableFog  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_disable_fog
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function debug_matrix_print
-- Args: [ Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "Matrix" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #CoglMatrix" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_debug_matrix_print" cogl_debug_matrix_print :: 
    Ptr Cogl.Matrix.Matrix ->               -- matrix : TInterface (Name {namespace = "Cogl", name = "Matrix"})
    IO ()

-- | Prints the contents of a t'GI.Cogl.Structs.Matrix.Matrix' to stdout.
-- 
-- /Since: 2.0/
debugMatrixPrint ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Matrix.Matrix
    -- ^ /@matrix@/: A t'GI.Cogl.Structs.Matrix.Matrix'
    -> m ()
debugMatrixPrint :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Matrix -> m ()
debugMatrixPrint Matrix
matrix = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Matrix
matrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
matrix
    Ptr Matrix -> IO ()
cogl_debug_matrix_print Ptr Matrix
matrix'
    Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Matrix
matrix
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function create_shader
-- Args: [ Arg
--           { argCName = "shader_type"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "ShaderType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "COGL_SHADER_TYPE_VERTEX or COGL_SHADER_TYPE_FRAGMENT."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_create_shader" cogl_create_shader :: 
    CUInt ->                                -- shader_type : TInterface (Name {namespace = "Cogl", name = "ShaderType"})
    IO (Ptr ())

{-# DEPRECATED createShader ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Create a new shader handle, use 'GI.Cogl.Functions.shaderSource' to set the
-- source code to be used on it.
createShader ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Enums.ShaderType
    -- ^ /@shaderType@/: COGL_SHADER_TYPE_VERTEX or COGL_SHADER_TYPE_FRAGMENT.
    -> m (Ptr ())
    -- ^ __Returns:__ a new shader handle.
createShader :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
ShaderType -> m (Ptr ())
createShader ShaderType
shaderType = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    let shaderType' :: CUInt
shaderType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ShaderType -> Int) -> ShaderType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ShaderType -> Int
forall a. Enum a => a -> Int
fromEnum) ShaderType
shaderType
    Ptr ()
result <- CUInt -> IO (Ptr ())
cogl_create_shader CUInt
shaderType'
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function create_program
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_create_program" cogl_create_program :: 
    IO (Ptr ())

{-# DEPRECATED createProgram ["(Since version 1.16)","Use @/CoglSnippet/@ api"] #-}
-- | Create a new cogl program object that can be used to replace parts of the GL
-- rendering pipeline with custom code.
createProgram ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m (Ptr ())
    -- ^ __Returns:__ a new cogl program.
createProgram :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m (Ptr ())
createProgram  = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr ()
result <- IO (Ptr ())
cogl_create_program
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result


-- function clutter_winsys_has_feature_CLUTTER
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Cogl" , name = "WinsysFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clutter_winsys_has_feature_CLUTTER" cogl_clutter_winsys_has_feature_CLUTTER :: 
    CUInt ->                                -- feature : TInterface (Name {namespace = "Cogl", name = "WinsysFeature"})
    IO Int32

-- | /No description available in the introspection data./
clutterWinsysHasFeatureCLUTTER ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Enums.WinsysFeature
    -> m Int32
clutterWinsysHasFeatureCLUTTER :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
WinsysFeature -> m Int32
clutterWinsysHasFeatureCLUTTER WinsysFeature
feature = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    let feature' :: CUInt
feature' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (WinsysFeature -> Int) -> WinsysFeature -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WinsysFeature -> Int
forall a. Enum a => a -> Int
fromEnum) WinsysFeature
feature
    Int32
result <- CUInt -> IO Int32
cogl_clutter_winsys_has_feature_CLUTTER CUInt
feature'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function clutter_check_extension_CLUTTER
-- Args: [ Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ext"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clutter_check_extension_CLUTTER" cogl_clutter_check_extension_CLUTTER :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- ext : TBasicType TUTF8
    IO Int32

-- | /No description available in the introspection data./
clutterCheckExtensionCLUTTER ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -> T.Text
    -> m Int32
clutterCheckExtensionCLUTTER :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Text -> m Int32
clutterCheckExtensionCLUTTER Text
name Text
ext = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
ext' <- Text -> IO CString
textToCString Text
ext
    Int32
result <- CString -> CString -> IO Int32
cogl_clutter_check_extension_CLUTTER CString
name' CString
ext'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
ext'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function clip_stack_save
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_stack_save" cogl_clip_stack_save :: 
    IO ()

{-# DEPRECATED clipStackSave ["(Since version 1.2)","This was originally added to allow us to save the","  clip stack when switching to an offscreen framebuffer, but it\\'s","  not necessary anymore given that framebuffers now own separate","  clip stacks which will be automatically switched between when a","  new buffer is set. Calling this function has no effect"] #-}
-- | Save the entire state of the clipping stack and then clear all
-- clipping. The previous state can be returned to with
-- 'GI.Cogl.Functions.clipStackRestore'. Each call to 'GI.Cogl.Functions.clipPush' after this
-- must be matched by a call to 'GI.Cogl.Functions.clipPop' before calling
-- 'GI.Cogl.Functions.clipStackRestore'.
-- 
-- /Since: 0.8.2/
clipStackSave ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
clipStackSave :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
clipStackSave  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_clip_stack_save
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_stack_restore
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_stack_restore" cogl_clip_stack_restore :: 
    IO ()

{-# DEPRECATED clipStackRestore ["(Since version 1.2)","This was originally added to allow us to restore","  the clip stack when switching back from an offscreen framebuffer,","  but it\\'s not necessary anymore given that framebuffers now own","  separate clip stacks which will be automatically switched between","  when a new buffer is set. Calling this function has no effect"] #-}
-- | Restore the state of the clipping stack that was previously saved
-- by 'GI.Cogl.Functions.clipStackSave'.
-- 
-- /Since: 0.8.2/
clipStackRestore ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
clipStackRestore :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
clipStackRestore  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_clip_stack_restore
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_push_window_rectangle
-- Args: [ Arg
--           { argCName = "x_offset"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "left edge of the clip rectangle in window coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_offset"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "top edge of the clip rectangle in window coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_push_window_rectangle" cogl_clip_push_window_rectangle :: 
    Int32 ->                                -- x_offset : TBasicType TInt
    Int32 ->                                -- y_offset : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

{-# DEPRECATED clipPushWindowRectangle ["(Since version 1.16)","Use @/cogl_framebuffer_push_scissor_clip()/@ instead"] #-}
-- | Specifies a rectangular clipping area for all subsequent drawing
-- operations. Any drawing commands that extend outside the rectangle
-- will be clipped so that only the portion inside the rectangle will
-- be displayed. The rectangle dimensions are not transformed by the
-- current model-view matrix.
-- 
-- The rectangle is intersected with the current clip region. To undo
-- the effect of this function, call 'GI.Cogl.Functions.clipPop'.
-- 
-- /Since: 1.2/
clipPushWindowRectangle ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@xOffset@/: left edge of the clip rectangle in window coordinates
    -> Int32
    -- ^ /@yOffset@/: top edge of the clip rectangle in window coordinates
    -> Int32
    -- ^ /@width@/: width of the clip rectangle
    -> Int32
    -- ^ /@height@/: height of the clip rectangle
    -> m ()
clipPushWindowRectangle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Int32 -> Int32 -> Int32 -> m ()
clipPushWindowRectangle Int32
xOffset Int32
yOffset Int32
width Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Int32 -> Int32 -> Int32 -> Int32 -> IO ()
cogl_clip_push_window_rectangle Int32
xOffset Int32
yOffset Int32
width Int32
height
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_push_window_rect
-- Args: [ Arg
--           { argCName = "x_offset"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "left edge of the clip rectangle in window coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_offset"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "top edge of the clip rectangle in window coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_push_window_rect" cogl_clip_push_window_rect :: 
    CFloat ->                               -- x_offset : TBasicType TFloat
    CFloat ->                               -- y_offset : TBasicType TFloat
    CFloat ->                               -- width : TBasicType TFloat
    CFloat ->                               -- height : TBasicType TFloat
    IO ()

{-# DEPRECATED clipPushWindowRect ["(Since version 1.16)","Use @/cogl_framebuffer_push_scissor_clip()/@ instead"] #-}
-- | Specifies a rectangular clipping area for all subsequent drawing
-- operations. Any drawing commands that extend outside the rectangle
-- will be clipped so that only the portion inside the rectangle will
-- be displayed. The rectangle dimensions are not transformed by the
-- current model-view matrix.
-- 
-- The rectangle is intersected with the current clip region. To undo
-- the effect of this function, call 'GI.Cogl.Functions.clipPop'.
clipPushWindowRect ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@xOffset@/: left edge of the clip rectangle in window coordinates
    -> Float
    -- ^ /@yOffset@/: top edge of the clip rectangle in window coordinates
    -> Float
    -- ^ /@width@/: width of the clip rectangle
    -> Float
    -- ^ /@height@/: height of the clip rectangle
    -> m ()
clipPushWindowRect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
clipPushWindowRect Float
xOffset Float
yOffset Float
width Float
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let xOffset' :: CFloat
xOffset' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
xOffset
    let yOffset' :: CFloat
yOffset' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
yOffset
    let width' :: CFloat
width' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
width
    let height' :: CFloat
height' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
height
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_clip_push_window_rect CFloat
xOffset' CFloat
yOffset' CFloat
width' CFloat
height'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_push_rectangle
-- Args: [ Arg
--           { argCName = "x0"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "x coordinate for top left corner of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y0"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "y coordinate for top left corner of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "x coordinate for bottom right corner of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y1"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "y coordinate for bottom right corner of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_push_rectangle" cogl_clip_push_rectangle :: 
    CFloat ->                               -- x0 : TBasicType TFloat
    CFloat ->                               -- y0 : TBasicType TFloat
    CFloat ->                               -- x1 : TBasicType TFloat
    CFloat ->                               -- y1 : TBasicType TFloat
    IO ()

{-# DEPRECATED clipPushRectangle ["(Since version 1.16)","Use @/cogl_framebuffer_push_rectangle_clip()/@","                  instead"] #-}
-- | Specifies a rectangular clipping area for all subsequent drawing
-- operations. Any drawing commands that extend outside the rectangle
-- will be clipped so that only the portion inside the rectangle will
-- be displayed. The rectangle dimensions are transformed by the
-- current model-view matrix.
-- 
-- The rectangle is intersected with the current clip region. To undo
-- the effect of this function, call 'GI.Cogl.Functions.clipPop'.
-- 
-- /Since: 1.2/
clipPushRectangle ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@x0@/: x coordinate for top left corner of the clip rectangle
    -> Float
    -- ^ /@y0@/: y coordinate for top left corner of the clip rectangle
    -> Float
    -- ^ /@x1@/: x coordinate for bottom right corner of the clip rectangle
    -> Float
    -- ^ /@y1@/: y coordinate for bottom right corner of the clip rectangle
    -> m ()
clipPushRectangle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
clipPushRectangle Float
x0 Float
y0 Float
x1 Float
y1 = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let x0' :: CFloat
x0' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x0
    let y0' :: CFloat
y0' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y0
    let x1' :: CFloat
x1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x1
    let y1' :: CFloat
y1' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y1
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_clip_push_rectangle CFloat
x0' CFloat
y0' CFloat
x1' CFloat
y1'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_push
-- Args: [ Arg
--           { argCName = "x_offset"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "left edge of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_offset"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "top edge of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TFloat
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the clip rectangle"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_push" cogl_clip_push :: 
    CFloat ->                               -- x_offset : TBasicType TFloat
    CFloat ->                               -- y_offset : TBasicType TFloat
    CFloat ->                               -- width : TBasicType TFloat
    CFloat ->                               -- height : TBasicType TFloat
    IO ()

{-# DEPRECATED clipPush ["(Since version 1.16)","The x, y, width, height arguments are inconsistent","  with other API that specify rectangles in model space, and when used","  with a coordinate space that puts the origin at the center and y+","  extending up, it\\'s awkward to use. Please use","  @/cogl_framebuffer_push_rectangle_clip()/@"] #-}
-- | Specifies a rectangular clipping area for all subsequent drawing
-- operations. Any drawing commands that extend outside the rectangle
-- will be clipped so that only the portion inside the rectangle will
-- be displayed. The rectangle dimensions are transformed by the
-- current model-view matrix.
-- 
-- The rectangle is intersected with the current clip region. To undo
-- the effect of this function, call 'GI.Cogl.Functions.clipPop'.
clipPush ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Float
    -- ^ /@xOffset@/: left edge of the clip rectangle
    -> Float
    -- ^ /@yOffset@/: top edge of the clip rectangle
    -> Float
    -- ^ /@width@/: width of the clip rectangle
    -> Float
    -- ^ /@height@/: height of the clip rectangle
    -> m ()
clipPush :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Float -> Float -> Float -> Float -> m ()
clipPush Float
xOffset Float
yOffset Float
width Float
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let xOffset' :: CFloat
xOffset' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
xOffset
    let yOffset' :: CFloat
yOffset' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
yOffset
    let width' :: CFloat
width' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
width
    let height' :: CFloat
height' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
height
    CFloat -> CFloat -> CFloat -> CFloat -> IO ()
cogl_clip_push CFloat
xOffset' CFloat
yOffset' CFloat
width' CFloat
height'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_pop
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_pop" cogl_clip_pop :: 
    IO ()

{-# DEPRECATED clipPop ["(Since version 1.16)","Use @/cogl_framebuffer_pop_clip()/@ instead"] #-}
-- | Reverts the clipping region to the state before the last call to
-- 'GI.Cogl.Functions.clipPush'.
clipPop ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
clipPop :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
clipPop  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_clip_pop
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clip_ensure
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clip_ensure" cogl_clip_ensure :: 
    IO ()

{-# DEPRECATED clipEnsure ["(Since version 1.2)","Calling this function has no effect"] #-}
-- | Ensures that the current clipping region has been set in GL. This
-- will automatically be called before any Cogl primitives but it
-- maybe be neccessary to call if you are using raw GL calls with
-- clipping.
-- 
-- /Since: 1.0/
clipEnsure ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
clipEnsure :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
clipEnsure  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_clip_ensure
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function clear'
-- Args: [ Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Cogl" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Background color to clear to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "buffers"
--           , argType = TBasicType TULong
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A mask of #CoglBufferBit<!-- -->'s identifying which auxiliary\n  buffers to clear"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_clear" cogl_clear :: 
    Ptr Cogl.Color.Color ->                 -- color : TInterface (Name {namespace = "Cogl", name = "Color"})
    CULong ->                               -- buffers : TBasicType TULong
    IO ()

{-# DEPRECATED clear' ["(Since version 1.16)","Use @/cogl_framebuffer_clear()/@ api instead"] #-}
-- | Clears all the auxiliary buffers identified in the /@buffers@/ mask, and if
-- that includes the color buffer then the specified /@color@/ is used.
clear' ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cogl.Color.Color
    -- ^ /@color@/: Background color to clear to
    -> CULong
    -- ^ /@buffers@/: A mask of t'GI.Cogl.Flags.BufferBit'\'s identifying which auxiliary
    --   buffers to clear
    -> m ()
clear' :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Color -> CULong -> m ()
clear' Color
color CULong
buffers = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Color
color' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
color
    Ptr Color -> CULong -> IO ()
cogl_clear Ptr Color
color' CULong
buffers
    Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Color
color
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function check_extension
-- Args: [ Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "extension to check for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ext"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "list of extensions" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "cogl_check_extension" cogl_check_extension :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- ext : TBasicType TUTF8
    IO Int32

{-# DEPRECATED checkExtension ["(Since version 1.2)","OpenGL is an implementation detail for Cogl and so it\\'s","  not appropriate to expose OpenGL extensions through the Cogl API. This","  function can be replaced by the following equivalent code:","|[","  CoglBool retval = (strstr (ext, name) != NULL) ? TRUE : FALSE;","]|"] #-}
-- | Check whether /@name@/ occurs in list of extensions in /@ext@/.
checkExtension ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@name@/: extension to check for
    -> T.Text
    -- ^ /@ext@/: list of extensions
    -> m Int32
    -- ^ __Returns:__ 'P.True' if the extension occurs in the list, 'P.False' otherwise.
checkExtension :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Text -> m Int32
checkExtension Text
name Text
ext = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
ext' <- Text -> IO CString
textToCString Text
ext
    Int32
result <- CString -> CString -> IO Int32
cogl_check_extension CString
name' CString
ext'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
ext'
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function begin_gl
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "cogl_begin_gl" cogl_begin_gl :: 
    IO ()

{-# DEPRECATED beginGl ["(Since version 1.16)","Use the @/CoglGLES2Context/@ api instead"] #-}
-- | We do not advise nor reliably support the interleaving of raw GL drawing and
-- Cogl drawing functions, but if you insist, 'GI.Cogl.Functions.beginGl' and 'GI.Cogl.Functions.endGl'
-- provide a simple mechanism that may at least give you a fighting chance of
-- succeeding.
-- 
-- Note: this doesn\'t help you modify the behaviour of Cogl drawing functions
-- through the modification of GL state; that will never be reliably supported,
-- but if you are trying to do something like:
-- 
-- >
-- >{
-- >   - setup some OpenGL state.
-- >   - draw using OpenGL (e.g. glDrawArrays() )
-- >   - reset modified OpenGL state.
-- >   - continue using Cogl to draw
-- >}
-- 
-- 
-- You should surround blocks of drawing using raw GL with 'GI.Cogl.Functions.beginGl'
-- and 'GI.Cogl.Functions.endGl':
-- 
-- >
-- >{
-- >   cogl_begin_gl ();
-- >   - setup some OpenGL state.
-- >   - draw using OpenGL (e.g. glDrawArrays() )
-- >   - reset modified OpenGL state.
-- >   cogl_end_gl ();
-- >   - continue using Cogl to draw
-- >}
-- 
-- 
-- Don\'t ever try and do:
-- 
-- >
-- >{
-- >   - setup some OpenGL state.
-- >   - use Cogl to draw
-- >   - reset modified OpenGL state.
-- >}
-- 
-- 
-- When the internals of Cogl evolves, this is very liable to break.
-- 
-- This function will flush all batched primitives, and subsequently flush
-- all internal Cogl state to OpenGL as if it were going to draw something
-- itself.
-- 
-- The result is that the OpenGL modelview matrix will be setup; the state
-- corresponding to the current source material will be set up and other world
-- state such as backface culling, depth and fogging enabledness will be sent
-- to OpenGL.
-- 
-- \<note>No special material state is flushed, so if you want Cogl to setup a
-- simplified material state it is your responsibility to set a simple source
-- material before calling 'GI.Cogl.Functions.beginGl'. E.g. by calling
-- 'GI.Cogl.Functions.setSourceColor4ub'.\<\/note>
-- 
-- \<note>It is your responsibility to restore any OpenGL state that you modify
-- to how it was after calling 'GI.Cogl.Functions.beginGl' if you don\'t do this then the
-- result of further Cogl calls is undefined.\<\/note>
-- 
-- \<note>You can not nest begin\/end blocks.\<\/note>
-- 
-- Again we would like to stress, we do not advise the use of this API and if
-- possible we would prefer to improve Cogl than have developers require raw
-- OpenGL.
-- 
-- /Since: 1.0/
beginGl ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
beginGl :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
beginGl  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
cogl_begin_gl
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()