#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Cogl.Flags
(
BufferBit(..) ,
BufferTarget(..) ,
ColorMask(..) ,
FeatureFlags(..) ,
ReadPixelsFlags(..) ,
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.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
data TextureFlags =
TextureFlagsNone
| TextureFlagsNoAutoMipmap
| TextureFlagsNoSlicing
| TextureFlagsNoAtlas
| AnotherTextureFlags Int
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
showList :: [TextureFlags] -> ShowS
$cshowList :: [TextureFlags] -> ShowS
show :: TextureFlags -> String
$cshow :: TextureFlags -> String
showsPrec :: Int -> TextureFlags -> ShowS
$cshowsPrec :: Int -> TextureFlags -> ShowS
Show, TextureFlags -> TextureFlags -> Bool
(TextureFlags -> TextureFlags -> Bool)
-> (TextureFlags -> TextureFlags -> Bool) -> Eq TextureFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TextureFlags -> TextureFlags -> Bool
$c/= :: TextureFlags -> TextureFlags -> Bool
== :: TextureFlags -> TextureFlags -> Bool
$c== :: 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
data ReadPixelsFlags =
ReadPixelsFlagsColorBuffer
| AnotherReadPixelsFlags Int
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
showList :: [ReadPixelsFlags] -> ShowS
$cshowList :: [ReadPixelsFlags] -> ShowS
show :: ReadPixelsFlags -> String
$cshow :: ReadPixelsFlags -> String
showsPrec :: Int -> ReadPixelsFlags -> ShowS
$cshowsPrec :: Int -> ReadPixelsFlags -> ShowS
Show, ReadPixelsFlags -> ReadPixelsFlags -> Bool
(ReadPixelsFlags -> ReadPixelsFlags -> Bool)
-> (ReadPixelsFlags -> ReadPixelsFlags -> Bool)
-> Eq ReadPixelsFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
$c/= :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
== :: ReadPixelsFlags -> ReadPixelsFlags -> Bool
$c== :: 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
data FeatureFlags =
FeatureFlagsTextureRectangle
| FeatureFlagsTextureNpot
| FeatureFlagsTextureYuv
| FeatureFlagsTextureReadPixels
| FeatureFlagsShadersGlsl
| FeatureFlagsOffscreen
| FeatureFlagsOffscreenMultisample
| FeatureFlagsOffscreenBlit
| FeatureFlagsFourClipPlanes
| FeatureFlagsStencilBuffer
| FeatureFlagsVbos
| FeatureFlagsPbos
| FeatureFlagsUnsignedIntIndices
| FeatureFlagsDepthRange
| FeatureFlagsTextureNpotBasic
| FeatureFlagsTextureNpotMipmap
| FeatureFlagsTextureNpotRepeat
| FeatureFlagsPointSprite
| FeatureFlagsTexture3d
| FeatureFlagsShadersArbfp
| FeatureFlagsMapBufferForRead
| FeatureFlagsMapBufferForWrite
| FeatureFlagsOnscreenMultiple
| FeatureFlagsDepthTexture
| FeatureFlagsShaderTextureLod
| AnotherFeatureFlags Int
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
showList :: [FeatureFlags] -> ShowS
$cshowList :: [FeatureFlags] -> ShowS
show :: FeatureFlags -> String
$cshow :: FeatureFlags -> String
showsPrec :: Int -> FeatureFlags -> ShowS
$cshowsPrec :: Int -> FeatureFlags -> ShowS
Show, FeatureFlags -> FeatureFlags -> Bool
(FeatureFlags -> FeatureFlags -> Bool)
-> (FeatureFlags -> FeatureFlags -> Bool) -> Eq FeatureFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FeatureFlags -> FeatureFlags -> Bool
$c/= :: FeatureFlags -> FeatureFlags -> Bool
== :: FeatureFlags -> FeatureFlags -> Bool
$c== :: 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 FeatureFlags
FeatureFlagsShaderTextureLod = Int
33554432
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
33554432 = FeatureFlags
FeatureFlagsShaderTextureLod
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
data ColorMask =
ColorMaskNone
| ColorMaskRed
| ColorMaskGreen
| ColorMaskBlue
| ColorMaskAlpha
| ColorMaskAll
| AnotherColorMask Int
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
showList :: [ColorMask] -> ShowS
$cshowList :: [ColorMask] -> ShowS
show :: ColorMask -> String
$cshow :: ColorMask -> String
showsPrec :: Int -> ColorMask -> ShowS
$cshowsPrec :: Int -> ColorMask -> ShowS
Show, ColorMask -> ColorMask -> Bool
(ColorMask -> ColorMask -> Bool)
-> (ColorMask -> ColorMask -> Bool) -> Eq ColorMask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColorMask -> ColorMask -> Bool
$c/= :: ColorMask -> ColorMask -> Bool
== :: ColorMask -> ColorMask -> Bool
$c== :: 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
data BufferTarget =
BufferTargetWindowBuffer
| BufferTargetOffscreenBuffer
| AnotherBufferTarget Int
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
showList :: [BufferTarget] -> ShowS
$cshowList :: [BufferTarget] -> ShowS
show :: BufferTarget -> String
$cshow :: BufferTarget -> String
showsPrec :: Int -> BufferTarget -> ShowS
$cshowsPrec :: Int -> BufferTarget -> ShowS
Show, BufferTarget -> BufferTarget -> Bool
(BufferTarget -> BufferTarget -> Bool)
-> (BufferTarget -> BufferTarget -> Bool) -> Eq BufferTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BufferTarget -> BufferTarget -> Bool
$c/= :: BufferTarget -> BufferTarget -> Bool
== :: BufferTarget -> BufferTarget -> Bool
$c== :: 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
data BufferBit =
BufferBitColor
| BufferBitDepth
| BufferBitStencil
| AnotherBufferBit Int
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
showList :: [BufferBit] -> ShowS
$cshowList :: [BufferBit] -> ShowS
show :: BufferBit -> String
$cshow :: BufferBit -> String
showsPrec :: Int -> BufferBit -> ShowS
$cshowsPrec :: Int -> BufferBit -> ShowS
Show, BufferBit -> BufferBit -> Bool
(BufferBit -> BufferBit -> Bool)
-> (BufferBit -> BufferBit -> Bool) -> Eq BufferBit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BufferBit -> BufferBit -> Bool
$c/= :: BufferBit -> BufferBit -> Bool
== :: BufferBit -> BufferBit -> Bool
$c== :: 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