{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
module SDL3.Sys.Bindgen.Metal (
SDL3.Sys.Bindgen.Metal.SDL_MetalView (..),
)
where
import Prelude (Eq, Ord, Show, type (~))
import HsBindgen.Runtime.HasCField qualified as HasCField
import HsBindgen.Runtime.Marshal qualified as Marshal
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CompatHasField qualified as BG.CompatHasField
newtype SDL_MetalView = SDL_MetalView
{ SDL_MetalView -> Ptr Void
unwrap :: BG.Ptr BG.Void
}
deriving stock ((forall x. SDL_MetalView -> Rep SDL_MetalView x)
-> (forall x. Rep SDL_MetalView x -> SDL_MetalView)
-> Generic SDL_MetalView
forall x. Rep SDL_MetalView x -> SDL_MetalView
forall x. SDL_MetalView -> Rep SDL_MetalView x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_MetalView -> Rep SDL_MetalView x
from :: forall x. SDL_MetalView -> Rep SDL_MetalView x
$cto :: forall x. Rep SDL_MetalView x -> SDL_MetalView
to :: forall x. Rep SDL_MetalView x -> SDL_MetalView
BG.Generic, SDL_MetalView -> SDL_MetalView -> Bool
(SDL_MetalView -> SDL_MetalView -> Bool)
-> (SDL_MetalView -> SDL_MetalView -> Bool) -> Eq SDL_MetalView
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_MetalView -> SDL_MetalView -> Bool
== :: SDL_MetalView -> SDL_MetalView -> Bool
$c/= :: SDL_MetalView -> SDL_MetalView -> Bool
/= :: SDL_MetalView -> SDL_MetalView -> Bool
Eq, Eq SDL_MetalView
Eq SDL_MetalView =>
(SDL_MetalView -> SDL_MetalView -> Ordering)
-> (SDL_MetalView -> SDL_MetalView -> Bool)
-> (SDL_MetalView -> SDL_MetalView -> Bool)
-> (SDL_MetalView -> SDL_MetalView -> Bool)
-> (SDL_MetalView -> SDL_MetalView -> Bool)
-> (SDL_MetalView -> SDL_MetalView -> SDL_MetalView)
-> (SDL_MetalView -> SDL_MetalView -> SDL_MetalView)
-> Ord SDL_MetalView
SDL_MetalView -> SDL_MetalView -> Bool
SDL_MetalView -> SDL_MetalView -> Ordering
SDL_MetalView -> SDL_MetalView -> SDL_MetalView
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
$ccompare :: SDL_MetalView -> SDL_MetalView -> Ordering
compare :: SDL_MetalView -> SDL_MetalView -> Ordering
$c< :: SDL_MetalView -> SDL_MetalView -> Bool
< :: SDL_MetalView -> SDL_MetalView -> Bool
$c<= :: SDL_MetalView -> SDL_MetalView -> Bool
<= :: SDL_MetalView -> SDL_MetalView -> Bool
$c> :: SDL_MetalView -> SDL_MetalView -> Bool
> :: SDL_MetalView -> SDL_MetalView -> Bool
$c>= :: SDL_MetalView -> SDL_MetalView -> Bool
>= :: SDL_MetalView -> SDL_MetalView -> Bool
$cmax :: SDL_MetalView -> SDL_MetalView -> SDL_MetalView
max :: SDL_MetalView -> SDL_MetalView -> SDL_MetalView
$cmin :: SDL_MetalView -> SDL_MetalView -> SDL_MetalView
min :: SDL_MetalView -> SDL_MetalView -> SDL_MetalView
Ord, Int -> SDL_MetalView -> ShowS
[SDL_MetalView] -> ShowS
SDL_MetalView -> String
(Int -> SDL_MetalView -> ShowS)
-> (SDL_MetalView -> String)
-> ([SDL_MetalView] -> ShowS)
-> Show SDL_MetalView
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_MetalView -> ShowS
showsPrec :: Int -> SDL_MetalView -> ShowS
$cshow :: SDL_MetalView -> String
show :: SDL_MetalView -> String
$cshowList :: [SDL_MetalView] -> ShowS
showList :: [SDL_MetalView] -> ShowS
Show)
deriving newtype
( FFIType SDL_MetalView -> SDL_MetalView
SDL_MetalView -> FFIType SDL_MetalView
(SDL_MetalView -> FFIType SDL_MetalView)
-> (FFIType SDL_MetalView -> SDL_MetalView)
-> HasFFIType SDL_MetalView
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_MetalView -> FFIType SDL_MetalView
toFFIType :: SDL_MetalView -> FFIType SDL_MetalView
$cfromFFIType :: FFIType SDL_MetalView -> SDL_MetalView
fromFFIType :: FFIType SDL_MetalView -> SDL_MetalView
BG.HasFFIType
, Ptr SDL_MetalView -> IO SDL_MetalView
Ptr SDL_MetalView -> Int -> IO SDL_MetalView
Ptr SDL_MetalView -> Int -> SDL_MetalView -> IO ()
Ptr SDL_MetalView -> SDL_MetalView -> IO ()
SDL_MetalView -> Int
(SDL_MetalView -> Int)
-> (SDL_MetalView -> Int)
-> (Ptr SDL_MetalView -> Int -> IO SDL_MetalView)
-> (Ptr SDL_MetalView -> Int -> SDL_MetalView -> IO ())
-> (forall b. Ptr b -> Int -> IO SDL_MetalView)
-> (forall b. Ptr b -> Int -> SDL_MetalView -> IO ())
-> (Ptr SDL_MetalView -> IO SDL_MetalView)
-> (Ptr SDL_MetalView -> SDL_MetalView -> IO ())
-> Storable SDL_MetalView
forall b. Ptr b -> Int -> IO SDL_MetalView
forall b. Ptr b -> Int -> SDL_MetalView -> 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
$csizeOf :: SDL_MetalView -> Int
sizeOf :: SDL_MetalView -> Int
$calignment :: SDL_MetalView -> Int
alignment :: SDL_MetalView -> Int
$cpeekElemOff :: Ptr SDL_MetalView -> Int -> IO SDL_MetalView
peekElemOff :: Ptr SDL_MetalView -> Int -> IO SDL_MetalView
$cpokeElemOff :: Ptr SDL_MetalView -> Int -> SDL_MetalView -> IO ()
pokeElemOff :: Ptr SDL_MetalView -> Int -> SDL_MetalView -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SDL_MetalView
peekByteOff :: forall b. Ptr b -> Int -> IO SDL_MetalView
$cpokeByteOff :: forall b. Ptr b -> Int -> SDL_MetalView -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> SDL_MetalView -> IO ()
$cpeek :: Ptr SDL_MetalView -> IO SDL_MetalView
peek :: Ptr SDL_MetalView -> IO SDL_MetalView
$cpoke :: Ptr SDL_MetalView -> SDL_MetalView -> IO ()
poke :: Ptr SDL_MetalView -> SDL_MetalView -> IO ()
BG.Storable
, Ptr SDL_MetalView -> IO SDL_MetalView
(Ptr SDL_MetalView -> IO SDL_MetalView) -> ReadRaw SDL_MetalView
forall a. (Ptr a -> IO a) -> ReadRaw a
$creadRaw :: Ptr SDL_MetalView -> IO SDL_MetalView
readRaw :: Ptr SDL_MetalView -> IO SDL_MetalView
Marshal.ReadRaw
, Proxy SDL_MetalView -> Int
(Proxy SDL_MetalView -> Int)
-> (Proxy SDL_MetalView -> Int) -> StaticSize SDL_MetalView
forall a. (Proxy a -> Int) -> (Proxy a -> Int) -> StaticSize a
$cstaticSizeOf :: Proxy SDL_MetalView -> Int
staticSizeOf :: Proxy SDL_MetalView -> Int
$cstaticAlignment :: Proxy SDL_MetalView -> Int
staticAlignment :: Proxy SDL_MetalView -> Int
Marshal.StaticSize
, Ptr SDL_MetalView -> SDL_MetalView -> IO ()
(Ptr SDL_MetalView -> SDL_MetalView -> IO ())
-> WriteRaw SDL_MetalView
forall a. (Ptr a -> a -> IO ()) -> WriteRaw a
$cwriteRaw :: Ptr SDL_MetalView -> SDL_MetalView -> IO ()
writeRaw :: Ptr SDL_MetalView -> SDL_MetalView -> IO ()
Marshal.WriteRaw
)
instance
(ty ~ BG.Ptr BG.Void)
=> BG.CompatHasField.HasField "unwrap" SDL_MetalView ty
where
hasField :: SDL_MetalView -> (ty -> SDL_MetalView, ty)
hasField =
\SDL_MetalView
x0 ->
( \ty
y1 ->
SDL_MetalView{unwrap :: Ptr Void
unwrap = ty
Ptr Void
y1}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap" SDL_MetalView
x0
)
instance
(ty ~ BG.Ptr BG.Void)
=> BG.HasField "unwrap" (BG.Ptr SDL_MetalView) (BG.Ptr ty)
where
getField :: Ptr SDL_MetalView -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_MetalView -> Ptr (CFieldType SDL_MetalView "unwrap")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"unwrap")
instance HasCField.HasCField SDL_MetalView "unwrap" where
type
CFieldType SDL_MetalView "unwrap" =
BG.Ptr BG.Void
offset# :: Proxy# SDL_MetalView -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_MetalView
_ -> \Proxy# "unwrap"
_ -> Int
0