{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Structs.VariantType
(
VariantType(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveVariantTypeMethod ,
#endif
variantTypeChecked_ ,
#if defined(ENABLE_OVERLOADING)
VariantTypeCopyMethodInfo ,
#endif
variantTypeCopy ,
#if defined(ENABLE_OVERLOADING)
VariantTypeDupStringMethodInfo ,
#endif
variantTypeDupString ,
#if defined(ENABLE_OVERLOADING)
VariantTypeElementMethodInfo ,
#endif
variantTypeElement ,
#if defined(ENABLE_OVERLOADING)
VariantTypeEqualMethodInfo ,
#endif
variantTypeEqual ,
#if defined(ENABLE_OVERLOADING)
VariantTypeFirstMethodInfo ,
#endif
variantTypeFirst ,
#if defined(ENABLE_OVERLOADING)
VariantTypeFreeMethodInfo ,
#endif
variantTypeFree ,
#if defined(ENABLE_OVERLOADING)
VariantTypeGetStringLengthMethodInfo ,
#endif
variantTypeGetStringLength ,
#if defined(ENABLE_OVERLOADING)
VariantTypeHashMethodInfo ,
#endif
variantTypeHash ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsArrayMethodInfo ,
#endif
variantTypeIsArray ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsBasicMethodInfo ,
#endif
variantTypeIsBasic ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsContainerMethodInfo ,
#endif
variantTypeIsContainer ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsDefiniteMethodInfo ,
#endif
variantTypeIsDefinite ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsDictEntryMethodInfo ,
#endif
variantTypeIsDictEntry ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsMaybeMethodInfo ,
#endif
variantTypeIsMaybe ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsSubtypeOfMethodInfo ,
#endif
variantTypeIsSubtypeOf ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsTupleMethodInfo ,
#endif
variantTypeIsTuple ,
#if defined(ENABLE_OVERLOADING)
VariantTypeIsVariantMethodInfo ,
#endif
variantTypeIsVariant ,
#if defined(ENABLE_OVERLOADING)
VariantTypeKeyMethodInfo ,
#endif
variantTypeKey ,
#if defined(ENABLE_OVERLOADING)
VariantTypeNItemsMethodInfo ,
#endif
variantTypeNItems ,
variantTypeNew ,
variantTypeNewArray ,
variantTypeNewDictEntry ,
variantTypeNewMaybe ,
variantTypeNewTuple ,
#if defined(ENABLE_OVERLOADING)
VariantTypeNextMethodInfo ,
#endif
variantTypeNext ,
variantTypeStringGetDepth_ ,
variantTypeStringIsValid ,
variantTypeStringScan ,
#if defined(ENABLE_OVERLOADING)
VariantTypeValueMethodInfo ,
#endif
variantTypeValue ,
) 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)
#else
#endif
newtype VariantType = VariantType (SP.ManagedPtr VariantType)
deriving (VariantType -> VariantType -> Bool
(VariantType -> VariantType -> Bool)
-> (VariantType -> VariantType -> Bool) -> Eq VariantType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VariantType -> VariantType -> Bool
== :: VariantType -> VariantType -> Bool
$c/= :: VariantType -> VariantType -> Bool
/= :: VariantType -> VariantType -> Bool
Eq)
instance SP.ManagedPtrNewtype VariantType where
toManagedPtr :: VariantType -> ManagedPtr VariantType
toManagedPtr (VariantType ManagedPtr VariantType
p) = ManagedPtr VariantType
p
foreign import ccall "g_variant_type_get_gtype" c_g_variant_type_get_gtype ::
IO GType
type instance O.ParentTypes VariantType = '[]
instance O.HasParentTypes VariantType
instance B.Types.TypedObject VariantType where
glibType :: IO GType
glibType = IO GType
c_g_variant_type_get_gtype
instance B.Types.GBoxed VariantType
instance B.GValue.IsGValue (Maybe VariantType) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_variant_type_get_gtype
gvalueSet_ :: Ptr GValue -> Maybe VariantType -> IO ()
gvalueSet_ Ptr GValue
gv Maybe VariantType
P.Nothing = Ptr GValue -> Ptr VariantType -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr VariantType
forall a. Ptr a
FP.nullPtr :: FP.Ptr VariantType)
gvalueSet_ Ptr GValue
gv (P.Just VariantType
obj) = VariantType -> (Ptr VariantType -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr VariantType
obj (Ptr GValue -> Ptr VariantType -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe VariantType)
gvalueGet_ Ptr GValue
gv = do
Ptr VariantType
ptr <- Ptr GValue -> IO (Ptr VariantType)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr VariantType)
if Ptr VariantType
ptr Ptr VariantType -> Ptr VariantType -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr VariantType
forall a. Ptr a
FP.nullPtr
then VariantType -> Maybe VariantType
forall a. a -> Maybe a
P.Just (VariantType -> Maybe VariantType)
-> IO VariantType -> IO (Maybe VariantType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr VariantType -> VariantType
VariantType Ptr VariantType
ptr
else Maybe VariantType -> IO (Maybe VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VariantType
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList VariantType
type instance O.AttributeList VariantType = VariantTypeAttributeList
type VariantTypeAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_variant_type_new" g_variant_type_new ::
CString ->
IO (Ptr VariantType)
variantTypeNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m VariantType
variantTypeNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m VariantType
variantTypeNew Text
typeString = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
CString
typeString' <- Text -> IO CString
textToCString Text
typeString
Ptr VariantType
result <- CString -> IO (Ptr VariantType)
g_variant_type_new CString
typeString'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeNew" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
typeString'
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_new_array" g_variant_type_new_array ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeNewArray ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeNewArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeNewArray VariantType
element = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
element' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
element
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_new_array Ptr VariantType
element'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeNewArray" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
element
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_new_dict_entry" g_variant_type_new_dict_entry ::
Ptr VariantType ->
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeNewDictEntry ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> VariantType
-> m VariantType
variantTypeNewDictEntry :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> VariantType -> m VariantType
variantTypeNewDictEntry VariantType
key VariantType
value = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
key' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
key
Ptr VariantType
value' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
value
Ptr VariantType
result <- Ptr VariantType -> Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_new_dict_entry Ptr VariantType
key' Ptr VariantType
value'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeNewDictEntry" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
key
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
value
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_new_maybe" g_variant_type_new_maybe ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeNewMaybe ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeNewMaybe :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeNewMaybe VariantType
element = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
element' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
element
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_new_maybe Ptr VariantType
element'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeNewMaybe" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
element
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_new_tuple" g_variant_type_new_tuple ::
Ptr (Ptr VariantType) ->
Int32 ->
IO (Ptr VariantType)
variantTypeNewTuple ::
(B.CallStack.HasCallStack, MonadIO m) =>
[VariantType]
-> m VariantType
variantTypeNewTuple :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[VariantType] -> m VariantType
variantTypeNewTuple [VariantType]
items = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
let length_ :: Int32
length_ = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [VariantType] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [VariantType]
items
[Ptr VariantType]
items' <- (VariantType -> IO (Ptr VariantType))
-> [VariantType] -> IO [Ptr VariantType]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [VariantType]
items
Ptr (Ptr VariantType)
items'' <- [Ptr VariantType] -> IO (Ptr (Ptr VariantType))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr VariantType]
items'
Ptr VariantType
result <- Ptr (Ptr VariantType) -> Int32 -> IO (Ptr VariantType)
g_variant_type_new_tuple Ptr (Ptr VariantType)
items'' Int32
length_
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeNewTuple" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
(VariantType -> IO ()) -> [VariantType] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [VariantType]
items
Ptr (Ptr VariantType) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr VariantType)
items''
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_copy" g_variant_type_copy ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeCopy VariantType
type_ = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_copy Ptr VariantType
type_'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeCopy" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeCopyMethodInfo
instance (signature ~ (m VariantType), MonadIO m) => O.OverloadedMethod VariantTypeCopyMethodInfo VariantType signature where
overloadedMethod = variantTypeCopy
instance O.OverloadedMethodInfo VariantTypeCopyMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeCopy"
})
#endif
foreign import ccall "g_variant_type_dup_string" g_variant_type_dup_string ::
Ptr VariantType ->
IO CString
variantTypeDupString ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m T.Text
variantTypeDupString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Text
variantTypeDupString VariantType
type_ = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CString
result <- Ptr VariantType -> IO CString
g_variant_type_dup_string Ptr VariantType
type_'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeDupString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeDupStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod VariantTypeDupStringMethodInfo VariantType signature where
overloadedMethod = variantTypeDupString
instance O.OverloadedMethodInfo VariantTypeDupStringMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeDupString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeDupString"
})
#endif
foreign import ccall "g_variant_type_element" g_variant_type_element ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeElement ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeElement :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeElement VariantType
type_ = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_element Ptr VariantType
type_'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeElement" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeElementMethodInfo
instance (signature ~ (m VariantType), MonadIO m) => O.OverloadedMethod VariantTypeElementMethodInfo VariantType signature where
overloadedMethod = variantTypeElement
instance O.OverloadedMethodInfo VariantTypeElementMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeElement",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeElement"
})
#endif
foreign import ccall "g_variant_type_equal" g_variant_type_equal ::
Ptr VariantType ->
Ptr VariantType ->
IO CInt
variantTypeEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> VariantType
-> m Bool
variantTypeEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> VariantType -> m Bool
variantTypeEqual VariantType
type1 VariantType
type2 = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type1' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type1
Ptr VariantType
type2' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type2
CInt
result <- Ptr VariantType -> Ptr VariantType -> IO CInt
g_variant_type_equal Ptr VariantType
type1' Ptr VariantType
type2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type1
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type2
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeEqualMethodInfo
instance (signature ~ (VariantType -> m Bool), MonadIO m) => O.OverloadedMethod VariantTypeEqualMethodInfo VariantType signature where
overloadedMethod = variantTypeEqual
instance O.OverloadedMethodInfo VariantTypeEqualMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeEqual"
})
#endif
foreign import ccall "g_variant_type_first" g_variant_type_first ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeFirst ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeFirst :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeFirst VariantType
type_ = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_first Ptr VariantType
type_'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeFirst" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeFirstMethodInfo
instance (signature ~ (m VariantType), MonadIO m) => O.OverloadedMethod VariantTypeFirstMethodInfo VariantType signature where
overloadedMethod = variantTypeFirst
instance O.OverloadedMethodInfo VariantTypeFirstMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeFirst",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeFirst"
})
#endif
foreign import ccall "g_variant_type_free" g_variant_type_free ::
Ptr VariantType ->
IO ()
variantTypeFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (VariantType)
-> m ()
variantTypeFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe VariantType -> m ()
variantTypeFree Maybe VariantType
type_ = 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
Ptr VariantType
maybeType_ <- case Maybe VariantType
type_ of
Maybe VariantType
Nothing -> Ptr VariantType -> IO (Ptr VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VariantType
forall a. Ptr a
nullPtr
Just VariantType
jType_ -> do
Ptr VariantType
jType_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
jType_
Ptr VariantType -> IO (Ptr VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VariantType
jType_'
Ptr VariantType -> IO ()
g_variant_type_free Ptr VariantType
maybeType_
Maybe VariantType -> (VariantType -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe VariantType
type_ VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VariantTypeFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod VariantTypeFreeMethodInfo VariantType signature where
overloadedMethod i = variantTypeFree (Just i)
instance O.OverloadedMethodInfo VariantTypeFreeMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeFree"
})
#endif
foreign import ccall "g_variant_type_get_string_length" g_variant_type_get_string_length ::
Ptr VariantType ->
IO FCT.CSize
variantTypeGetStringLength ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m FCT.CSize
variantTypeGetStringLength :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m CSize
variantTypeGetStringLength VariantType
type_ = IO CSize -> m CSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CSize -> m CSize) -> IO CSize -> m CSize
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CSize
result <- Ptr VariantType -> IO CSize
g_variant_type_get_string_length Ptr VariantType
type_'
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
CSize -> IO CSize
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CSize
result
#if defined(ENABLE_OVERLOADING)
data VariantTypeGetStringLengthMethodInfo
instance (signature ~ (m FCT.CSize), MonadIO m) => O.OverloadedMethod VariantTypeGetStringLengthMethodInfo VariantType signature where
overloadedMethod = variantTypeGetStringLength
instance O.OverloadedMethodInfo VariantTypeGetStringLengthMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeGetStringLength",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeGetStringLength"
})
#endif
foreign import ccall "g_variant_type_hash" g_variant_type_hash ::
Ptr VariantType ->
IO Word32
variantTypeHash ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Word32
variantTypeHash :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Word32
variantTypeHash VariantType
type_ = IO Word32 -> m Word32
forall a. IO a -> m a
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
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Word32
result <- Ptr VariantType -> IO Word32
g_variant_type_hash Ptr VariantType
type_'
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data VariantTypeHashMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod VariantTypeHashMethodInfo VariantType signature where
overloadedMethod = variantTypeHash
instance O.OverloadedMethodInfo VariantTypeHashMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeHash",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeHash"
})
#endif
foreign import ccall "g_variant_type_is_array" g_variant_type_is_array ::
Ptr VariantType ->
IO CInt
variantTypeIsArray ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsArray VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_array Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsArrayMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsArrayMethodInfo VariantType signature where
overloadedMethod = variantTypeIsArray
instance O.OverloadedMethodInfo VariantTypeIsArrayMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsArray",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsArray"
})
#endif
foreign import ccall "g_variant_type_is_basic" g_variant_type_is_basic ::
Ptr VariantType ->
IO CInt
variantTypeIsBasic ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsBasic :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsBasic VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_basic Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsBasicMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsBasicMethodInfo VariantType signature where
overloadedMethod = variantTypeIsBasic
instance O.OverloadedMethodInfo VariantTypeIsBasicMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsBasic",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsBasic"
})
#endif
foreign import ccall "g_variant_type_is_container" g_variant_type_is_container ::
Ptr VariantType ->
IO CInt
variantTypeIsContainer ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsContainer :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsContainer VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_container Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsContainerMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsContainerMethodInfo VariantType signature where
overloadedMethod = variantTypeIsContainer
instance O.OverloadedMethodInfo VariantTypeIsContainerMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsContainer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsContainer"
})
#endif
foreign import ccall "g_variant_type_is_definite" g_variant_type_is_definite ::
Ptr VariantType ->
IO CInt
variantTypeIsDefinite ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsDefinite :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsDefinite VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_definite Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsDefiniteMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsDefiniteMethodInfo VariantType signature where
overloadedMethod = variantTypeIsDefinite
instance O.OverloadedMethodInfo VariantTypeIsDefiniteMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsDefinite",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsDefinite"
})
#endif
foreign import ccall "g_variant_type_is_dict_entry" g_variant_type_is_dict_entry ::
Ptr VariantType ->
IO CInt
variantTypeIsDictEntry ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsDictEntry :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsDictEntry VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_dict_entry Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsDictEntryMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsDictEntryMethodInfo VariantType signature where
overloadedMethod = variantTypeIsDictEntry
instance O.OverloadedMethodInfo VariantTypeIsDictEntryMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsDictEntry",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsDictEntry"
})
#endif
foreign import ccall "g_variant_type_is_maybe" g_variant_type_is_maybe ::
Ptr VariantType ->
IO CInt
variantTypeIsMaybe ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsMaybe :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsMaybe VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_maybe Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsMaybeMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsMaybeMethodInfo VariantType signature where
overloadedMethod = variantTypeIsMaybe
instance O.OverloadedMethodInfo VariantTypeIsMaybeMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsMaybe",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsMaybe"
})
#endif
foreign import ccall "g_variant_type_is_subtype_of" g_variant_type_is_subtype_of ::
Ptr VariantType ->
Ptr VariantType ->
IO CInt
variantTypeIsSubtypeOf ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> VariantType
-> m Bool
variantTypeIsSubtypeOf :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> VariantType -> m Bool
variantTypeIsSubtypeOf VariantType
type_ VariantType
supertype = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
supertype' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
supertype
CInt
result <- Ptr VariantType -> Ptr VariantType -> IO CInt
g_variant_type_is_subtype_of Ptr VariantType
type_' Ptr VariantType
supertype'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
supertype
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsSubtypeOfMethodInfo
instance (signature ~ (VariantType -> m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsSubtypeOfMethodInfo VariantType signature where
overloadedMethod = variantTypeIsSubtypeOf
instance O.OverloadedMethodInfo VariantTypeIsSubtypeOfMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsSubtypeOf",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsSubtypeOf"
})
#endif
foreign import ccall "g_variant_type_is_tuple" g_variant_type_is_tuple ::
Ptr VariantType ->
IO CInt
variantTypeIsTuple ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsTuple :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsTuple VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_tuple Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsTupleMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsTupleMethodInfo VariantType signature where
overloadedMethod = variantTypeIsTuple
instance O.OverloadedMethodInfo VariantTypeIsTupleMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsTuple",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsTuple"
})
#endif
foreign import ccall "g_variant_type_is_variant" g_variant_type_is_variant ::
Ptr VariantType ->
IO CInt
variantTypeIsVariant ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m Bool
variantTypeIsVariant :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m Bool
variantTypeIsVariant VariantType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CInt
result <- Ptr VariantType -> IO CInt
g_variant_type_is_variant Ptr VariantType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeIsVariantMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod VariantTypeIsVariantMethodInfo VariantType signature where
overloadedMethod = variantTypeIsVariant
instance O.OverloadedMethodInfo VariantTypeIsVariantMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeIsVariant",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeIsVariant"
})
#endif
foreign import ccall "g_variant_type_key" g_variant_type_key ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeKey ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeKey :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeKey VariantType
type_ = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_key Ptr VariantType
type_'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeKey" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeKeyMethodInfo
instance (signature ~ (m VariantType), MonadIO m) => O.OverloadedMethod VariantTypeKeyMethodInfo VariantType signature where
overloadedMethod = variantTypeKey
instance O.OverloadedMethodInfo VariantTypeKeyMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeKey"
})
#endif
foreign import ccall "g_variant_type_n_items" g_variant_type_n_items ::
Ptr VariantType ->
IO FCT.CSize
variantTypeNItems ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m FCT.CSize
variantTypeNItems :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m CSize
variantTypeNItems VariantType
type_ = IO CSize -> m CSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CSize -> m CSize) -> IO CSize -> m CSize
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
CSize
result <- Ptr VariantType -> IO CSize
g_variant_type_n_items Ptr VariantType
type_'
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
CSize -> IO CSize
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CSize
result
#if defined(ENABLE_OVERLOADING)
data VariantTypeNItemsMethodInfo
instance (signature ~ (m FCT.CSize), MonadIO m) => O.OverloadedMethod VariantTypeNItemsMethodInfo VariantType signature where
overloadedMethod = variantTypeNItems
instance O.OverloadedMethodInfo VariantTypeNItemsMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeNItems",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeNItems"
})
#endif
foreign import ccall "g_variant_type_next" g_variant_type_next ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeNext ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeNext :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeNext VariantType
type_ = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_next Ptr VariantType
type_'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeNext" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeNextMethodInfo
instance (signature ~ (m VariantType), MonadIO m) => O.OverloadedMethod VariantTypeNextMethodInfo VariantType signature where
overloadedMethod = variantTypeNext
instance O.OverloadedMethodInfo VariantTypeNextMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeNext",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeNext"
})
#endif
foreign import ccall "g_variant_type_value" g_variant_type_value ::
Ptr VariantType ->
IO (Ptr VariantType)
variantTypeValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
VariantType
-> m VariantType
variantTypeValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VariantType -> m VariantType
variantTypeValue VariantType
type_ = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
Ptr VariantType
type_' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
type_
Ptr VariantType
result <- Ptr VariantType -> IO (Ptr VariantType)
g_variant_type_value Ptr VariantType
type_'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeValue" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
type_
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
data VariantTypeValueMethodInfo
instance (signature ~ (m VariantType), MonadIO m) => O.OverloadedMethod VariantTypeValueMethodInfo VariantType signature where
overloadedMethod = variantTypeValue
instance O.OverloadedMethodInfo VariantTypeValueMethodInfo VariantType where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.VariantType.variantTypeValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-VariantType.html#v:variantTypeValue"
})
#endif
foreign import ccall "g_variant_type_checked_" g_variant_type_checked_ ::
CString ->
IO (Ptr VariantType)
variantTypeChecked_ ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m VariantType
variantTypeChecked_ :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m VariantType
variantTypeChecked_ Text
typeString = IO VariantType -> m VariantType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VariantType -> m VariantType)
-> IO VariantType -> m VariantType
forall a b. (a -> b) -> a -> b
$ do
CString
typeString' <- Text -> IO CString
textToCString Text
typeString
Ptr VariantType
result <- CString -> IO (Ptr VariantType)
g_variant_type_checked_ CString
typeString'
Text -> Ptr VariantType -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"variantTypeChecked_" Ptr VariantType
result
VariantType
result' <- ((ManagedPtr VariantType -> VariantType)
-> Ptr VariantType -> IO VariantType
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VariantType -> VariantType
VariantType) Ptr VariantType
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
typeString'
VariantType -> IO VariantType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VariantType
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_string_get_depth_" g_variant_type_string_get_depth_ ::
CString ->
IO FCT.CSize
variantTypeStringGetDepth_ ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m FCT.CSize
variantTypeStringGetDepth_ :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m CSize
variantTypeStringGetDepth_ Text
typeString = IO CSize -> m CSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CSize -> m CSize) -> IO CSize -> m CSize
forall a b. (a -> b) -> a -> b
$ do
CString
typeString' <- Text -> IO CString
textToCString Text
typeString
CSize
result <- CString -> IO CSize
g_variant_type_string_get_depth_ CString
typeString'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
typeString'
CSize -> IO CSize
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CSize
result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_string_is_valid" g_variant_type_string_is_valid ::
CString ->
IO CInt
variantTypeStringIsValid ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Bool
variantTypeStringIsValid :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Bool
variantTypeStringIsValid Text
typeString = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CString
typeString' <- Text -> IO CString
textToCString Text
typeString
CInt
result <- CString -> IO CInt
g_variant_type_string_is_valid CString
typeString'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
typeString'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_variant_type_string_scan" g_variant_type_string_scan ::
CString ->
CString ->
Ptr CString ->
IO CInt
variantTypeStringScan ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> Maybe (T.Text)
-> m ((Bool, T.Text))
variantTypeStringScan :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Maybe Text -> m (Bool, Text)
variantTypeStringScan Text
string Maybe Text
limit = IO (Bool, Text) -> m (Bool, Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Text) -> m (Bool, Text))
-> IO (Bool, Text) -> m (Bool, Text)
forall a b. (a -> b) -> a -> b
$ do
CString
string' <- Text -> IO CString
textToCString Text
string
CString
maybeLimit <- case Maybe Text
limit of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jLimit -> do
CString
jLimit' <- Text -> IO CString
textToCString Text
jLimit
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLimit'
Ptr CString
endptr <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
CInt
result <- CString -> CString -> Ptr CString -> IO CInt
g_variant_type_string_scan CString
string' CString
maybeLimit Ptr CString
endptr
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CString
endptr' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
endptr
Text
endptr'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
endptr'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
endptr'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLimit
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
endptr
(Bool, Text) -> IO (Bool, Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Text
endptr'')
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveVariantTypeMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveVariantTypeMethod "copy" o = VariantTypeCopyMethodInfo
ResolveVariantTypeMethod "dupString" o = VariantTypeDupStringMethodInfo
ResolveVariantTypeMethod "element" o = VariantTypeElementMethodInfo
ResolveVariantTypeMethod "equal" o = VariantTypeEqualMethodInfo
ResolveVariantTypeMethod "first" o = VariantTypeFirstMethodInfo
ResolveVariantTypeMethod "free" o = VariantTypeFreeMethodInfo
ResolveVariantTypeMethod "hash" o = VariantTypeHashMethodInfo
ResolveVariantTypeMethod "isArray" o = VariantTypeIsArrayMethodInfo
ResolveVariantTypeMethod "isBasic" o = VariantTypeIsBasicMethodInfo
ResolveVariantTypeMethod "isContainer" o = VariantTypeIsContainerMethodInfo
ResolveVariantTypeMethod "isDefinite" o = VariantTypeIsDefiniteMethodInfo
ResolveVariantTypeMethod "isDictEntry" o = VariantTypeIsDictEntryMethodInfo
ResolveVariantTypeMethod "isMaybe" o = VariantTypeIsMaybeMethodInfo
ResolveVariantTypeMethod "isSubtypeOf" o = VariantTypeIsSubtypeOfMethodInfo
ResolveVariantTypeMethod "isTuple" o = VariantTypeIsTupleMethodInfo
ResolveVariantTypeMethod "isVariant" o = VariantTypeIsVariantMethodInfo
ResolveVariantTypeMethod "key" o = VariantTypeKeyMethodInfo
ResolveVariantTypeMethod "nItems" o = VariantTypeNItemsMethodInfo
ResolveVariantTypeMethod "next" o = VariantTypeNextMethodInfo
ResolveVariantTypeMethod "value" o = VariantTypeValueMethodInfo
ResolveVariantTypeMethod "getStringLength" o = VariantTypeGetStringLengthMethodInfo
ResolveVariantTypeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVariantTypeMethod t VariantType, O.OverloadedMethod info VariantType p) => OL.IsLabel t (VariantType -> 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 ~ ResolveVariantTypeMethod t VariantType, O.OverloadedMethod info VariantType p, R.HasField t VariantType p) => R.HasField t VariantType p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveVariantTypeMethod t VariantType, O.OverloadedMethodInfo info VariantType) => OL.IsLabel t (O.MethodProxy info VariantType) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif