{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Structs.DBusPropertyInfo
(
DBusPropertyInfo(..) ,
newZeroDBusPropertyInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusPropertyInfoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusPropertyInfoRefMethodInfo ,
#endif
dBusPropertyInfoRef ,
#if defined(ENABLE_OVERLOADING)
DBusPropertyInfoUnrefMethodInfo ,
#endif
dBusPropertyInfoUnref ,
clearDBusPropertyInfoAnnotations ,
#if defined(ENABLE_OVERLOADING)
dBusPropertyInfo_annotations ,
#endif
getDBusPropertyInfoAnnotations ,
setDBusPropertyInfoAnnotations ,
#if defined(ENABLE_OVERLOADING)
dBusPropertyInfo_flags ,
#endif
getDBusPropertyInfoFlags ,
setDBusPropertyInfoFlags ,
clearDBusPropertyInfoName ,
#if defined(ENABLE_OVERLOADING)
dBusPropertyInfo_name ,
#endif
getDBusPropertyInfoName ,
setDBusPropertyInfoName ,
#if defined(ENABLE_OVERLOADING)
dBusPropertyInfo_refCount ,
#endif
getDBusPropertyInfoRefCount ,
setDBusPropertyInfoRefCount ,
clearDBusPropertyInfoSignature ,
#if defined(ENABLE_OVERLOADING)
dBusPropertyInfo_signature ,
#endif
getDBusPropertyInfoSignature ,
setDBusPropertyInfoSignature ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
#else
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
#endif
newtype DBusPropertyInfo = DBusPropertyInfo (SP.ManagedPtr DBusPropertyInfo)
deriving (DBusPropertyInfo -> DBusPropertyInfo -> Bool
(DBusPropertyInfo -> DBusPropertyInfo -> Bool)
-> (DBusPropertyInfo -> DBusPropertyInfo -> Bool)
-> Eq DBusPropertyInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBusPropertyInfo -> DBusPropertyInfo -> Bool
== :: DBusPropertyInfo -> DBusPropertyInfo -> Bool
$c/= :: DBusPropertyInfo -> DBusPropertyInfo -> Bool
/= :: DBusPropertyInfo -> DBusPropertyInfo -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusPropertyInfo where
toManagedPtr :: DBusPropertyInfo -> ManagedPtr DBusPropertyInfo
toManagedPtr (DBusPropertyInfo ManagedPtr DBusPropertyInfo
p) = ManagedPtr DBusPropertyInfo
p
foreign import ccall "g_dbus_property_info_get_type" c_g_dbus_property_info_get_type ::
IO GType
type instance O.ParentTypes DBusPropertyInfo = '[]
instance O.HasParentTypes DBusPropertyInfo
instance B.Types.TypedObject DBusPropertyInfo where
glibType :: IO GType
glibType = IO GType
c_g_dbus_property_info_get_type
instance B.Types.GBoxed DBusPropertyInfo
instance B.GValue.IsGValue (Maybe DBusPropertyInfo) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_property_info_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusPropertyInfo -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusPropertyInfo
P.Nothing = Ptr GValue -> Ptr DBusPropertyInfo -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr DBusPropertyInfo
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusPropertyInfo)
gvalueSet_ Ptr GValue
gv (P.Just DBusPropertyInfo
obj) = DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusPropertyInfo
obj (Ptr GValue -> Ptr DBusPropertyInfo -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusPropertyInfo)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DBusPropertyInfo)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr DBusPropertyInfo)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newBoxed DBusPropertyInfo ptr
else return P.Nothing
newZeroDBusPropertyInfo :: MonadIO m => m DBusPropertyInfo
newZeroDBusPropertyInfo :: forall (m :: * -> *). MonadIO m => m DBusPropertyInfo
newZeroDBusPropertyInfo = IO DBusPropertyInfo -> m DBusPropertyInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusPropertyInfo -> m DBusPropertyInfo)
-> IO DBusPropertyInfo -> m DBusPropertyInfo
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr DBusPropertyInfo)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
40 IO (Ptr DBusPropertyInfo)
-> (Ptr DBusPropertyInfo -> IO DBusPropertyInfo)
-> IO DBusPropertyInfo
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr DBusPropertyInfo -> DBusPropertyInfo)
-> Ptr DBusPropertyInfo -> IO DBusPropertyInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DBusPropertyInfo -> DBusPropertyInfo
DBusPropertyInfo
instance tag ~ 'AttrSet => Constructible DBusPropertyInfo tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr DBusPropertyInfo -> DBusPropertyInfo)
-> [AttrOp DBusPropertyInfo tag] -> m DBusPropertyInfo
new ManagedPtr DBusPropertyInfo -> DBusPropertyInfo
_ [AttrOp DBusPropertyInfo tag]
attrs = do
o <- m DBusPropertyInfo
forall (m :: * -> *). MonadIO m => m DBusPropertyInfo
newZeroDBusPropertyInfo
GI.Attributes.set o attrs
return o
getDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> m Int32
getDBusPropertyInfoRefCount :: forall (m :: * -> *). MonadIO m => DBusPropertyInfo -> m Int32
getDBusPropertyInfoRefCount DBusPropertyInfo
s = IO Int32 -> m Int32
forall a. IO a -> m a
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
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO Int32) -> IO Int32)
-> (Ptr DBusPropertyInfo -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int32
return val
setDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> Int32 -> m ()
setDBusPropertyInfoRefCount :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> Int32 -> m ()
setDBusPropertyInfoRefCount DBusPropertyInfo
s Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoRefCountFieldInfo
instance AttrInfo DBusPropertyInfoRefCountFieldInfo where
type AttrBaseTypeConstraint DBusPropertyInfoRefCountFieldInfo = (~) DBusPropertyInfo
type AttrAllowedOps DBusPropertyInfoRefCountFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DBusPropertyInfoRefCountFieldInfo = (~) Int32
type AttrTransferTypeConstraint DBusPropertyInfoRefCountFieldInfo = (~)Int32
type AttrTransferType DBusPropertyInfoRefCountFieldInfo = Int32
type AttrGetType DBusPropertyInfoRefCountFieldInfo = Int32
type AttrLabel DBusPropertyInfoRefCountFieldInfo = "ref_count"
type AttrOrigin DBusPropertyInfoRefCountFieldInfo = DBusPropertyInfo
attrGet = getDBusPropertyInfoRefCount
attrSet = setDBusPropertyInfoRefCount
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.refCount"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#g:attr:refCount"
})
dBusPropertyInfo_refCount :: AttrLabelProxy "refCount"
dBusPropertyInfo_refCount = AttrLabelProxy
#endif
getDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> m (Maybe T.Text)
getDBusPropertyInfoName :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> m (Maybe Text)
getDBusPropertyInfoName DBusPropertyInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ DBusPropertyInfo
-> (Ptr DBusPropertyInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr DBusPropertyInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO CString
result <- SP.convertIfNonNull val $ \CString
val' -> do
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
return val''
return result
setDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> CString -> m ()
setDBusPropertyInfoName :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> CString -> m ()
setDBusPropertyInfoName DBusPropertyInfo
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)
clearDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> m ()
clearDBusPropertyInfoName :: forall (m :: * -> *). MonadIO m => DBusPropertyInfo -> m ()
clearDBusPropertyInfoName DBusPropertyInfo
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoNameFieldInfo
instance AttrInfo DBusPropertyInfoNameFieldInfo where
type AttrBaseTypeConstraint DBusPropertyInfoNameFieldInfo = (~) DBusPropertyInfo
type AttrAllowedOps DBusPropertyInfoNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusPropertyInfoNameFieldInfo = (~) CString
type AttrTransferTypeConstraint DBusPropertyInfoNameFieldInfo = (~)CString
type AttrTransferType DBusPropertyInfoNameFieldInfo = CString
type AttrGetType DBusPropertyInfoNameFieldInfo = Maybe T.Text
type AttrLabel DBusPropertyInfoNameFieldInfo = "name"
type AttrOrigin DBusPropertyInfoNameFieldInfo = DBusPropertyInfo
attrGet = getDBusPropertyInfoName
attrSet = setDBusPropertyInfoName
attrConstruct = undefined
attrClear = clearDBusPropertyInfoName
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.name"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#g:attr:name"
})
dBusPropertyInfo_name :: AttrLabelProxy "name"
dBusPropertyInfo_name = AttrLabelProxy
#endif
getDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> m (Maybe T.Text)
getDBusPropertyInfoSignature :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> m (Maybe Text)
getDBusPropertyInfoSignature DBusPropertyInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ DBusPropertyInfo
-> (Ptr DBusPropertyInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr DBusPropertyInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO CString
result <- SP.convertIfNonNull val $ \CString
val' -> do
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
return val''
return result
setDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> CString -> m ()
setDBusPropertyInfoSignature :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> CString -> m ()
setDBusPropertyInfoSignature DBusPropertyInfo
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)
clearDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> m ()
clearDBusPropertyInfoSignature :: forall (m :: * -> *). MonadIO m => DBusPropertyInfo -> m ()
clearDBusPropertyInfoSignature DBusPropertyInfo
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoSignatureFieldInfo
instance AttrInfo DBusPropertyInfoSignatureFieldInfo where
type AttrBaseTypeConstraint DBusPropertyInfoSignatureFieldInfo = (~) DBusPropertyInfo
type AttrAllowedOps DBusPropertyInfoSignatureFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusPropertyInfoSignatureFieldInfo = (~) CString
type AttrTransferTypeConstraint DBusPropertyInfoSignatureFieldInfo = (~)CString
type AttrTransferType DBusPropertyInfoSignatureFieldInfo = CString
type AttrGetType DBusPropertyInfoSignatureFieldInfo = Maybe T.Text
type AttrLabel DBusPropertyInfoSignatureFieldInfo = "signature"
type AttrOrigin DBusPropertyInfoSignatureFieldInfo = DBusPropertyInfo
attrGet = getDBusPropertyInfoSignature
attrSet = setDBusPropertyInfoSignature
attrConstruct = undefined
attrClear = clearDBusPropertyInfoSignature
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.signature"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#g:attr:signature"
})
dBusPropertyInfo_signature :: AttrLabelProxy "signature"
dBusPropertyInfo_signature = AttrLabelProxy
#endif
getDBusPropertyInfoFlags :: MonadIO m => DBusPropertyInfo -> m [Gio.Flags.DBusPropertyInfoFlags]
getDBusPropertyInfoFlags :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> m [DBusPropertyInfoFlags]
getDBusPropertyInfoFlags DBusPropertyInfo
s = IO [DBusPropertyInfoFlags] -> m [DBusPropertyInfoFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DBusPropertyInfoFlags] -> m [DBusPropertyInfoFlags])
-> IO [DBusPropertyInfoFlags] -> m [DBusPropertyInfoFlags]
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo
-> (Ptr DBusPropertyInfo -> IO [DBusPropertyInfoFlags])
-> IO [DBusPropertyInfoFlags]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO [DBusPropertyInfoFlags])
-> IO [DBusPropertyInfoFlags])
-> (Ptr DBusPropertyInfo -> IO [DBusPropertyInfoFlags])
-> IO [DBusPropertyInfoFlags]
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO CUInt
let val' = CUInt -> [DBusPropertyInfoFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
return val'
setDBusPropertyInfoFlags :: MonadIO m => DBusPropertyInfo -> [Gio.Flags.DBusPropertyInfoFlags] -> m ()
setDBusPropertyInfoFlags :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> [DBusPropertyInfoFlags] -> m ()
setDBusPropertyInfoFlags DBusPropertyInfo
s [DBusPropertyInfoFlags]
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
let val' :: CUInt
val' = [DBusPropertyInfoFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusPropertyInfoFlags]
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoFlagsFieldInfo
instance AttrInfo DBusPropertyInfoFlagsFieldInfo where
type AttrBaseTypeConstraint DBusPropertyInfoFlagsFieldInfo = (~) DBusPropertyInfo
type AttrAllowedOps DBusPropertyInfoFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint DBusPropertyInfoFlagsFieldInfo = (~) [Gio.Flags.DBusPropertyInfoFlags]
type AttrTransferTypeConstraint DBusPropertyInfoFlagsFieldInfo = (~)[Gio.Flags.DBusPropertyInfoFlags]
type AttrTransferType DBusPropertyInfoFlagsFieldInfo = [Gio.Flags.DBusPropertyInfoFlags]
type AttrGetType DBusPropertyInfoFlagsFieldInfo = [Gio.Flags.DBusPropertyInfoFlags]
type AttrLabel DBusPropertyInfoFlagsFieldInfo = "flags"
type AttrOrigin DBusPropertyInfoFlagsFieldInfo = DBusPropertyInfo
attrGet = getDBusPropertyInfoFlags
attrSet = setDBusPropertyInfoFlags
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.flags"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#g:attr:flags"
})
dBusPropertyInfo_flags :: AttrLabelProxy "flags"
dBusPropertyInfo_flags = AttrLabelProxy
#endif
getDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> m (Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo])
getDBusPropertyInfoAnnotations :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> m (Maybe [DBusAnnotationInfo])
getDBusPropertyInfoAnnotations DBusPropertyInfo
s = IO (Maybe [DBusAnnotationInfo]) -> m (Maybe [DBusAnnotationInfo])
forall a. IO a -> m a
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
$ DBusPropertyInfo
-> (Ptr DBusPropertyInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo]))
-> (Ptr DBusPropertyInfo -> IO (Maybe [DBusAnnotationInfo]))
-> IO (Maybe [DBusAnnotationInfo])
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
val <- Ptr (Ptr (Ptr DBusAnnotationInfo))
-> IO (Ptr (Ptr DBusAnnotationInfo))
forall a. Storable a => Ptr a -> IO a
peek (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
result <- SP.convertIfNonNull val $ \Ptr (Ptr DBusAnnotationInfo)
val' -> do
val'' <- Ptr (Ptr DBusAnnotationInfo) -> IO [Ptr DBusAnnotationInfo]
forall a. Ptr (Ptr a) -> IO [Ptr a]
unpackZeroTerminatedPtrArray Ptr (Ptr DBusAnnotationInfo)
val'
val''' <- mapM (newBoxed Gio.DBusAnnotationInfo.DBusAnnotationInfo) val''
return val'''
return result
setDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo) -> m ()
setDBusPropertyInfoAnnotations :: forall (m :: * -> *).
MonadIO m =>
DBusPropertyInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()
setDBusPropertyInfoAnnotations DBusPropertyInfo
s Ptr (Ptr DBusAnnotationInfo)
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr (Ptr (Ptr DBusAnnotationInfo))
-> Ptr (Ptr DBusAnnotationInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr (Ptr DBusAnnotationInfo)
val :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
clearDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> m ()
clearDBusPropertyInfoAnnotations :: forall (m :: * -> *). MonadIO m => DBusPropertyInfo -> m ()
clearDBusPropertyInfoAnnotations DBusPropertyInfo
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ DBusPropertyInfo -> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DBusPropertyInfo
s ((Ptr DBusPropertyInfo -> IO ()) -> IO ())
-> (Ptr DBusPropertyInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DBusPropertyInfo
ptr -> do
Ptr (Ptr (Ptr DBusAnnotationInfo))
-> Ptr (Ptr DBusAnnotationInfo) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DBusPropertyInfo
ptr Ptr DBusPropertyInfo -> Int -> Ptr (Ptr (Ptr DBusAnnotationInfo))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr (Ptr DBusAnnotationInfo)
forall a. Ptr a
FP.nullPtr :: Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoAnnotationsFieldInfo
instance AttrInfo DBusPropertyInfoAnnotationsFieldInfo where
type AttrBaseTypeConstraint DBusPropertyInfoAnnotationsFieldInfo = (~) DBusPropertyInfo
type AttrAllowedOps DBusPropertyInfoAnnotationsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusPropertyInfoAnnotationsFieldInfo = (~) (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferTypeConstraint DBusPropertyInfoAnnotationsFieldInfo = (~)(Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrTransferType DBusPropertyInfoAnnotationsFieldInfo = (Ptr (Ptr Gio.DBusAnnotationInfo.DBusAnnotationInfo))
type AttrGetType DBusPropertyInfoAnnotationsFieldInfo = Maybe [Gio.DBusAnnotationInfo.DBusAnnotationInfo]
type AttrLabel DBusPropertyInfoAnnotationsFieldInfo = "annotations"
type AttrOrigin DBusPropertyInfoAnnotationsFieldInfo = DBusPropertyInfo
attrGet = getDBusPropertyInfoAnnotations
attrSet = setDBusPropertyInfoAnnotations
attrConstruct = undefined
attrClear = clearDBusPropertyInfoAnnotations
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.annotations"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#g:attr:annotations"
})
dBusPropertyInfo_annotations :: AttrLabelProxy "annotations"
dBusPropertyInfo_annotations = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusPropertyInfo
type instance O.AttributeList DBusPropertyInfo = DBusPropertyInfoAttributeList
type DBusPropertyInfoAttributeList = ('[ '("refCount", DBusPropertyInfoRefCountFieldInfo), '("name", DBusPropertyInfoNameFieldInfo), '("signature", DBusPropertyInfoSignatureFieldInfo), '("flags", DBusPropertyInfoFlagsFieldInfo), '("annotations", DBusPropertyInfoAnnotationsFieldInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_dbus_property_info_ref" g_dbus_property_info_ref ::
Ptr DBusPropertyInfo ->
IO (Ptr DBusPropertyInfo)
dBusPropertyInfoRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusPropertyInfo
-> m DBusPropertyInfo
dBusPropertyInfoRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DBusPropertyInfo -> m DBusPropertyInfo
dBusPropertyInfoRef DBusPropertyInfo
info = IO DBusPropertyInfo -> m DBusPropertyInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusPropertyInfo -> m DBusPropertyInfo)
-> IO DBusPropertyInfo -> m DBusPropertyInfo
forall a b. (a -> b) -> a -> b
$ do
info' <- DBusPropertyInfo -> IO (Ptr DBusPropertyInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusPropertyInfo
info
result <- g_dbus_property_info_ref info'
checkUnexpectedReturnNULL "dBusPropertyInfoRef" result
result' <- (wrapBoxed DBusPropertyInfo) result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoRefMethodInfo
instance (signature ~ (m DBusPropertyInfo), MonadIO m) => O.OverloadedMethod DBusPropertyInfoRefMethodInfo DBusPropertyInfo signature where
overloadedMethod = dBusPropertyInfoRef
instance O.OverloadedMethodInfo DBusPropertyInfoRefMethodInfo DBusPropertyInfo where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.dBusPropertyInfoRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#v:dBusPropertyInfoRef"
})
#endif
foreign import ccall "g_dbus_property_info_unref" g_dbus_property_info_unref ::
Ptr DBusPropertyInfo ->
IO ()
dBusPropertyInfoUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
DBusPropertyInfo
-> m ()
dBusPropertyInfoUnref :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DBusPropertyInfo -> m ()
dBusPropertyInfoUnref DBusPropertyInfo
info = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- DBusPropertyInfo -> IO (Ptr DBusPropertyInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusPropertyInfo
info
g_dbus_property_info_unref info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data DBusPropertyInfoUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod DBusPropertyInfoUnrefMethodInfo DBusPropertyInfo signature where
overloadedMethod = dBusPropertyInfoUnref
instance O.OverloadedMethodInfo DBusPropertyInfoUnrefMethodInfo DBusPropertyInfo where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Structs.DBusPropertyInfo.dBusPropertyInfoUnref",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusPropertyInfo.html#v:dBusPropertyInfoUnref"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusPropertyInfoMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusPropertyInfoMethod "ref" o = DBusPropertyInfoRefMethodInfo
ResolveDBusPropertyInfoMethod "unref" o = DBusPropertyInfoUnrefMethodInfo
ResolveDBusPropertyInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusPropertyInfoMethod t DBusPropertyInfo, O.OverloadedMethod info DBusPropertyInfo p) => OL.IsLabel t (DBusPropertyInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDBusPropertyInfoMethod t DBusPropertyInfo, O.OverloadedMethod info DBusPropertyInfo p, R.HasField t DBusPropertyInfo p) => R.HasField t DBusPropertyInfo p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusPropertyInfoMethod t DBusPropertyInfo, O.OverloadedMethodInfo info DBusPropertyInfo) => OL.IsLabel t (O.MethodProxy info DBusPropertyInfo) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif