-- | 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.Flags
    ( 

 -- * Flags


-- ** BufferBit #flag:BufferBit#

    BufferBit(..)                           ,


-- ** BufferTarget #flag:BufferTarget#

    BufferTarget(..)                        ,


-- ** ColorMask #flag:ColorMask#

    ColorMask(..)                           ,


-- ** FeatureFlags #flag:FeatureFlags#

    FeatureFlags(..)                        ,


-- ** ReadPixelsFlags #flag:ReadPixelsFlags#

    ReadPixelsFlags(..)                     ,


-- ** TextureFlags #flag:TextureFlags#

    TextureFlags(..)                        ,




    ) 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.GHashTable as B.GHT
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


-- Flags TextureFlags
-- | Flags to pass to the cogl_texture_new_* family of functions.
-- 
-- /Since: 1.0/
data TextureFlags = 
      TextureFlagsNone
    -- ^ No flags specified
    | TextureFlagsNoAutoMipmap
    -- ^ Disables the automatic generation of
    --   the mipmap pyramid from the base level image whenever it is
    --   updated. The mipmaps are only generated when the texture is
    --   rendered with a mipmap filter so it should be free to leave out
    --   this flag when using other filtering modes
    | TextureFlagsNoSlicing
    -- ^ Disables the slicing of the texture
    | TextureFlagsNoAtlas
    -- ^ Disables the insertion of the texture inside
    --   the texture atlas used by Cogl
    | AnotherTextureFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TextureFlags -> ShowS
[TextureFlags] -> ShowS
TextureFlags -> String
(Int -> TextureFlags -> ShowS)
-> (TextureFlags -> String)
-> ([TextureFlags] -> ShowS)
-> Show TextureFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextureFlags -> ShowS
showsPrec :: Int -> TextureFlags -> ShowS
$cshow :: TextureFlags -> String
show :: TextureFlags -> String
$cshowList :: [TextureFlags] -> ShowS
showList :: [TextureFlags] -> ShowS
Show, TextureFlags -> TextureFlags -> Bool
(TextureFlags -> TextureFlags -> Bool)
-> (TextureFlags -> TextureFlags -> Bool) -> Eq TextureFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextureFlags -> TextureFlags -> Bool
== :: TextureFlags -> TextureFlags -> Bool
$c/= :: TextureFlags -> TextureFlags -> Bool
/= :: TextureFlags -> TextureFlags -> Bool
Eq)

instance P.Enum TextureFlags where
    fromEnum :: TextureFlags -> Int
fromEnum TextureFlags
TextureFlagsNone = Int
0
    fromEnum TextureFlags
TextureFlagsNoAutoMipmap = Int
1
    fromEnum TextureFlags
TextureFlagsNoSlicing = Int
2
    fromEnum TextureFlags
TextureFlagsNoAtlas = Int
4
    fromEnum (AnotherTextureFlags Int
k) = Int
k

    toEnum :: Int -> TextureFlags
toEnum Int
0 = TextureFlags
TextureFlagsNone
    toEnum Int
1 = TextureFlags
TextureFlagsNoAutoMipmap
    toEnum Int
2 = TextureFlags
TextureFlagsNoSlicing
    toEnum Int
4 = TextureFlags
TextureFlagsNoAtlas
    toEnum Int
k = Int -> TextureFlags
AnotherTextureFlags Int
k

instance P.Ord TextureFlags where
    compare :: TextureFlags -> TextureFlags -> Ordering
compare TextureFlags
a TextureFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (TextureFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum TextureFlags
a) (TextureFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum TextureFlags
b)

type instance O.ParentTypes TextureFlags = '[]
instance O.HasParentTypes TextureFlags

foreign import ccall "cogl_texture_flags_get_type" c_cogl_texture_flags_get_type :: 
    IO GType

instance B.Types.TypedObject TextureFlags where
    glibType :: IO GType
glibType = IO GType
c_cogl_texture_flags_get_type

instance B.Types.BoxedFlags TextureFlags

instance IsGFlag TextureFlags

-- Flags ReadPixelsFlags
-- | Flags for @/cogl_framebuffer_read_pixels_into_bitmap()/@
-- 
-- /Since: 1.0/
data ReadPixelsFlags = 
      ReadPixelsFlagsColorBuffer
    -- ^ Read from the color buffer
    | AnotherReadPixelsFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ReadPixelsFlags -> ShowS
[ReadPixelsFlags] -> ShowS
ReadPixelsFlags -> String
(Int -> ReadPixelsFlags -> ShowS)
-> (ReadPixelsFlags -> String)
-> ([ReadPixelsFlags] -> ShowS)
-> Show ReadPixelsFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadPixelsFlags -> ShowS
showsPrec :: Int -> ReadPixelsFlags -> ShowS
$cshow :: ReadPixelsFlags -> String
show :: ReadPixelsFlags -> String
$cshowList :: [ReadPixelsFlags] -> ShowS
showList :: [ReadPixelsFlags] -> ShowS
Show, ReadPixelsFlags -> ReadPixelsFlags -> Bool
(ReadPixelsFlags -> ReadPixelsFlags -> Bool)
-> (ReadPixelsFlags -> ReadPixelsFlags -> Bool)
-> Eq ReadPixelsFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
== :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
$c/= :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
/= :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
Eq)

instance P.Enum ReadPixelsFlags where
    fromEnum :: ReadPixelsFlags -> Int
fromEnum ReadPixelsFlags
ReadPixelsFlagsColorBuffer = Int
1
    fromEnum (AnotherReadPixelsFlags Int
k) = Int
k

    toEnum :: Int -> ReadPixelsFlags
toEnum Int
1 = ReadPixelsFlags
ReadPixelsFlagsColorBuffer
    toEnum Int
k = Int -> ReadPixelsFlags
AnotherReadPixelsFlags Int
k

instance P.Ord ReadPixelsFlags where
    compare :: ReadPixelsFlags -> ReadPixelsFlags -> Ordering
compare ReadPixelsFlags
a ReadPixelsFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ReadPixelsFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum ReadPixelsFlags
a) (ReadPixelsFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum ReadPixelsFlags
b)

type instance O.ParentTypes ReadPixelsFlags = '[]
instance O.HasParentTypes ReadPixelsFlags

foreign import ccall "cogl_read_pixels_flags_get_type" c_cogl_read_pixels_flags_get_type :: 
    IO GType

instance B.Types.TypedObject ReadPixelsFlags where
    glibType :: IO GType
glibType = IO GType
c_cogl_read_pixels_flags_get_type

instance B.Types.BoxedFlags ReadPixelsFlags

instance IsGFlag ReadPixelsFlags

-- Flags FeatureFlags
-- | Flags for the supported features.
-- 
-- /Since: 0.8/
data FeatureFlags = 
      FeatureFlagsTextureRectangle
    -- ^ ARB_texture_rectangle support
    | FeatureFlagsTextureNpot
    -- ^ Non power of two textures are supported
    --    by the hardware. This is a equivalent to the
    --    'GI.Cogl.Flags.FeatureFlagsTextureNpotBasic', 'GI.Cogl.Flags.FeatureFlagsTextureNpotMipmap'
    --    and 'GI.Cogl.Flags.FeatureFlagsTextureNpotRepeat' features combined.
    | FeatureFlagsTextureYuv
    -- ^ ycbcr conversion support
    | FeatureFlagsTextureReadPixels
    -- ^ @/glReadPixels()/@ support
    | FeatureFlagsShadersGlsl
    -- ^ GLSL support
    | FeatureFlagsOffscreen
    -- ^ FBO support
    | FeatureFlagsOffscreenMultisample
    -- ^ Multisample support on FBOs
    | FeatureFlagsOffscreenBlit
    -- ^ Blit support on FBOs
    | FeatureFlagsFourClipPlanes
    -- ^ At least 4 clip planes available
    | FeatureFlagsStencilBuffer
    -- ^ Stencil buffer support
    | FeatureFlagsVbos
    -- ^ VBO support
    | FeatureFlagsPbos
    -- ^ PBO support
    | FeatureFlagsUnsignedIntIndices
    -- ^ Set if
    --     'GI.Cogl.Enums.IndicesTypeInt' is supported in
    --     @/cogl_vertex_buffer_indices_new()/@.
    | FeatureFlagsDepthRange
    -- ^ @/cogl_material_set_depth_range()/@ support
    | FeatureFlagsTextureNpotBasic
    -- ^ The hardware supports non power
    --     of two textures, but you also need to check the
    --     'GI.Cogl.Flags.FeatureFlagsTextureNpotMipmap' and 'GI.Cogl.Flags.FeatureFlagsTextureNpotRepeat'
    --     features to know if the hardware supports npot texture mipmaps
    --     or repeat modes other than
    --     @/COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE/@ respectively.
    | FeatureFlagsTextureNpotMipmap
    -- ^ Mipmapping is supported in
    --     conjuntion with non power of two textures.
    | FeatureFlagsTextureNpotRepeat
    -- ^ Repeat modes other than
    --     @/COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE/@ are supported by the
    --     hardware.
    | FeatureFlagsPointSprite
    -- ^ Whether
    --     'GI.Cogl.Structs.Material.materialSetLayerPointSpriteCoordsEnabled' is supported.
    | FeatureFlagsTexture3d
    -- ^ 3D texture support
    | FeatureFlagsShadersArbfp
    -- ^ ARBFP support
    | FeatureFlagsMapBufferForRead
    -- ^ Whether @/cogl_buffer_map()/@ is
    --     supported with CoglBufferAccess including read support.
    | FeatureFlagsMapBufferForWrite
    -- ^ Whether @/cogl_buffer_map()/@ is
    --     supported with CoglBufferAccess including write support.
    | FeatureFlagsOnscreenMultiple
    -- ^ /No description available in the introspection data./
    | FeatureFlagsDepthTexture
    -- ^ Whether @/CoglFramebuffer/@ support rendering the
    --     depth buffer to a texture.
    | AnotherFeatureFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> FeatureFlags -> ShowS
[FeatureFlags] -> ShowS
FeatureFlags -> String
(Int -> FeatureFlags -> ShowS)
-> (FeatureFlags -> String)
-> ([FeatureFlags] -> ShowS)
-> Show FeatureFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FeatureFlags -> ShowS
showsPrec :: Int -> FeatureFlags -> ShowS
$cshow :: FeatureFlags -> String
show :: FeatureFlags -> String
$cshowList :: [FeatureFlags] -> ShowS
showList :: [FeatureFlags] -> ShowS
Show, FeatureFlags -> FeatureFlags -> Bool
(FeatureFlags -> FeatureFlags -> Bool)
-> (FeatureFlags -> FeatureFlags -> Bool) -> Eq FeatureFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FeatureFlags -> FeatureFlags -> Bool
== :: FeatureFlags -> FeatureFlags -> Bool
$c/= :: FeatureFlags -> FeatureFlags -> Bool
/= :: FeatureFlags -> FeatureFlags -> Bool
Eq)

instance P.Enum FeatureFlags where
    fromEnum :: FeatureFlags -> Int
fromEnum FeatureFlags
FeatureFlagsTextureRectangle = Int
2
    fromEnum FeatureFlags
FeatureFlagsTextureNpot = Int
4
    fromEnum FeatureFlags
FeatureFlagsTextureYuv = Int
8
    fromEnum FeatureFlags
FeatureFlagsTextureReadPixels = Int
16
    fromEnum FeatureFlags
FeatureFlagsShadersGlsl = Int
32
    fromEnum FeatureFlags
FeatureFlagsOffscreen = Int
64
    fromEnum FeatureFlags
FeatureFlagsOffscreenMultisample = Int
128
    fromEnum FeatureFlags
FeatureFlagsOffscreenBlit = Int
256
    fromEnum FeatureFlags
FeatureFlagsFourClipPlanes = Int
512
    fromEnum FeatureFlags
FeatureFlagsStencilBuffer = Int
1024
    fromEnum FeatureFlags
FeatureFlagsVbos = Int
2048
    fromEnum FeatureFlags
FeatureFlagsPbos = Int
4096
    fromEnum FeatureFlags
FeatureFlagsUnsignedIntIndices = Int
8192
    fromEnum FeatureFlags
FeatureFlagsDepthRange = Int
16384
    fromEnum FeatureFlags
FeatureFlagsTextureNpotBasic = Int
32768
    fromEnum FeatureFlags
FeatureFlagsTextureNpotMipmap = Int
65536
    fromEnum FeatureFlags
FeatureFlagsTextureNpotRepeat = Int
131072
    fromEnum FeatureFlags
FeatureFlagsPointSprite = Int
262144
    fromEnum FeatureFlags
FeatureFlagsTexture3d = Int
524288
    fromEnum FeatureFlags
FeatureFlagsShadersArbfp = Int
1048576
    fromEnum FeatureFlags
FeatureFlagsMapBufferForRead = Int
2097152
    fromEnum FeatureFlags
FeatureFlagsMapBufferForWrite = Int
4194304
    fromEnum FeatureFlags
FeatureFlagsOnscreenMultiple = Int
8388608
    fromEnum FeatureFlags
FeatureFlagsDepthTexture = Int
16777216
    fromEnum (AnotherFeatureFlags Int
k) = Int
k

    toEnum :: Int -> FeatureFlags
toEnum Int
2 = FeatureFlags
FeatureFlagsTextureRectangle
    toEnum Int
4 = FeatureFlags
FeatureFlagsTextureNpot
    toEnum Int
8 = FeatureFlags
FeatureFlagsTextureYuv
    toEnum Int
16 = FeatureFlags
FeatureFlagsTextureReadPixels
    toEnum Int
32 = FeatureFlags
FeatureFlagsShadersGlsl
    toEnum Int
64 = FeatureFlags
FeatureFlagsOffscreen
    toEnum Int
128 = FeatureFlags
FeatureFlagsOffscreenMultisample
    toEnum Int
256 = FeatureFlags
FeatureFlagsOffscreenBlit
    toEnum Int
512 = FeatureFlags
FeatureFlagsFourClipPlanes
    toEnum Int
1024 = FeatureFlags
FeatureFlagsStencilBuffer
    toEnum Int
2048 = FeatureFlags
FeatureFlagsVbos
    toEnum Int
4096 = FeatureFlags
FeatureFlagsPbos
    toEnum Int
8192 = FeatureFlags
FeatureFlagsUnsignedIntIndices
    toEnum Int
16384 = FeatureFlags
FeatureFlagsDepthRange
    toEnum Int
32768 = FeatureFlags
FeatureFlagsTextureNpotBasic
    toEnum Int
65536 = FeatureFlags
FeatureFlagsTextureNpotMipmap
    toEnum Int
131072 = FeatureFlags
FeatureFlagsTextureNpotRepeat
    toEnum Int
262144 = FeatureFlags
FeatureFlagsPointSprite
    toEnum Int
524288 = FeatureFlags
FeatureFlagsTexture3d
    toEnum Int
1048576 = FeatureFlags
FeatureFlagsShadersArbfp
    toEnum Int
2097152 = FeatureFlags
FeatureFlagsMapBufferForRead
    toEnum Int
4194304 = FeatureFlags
FeatureFlagsMapBufferForWrite
    toEnum Int
8388608 = FeatureFlags
FeatureFlagsOnscreenMultiple
    toEnum Int
16777216 = FeatureFlags
FeatureFlagsDepthTexture
    toEnum Int
k = Int -> FeatureFlags
AnotherFeatureFlags Int
k

instance P.Ord FeatureFlags where
    compare :: FeatureFlags -> FeatureFlags -> Ordering
compare FeatureFlags
a FeatureFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (FeatureFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum FeatureFlags
a) (FeatureFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum FeatureFlags
b)

type instance O.ParentTypes FeatureFlags = '[]
instance O.HasParentTypes FeatureFlags

foreign import ccall "cogl_feature_flags_get_type" c_cogl_feature_flags_get_type :: 
    IO GType

instance B.Types.TypedObject FeatureFlags where
    glibType :: IO GType
glibType = IO GType
c_cogl_feature_flags_get_type

instance B.Types.BoxedFlags FeatureFlags

instance IsGFlag FeatureFlags

-- Flags ColorMask
-- | Defines a bit mask of color channels. This can be used with
-- @/cogl_pipeline_set_color_mask()/@ for example to define which color
-- channels should be written to the current framebuffer when
-- drawing something.
data ColorMask = 
      ColorMaskNone
    -- ^ None of the color channels are masked
    | ColorMaskRed
    -- ^ Masks the red color channel
    | ColorMaskGreen
    -- ^ Masks the green color channel
    | ColorMaskBlue
    -- ^ Masks the blue color channel
    | ColorMaskAlpha
    -- ^ Masks the alpha color channel
    | ColorMaskAll
    -- ^ All of the color channels are masked
    | AnotherColorMask Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ColorMask -> ShowS
[ColorMask] -> ShowS
ColorMask -> String
(Int -> ColorMask -> ShowS)
-> (ColorMask -> String)
-> ([ColorMask] -> ShowS)
-> Show ColorMask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ColorMask -> ShowS
showsPrec :: Int -> ColorMask -> ShowS
$cshow :: ColorMask -> String
show :: ColorMask -> String
$cshowList :: [ColorMask] -> ShowS
showList :: [ColorMask] -> ShowS
Show, ColorMask -> ColorMask -> Bool
(ColorMask -> ColorMask -> Bool)
-> (ColorMask -> ColorMask -> Bool) -> Eq ColorMask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ColorMask -> ColorMask -> Bool
== :: ColorMask -> ColorMask -> Bool
$c/= :: ColorMask -> ColorMask -> Bool
/= :: ColorMask -> ColorMask -> Bool
Eq)

instance P.Enum ColorMask where
    fromEnum :: ColorMask -> Int
fromEnum ColorMask
ColorMaskNone = Int
0
    fromEnum ColorMask
ColorMaskRed = Int
1
    fromEnum ColorMask
ColorMaskGreen = Int
2
    fromEnum ColorMask
ColorMaskBlue = Int
4
    fromEnum ColorMask
ColorMaskAlpha = Int
8
    fromEnum ColorMask
ColorMaskAll = Int
15
    fromEnum (AnotherColorMask Int
k) = Int
k

    toEnum :: Int -> ColorMask
toEnum Int
0 = ColorMask
ColorMaskNone
    toEnum Int
1 = ColorMask
ColorMaskRed
    toEnum Int
2 = ColorMask
ColorMaskGreen
    toEnum Int
4 = ColorMask
ColorMaskBlue
    toEnum Int
8 = ColorMask
ColorMaskAlpha
    toEnum Int
15 = ColorMask
ColorMaskAll
    toEnum Int
k = Int -> ColorMask
AnotherColorMask Int
k

instance P.Ord ColorMask where
    compare :: ColorMask -> ColorMask -> Ordering
compare ColorMask
a ColorMask
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ColorMask -> Int
forall a. Enum a => a -> Int
P.fromEnum ColorMask
a) (ColorMask -> Int
forall a. Enum a => a -> Int
P.fromEnum ColorMask
b)

type instance O.ParentTypes ColorMask = '[]
instance O.HasParentTypes ColorMask

foreign import ccall "cogl_color_mask_get_type" c_cogl_color_mask_get_type :: 
    IO GType

instance B.Types.TypedObject ColorMask where
    glibType :: IO GType
glibType = IO GType
c_cogl_color_mask_get_type

instance B.Types.BoxedFlags ColorMask

instance IsGFlag ColorMask

-- Flags BufferTarget
-- | Target flags for FBOs.
-- 
-- /Since: 0.8/
data BufferTarget = 
      BufferTargetWindowBuffer
    -- ^ FIXME
    | BufferTargetOffscreenBuffer
    -- ^ FIXME
    | AnotherBufferTarget Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BufferTarget -> ShowS
[BufferTarget] -> ShowS
BufferTarget -> String
(Int -> BufferTarget -> ShowS)
-> (BufferTarget -> String)
-> ([BufferTarget] -> ShowS)
-> Show BufferTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BufferTarget -> ShowS
showsPrec :: Int -> BufferTarget -> ShowS
$cshow :: BufferTarget -> String
show :: BufferTarget -> String
$cshowList :: [BufferTarget] -> ShowS
showList :: [BufferTarget] -> ShowS
Show, BufferTarget -> BufferTarget -> Bool
(BufferTarget -> BufferTarget -> Bool)
-> (BufferTarget -> BufferTarget -> Bool) -> Eq BufferTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BufferTarget -> BufferTarget -> Bool
== :: BufferTarget -> BufferTarget -> Bool
$c/= :: BufferTarget -> BufferTarget -> Bool
/= :: BufferTarget -> BufferTarget -> Bool
Eq)

instance P.Enum BufferTarget where
    fromEnum :: BufferTarget -> Int
fromEnum BufferTarget
BufferTargetWindowBuffer = Int
2
    fromEnum BufferTarget
BufferTargetOffscreenBuffer = Int
4
    fromEnum (AnotherBufferTarget Int
k) = Int
k

    toEnum :: Int -> BufferTarget
toEnum Int
2 = BufferTarget
BufferTargetWindowBuffer
    toEnum Int
4 = BufferTarget
BufferTargetOffscreenBuffer
    toEnum Int
k = Int -> BufferTarget
AnotherBufferTarget Int
k

instance P.Ord BufferTarget where
    compare :: BufferTarget -> BufferTarget -> Ordering
compare BufferTarget
a BufferTarget
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BufferTarget -> Int
forall a. Enum a => a -> Int
P.fromEnum BufferTarget
a) (BufferTarget -> Int
forall a. Enum a => a -> Int
P.fromEnum BufferTarget
b)

type instance O.ParentTypes BufferTarget = '[]
instance O.HasParentTypes BufferTarget

foreign import ccall "cogl_buffer_target_get_type" c_cogl_buffer_target_get_type :: 
    IO GType

instance B.Types.TypedObject BufferTarget where
    glibType :: IO GType
glibType = IO GType
c_cogl_buffer_target_get_type

instance B.Types.BoxedFlags BufferTarget

instance IsGFlag BufferTarget

-- Flags BufferBit
-- | Types of auxiliary buffers
-- 
-- /Since: 1.0/
data BufferBit = 
      BufferBitColor
    -- ^ Selects the primary color buffer
    | BufferBitDepth
    -- ^ Selects the depth buffer
    | BufferBitStencil
    -- ^ Selects the stencil buffer
    | AnotherBufferBit Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BufferBit -> ShowS
[BufferBit] -> ShowS
BufferBit -> String
(Int -> BufferBit -> ShowS)
-> (BufferBit -> String)
-> ([BufferBit] -> ShowS)
-> Show BufferBit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BufferBit -> ShowS
showsPrec :: Int -> BufferBit -> ShowS
$cshow :: BufferBit -> String
show :: BufferBit -> String
$cshowList :: [BufferBit] -> ShowS
showList :: [BufferBit] -> ShowS
Show, BufferBit -> BufferBit -> Bool
(BufferBit -> BufferBit -> Bool)
-> (BufferBit -> BufferBit -> Bool) -> Eq BufferBit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BufferBit -> BufferBit -> Bool
== :: BufferBit -> BufferBit -> Bool
$c/= :: BufferBit -> BufferBit -> Bool
/= :: BufferBit -> BufferBit -> Bool
Eq)

instance P.Enum BufferBit where
    fromEnum :: BufferBit -> Int
fromEnum BufferBit
BufferBitColor = Int
1
    fromEnum BufferBit
BufferBitDepth = Int
2
    fromEnum BufferBit
BufferBitStencil = Int
4
    fromEnum (AnotherBufferBit Int
k) = Int
k

    toEnum :: Int -> BufferBit
toEnum Int
1 = BufferBit
BufferBitColor
    toEnum Int
2 = BufferBit
BufferBitDepth
    toEnum Int
4 = BufferBit
BufferBitStencil
    toEnum Int
k = Int -> BufferBit
AnotherBufferBit Int
k

instance P.Ord BufferBit where
    compare :: BufferBit -> BufferBit -> Ordering
compare BufferBit
a BufferBit
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BufferBit -> Int
forall a. Enum a => a -> Int
P.fromEnum BufferBit
a) (BufferBit -> Int
forall a. Enum a => a -> Int
P.fromEnum BufferBit
b)

type instance O.ParentTypes BufferBit = '[]
instance O.HasParentTypes BufferBit

foreign import ccall "cogl_buffer_bit_get_type" c_cogl_buffer_bit_get_type :: 
    IO GType

instance B.Types.TypedObject BufferBit where
    glibType :: IO GType
glibType = IO GType
c_cogl_buffer_bit_get_type

instance B.Types.BoxedFlags BufferBit

instance IsGFlag BufferBit