{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GObject.Structs.SignalQuery
(
SignalQuery(..) ,
newZeroSignalQuery ,
noSignalQuery ,
#if defined(ENABLE_OVERLOADING)
ResolveSignalQueryMethod ,
#endif
getSignalQueryItype ,
setSignalQueryItype ,
#if defined(ENABLE_OVERLOADING)
signalQuery_itype ,
#endif
getSignalQueryNParams ,
setSignalQueryNParams ,
#if defined(ENABLE_OVERLOADING)
signalQuery_nParams ,
#endif
getSignalQueryReturnType ,
setSignalQueryReturnType ,
#if defined(ENABLE_OVERLOADING)
signalQuery_returnType ,
#endif
getSignalQuerySignalFlags ,
setSignalQuerySignalFlags ,
#if defined(ENABLE_OVERLOADING)
signalQuery_signalFlags ,
#endif
getSignalQuerySignalId ,
setSignalQuerySignalId ,
#if defined(ENABLE_OVERLOADING)
signalQuery_signalId ,
#endif
clearSignalQuerySignalName ,
getSignalQuerySignalName ,
setSignalQuerySignalName ,
#if defined(ENABLE_OVERLOADING)
signalQuery_signalName ,
#endif
) 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.ManagedPtr as B.ManagedPtr
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 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 {-# SOURCE #-} qualified GI.GObject.Flags as GObject.Flags
newtype SignalQuery = SignalQuery (ManagedPtr SignalQuery)
deriving (SignalQuery -> SignalQuery -> Bool
(SignalQuery -> SignalQuery -> Bool)
-> (SignalQuery -> SignalQuery -> Bool) -> Eq SignalQuery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignalQuery -> SignalQuery -> Bool
$c/= :: SignalQuery -> SignalQuery -> Bool
== :: SignalQuery -> SignalQuery -> Bool
$c== :: SignalQuery -> SignalQuery -> Bool
Eq)
instance WrappedPtr SignalQuery where
wrappedPtrCalloc :: IO (Ptr SignalQuery)
wrappedPtrCalloc = Int -> IO (Ptr SignalQuery)
forall a. Int -> IO (Ptr a)
callocBytes 56
wrappedPtrCopy :: SignalQuery -> IO SignalQuery
wrappedPtrCopy = \p :: SignalQuery
p -> SignalQuery
-> (Ptr SignalQuery -> IO SignalQuery) -> IO SignalQuery
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
p (Int -> Ptr SignalQuery -> IO (Ptr SignalQuery)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 56 (Ptr SignalQuery -> IO (Ptr SignalQuery))
-> (Ptr SignalQuery -> IO SignalQuery)
-> Ptr SignalQuery
-> IO SignalQuery
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr SignalQuery -> SignalQuery)
-> Ptr SignalQuery -> IO SignalQuery
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr SignalQuery -> SignalQuery
SignalQuery)
wrappedPtrFree :: Maybe (GDestroyNotify SignalQuery)
wrappedPtrFree = GDestroyNotify SignalQuery -> Maybe (GDestroyNotify SignalQuery)
forall a. a -> Maybe a
Just GDestroyNotify SignalQuery
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroSignalQuery :: MonadIO m => m SignalQuery
newZeroSignalQuery :: m SignalQuery
newZeroSignalQuery = IO SignalQuery -> m SignalQuery
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalQuery -> m SignalQuery)
-> IO SignalQuery -> m SignalQuery
forall a b. (a -> b) -> a -> b
$ IO (Ptr SignalQuery)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr SignalQuery)
-> (Ptr SignalQuery -> IO SignalQuery) -> IO SignalQuery
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr SignalQuery -> SignalQuery)
-> Ptr SignalQuery -> IO SignalQuery
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr SignalQuery -> SignalQuery
SignalQuery
instance tag ~ 'AttrSet => Constructible SignalQuery tag where
new :: (ManagedPtr SignalQuery -> SignalQuery)
-> [AttrOp SignalQuery tag] -> m SignalQuery
new _ attrs :: [AttrOp SignalQuery tag]
attrs = do
SignalQuery
o <- m SignalQuery
forall (m :: * -> *). MonadIO m => m SignalQuery
newZeroSignalQuery
SignalQuery -> [AttrOp SignalQuery 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set SignalQuery
o [AttrOp SignalQuery tag]
[AttrOp SignalQuery 'AttrSet]
attrs
SignalQuery -> m SignalQuery
forall (m :: * -> *) a. Monad m => a -> m a
return SignalQuery
o
noSignalQuery :: Maybe SignalQuery
noSignalQuery :: Maybe SignalQuery
noSignalQuery = Maybe SignalQuery
forall a. Maybe a
Nothing
getSignalQuerySignalId :: MonadIO m => SignalQuery -> m Word32
getSignalQuerySignalId :: SignalQuery -> m Word32
getSignalQuerySignalId s :: SignalQuery
s = 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
$ SignalQuery -> (Ptr SignalQuery -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO Word32) -> IO Word32)
-> (Ptr SignalQuery -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setSignalQuerySignalId :: MonadIO m => SignalQuery -> Word32 -> m ()
setSignalQuerySignalId :: SignalQuery -> Word32 -> m ()
setSignalQuerySignalId s :: SignalQuery
s val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data SignalQuerySignalIdFieldInfo
instance AttrInfo SignalQuerySignalIdFieldInfo where
type AttrBaseTypeConstraint SignalQuerySignalIdFieldInfo = (~) SignalQuery
type AttrAllowedOps SignalQuerySignalIdFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalQuerySignalIdFieldInfo = (~) Word32
type AttrTransferTypeConstraint SignalQuerySignalIdFieldInfo = (~)Word32
type AttrTransferType SignalQuerySignalIdFieldInfo = Word32
type AttrGetType SignalQuerySignalIdFieldInfo = Word32
type AttrLabel SignalQuerySignalIdFieldInfo = "signal_id"
type AttrOrigin SignalQuerySignalIdFieldInfo = SignalQuery
attrGet = getSignalQuerySignalId
attrSet = setSignalQuerySignalId
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
signalQuery_signalId :: AttrLabelProxy "signalId"
signalQuery_signalId = AttrLabelProxy
#endif
getSignalQuerySignalName :: MonadIO m => SignalQuery -> m (Maybe T.Text)
getSignalQuerySignalName :: SignalQuery -> m (Maybe Text)
getSignalQuerySignalName s :: SignalQuery
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ SignalQuery
-> (Ptr SignalQuery -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr SignalQuery -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO CString
Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \val' :: CString
val' -> do
Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setSignalQuerySignalName :: MonadIO m => SignalQuery -> CString -> m ()
setSignalQuerySignalName :: SignalQuery -> CString -> m ()
setSignalQuerySignalName s :: SignalQuery
s val :: CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CString
val :: CString)
clearSignalQuerySignalName :: MonadIO m => SignalQuery -> m ()
clearSignalQuerySignalName :: SignalQuery -> m ()
clearSignalQuerySignalName s :: SignalQuery
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data SignalQuerySignalNameFieldInfo
instance AttrInfo SignalQuerySignalNameFieldInfo where
type AttrBaseTypeConstraint SignalQuerySignalNameFieldInfo = (~) SignalQuery
type AttrAllowedOps SignalQuerySignalNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint SignalQuerySignalNameFieldInfo = (~) CString
type AttrTransferTypeConstraint SignalQuerySignalNameFieldInfo = (~)CString
type AttrTransferType SignalQuerySignalNameFieldInfo = CString
type AttrGetType SignalQuerySignalNameFieldInfo = Maybe T.Text
type AttrLabel SignalQuerySignalNameFieldInfo = "signal_name"
type AttrOrigin SignalQuerySignalNameFieldInfo = SignalQuery
attrGet = getSignalQuerySignalName
attrSet = setSignalQuerySignalName
attrConstruct = undefined
attrClear = clearSignalQuerySignalName
attrTransfer _ v = do
return v
signalQuery_signalName :: AttrLabelProxy "signalName"
signalQuery_signalName = AttrLabelProxy
#endif
getSignalQueryItype :: MonadIO m => SignalQuery -> m GType
getSignalQueryItype :: SignalQuery -> m GType
getSignalQueryItype s :: SignalQuery
s = 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
$ SignalQuery -> (Ptr SignalQuery -> IO GType) -> IO GType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO GType) -> IO GType)
-> (Ptr SignalQuery -> IO GType) -> IO GType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO CGType
let val' :: GType
val' = CGType -> GType
GType CGType
val
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'
setSignalQueryItype :: MonadIO m => SignalQuery -> GType -> m ()
setSignalQueryItype :: SignalQuery -> GType -> m ()
setSignalQueryItype s :: SignalQuery
s val :: GType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
let val' :: CGType
val' = GType -> CGType
gtypeToCGType GType
val
Ptr CGType -> CGType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (CGType
val' :: CGType)
#if defined(ENABLE_OVERLOADING)
data SignalQueryItypeFieldInfo
instance AttrInfo SignalQueryItypeFieldInfo where
type AttrBaseTypeConstraint SignalQueryItypeFieldInfo = (~) SignalQuery
type AttrAllowedOps SignalQueryItypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalQueryItypeFieldInfo = (~) GType
type AttrTransferTypeConstraint SignalQueryItypeFieldInfo = (~)GType
type AttrTransferType SignalQueryItypeFieldInfo = GType
type AttrGetType SignalQueryItypeFieldInfo = GType
type AttrLabel SignalQueryItypeFieldInfo = "itype"
type AttrOrigin SignalQueryItypeFieldInfo = SignalQuery
attrGet = getSignalQueryItype
attrSet = setSignalQueryItype
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
signalQuery_itype :: AttrLabelProxy "itype"
signalQuery_itype = AttrLabelProxy
#endif
getSignalQuerySignalFlags :: MonadIO m => SignalQuery -> m [GObject.Flags.SignalFlags]
getSignalQuerySignalFlags :: SignalQuery -> m [SignalFlags]
getSignalQuerySignalFlags s :: SignalQuery
s = IO [SignalFlags] -> m [SignalFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [SignalFlags] -> m [SignalFlags])
-> IO [SignalFlags] -> m [SignalFlags]
forall a b. (a -> b) -> a -> b
$ SignalQuery
-> (Ptr SignalQuery -> IO [SignalFlags]) -> IO [SignalFlags]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO [SignalFlags]) -> IO [SignalFlags])
-> (Ptr SignalQuery -> IO [SignalFlags]) -> IO [SignalFlags]
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO CUInt
let val' :: [SignalFlags]
val' = CUInt -> [SignalFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
[SignalFlags] -> IO [SignalFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [SignalFlags]
val'
setSignalQuerySignalFlags :: MonadIO m => SignalQuery -> [GObject.Flags.SignalFlags] -> m ()
setSignalQuerySignalFlags :: SignalQuery -> [SignalFlags] -> m ()
setSignalQuerySignalFlags s :: SignalQuery
s val :: [SignalFlags]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
let val' :: CUInt
val' = [SignalFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SignalFlags]
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data SignalQuerySignalFlagsFieldInfo
instance AttrInfo SignalQuerySignalFlagsFieldInfo where
type AttrBaseTypeConstraint SignalQuerySignalFlagsFieldInfo = (~) SignalQuery
type AttrAllowedOps SignalQuerySignalFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalQuerySignalFlagsFieldInfo = (~) [GObject.Flags.SignalFlags]
type AttrTransferTypeConstraint SignalQuerySignalFlagsFieldInfo = (~)[GObject.Flags.SignalFlags]
type AttrTransferType SignalQuerySignalFlagsFieldInfo = [GObject.Flags.SignalFlags]
type AttrGetType SignalQuerySignalFlagsFieldInfo = [GObject.Flags.SignalFlags]
type AttrLabel SignalQuerySignalFlagsFieldInfo = "signal_flags"
type AttrOrigin SignalQuerySignalFlagsFieldInfo = SignalQuery
attrGet = getSignalQuerySignalFlags
attrSet = setSignalQuerySignalFlags
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
signalQuery_signalFlags :: AttrLabelProxy "signalFlags"
signalQuery_signalFlags = AttrLabelProxy
#endif
getSignalQueryReturnType :: MonadIO m => SignalQuery -> m GType
getSignalQueryReturnType :: SignalQuery -> m GType
getSignalQueryReturnType s :: SignalQuery
s = 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
$ SignalQuery -> (Ptr SignalQuery -> IO GType) -> IO GType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO GType) -> IO GType)
-> (Ptr SignalQuery -> IO GType) -> IO GType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) :: IO CGType
let val' :: GType
val' = CGType -> GType
GType CGType
val
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'
setSignalQueryReturnType :: MonadIO m => SignalQuery -> GType -> m ()
setSignalQueryReturnType :: SignalQuery -> GType -> m ()
setSignalQueryReturnType s :: SignalQuery
s val :: GType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
let val' :: CGType
val' = GType -> CGType
gtypeToCGType GType
val
Ptr CGType -> CGType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (CGType
val' :: CGType)
#if defined(ENABLE_OVERLOADING)
data SignalQueryReturnTypeFieldInfo
instance AttrInfo SignalQueryReturnTypeFieldInfo where
type AttrBaseTypeConstraint SignalQueryReturnTypeFieldInfo = (~) SignalQuery
type AttrAllowedOps SignalQueryReturnTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalQueryReturnTypeFieldInfo = (~) GType
type AttrTransferTypeConstraint SignalQueryReturnTypeFieldInfo = (~)GType
type AttrTransferType SignalQueryReturnTypeFieldInfo = GType
type AttrGetType SignalQueryReturnTypeFieldInfo = GType
type AttrLabel SignalQueryReturnTypeFieldInfo = "return_type"
type AttrOrigin SignalQueryReturnTypeFieldInfo = SignalQuery
attrGet = getSignalQueryReturnType
attrSet = setSignalQueryReturnType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
signalQuery_returnType :: AttrLabelProxy "returnType"
signalQuery_returnType = AttrLabelProxy
#endif
getSignalQueryNParams :: MonadIO m => SignalQuery -> m Word32
getSignalQueryNParams :: SignalQuery -> m Word32
getSignalQueryNParams s :: SignalQuery
s = 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
$ SignalQuery -> (Ptr SignalQuery -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO Word32) -> IO Word32)
-> (Ptr SignalQuery -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setSignalQueryNParams :: MonadIO m => SignalQuery -> Word32 -> m ()
setSignalQueryNParams :: SignalQuery -> Word32 -> m ()
setSignalQueryNParams s :: SignalQuery
s val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SignalQuery -> (Ptr SignalQuery -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SignalQuery
s ((Ptr SignalQuery -> IO ()) -> IO ())
-> (Ptr SignalQuery -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SignalQuery
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SignalQuery
ptr Ptr SignalQuery -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data SignalQueryNParamsFieldInfo
instance AttrInfo SignalQueryNParamsFieldInfo where
type AttrBaseTypeConstraint SignalQueryNParamsFieldInfo = (~) SignalQuery
type AttrAllowedOps SignalQueryNParamsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint SignalQueryNParamsFieldInfo = (~) Word32
type AttrTransferTypeConstraint SignalQueryNParamsFieldInfo = (~)Word32
type AttrTransferType SignalQueryNParamsFieldInfo = Word32
type AttrGetType SignalQueryNParamsFieldInfo = Word32
type AttrLabel SignalQueryNParamsFieldInfo = "n_params"
type AttrOrigin SignalQueryNParamsFieldInfo = SignalQuery
attrGet = getSignalQueryNParams
attrSet = setSignalQueryNParams
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
signalQuery_nParams :: AttrLabelProxy "nParams"
signalQuery_nParams = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SignalQuery
type instance O.AttributeList SignalQuery = SignalQueryAttributeList
type SignalQueryAttributeList = ('[ '("signalId", SignalQuerySignalIdFieldInfo), '("signalName", SignalQuerySignalNameFieldInfo), '("itype", SignalQueryItypeFieldInfo), '("signalFlags", SignalQuerySignalFlagsFieldInfo), '("returnType", SignalQueryReturnTypeFieldInfo), '("nParams", SignalQueryNParamsFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveSignalQueryMethod (t :: Symbol) (o :: *) :: * where
ResolveSignalQueryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSignalQueryMethod t SignalQuery, O.MethodInfo info SignalQuery p) => OL.IsLabel t (SignalQuery -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif