{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Structs.KeyFile
(
KeyFile(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveKeyFileMethod ,
#endif
keyFileErrorQuark ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetBooleanMethodInfo ,
#endif
keyFileGetBoolean ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetBooleanListMethodInfo ,
#endif
keyFileGetBooleanList ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetCommentMethodInfo ,
#endif
keyFileGetComment ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetDoubleMethodInfo ,
#endif
keyFileGetDouble ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetDoubleListMethodInfo ,
#endif
keyFileGetDoubleList ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetGroupsMethodInfo ,
#endif
keyFileGetGroups ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetInt64MethodInfo ,
#endif
keyFileGetInt64 ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetIntegerMethodInfo ,
#endif
keyFileGetInteger ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetIntegerListMethodInfo ,
#endif
keyFileGetIntegerList ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetKeysMethodInfo ,
#endif
keyFileGetKeys ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetLocaleForKeyMethodInfo ,
#endif
keyFileGetLocaleForKey ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetLocaleStringMethodInfo ,
#endif
keyFileGetLocaleString ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetLocaleStringListMethodInfo ,
#endif
keyFileGetLocaleStringList ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetStartGroupMethodInfo ,
#endif
keyFileGetStartGroup ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetStringMethodInfo ,
#endif
keyFileGetString ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetStringListMethodInfo ,
#endif
keyFileGetStringList ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetUint64MethodInfo ,
#endif
keyFileGetUint64 ,
#if defined(ENABLE_OVERLOADING)
KeyFileGetValueMethodInfo ,
#endif
keyFileGetValue ,
#if defined(ENABLE_OVERLOADING)
KeyFileHasGroupMethodInfo ,
#endif
keyFileHasGroup ,
#if defined(ENABLE_OVERLOADING)
KeyFileLoadFromBytesMethodInfo ,
#endif
keyFileLoadFromBytes ,
#if defined(ENABLE_OVERLOADING)
KeyFileLoadFromDataMethodInfo ,
#endif
keyFileLoadFromData ,
#if defined(ENABLE_OVERLOADING)
KeyFileLoadFromDataDirsMethodInfo ,
#endif
keyFileLoadFromDataDirs ,
#if defined(ENABLE_OVERLOADING)
KeyFileLoadFromDirsMethodInfo ,
#endif
keyFileLoadFromDirs ,
#if defined(ENABLE_OVERLOADING)
KeyFileLoadFromFileMethodInfo ,
#endif
keyFileLoadFromFile ,
keyFileNew ,
#if defined(ENABLE_OVERLOADING)
KeyFileRemoveCommentMethodInfo ,
#endif
keyFileRemoveComment ,
#if defined(ENABLE_OVERLOADING)
KeyFileRemoveGroupMethodInfo ,
#endif
keyFileRemoveGroup ,
#if defined(ENABLE_OVERLOADING)
KeyFileRemoveKeyMethodInfo ,
#endif
keyFileRemoveKey ,
#if defined(ENABLE_OVERLOADING)
KeyFileSaveToFileMethodInfo ,
#endif
keyFileSaveToFile ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetBooleanMethodInfo ,
#endif
keyFileSetBoolean ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetBooleanListMethodInfo ,
#endif
keyFileSetBooleanList ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetCommentMethodInfo ,
#endif
keyFileSetComment ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetDoubleMethodInfo ,
#endif
keyFileSetDouble ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetDoubleListMethodInfo ,
#endif
keyFileSetDoubleList ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetInt64MethodInfo ,
#endif
keyFileSetInt64 ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetIntegerMethodInfo ,
#endif
keyFileSetInteger ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetIntegerListMethodInfo ,
#endif
keyFileSetIntegerList ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetListSeparatorMethodInfo ,
#endif
keyFileSetListSeparator ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetLocaleStringMethodInfo ,
#endif
keyFileSetLocaleString ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetLocaleStringListMethodInfo ,
#endif
keyFileSetLocaleStringList ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetStringMethodInfo ,
#endif
keyFileSetString ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetStringListMethodInfo ,
#endif
keyFileSetStringList ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetUint64MethodInfo ,
#endif
keyFileSetUint64 ,
#if defined(ENABLE_OVERLOADING)
KeyFileSetValueMethodInfo ,
#endif
keyFileSetValue ,
#if defined(ENABLE_OVERLOADING)
KeyFileToDataMethodInfo ,
#endif
keyFileToData ,
#if defined(ENABLE_OVERLOADING)
KeyFileUnrefMethodInfo ,
#endif
keyFileUnref ,
) 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.GLib.Flags as GLib.Flags
import {-# SOURCE #-} qualified GI.GLib.Structs.Bytes as GLib.Bytes
#else
import {-# SOURCE #-} qualified GI.GLib.Flags as GLib.Flags
import {-# SOURCE #-} qualified GI.GLib.Structs.Bytes as GLib.Bytes
#endif
newtype KeyFile = KeyFile (SP.ManagedPtr KeyFile)
deriving (KeyFile -> KeyFile -> Bool
(KeyFile -> KeyFile -> Bool)
-> (KeyFile -> KeyFile -> Bool) -> Eq KeyFile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyFile -> KeyFile -> Bool
== :: KeyFile -> KeyFile -> Bool
$c/= :: KeyFile -> KeyFile -> Bool
/= :: KeyFile -> KeyFile -> Bool
Eq)
instance SP.ManagedPtrNewtype KeyFile where
toManagedPtr :: KeyFile -> ManagedPtr KeyFile
toManagedPtr (KeyFile ManagedPtr KeyFile
p) = ManagedPtr KeyFile
p
foreign import ccall "g_key_file_get_type" c_g_key_file_get_type ::
IO GType
type instance O.ParentTypes KeyFile = '[]
instance O.HasParentTypes KeyFile
instance B.Types.TypedObject KeyFile where
glibType :: IO GType
glibType = IO GType
c_g_key_file_get_type
instance B.Types.GBoxed KeyFile
instance B.GValue.IsGValue (Maybe KeyFile) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_key_file_get_type
gvalueSet_ :: Ptr GValue -> Maybe KeyFile -> IO ()
gvalueSet_ Ptr GValue
gv Maybe KeyFile
P.Nothing = Ptr GValue -> Ptr KeyFile -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr KeyFile
forall a. Ptr a
FP.nullPtr :: FP.Ptr KeyFile)
gvalueSet_ Ptr GValue
gv (P.Just KeyFile
obj) = KeyFile -> (Ptr KeyFile -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr KeyFile
obj (Ptr GValue -> Ptr KeyFile -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe KeyFile)
gvalueGet_ Ptr GValue
gv = do
Ptr KeyFile
ptr <- Ptr GValue -> IO (Ptr KeyFile)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr KeyFile)
if Ptr KeyFile
ptr Ptr KeyFile -> Ptr KeyFile -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr KeyFile
forall a. Ptr a
FP.nullPtr
then KeyFile -> Maybe KeyFile
forall a. a -> Maybe a
P.Just (KeyFile -> Maybe KeyFile) -> IO KeyFile -> IO (Maybe KeyFile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr KeyFile -> KeyFile
KeyFile Ptr KeyFile
ptr
else Maybe KeyFile -> IO (Maybe KeyFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe KeyFile
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList KeyFile
type instance O.AttributeList KeyFile = KeyFileAttributeList
type KeyFileAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_key_file_new" g_key_file_new ::
IO (Ptr KeyFile)
keyFileNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m KeyFile
keyFileNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m KeyFile
keyFileNew = IO KeyFile -> m KeyFile
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyFile -> m KeyFile) -> IO KeyFile -> m KeyFile
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
result <- IO (Ptr KeyFile)
g_key_file_new
Text -> Ptr KeyFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileNew" Ptr KeyFile
result
KeyFile
result' <- ((ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr KeyFile -> KeyFile
KeyFile) Ptr KeyFile
result
KeyFile -> IO KeyFile
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return KeyFile
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_key_file_get_boolean" g_key_file_get_boolean ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
keyFileGetBoolean ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m ()
keyFileGetBoolean :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m ()
keyFileGetBoolean KeyFile
keyFile Text
groupName Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_key_file_get_boolean Ptr KeyFile
keyFile' CString
groupName' CString
key'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetBooleanMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileGetBooleanMethodInfo KeyFile signature where
overloadedMethod = keyFileGetBoolean
instance O.OverloadedMethodInfo KeyFileGetBooleanMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetBoolean",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetBoolean"
})
#endif
foreign import ccall "g_key_file_get_boolean_list" g_key_file_get_boolean_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO (Ptr CInt)
keyFileGetBooleanList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m [Bool]
keyFileGetBooleanList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m [Bool]
keyFileGetBooleanList KeyFile
keyFile Text
groupName Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO [Bool] -> IO () -> IO [Bool]
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CInt
result <- (Ptr (Ptr GError) -> IO (Ptr CInt)) -> IO (Ptr CInt)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CInt)) -> IO (Ptr CInt))
-> (Ptr (Ptr GError) -> IO (Ptr CInt)) -> IO (Ptr CInt)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString
-> CString
-> Ptr CSize
-> Ptr (Ptr GError)
-> IO (Ptr CInt)
g_key_file_get_boolean_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CSize
length_
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
Text -> Ptr CInt -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetBooleanList" Ptr CInt
result
[Bool]
result' <- ((CInt -> Bool) -> CSize -> Ptr CInt -> IO [Bool]
forall a b c.
(Integral a, Storable b) =>
(b -> c) -> a -> Ptr b -> IO [c]
unpackMapStorableArrayWithLength (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CSize
length_') Ptr CInt
result
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
[Bool] -> IO [Bool]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Bool]
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetBooleanListMethodInfo
instance (signature ~ (T.Text -> T.Text -> m [Bool]), MonadIO m) => O.OverloadedMethod KeyFileGetBooleanListMethodInfo KeyFile signature where
overloadedMethod = keyFileGetBooleanList
instance O.OverloadedMethodInfo KeyFileGetBooleanListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetBooleanList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetBooleanList"
})
#endif
foreign import ccall "g_key_file_get_comment" ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CString
keyFileGetComment ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m T.Text
KeyFile
keyFile Maybe Text
groupName Maybe Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
maybeGroupName <- case Maybe Text
groupName 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
jGroupName -> do
CString
jGroupName' <- Text -> IO CString
textToCString Text
jGroupName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jGroupName'
CString
maybeKey <- case Maybe Text
key 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
jKey -> do
CString
jKey' <- Text -> IO CString
textToCString Text
jKey
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jKey'
IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CString
g_key_file_get_comment Ptr KeyFile
keyFile' CString
maybeGroupName CString
maybeKey
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetComment" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeKey
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeKey
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetCommentMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> m T.Text), MonadIO m) => O.OverloadedMethod KeyFileGetCommentMethodInfo KeyFile signature where
overloadedMethod = keyFileGetComment
instance O.OverloadedMethodInfo KeyFileGetCommentMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetComment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetComment"
})
#endif
foreign import ccall "g_key_file_get_double" g_key_file_get_double ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CDouble
keyFileGetDouble ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m Double
keyFileGetDouble :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m Double
keyFileGetDouble KeyFile
keyFile Text
groupName Text
key = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO Double -> IO () -> IO Double
forall a b. IO a -> IO b -> IO a
onException (do
CDouble
result <- (Ptr (Ptr GError) -> IO CDouble) -> IO CDouble
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CDouble) -> IO CDouble)
-> (Ptr (Ptr GError) -> IO CDouble) -> IO CDouble
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CDouble
g_key_file_get_double Ptr KeyFile
keyFile' CString
groupName' CString
key'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetDoubleMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Double), MonadIO m) => O.OverloadedMethod KeyFileGetDoubleMethodInfo KeyFile signature where
overloadedMethod = keyFileGetDouble
instance O.OverloadedMethodInfo KeyFileGetDoubleMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetDouble"
})
#endif
foreign import ccall "g_key_file_get_double_list" g_key_file_get_double_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO (Ptr CDouble)
keyFileGetDoubleList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m [Double]
keyFileGetDoubleList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m [Double]
keyFileGetDoubleList KeyFile
keyFile Text
groupName Text
key = IO [Double] -> m [Double]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Double] -> m [Double]) -> IO [Double] -> m [Double]
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO [Double] -> IO () -> IO [Double]
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CDouble
result <- (Ptr (Ptr GError) -> IO (Ptr CDouble)) -> IO (Ptr CDouble)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CDouble)) -> IO (Ptr CDouble))
-> (Ptr (Ptr GError) -> IO (Ptr CDouble)) -> IO (Ptr CDouble)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString
-> CString
-> Ptr CSize
-> Ptr (Ptr GError)
-> IO (Ptr CDouble)
g_key_file_get_double_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CSize
length_
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
Text -> Ptr CDouble -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetDoubleList" Ptr CDouble
result
[Double]
result' <- ((CDouble -> Double) -> CSize -> Ptr CDouble -> IO [Double]
forall a b c.
(Integral a, Storable b) =>
(b -> c) -> a -> Ptr b -> IO [c]
unpackMapStorableArrayWithLength CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CSize
length_') Ptr CDouble
result
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
[Double] -> IO [Double]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Double]
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetDoubleListMethodInfo
instance (signature ~ (T.Text -> T.Text -> m [Double]), MonadIO m) => O.OverloadedMethod KeyFileGetDoubleListMethodInfo KeyFile signature where
overloadedMethod = keyFileGetDoubleList
instance O.OverloadedMethodInfo KeyFileGetDoubleListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetDoubleList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetDoubleList"
})
#endif
foreign import ccall "g_key_file_get_groups" g_key_file_get_groups ::
Ptr KeyFile ->
Ptr FCT.CSize ->
IO (Ptr CString)
keyFileGetGroups ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> m (([T.Text], FCT.CSize))
keyFileGetGroups :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> m ([Text], CSize)
keyFileGetGroups KeyFile
keyFile = IO ([Text], CSize) -> m ([Text], CSize)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ([Text], CSize) -> m ([Text], CSize))
-> IO ([Text], CSize) -> m ([Text], CSize)
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
Ptr CString
result <- Ptr KeyFile -> Ptr CSize -> IO (Ptr CString)
g_key_file_get_groups Ptr KeyFile
keyFile' Ptr CSize
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetGroups" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
([Text], CSize) -> IO ([Text], CSize)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Text]
result', CSize
length_')
#if defined(ENABLE_OVERLOADING)
data KeyFileGetGroupsMethodInfo
instance (signature ~ (m (([T.Text], FCT.CSize))), MonadIO m) => O.OverloadedMethod KeyFileGetGroupsMethodInfo KeyFile signature where
overloadedMethod = keyFileGetGroups
instance O.OverloadedMethodInfo KeyFileGetGroupsMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetGroups",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetGroups"
})
#endif
foreign import ccall "g_key_file_get_int64" g_key_file_get_int64 ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO Int64
keyFileGetInt64 ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m Int64
keyFileGetInt64 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m Int64
keyFileGetInt64 KeyFile
keyFile Text
groupName Text
key = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO Int64 -> IO () -> IO Int64
forall a b. IO a -> IO b -> IO a
onException (do
Int64
result <- (Ptr (Ptr GError) -> IO Int64) -> IO Int64
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Int64) -> IO Int64)
-> (Ptr (Ptr GError) -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO Int64
g_key_file_get_int64 Ptr KeyFile
keyFile' CString
groupName' CString
key'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetInt64MethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int64), MonadIO m) => O.OverloadedMethod KeyFileGetInt64MethodInfo KeyFile signature where
overloadedMethod = keyFileGetInt64
instance O.OverloadedMethodInfo KeyFileGetInt64MethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetInt64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetInt64"
})
#endif
foreign import ccall "g_key_file_get_integer" g_key_file_get_integer ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO Int32
keyFileGetInteger ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m Int32
keyFileGetInteger :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m Int32
keyFileGetInteger KeyFile
keyFile Text
groupName Text
key = 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
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO Int32 -> IO () -> IO Int32
forall a b. IO a -> IO b -> IO a
onException (do
Int32
result <- (Ptr (Ptr GError) -> IO Int32) -> IO Int32
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Int32) -> IO Int32)
-> (Ptr (Ptr GError) -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO Int32
g_key_file_get_integer Ptr KeyFile
keyFile' CString
groupName' CString
key'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetIntegerMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m) => O.OverloadedMethod KeyFileGetIntegerMethodInfo KeyFile signature where
overloadedMethod = keyFileGetInteger
instance O.OverloadedMethodInfo KeyFileGetIntegerMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetInteger",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetInteger"
})
#endif
foreign import ccall "g_key_file_get_integer_list" g_key_file_get_integer_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO (Ptr Int32)
keyFileGetIntegerList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m [Int32]
keyFileGetIntegerList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m [Int32]
keyFileGetIntegerList KeyFile
keyFile Text
groupName Text
key = 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
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO [Int32] -> IO () -> IO [Int32]
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Int32
result <- (Ptr (Ptr GError) -> IO (Ptr Int32)) -> IO (Ptr Int32)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Int32)) -> IO (Ptr Int32))
-> (Ptr (Ptr GError) -> IO (Ptr Int32)) -> IO (Ptr Int32)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString
-> CString
-> Ptr CSize
-> Ptr (Ptr GError)
-> IO (Ptr Int32)
g_key_file_get_integer_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CSize
length_
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
Text -> Ptr Int32 -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetIntegerList" Ptr Int32
result
[Int32]
result' <- (CSize -> Ptr Int32 -> IO [Int32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength CSize
length_') Ptr Int32
result
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
[Int32] -> IO [Int32]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Int32]
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetIntegerListMethodInfo
instance (signature ~ (T.Text -> T.Text -> m [Int32]), MonadIO m) => O.OverloadedMethod KeyFileGetIntegerListMethodInfo KeyFile signature where
overloadedMethod = keyFileGetIntegerList
instance O.OverloadedMethodInfo KeyFileGetIntegerListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetIntegerList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetIntegerList"
})
#endif
foreign import ccall "g_key_file_get_keys" g_key_file_get_keys ::
Ptr KeyFile ->
CString ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO (Ptr CString)
keyFileGetKeys ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> m (([T.Text], FCT.CSize))
keyFileGetKeys :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> m ([Text], CSize)
keyFileGetKeys KeyFile
keyFile Text
groupName = IO ([Text], CSize) -> m ([Text], CSize)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ([Text], CSize) -> m ([Text], CSize))
-> IO ([Text], CSize) -> m ([Text], CSize)
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO ([Text], CSize) -> IO () -> IO ([Text], CSize)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString -> Ptr CSize -> Ptr (Ptr GError) -> IO (Ptr CString)
g_key_file_get_keys Ptr KeyFile
keyFile' CString
groupName' Ptr CSize
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetKeys" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
([Text], CSize) -> IO ([Text], CSize)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Text]
result', CSize
length_')
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetKeysMethodInfo
instance (signature ~ (T.Text -> m (([T.Text], FCT.CSize))), MonadIO m) => O.OverloadedMethod KeyFileGetKeysMethodInfo KeyFile signature where
overloadedMethod = keyFileGetKeys
instance O.OverloadedMethodInfo KeyFileGetKeysMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetKeys",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetKeys"
})
#endif
foreign import ccall "g_key_file_get_locale_for_key" g_key_file_get_locale_for_key ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
IO CString
keyFileGetLocaleForKey ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> m (Maybe T.Text)
keyFileGetLocaleForKey :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Maybe Text -> m (Maybe Text)
keyFileGetLocaleForKey KeyFile
keyFile Text
groupName Text
key Maybe Text
locale = 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
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
maybeLocale <- case Maybe Text
locale 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
jLocale -> do
CString
jLocale' <- Text -> IO CString
textToCString Text
jLocale
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLocale'
CString
result <- Ptr KeyFile -> CString -> CString -> CString -> IO CString
g_key_file_get_locale_for_key Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
maybeLocale
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLocale
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data KeyFileGetLocaleForKeyMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod KeyFileGetLocaleForKeyMethodInfo KeyFile signature where
overloadedMethod = keyFileGetLocaleForKey
instance O.OverloadedMethodInfo KeyFileGetLocaleForKeyMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetLocaleForKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetLocaleForKey"
})
#endif
foreign import ccall "g_key_file_get_locale_string" g_key_file_get_locale_string ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CString
keyFileGetLocaleString ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> m T.Text
keyFileGetLocaleString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Maybe Text -> m Text
keyFileGetLocaleString KeyFile
keyFile Text
groupName Text
key Maybe Text
locale = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
maybeLocale <- case Maybe Text
locale 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
jLocale -> do
CString
jLocale' <- Text -> IO CString
textToCString Text
jLocale
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLocale'
IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString -> CString -> CString -> Ptr (Ptr GError) -> IO CString
g_key_file_get_locale_string Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
maybeLocale
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetLocaleString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLocale
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLocale
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetLocaleStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m T.Text), MonadIO m) => O.OverloadedMethod KeyFileGetLocaleStringMethodInfo KeyFile signature where
overloadedMethod = keyFileGetLocaleString
instance O.OverloadedMethodInfo KeyFileGetLocaleStringMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetLocaleString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetLocaleString"
})
#endif
foreign import ccall "g_key_file_get_locale_string_list" g_key_file_get_locale_string_list ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO (Ptr CString)
keyFileGetLocaleStringList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> m (([T.Text], FCT.CSize))
keyFileGetLocaleStringList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Maybe Text -> m ([Text], CSize)
keyFileGetLocaleStringList KeyFile
keyFile Text
groupName Text
key Maybe Text
locale = IO ([Text], CSize) -> m ([Text], CSize)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ([Text], CSize) -> m ([Text], CSize))
-> IO ([Text], CSize) -> m ([Text], CSize)
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
maybeLocale <- case Maybe Text
locale 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
jLocale -> do
CString
jLocale' <- Text -> IO CString
textToCString Text
jLocale
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLocale'
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO ([Text], CSize) -> IO () -> IO ([Text], CSize)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString
-> CString
-> CString
-> Ptr CSize
-> Ptr (Ptr GError)
-> IO (Ptr CString)
g_key_file_get_locale_string_list Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
maybeLocale Ptr CSize
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetLocaleStringList" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLocale
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
([Text], CSize) -> IO ([Text], CSize)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Text]
result', CSize
length_')
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLocale
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetLocaleStringListMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m (([T.Text], FCT.CSize))), MonadIO m) => O.OverloadedMethod KeyFileGetLocaleStringListMethodInfo KeyFile signature where
overloadedMethod = keyFileGetLocaleStringList
instance O.OverloadedMethodInfo KeyFileGetLocaleStringListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetLocaleStringList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetLocaleStringList"
})
#endif
foreign import ccall "g_key_file_get_start_group" g_key_file_get_start_group ::
Ptr KeyFile ->
IO CString
keyFileGetStartGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> m (Maybe T.Text)
keyFileGetStartGroup :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> m (Maybe Text)
keyFileGetStartGroup KeyFile
keyFile = 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
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
result <- Ptr KeyFile -> IO CString
g_key_file_get_start_group Ptr KeyFile
keyFile'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data KeyFileGetStartGroupMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod KeyFileGetStartGroupMethodInfo KeyFile signature where
overloadedMethod = keyFileGetStartGroup
instance O.OverloadedMethodInfo KeyFileGetStartGroupMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetStartGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetStartGroup"
})
#endif
foreign import ccall "g_key_file_get_string" g_key_file_get_string ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CString
keyFileGetString ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m T.Text
keyFileGetString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m Text
keyFileGetString KeyFile
keyFile Text
groupName Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CString
g_key_file_get_string Ptr KeyFile
keyFile' CString
groupName' CString
key'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m T.Text), MonadIO m) => O.OverloadedMethod KeyFileGetStringMethodInfo KeyFile signature where
overloadedMethod = keyFileGetString
instance O.OverloadedMethodInfo KeyFileGetStringMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetString"
})
#endif
foreign import ccall "g_key_file_get_string_list" g_key_file_get_string_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO (Ptr CString)
keyFileGetStringList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m (([T.Text], FCT.CSize))
keyFileGetStringList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m ([Text], CSize)
keyFileGetStringList KeyFile
keyFile Text
groupName Text
key = IO ([Text], CSize) -> m ([Text], CSize)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ([Text], CSize) -> m ([Text], CSize))
-> IO ([Text], CSize) -> m ([Text], CSize)
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO ([Text], CSize) -> IO () -> IO ([Text], CSize)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString
-> CString
-> Ptr CSize
-> Ptr (Ptr GError)
-> IO (Ptr CString)
g_key_file_get_string_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CSize
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetStringList" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
([Text], CSize) -> IO ([Text], CSize)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Text]
result', CSize
length_')
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetStringListMethodInfo
instance (signature ~ (T.Text -> T.Text -> m (([T.Text], FCT.CSize))), MonadIO m) => O.OverloadedMethod KeyFileGetStringListMethodInfo KeyFile signature where
overloadedMethod = keyFileGetStringList
instance O.OverloadedMethodInfo KeyFileGetStringListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetStringList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetStringList"
})
#endif
foreign import ccall "g_key_file_get_uint64" g_key_file_get_uint64 ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO Word64
keyFileGetUint64 ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m Word64
keyFileGetUint64 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m Word64
keyFileGetUint64 KeyFile
keyFile Text
groupName Text
key = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO Word64 -> IO () -> IO Word64
forall a b. IO a -> IO b -> IO a
onException (do
Word64
result <- (Ptr (Ptr GError) -> IO Word64) -> IO Word64
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Word64) -> IO Word64)
-> (Ptr (Ptr GError) -> IO Word64) -> IO Word64
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO Word64
g_key_file_get_uint64 Ptr KeyFile
keyFile' CString
groupName' CString
key'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetUint64MethodInfo
instance (signature ~ (T.Text -> T.Text -> m Word64), MonadIO m) => O.OverloadedMethod KeyFileGetUint64MethodInfo KeyFile signature where
overloadedMethod = keyFileGetUint64
instance O.OverloadedMethodInfo KeyFileGetUint64MethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetUint64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetUint64"
})
#endif
foreign import ccall "g_key_file_get_value" g_key_file_get_value ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CString
keyFileGetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m T.Text
keyFileGetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m Text
keyFileGetValue KeyFile
keyFile Text
groupName Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CString
g_key_file_get_value Ptr KeyFile
keyFile' CString
groupName' CString
key'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileGetValue" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileGetValueMethodInfo
instance (signature ~ (T.Text -> T.Text -> m T.Text), MonadIO m) => O.OverloadedMethod KeyFileGetValueMethodInfo KeyFile signature where
overloadedMethod = keyFileGetValue
instance O.OverloadedMethodInfo KeyFileGetValueMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileGetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileGetValue"
})
#endif
foreign import ccall "g_key_file_has_group" g_key_file_has_group ::
Ptr KeyFile ->
CString ->
IO CInt
keyFileHasGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> m Bool
keyFileHasGroup :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> m Bool
keyFileHasGroup KeyFile
keyFile Text
groupName = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CInt
result <- Ptr KeyFile -> CString -> IO CInt
g_key_file_has_group Ptr KeyFile
keyFile' CString
groupName'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data KeyFileHasGroupMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.OverloadedMethod KeyFileHasGroupMethodInfo KeyFile signature where
overloadedMethod = keyFileHasGroup
instance O.OverloadedMethodInfo KeyFileHasGroupMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileHasGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileHasGroup"
})
#endif
foreign import ccall "g_key_file_load_from_bytes" g_key_file_load_from_bytes ::
Ptr KeyFile ->
Ptr GLib.Bytes.Bytes ->
CUInt ->
Ptr (Ptr GError) ->
IO CInt
keyFileLoadFromBytes ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> GLib.Bytes.Bytes
-> [GLib.Flags.KeyFileFlags]
-> m ()
keyFileLoadFromBytes :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Bytes -> [KeyFileFlags] -> m ()
keyFileLoadFromBytes KeyFile
keyFile Bytes
bytes [KeyFileFlags]
flags = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
Ptr Bytes
bytes' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
bytes
let flags' :: CUInt
flags' = [KeyFileFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [KeyFileFlags]
flags
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> Ptr Bytes -> CUInt -> Ptr (Ptr GError) -> IO CInt
g_key_file_load_from_bytes Ptr KeyFile
keyFile' Ptr Bytes
bytes' CUInt
flags'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
bytes
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data KeyFileLoadFromBytesMethodInfo
instance (signature ~ (GLib.Bytes.Bytes -> [GLib.Flags.KeyFileFlags] -> m ()), MonadIO m) => O.OverloadedMethod KeyFileLoadFromBytesMethodInfo KeyFile signature where
overloadedMethod = keyFileLoadFromBytes
instance O.OverloadedMethodInfo KeyFileLoadFromBytesMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileLoadFromBytes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileLoadFromBytes"
})
#endif
foreign import ccall "g_key_file_load_from_data" g_key_file_load_from_data ::
Ptr KeyFile ->
CString ->
FCT.CSize ->
CUInt ->
Ptr (Ptr GError) ->
IO CInt
keyFileLoadFromData ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> FCT.CSize
-> [GLib.Flags.KeyFileFlags]
-> m ()
keyFileLoadFromData :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> CSize -> [KeyFileFlags] -> m ()
keyFileLoadFromData KeyFile
keyFile Text
data_ CSize
length_ [KeyFileFlags]
flags = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
data_' <- Text -> IO CString
textToCString Text
data_
let flags' :: CUInt
flags' = [KeyFileFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [KeyFileFlags]
flags
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString -> CSize -> CUInt -> Ptr (Ptr GError) -> IO CInt
g_key_file_load_from_data Ptr KeyFile
keyFile' CString
data_' CSize
length_ CUInt
flags'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
data_'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
data_'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileLoadFromDataMethodInfo
instance (signature ~ (T.Text -> FCT.CSize -> [GLib.Flags.KeyFileFlags] -> m ()), MonadIO m) => O.OverloadedMethod KeyFileLoadFromDataMethodInfo KeyFile signature where
overloadedMethod = keyFileLoadFromData
instance O.OverloadedMethodInfo KeyFileLoadFromDataMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileLoadFromData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileLoadFromData"
})
#endif
foreign import ccall "g_key_file_load_from_data_dirs" g_key_file_load_from_data_dirs ::
Ptr KeyFile ->
CString ->
Ptr CString ->
CUInt ->
Ptr (Ptr GError) ->
IO CInt
keyFileLoadFromDataDirs ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> [Char]
-> [GLib.Flags.KeyFileFlags]
-> m ([Char])
keyFileLoadFromDataDirs :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> [Char] -> [KeyFileFlags] -> m [Char]
keyFileLoadFromDataDirs KeyFile
keyFile [Char]
file [KeyFileFlags]
flags = IO [Char] -> m [Char]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Char] -> m [Char]) -> IO [Char] -> m [Char]
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
file' <- [Char] -> IO CString
stringToCString [Char]
file
Ptr CString
fullPath <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
let flags' :: CUInt
flags' = [KeyFileFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [KeyFileFlags]
flags
IO [Char] -> IO () -> IO [Char]
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString -> Ptr CString -> CUInt -> Ptr (Ptr GError) -> IO CInt
g_key_file_load_from_data_dirs Ptr KeyFile
keyFile' CString
file' Ptr CString
fullPath CUInt
flags'
CString
fullPath' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
fullPath
[Char]
fullPath'' <- HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString CString
fullPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fullPath'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
fullPath
[Char] -> IO [Char]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
fullPath''
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
fullPath
)
#if defined(ENABLE_OVERLOADING)
data KeyFileLoadFromDataDirsMethodInfo
instance (signature ~ ([Char] -> [GLib.Flags.KeyFileFlags] -> m ([Char])), MonadIO m) => O.OverloadedMethod KeyFileLoadFromDataDirsMethodInfo KeyFile signature where
overloadedMethod = keyFileLoadFromDataDirs
instance O.OverloadedMethodInfo KeyFileLoadFromDataDirsMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileLoadFromDataDirs",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileLoadFromDataDirs"
})
#endif
foreign import ccall "g_key_file_load_from_dirs" g_key_file_load_from_dirs ::
Ptr KeyFile ->
CString ->
Ptr CString ->
Ptr CString ->
CUInt ->
Ptr (Ptr GError) ->
IO CInt
keyFileLoadFromDirs ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> [Char]
-> [[Char]]
-> [GLib.Flags.KeyFileFlags]
-> m ([Char])
keyFileLoadFromDirs :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> [Char] -> [[Char]] -> [KeyFileFlags] -> m [Char]
keyFileLoadFromDirs KeyFile
keyFile [Char]
file [[Char]]
searchDirs [KeyFileFlags]
flags = IO [Char] -> m [Char]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Char] -> m [Char]) -> IO [Char] -> m [Char]
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
file' <- [Char] -> IO CString
stringToCString [Char]
file
Ptr CString
searchDirs' <- [[Char]] -> IO (Ptr CString)
packZeroTerminatedFileNameArray [[Char]]
searchDirs
Ptr CString
fullPath <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
let flags' :: CUInt
flags' = [KeyFileFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [KeyFileFlags]
flags
IO [Char] -> IO () -> IO [Char]
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString
-> Ptr CString
-> Ptr CString
-> CUInt
-> Ptr (Ptr GError)
-> IO CInt
g_key_file_load_from_dirs Ptr KeyFile
keyFile' CString
file' Ptr CString
searchDirs' Ptr CString
fullPath CUInt
flags'
CString
fullPath' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
fullPath
[Char]
fullPath'' <- HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString CString
fullPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fullPath'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
searchDirs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
searchDirs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
fullPath
[Char] -> IO [Char]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
fullPath''
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
searchDirs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
searchDirs'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
fullPath
)
#if defined(ENABLE_OVERLOADING)
data KeyFileLoadFromDirsMethodInfo
instance (signature ~ ([Char] -> [[Char]] -> [GLib.Flags.KeyFileFlags] -> m ([Char])), MonadIO m) => O.OverloadedMethod KeyFileLoadFromDirsMethodInfo KeyFile signature where
overloadedMethod = keyFileLoadFromDirs
instance O.OverloadedMethodInfo KeyFileLoadFromDirsMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileLoadFromDirs",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileLoadFromDirs"
})
#endif
foreign import ccall "g_key_file_load_from_file" g_key_file_load_from_file ::
Ptr KeyFile ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO CInt
keyFileLoadFromFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> [Char]
-> [GLib.Flags.KeyFileFlags]
-> m ()
keyFileLoadFromFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> [Char] -> [KeyFileFlags] -> m ()
keyFileLoadFromFile KeyFile
keyFile [Char]
file [KeyFileFlags]
flags = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
file' <- [Char] -> IO CString
stringToCString [Char]
file
let flags' :: CUInt
flags' = [KeyFileFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [KeyFileFlags]
flags
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CUInt -> Ptr (Ptr GError) -> IO CInt
g_key_file_load_from_file Ptr KeyFile
keyFile' CString
file' CUInt
flags'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileLoadFromFileMethodInfo
instance (signature ~ ([Char] -> [GLib.Flags.KeyFileFlags] -> m ()), MonadIO m) => O.OverloadedMethod KeyFileLoadFromFileMethodInfo KeyFile signature where
overloadedMethod = keyFileLoadFromFile
instance O.OverloadedMethodInfo KeyFileLoadFromFileMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileLoadFromFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileLoadFromFile"
})
#endif
foreign import ccall "g_key_file_remove_comment" ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
keyFileRemoveComment ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m ()
KeyFile
keyFile Maybe Text
groupName Maybe Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
maybeGroupName <- case Maybe Text
groupName 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
jGroupName -> do
CString
jGroupName' <- Text -> IO CString
textToCString Text
jGroupName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jGroupName'
CString
maybeKey <- case Maybe Text
key 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
jKey -> do
CString
jKey' <- Text -> IO CString
textToCString Text
jKey
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jKey'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_key_file_remove_comment Ptr KeyFile
keyFile' CString
maybeGroupName CString
maybeKey
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeKey
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeKey
)
#if defined(ENABLE_OVERLOADING)
data KeyFileRemoveCommentMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> m ()), MonadIO m) => O.OverloadedMethod KeyFileRemoveCommentMethodInfo KeyFile signature where
overloadedMethod = keyFileRemoveComment
instance O.OverloadedMethodInfo KeyFileRemoveCommentMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileRemoveComment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileRemoveComment"
})
#endif
foreign import ccall "g_key_file_remove_group" g_key_file_remove_group ::
Ptr KeyFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
keyFileRemoveGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> m ()
keyFileRemoveGroup :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> m ()
keyFileRemoveGroup KeyFile
keyFile Text
groupName = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> Ptr (Ptr GError) -> IO CInt
g_key_file_remove_group Ptr KeyFile
keyFile' CString
groupName'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileRemoveGroupMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileRemoveGroupMethodInfo KeyFile signature where
overloadedMethod = keyFileRemoveGroup
instance O.OverloadedMethodInfo KeyFileRemoveGroupMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileRemoveGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileRemoveGroup"
})
#endif
foreign import ccall "g_key_file_remove_key" g_key_file_remove_key ::
Ptr KeyFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
keyFileRemoveKey ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> m ()
keyFileRemoveKey :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> m ()
keyFileRemoveKey KeyFile
keyFile Text
groupName Text
key = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_key_file_remove_key Ptr KeyFile
keyFile' CString
groupName' CString
key'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileRemoveKeyMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileRemoveKeyMethodInfo KeyFile signature where
overloadedMethod = keyFileRemoveKey
instance O.OverloadedMethodInfo KeyFileRemoveKeyMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileRemoveKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileRemoveKey"
})
#endif
foreign import ccall "g_key_file_save_to_file" g_key_file_save_to_file ::
Ptr KeyFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
keyFileSaveToFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> m ()
keyFileSaveToFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> m ()
keyFileSaveToFile KeyFile
keyFile Text
filename = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
filename' <- Text -> IO CString
textToCString Text
filename
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> CString -> Ptr (Ptr GError) -> IO CInt
g_key_file_save_to_file Ptr KeyFile
keyFile' CString
filename'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileSaveToFileMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSaveToFileMethodInfo KeyFile signature where
overloadedMethod = keyFileSaveToFile
instance O.OverloadedMethodInfo KeyFileSaveToFileMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSaveToFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSaveToFile"
})
#endif
foreign import ccall "g_key_file_set_boolean" g_key_file_set_boolean ::
Ptr KeyFile ->
CString ->
CString ->
CInt ->
IO ()
keyFileSetBoolean ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Bool
-> m ()
keyFileSetBoolean :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Bool -> m ()
keyFileSetBoolean KeyFile
keyFile Text
groupName Text
key Bool
value = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
let value' :: CInt
value' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
value
Ptr KeyFile -> CString -> CString -> CInt -> IO ()
g_key_file_set_boolean Ptr KeyFile
keyFile' CString
groupName' CString
key' CInt
value'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetBooleanMethodInfo
instance (signature ~ (T.Text -> T.Text -> Bool -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetBooleanMethodInfo KeyFile signature where
overloadedMethod = keyFileSetBoolean
instance O.OverloadedMethodInfo KeyFileSetBooleanMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetBoolean",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetBoolean"
})
#endif
foreign import ccall "g_key_file_set_boolean_list" g_key_file_set_boolean_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr CInt ->
FCT.CSize ->
IO ()
keyFileSetBooleanList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> [Bool]
-> m ()
keyFileSetBooleanList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> [Bool] -> m ()
keyFileSetBooleanList KeyFile
keyFile Text
groupName Text
key [Bool]
list = 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
let length_ :: CSize
length_ = Int -> CSize
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CSize) -> Int -> CSize
forall a b. (a -> b) -> a -> b
$ [Bool] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Bool]
list
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CInt
list' <- ((Bool -> CInt) -> [Bool] -> IO (Ptr CInt)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum)) [Bool]
list
Ptr KeyFile -> CString -> CString -> Ptr CInt -> CSize -> IO ()
g_key_file_set_boolean_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CInt
list' CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
list'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetBooleanListMethodInfo
instance (signature ~ (T.Text -> T.Text -> [Bool] -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetBooleanListMethodInfo KeyFile signature where
overloadedMethod = keyFileSetBooleanList
instance O.OverloadedMethodInfo KeyFileSetBooleanListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetBooleanList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetBooleanList"
})
#endif
foreign import ccall "g_key_file_set_comment" ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
keyFileSetComment ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> Maybe (T.Text)
-> Maybe (T.Text)
-> T.Text
-> m ()
KeyFile
keyFile Maybe Text
groupName Maybe Text
key Text
comment = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
maybeGroupName <- case Maybe Text
groupName 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
jGroupName -> do
CString
jGroupName' <- Text -> IO CString
textToCString Text
jGroupName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jGroupName'
CString
maybeKey <- case Maybe Text
key 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
jKey -> do
CString
jKey' <- Text -> IO CString
textToCString Text
jKey
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jKey'
CString
comment' <- Text -> IO CString
textToCString Text
comment
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString -> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_key_file_set_comment Ptr KeyFile
keyFile' CString
maybeGroupName CString
maybeKey CString
comment'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeKey
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
comment'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeKey
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
comment'
)
#if defined(ENABLE_OVERLOADING)
data KeyFileSetCommentMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetCommentMethodInfo KeyFile signature where
overloadedMethod = keyFileSetComment
instance O.OverloadedMethodInfo KeyFileSetCommentMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetComment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetComment"
})
#endif
foreign import ccall "g_key_file_set_double" g_key_file_set_double ::
Ptr KeyFile ->
CString ->
CString ->
CDouble ->
IO ()
keyFileSetDouble ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Double
-> m ()
keyFileSetDouble :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Double -> m ()
keyFileSetDouble KeyFile
keyFile Text
groupName Text
key Double
value = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
let value' :: CDouble
value' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
value
Ptr KeyFile -> CString -> CString -> CDouble -> IO ()
g_key_file_set_double Ptr KeyFile
keyFile' CString
groupName' CString
key' CDouble
value'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetDoubleMethodInfo
instance (signature ~ (T.Text -> T.Text -> Double -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetDoubleMethodInfo KeyFile signature where
overloadedMethod = keyFileSetDouble
instance O.OverloadedMethodInfo KeyFileSetDoubleMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetDouble"
})
#endif
foreign import ccall "g_key_file_set_double_list" g_key_file_set_double_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr CDouble ->
FCT.CSize ->
IO ()
keyFileSetDoubleList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> [Double]
-> m ()
keyFileSetDoubleList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> [Double] -> m ()
keyFileSetDoubleList KeyFile
keyFile Text
groupName Text
key [Double]
list = 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
let length_ :: CSize
length_ = Int -> CSize
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CSize) -> Int -> CSize
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
list
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CDouble
list' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
list
Ptr KeyFile -> CString -> CString -> Ptr CDouble -> CSize -> IO ()
g_key_file_set_double_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CDouble
list' CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
list'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetDoubleListMethodInfo
instance (signature ~ (T.Text -> T.Text -> [Double] -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetDoubleListMethodInfo KeyFile signature where
overloadedMethod = keyFileSetDoubleList
instance O.OverloadedMethodInfo KeyFileSetDoubleListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetDoubleList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetDoubleList"
})
#endif
foreign import ccall "g_key_file_set_int64" g_key_file_set_int64 ::
Ptr KeyFile ->
CString ->
CString ->
Int64 ->
IO ()
keyFileSetInt64 ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Int64
-> m ()
keyFileSetInt64 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Int64 -> m ()
keyFileSetInt64 KeyFile
keyFile Text
groupName Text
key Int64
value = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr KeyFile -> CString -> CString -> Int64 -> IO ()
g_key_file_set_int64 Ptr KeyFile
keyFile' CString
groupName' CString
key' Int64
value
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetInt64MethodInfo
instance (signature ~ (T.Text -> T.Text -> Int64 -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetInt64MethodInfo KeyFile signature where
overloadedMethod = keyFileSetInt64
instance O.OverloadedMethodInfo KeyFileSetInt64MethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetInt64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetInt64"
})
#endif
foreign import ccall "g_key_file_set_integer" g_key_file_set_integer ::
Ptr KeyFile ->
CString ->
CString ->
Int32 ->
IO ()
keyFileSetInteger ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Int32
-> m ()
keyFileSetInteger :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Int32 -> m ()
keyFileSetInteger KeyFile
keyFile Text
groupName Text
key Int32
value = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr KeyFile -> CString -> CString -> Int32 -> IO ()
g_key_file_set_integer Ptr KeyFile
keyFile' CString
groupName' CString
key' Int32
value
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetIntegerMethodInfo
instance (signature ~ (T.Text -> T.Text -> Int32 -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetIntegerMethodInfo KeyFile signature where
overloadedMethod = keyFileSetInteger
instance O.OverloadedMethodInfo KeyFileSetIntegerMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetInteger",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetInteger"
})
#endif
foreign import ccall "g_key_file_set_integer_list" g_key_file_set_integer_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr Int32 ->
FCT.CSize ->
IO ()
keyFileSetIntegerList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> [Int32]
-> m ()
keyFileSetIntegerList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> [Int32] -> m ()
keyFileSetIntegerList KeyFile
keyFile Text
groupName Text
key [Int32]
list = 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
let length_ :: CSize
length_ = Int -> CSize
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CSize) -> Int -> CSize
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Int32]
list
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr Int32
list' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
list
Ptr KeyFile -> CString -> CString -> Ptr Int32 -> CSize -> IO ()
g_key_file_set_integer_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr Int32
list' CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
list'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetIntegerListMethodInfo
instance (signature ~ (T.Text -> T.Text -> [Int32] -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetIntegerListMethodInfo KeyFile signature where
overloadedMethod = keyFileSetIntegerList
instance O.OverloadedMethodInfo KeyFileSetIntegerListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetIntegerList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetIntegerList"
})
#endif
foreign import ccall "g_key_file_set_list_separator" g_key_file_set_list_separator ::
Ptr KeyFile ->
Int8 ->
IO ()
keyFileSetListSeparator ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> Int8
-> m ()
keyFileSetListSeparator :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Int8 -> m ()
keyFileSetListSeparator KeyFile
keyFile Int8
separator = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
Ptr KeyFile -> Int8 -> IO ()
g_key_file_set_list_separator Ptr KeyFile
keyFile' Int8
separator
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetListSeparatorMethodInfo
instance (signature ~ (Int8 -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetListSeparatorMethodInfo KeyFile signature where
overloadedMethod = keyFileSetListSeparator
instance O.OverloadedMethodInfo KeyFileSetListSeparatorMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetListSeparator",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetListSeparator"
})
#endif
foreign import ccall "g_key_file_set_locale_string" g_key_file_set_locale_string ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
CString ->
IO ()
keyFileSetLocaleString ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> m ()
keyFileSetLocaleString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Text -> Text -> m ()
keyFileSetLocaleString KeyFile
keyFile Text
groupName Text
key Text
locale Text
string = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
locale' <- Text -> IO CString
textToCString Text
locale
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr KeyFile -> CString -> CString -> CString -> CString -> IO ()
g_key_file_set_locale_string Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
locale' CString
string'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
locale'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetLocaleStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetLocaleStringMethodInfo KeyFile signature where
overloadedMethod = keyFileSetLocaleString
instance O.OverloadedMethodInfo KeyFileSetLocaleStringMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetLocaleString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetLocaleString"
})
#endif
foreign import ccall "g_key_file_set_locale_string_list" g_key_file_set_locale_string_list ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
Ptr CString ->
FCT.CSize ->
IO ()
keyFileSetLocaleStringList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> T.Text
-> [T.Text]
-> FCT.CSize
-> m ()
keyFileSetLocaleStringList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Text -> [Text] -> CSize -> m ()
keyFileSetLocaleStringList KeyFile
keyFile Text
groupName Text
key Text
locale [Text]
list CSize
length_ = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
locale' <- Text -> IO CString
textToCString Text
locale
Ptr CString
list' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
list
Ptr KeyFile
-> CString -> CString -> CString -> Ptr CString -> CSize -> IO ()
g_key_file_set_locale_string_list Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
locale' Ptr CString
list' CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
locale'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
list'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
list'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetLocaleStringListMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> [T.Text] -> FCT.CSize -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetLocaleStringListMethodInfo KeyFile signature where
overloadedMethod = keyFileSetLocaleStringList
instance O.OverloadedMethodInfo KeyFileSetLocaleStringListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetLocaleStringList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetLocaleStringList"
})
#endif
foreign import ccall "g_key_file_set_string" g_key_file_set_string ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
IO ()
keyFileSetString ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> T.Text
-> m ()
keyFileSetString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Text -> m ()
keyFileSetString KeyFile
keyFile Text
groupName Text
key Text
string = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr KeyFile -> CString -> CString -> CString -> IO ()
g_key_file_set_string Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
string'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetStringMethodInfo KeyFile signature where
overloadedMethod = keyFileSetString
instance O.OverloadedMethodInfo KeyFileSetStringMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetString"
})
#endif
foreign import ccall "g_key_file_set_string_list" g_key_file_set_string_list ::
Ptr KeyFile ->
CString ->
CString ->
Ptr CString ->
FCT.CSize ->
IO ()
keyFileSetStringList ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> [T.Text]
-> FCT.CSize
-> m ()
keyFileSetStringList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> [Text] -> CSize -> m ()
keyFileSetStringList KeyFile
keyFile Text
groupName Text
key [Text]
list CSize
length_ = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr CString
list' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
list
Ptr KeyFile -> CString -> CString -> Ptr CString -> CSize -> IO ()
g_key_file_set_string_list Ptr KeyFile
keyFile' CString
groupName' CString
key' Ptr CString
list' CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
list'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
list'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetStringListMethodInfo
instance (signature ~ (T.Text -> T.Text -> [T.Text] -> FCT.CSize -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetStringListMethodInfo KeyFile signature where
overloadedMethod = keyFileSetStringList
instance O.OverloadedMethodInfo KeyFileSetStringListMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetStringList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetStringList"
})
#endif
foreign import ccall "g_key_file_set_uint64" g_key_file_set_uint64 ::
Ptr KeyFile ->
CString ->
CString ->
Word64 ->
IO ()
keyFileSetUint64 ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> Word64
-> m ()
keyFileSetUint64 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Word64 -> m ()
keyFileSetUint64 KeyFile
keyFile Text
groupName Text
key Word64
value = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr KeyFile -> CString -> CString -> Word64 -> IO ()
g_key_file_set_uint64 Ptr KeyFile
keyFile' CString
groupName' CString
key' Word64
value
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetUint64MethodInfo
instance (signature ~ (T.Text -> T.Text -> Word64 -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetUint64MethodInfo KeyFile signature where
overloadedMethod = keyFileSetUint64
instance O.OverloadedMethodInfo KeyFileSetUint64MethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetUint64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetUint64"
})
#endif
foreign import ccall "g_key_file_set_value" g_key_file_set_value ::
Ptr KeyFile ->
CString ->
CString ->
CString ->
IO ()
keyFileSetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> T.Text
-> T.Text
-> T.Text
-> m ()
keyFileSetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Text -> Text -> Text -> m ()
keyFileSetValue KeyFile
keyFile Text
groupName Text
key Text
value = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
groupName' <- Text -> IO CString
textToCString Text
groupName
CString
key' <- Text -> IO CString
textToCString Text
key
CString
value' <- Text -> IO CString
textToCString Text
value
Ptr KeyFile -> CString -> CString -> CString -> IO ()
g_key_file_set_value Ptr KeyFile
keyFile' CString
groupName' CString
key' CString
value'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
groupName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileSetValueMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod KeyFileSetValueMethodInfo KeyFile signature where
overloadedMethod = keyFileSetValue
instance O.OverloadedMethodInfo KeyFileSetValueMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileSetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileSetValue"
})
#endif
foreign import ccall "g_key_file_to_data" g_key_file_to_data ::
Ptr KeyFile ->
Ptr FCT.CSize ->
Ptr (Ptr GError) ->
IO CString
keyFileToData ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> m ((T.Text, FCT.CSize))
keyFileToData :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> m (Text, CSize)
keyFileToData KeyFile
keyFile = IO (Text, CSize) -> m (Text, CSize)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Text, CSize) -> m (Text, CSize))
-> IO (Text, CSize) -> m (Text, CSize)
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
Ptr CSize
length_ <- IO (Ptr CSize)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr FCT.CSize)
IO (Text, CSize) -> IO () -> IO (Text, CSize)
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile -> Ptr CSize -> Ptr (Ptr GError) -> IO CString
g_key_file_to_data Ptr KeyFile
keyFile' Ptr CSize
length_
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyFileToData" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
CSize
length_' <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek Ptr CSize
length_
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
(Text, CSize) -> IO (Text, CSize)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Text
result', CSize
length_')
) (do
Ptr CSize -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CSize
length_
)
#if defined(ENABLE_OVERLOADING)
data KeyFileToDataMethodInfo
instance (signature ~ (m ((T.Text, FCT.CSize))), MonadIO m) => O.OverloadedMethod KeyFileToDataMethodInfo KeyFile signature where
overloadedMethod = keyFileToData
instance O.OverloadedMethodInfo KeyFileToDataMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileToData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileToData"
})
#endif
foreign import ccall "g_key_file_unref" g_key_file_unref ::
Ptr KeyFile ->
IO ()
keyFileUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
KeyFile
-> m ()
keyFileUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => KeyFile -> m ()
keyFileUnref KeyFile
keyFile = 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 KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
Ptr KeyFile -> IO ()
g_key_file_unref Ptr KeyFile
keyFile'
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyFileUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod KeyFileUnrefMethodInfo KeyFile signature where
overloadedMethod = keyFileUnref
instance O.OverloadedMethodInfo KeyFileUnrefMethodInfo KeyFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.KeyFile.keyFileUnref",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-KeyFile.html#v:keyFileUnref"
})
#endif
foreign import ccall "g_key_file_error_quark" g_key_file_error_quark ::
IO Word32
keyFileErrorQuark ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Word32
keyFileErrorQuark :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Word32
keyFileErrorQuark = 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
Word32
result <- IO Word32
g_key_file_error_quark
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveKeyFileMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveKeyFileMethod "hasGroup" o = KeyFileHasGroupMethodInfo
ResolveKeyFileMethod "loadFromBytes" o = KeyFileLoadFromBytesMethodInfo
ResolveKeyFileMethod "loadFromData" o = KeyFileLoadFromDataMethodInfo
ResolveKeyFileMethod "loadFromDataDirs" o = KeyFileLoadFromDataDirsMethodInfo
ResolveKeyFileMethod "loadFromDirs" o = KeyFileLoadFromDirsMethodInfo
ResolveKeyFileMethod "loadFromFile" o = KeyFileLoadFromFileMethodInfo
ResolveKeyFileMethod "removeComment" o = KeyFileRemoveCommentMethodInfo
ResolveKeyFileMethod "removeGroup" o = KeyFileRemoveGroupMethodInfo
ResolveKeyFileMethod "removeKey" o = KeyFileRemoveKeyMethodInfo
ResolveKeyFileMethod "saveToFile" o = KeyFileSaveToFileMethodInfo
ResolveKeyFileMethod "toData" o = KeyFileToDataMethodInfo
ResolveKeyFileMethod "unref" o = KeyFileUnrefMethodInfo
ResolveKeyFileMethod "getBoolean" o = KeyFileGetBooleanMethodInfo
ResolveKeyFileMethod "getBooleanList" o = KeyFileGetBooleanListMethodInfo
ResolveKeyFileMethod "getComment" o = KeyFileGetCommentMethodInfo
ResolveKeyFileMethod "getDouble" o = KeyFileGetDoubleMethodInfo
ResolveKeyFileMethod "getDoubleList" o = KeyFileGetDoubleListMethodInfo
ResolveKeyFileMethod "getGroups" o = KeyFileGetGroupsMethodInfo
ResolveKeyFileMethod "getInt64" o = KeyFileGetInt64MethodInfo
ResolveKeyFileMethod "getInteger" o = KeyFileGetIntegerMethodInfo
ResolveKeyFileMethod "getIntegerList" o = KeyFileGetIntegerListMethodInfo
ResolveKeyFileMethod "getKeys" o = KeyFileGetKeysMethodInfo
ResolveKeyFileMethod "getLocaleForKey" o = KeyFileGetLocaleForKeyMethodInfo
ResolveKeyFileMethod "getLocaleString" o = KeyFileGetLocaleStringMethodInfo
ResolveKeyFileMethod "getLocaleStringList" o = KeyFileGetLocaleStringListMethodInfo
ResolveKeyFileMethod "getStartGroup" o = KeyFileGetStartGroupMethodInfo
ResolveKeyFileMethod "getString" o = KeyFileGetStringMethodInfo
ResolveKeyFileMethod "getStringList" o = KeyFileGetStringListMethodInfo
ResolveKeyFileMethod "getUint64" o = KeyFileGetUint64MethodInfo
ResolveKeyFileMethod "getValue" o = KeyFileGetValueMethodInfo
ResolveKeyFileMethod "setBoolean" o = KeyFileSetBooleanMethodInfo
ResolveKeyFileMethod "setBooleanList" o = KeyFileSetBooleanListMethodInfo
ResolveKeyFileMethod "setComment" o = KeyFileSetCommentMethodInfo
ResolveKeyFileMethod "setDouble" o = KeyFileSetDoubleMethodInfo
ResolveKeyFileMethod "setDoubleList" o = KeyFileSetDoubleListMethodInfo
ResolveKeyFileMethod "setInt64" o = KeyFileSetInt64MethodInfo
ResolveKeyFileMethod "setInteger" o = KeyFileSetIntegerMethodInfo
ResolveKeyFileMethod "setIntegerList" o = KeyFileSetIntegerListMethodInfo
ResolveKeyFileMethod "setListSeparator" o = KeyFileSetListSeparatorMethodInfo
ResolveKeyFileMethod "setLocaleString" o = KeyFileSetLocaleStringMethodInfo
ResolveKeyFileMethod "setLocaleStringList" o = KeyFileSetLocaleStringListMethodInfo
ResolveKeyFileMethod "setString" o = KeyFileSetStringMethodInfo
ResolveKeyFileMethod "setStringList" o = KeyFileSetStringListMethodInfo
ResolveKeyFileMethod "setUint64" o = KeyFileSetUint64MethodInfo
ResolveKeyFileMethod "setValue" o = KeyFileSetValueMethodInfo
ResolveKeyFileMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveKeyFileMethod t KeyFile, O.OverloadedMethod info KeyFile p) => OL.IsLabel t (KeyFile -> 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 ~ ResolveKeyFileMethod t KeyFile, O.OverloadedMethod info KeyFile p, R.HasField t KeyFile p) => R.HasField t KeyFile p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveKeyFileMethod t KeyFile, O.OverloadedMethodInfo info KeyFile) => OL.IsLabel t (O.MethodProxy info KeyFile) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif