{-# language CPP #-}
module OpenXR.Extensions.XR_FB_color_space ( enumerateColorSpacesFB
, setColorSpaceFB
, SystemColorSpacePropertiesFB(..)
, ColorSpaceFB( COLOR_SPACE_UNMANAGED_FB
, COLOR_SPACE_REC2020_FB
, COLOR_SPACE_REC709_FB
, COLOR_SPACE_RIFT_CV1_FB
, COLOR_SPACE_RIFT_S_FB
, COLOR_SPACE_QUEST_FB
, COLOR_SPACE_P3_FB
, COLOR_SPACE_ADOBE_RGB_FB
, ..
)
, FB_color_space_SPEC_VERSION
, pattern FB_color_space_SPEC_VERSION
, FB_COLOR_SPACE_EXTENSION_NAME
, pattern FB_COLOR_SPACE_EXTENSION_NAME
) where
import OpenXR.Internal.Utils (enumReadPrec)
import OpenXR.Internal.Utils (enumShowsPrec)
import OpenXR.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import OpenXR.CStruct (FromCStruct)
import OpenXR.CStruct (FromCStruct(..))
import OpenXR.CStruct (ToCStruct)
import OpenXR.CStruct (ToCStruct(..))
import OpenXR.Zero (Zero)
import OpenXR.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import OpenXR.CStruct.Utils (advancePtrBytes)
import OpenXR.NamedType ((:::))
import OpenXR.Dynamic (InstanceCmds(pXrEnumerateColorSpacesFB))
import OpenXR.Dynamic (InstanceCmds(pXrSetColorSpaceFB))
import OpenXR.Exception (OpenXrException(..))
import OpenXR.Core10.Enums.Result (Result)
import OpenXR.Core10.Enums.Result (Result(..))
import OpenXR.Core10.Handles (Session)
import OpenXR.Core10.Handles (Session(..))
import OpenXR.Core10.Handles (Session_T)
import OpenXR.Core10.Enums.StructureType (StructureType)
import OpenXR.Core10.Enums.Result (Result(SUCCESS))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrEnumerateColorSpacesFB
:: FunPtr (Ptr Session_T -> Word32 -> Ptr Word32 -> Ptr ColorSpaceFB -> IO Result) -> Ptr Session_T -> Word32 -> Ptr Word32 -> Ptr ColorSpaceFB -> IO Result
enumerateColorSpacesFB :: forall io
. (MonadIO io)
=>
Session
-> io (Result, ("colorSpaces" ::: Vector ColorSpaceFB))
enumerateColorSpacesFB :: Session -> io (Result, "colorSpaces" ::: Vector ColorSpaceFB)
enumerateColorSpacesFB session :: Session
session = IO (Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> io (Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> io (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> (ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> io (Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> io (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> io (Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall a b. (a -> b) -> a -> b
$ do
let xrEnumerateColorSpacesFBPtr :: FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
xrEnumerateColorSpacesFBPtr = InstanceCmds
-> FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
pXrEnumerateColorSpacesFB (Session -> InstanceCmds
instanceCmds (Session
session :: Session))
IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ())
-> IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
xrEnumerateColorSpacesFBPtr FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
-> FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for xrEnumerateColorSpacesFB is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrEnumerateColorSpacesFB' :: Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result
xrEnumerateColorSpacesFB' = FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
-> Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result
mkXrEnumerateColorSpacesFB FunPtr
(Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result)
xrEnumerateColorSpacesFBPtr
let session' :: Ptr Session_T
session' = Session -> Ptr Session_T
sessionHandle (Session
session)
"colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32)
pColorSpaceCountOutput <- ((("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32)))
-> ((("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO
("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> (("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO ())
-> (("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO Result)
-> IO Result
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrEnumerateColorSpacesFB" (Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result
xrEnumerateColorSpacesFB' Ptr Session_T
session' (0) ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32)
pColorSpaceCountOutput) ("colorSpaces" ::: Ptr ColorSpaceFB
forall a. Ptr a
nullPtr))
IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ())
-> IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
"colorSpaceCapacityInput" ::: Word32
colorSpaceCountOutput <- IO ("colorSpaceCapacityInput" ::: Word32)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCapacityInput" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("colorSpaceCapacityInput" ::: Word32)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCapacityInput" ::: Word32))
-> IO ("colorSpaceCapacityInput" ::: Word32)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCapacityInput" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO ("colorSpaceCapacityInput" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32)
pColorSpaceCountOutput
"colorSpaces" ::: Ptr ColorSpaceFB
pColorSpaces <- ((("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaces" ::: Ptr ColorSpaceFB)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaces" ::: Ptr ColorSpaceFB))
-> ((("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaces" ::: Ptr ColorSpaceFB)
forall a b. (a -> b) -> a -> b
$ IO ("colorSpaces" ::: Ptr ColorSpaceFB)
-> (("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ())
-> (("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> IO (Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("colorSpaces" ::: Ptr ColorSpaceFB)
forall a. Int -> IO (Ptr a)
callocBytes @ColorSpaceFB ((("colorSpaceCapacityInput" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("colorSpaceCapacityInput" ::: Word32
colorSpaceCountOutput)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4)) ("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r' <- IO Result
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO Result)
-> IO Result
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrEnumerateColorSpacesFB" (Ptr Session_T
-> ("colorSpaceCapacityInput" ::: Word32)
-> ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> ("colorSpaces" ::: Ptr ColorSpaceFB)
-> IO Result
xrEnumerateColorSpacesFB' Ptr Session_T
session' (("colorSpaceCapacityInput" ::: Word32
colorSpaceCountOutput)) ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32)
pColorSpaceCountOutput) ("colorSpaces" ::: Ptr ColorSpaceFB
pColorSpaces))
IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ())
-> IO ()
-> ContT (Result, "colorSpaces" ::: Vector ColorSpaceFB) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r'))
"colorSpaceCapacityInput" ::: Word32
colorSpaceCountOutput' <- IO ("colorSpaceCapacityInput" ::: Word32)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCapacityInput" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("colorSpaceCapacityInput" ::: Word32)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCapacityInput" ::: Word32))
-> IO ("colorSpaceCapacityInput" ::: Word32)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaceCapacityInput" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32))
-> IO ("colorSpaceCapacityInput" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "colorSpaceCountOutput"
::: Ptr ("colorSpaceCapacityInput" ::: Word32)
pColorSpaceCountOutput
"colorSpaces" ::: Vector ColorSpaceFB
colorSpaces' <- IO ("colorSpaces" ::: Vector ColorSpaceFB)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaces" ::: Vector ColorSpaceFB)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("colorSpaces" ::: Vector ColorSpaceFB)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaces" ::: Vector ColorSpaceFB))
-> IO ("colorSpaces" ::: Vector ColorSpaceFB)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
("colorSpaces" ::: Vector ColorSpaceFB)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO ColorSpaceFB)
-> IO ("colorSpaces" ::: Vector ColorSpaceFB)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("colorSpaceCapacityInput" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("colorSpaceCapacityInput" ::: Word32
colorSpaceCountOutput')) (\i :: Int
i -> ("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ColorSpaceFB
forall a. Storable a => Ptr a -> IO a
peek @ColorSpaceFB (("colorSpaces" ::: Ptr ColorSpaceFB
pColorSpaces ("colorSpaces" ::: Ptr ColorSpaceFB)
-> Int -> "colorSpaces" ::: Ptr ColorSpaceFB
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ColorSpaceFB)))
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB))
-> (Result, "colorSpaces" ::: Vector ColorSpaceFB)
-> ContT
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
IO
(Result, "colorSpaces" ::: Vector ColorSpaceFB)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "colorSpaces" ::: Vector ColorSpaceFB
colorSpaces')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrSetColorSpaceFB
:: FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result) -> Ptr Session_T -> ColorSpaceFB -> IO Result
setColorSpaceFB :: forall io
. (MonadIO io)
=>
Session
->
ColorSpaceFB
-> io (Result)
setColorSpaceFB :: Session -> ColorSpaceFB -> io Result
setColorSpaceFB session :: Session
session colorspace :: ColorSpaceFB
colorspace = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result) -> IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let xrSetColorSpaceFBPtr :: FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
xrSetColorSpaceFBPtr = InstanceCmds -> FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
pXrSetColorSpaceFB (Session -> InstanceCmds
instanceCmds (Session
session :: Session))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
xrSetColorSpaceFBPtr FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
-> FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result) -> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for xrSetColorSpaceFB is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrSetColorSpaceFB' :: Ptr Session_T -> ColorSpaceFB -> IO Result
xrSetColorSpaceFB' = FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
-> Ptr Session_T -> ColorSpaceFB -> IO Result
mkXrSetColorSpaceFB FunPtr (Ptr Session_T -> ColorSpaceFB -> IO Result)
xrSetColorSpaceFBPtr
Result
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrSetColorSpaceFB" (Ptr Session_T -> ColorSpaceFB -> IO Result
xrSetColorSpaceFB' (Session -> Ptr Session_T
sessionHandle (Session
session)) (ColorSpaceFB
colorspace))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
Result -> IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> IO Result) -> Result -> IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)
data SystemColorSpacePropertiesFB = SystemColorSpacePropertiesFB
{
SystemColorSpacePropertiesFB -> ColorSpaceFB
colorSpace :: ColorSpaceFB }
deriving (Typeable, SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool
(SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool)
-> (SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool)
-> Eq SystemColorSpacePropertiesFB
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool
$c/= :: SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool
== :: SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool
$c== :: SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SystemColorSpacePropertiesFB)
#endif
deriving instance Show SystemColorSpacePropertiesFB
instance ToCStruct SystemColorSpacePropertiesFB where
withCStruct :: SystemColorSpacePropertiesFB
-> (Ptr SystemColorSpacePropertiesFB -> IO b) -> IO b
withCStruct x :: SystemColorSpacePropertiesFB
x f :: Ptr SystemColorSpacePropertiesFB -> IO b
f = Int -> Int -> (Ptr SystemColorSpacePropertiesFB -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr SystemColorSpacePropertiesFB -> IO b) -> IO b)
-> (Ptr SystemColorSpacePropertiesFB -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr SystemColorSpacePropertiesFB
p -> Ptr SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SystemColorSpacePropertiesFB
p SystemColorSpacePropertiesFB
x (Ptr SystemColorSpacePropertiesFB -> IO b
f Ptr SystemColorSpacePropertiesFB
p)
pokeCStruct :: Ptr SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> IO b -> IO b
pokeCStruct p :: Ptr SystemColorSpacePropertiesFB
p SystemColorSpacePropertiesFB{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
("colorSpaces" ::: Ptr ColorSpaceFB) -> ColorSpaceFB -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB
-> Int -> "colorSpaces" ::: Ptr ColorSpaceFB
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ColorSpaceFB)) (ColorSpaceFB
colorSpace)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr SystemColorSpacePropertiesFB -> IO b -> IO b
pokeZeroCStruct p :: Ptr SystemColorSpacePropertiesFB
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
("colorSpaces" ::: Ptr ColorSpaceFB) -> ColorSpaceFB -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB
-> Int -> "colorSpaces" ::: Ptr ColorSpaceFB
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ColorSpaceFB)) (ColorSpaceFB
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SystemColorSpacePropertiesFB where
peekCStruct :: Ptr SystemColorSpacePropertiesFB -> IO SystemColorSpacePropertiesFB
peekCStruct p :: Ptr SystemColorSpacePropertiesFB
p = do
ColorSpaceFB
colorSpace <- ("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ColorSpaceFB
forall a. Storable a => Ptr a -> IO a
peek @ColorSpaceFB ((Ptr SystemColorSpacePropertiesFB
p Ptr SystemColorSpacePropertiesFB
-> Int -> "colorSpaces" ::: Ptr ColorSpaceFB
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ColorSpaceFB))
SystemColorSpacePropertiesFB -> IO SystemColorSpacePropertiesFB
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SystemColorSpacePropertiesFB -> IO SystemColorSpacePropertiesFB)
-> SystemColorSpacePropertiesFB -> IO SystemColorSpacePropertiesFB
forall a b. (a -> b) -> a -> b
$ ColorSpaceFB -> SystemColorSpacePropertiesFB
SystemColorSpacePropertiesFB
ColorSpaceFB
colorSpace
instance Storable SystemColorSpacePropertiesFB where
sizeOf :: SystemColorSpacePropertiesFB -> Int
sizeOf ~SystemColorSpacePropertiesFB
_ = 24
alignment :: SystemColorSpacePropertiesFB -> Int
alignment ~SystemColorSpacePropertiesFB
_ = 8
peek :: Ptr SystemColorSpacePropertiesFB -> IO SystemColorSpacePropertiesFB
peek = Ptr SystemColorSpacePropertiesFB -> IO SystemColorSpacePropertiesFB
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> IO ()
poke ptr :: Ptr SystemColorSpacePropertiesFB
ptr poked :: SystemColorSpacePropertiesFB
poked = Ptr SystemColorSpacePropertiesFB
-> SystemColorSpacePropertiesFB -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SystemColorSpacePropertiesFB
ptr SystemColorSpacePropertiesFB
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SystemColorSpacePropertiesFB where
zero :: SystemColorSpacePropertiesFB
zero = ColorSpaceFB -> SystemColorSpacePropertiesFB
SystemColorSpacePropertiesFB
ColorSpaceFB
forall a. Zero a => a
zero
newtype ColorSpaceFB = ColorSpaceFB Int32
deriving newtype (ColorSpaceFB -> ColorSpaceFB -> Bool
(ColorSpaceFB -> ColorSpaceFB -> Bool)
-> (ColorSpaceFB -> ColorSpaceFB -> Bool) -> Eq ColorSpaceFB
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColorSpaceFB -> ColorSpaceFB -> Bool
$c/= :: ColorSpaceFB -> ColorSpaceFB -> Bool
== :: ColorSpaceFB -> ColorSpaceFB -> Bool
$c== :: ColorSpaceFB -> ColorSpaceFB -> Bool
Eq, Eq ColorSpaceFB
Eq ColorSpaceFB =>
(ColorSpaceFB -> ColorSpaceFB -> Ordering)
-> (ColorSpaceFB -> ColorSpaceFB -> Bool)
-> (ColorSpaceFB -> ColorSpaceFB -> Bool)
-> (ColorSpaceFB -> ColorSpaceFB -> Bool)
-> (ColorSpaceFB -> ColorSpaceFB -> Bool)
-> (ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB)
-> (ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB)
-> Ord ColorSpaceFB
ColorSpaceFB -> ColorSpaceFB -> Bool
ColorSpaceFB -> ColorSpaceFB -> Ordering
ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB
$cmin :: ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB
max :: ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB
$cmax :: ColorSpaceFB -> ColorSpaceFB -> ColorSpaceFB
>= :: ColorSpaceFB -> ColorSpaceFB -> Bool
$c>= :: ColorSpaceFB -> ColorSpaceFB -> Bool
> :: ColorSpaceFB -> ColorSpaceFB -> Bool
$c> :: ColorSpaceFB -> ColorSpaceFB -> Bool
<= :: ColorSpaceFB -> ColorSpaceFB -> Bool
$c<= :: ColorSpaceFB -> ColorSpaceFB -> Bool
< :: ColorSpaceFB -> ColorSpaceFB -> Bool
$c< :: ColorSpaceFB -> ColorSpaceFB -> Bool
compare :: ColorSpaceFB -> ColorSpaceFB -> Ordering
$ccompare :: ColorSpaceFB -> ColorSpaceFB -> Ordering
$cp1Ord :: Eq ColorSpaceFB
Ord, Ptr b -> Int -> IO ColorSpaceFB
Ptr b -> Int -> ColorSpaceFB -> IO ()
("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ColorSpaceFB
("colorSpaces" ::: Ptr ColorSpaceFB) -> Int -> IO ColorSpaceFB
("colorSpaces" ::: Ptr ColorSpaceFB)
-> Int -> ColorSpaceFB -> IO ()
("colorSpaces" ::: Ptr ColorSpaceFB) -> ColorSpaceFB -> IO ()
ColorSpaceFB -> Int
(ColorSpaceFB -> Int)
-> (ColorSpaceFB -> Int)
-> (("colorSpaces" ::: Ptr ColorSpaceFB) -> Int -> IO ColorSpaceFB)
-> (("colorSpaces" ::: Ptr ColorSpaceFB)
-> Int -> ColorSpaceFB -> IO ())
-> (forall b. Ptr b -> Int -> IO ColorSpaceFB)
-> (forall b. Ptr b -> Int -> ColorSpaceFB -> IO ())
-> (("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ColorSpaceFB)
-> (("colorSpaces" ::: Ptr ColorSpaceFB) -> ColorSpaceFB -> IO ())
-> Storable ColorSpaceFB
forall b. Ptr b -> Int -> IO ColorSpaceFB
forall b. Ptr b -> Int -> ColorSpaceFB -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: ("colorSpaces" ::: Ptr ColorSpaceFB) -> ColorSpaceFB -> IO ()
$cpoke :: ("colorSpaces" ::: Ptr ColorSpaceFB) -> ColorSpaceFB -> IO ()
peek :: ("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ColorSpaceFB
$cpeek :: ("colorSpaces" ::: Ptr ColorSpaceFB) -> IO ColorSpaceFB
pokeByteOff :: Ptr b -> Int -> ColorSpaceFB -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ColorSpaceFB -> IO ()
peekByteOff :: Ptr b -> Int -> IO ColorSpaceFB
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ColorSpaceFB
pokeElemOff :: ("colorSpaces" ::: Ptr ColorSpaceFB)
-> Int -> ColorSpaceFB -> IO ()
$cpokeElemOff :: ("colorSpaces" ::: Ptr ColorSpaceFB)
-> Int -> ColorSpaceFB -> IO ()
peekElemOff :: ("colorSpaces" ::: Ptr ColorSpaceFB) -> Int -> IO ColorSpaceFB
$cpeekElemOff :: ("colorSpaces" ::: Ptr ColorSpaceFB) -> Int -> IO ColorSpaceFB
alignment :: ColorSpaceFB -> Int
$calignment :: ColorSpaceFB -> Int
sizeOf :: ColorSpaceFB -> Int
$csizeOf :: ColorSpaceFB -> Int
Storable, ColorSpaceFB
ColorSpaceFB -> Zero ColorSpaceFB
forall a. a -> Zero a
zero :: ColorSpaceFB
$czero :: ColorSpaceFB
Zero)
pattern $bCOLOR_SPACE_UNMANAGED_FB :: ColorSpaceFB
$mCOLOR_SPACE_UNMANAGED_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_UNMANAGED_FB = ColorSpaceFB 0
pattern $bCOLOR_SPACE_REC2020_FB :: ColorSpaceFB
$mCOLOR_SPACE_REC2020_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_REC2020_FB = ColorSpaceFB 1
pattern $bCOLOR_SPACE_REC709_FB :: ColorSpaceFB
$mCOLOR_SPACE_REC709_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_REC709_FB = ColorSpaceFB 2
pattern $bCOLOR_SPACE_RIFT_CV1_FB :: ColorSpaceFB
$mCOLOR_SPACE_RIFT_CV1_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_RIFT_CV1_FB = ColorSpaceFB 3
pattern $bCOLOR_SPACE_RIFT_S_FB :: ColorSpaceFB
$mCOLOR_SPACE_RIFT_S_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_RIFT_S_FB = ColorSpaceFB 4
pattern $bCOLOR_SPACE_QUEST_FB :: ColorSpaceFB
$mCOLOR_SPACE_QUEST_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_QUEST_FB = ColorSpaceFB 5
pattern $bCOLOR_SPACE_P3_FB :: ColorSpaceFB
$mCOLOR_SPACE_P3_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_P3_FB = ColorSpaceFB 6
pattern $bCOLOR_SPACE_ADOBE_RGB_FB :: ColorSpaceFB
$mCOLOR_SPACE_ADOBE_RGB_FB :: forall r. ColorSpaceFB -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_ADOBE_RGB_FB = ColorSpaceFB 7
{-# complete COLOR_SPACE_UNMANAGED_FB,
COLOR_SPACE_REC2020_FB,
COLOR_SPACE_REC709_FB,
COLOR_SPACE_RIFT_CV1_FB,
COLOR_SPACE_RIFT_S_FB,
COLOR_SPACE_QUEST_FB,
COLOR_SPACE_P3_FB,
COLOR_SPACE_ADOBE_RGB_FB :: ColorSpaceFB #-}
conNameColorSpaceFB :: String
conNameColorSpaceFB :: String
conNameColorSpaceFB = "ColorSpaceFB"
enumPrefixColorSpaceFB :: String
enumPrefixColorSpaceFB :: String
enumPrefixColorSpaceFB = "COLOR_SPACE_"
showTableColorSpaceFB :: [(ColorSpaceFB, String)]
showTableColorSpaceFB :: [(ColorSpaceFB, String)]
showTableColorSpaceFB =
[ (ColorSpaceFB
COLOR_SPACE_UNMANAGED_FB, "UNMANAGED_FB")
, (ColorSpaceFB
COLOR_SPACE_REC2020_FB , "REC2020_FB")
, (ColorSpaceFB
COLOR_SPACE_REC709_FB , "REC709_FB")
, (ColorSpaceFB
COLOR_SPACE_RIFT_CV1_FB , "RIFT_CV1_FB")
, (ColorSpaceFB
COLOR_SPACE_RIFT_S_FB , "RIFT_S_FB")
, (ColorSpaceFB
COLOR_SPACE_QUEST_FB , "QUEST_FB")
, (ColorSpaceFB
COLOR_SPACE_P3_FB , "P3_FB")
, (ColorSpaceFB
COLOR_SPACE_ADOBE_RGB_FB, "ADOBE_RGB_FB")
]
instance Show ColorSpaceFB where
showsPrec :: Int -> ColorSpaceFB -> ShowS
showsPrec = String
-> [(ColorSpaceFB, String)]
-> String
-> (ColorSpaceFB -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ColorSpaceFB
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixColorSpaceFB
[(ColorSpaceFB, String)]
showTableColorSpaceFB
String
conNameColorSpaceFB
(\(ColorSpaceFB x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read ColorSpaceFB where
readPrec :: ReadPrec ColorSpaceFB
readPrec = String
-> [(ColorSpaceFB, String)]
-> String
-> (Int32 -> ColorSpaceFB)
-> ReadPrec ColorSpaceFB
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixColorSpaceFB [(ColorSpaceFB, String)]
showTableColorSpaceFB String
conNameColorSpaceFB Int32 -> ColorSpaceFB
ColorSpaceFB
type FB_color_space_SPEC_VERSION = 1
pattern FB_color_space_SPEC_VERSION :: forall a . Integral a => a
pattern $bFB_color_space_SPEC_VERSION :: a
$mFB_color_space_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
FB_color_space_SPEC_VERSION = 1
type FB_COLOR_SPACE_EXTENSION_NAME = "XR_FB_color_space"
pattern FB_COLOR_SPACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bFB_COLOR_SPACE_EXTENSION_NAME :: a
$mFB_COLOR_SPACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
FB_COLOR_SPACE_EXTENSION_NAME = "XR_FB_color_space"