    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- The @GSettingsBackend@ interface defines a generic interface for
    -- non-strictly-typed data that is stored in a hierarchy. To implement
    -- an alternative storage backend for t'GI.Gio.Objects.Settings.Settings', you need to
    -- implement the @GSettingsBackend@ interface and then make it implement the
    -- extension point @G_SETTINGS_BACKEND_EXTENSION_POINT_NAME@.
    --
    -- The interface defines methods for reading and writing values, a
    -- method for determining if writing of certain values will fail
    -- (lockdown) and a change notification mechanism.
    --
    -- The semantics of the interface are very precisely defined and
    -- implementations must carefully adhere to the expectations of
    -- callers that are documented on each of the interface methods.
    --
    -- Some of the @GSettingsBackend@ functions accept or return a
    -- [struct/@gLib@/.Tree]. These trees always have strings as keys and
    -- [struct/@gLib@/.Variant] as values.
    --
    -- The @GSettingsBackend@ API is exported to allow third-party
    -- implementations, but does not carry the same stability guarantees
    -- as the public GIO API. For this reason, you have to define the
    -- C preprocessor symbol @G_SETTINGS_ENABLE_BACKEND@ before including
    -- @gio\/gsettingsbackend.h@.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.Gio.Objects.SettingsBackend
        (
    #if defined(ENABLE_OVERLOADING)
        SettingsBackendFlattenTreeMethodInfo    ,
    #endif

    -- * Exported types
        SettingsBackend(..)                     ,
        IsSettingsBackend                       ,
        toSettingsBackend                       ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [changed]("GI.Gio.Objects.SettingsBackend#g:method:changed"), [changedTree]("GI.Gio.Objects.SettingsBackend#g:method:changedTree"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [keysChanged]("GI.Gio.Objects.SettingsBackend#g:method:keysChanged"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [pathChanged]("GI.Gio.Objects.SettingsBackend#g:method:pathChanged"), [pathWritableChanged]("GI.Gio.Objects.SettingsBackend#g:method:pathWritableChanged"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure"), [writableChanged]("GI.Gio.Objects.SettingsBackend#g:method:writableChanged").
    --
    -- ==== Getters
    -- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
    --
    -- ==== Setters
    -- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

    #if defined(ENABLE_OVERLOADING)
        ResolveSettingsBackendMethod            ,
    #endif

    -- ** changed #method:changed#

    #if defined(ENABLE_OVERLOADING)
        SettingsBackendChangedMethodInfo        ,
    #endif
        settingsBackendChanged                  ,

    -- ** changedTree #method:changedTree#

    #if defined(ENABLE_OVERLOADING)
        SettingsBackendChangedTreeMethodInfo    ,
    #endif
        settingsBackendChangedTree              ,

    -- ** getDefault #method:getDefault#

        settingsBackendGetDefault               ,

    -- ** keysChanged #method:keysChanged#

    #if defined(ENABLE_OVERLOADING)
        SettingsBackendKeysChangedMethodInfo    ,
    #endif
        settingsBackendKeysChanged              ,

    -- ** pathChanged #method:pathChanged#

    #if defined(ENABLE_OVERLOADING)
        SettingsBackendPathChangedMethodInfo    ,
    #endif
        settingsBackendPathChanged              ,

    -- ** pathWritableChanged #method:pathWritableChanged#

    #if defined(ENABLE_OVERLOADING)
        SettingsBackendPathWritableChangedMethodInfo,
    #endif
        settingsBackendPathWritableChanged      ,

    -- ** writableChanged #method:writableChanged#

    #if defined(ENABLE_OVERLOADING)
        SettingsBackendWritableChangedMethodInfo,
    #endif
        settingsBackendWritableChanged          ,

        ) 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

    -- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
    #if MIN_VERSION_base(4,18,0)
    import qualified GI.GLib.Structs.Tree as GLib.Tree
    import qualified GI.GObject.Objects.Object as GObject.Object

    #else
    import qualified GI.GLib.Structs.Tree as GLib.Tree
    import qualified GI.GObject.Objects.Object as GObject.Object

    #endif

    -- | Memory-managed wrapper type.
    newtype SettingsBackend = SettingsBackend (SP.ManagedPtr SettingsBackend)
        deriving (SettingsBackend -> SettingsBackend -> Bool
    (SettingsBackend -> SettingsBackend -> Bool)
    -> (SettingsBackend -> SettingsBackend -> Bool)
    -> Eq SettingsBackend
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SettingsBackend -> SettingsBackend -> Bool
    == :: SettingsBackend -> SettingsBackend -> Bool
    $c/= :: SettingsBackend -> SettingsBackend -> Bool
    /= :: SettingsBackend -> SettingsBackend -> Bool
    Eq)

    instance SP.ManagedPtrNewtype SettingsBackend where
        toManagedPtr :: SettingsBackend -> ManagedPtr SettingsBackend
    toManagedPtr (SettingsBackend ManagedPtr SettingsBackend
    p) = ManagedPtr SettingsBackend
    p

    foreign import ccall "g_settings_backend_get_type"
        c_g_settings_backend_get_type :: IO B.Types.GType

    instance B.Types.TypedObject SettingsBackend where
        glibType :: IO GType
    glibType = IO GType
    c_g_settings_backend_get_type

    instance B.Types.GObject SettingsBackend

    -- | Type class for types which can be safely cast to `SettingsBackend`, for instance with `toSettingsBackend`.
    class (SP.GObject o, O.IsDescendantOf SettingsBackend o) => IsSettingsBackend o
    instance (SP.GObject o, O.IsDescendantOf SettingsBackend o) => IsSettingsBackend o

    instance O.HasParentTypes SettingsBackend
    type instance O.ParentTypes SettingsBackend = '[GObject.Object.Object]

    -- | Cast to `SettingsBackend`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
    toSettingsBackend :: (MIO.MonadIO m, IsSettingsBackend o) => o -> m SettingsBackend
    toSettingsBackend :: forall (m :: * -> *) o.
    (MonadIO m, IsSettingsBackend o) =>
    o -> m SettingsBackend
    toSettingsBackend = IO SettingsBackend -> m SettingsBackend
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO SettingsBackend -> m SettingsBackend)
    -> (o -> IO SettingsBackend) -> o -> m SettingsBackend
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ManagedPtr SettingsBackend -> SettingsBackend)
    -> o -> IO SettingsBackend
    forall o o'.
    (HasCallStack, ManagedPtrNewtype o, TypedObject o,
     ManagedPtrNewtype o', TypedObject o') =>
    (ManagedPtr o' -> o') -> o -> IO o'
    B.ManagedPtr.unsafeCastTo ManagedPtr SettingsBackend -> SettingsBackend
    SettingsBackend

    -- | Convert 'SettingsBackend' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
    instance B.GValue.IsGValue (Maybe SettingsBackend) where
        gvalueGType_ :: IO GType
    gvalueGType_ = IO GType
    c_g_settings_backend_get_type
        gvalueSet_ :: Ptr GValue -> Maybe SettingsBackend -> IO ()
    gvalueSet_ Ptr GValue
    gv Maybe SettingsBackend
    P.Nothing = Ptr GValue -> Ptr SettingsBackend -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv (Ptr SettingsBackend
    forall a. Ptr a
    FP.nullPtr :: FP.Ptr SettingsBackend)
        gvalueSet_ Ptr GValue
    gv (P.Just SettingsBackend
    obj) = SettingsBackend -> (Ptr SettingsBackend -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr SettingsBackend
    obj (Ptr GValue -> Ptr SettingsBackend -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv)
        gvalueGet_ :: Ptr GValue -> IO (Maybe SettingsBackend)
    gvalueGet_ Ptr GValue
    gv = do
            Ptr SettingsBackend
    ptr <- Ptr GValue -> IO (Ptr SettingsBackend)
    forall a. GObject a => Ptr GValue -> IO (Ptr a)
    B.GValue.get_object Ptr GValue
    gv :: IO (FP.Ptr SettingsBackend)
            if Ptr SettingsBackend
    ptr Ptr SettingsBackend -> Ptr SettingsBackend -> Bool
    forall a. Eq a => a -> a -> Bool
    /= Ptr SettingsBackend
    forall a. Ptr a
    FP.nullPtr
            then SettingsBackend -> Maybe SettingsBackend
    forall a. a -> Maybe a
    P.Just (SettingsBackend -> Maybe SettingsBackend)
    -> IO SettingsBackend -> IO (Maybe SettingsBackend)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (ManagedPtr SettingsBackend -> SettingsBackend)
    -> Ptr SettingsBackend -> IO SettingsBackend
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    B.ManagedPtr.newObject ManagedPtr SettingsBackend -> SettingsBackend
    SettingsBackend Ptr SettingsBackend
    ptr
            else Maybe SettingsBackend -> IO (Maybe SettingsBackend)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe SettingsBackend
    forall a. Maybe a
    P.Nothing

    #if defined(ENABLE_OVERLOADING)
    type family ResolveSettingsBackendMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveSettingsBackendMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveSettingsBackendMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveSettingsBackendMethod "changed" o = SettingsBackendChangedMethodInfo
        ResolveSettingsBackendMethod "changedTree" o = SettingsBackendChangedTreeMethodInfo
        ResolveSettingsBackendMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveSettingsBackendMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveSettingsBackendMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveSettingsBackendMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveSettingsBackendMethod "keysChanged" o = SettingsBackendKeysChangedMethodInfo
        ResolveSettingsBackendMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveSettingsBackendMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveSettingsBackendMethod "pathChanged" o = SettingsBackendPathChangedMethodInfo
        ResolveSettingsBackendMethod "pathWritableChanged" o = SettingsBackendPathWritableChangedMethodInfo
        ResolveSettingsBackendMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveSettingsBackendMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveSettingsBackendMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveSettingsBackendMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveSettingsBackendMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveSettingsBackendMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveSettingsBackendMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveSettingsBackendMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveSettingsBackendMethod "writableChanged" o = SettingsBackendWritableChangedMethodInfo
        ResolveSettingsBackendMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveSettingsBackendMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveSettingsBackendMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveSettingsBackendMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveSettingsBackendMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveSettingsBackendMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveSettingsBackendMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveSettingsBackendMethod t SettingsBackend, O.OverloadedMethod info SettingsBackend p) => OL.IsLabel t (SettingsBackend -> 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 ~ ResolveSettingsBackendMethod t SettingsBackend, O.OverloadedMethod info SettingsBackend p, R.HasField t SettingsBackend p) => R.HasField t SettingsBackend p where
        getField = O.overloadedMethod @info

    #endif

    instance (info ~ ResolveSettingsBackendMethod t SettingsBackend, O.OverloadedMethodInfo info SettingsBackend) => OL.IsLabel t (O.MethodProxy info SettingsBackend) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.MethodProxy
    #else
        fromLabel _ = O.MethodProxy
    #endif

    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList SettingsBackend
    type instance O.AttributeList SettingsBackend = SettingsBackendAttributeList
    type SettingsBackendAttributeList = ('[ ] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList SettingsBackend = SettingsBackendSignalList
    type SettingsBackendSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif

    -- method SettingsBackend::changed
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "backend"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "SettingsBackend" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSettingsBackend implementation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "key"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the name of the key"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "origin_tag"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the origin tag" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_changed" g_settings_backend_changed ::
        Ptr SettingsBackend ->                  -- backend : TInterface (Name {namespace = "Gio", name = "SettingsBackend"})
        CString ->                              -- key : TBasicType TUTF8
        Ptr () ->                               -- origin_tag : TBasicType TPtr
        IO ()

    -- | Signals that a single key has possibly changed.  Backend
    -- implementations should call this if a key has possibly changed its
    -- value.
    --
    -- /@key@/ must be a valid key (ie starting with a slash, not containing
    -- \'\/\/\', and not ending with a slash).
    --
    -- The implementation must call this function during any call to
    -- @/g_settings_backend_write()/@, before the call returns (except in the
    -- case that no keys are actually changed and it cares to detect this
    -- fact).  It may not rely on the existence of a mainloop for
    -- dispatching the signal later.
    --
    -- The implementation may call this function at any other time it likes
    -- in response to other events (such as changes occurring outside of the
    -- program).  These calls may originate from a mainloop or may originate
    -- in response to any other action (including from calls to
    -- @/g_settings_backend_write()/@).
    --
    -- In the case that this call is in response to a call to
    -- @/g_settings_backend_write()/@ then /@originTag@/ must be set to the same
    -- value that was passed to that call.
    --
    -- /Since: 2.26/
    settingsBackendChanged ::
        (B.CallStack.HasCallStack, MonadIO m, IsSettingsBackend a) =>
        a
        -- ^ /@backend@/: a t'GI.Gio.Objects.SettingsBackend.SettingsBackend' implementation
        -> T.Text
        -- ^ /@key@/: the name of the key
        -> Ptr ()
        -- ^ /@originTag@/: the origin tag
        -> m ()
    settingsBackendChanged :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSettingsBackend a) =>
    a -> Text -> Ptr () -> m ()
    settingsBackendChanged a
    backend Text
    key Ptr ()
    originTag = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    backend' <- a -> IO (Ptr SettingsBackend)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    backend
        CString
    key' <- Text -> IO CString
    textToCString Text
    key
        Ptr SettingsBackend -> CString -> Ptr () -> IO ()
    g_settings_backend_changed Ptr SettingsBackend
    backend' CString
    key' Ptr ()
    originTag
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    backend
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    key'
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data SettingsBackendChangedMethodInfo
    instance (signature ~ (T.Text -> Ptr () -> m ()), MonadIO m, IsSettingsBackend a) => O.OverloadedMethod SettingsBackendChangedMethodInfo a signature where
        overloadedMethod = settingsBackendChanged

    instance O.OverloadedMethodInfo SettingsBackendChangedMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.SettingsBackend.settingsBackendChanged",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-SettingsBackend.html#v:settingsBackendChanged"
            })

    #endif

    -- method SettingsBackend::changed_tree
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "backend"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "SettingsBackend" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSettingsBackend implementation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "tree"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Tree" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GTree containing the changes"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "origin_tag"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the origin tag" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_changed_tree" g_settings_backend_changed_tree ::
        Ptr SettingsBackend ->                  -- backend : TInterface (Name {namespace = "Gio", name = "SettingsBackend"})
        Ptr GLib.Tree.Tree ->                   -- tree : TInterface (Name {namespace = "GLib", name = "Tree"})
        Ptr () ->                               -- origin_tag : TBasicType TPtr
        IO ()

    -- | This call is a convenience wrapper.  It gets the list of changes from
    -- /@tree@/, computes the longest common prefix and calls
    -- 'GI.Gio.Objects.SettingsBackend.settingsBackendChanged'.
    --
    -- /Since: 2.26/
    settingsBackendChangedTree ::
        (B.CallStack.HasCallStack, MonadIO m, IsSettingsBackend a) =>
        a
        -- ^ /@backend@/: a t'GI.Gio.Objects.SettingsBackend.SettingsBackend' implementation
        -> GLib.Tree.Tree
        -- ^ /@tree@/: a t'GI.GLib.Structs.Tree.Tree' containing the changes
        -> Ptr ()
        -- ^ /@originTag@/: the origin tag
        -> m ()
    settingsBackendChangedTree :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSettingsBackend a) =>
    a -> Tree -> Ptr () -> m ()
    settingsBackendChangedTree a
    backend Tree
    tree Ptr ()
    originTag = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    backend' <- a -> IO (Ptr SettingsBackend)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    backend
        Ptr Tree
    tree' <- Tree -> IO (Ptr Tree)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr Tree
    tree
        Ptr SettingsBackend -> Ptr Tree -> Ptr () -> IO ()
    g_settings_backend_changed_tree Ptr SettingsBackend
    backend' Ptr Tree
    tree' Ptr ()
    originTag
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    backend
        Tree -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr Tree
    tree
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data SettingsBackendChangedTreeMethodInfo
    instance (signature ~ (GLib.Tree.Tree -> Ptr () -> m ()), MonadIO m, IsSettingsBackend a) => O.OverloadedMethod SettingsBackendChangedTreeMethodInfo a signature where
        overloadedMethod = settingsBackendChangedTree

    instance O.OverloadedMethodInfo SettingsBackendChangedTreeMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.SettingsBackend.settingsBackendChangedTree",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-SettingsBackend.html#v:settingsBackendChangedTree"
            })

    #endif

    -- method SettingsBackend::keys_changed
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "backend"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "SettingsBackend" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSettingsBackend implementation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "path"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the path containing the changes"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "items"
    --           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the %NULL-terminated list of changed keys"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "origin_tag"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the origin tag" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_keys_changed" g_settings_backend_keys_changed ::
        Ptr SettingsBackend ->                  -- backend : TInterface (Name {namespace = "Gio", name = "SettingsBackend"})
        CString ->                              -- path : TBasicType TUTF8
        Ptr CString ->                          -- items : TCArray True (-1) (-1) (TBasicType TUTF8)
        Ptr () ->                               -- origin_tag : TBasicType TPtr
        IO ()

    -- | Signals that a list of keys have possibly changed.  Backend
    -- implementations should call this if keys have possibly changed their
    -- values.
    --
    -- /@path@/ must be a valid path (ie starting and ending with a slash and
    -- not containing \'\/\/\').  Each string in /@items@/ must form a valid key
    -- name when /@path@/ is prefixed to it (ie: each item must not start or
    -- end with \'\/\' and must not contain \'\/\/\').
    --
    -- The meaning of this signal is that any of the key names resulting
    -- from the contatenation of /@path@/ with each item in /@items@/ may have
    -- changed.
    --
    -- The same rules for when notifications must occur apply as per
    -- 'GI.Gio.Objects.SettingsBackend.settingsBackendChanged'.  These two calls can be used
    -- interchangeably if exactly one item has changed (although in that
    -- case 'GI.Gio.Objects.SettingsBackend.settingsBackendChanged' is definitely preferred).
    --
    -- For efficiency reasons, the implementation should strive for /@path@/ to
    -- be as long as possible (ie: the longest common prefix of all of the
    -- keys that were changed) but this is not strictly required.
    --
    -- /Since: 2.26/
    settingsBackendKeysChanged ::
        (B.CallStack.HasCallStack, MonadIO m, IsSettingsBackend a) =>
        a
        -- ^ /@backend@/: a t'GI.Gio.Objects.SettingsBackend.SettingsBackend' implementation
        -> T.Text
        -- ^ /@path@/: the path containing the changes
        -> [T.Text]
        -- ^ /@items@/: the 'P.Nothing'-terminated list of changed keys
        -> Ptr ()
        -- ^ /@originTag@/: the origin tag
        -> m ()
    settingsBackendKeysChanged :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSettingsBackend a) =>
    a -> Text -> [Text] -> Ptr () -> m ()
    settingsBackendKeysChanged a
    backend Text
    path [Text]
    items Ptr ()
    originTag = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    backend' <- a -> IO (Ptr SettingsBackend)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    backend
        CString
    path' <- Text -> IO CString
    textToCString Text
    path
        Ptr CString
    items' <- [Text] -> IO (Ptr CString)
    packZeroTerminatedUTF8CArray [Text]
    items
        Ptr SettingsBackend -> CString -> Ptr CString -> Ptr () -> IO ()
    g_settings_backend_keys_changed Ptr SettingsBackend
    backend' CString
    path' Ptr CString
    items' Ptr ()
    originTag
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    backend
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    path'
        (CString -> IO ()) -> Ptr CString -> IO ()
    forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
    mapZeroTerminatedCArray CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr CString
    items'
        Ptr CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr CString
    items'
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data SettingsBackendKeysChangedMethodInfo
    instance (signature ~ (T.Text -> [T.Text] -> Ptr () -> m ()), MonadIO m, IsSettingsBackend a) => O.OverloadedMethod SettingsBackendKeysChangedMethodInfo a signature where
        overloadedMethod = settingsBackendKeysChanged

    instance O.OverloadedMethodInfo SettingsBackendKeysChangedMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.SettingsBackend.settingsBackendKeysChanged",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-SettingsBackend.html#v:settingsBackendKeysChanged"
            })

    #endif

    -- method SettingsBackend::path_changed
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "backend"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "SettingsBackend" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSettingsBackend implementation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "path"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the path containing the changes"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "origin_tag"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the origin tag" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_path_changed" g_settings_backend_path_changed ::
        Ptr SettingsBackend ->                  -- backend : TInterface (Name {namespace = "Gio", name = "SettingsBackend"})
        CString ->                              -- path : TBasicType TUTF8
        Ptr () ->                               -- origin_tag : TBasicType TPtr
        IO ()

    -- | Signals that all keys below a given path may have possibly changed.
    -- Backend implementations should call this if an entire path of keys
    -- have possibly changed their values.
    --
    -- /@path@/ must be a valid path (ie starting and ending with a slash and
    -- not containing \'\/\/\').
    --
    -- The meaning of this signal is that any of the key which has a name
    -- starting with /@path@/ may have changed.
    --
    -- The same rules for when notifications must occur apply as per
    -- 'GI.Gio.Objects.SettingsBackend.settingsBackendChanged'.  This call might be an appropriate
    -- reasponse to a \'reset\' call but implementations are also free to
    -- explicitly list the keys that were affected by that call if they can
    -- easily do so.
    --
    -- For efficiency reasons, the implementation should strive for /@path@/ to
    -- be as long as possible (ie: the longest common prefix of all of the
    -- keys that were changed) but this is not strictly required.  As an
    -- example, if this function is called with the path of \"\/\" then every
    -- single key in the application will be notified of a possible change.
    --
    -- /Since: 2.26/
    settingsBackendPathChanged ::
        (B.CallStack.HasCallStack, MonadIO m, IsSettingsBackend a) =>
        a
        -- ^ /@backend@/: a t'GI.Gio.Objects.SettingsBackend.SettingsBackend' implementation
        -> T.Text
        -- ^ /@path@/: the path containing the changes
        -> Ptr ()
        -- ^ /@originTag@/: the origin tag
        -> m ()
    settingsBackendPathChanged :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSettingsBackend a) =>
    a -> Text -> Ptr () -> m ()
    settingsBackendPathChanged a
    backend Text
    path Ptr ()
    originTag = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    backend' <- a -> IO (Ptr SettingsBackend)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    backend
        CString
    path' <- Text -> IO CString
    textToCString Text
    path
        Ptr SettingsBackend -> CString -> Ptr () -> IO ()
    g_settings_backend_path_changed Ptr SettingsBackend
    backend' CString
    path' Ptr ()
    originTag
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    backend
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    path'
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data SettingsBackendPathChangedMethodInfo
    instance (signature ~ (T.Text -> Ptr () -> m ()), MonadIO m, IsSettingsBackend a) => O.OverloadedMethod SettingsBackendPathChangedMethodInfo a signature where
        overloadedMethod = settingsBackendPathChanged

    instance O.OverloadedMethodInfo SettingsBackendPathChangedMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.SettingsBackend.settingsBackendPathChanged",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-SettingsBackend.html#v:settingsBackendPathChanged"
            })

    #endif

    -- method SettingsBackend::path_writable_changed
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "backend"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "SettingsBackend" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSettingsBackend implementation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "path"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the name of the path"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_path_writable_changed" g_settings_backend_path_writable_changed ::
        Ptr SettingsBackend ->                  -- backend : TInterface (Name {namespace = "Gio", name = "SettingsBackend"})
        CString ->                              -- path : TBasicType TUTF8
        IO ()

    -- | Signals that the writability of all keys below a given path may have
    -- changed.
    --
    -- Since GSettings performs no locking operations for itself, this call
    -- will always be made in response to external events.
    --
    -- /Since: 2.26/
    settingsBackendPathWritableChanged ::
        (B.CallStack.HasCallStack, MonadIO m, IsSettingsBackend a) =>
        a
        -- ^ /@backend@/: a t'GI.Gio.Objects.SettingsBackend.SettingsBackend' implementation
        -> T.Text
        -- ^ /@path@/: the name of the path
        -> m ()
    settingsBackendPathWritableChanged :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSettingsBackend a) =>
    a -> Text -> m ()
    settingsBackendPathWritableChanged a
    backend Text
    path = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    backend' <- a -> IO (Ptr SettingsBackend)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    backend
        CString
    path' <- Text -> IO CString
    textToCString Text
    path
        Ptr SettingsBackend -> CString -> IO ()
    g_settings_backend_path_writable_changed Ptr SettingsBackend
    backend' CString
    path'
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    backend
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    path'
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data SettingsBackendPathWritableChangedMethodInfo
    instance (signature ~ (T.Text -> m ()), MonadIO m, IsSettingsBackend a) => O.OverloadedMethod SettingsBackendPathWritableChangedMethodInfo a signature where
        overloadedMethod = settingsBackendPathWritableChanged

    instance O.OverloadedMethodInfo SettingsBackendPathWritableChangedMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.SettingsBackend.settingsBackendPathWritableChanged",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-SettingsBackend.html#v:settingsBackendPathWritableChanged"
            })

    #endif

    -- method SettingsBackend::writable_changed
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "backend"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "SettingsBackend" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSettingsBackend implementation"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "key"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the name of the key"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_writable_changed" g_settings_backend_writable_changed ::
        Ptr SettingsBackend ->                  -- backend : TInterface (Name {namespace = "Gio", name = "SettingsBackend"})
        CString ->                              -- key : TBasicType TUTF8
        IO ()

    -- | Signals that the writability of a single key has possibly changed.
    --
    -- Since GSettings performs no locking operations for itself, this call
    -- will always be made in response to external events.
    --
    -- /Since: 2.26/
    settingsBackendWritableChanged ::
        (B.CallStack.HasCallStack, MonadIO m, IsSettingsBackend a) =>
        a
        -- ^ /@backend@/: a t'GI.Gio.Objects.SettingsBackend.SettingsBackend' implementation
        -> T.Text
        -- ^ /@key@/: the name of the key
        -> m ()
    settingsBackendWritableChanged :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSettingsBackend a) =>
    a -> Text -> m ()
    settingsBackendWritableChanged a
    backend Text
    key = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    backend' <- a -> IO (Ptr SettingsBackend)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    backend
        CString
    key' <- Text -> IO CString
    textToCString Text
    key
        Ptr SettingsBackend -> CString -> IO ()
    g_settings_backend_writable_changed Ptr SettingsBackend
    backend' CString
    key'
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    backend
        CString -> IO ()
    forall a. Ptr a -> IO ()
    freeMem CString
    key'
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data SettingsBackendWritableChangedMethodInfo
    instance (signature ~ (T.Text -> m ()), MonadIO m, IsSettingsBackend a) => O.OverloadedMethod SettingsBackendWritableChangedMethodInfo a signature where
        overloadedMethod = settingsBackendWritableChanged

    instance O.OverloadedMethodInfo SettingsBackendWritableChangedMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.SettingsBackend.settingsBackendWritableChanged",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-SettingsBackend.html#v:settingsBackendWritableChanged"
            })

    #endif

    -- XXX Could not generate method SettingsBackend::flatten_tree
    -- Not implemented: Don't know how to unpack C array of type TCArray True (-1) (-1) TVariant
    #if defined(ENABLE_OVERLOADING)
    -- XXX: Dummy instance, since code generation failed.
    -- Please file a bug at http://github.com/haskell-gi/haskell-gi.
    data SettingsBackendFlattenTreeMethodInfo
    instance (p ~ (), o ~ O.UnsupportedMethodError "flattenTree" SettingsBackend) => O.OverloadedMethod SettingsBackendFlattenTreeMethodInfo o p where
        overloadedMethod = undefined

    instance (o ~ O.UnsupportedMethodError "flattenTree" SettingsBackend) => O.OverloadedMethodInfo SettingsBackendFlattenTreeMethodInfo o where
        overloadedMethodInfo = undefined

    #endif

    -- method SettingsBackend::get_default
    -- method type : MemberFunction
    -- Args: []
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Gio" , name = "SettingsBackend" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_settings_backend_get_default" g_settings_backend_get_default ::
        IO (Ptr SettingsBackend)

    -- | Returns the default t'GI.Gio.Objects.SettingsBackend.SettingsBackend'. It is possible to override
    -- the default by setting the @GSETTINGS_BACKEND@ environment variable
    -- to the name of a settings backend.
    --
    -- The user gets a reference to the backend.
    --
    -- /Since: 2.28/
    settingsBackendGetDefault ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m SettingsBackend
        -- ^ __Returns:__ the default t'GI.Gio.Objects.SettingsBackend.SettingsBackend',
        --     which will be a dummy (memory) settings backend if no other settings
        --     backend is available.
    settingsBackendGetDefault :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    m SettingsBackend
    settingsBackendGetDefault  = IO SettingsBackend -> m SettingsBackend
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO SettingsBackend -> m SettingsBackend)
    -> IO SettingsBackend -> m SettingsBackend
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr SettingsBackend
    result <- IO (Ptr SettingsBackend)
    g_settings_backend_get_default
        Text -> Ptr SettingsBackend -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "settingsBackendGetDefault" Ptr SettingsBackend
    result
        SettingsBackend
    result' <- ((ManagedPtr SettingsBackend -> SettingsBackend)
    -> Ptr SettingsBackend -> IO SettingsBackend
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    wrapObject ManagedPtr SettingsBackend -> SettingsBackend
    SettingsBackend) Ptr SettingsBackend
    result
        SettingsBackend -> IO SettingsBackend
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return SettingsBackend
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif