{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.Settings
(
Settings(..) ,
IsSettings ,
toSettings ,
#if defined(ENABLE_OVERLOADING)
ResolveSettingsMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsApplyMethodInfo ,
#endif
settingsApply ,
#if defined(ENABLE_OVERLOADING)
SettingsBindMethodInfo ,
#endif
settingsBind ,
#if defined(ENABLE_OVERLOADING)
SettingsBindWritableMethodInfo ,
#endif
settingsBindWritable ,
#if defined(ENABLE_OVERLOADING)
SettingsCreateActionMethodInfo ,
#endif
settingsCreateAction ,
#if defined(ENABLE_OVERLOADING)
SettingsDelayMethodInfo ,
#endif
settingsDelay ,
#if defined(ENABLE_OVERLOADING)
SettingsGetBooleanMethodInfo ,
#endif
settingsGetBoolean ,
#if defined(ENABLE_OVERLOADING)
SettingsGetChildMethodInfo ,
#endif
settingsGetChild ,
#if defined(ENABLE_OVERLOADING)
SettingsGetDefaultValueMethodInfo ,
#endif
settingsGetDefaultValue ,
#if defined(ENABLE_OVERLOADING)
SettingsGetDoubleMethodInfo ,
#endif
settingsGetDouble ,
#if defined(ENABLE_OVERLOADING)
SettingsGetEnumMethodInfo ,
#endif
settingsGetEnum ,
#if defined(ENABLE_OVERLOADING)
SettingsGetFlagsMethodInfo ,
#endif
settingsGetFlags ,
#if defined(ENABLE_OVERLOADING)
SettingsGetHasUnappliedMethodInfo ,
#endif
settingsGetHasUnapplied ,
#if defined(ENABLE_OVERLOADING)
SettingsGetIntMethodInfo ,
#endif
settingsGetInt ,
#if defined(ENABLE_OVERLOADING)
SettingsGetInt64MethodInfo ,
#endif
settingsGetInt64 ,
#if defined(ENABLE_OVERLOADING)
SettingsGetMappedMethodInfo ,
#endif
settingsGetMapped ,
#if defined(ENABLE_OVERLOADING)
SettingsGetRangeMethodInfo ,
#endif
settingsGetRange ,
#if defined(ENABLE_OVERLOADING)
SettingsGetStringMethodInfo ,
#endif
settingsGetString ,
#if defined(ENABLE_OVERLOADING)
SettingsGetStrvMethodInfo ,
#endif
settingsGetStrv ,
#if defined(ENABLE_OVERLOADING)
SettingsGetUintMethodInfo ,
#endif
settingsGetUint ,
#if defined(ENABLE_OVERLOADING)
SettingsGetUint64MethodInfo ,
#endif
settingsGetUint64 ,
#if defined(ENABLE_OVERLOADING)
SettingsGetUserValueMethodInfo ,
#endif
settingsGetUserValue ,
#if defined(ENABLE_OVERLOADING)
SettingsGetValueMethodInfo ,
#endif
settingsGetValue ,
#if defined(ENABLE_OVERLOADING)
SettingsIsWritableMethodInfo ,
#endif
settingsIsWritable ,
#if defined(ENABLE_OVERLOADING)
SettingsListChildrenMethodInfo ,
#endif
settingsListChildren ,
#if defined(ENABLE_OVERLOADING)
SettingsListKeysMethodInfo ,
#endif
settingsListKeys ,
settingsListRelocatableSchemas ,
settingsListSchemas ,
settingsNew ,
settingsNewFull ,
settingsNewWithBackend ,
settingsNewWithBackendAndPath ,
settingsNewWithPath ,
#if defined(ENABLE_OVERLOADING)
SettingsRangeCheckMethodInfo ,
#endif
settingsRangeCheck ,
#if defined(ENABLE_OVERLOADING)
SettingsResetMethodInfo ,
#endif
settingsReset ,
#if defined(ENABLE_OVERLOADING)
SettingsRevertMethodInfo ,
#endif
settingsRevert ,
#if defined(ENABLE_OVERLOADING)
SettingsSetBooleanMethodInfo ,
#endif
settingsSetBoolean ,
#if defined(ENABLE_OVERLOADING)
SettingsSetDoubleMethodInfo ,
#endif
settingsSetDouble ,
#if defined(ENABLE_OVERLOADING)
SettingsSetEnumMethodInfo ,
#endif
settingsSetEnum ,
#if defined(ENABLE_OVERLOADING)
SettingsSetFlagsMethodInfo ,
#endif
settingsSetFlags ,
#if defined(ENABLE_OVERLOADING)
SettingsSetIntMethodInfo ,
#endif
settingsSetInt ,
#if defined(ENABLE_OVERLOADING)
SettingsSetInt64MethodInfo ,
#endif
settingsSetInt64 ,
#if defined(ENABLE_OVERLOADING)
SettingsSetStringMethodInfo ,
#endif
settingsSetString ,
#if defined(ENABLE_OVERLOADING)
SettingsSetStrvMethodInfo ,
#endif
settingsSetStrv ,
#if defined(ENABLE_OVERLOADING)
SettingsSetUintMethodInfo ,
#endif
settingsSetUint ,
#if defined(ENABLE_OVERLOADING)
SettingsSetUint64MethodInfo ,
#endif
settingsSetUint64 ,
#if defined(ENABLE_OVERLOADING)
SettingsSetValueMethodInfo ,
#endif
settingsSetValue ,
settingsSync ,
settingsUnbind ,
#if defined(ENABLE_OVERLOADING)
SettingsBackendPropertyInfo ,
#endif
constructSettingsBackend ,
getSettingsBackend ,
#if defined(ENABLE_OVERLOADING)
settingsBackend ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsDelayApplyPropertyInfo ,
#endif
getSettingsDelayApply ,
#if defined(ENABLE_OVERLOADING)
settingsDelayApply ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsHasUnappliedPropertyInfo ,
#endif
getSettingsHasUnapplied ,
#if defined(ENABLE_OVERLOADING)
settingsHasUnapplied ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsPathPropertyInfo ,
#endif
constructSettingsPath ,
getSettingsPath ,
#if defined(ENABLE_OVERLOADING)
settingsPath ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsSchemaPropertyInfo ,
#endif
constructSettingsSchema ,
getSettingsSchema ,
#if defined(ENABLE_OVERLOADING)
settingsSchema ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsSchemaIdPropertyInfo ,
#endif
constructSettingsSchemaId ,
getSettingsSchemaId ,
#if defined(ENABLE_OVERLOADING)
settingsSchemaId ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingsSettingsSchemaPropertyInfo ,
#endif
constructSettingsSettingsSchema ,
getSettingsSettingsSchema ,
#if defined(ENABLE_OVERLOADING)
settingsSettingsSchema ,
#endif
SettingsChangeEventCallback ,
#if defined(ENABLE_OVERLOADING)
SettingsChangeEventSignalInfo ,
#endif
afterSettingsChangeEvent ,
onSettingsChangeEvent ,
SettingsChangedCallback ,
#if defined(ENABLE_OVERLOADING)
SettingsChangedSignalInfo ,
#endif
afterSettingsChanged ,
onSettingsChanged ,
SettingsWritableChangeEventCallback ,
#if defined(ENABLE_OVERLOADING)
SettingsWritableChangeEventSignalInfo ,
#endif
afterSettingsWritableChangeEvent ,
onSettingsWritableChangeEvent ,
SettingsWritableChangedCallback ,
#if defined(ENABLE_OVERLOADING)
SettingsWritableChangedSignalInfo ,
#endif
afterSettingsWritableChanged ,
onSettingsWritableChanged ,
) 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 qualified GI.GLib.Structs.Tree as GLib.Tree
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Action as Gio.Action
import {-# SOURCE #-} qualified GI.Gio.Objects.SettingsBackend as Gio.SettingsBackend
import {-# SOURCE #-} qualified GI.Gio.Structs.SettingsSchema as Gio.SettingsSchema
import {-# SOURCE #-} qualified GI.Gio.Structs.SettingsSchemaKey as Gio.SettingsSchemaKey
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Action as Gio.Action
import {-# SOURCE #-} qualified GI.Gio.Objects.SettingsBackend as Gio.SettingsBackend
import {-# SOURCE #-} qualified GI.Gio.Structs.SettingsSchema as Gio.SettingsSchema
#endif
newtype Settings = Settings (SP.ManagedPtr Settings)
deriving (Settings -> Settings -> Bool
(Settings -> Settings -> Bool)
-> (Settings -> Settings -> Bool) -> Eq Settings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Settings -> Settings -> Bool
== :: Settings -> Settings -> Bool
$c/= :: Settings -> Settings -> Bool
/= :: Settings -> Settings -> Bool
Eq)
instance SP.ManagedPtrNewtype Settings where
toManagedPtr :: Settings -> ManagedPtr Settings
toManagedPtr (Settings ManagedPtr Settings
p) = ManagedPtr Settings
p
foreign import ccall "g_settings_get_type"
c_g_settings_get_type :: IO B.Types.GType
instance B.Types.TypedObject Settings where
glibType :: IO GType
glibType = IO GType
c_g_settings_get_type
instance B.Types.GObject Settings
class (SP.GObject o, O.IsDescendantOf Settings o) => IsSettings o
instance (SP.GObject o, O.IsDescendantOf Settings o) => IsSettings o
instance O.HasParentTypes Settings
type instance O.ParentTypes Settings = '[GObject.Object.Object]
toSettings :: (MIO.MonadIO m, IsSettings o) => o -> m Settings
toSettings :: forall (m :: * -> *) o.
(MonadIO m, IsSettings o) =>
o -> m Settings
toSettings = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Settings -> m Settings)
-> (o -> IO Settings) -> o -> m Settings
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Settings -> Settings) -> o -> IO Settings
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Settings -> Settings
Settings
instance B.GValue.IsGValue (Maybe Settings) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_settings_get_type
gvalueSet_ :: Ptr GValue -> Maybe Settings -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Settings
P.Nothing = Ptr GValue -> Ptr Settings -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Settings
forall a. Ptr a
FP.nullPtr :: FP.Ptr Settings)
gvalueSet_ Ptr GValue
gv (P.Just Settings
obj) = Settings -> (Ptr Settings -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Settings
obj (Ptr GValue -> Ptr Settings -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Settings)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Settings)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Settings)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Settings ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSettingsMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveSettingsMethod "apply" o = SettingsApplyMethodInfo
ResolveSettingsMethod "bind" o = SettingsBindMethodInfo
ResolveSettingsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSettingsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSettingsMethod "bindWritable" o = SettingsBindWritableMethodInfo
ResolveSettingsMethod "createAction" o = SettingsCreateActionMethodInfo
ResolveSettingsMethod "delay" o = SettingsDelayMethodInfo
ResolveSettingsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSettingsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSettingsMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSettingsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSettingsMethod "isWritable" o = SettingsIsWritableMethodInfo
ResolveSettingsMethod "listChildren" o = SettingsListChildrenMethodInfo
ResolveSettingsMethod "listKeys" o = SettingsListKeysMethodInfo
ResolveSettingsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSettingsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSettingsMethod "rangeCheck" o = SettingsRangeCheckMethodInfo
ResolveSettingsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSettingsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSettingsMethod "reset" o = SettingsResetMethodInfo
ResolveSettingsMethod "revert" o = SettingsRevertMethodInfo
ResolveSettingsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSettingsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSettingsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSettingsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSettingsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSettingsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSettingsMethod "getBoolean" o = SettingsGetBooleanMethodInfo
ResolveSettingsMethod "getChild" o = SettingsGetChildMethodInfo
ResolveSettingsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSettingsMethod "getDefaultValue" o = SettingsGetDefaultValueMethodInfo
ResolveSettingsMethod "getDouble" o = SettingsGetDoubleMethodInfo
ResolveSettingsMethod "getEnum" o = SettingsGetEnumMethodInfo
ResolveSettingsMethod "getFlags" o = SettingsGetFlagsMethodInfo
ResolveSettingsMethod "getHasUnapplied" o = SettingsGetHasUnappliedMethodInfo
ResolveSettingsMethod "getInt" o = SettingsGetIntMethodInfo
ResolveSettingsMethod "getInt64" o = SettingsGetInt64MethodInfo
ResolveSettingsMethod "getMapped" o = SettingsGetMappedMethodInfo
ResolveSettingsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSettingsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSettingsMethod "getRange" o = SettingsGetRangeMethodInfo
ResolveSettingsMethod "getString" o = SettingsGetStringMethodInfo
ResolveSettingsMethod "getStrv" o = SettingsGetStrvMethodInfo
ResolveSettingsMethod "getUint" o = SettingsGetUintMethodInfo
ResolveSettingsMethod "getUint64" o = SettingsGetUint64MethodInfo
ResolveSettingsMethod "getUserValue" o = SettingsGetUserValueMethodInfo
ResolveSettingsMethod "getValue" o = SettingsGetValueMethodInfo
ResolveSettingsMethod "setBoolean" o = SettingsSetBooleanMethodInfo
ResolveSettingsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSettingsMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSettingsMethod "setDouble" o = SettingsSetDoubleMethodInfo
ResolveSettingsMethod "setEnum" o = SettingsSetEnumMethodInfo
ResolveSettingsMethod "setFlags" o = SettingsSetFlagsMethodInfo
ResolveSettingsMethod "setInt" o = SettingsSetIntMethodInfo
ResolveSettingsMethod "setInt64" o = SettingsSetInt64MethodInfo
ResolveSettingsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSettingsMethod "setString" o = SettingsSetStringMethodInfo
ResolveSettingsMethod "setStrv" o = SettingsSetStrvMethodInfo
ResolveSettingsMethod "setUint" o = SettingsSetUintMethodInfo
ResolveSettingsMethod "setUint64" o = SettingsSetUint64MethodInfo
ResolveSettingsMethod "setValue" o = SettingsSetValueMethodInfo
ResolveSettingsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSettingsMethod t Settings, O.OverloadedMethod info Settings p) => OL.IsLabel t (Settings -> 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 ~ ResolveSettingsMethod t Settings, O.OverloadedMethod info Settings p, R.HasField t Settings p) => R.HasField t Settings p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSettingsMethod t Settings, O.OverloadedMethodInfo info Settings) => OL.IsLabel t (O.MethodProxy info Settings) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type SettingsChangeEventCallback =
Maybe [Word32]
-> IO Bool
type C_SettingsChangeEventCallback =
Ptr Settings ->
Ptr Word32 ->
Int32 ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_SettingsChangeEventCallback :: C_SettingsChangeEventCallback -> IO (FunPtr C_SettingsChangeEventCallback)
wrap_SettingsChangeEventCallback ::
GObject a => (a -> SettingsChangeEventCallback) ->
C_SettingsChangeEventCallback
wrap_SettingsChangeEventCallback :: forall a.
GObject a =>
(a -> SettingsChangeEventCallback) -> C_SettingsChangeEventCallback
wrap_SettingsChangeEventCallback a -> SettingsChangeEventCallback
gi'cb Ptr Settings
gi'selfPtr Ptr Word32
keys Int32
nKeys Ptr ()
_ = do
maybeKeys <-
if Ptr Word32
keys Ptr Word32 -> Ptr Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Word32
forall a. Ptr a
FP.nullPtr
then Maybe [Word32] -> IO (Maybe [Word32])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Word32]
forall a. Maybe a
Nothing
else do
keys' <- (Int32 -> Ptr Word32 -> IO [Word32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Int32
nKeys) Ptr Word32
keys
return $ Just keys'
result <- B.ManagedPtr.withNewObject gi'selfPtr $ \Settings
gi'self -> a -> SettingsChangeEventCallback
gi'cb (Settings -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Settings
gi'self) Maybe [Word32]
maybeKeys
let result' = (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
result
return result'
onSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsChangeEventCallback) -> m SignalHandlerId
onSettingsChangeEvent :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> ((?self::a) => SettingsChangeEventCallback) -> m SignalHandlerId
onSettingsChangeEvent a
obj (?self::a) => SettingsChangeEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsChangeEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsChangeEventCallback
SettingsChangeEventCallback
cb
let wrapped' :: C_SettingsChangeEventCallback
wrapped' = (a -> SettingsChangeEventCallback) -> C_SettingsChangeEventCallback
forall a.
GObject a =>
(a -> SettingsChangeEventCallback) -> C_SettingsChangeEventCallback
wrap_SettingsChangeEventCallback a -> SettingsChangeEventCallback
wrapped
wrapped'' <- C_SettingsChangeEventCallback
-> IO (FunPtr C_SettingsChangeEventCallback)
mk_SettingsChangeEventCallback C_SettingsChangeEventCallback
wrapped'
connectSignalFunPtr obj "change-event" wrapped'' SignalConnectBefore Nothing
afterSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsChangeEventCallback) -> m SignalHandlerId
afterSettingsChangeEvent :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> ((?self::a) => SettingsChangeEventCallback) -> m SignalHandlerId
afterSettingsChangeEvent a
obj (?self::a) => SettingsChangeEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsChangeEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsChangeEventCallback
SettingsChangeEventCallback
cb
let wrapped' :: C_SettingsChangeEventCallback
wrapped' = (a -> SettingsChangeEventCallback) -> C_SettingsChangeEventCallback
forall a.
GObject a =>
(a -> SettingsChangeEventCallback) -> C_SettingsChangeEventCallback
wrap_SettingsChangeEventCallback a -> SettingsChangeEventCallback
wrapped
wrapped'' <- C_SettingsChangeEventCallback
-> IO (FunPtr C_SettingsChangeEventCallback)
mk_SettingsChangeEventCallback C_SettingsChangeEventCallback
wrapped'
connectSignalFunPtr obj "change-event" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data SettingsChangeEventSignalInfo
instance SignalInfo SettingsChangeEventSignalInfo where
type HaskellCallbackType SettingsChangeEventSignalInfo = SettingsChangeEventCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SettingsChangeEventCallback cb
cb'' <- mk_SettingsChangeEventCallback cb'
connectSignalFunPtr obj "change-event" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings::change-event"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:signal:changeEvent"})
#endif
type SettingsChangedCallback =
T.Text
-> IO ()
type C_SettingsChangedCallback =
Ptr Settings ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SettingsChangedCallback :: C_SettingsChangedCallback -> IO (FunPtr C_SettingsChangedCallback)
wrap_SettingsChangedCallback ::
GObject a => (a -> SettingsChangedCallback) ->
C_SettingsChangedCallback
wrap_SettingsChangedCallback :: forall a.
GObject a =>
(a -> SettingsChangedCallback) -> C_SettingsChangedCallback
wrap_SettingsChangedCallback a -> SettingsChangedCallback
gi'cb Ptr Settings
gi'selfPtr CString
key Ptr ()
_ = do
key' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
key
B.ManagedPtr.withNewObject gi'selfPtr $ \Settings
gi'self -> a -> SettingsChangedCallback
gi'cb (Settings -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Settings
gi'self) Text
key'
onSettingsChanged :: (IsSettings a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => SettingsChangedCallback) -> m SignalHandlerId
onSettingsChanged :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => SettingsChangedCallback)
-> m SignalHandlerId
onSettingsChanged a
obj Maybe Text
detail (?self::a) => SettingsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsChangedCallback
SettingsChangedCallback
cb
let wrapped' :: C_SettingsChangedCallback
wrapped' = (a -> SettingsChangedCallback) -> C_SettingsChangedCallback
forall a.
GObject a =>
(a -> SettingsChangedCallback) -> C_SettingsChangedCallback
wrap_SettingsChangedCallback a -> SettingsChangedCallback
wrapped
wrapped'' <- C_SettingsChangedCallback -> IO (FunPtr C_SettingsChangedCallback)
mk_SettingsChangedCallback C_SettingsChangedCallback
wrapped'
connectSignalFunPtr obj "changed" wrapped'' SignalConnectBefore detail
afterSettingsChanged :: (IsSettings a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => SettingsChangedCallback) -> m SignalHandlerId
afterSettingsChanged :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => SettingsChangedCallback)
-> m SignalHandlerId
afterSettingsChanged a
obj Maybe Text
detail (?self::a) => SettingsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsChangedCallback
SettingsChangedCallback
cb
let wrapped' :: C_SettingsChangedCallback
wrapped' = (a -> SettingsChangedCallback) -> C_SettingsChangedCallback
forall a.
GObject a =>
(a -> SettingsChangedCallback) -> C_SettingsChangedCallback
wrap_SettingsChangedCallback a -> SettingsChangedCallback
wrapped
wrapped'' <- C_SettingsChangedCallback -> IO (FunPtr C_SettingsChangedCallback)
mk_SettingsChangedCallback C_SettingsChangedCallback
wrapped'
connectSignalFunPtr obj "changed" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data SettingsChangedSignalInfo
instance SignalInfo SettingsChangedSignalInfo where
type HaskellCallbackType SettingsChangedSignalInfo = SettingsChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SettingsChangedCallback cb
cb'' <- mk_SettingsChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings::changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:signal:changed"})
#endif
type SettingsWritableChangeEventCallback =
Word32
-> IO Bool
type C_SettingsWritableChangeEventCallback =
Ptr Settings ->
Word32 ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_SettingsWritableChangeEventCallback :: C_SettingsWritableChangeEventCallback -> IO (FunPtr C_SettingsWritableChangeEventCallback)
wrap_SettingsWritableChangeEventCallback ::
GObject a => (a -> SettingsWritableChangeEventCallback) ->
C_SettingsWritableChangeEventCallback
wrap_SettingsWritableChangeEventCallback :: forall a.
GObject a =>
(a -> SettingsWritableChangeEventCallback)
-> C_SettingsWritableChangeEventCallback
wrap_SettingsWritableChangeEventCallback a -> SettingsWritableChangeEventCallback
gi'cb Ptr Settings
gi'selfPtr Word32
key Ptr ()
_ = do
result <- Ptr Settings -> (Settings -> IO Bool) -> IO Bool
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Settings
gi'selfPtr ((Settings -> IO Bool) -> IO Bool)
-> (Settings -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Settings
gi'self -> a -> SettingsWritableChangeEventCallback
gi'cb (Settings -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Settings
gi'self) Word32
key
let result' = (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
result
return result'
onSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsWritableChangeEventCallback) -> m SignalHandlerId
onSettingsWritableChangeEvent :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> ((?self::a) => SettingsWritableChangeEventCallback)
-> m SignalHandlerId
onSettingsWritableChangeEvent a
obj (?self::a) => SettingsWritableChangeEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsWritableChangeEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsWritableChangeEventCallback
SettingsWritableChangeEventCallback
cb
let wrapped' :: C_SettingsWritableChangeEventCallback
wrapped' = (a -> SettingsWritableChangeEventCallback)
-> C_SettingsWritableChangeEventCallback
forall a.
GObject a =>
(a -> SettingsWritableChangeEventCallback)
-> C_SettingsWritableChangeEventCallback
wrap_SettingsWritableChangeEventCallback a -> SettingsWritableChangeEventCallback
wrapped
wrapped'' <- C_SettingsWritableChangeEventCallback
-> IO (FunPtr C_SettingsWritableChangeEventCallback)
mk_SettingsWritableChangeEventCallback C_SettingsWritableChangeEventCallback
wrapped'
connectSignalFunPtr obj "writable-change-event" wrapped'' SignalConnectBefore Nothing
afterSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsWritableChangeEventCallback) -> m SignalHandlerId
afterSettingsWritableChangeEvent :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> ((?self::a) => SettingsWritableChangeEventCallback)
-> m SignalHandlerId
afterSettingsWritableChangeEvent a
obj (?self::a) => SettingsWritableChangeEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsWritableChangeEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsWritableChangeEventCallback
SettingsWritableChangeEventCallback
cb
let wrapped' :: C_SettingsWritableChangeEventCallback
wrapped' = (a -> SettingsWritableChangeEventCallback)
-> C_SettingsWritableChangeEventCallback
forall a.
GObject a =>
(a -> SettingsWritableChangeEventCallback)
-> C_SettingsWritableChangeEventCallback
wrap_SettingsWritableChangeEventCallback a -> SettingsWritableChangeEventCallback
wrapped
wrapped'' <- C_SettingsWritableChangeEventCallback
-> IO (FunPtr C_SettingsWritableChangeEventCallback)
mk_SettingsWritableChangeEventCallback C_SettingsWritableChangeEventCallback
wrapped'
connectSignalFunPtr obj "writable-change-event" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data SettingsWritableChangeEventSignalInfo
instance SignalInfo SettingsWritableChangeEventSignalInfo where
type HaskellCallbackType SettingsWritableChangeEventSignalInfo = SettingsWritableChangeEventCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SettingsWritableChangeEventCallback cb
cb'' <- mk_SettingsWritableChangeEventCallback cb'
connectSignalFunPtr obj "writable-change-event" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings::writable-change-event"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:signal:writableChangeEvent"})
#endif
type SettingsWritableChangedCallback =
T.Text
-> IO ()
type C_SettingsWritableChangedCallback =
Ptr Settings ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SettingsWritableChangedCallback :: C_SettingsWritableChangedCallback -> IO (FunPtr C_SettingsWritableChangedCallback)
wrap_SettingsWritableChangedCallback ::
GObject a => (a -> SettingsWritableChangedCallback) ->
C_SettingsWritableChangedCallback
wrap_SettingsWritableChangedCallback :: forall a.
GObject a =>
(a -> SettingsChangedCallback) -> C_SettingsChangedCallback
wrap_SettingsWritableChangedCallback a -> SettingsChangedCallback
gi'cb Ptr Settings
gi'selfPtr CString
key Ptr ()
_ = do
key' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
key
B.ManagedPtr.withNewObject gi'selfPtr $ \Settings
gi'self -> a -> SettingsChangedCallback
gi'cb (Settings -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Settings
gi'self) Text
key'
onSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => SettingsWritableChangedCallback) -> m SignalHandlerId
onSettingsWritableChanged :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => SettingsChangedCallback)
-> m SignalHandlerId
onSettingsWritableChanged a
obj Maybe Text
detail (?self::a) => SettingsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsChangedCallback
SettingsChangedCallback
cb
let wrapped' :: C_SettingsChangedCallback
wrapped' = (a -> SettingsChangedCallback) -> C_SettingsChangedCallback
forall a.
GObject a =>
(a -> SettingsChangedCallback) -> C_SettingsChangedCallback
wrap_SettingsWritableChangedCallback a -> SettingsChangedCallback
wrapped
wrapped'' <- C_SettingsChangedCallback -> IO (FunPtr C_SettingsChangedCallback)
mk_SettingsWritableChangedCallback C_SettingsChangedCallback
wrapped'
connectSignalFunPtr obj "writable-changed" wrapped'' SignalConnectBefore detail
afterSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => SettingsWritableChangedCallback) -> m SignalHandlerId
afterSettingsWritableChanged :: forall a (m :: * -> *).
(IsSettings a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => SettingsChangedCallback)
-> m SignalHandlerId
afterSettingsWritableChanged a
obj Maybe Text
detail (?self::a) => SettingsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> SettingsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SettingsChangedCallback
SettingsChangedCallback
cb
let wrapped' :: C_SettingsChangedCallback
wrapped' = (a -> SettingsChangedCallback) -> C_SettingsChangedCallback
forall a.
GObject a =>
(a -> SettingsChangedCallback) -> C_SettingsChangedCallback
wrap_SettingsWritableChangedCallback a -> SettingsChangedCallback
wrapped
wrapped'' <- C_SettingsChangedCallback -> IO (FunPtr C_SettingsChangedCallback)
mk_SettingsWritableChangedCallback C_SettingsChangedCallback
wrapped'
connectSignalFunPtr obj "writable-changed" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data SettingsWritableChangedSignalInfo
instance SignalInfo SettingsWritableChangedSignalInfo where
type HaskellCallbackType SettingsWritableChangedSignalInfo = SettingsWritableChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SettingsWritableChangedCallback cb
cb'' <- mk_SettingsWritableChangedCallback cb'
connectSignalFunPtr obj "writable-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings::writable-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:signal:writableChanged"})
#endif
getSettingsBackend :: (MonadIO m, IsSettings o) => o -> m (Maybe Gio.SettingsBackend.SettingsBackend)
getSettingsBackend :: forall (m :: * -> *) o.
(MonadIO m, IsSettings o) =>
o -> m (Maybe SettingsBackend)
getSettingsBackend o
obj = IO (Maybe SettingsBackend) -> m (Maybe SettingsBackend)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe SettingsBackend) -> m (Maybe SettingsBackend))
-> IO (Maybe SettingsBackend) -> m (Maybe SettingsBackend)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr SettingsBackend -> SettingsBackend)
-> IO (Maybe SettingsBackend)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"backend" ManagedPtr SettingsBackend -> SettingsBackend
Gio.SettingsBackend.SettingsBackend
constructSettingsBackend :: (IsSettings o, MIO.MonadIO m, Gio.SettingsBackend.IsSettingsBackend a) => a -> m (GValueConstruct o)
constructSettingsBackend :: forall o (m :: * -> *) a.
(IsSettings o, MonadIO m, IsSettingsBackend a) =>
a -> m (GValueConstruct o)
constructSettingsBackend a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"backend" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data SettingsBackendPropertyInfo
instance AttrInfo SettingsBackendPropertyInfo where
type AttrAllowedOps SettingsBackendPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SettingsBackendPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsBackendPropertyInfo = Gio.SettingsBackend.IsSettingsBackend
type AttrTransferTypeConstraint SettingsBackendPropertyInfo = Gio.SettingsBackend.IsSettingsBackend
type AttrTransferType SettingsBackendPropertyInfo = Gio.SettingsBackend.SettingsBackend
type AttrGetType SettingsBackendPropertyInfo = (Maybe Gio.SettingsBackend.SettingsBackend)
type AttrLabel SettingsBackendPropertyInfo = "backend"
type AttrOrigin SettingsBackendPropertyInfo = Settings
attrGet = getSettingsBackend
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.SettingsBackend.SettingsBackend v
attrConstruct = constructSettingsBackend
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.backend"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:backend"
})
#endif
getSettingsDelayApply :: (MonadIO m, IsSettings o) => o -> m Bool
getSettingsDelayApply :: forall (m :: * -> *) o. (MonadIO m, IsSettings o) => o -> m Bool
getSettingsDelayApply o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"delay-apply"
#if defined(ENABLE_OVERLOADING)
data SettingsDelayApplyPropertyInfo
instance AttrInfo SettingsDelayApplyPropertyInfo where
type AttrAllowedOps SettingsDelayApplyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint SettingsDelayApplyPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsDelayApplyPropertyInfo = (~) ()
type AttrTransferTypeConstraint SettingsDelayApplyPropertyInfo = (~) ()
type AttrTransferType SettingsDelayApplyPropertyInfo = ()
type AttrGetType SettingsDelayApplyPropertyInfo = Bool
type AttrLabel SettingsDelayApplyPropertyInfo = "delay-apply"
type AttrOrigin SettingsDelayApplyPropertyInfo = Settings
attrGet = getSettingsDelayApply
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.delayApply"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:delayApply"
})
#endif
getSettingsHasUnapplied :: (MonadIO m, IsSettings o) => o -> m Bool
getSettingsHasUnapplied :: forall (m :: * -> *) o. (MonadIO m, IsSettings o) => o -> m Bool
getSettingsHasUnapplied o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"has-unapplied"
#if defined(ENABLE_OVERLOADING)
data SettingsHasUnappliedPropertyInfo
instance AttrInfo SettingsHasUnappliedPropertyInfo where
type AttrAllowedOps SettingsHasUnappliedPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint SettingsHasUnappliedPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsHasUnappliedPropertyInfo = (~) ()
type AttrTransferTypeConstraint SettingsHasUnappliedPropertyInfo = (~) ()
type AttrTransferType SettingsHasUnappliedPropertyInfo = ()
type AttrGetType SettingsHasUnappliedPropertyInfo = Bool
type AttrLabel SettingsHasUnappliedPropertyInfo = "has-unapplied"
type AttrOrigin SettingsHasUnappliedPropertyInfo = Settings
attrGet = getSettingsHasUnapplied
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.hasUnapplied"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:hasUnapplied"
})
#endif
getSettingsPath :: (MonadIO m, IsSettings o) => o -> m (Maybe T.Text)
getSettingsPath :: forall (m :: * -> *) o.
(MonadIO m, IsSettings o) =>
o -> m (Maybe Text)
getSettingsPath o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"path"
constructSettingsPath :: (IsSettings o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructSettingsPath :: forall o (m :: * -> *).
(IsSettings o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructSettingsPath Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"path" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data SettingsPathPropertyInfo
instance AttrInfo SettingsPathPropertyInfo where
type AttrAllowedOps SettingsPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SettingsPathPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsPathPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint SettingsPathPropertyInfo = (~) T.Text
type AttrTransferType SettingsPathPropertyInfo = T.Text
type AttrGetType SettingsPathPropertyInfo = (Maybe T.Text)
type AttrLabel SettingsPathPropertyInfo = "path"
type AttrOrigin SettingsPathPropertyInfo = Settings
attrGet = getSettingsPath
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSettingsPath
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.path"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:path"
})
#endif
getSettingsSchema :: (MonadIO m, IsSettings o) => o -> m (Maybe T.Text)
getSettingsSchema :: forall (m :: * -> *) o.
(MonadIO m, IsSettings o) =>
o -> m (Maybe Text)
getSettingsSchema o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"schema"
constructSettingsSchema :: (IsSettings o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructSettingsSchema :: forall o (m :: * -> *).
(IsSettings o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructSettingsSchema Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"schema" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data SettingsSchemaPropertyInfo
instance AttrInfo SettingsSchemaPropertyInfo where
type AttrAllowedOps SettingsSchemaPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SettingsSchemaPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsSchemaPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint SettingsSchemaPropertyInfo = (~) T.Text
type AttrTransferType SettingsSchemaPropertyInfo = T.Text
type AttrGetType SettingsSchemaPropertyInfo = (Maybe T.Text)
type AttrLabel SettingsSchemaPropertyInfo = "schema"
type AttrOrigin SettingsSchemaPropertyInfo = Settings
attrGet = getSettingsSchema
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSettingsSchema
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.schema"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:schema"
})
#endif
getSettingsSchemaId :: (MonadIO m, IsSettings o) => o -> m (Maybe T.Text)
getSettingsSchemaId :: forall (m :: * -> *) o.
(MonadIO m, IsSettings o) =>
o -> m (Maybe Text)
getSettingsSchemaId o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"schema-id"
constructSettingsSchemaId :: (IsSettings o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructSettingsSchemaId :: forall o (m :: * -> *).
(IsSettings o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructSettingsSchemaId Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"schema-id" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data SettingsSchemaIdPropertyInfo
instance AttrInfo SettingsSchemaIdPropertyInfo where
type AttrAllowedOps SettingsSchemaIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SettingsSchemaIdPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsSchemaIdPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint SettingsSchemaIdPropertyInfo = (~) T.Text
type AttrTransferType SettingsSchemaIdPropertyInfo = T.Text
type AttrGetType SettingsSchemaIdPropertyInfo = (Maybe T.Text)
type AttrLabel SettingsSchemaIdPropertyInfo = "schema-id"
type AttrOrigin SettingsSchemaIdPropertyInfo = Settings
attrGet = getSettingsSchemaId
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSettingsSchemaId
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.schemaId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:schemaId"
})
#endif
getSettingsSettingsSchema :: (MonadIO m, IsSettings o) => o -> m (Maybe Gio.SettingsSchema.SettingsSchema)
getSettingsSettingsSchema :: forall (m :: * -> *) o.
(MonadIO m, IsSettings o) =>
o -> m (Maybe SettingsSchema)
getSettingsSettingsSchema o
obj = IO (Maybe SettingsSchema) -> m (Maybe SettingsSchema)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe SettingsSchema) -> m (Maybe SettingsSchema))
-> IO (Maybe SettingsSchema) -> m (Maybe SettingsSchema)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr SettingsSchema -> SettingsSchema)
-> IO (Maybe SettingsSchema)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"settings-schema" ManagedPtr SettingsSchema -> SettingsSchema
Gio.SettingsSchema.SettingsSchema
constructSettingsSettingsSchema :: (IsSettings o, MIO.MonadIO m) => Gio.SettingsSchema.SettingsSchema -> m (GValueConstruct o)
constructSettingsSettingsSchema :: forall o (m :: * -> *).
(IsSettings o, MonadIO m) =>
SettingsSchema -> m (GValueConstruct o)
constructSettingsSettingsSchema SettingsSchema
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe SettingsSchema -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"settings-schema" (SettingsSchema -> Maybe SettingsSchema
forall a. a -> Maybe a
P.Just SettingsSchema
val)
#if defined(ENABLE_OVERLOADING)
data SettingsSettingsSchemaPropertyInfo
instance AttrInfo SettingsSettingsSchemaPropertyInfo where
type AttrAllowedOps SettingsSettingsSchemaPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SettingsSettingsSchemaPropertyInfo = IsSettings
type AttrSetTypeConstraint SettingsSettingsSchemaPropertyInfo = (~) Gio.SettingsSchema.SettingsSchema
type AttrTransferTypeConstraint SettingsSettingsSchemaPropertyInfo = (~) Gio.SettingsSchema.SettingsSchema
type AttrTransferType SettingsSettingsSchemaPropertyInfo = Gio.SettingsSchema.SettingsSchema
type AttrGetType SettingsSettingsSchemaPropertyInfo = (Maybe Gio.SettingsSchema.SettingsSchema)
type AttrLabel SettingsSettingsSchemaPropertyInfo = "settings-schema"
type AttrOrigin SettingsSettingsSchemaPropertyInfo = Settings
attrGet = getSettingsSettingsSchema
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSettingsSettingsSchema
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSchema"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#g:attr:settingsSchema"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Settings
type instance O.AttributeList Settings = SettingsAttributeList
type SettingsAttributeList = ('[ '("backend", SettingsBackendPropertyInfo), '("delayApply", SettingsDelayApplyPropertyInfo), '("hasUnapplied", SettingsHasUnappliedPropertyInfo), '("path", SettingsPathPropertyInfo), '("schema", SettingsSchemaPropertyInfo), '("schemaId", SettingsSchemaIdPropertyInfo), '("settingsSchema", SettingsSettingsSchemaPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
settingsBackend :: AttrLabelProxy "backend"
settingsBackend = AttrLabelProxy
settingsDelayApply :: AttrLabelProxy "delayApply"
settingsDelayApply = AttrLabelProxy
settingsHasUnapplied :: AttrLabelProxy "hasUnapplied"
settingsHasUnapplied = AttrLabelProxy
settingsPath :: AttrLabelProxy "path"
settingsPath = AttrLabelProxy
settingsSchema :: AttrLabelProxy "schema"
settingsSchema = AttrLabelProxy
settingsSchemaId :: AttrLabelProxy "schemaId"
settingsSchemaId = AttrLabelProxy
settingsSettingsSchema :: AttrLabelProxy "settingsSchema"
settingsSettingsSchema = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Settings = SettingsSignalList
type SettingsSignalList = ('[ '("changeEvent", SettingsChangeEventSignalInfo), '("changed", SettingsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("writableChangeEvent", SettingsWritableChangeEventSignalInfo), '("writableChanged", SettingsWritableChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_settings_new" g_settings_new ::
CString ->
IO (Ptr Settings)
settingsNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Settings
settingsNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m Settings
settingsNew Text
schemaId = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
schemaId' <- Text -> IO CString
textToCString Text
schemaId
result <- g_settings_new schemaId'
checkUnexpectedReturnNULL "settingsNew" result
result' <- (wrapObject Settings) result
freeMem schemaId'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_new_full" g_settings_new_full ::
Ptr Gio.SettingsSchema.SettingsSchema ->
Ptr Gio.SettingsBackend.SettingsBackend ->
CString ->
IO (Ptr Settings)
settingsNewFull ::
(B.CallStack.HasCallStack, MonadIO m, Gio.SettingsBackend.IsSettingsBackend a) =>
Gio.SettingsSchema.SettingsSchema
-> Maybe (a)
-> Maybe (T.Text)
-> m Settings
settingsNewFull :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingsBackend a) =>
SettingsSchema -> Maybe a -> Maybe Text -> m Settings
settingsNewFull SettingsSchema
schema Maybe a
backend Maybe Text
path = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
schema' <- SettingsSchema -> IO (Ptr SettingsSchema)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SettingsSchema
schema
maybeBackend <- case backend of
Maybe a
Nothing -> Ptr SettingsBackend -> IO (Ptr SettingsBackend)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SettingsBackend
forall a. Ptr a
FP.nullPtr
Just a
jBackend -> do
jBackend' <- a -> IO (Ptr SettingsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jBackend
return jBackend'
maybePath <- case path 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
FP.nullPtr
Just Text
jPath -> do
jPath' <- Text -> IO CString
textToCString Text
jPath
return jPath'
result <- g_settings_new_full schema' maybeBackend maybePath
checkUnexpectedReturnNULL "settingsNewFull" result
result' <- (wrapObject Settings) result
touchManagedPtr schema
whenJust backend touchManagedPtr
freeMem maybePath
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_new_with_backend" g_settings_new_with_backend ::
CString ->
Ptr Gio.SettingsBackend.SettingsBackend ->
IO (Ptr Settings)
settingsNewWithBackend ::
(B.CallStack.HasCallStack, MonadIO m, Gio.SettingsBackend.IsSettingsBackend a) =>
T.Text
-> a
-> m Settings
settingsNewWithBackend :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingsBackend a) =>
Text -> a -> m Settings
settingsNewWithBackend Text
schemaId a
backend = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
schemaId' <- Text -> IO CString
textToCString Text
schemaId
backend' <- unsafeManagedPtrCastPtr backend
result <- g_settings_new_with_backend schemaId' backend'
checkUnexpectedReturnNULL "settingsNewWithBackend" result
result' <- (wrapObject Settings) result
touchManagedPtr backend
freeMem schemaId'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_new_with_backend_and_path" g_settings_new_with_backend_and_path ::
CString ->
Ptr Gio.SettingsBackend.SettingsBackend ->
CString ->
IO (Ptr Settings)
settingsNewWithBackendAndPath ::
(B.CallStack.HasCallStack, MonadIO m, Gio.SettingsBackend.IsSettingsBackend a) =>
T.Text
-> a
-> T.Text
-> m Settings
settingsNewWithBackendAndPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingsBackend a) =>
Text -> a -> Text -> m Settings
settingsNewWithBackendAndPath Text
schemaId a
backend Text
path = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
schemaId' <- Text -> IO CString
textToCString Text
schemaId
backend' <- unsafeManagedPtrCastPtr backend
path' <- textToCString path
result <- g_settings_new_with_backend_and_path schemaId' backend' path'
checkUnexpectedReturnNULL "settingsNewWithBackendAndPath" result
result' <- (wrapObject Settings) result
touchManagedPtr backend
freeMem schemaId'
freeMem path'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_new_with_path" g_settings_new_with_path ::
CString ->
CString ->
IO (Ptr Settings)
settingsNewWithPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> T.Text
-> m Settings
settingsNewWithPath :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Text -> m Settings
settingsNewWithPath Text
schemaId Text
path = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
schemaId' <- Text -> IO CString
textToCString Text
schemaId
path' <- textToCString path
result <- g_settings_new_with_path schemaId' path'
checkUnexpectedReturnNULL "settingsNewWithPath" result
result' <- (wrapObject Settings) result
freeMem schemaId'
freeMem path'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_apply" g_settings_apply ::
Ptr Settings ->
IO ()
settingsApply ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> m ()
settingsApply :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m ()
settingsApply a
settings = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
g_settings_apply settings'
touchManagedPtr settings
return ()
#if defined(ENABLE_OVERLOADING)
data SettingsApplyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsApplyMethodInfo a signature where
overloadedMethod = settingsApply
instance O.OverloadedMethodInfo SettingsApplyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsApply",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsApply"
})
#endif
foreign import ccall "g_settings_bind" g_settings_bind ::
Ptr Settings ->
CString ->
Ptr GObject.Object.Object ->
CString ->
CUInt ->
IO ()
settingsBind ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a, GObject.Object.IsObject b) =>
a
-> T.Text
-> b
-> T.Text
-> [Gio.Flags.SettingsBindFlags]
-> m ()
settingsBind :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSettings a, IsObject b) =>
a -> Text -> b -> Text -> [SettingsBindFlags] -> m ()
settingsBind a
settings Text
key b
object Text
property [SettingsBindFlags]
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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
object' <- unsafeManagedPtrCastPtr object
property' <- textToCString property
let flags' = [SettingsBindFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SettingsBindFlags]
flags
g_settings_bind settings' key' object' property' flags'
touchManagedPtr settings
touchManagedPtr object
freeMem key'
freeMem property'
return ()
#if defined(ENABLE_OVERLOADING)
data SettingsBindMethodInfo
instance (signature ~ (T.Text -> b -> T.Text -> [Gio.Flags.SettingsBindFlags] -> m ()), MonadIO m, IsSettings a, GObject.Object.IsObject b) => O.OverloadedMethod SettingsBindMethodInfo a signature where
overloadedMethod = settingsBind
instance O.OverloadedMethodInfo SettingsBindMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsBind",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsBind"
})
#endif
foreign import ccall "g_settings_bind_writable" g_settings_bind_writable ::
Ptr Settings ->
CString ->
Ptr GObject.Object.Object ->
CString ->
CInt ->
IO ()
settingsBindWritable ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a, GObject.Object.IsObject b) =>
a
-> T.Text
-> b
-> T.Text
-> Bool
-> m ()
settingsBindWritable :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSettings a, IsObject b) =>
a -> Text -> b -> Text -> Bool -> m ()
settingsBindWritable a
settings Text
key b
object Text
property Bool
inverted = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
object' <- unsafeManagedPtrCastPtr object
property' <- textToCString property
let inverted' = (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
inverted
g_settings_bind_writable settings' key' object' property' inverted'
touchManagedPtr settings
touchManagedPtr object
freeMem key'
freeMem property'
return ()
#if defined(ENABLE_OVERLOADING)
data SettingsBindWritableMethodInfo
instance (signature ~ (T.Text -> b -> T.Text -> Bool -> m ()), MonadIO m, IsSettings a, GObject.Object.IsObject b) => O.OverloadedMethod SettingsBindWritableMethodInfo a signature where
overloadedMethod = settingsBindWritable
instance O.OverloadedMethodInfo SettingsBindWritableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsBindWritable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsBindWritable"
})
#endif
foreign import ccall "g_settings_create_action" g_settings_create_action ::
Ptr Settings ->
CString ->
IO (Ptr Gio.Action.Action)
settingsCreateAction ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Gio.Action.Action
settingsCreateAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Action
settingsCreateAction a
settings Text
key = IO Action -> m Action
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Action -> m Action) -> IO Action -> m Action
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_create_action settings' key'
checkUnexpectedReturnNULL "settingsCreateAction" result
result' <- (wrapObject Gio.Action.Action) result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsCreateActionMethodInfo
instance (signature ~ (T.Text -> m Gio.Action.Action), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsCreateActionMethodInfo a signature where
overloadedMethod = settingsCreateAction
instance O.OverloadedMethodInfo SettingsCreateActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsCreateAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsCreateAction"
})
#endif
foreign import ccall "g_settings_delay" g_settings_delay ::
Ptr Settings ->
IO ()
settingsDelay ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> m ()
settingsDelay :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m ()
settingsDelay a
settings = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
g_settings_delay settings'
touchManagedPtr settings
return ()
#if defined(ENABLE_OVERLOADING)
data SettingsDelayMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsDelayMethodInfo a signature where
overloadedMethod = settingsDelay
instance O.OverloadedMethodInfo SettingsDelayMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsDelay",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsDelay"
})
#endif
foreign import ccall "g_settings_get_boolean" g_settings_get_boolean ::
Ptr Settings ->
CString ->
IO CInt
settingsGetBoolean ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Bool
settingsGetBoolean :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Bool
settingsGetBoolean a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_boolean settings' key'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetBooleanMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetBooleanMethodInfo a signature where
overloadedMethod = settingsGetBoolean
instance O.OverloadedMethodInfo SettingsGetBooleanMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetBoolean",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetBoolean"
})
#endif
foreign import ccall "g_settings_get_child" g_settings_get_child ::
Ptr Settings ->
CString ->
IO (Ptr Settings)
settingsGetChild ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Settings
settingsGetChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Settings
settingsGetChild a
settings Text
name = IO Settings -> m Settings
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
name' <- textToCString name
result <- g_settings_get_child settings' name'
checkUnexpectedReturnNULL "settingsGetChild" result
result' <- (wrapObject Settings) result
touchManagedPtr settings
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetChildMethodInfo
instance (signature ~ (T.Text -> m Settings), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetChildMethodInfo a signature where
overloadedMethod = settingsGetChild
instance O.OverloadedMethodInfo SettingsGetChildMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetChild",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetChild"
})
#endif
foreign import ccall "g_settings_get_default_value" g_settings_get_default_value ::
Ptr Settings ->
CString ->
IO (Ptr GVariant)
settingsGetDefaultValue ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m (Maybe GVariant)
settingsGetDefaultValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m (Maybe GVariant)
settingsGetDefaultValue a
settings Text
key = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_default_value settings' key'
maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
return result''
touchManagedPtr settings
freeMem key'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data SettingsGetDefaultValueMethodInfo
instance (signature ~ (T.Text -> m (Maybe GVariant)), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetDefaultValueMethodInfo a signature where
overloadedMethod = settingsGetDefaultValue
instance O.OverloadedMethodInfo SettingsGetDefaultValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetDefaultValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetDefaultValue"
})
#endif
foreign import ccall "g_settings_get_double" g_settings_get_double ::
Ptr Settings ->
CString ->
IO CDouble
settingsGetDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Double
settingsGetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Double
settingsGetDouble a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_double settings' key'
let result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetDoubleMethodInfo
instance (signature ~ (T.Text -> m Double), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetDoubleMethodInfo a signature where
overloadedMethod = settingsGetDouble
instance O.OverloadedMethodInfo SettingsGetDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetDouble"
})
#endif
foreign import ccall "g_settings_get_enum" g_settings_get_enum ::
Ptr Settings ->
CString ->
IO Int32
settingsGetEnum ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Int32
settingsGetEnum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Int32
settingsGetEnum a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_enum settings' key'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetEnumMethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetEnumMethodInfo a signature where
overloadedMethod = settingsGetEnum
instance O.OverloadedMethodInfo SettingsGetEnumMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetEnum",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetEnum"
})
#endif
foreign import ccall "g_settings_get_flags" g_settings_get_flags ::
Ptr Settings ->
CString ->
IO Word32
settingsGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Word32
settingsGetFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Word32
settingsGetFlags a
settings Text
key = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_flags settings' key'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetFlagsMethodInfo
instance (signature ~ (T.Text -> m Word32), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetFlagsMethodInfo a signature where
overloadedMethod = settingsGetFlags
instance O.OverloadedMethodInfo SettingsGetFlagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetFlags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetFlags"
})
#endif
foreign import ccall "g_settings_get_has_unapplied" g_settings_get_has_unapplied ::
Ptr Settings ->
IO CInt
settingsGetHasUnapplied ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> m Bool
settingsGetHasUnapplied :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m Bool
settingsGetHasUnapplied a
settings = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
result <- g_settings_get_has_unapplied settings'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetHasUnappliedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetHasUnappliedMethodInfo a signature where
overloadedMethod = settingsGetHasUnapplied
instance O.OverloadedMethodInfo SettingsGetHasUnappliedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetHasUnapplied",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetHasUnapplied"
})
#endif
foreign import ccall "g_settings_get_int" g_settings_get_int ::
Ptr Settings ->
CString ->
IO Int32
settingsGetInt ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Int32
settingsGetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Int32
settingsGetInt a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_int settings' key'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetIntMethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetIntMethodInfo a signature where
overloadedMethod = settingsGetInt
instance O.OverloadedMethodInfo SettingsGetIntMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetInt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetInt"
})
#endif
foreign import ccall "g_settings_get_int64" g_settings_get_int64 ::
Ptr Settings ->
CString ->
IO Int64
settingsGetInt64 ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Int64
settingsGetInt64 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Int64
settingsGetInt64 a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_int64 settings' key'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetInt64MethodInfo
instance (signature ~ (T.Text -> m Int64), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetInt64MethodInfo a signature where
overloadedMethod = settingsGetInt64
instance O.OverloadedMethodInfo SettingsGetInt64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetInt64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetInt64"
})
#endif
foreign import ccall "g_settings_get_mapped" g_settings_get_mapped ::
Ptr Settings ->
CString ->
FunPtr Gio.Callbacks.C_SettingsGetMapping ->
Ptr () ->
IO (Ptr ())
settingsGetMapped ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Gio.Callbacks.SettingsGetMapping
-> m (Ptr ())
settingsGetMapped :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> SettingsGetMapping -> m (Ptr ())
settingsGetMapped a
settings Text
key SettingsGetMapping
mapping = IO (Ptr ()) -> m (Ptr ())
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
mapping' <- Gio.Callbacks.mk_SettingsGetMapping (Gio.Callbacks.wrap_SettingsGetMapping Nothing (Gio.Callbacks.drop_closures_SettingsGetMapping mapping))
let userData = Ptr a
forall a. Ptr a
nullPtr
result <- g_settings_get_mapped settings' key' mapping' userData
safeFreeFunPtr $ castFunPtrToPtr mapping'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetMappedMethodInfo
instance (signature ~ (T.Text -> Gio.Callbacks.SettingsGetMapping -> m (Ptr ())), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetMappedMethodInfo a signature where
overloadedMethod = settingsGetMapped
instance O.OverloadedMethodInfo SettingsGetMappedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetMapped",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetMapped"
})
#endif
foreign import ccall "g_settings_get_range" g_settings_get_range ::
Ptr Settings ->
CString ->
IO (Ptr GVariant)
{-# DEPRECATED settingsGetRange ["(Since version 2.40)","Use 'GI.Gio.Structs.SettingsSchemaKey.settingsSchemaKeyGetRange' instead."] #-}
settingsGetRange ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m GVariant
settingsGetRange :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m GVariant
settingsGetRange a
settings Text
key = IO GVariant -> m GVariant
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_range settings' key'
checkUnexpectedReturnNULL "settingsGetRange" result
result' <- B.GVariant.wrapGVariantPtr result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetRangeMethodInfo
instance (signature ~ (T.Text -> m GVariant), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetRangeMethodInfo a signature where
overloadedMethod = settingsGetRange
instance O.OverloadedMethodInfo SettingsGetRangeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetRange",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetRange"
})
#endif
foreign import ccall "g_settings_get_string" g_settings_get_string ::
Ptr Settings ->
CString ->
IO CString
settingsGetString ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m T.Text
settingsGetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Text
settingsGetString a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_string settings' key'
checkUnexpectedReturnNULL "settingsGetString" result
result' <- cstringToText result
freeMem result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetStringMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetStringMethodInfo a signature where
overloadedMethod = settingsGetString
instance O.OverloadedMethodInfo SettingsGetStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetString"
})
#endif
foreign import ccall "g_settings_get_strv" g_settings_get_strv ::
Ptr Settings ->
CString ->
IO (Ptr CString)
settingsGetStrv ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m [T.Text]
settingsGetStrv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m [Text]
settingsGetStrv a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_strv settings' key'
checkUnexpectedReturnNULL "settingsGetStrv" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetStrvMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetStrvMethodInfo a signature where
overloadedMethod = settingsGetStrv
instance O.OverloadedMethodInfo SettingsGetStrvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetStrv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetStrv"
})
#endif
foreign import ccall "g_settings_get_uint" g_settings_get_uint ::
Ptr Settings ->
CString ->
IO Word32
settingsGetUint ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Word32
settingsGetUint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Word32
settingsGetUint a
settings Text
key = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_uint settings' key'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetUintMethodInfo
instance (signature ~ (T.Text -> m Word32), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetUintMethodInfo a signature where
overloadedMethod = settingsGetUint
instance O.OverloadedMethodInfo SettingsGetUintMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetUint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetUint"
})
#endif
foreign import ccall "g_settings_get_uint64" g_settings_get_uint64 ::
Ptr Settings ->
CString ->
IO Word64
settingsGetUint64 ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Word64
settingsGetUint64 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Word64
settingsGetUint64 a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_uint64 settings' key'
touchManagedPtr settings
freeMem key'
return result
#if defined(ENABLE_OVERLOADING)
data SettingsGetUint64MethodInfo
instance (signature ~ (T.Text -> m Word64), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetUint64MethodInfo a signature where
overloadedMethod = settingsGetUint64
instance O.OverloadedMethodInfo SettingsGetUint64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetUint64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetUint64"
})
#endif
foreign import ccall "g_settings_get_user_value" g_settings_get_user_value ::
Ptr Settings ->
CString ->
IO (Ptr GVariant)
settingsGetUserValue ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m (Maybe GVariant)
settingsGetUserValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m (Maybe GVariant)
settingsGetUserValue a
settings Text
key = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_user_value settings' key'
maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
return result''
touchManagedPtr settings
freeMem key'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data SettingsGetUserValueMethodInfo
instance (signature ~ (T.Text -> m (Maybe GVariant)), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetUserValueMethodInfo a signature where
overloadedMethod = settingsGetUserValue
instance O.OverloadedMethodInfo SettingsGetUserValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetUserValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetUserValue"
})
#endif
foreign import ccall "g_settings_get_value" g_settings_get_value ::
Ptr Settings ->
CString ->
IO (Ptr GVariant)
settingsGetValue ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m GVariant
settingsGetValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m GVariant
settingsGetValue a
settings Text
key = IO GVariant -> m GVariant
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_get_value settings' key'
checkUnexpectedReturnNULL "settingsGetValue" result
result' <- B.GVariant.wrapGVariantPtr result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsGetValueMethodInfo
instance (signature ~ (T.Text -> m GVariant), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsGetValueMethodInfo a signature where
overloadedMethod = settingsGetValue
instance O.OverloadedMethodInfo SettingsGetValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsGetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsGetValue"
})
#endif
foreign import ccall "g_settings_is_writable" g_settings_is_writable ::
Ptr Settings ->
CString ->
IO CInt
settingsIsWritable ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m Bool
settingsIsWritable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m Bool
settingsIsWritable a
settings Text
name = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
name' <- textToCString name
result <- g_settings_is_writable settings' name'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsIsWritableMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsIsWritableMethodInfo a signature where
overloadedMethod = settingsIsWritable
instance O.OverloadedMethodInfo SettingsIsWritableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsIsWritable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsIsWritable"
})
#endif
foreign import ccall "g_settings_list_children" g_settings_list_children ::
Ptr Settings ->
IO (Ptr CString)
settingsListChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> m [T.Text]
settingsListChildren :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m [Text]
settingsListChildren a
settings = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
result <- g_settings_list_children settings'
checkUnexpectedReturnNULL "settingsListChildren" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr settings
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsListChildrenMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsListChildrenMethodInfo a signature where
overloadedMethod = settingsListChildren
instance O.OverloadedMethodInfo SettingsListChildrenMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsListChildren",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsListChildren"
})
#endif
foreign import ccall "g_settings_list_keys" g_settings_list_keys ::
Ptr Settings ->
IO (Ptr CString)
{-# DEPRECATED settingsListKeys ["(Since version 2.46)","Use 'GI.Gio.Structs.SettingsSchema.settingsSchemaListKeys' instead."] #-}
settingsListKeys ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> m [T.Text]
settingsListKeys :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m [Text]
settingsListKeys a
settings = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
result <- g_settings_list_keys settings'
checkUnexpectedReturnNULL "settingsListKeys" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr settings
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsListKeysMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsListKeysMethodInfo a signature where
overloadedMethod = settingsListKeys
instance O.OverloadedMethodInfo SettingsListKeysMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsListKeys",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsListKeys"
})
#endif
foreign import ccall "g_settings_range_check" g_settings_range_check ::
Ptr Settings ->
CString ->
Ptr GVariant ->
IO CInt
{-# DEPRECATED settingsRangeCheck ["(Since version 2.40)","Use 'GI.Gio.Structs.SettingsSchemaKey.settingsSchemaKeyRangeCheck' instead."] #-}
settingsRangeCheck ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> GVariant
-> m Bool
settingsRangeCheck :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> GVariant -> m Bool
settingsRangeCheck a
settings Text
key GVariant
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
value' <- unsafeManagedPtrGetPtr value
result <- g_settings_range_check settings' key' value'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
touchManagedPtr value
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsRangeCheckMethodInfo
instance (signature ~ (T.Text -> GVariant -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsRangeCheckMethodInfo a signature where
overloadedMethod = settingsRangeCheck
instance O.OverloadedMethodInfo SettingsRangeCheckMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsRangeCheck",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsRangeCheck"
})
#endif
foreign import ccall "g_settings_reset" g_settings_reset ::
Ptr Settings ->
CString ->
IO ()
settingsReset ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> m ()
settingsReset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> m ()
settingsReset a
settings 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
g_settings_reset settings' key'
touchManagedPtr settings
freeMem key'
return ()
#if defined(ENABLE_OVERLOADING)
data SettingsResetMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsResetMethodInfo a signature where
overloadedMethod = settingsReset
instance O.OverloadedMethodInfo SettingsResetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsReset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsReset"
})
#endif
foreign import ccall "g_settings_revert" g_settings_revert ::
Ptr Settings ->
IO ()
settingsRevert ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> m ()
settingsRevert :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m ()
settingsRevert a
settings = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
g_settings_revert settings'
touchManagedPtr settings
return ()
#if defined(ENABLE_OVERLOADING)
data SettingsRevertMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsRevertMethodInfo a signature where
overloadedMethod = settingsRevert
instance O.OverloadedMethodInfo SettingsRevertMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsRevert",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsRevert"
})
#endif
foreign import ccall "g_settings_set_boolean" g_settings_set_boolean ::
Ptr Settings ->
CString ->
CInt ->
IO CInt
settingsSetBoolean ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Bool
-> m Bool
settingsSetBoolean :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Bool -> m Bool
settingsSetBoolean a
settings Text
key Bool
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
let 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
result <- g_settings_set_boolean settings' key' value'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetBooleanMethodInfo
instance (signature ~ (T.Text -> Bool -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetBooleanMethodInfo a signature where
overloadedMethod = settingsSetBoolean
instance O.OverloadedMethodInfo SettingsSetBooleanMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetBoolean",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetBoolean"
})
#endif
foreign import ccall "g_settings_set_double" g_settings_set_double ::
Ptr Settings ->
CString ->
CDouble ->
IO CInt
settingsSetDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Double
-> m Bool
settingsSetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Double -> m Bool
settingsSetDouble a
settings Text
key Double
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
let value' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
value
result <- g_settings_set_double settings' key' value'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetDoubleMethodInfo a signature where
overloadedMethod = settingsSetDouble
instance O.OverloadedMethodInfo SettingsSetDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetDouble"
})
#endif
foreign import ccall "g_settings_set_enum" g_settings_set_enum ::
Ptr Settings ->
CString ->
Int32 ->
IO CInt
settingsSetEnum ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Int32
-> m Bool
settingsSetEnum :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Int32 -> m Bool
settingsSetEnum a
settings Text
key Int32
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_set_enum settings' key' value
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetEnumMethodInfo
instance (signature ~ (T.Text -> Int32 -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetEnumMethodInfo a signature where
overloadedMethod = settingsSetEnum
instance O.OverloadedMethodInfo SettingsSetEnumMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetEnum",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetEnum"
})
#endif
foreign import ccall "g_settings_set_flags" g_settings_set_flags ::
Ptr Settings ->
CString ->
Word32 ->
IO CInt
settingsSetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Word32
-> m Bool
settingsSetFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Word32 -> m Bool
settingsSetFlags a
settings Text
key Word32
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_set_flags settings' key' value
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetFlagsMethodInfo
instance (signature ~ (T.Text -> Word32 -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetFlagsMethodInfo a signature where
overloadedMethod = settingsSetFlags
instance O.OverloadedMethodInfo SettingsSetFlagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetFlags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetFlags"
})
#endif
foreign import ccall "g_settings_set_int" g_settings_set_int ::
Ptr Settings ->
CString ->
Int32 ->
IO CInt
settingsSetInt ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Int32
-> m Bool
settingsSetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Int32 -> m Bool
settingsSetInt a
settings Text
key Int32
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_set_int settings' key' value
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetIntMethodInfo a signature where
overloadedMethod = settingsSetInt
instance O.OverloadedMethodInfo SettingsSetIntMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetInt",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetInt"
})
#endif
foreign import ccall "g_settings_set_int64" g_settings_set_int64 ::
Ptr Settings ->
CString ->
Int64 ->
IO CInt
settingsSetInt64 ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Int64
-> m Bool
settingsSetInt64 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Int64 -> m Bool
settingsSetInt64 a
settings Text
key Int64
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_set_int64 settings' key' value
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetInt64MethodInfo
instance (signature ~ (T.Text -> Int64 -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetInt64MethodInfo a signature where
overloadedMethod = settingsSetInt64
instance O.OverloadedMethodInfo SettingsSetInt64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetInt64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetInt64"
})
#endif
foreign import ccall "g_settings_set_string" g_settings_set_string ::
Ptr Settings ->
CString ->
CString ->
IO CInt
settingsSetString ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> T.Text
-> m Bool
settingsSetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Text -> m Bool
settingsSetString a
settings Text
key Text
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
value' <- textToCString value
result <- g_settings_set_string settings' key' value'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
freeMem value'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetStringMethodInfo a signature where
overloadedMethod = settingsSetString
instance O.OverloadedMethodInfo SettingsSetStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetString"
})
#endif
foreign import ccall "g_settings_set_strv" g_settings_set_strv ::
Ptr Settings ->
CString ->
Ptr CString ->
IO CInt
settingsSetStrv ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Maybe ([T.Text])
-> m Bool
settingsSetStrv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Maybe [Text] -> m Bool
settingsSetStrv a
settings Text
key Maybe [Text]
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
maybeValue <- case value of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
FP.nullPtr
Just [Text]
jValue -> do
jValue' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jValue
return jValue'
result <- g_settings_set_strv settings' key' maybeValue
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
mapZeroTerminatedCArray freeMem maybeValue
freeMem maybeValue
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetStrvMethodInfo
instance (signature ~ (T.Text -> Maybe ([T.Text]) -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetStrvMethodInfo a signature where
overloadedMethod = settingsSetStrv
instance O.OverloadedMethodInfo SettingsSetStrvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetStrv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetStrv"
})
#endif
foreign import ccall "g_settings_set_uint" g_settings_set_uint ::
Ptr Settings ->
CString ->
Word32 ->
IO CInt
settingsSetUint ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Word32
-> m Bool
settingsSetUint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Word32 -> m Bool
settingsSetUint a
settings Text
key Word32
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_set_uint settings' key' value
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetUintMethodInfo
instance (signature ~ (T.Text -> Word32 -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetUintMethodInfo a signature where
overloadedMethod = settingsSetUint
instance O.OverloadedMethodInfo SettingsSetUintMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetUint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetUint"
})
#endif
foreign import ccall "g_settings_set_uint64" g_settings_set_uint64 ::
Ptr Settings ->
CString ->
Word64 ->
IO CInt
settingsSetUint64 ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> Word64
-> m Bool
settingsSetUint64 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> Word64 -> m Bool
settingsSetUint64 a
settings Text
key Word64
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
result <- g_settings_set_uint64 settings' key' value
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetUint64MethodInfo
instance (signature ~ (T.Text -> Word64 -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetUint64MethodInfo a signature where
overloadedMethod = settingsSetUint64
instance O.OverloadedMethodInfo SettingsSetUint64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetUint64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetUint64"
})
#endif
foreign import ccall "g_settings_set_value" g_settings_set_value ::
Ptr Settings ->
CString ->
Ptr GVariant ->
IO CInt
settingsSetValue ::
(B.CallStack.HasCallStack, MonadIO m, IsSettings a) =>
a
-> T.Text
-> GVariant
-> m Bool
settingsSetValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> Text -> GVariant -> m Bool
settingsSetValue a
settings Text
key GVariant
value = 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
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
key' <- textToCString key
value' <- unsafeManagedPtrGetPtr value
result <- g_settings_set_value settings' key' value'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr settings
touchManagedPtr value
freeMem key'
return result'
#if defined(ENABLE_OVERLOADING)
data SettingsSetValueMethodInfo
instance (signature ~ (T.Text -> GVariant -> m Bool), MonadIO m, IsSettings a) => O.OverloadedMethod SettingsSetValueMethodInfo a signature where
overloadedMethod = settingsSetValue
instance O.OverloadedMethodInfo SettingsSetValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.Settings.settingsSetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Settings.html#v:settingsSetValue"
})
#endif
foreign import ccall "g_settings_list_relocatable_schemas" g_settings_list_relocatable_schemas ::
IO (Ptr CString)
{-# DEPRECATED settingsListRelocatableSchemas ["(Since version 2.40)","Use 'GI.Gio.Structs.SettingsSchemaSource.settingsSchemaSourceListSchemas' instead"] #-}
settingsListRelocatableSchemas ::
(B.CallStack.HasCallStack, MonadIO m) =>
m [T.Text]
settingsListRelocatableSchemas :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [Text]
settingsListRelocatableSchemas = 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
result <- IO (Ptr CString)
g_settings_list_relocatable_schemas
checkUnexpectedReturnNULL "settingsListRelocatableSchemas" result
result' <- unpackZeroTerminatedUTF8CArray result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_list_schemas" g_settings_list_schemas ::
IO (Ptr CString)
{-# DEPRECATED settingsListSchemas ["(Since version 2.40)","Use 'GI.Gio.Structs.SettingsSchemaSource.settingsSchemaSourceListSchemas' instead.","If you used 'GI.Gio.Objects.Settings.settingsListSchemas' to check for the presence of","a particular schema, use 'GI.Gio.Structs.SettingsSchemaSource.settingsSchemaSourceLookup' instead","of your whole loop."] #-}
settingsListSchemas ::
(B.CallStack.HasCallStack, MonadIO m) =>
m [T.Text]
settingsListSchemas :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [Text]
settingsListSchemas = 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
result <- IO (Ptr CString)
g_settings_list_schemas
checkUnexpectedReturnNULL "settingsListSchemas" result
result' <- unpackZeroTerminatedUTF8CArray result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_sync" g_settings_sync ::
IO ()
settingsSync ::
(B.CallStack.HasCallStack, MonadIO m) =>
m ()
settingsSync :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
settingsSync = 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
IO ()
g_settings_sync
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_settings_unbind" g_settings_unbind ::
Ptr GObject.Object.Object ->
CString ->
IO ()
settingsUnbind ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
a
-> T.Text
-> m ()
settingsUnbind :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> Text -> m ()
settingsUnbind a
object Text
property = 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
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
property' <- textToCString property
g_settings_unbind object' property'
touchManagedPtr object
freeMem property'
return ()
#if defined(ENABLE_OVERLOADING)
#endif