{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Structs.DBusSignalInfo
(
DBusSignalInfo(..) ,
newZeroDBusSignalInfo ,
noDBusSignalInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusSignalInfoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusSignalInfoRefMethodInfo ,
#endif
dBusSignalInfoRef ,
#if defined(ENABLE_OVERLOADING)
DBusSignalInfoUnrefMethodInfo ,
#endif
dBusSignalInfoUnref ,
clearDBusSignalInfoAnnotations ,
#if defined(ENABLE_OVERLOADING)
dBusSignalInfo_annotations ,
#endif
getDBusSignalInfoAnnotations ,
setDBusSignalInfoAnnotations ,
clearDBusSignalInfoArgs ,
#if defined(ENABLE_OVERLOADING)
dBusSignalInfo_args ,
#endif
getDBusSignalInfoArgs ,
setDBusSignalInfoArgs ,
clearDBusSignalInfoName ,
#if defined(ENABLE_OVERLOADING)
dBusSignalInfo_name ,
#endif
getDBusSignalInfoName ,
setDBusSignalInfoName ,
#if defined(ENABLE_OVERLOADING)
dBusSignalInfo_refCount ,
#endif
getDBusSignalInfoRefCount ,
setDBusSignalInfoRefCount ,
) 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.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusArgInfo as Gio.DBusArgInfo
newtype DBusSignalInfo = DBusSignalInfo (ManagedPtr DBusSignalInfo)
deriving (DBusSignalInfo -> DBusSignalInfo -> Bool
(DBusSignalInfo -> DBusSignalInfo -> Bool)
-> (DBusSignalInfo -> DBusSignalInfo -> Bool) -> Eq DBusSignalInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBusSignalInfo -> DBusSignalInfo -> Bool
$c/= :: DBusSignalInfo -> DBusSignalInfo -> Bool
== :: DBusSignalInfo -> DBusSignalInfo -> Bool
$c== :: DBusSignalInfo -> DBusSignalInfo -> Bool
Eq)
foreign import ccall "g_dbus_signal_info_get_type" c_g_dbus_signal_info_get_type ::
IO GType
instance BoxedObject DBusSignalInfo where
boxedType :: DBusSignalInfo -> IO GType
boxedType _ = IO GType
c_g_dbus_signal_info_get_type
instance B.GValue.IsGValue DBusSignalInfo where
toGValue :: DBusSignalInfo -> IO GValue
toGValue o :: DBusSignalInfo
o = do
GType
gtype <- IO GType
c_g_dbus_signal_info_get_type
DBusSignalInfo -> (Ptr DBusSignalInfo -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusSignalInfo
o (GType
-> (GValue -> Ptr DBusSignalInfo -> IO ())
-> Ptr DBusSignalInfo
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DBusSignalInfo -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO DBusSignalInfo
fromGValue gv :: GValue
gv = do
Ptr DBusSignalInfo
ptr <- GValue -> IO (Ptr DBusSignalInfo)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr DBusSignalInfo)
(ManagedPtr DBusSignalInfo -> DBusSignalInfo)
-> Ptr DBusSignalInfo -> IO DBusSignalInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr DBusSignalInfo -> DBusSignalInfo
DBusSignalInfo Ptr DBusSignalInfo
ptr
newZeroDBusSignalInfo :: MonadIO m => m DBusSignalInfo
newZeroDBusSignalInfo :: m DBusSignalInfo
newZeroDBusSignalInfo = IO DBusSignalInfo -> m DBusSignalInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusSignalInfo -> m DBusSignalInfo)
-> IO DBusSignalInfo -> m DBusSignalInfo
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr DBusSignalInfo)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 IO (Ptr DBusSignalInfo)
-> (Ptr DBusSignalInfo -> IO DBusSignalInfo) -> IO DBusSignalInfo
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr DBusSignalInfo -> DBusSignalInfo)
-> Ptr DBusSignalInfo -> IO DBusSignalInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DBusSignalInfo -> DBusSignalInfo
DBusSignalInfo
instance tag ~ 'AttrSet => Constructible DBusSignalInfo tag where
new :: (ManagedPtr DBusSignalInfo -> DBusSignalInfo)
-> [AttrOp DBusSignalInfo tag] -> m DBusSignalInfo
new _ attrs :: [AttrOp DBusSignalInfo tag]
attrs = do
DBusSignalInfo
o <- m DBusSignalInfo
forall (m :: * -> *). MonadIO m => m DBusSignalInfo
newZeroDBusSignalInfo
DBusSignalInfo -> [AttrOp DBusSignalInfo 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set DBusSignalInfo
o [AttrOp DBusSignalInfo tag]
[AttrOp DBusSignalInfo 'AttrSet]
attrs
DBusSignalInfo -> m DBusSignalInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DBusSignalInfo
o
noDBusSignalInfo :: Maybe DBusSignalInfo
noDBusSignalInfo :: Maybe DBusSignalInfo
noDBusSignalInfo = Maybe DBusSignalInfo
forall a. Maybe a
Nothing
getDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> m Int32
getDBusSignalInfoRefCount :: DBusSignalInfo -> m Int32
getDBusSignalInfoRefCount s :: DBusSignalInfo
s = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO Int32) -> IO Int32)
-> (Ptr DBusSignalInfo -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> Int32 -> m ()
setDBusSignalInfoRefCount :: DBusSignalInfo -> Int32 -> m ()
setDBusSignalInfoRefCount s :: DBusSignalInfo
s val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data DBusSignalInfoRefCountFieldInfo
instance AttrInfo DBusSignalInfoRefCountFieldInfo where
type AttrBaseTypeConstraint DBusSignalInfoRefCountFieldInfo = (~) DBusSignalInfo
type AttrAllowedOps DBusSignalInfoRefCountFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DBusSignalInfoRefCountFieldInfo = (~) Int32
type AttrTransferTypeConstraint DBusSignalInfoRefCountFieldInfo = (~)Int32
type AttrTransferType DBusSignalInfoRefCountFieldInfo = Int32
type AttrGetType DBusSignalInfoRefCountFieldInfo = Int32
type AttrLabel DBusSignalInfoRefCountFieldInfo = "ref_count"
type AttrOrigin DBusSignalInfoRefCountFieldInfo = DBusSignalInfo
attrGet = getDBusSignalInfoRefCount
attrSet = setDBusSignalInfoRefCount
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dBusSignalInfo_refCount :: AttrLabelProxy "refCount"
dBusSignalInfo_refCount = AttrLabelProxy
#endif
getDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> m (Maybe T.Text)
getDBusSignalInfoName :: DBusSignalInfo -> m (Maybe Text)
getDBusSignalInfoName s :: DBusSignalInfo
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
$ DBusSignalInfo
-> (Ptr DBusSignalInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr DBusSignalInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> 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
setDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> CString -> m ()
setDBusSignalInfoName :: DBusSignalInfo -> CString -> m ()
setDBusSignalInfoName s :: DBusSignalInfo
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
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CString
val :: CString)
clearDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> m ()
clearDBusSignalInfoName :: DBusSignalInfo -> m ()
clearDBusSignalInfoName s :: DBusSignalInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> 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 DBusSignalInfoNameFieldInfo
instance AttrInfo DBusSignalInfoNameFieldInfo where
type AttrBaseTypeConstraint DBusSignalInfoNameFieldInfo = (~) DBusSignalInfo
type AttrAllowedOps DBusSignalInfoNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusSignalInfoNameFieldInfo = (~) CString
type AttrTransferTypeConstraint DBusSignalInfoNameFieldInfo = (~)CString
type AttrTransferType DBusSignalInfoNameFieldInfo = CString
type AttrGetType DBusSignalInfoNameFieldInfo = Maybe T.Text
type AttrLabel DBusSignalInfoNameFieldInfo = "name"
type AttrOrigin DBusSignalInfoNameFieldInfo = DBusSignalInfo
attrGet = getDBusSignalInfoName
attrSet = setDBusSignalInfoName
attrConstruct = undefined
attrClear = clearDBusSignalInfoName
attrTransfer _ v = do
return v
dBusSignalInfo_name :: AttrLabelProxy "name"
dBusSignalInfo_name = AttrLabelProxy
#endif
getDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> m (Maybe [Gio.DBusArgInfo.DBusArgInfo])
getDBusSignalInfoArgs :: DBusSignalInfo -> m (Maybe [DBusArgInfo])
getDBusSignalInfoArgs s :: DBusSignalInfo
s = IO (Maybe [DBusArgInfo]) -> m (Maybe [DBusArgInfo])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [DBusArgInfo]) -> m (Maybe [DBusArgInfo]))
-> IO (Maybe [DBusArgInfo]) -> m (Maybe [DBusArgInfo])
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo
-> (Ptr DBusSignalInfo -> IO (Maybe [DBusArgInfo]))
-> IO (Maybe [DBusArgInfo])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO (Maybe [DBusArgInfo]))
-> IO (Maybe [DBusArgInfo]))
-> (Ptr DBusSignalInfo -> IO (Maybe [DBusArgInfo]))
-> IO (Maybe [DBusArgInfo])
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr (Ptr DBusArgInfo)
val <- Ptr (Ptr (Ptr DBusArgInfo)) -> IO (Ptr (Ptr DBusArgInfo))
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr (Ptr (Ptr DBusArgInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO (Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo))
Maybe [DBusArgInfo]
result <- Ptr (Ptr DBusArgInfo)
-> (Ptr (Ptr DBusArgInfo) -> IO [DBusArgInfo])
-> IO (Maybe [DBusArgInfo])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr (Ptr DBusArgInfo)
val ((Ptr (Ptr DBusArgInfo) -> IO [DBusArgInfo])
-> IO (Maybe [DBusArgInfo]))
-> (Ptr (Ptr DBusArgInfo) -> IO [DBusArgInfo])
-> IO (Maybe [DBusArgInfo])
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr (Ptr DBusArgInfo)
val' -> do
[Ptr DBusArgInfo]
val'' <- Ptr (Ptr DBusArgInfo) -> IO [Ptr DBusArgInfo]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr DBusArgInfo)
val'
[DBusArgInfo]
val''' <- (Ptr DBusArgInfo -> IO DBusArgInfo)
-> [Ptr DBusArgInfo] -> IO [DBusArgInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr DBusArgInfo -> DBusArgInfo)
-> Ptr DBusArgInfo -> IO DBusArgInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DBusArgInfo -> DBusArgInfo
Gio.DBusArgInfo.DBusArgInfo) [Ptr DBusArgInfo]
val''
[DBusArgInfo] -> IO [DBusArgInfo]
forall (m :: * -> *) a. Monad m => a -> m a
return [DBusArgInfo]
val'''
Maybe [DBusArgInfo] -> IO (Maybe [DBusArgInfo])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [DBusArgInfo]
result
setDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo) -> m ()
setDBusSignalInfoArgs :: DBusSignalInfo -> Ptr (Ptr DBusArgInfo) -> m ()
setDBusSignalInfoArgs s :: DBusSignalInfo
s val :: Ptr (Ptr DBusArgInfo)
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr (Ptr (Ptr DBusArgInfo)) -> Ptr (Ptr DBusArgInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr (Ptr (Ptr DBusArgInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (Ptr (Ptr DBusArgInfo)
val :: Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo))
clearDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> m ()
clearDBusSignalInfoArgs :: DBusSignalInfo -> m ()
clearDBusSignalInfoArgs s :: DBusSignalInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr (Ptr (Ptr DBusArgInfo)) -> Ptr (Ptr DBusArgInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr (Ptr (Ptr DBusArgInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (Ptr (Ptr DBusArgInfo)
forall a. Ptr a
FP.nullPtr :: Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo))
#if defined(ENABLE_OVERLOADING)
data DBusSignalInfoArgsFieldInfo
instance AttrInfo DBusSignalInfoArgsFieldInfo where
type AttrBaseTypeConstraint DBusSignalInfoArgsFieldInfo = (~) DBusSignalInfo
type AttrAllowedOps DBusSignalInfoArgsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusSignalInfoArgsFieldInfo = (~) (Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo))
type AttrTransferTypeConstraint DBusSignalInfoArgsFieldInfo = (~)(Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo))
type AttrTransferType DBusSignalInfoArgsFieldInfo = (Ptr (Ptr Gio.DBusArgInfo.DBusArgInfo))
type AttrGetType DBusSignalInfoArgsFieldInfo = Maybe [Gio.DBusArgInfo.DBusArgInfo]
type AttrLabel DBusSignalInfoArgsFieldInfo = "args"
type AttrOrigin DBusSignalInfoArgsFieldInfo = DBusSignalInfo
attrGet = getDBusSignalInfoArgs
attrSet = setDBusSignalInfoArgs
attrConstruct = undefined
attrClear = clearDBusSignalInfoArgs
attrTransfer _ v = do
return v
dBusSignalInfo_args :: AttrLabelProxy "args"
dBusSignalInfo_args = AttrLabelProxy
#endif
getDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> m (Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo])
getDBusSignalInfoAnnotations :: DBusSignalInfo -> m (Maybe [DBusAnnotationInfo])
getDBusSignalInfoAnnotations s :: DBusSignalInfo
s = IO (Maybe [DBusAnnotationInfo]) -> m (Maybe [DBusAnnotationInfo])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [DBusAnnotationInfo]) -> m (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
-> m (Maybe [DBusAnnotationInfo])
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo
-> (Ptr DBusSignalInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo]))
-> (Ptr DBusSignalInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr (Ptr DBusAnnotationInfo)
val <- Ptr (Ptr (Ptr DBusAnnotationInfo))
-> IO (Ptr (Ptr DBusAnnotationInfo))
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
Maybe [DBusAnnotationInfo]
result <- Ptr (Ptr DBusAnnotationInfo)
-> (Ptr (Ptr DBusAnnotationInfo) -> IO [DBusAnnotationInfo])
-> IO (Maybe [DBusAnnotationInfo])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr (Ptr DBusAnnotationInfo)
val ((Ptr (Ptr DBusAnnotationInfo) -> IO [DBusAnnotationInfo])
-> IO (Maybe [DBusAnnotationInfo]))
-> (Ptr (Ptr DBusAnnotationInfo) -> IO [DBusAnnotationInfo])
-> IO (Maybe [DBusAnnotationInfo])
forall a b. (a -> b) -> a -> b
$ \val' :: Ptr (Ptr DBusAnnotationInfo)
val' -> do
[Ptr DBusAnnotationInfo]
val'' <- Ptr (Ptr DBusAnnotationInfo) -> IO [Ptr DBusAnnotationInfo]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr DBusAnnotationInfo)
val'
[DBusAnnotationInfo]
val''' <- (Ptr DBusAnnotationInfo -> IO DBusAnnotationInfo)
-> [Ptr DBusAnnotationInfo] -> IO [DBusAnnotationInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr DBusAnnotationInfo -> DBusAnnotationInfo)
-> Ptr DBusAnnotationInfo -> IO DBusAnnotationInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DBusAnnotationInfo -> DBusAnnotationInfo
Gio.DBusAnnotationInfo.DBusAnnotationInfo) [Ptr DBusAnnotationInfo]
val''
[DBusAnnotationInfo] -> IO [DBusAnnotationInfo]
forall (m :: * -> *) a. Monad m => a -> m a
return [DBusAnnotationInfo]
val'''
Maybe [DBusAnnotationInfo] -> IO (Maybe [DBusAnnotationInfo])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [DBusAnnotationInfo]
result
setDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo) -> m ()
setDBusSignalInfoAnnotations :: DBusSignalInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()
setDBusSignalInfoAnnotations s :: DBusSignalInfo
s val :: Ptr (Ptr DBusAnnotationInfo)
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr (Ptr (Ptr DBusAnnotationInfo))
-> Ptr (Ptr DBusAnnotationInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (Ptr (Ptr DBusAnnotationInfo)
val :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
clearDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> m ()
clearDBusSignalInfoAnnotations :: DBusSignalInfo -> m ()
clearDBusSignalInfoAnnotations s :: DBusSignalInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusSignalInfo -> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusSignalInfo
s ((Ptr DBusSignalInfo -> IO ()) -> IO ())
-> (Ptr DBusSignalInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr DBusSignalInfo
ptr -> do
Ptr (Ptr (Ptr DBusAnnotationInfo))
-> Ptr (Ptr DBusAnnotationInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusSignalInfo
ptr Ptr DBusSignalInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (Ptr (Ptr DBusAnnotationInfo)
forall a. Ptr a
FP.nullPtr :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
#if defined(ENABLE_OVERLOADING)
data DBusSignalInfoAnnotationsFieldInfo
instance AttrInfo DBusSignalInfoAnnotationsFieldInfo where
type AttrBaseTypeConstraint DBusSignalInfoAnnotationsFieldInfo = (~) DBusSignalInfo
type AttrAllowedOps DBusSignalInfoAnnotationsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusSignalInfoAnnotationsFieldInfo = (~) (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferTypeConstraint DBusSignalInfoAnnotationsFieldInfo = (~)(Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferType DBusSignalInfoAnnotationsFieldInfo = (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrGetType DBusSignalInfoAnnotationsFieldInfo = Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo]
type AttrLabel DBusSignalInfoAnnotationsFieldInfo = "annotations"
type AttrOrigin DBusSignalInfoAnnotationsFieldInfo = DBusSignalInfo
attrGet = getDBusSignalInfoAnnotations
attrSet = setDBusSignalInfoAnnotations
attrConstruct = undefined
attrClear = clearDBusSignalInfoAnnotations
attrTransfer _ v = do
return v
dBusSignalInfo_annotations :: AttrLabelProxy "annotations"
dBusSignalInfo_annotations = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusSignalInfo
type instance O.AttributeList DBusSignalInfo = DBusSignalInfoAttributeList
type DBusSignalInfoAttributeList = ('[ '("refCount", DBusSignalInfoRefCountFieldInfo), '("name", DBusSignalInfoNameFieldInfo), '("args", DBusSignalInfoArgsFieldInfo), '("annotations", DBusSignalInfoAnnotationsFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_signal_info_ref" g_dbus_signal_info_ref ::
Ptr DBusSignalInfo ->
IO (Ptr DBusSignalInfo)
dBusSignalInfoRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusSignalInfo
-> m DBusSignalInfo
dBusSignalInfoRef :: DBusSignalInfo -> m DBusSignalInfo
dBusSignalInfoRef info :: DBusSignalInfo
info = IO DBusSignalInfo -> m DBusSignalInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusSignalInfo -> m DBusSignalInfo)
-> IO DBusSignalInfo -> m DBusSignalInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusSignalInfo
info' <- DBusSignalInfo -> IO (Ptr DBusSignalInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusSignalInfo
info
Ptr DBusSignalInfo
result <- Ptr DBusSignalInfo -> IO (Ptr DBusSignalInfo)
g_dbus_signal_info_ref Ptr DBusSignalInfo
info'
Text -> Ptr DBusSignalInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusSignalInfoRef" Ptr DBusSignalInfo
result
DBusSignalInfo
result' <- ((ManagedPtr DBusSignalInfo -> DBusSignalInfo)
-> Ptr DBusSignalInfo -> IO DBusSignalInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DBusSignalInfo -> DBusSignalInfo
DBusSignalInfo) Ptr DBusSignalInfo
result
DBusSignalInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DBusSignalInfo
info
DBusSignalInfo -> IO DBusSignalInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DBusSignalInfo
result'
#if defined(ENABLE_OVERLOADING)
data DBusSignalInfoRefMethodInfo
instance (signature ~ (m DBusSignalInfo), MonadIO m) => O.MethodInfo DBusSignalInfoRefMethodInfo DBusSignalInfo signature where
overloadedMethod = dBusSignalInfoRef
#endif
foreign import ccall "g_dbus_signal_info_unref" g_dbus_signal_info_unref ::
Ptr DBusSignalInfo ->
IO ()
dBusSignalInfoUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusSignalInfo
-> m ()
dBusSignalInfoUnref :: DBusSignalInfo -> m ()
dBusSignalInfoUnref info :: DBusSignalInfo
info = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusSignalInfo
info' <- DBusSignalInfo -> IO (Ptr DBusSignalInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusSignalInfo
info
Ptr DBusSignalInfo -> IO ()
g_dbus_signal_info_unref Ptr DBusSignalInfo
info'
DBusSignalInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DBusSignalInfo
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusSignalInfoUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo DBusSignalInfoUnrefMethodInfo DBusSignalInfo signature where
overloadedMethod = dBusSignalInfoUnref
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusSignalInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusSignalInfoMethod "ref" o = DBusSignalInfoRefMethodInfo
ResolveDBusSignalInfoMethod "unref" o = DBusSignalInfoUnrefMethodInfo
ResolveDBusSignalInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusSignalInfoMethod t DBusSignalInfo, O.MethodInfo info DBusSignalInfo p) => OL.IsLabel t (DBusSignalInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif