    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- Any of the fields in t'GI.GLib.Structs.MarkupParser.MarkupParser' can be 'P.Nothing', in which case they
    -- will be ignored. Except for the /@error@/ function, any of these callbacks
    -- can set an error; in particular the 'GI.GLib.Enums.MarkupErrorUnknownElement',
    -- 'GI.GLib.Enums.MarkupErrorUnknownAttribute', and 'GI.GLib.Enums.MarkupErrorInvalidContent'
    -- errors are intended to be set from these callbacks. If you set an error
    -- from a callback, 'GI.GLib.Structs.MarkupParseContext.markupParseContextParse' will report that error
    -- back to its caller.

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

    module GI.GLib.Structs.MarkupParser
        (

    -- * Exported types
        MarkupParser(..)                        ,
        newZeroMarkupParser                     ,

     -- * Methods

    #if defined(ENABLE_OVERLOADING)
        ResolveMarkupParserMethod               ,
    #endif

     -- * Properties

    -- ** endElement #attr:endElement#
    -- | Callback to invoke when the closing tag of an element
    --     is seen. Note that this is also called for empty tags like
    --     @\<empty\/>@.

        clearMarkupParserEndElement             ,
        getMarkupParserEndElement               ,
    #if defined(ENABLE_OVERLOADING)
        markupParser_endElement                 ,
    #endif
        setMarkupParserEndElement               ,

    -- ** error #attr:error#
    -- | Callback to invoke when an error occurs.

        clearMarkupParserError                  ,
        getMarkupParserError                    ,
    #if defined(ENABLE_OVERLOADING)
        markupParser_error                      ,
    #endif
        setMarkupParserError                    ,

    -- ** passthrough #attr:passthrough#
    -- | Callback to invoke for comments, processing instructions
    --     and doctype declarations; if you\'re re-writing the parsed document,
    --     write the passthrough text back out in the same position. If the
    --     'GI.GLib.Flags.MarkupParseFlagsTreatCdataAsText' flag is not set, this function is also
    --     called for CDATA marked sections.

        clearMarkupParserPassthrough            ,
        getMarkupParserPassthrough              ,
    #if defined(ENABLE_OVERLOADING)
        markupParser_passthrough                ,
    #endif
        setMarkupParserPassthrough              ,

    -- ** startElement #attr:startElement#
    -- | Callback to invoke when the opening tag of an element
    --     is seen. The callback\'s /@attributeNames@/ and /@attributeValues@/ parameters
    --     are 'P.Nothing'-terminated.

        clearMarkupParserStartElement           ,
        getMarkupParserStartElement             ,
    #if defined(ENABLE_OVERLOADING)
        markupParser_startElement               ,
    #endif
        setMarkupParserStartElement             ,

    -- ** text #attr:text#
    -- | Callback to invoke when some text is seen (text is always
    --     inside an element). Note that the text of an element may be spread
    --     over multiple calls of this function. If the
    --     'GI.GLib.Flags.MarkupParseFlagsTreatCdataAsText' flag is set, this function is also
    --     called for the content of CDATA marked sections.

        clearMarkupParserText                   ,
        getMarkupParserText                     ,
    #if defined(ENABLE_OVERLOADING)
        markupParser_text                       ,
    #endif
        setMarkupParserText                     ,

        ) 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.Callbacks as GLib.Callbacks

    #else
    import qualified GI.GLib.Callbacks as GLib.Callbacks

    #endif

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

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

    instance BoxedPtr MarkupParser where
        boxedPtrCopy :: MarkupParser -> IO MarkupParser
    boxedPtrCopy = \MarkupParser
    p -> MarkupParser
    -> (Ptr MarkupParser -> IO MarkupParser) -> IO MarkupParser
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr MarkupParser
    p (Int -> Ptr MarkupParser -> IO (Ptr MarkupParser)
    forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
    copyBytes Int
    40 (Ptr MarkupParser -> IO (Ptr MarkupParser))
    -> (Ptr MarkupParser -> IO MarkupParser)
    -> Ptr MarkupParser
    -> IO MarkupParser
    forall (m :: * -> *) a b c.
    Monad m =>
    (a -> m b) -> (b -> m c) -> a -> m c
    >=> (ManagedPtr MarkupParser -> MarkupParser)
    -> Ptr MarkupParser -> IO MarkupParser
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    B.ManagedPtr.wrapPtr ManagedPtr MarkupParser -> MarkupParser
    MarkupParser)
        boxedPtrFree :: MarkupParser -> IO ()
    boxedPtrFree = \MarkupParser
    x -> MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    SP.withManagedPtr MarkupParser
    x Ptr MarkupParser -> IO ()
    forall a. Ptr a -> IO ()
    SP.freeMem
    instance CallocPtr MarkupParser where
        boxedPtrCalloc :: IO (Ptr MarkupParser)
    boxedPtrCalloc = Int -> IO (Ptr MarkupParser)
    forall a. Int -> IO (Ptr a)
    callocBytes Int
    40

    -- | Construct a `MarkupParser` struct initialized to zero.
    newZeroMarkupParser :: MonadIO m => m MarkupParser
    newZeroMarkupParser :: forall (m :: * -> *). MonadIO m => m MarkupParser
    newZeroMarkupParser = IO MarkupParser -> m MarkupParser
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO MarkupParser -> m MarkupParser)
    -> IO MarkupParser -> m MarkupParser
    forall a b. (a -> b) -> a -> b
    $ IO (Ptr MarkupParser)
    forall a. CallocPtr a => IO (Ptr a)
    boxedPtrCalloc IO (Ptr MarkupParser)
    -> (Ptr MarkupParser -> IO MarkupParser) -> IO MarkupParser
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (ManagedPtr MarkupParser -> MarkupParser)
    -> Ptr MarkupParser -> IO MarkupParser
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    wrapPtr ManagedPtr MarkupParser -> MarkupParser
    MarkupParser

    instance tag ~ 'AttrSet => Constructible MarkupParser tag where
        new :: forall (m :: * -> *).
    MonadIO m =>
    (ManagedPtr MarkupParser -> MarkupParser)
    -> [AttrOp MarkupParser tag] -> m MarkupParser
    new ManagedPtr MarkupParser -> MarkupParser
    _ [AttrOp MarkupParser tag]
    attrs = do
            MarkupParser
    o <- m MarkupParser
    forall (m :: * -> *). MonadIO m => m MarkupParser
    newZeroMarkupParser
            MarkupParser -> [AttrOp MarkupParser 'AttrSet] -> m ()
    forall o (m :: * -> *).
    MonadIO m =>
    o -> [AttrOp o 'AttrSet] -> m ()
    GI.Attributes.set MarkupParser
    o [AttrOp MarkupParser tag]
    [AttrOp MarkupParser 'AttrSet]
    attrs
            MarkupParser -> m MarkupParser
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return MarkupParser
    o

    -- | Get the value of the “@start_element@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' markupParser #startElement
    -- @
    getMarkupParserStartElement :: MonadIO m => MarkupParser -> m (Maybe GLib.Callbacks.MarkupParserStartElementFieldCallback_WithClosures)
    getMarkupParserStartElement :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    getMarkupParserStartElement MarkupParser
    s = IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
     -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ MarkupParser
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser
      -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures))
     -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures))
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        FunPtr C_MarkupParserStartElementFieldCallback
    val <- Ptr (FunPtr C_MarkupParserStartElementFieldCallback)
    -> IO (FunPtr C_MarkupParserStartElementFieldCallback)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserStartElementFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    0) :: IO (FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback)
        Maybe MarkupParserStartElementFieldCallback_WithClosures
    result <- FunPtr C_MarkupParserStartElementFieldCallback
    -> (FunPtr C_MarkupParserStartElementFieldCallback
        -> IO MarkupParserStartElementFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_MarkupParserStartElementFieldCallback
    val ((FunPtr C_MarkupParserStartElementFieldCallback
      -> IO MarkupParserStartElementFieldCallback_WithClosures)
     -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures))
    -> (FunPtr C_MarkupParserStartElementFieldCallback
        -> IO MarkupParserStartElementFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_MarkupParserStartElementFieldCallback
    val' -> do
            let val'' :: MarkupParserStartElementFieldCallback_WithClosures
    val'' = FunPtr C_MarkupParserStartElementFieldCallback
    -> MarkupParserStartElementFieldCallback_WithClosures
    forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserStartElementFieldCallback
    -> MarkupParseContext -> Text -> Text -> Text -> Ptr () -> m ()
    GLib.Callbacks.dynamic_MarkupParserStartElementFieldCallback FunPtr C_MarkupParserStartElementFieldCallback
    val'
            MarkupParserStartElementFieldCallback_WithClosures
    -> IO MarkupParserStartElementFieldCallback_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return MarkupParserStartElementFieldCallback_WithClosures
    val''
        Maybe MarkupParserStartElementFieldCallback_WithClosures
    -> IO (Maybe MarkupParserStartElementFieldCallback_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe MarkupParserStartElementFieldCallback_WithClosures
    result

    -- | Set the value of the “@start_element@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' markupParser [ #startElement 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setMarkupParserStartElement :: MonadIO m => MarkupParser -> FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback -> m ()
    setMarkupParserStartElement :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> FunPtr C_MarkupParserStartElementFieldCallback -> m ()
    setMarkupParserStartElement MarkupParser
    s FunPtr C_MarkupParserStartElementFieldCallback
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserStartElementFieldCallback)
    -> FunPtr C_MarkupParserStartElementFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserStartElementFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    0) (FunPtr C_MarkupParserStartElementFieldCallback
    val :: FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback)

    -- | Set the value of the “@start_element@” field to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #startElement
    -- @
    clearMarkupParserStartElement :: MonadIO m => MarkupParser -> m ()
    clearMarkupParserStartElement :: forall (m :: * -> *). MonadIO m => MarkupParser -> m ()
    clearMarkupParserStartElement MarkupParser
    s = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserStartElementFieldCallback)
    -> FunPtr C_MarkupParserStartElementFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserStartElementFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    0) (FunPtr C_MarkupParserStartElementFieldCallback
    forall a. FunPtr a
    FP.nullFunPtr :: FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback)

    #if defined(ENABLE_OVERLOADING)
    data MarkupParserStartElementFieldInfo
    instance AttrInfo MarkupParserStartElementFieldInfo where
        type AttrBaseTypeConstraint MarkupParserStartElementFieldInfo = (~) MarkupParser
        type AttrAllowedOps MarkupParserStartElementFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint MarkupParserStartElementFieldInfo = (~) (FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback)
        type AttrTransferTypeConstraint MarkupParserStartElementFieldInfo = (~)(FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback)
        type AttrTransferType MarkupParserStartElementFieldInfo = (FunPtr GLib.Callbacks.C_MarkupParserStartElementFieldCallback)
        type AttrGetType MarkupParserStartElementFieldInfo = Maybe GLib.Callbacks.MarkupParserStartElementFieldCallback_WithClosures
        type AttrLabel MarkupParserStartElementFieldInfo = "start_element"
        type AttrOrigin MarkupParserStartElementFieldInfo = MarkupParser
        attrGet = getMarkupParserStartElement
        attrSet = setMarkupParserStartElement
        attrConstruct = undefined
        attrClear = clearMarkupParserStartElement
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GLib.Structs.MarkupParser.startElement"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-MarkupParser.html#g:attr:startElement"
            })

    markupParser_startElement :: AttrLabelProxy "startElement"
    markupParser_startElement = AttrLabelProxy

    #endif

    -- | Get the value of the “@end_element@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' markupParser #endElement
    -- @
    getMarkupParserEndElement :: MonadIO m => MarkupParser -> m (Maybe GLib.Callbacks.MarkupParserEndElementFieldCallback_WithClosures)
    getMarkupParserEndElement :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    getMarkupParserEndElement MarkupParser
    s = IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
     -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ MarkupParser
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser
      -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures))
     -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures))
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        FunPtr C_MarkupParserEndElementFieldCallback
    val <- Ptr (FunPtr C_MarkupParserEndElementFieldCallback)
    -> IO (FunPtr C_MarkupParserEndElementFieldCallback)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserEndElementFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    8) :: IO (FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback)
        Maybe MarkupParserEndElementFieldCallback_WithClosures
    result <- FunPtr C_MarkupParserEndElementFieldCallback
    -> (FunPtr C_MarkupParserEndElementFieldCallback
        -> IO MarkupParserEndElementFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_MarkupParserEndElementFieldCallback
    val ((FunPtr C_MarkupParserEndElementFieldCallback
      -> IO MarkupParserEndElementFieldCallback_WithClosures)
     -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures))
    -> (FunPtr C_MarkupParserEndElementFieldCallback
        -> IO MarkupParserEndElementFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_MarkupParserEndElementFieldCallback
    val' -> do
            let val'' :: MarkupParserEndElementFieldCallback_WithClosures
    val'' = FunPtr C_MarkupParserEndElementFieldCallback
    -> MarkupParserEndElementFieldCallback_WithClosures
    forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserEndElementFieldCallback
    -> MarkupParseContext -> Text -> Ptr () -> m ()
    GLib.Callbacks.dynamic_MarkupParserEndElementFieldCallback FunPtr C_MarkupParserEndElementFieldCallback
    val'
            MarkupParserEndElementFieldCallback_WithClosures
    -> IO MarkupParserEndElementFieldCallback_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return MarkupParserEndElementFieldCallback_WithClosures
    val''
        Maybe MarkupParserEndElementFieldCallback_WithClosures
    -> IO (Maybe MarkupParserEndElementFieldCallback_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe MarkupParserEndElementFieldCallback_WithClosures
    result

    -- | Set the value of the “@end_element@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' markupParser [ #endElement 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setMarkupParserEndElement :: MonadIO m => MarkupParser -> FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback -> m ()
    setMarkupParserEndElement :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> FunPtr C_MarkupParserEndElementFieldCallback -> m ()
    setMarkupParserEndElement MarkupParser
    s FunPtr C_MarkupParserEndElementFieldCallback
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserEndElementFieldCallback)
    -> FunPtr C_MarkupParserEndElementFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserEndElementFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    8) (FunPtr C_MarkupParserEndElementFieldCallback
    val :: FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback)

    -- | Set the value of the “@end_element@” field to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #endElement
    -- @
    clearMarkupParserEndElement :: MonadIO m => MarkupParser -> m ()
    clearMarkupParserEndElement :: forall (m :: * -> *). MonadIO m => MarkupParser -> m ()
    clearMarkupParserEndElement MarkupParser
    s = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserEndElementFieldCallback)
    -> FunPtr C_MarkupParserEndElementFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserEndElementFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    8) (FunPtr C_MarkupParserEndElementFieldCallback
    forall a. FunPtr a
    FP.nullFunPtr :: FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback)

    #if defined(ENABLE_OVERLOADING)
    data MarkupParserEndElementFieldInfo
    instance AttrInfo MarkupParserEndElementFieldInfo where
        type AttrBaseTypeConstraint MarkupParserEndElementFieldInfo = (~) MarkupParser
        type AttrAllowedOps MarkupParserEndElementFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint MarkupParserEndElementFieldInfo = (~) (FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback)
        type AttrTransferTypeConstraint MarkupParserEndElementFieldInfo = (~)(FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback)
        type AttrTransferType MarkupParserEndElementFieldInfo = (FunPtr GLib.Callbacks.C_MarkupParserEndElementFieldCallback)
        type AttrGetType MarkupParserEndElementFieldInfo = Maybe GLib.Callbacks.MarkupParserEndElementFieldCallback_WithClosures
        type AttrLabel MarkupParserEndElementFieldInfo = "end_element"
        type AttrOrigin MarkupParserEndElementFieldInfo = MarkupParser
        attrGet = getMarkupParserEndElement
        attrSet = setMarkupParserEndElement
        attrConstruct = undefined
        attrClear = clearMarkupParserEndElement
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GLib.Structs.MarkupParser.endElement"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-MarkupParser.html#g:attr:endElement"
            })

    markupParser_endElement :: AttrLabelProxy "endElement"
    markupParser_endElement = AttrLabelProxy

    #endif

    -- | Get the value of the “@text@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' markupParser #text
    -- @
    getMarkupParserText :: MonadIO m => MarkupParser -> m (Maybe GLib.Callbacks.MarkupParserTextFieldCallback_WithClosures)
    getMarkupParserText :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
    getMarkupParserText MarkupParser
    s = IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe MarkupParserTextFieldCallback_WithClosures)
     -> m (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ MarkupParser
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser
      -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
     -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        FunPtr C_MarkupParserTextFieldCallback
    val <- Ptr (FunPtr C_MarkupParserTextFieldCallback)
    -> IO (FunPtr C_MarkupParserTextFieldCallback)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserTextFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    16) :: IO (FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback)
        Maybe MarkupParserTextFieldCallback_WithClosures
    result <- FunPtr C_MarkupParserTextFieldCallback
    -> (FunPtr C_MarkupParserTextFieldCallback
        -> IO MarkupParserTextFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_MarkupParserTextFieldCallback
    val ((FunPtr C_MarkupParserTextFieldCallback
      -> IO MarkupParserTextFieldCallback_WithClosures)
     -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> (FunPtr C_MarkupParserTextFieldCallback
        -> IO MarkupParserTextFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_MarkupParserTextFieldCallback
    val' -> do
            let val'' :: MarkupParserTextFieldCallback_WithClosures
    val'' = FunPtr C_MarkupParserTextFieldCallback
    -> MarkupParserTextFieldCallback_WithClosures
    forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserTextFieldCallback
    -> MarkupParseContext -> Text -> CSize -> Ptr () -> m ()
    GLib.Callbacks.dynamic_MarkupParserTextFieldCallback FunPtr C_MarkupParserTextFieldCallback
    val'
            MarkupParserTextFieldCallback_WithClosures
    -> IO MarkupParserTextFieldCallback_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return MarkupParserTextFieldCallback_WithClosures
    val''
        Maybe MarkupParserTextFieldCallback_WithClosures
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe MarkupParserTextFieldCallback_WithClosures
    result

    -- | Set the value of the “@text@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' markupParser [ #text 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setMarkupParserText :: MonadIO m => MarkupParser -> FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback -> m ()
    setMarkupParserText :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m ()
    setMarkupParserText MarkupParser
    s FunPtr C_MarkupParserTextFieldCallback
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserTextFieldCallback)
    -> FunPtr C_MarkupParserTextFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserTextFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    16) (FunPtr C_MarkupParserTextFieldCallback
    val :: FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback)

    -- | Set the value of the “@text@” field to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #text
    -- @
    clearMarkupParserText :: MonadIO m => MarkupParser -> m ()
    clearMarkupParserText :: forall (m :: * -> *). MonadIO m => MarkupParser -> m ()
    clearMarkupParserText MarkupParser
    s = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserTextFieldCallback)
    -> FunPtr C_MarkupParserTextFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserTextFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    16) (FunPtr C_MarkupParserTextFieldCallback
    forall a. FunPtr a
    FP.nullFunPtr :: FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback)

    #if defined(ENABLE_OVERLOADING)
    data MarkupParserTextFieldInfo
    instance AttrInfo MarkupParserTextFieldInfo where
        type AttrBaseTypeConstraint MarkupParserTextFieldInfo = (~) MarkupParser
        type AttrAllowedOps MarkupParserTextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint MarkupParserTextFieldInfo = (~) (FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback)
        type AttrTransferTypeConstraint MarkupParserTextFieldInfo = (~)(FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback)
        type AttrTransferType MarkupParserTextFieldInfo = (FunPtr GLib.Callbacks.C_MarkupParserTextFieldCallback)
        type AttrGetType MarkupParserTextFieldInfo = Maybe GLib.Callbacks.MarkupParserTextFieldCallback_WithClosures
        type AttrLabel MarkupParserTextFieldInfo = "text"
        type AttrOrigin MarkupParserTextFieldInfo = MarkupParser
        attrGet = getMarkupParserText
        attrSet = setMarkupParserText
        attrConstruct = undefined
        attrClear = clearMarkupParserText
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GLib.Structs.MarkupParser.text"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-MarkupParser.html#g:attr:text"
            })

    markupParser_text :: AttrLabelProxy "text"
    markupParser_text = AttrLabelProxy

    #endif

    -- | Get the value of the “@passthrough@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' markupParser #passthrough
    -- @
    getMarkupParserPassthrough :: MonadIO m => MarkupParser -> m (Maybe GLib.Callbacks.MarkupParserPassthroughFieldCallback_WithClosures)
    getMarkupParserPassthrough :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
    getMarkupParserPassthrough MarkupParser
    s = IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe MarkupParserTextFieldCallback_WithClosures)
     -> m (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ MarkupParser
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser
      -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
     -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        FunPtr C_MarkupParserTextFieldCallback
    val <- Ptr (FunPtr C_MarkupParserTextFieldCallback)
    -> IO (FunPtr C_MarkupParserTextFieldCallback)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserTextFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    24) :: IO (FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback)
        Maybe MarkupParserTextFieldCallback_WithClosures
    result <- FunPtr C_MarkupParserTextFieldCallback
    -> (FunPtr C_MarkupParserTextFieldCallback
        -> IO MarkupParserTextFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_MarkupParserTextFieldCallback
    val ((FunPtr C_MarkupParserTextFieldCallback
      -> IO MarkupParserTextFieldCallback_WithClosures)
     -> IO (Maybe MarkupParserTextFieldCallback_WithClosures))
    -> (FunPtr C_MarkupParserTextFieldCallback
        -> IO MarkupParserTextFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_MarkupParserTextFieldCallback
    val' -> do
            let val'' :: MarkupParserTextFieldCallback_WithClosures
    val'' = FunPtr C_MarkupParserTextFieldCallback
    -> MarkupParserTextFieldCallback_WithClosures
    forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserTextFieldCallback
    -> MarkupParseContext -> Text -> CSize -> Ptr () -> m ()
    GLib.Callbacks.dynamic_MarkupParserPassthroughFieldCallback FunPtr C_MarkupParserTextFieldCallback
    val'
            MarkupParserTextFieldCallback_WithClosures
    -> IO MarkupParserTextFieldCallback_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return MarkupParserTextFieldCallback_WithClosures
    val''
        Maybe MarkupParserTextFieldCallback_WithClosures
    -> IO (Maybe MarkupParserTextFieldCallback_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe MarkupParserTextFieldCallback_WithClosures
    result

    -- | Set the value of the “@passthrough@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' markupParser [ #passthrough 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setMarkupParserPassthrough :: MonadIO m => MarkupParser -> FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback -> m ()
    setMarkupParserPassthrough :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m ()
    setMarkupParserPassthrough MarkupParser
    s FunPtr C_MarkupParserTextFieldCallback
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserTextFieldCallback)
    -> FunPtr C_MarkupParserTextFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserTextFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    24) (FunPtr C_MarkupParserTextFieldCallback
    val :: FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback)

    -- | Set the value of the “@passthrough@” field to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #passthrough
    -- @
    clearMarkupParserPassthrough :: MonadIO m => MarkupParser -> m ()
    clearMarkupParserPassthrough :: forall (m :: * -> *). MonadIO m => MarkupParser -> m ()
    clearMarkupParserPassthrough MarkupParser
    s = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserTextFieldCallback)
    -> FunPtr C_MarkupParserTextFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserTextFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    24) (FunPtr C_MarkupParserTextFieldCallback
    forall a. FunPtr a
    FP.nullFunPtr :: FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback)

    #if defined(ENABLE_OVERLOADING)
    data MarkupParserPassthroughFieldInfo
    instance AttrInfo MarkupParserPassthroughFieldInfo where
        type AttrBaseTypeConstraint MarkupParserPassthroughFieldInfo = (~) MarkupParser
        type AttrAllowedOps MarkupParserPassthroughFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint MarkupParserPassthroughFieldInfo = (~) (FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback)
        type AttrTransferTypeConstraint MarkupParserPassthroughFieldInfo = (~)(FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback)
        type AttrTransferType MarkupParserPassthroughFieldInfo = (FunPtr GLib.Callbacks.C_MarkupParserPassthroughFieldCallback)
        type AttrGetType MarkupParserPassthroughFieldInfo = Maybe GLib.Callbacks.MarkupParserPassthroughFieldCallback_WithClosures
        type AttrLabel MarkupParserPassthroughFieldInfo = "passthrough"
        type AttrOrigin MarkupParserPassthroughFieldInfo = MarkupParser
        attrGet = getMarkupParserPassthrough
        attrSet = setMarkupParserPassthrough
        attrConstruct = undefined
        attrClear = clearMarkupParserPassthrough
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GLib.Structs.MarkupParser.passthrough"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-MarkupParser.html#g:attr:passthrough"
            })

    markupParser_passthrough :: AttrLabelProxy "passthrough"
    markupParser_passthrough = AttrLabelProxy

    #endif

    -- | Get the value of the “@error@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' markupParser #error
    -- @
    getMarkupParserError :: MonadIO m => MarkupParser -> m (Maybe GLib.Callbacks.MarkupParserErrorFieldCallback_WithClosures)
    getMarkupParserError :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser
    -> m (Maybe MarkupParserErrorFieldCallback_WithClosures)
    getMarkupParserError MarkupParser
    s = IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    -> m (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
     -> m (Maybe MarkupParserErrorFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    -> m (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ MarkupParser
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser
      -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures))
     -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures))
    -> (Ptr MarkupParser
        -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures))
    -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        FunPtr C_MarkupParserErrorFieldCallback
    val <- Ptr (FunPtr C_MarkupParserErrorFieldCallback)
    -> IO (FunPtr C_MarkupParserErrorFieldCallback)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserErrorFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    32) :: IO (FunPtr GLib.Callbacks.C_MarkupParserErrorFieldCallback)
        Maybe MarkupParserErrorFieldCallback_WithClosures
    result <- FunPtr C_MarkupParserErrorFieldCallback
    -> (FunPtr C_MarkupParserErrorFieldCallback
        -> IO MarkupParserErrorFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_MarkupParserErrorFieldCallback
    val ((FunPtr C_MarkupParserErrorFieldCallback
      -> IO MarkupParserErrorFieldCallback_WithClosures)
     -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures))
    -> (FunPtr C_MarkupParserErrorFieldCallback
        -> IO MarkupParserErrorFieldCallback_WithClosures)
    -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_MarkupParserErrorFieldCallback
    val' -> do
            let val'' :: MarkupParserErrorFieldCallback_WithClosures
    val'' = FunPtr C_MarkupParserErrorFieldCallback
    -> MarkupParserErrorFieldCallback_WithClosures
    forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserErrorFieldCallback
    -> MarkupParseContext -> GError -> Ptr () -> m ()
    GLib.Callbacks.dynamic_MarkupParserErrorFieldCallback FunPtr C_MarkupParserErrorFieldCallback
    val'
            MarkupParserErrorFieldCallback_WithClosures
    -> IO MarkupParserErrorFieldCallback_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return MarkupParserErrorFieldCallback_WithClosures
    val''
        Maybe MarkupParserErrorFieldCallback_WithClosures
    -> IO (Maybe MarkupParserErrorFieldCallback_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe MarkupParserErrorFieldCallback_WithClosures
    result

    -- | Set the value of the “@error@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' markupParser [ #error 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setMarkupParserError :: MonadIO m => MarkupParser -> FunPtr GLib.Callbacks.C_MarkupParserErrorFieldCallback -> m ()
    setMarkupParserError :: forall (m :: * -> *).
    MonadIO m =>
    MarkupParser -> FunPtr C_MarkupParserErrorFieldCallback -> m ()
    setMarkupParserError MarkupParser
    s FunPtr C_MarkupParserErrorFieldCallback
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserErrorFieldCallback)
    -> FunPtr C_MarkupParserErrorFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserErrorFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    32) (FunPtr C_MarkupParserErrorFieldCallback
    val :: FunPtr GLib.Callbacks.C_MarkupParserErrorFieldCallback)

    -- | Set the value of the “@error@” field to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #error
    -- @
    clearMarkupParserError :: MonadIO m => MarkupParser -> m ()
    clearMarkupParserError :: forall (m :: * -> *). MonadIO m => MarkupParser -> m ()
    clearMarkupParserError MarkupParser
    s = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ MarkupParser -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr MarkupParser
    s ((Ptr MarkupParser -> IO ()) -> IO ())
    -> (Ptr MarkupParser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr MarkupParser
    ptr -> do
        Ptr (FunPtr C_MarkupParserErrorFieldCallback)
    -> FunPtr C_MarkupParserErrorFieldCallback -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr MarkupParser
    ptr Ptr MarkupParser
    -> Int -> Ptr (FunPtr C_MarkupParserErrorFieldCallback)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    32) (FunPtr C_MarkupParserErrorFieldCallback
    forall a. FunPtr a
    FP.nullFunPtr :: FunPtr GLib.Callbacks.C_MarkupParserErrorFieldCallback)

    #if defined(ENABLE_OVERLOADING)
    data MarkupParserErrorFieldInfo
    instance AttrInfo MarkupParserErrorFieldInfo where
        type AttrBaseTypeConstraint MarkupParserErrorFieldInfo = (~) MarkupParser
        type AttrAllowedOps MarkupParserErrorFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint MarkupParserErrorFieldInfo = (~) (FunPtr GLib.Callbacks.C_MarkupParserErrorFieldCallback)
        type AttrTransferTypeConstraint MarkupParserErrorFieldInfo = (~)GLib.Callbacks.MarkupParserErrorFieldCallback_WithClosures
        type AttrTransferType MarkupParserErrorFieldInfo = (FunPtr GLib.Callbacks.C_MarkupParserErrorFieldCallback)
        type AttrGetType MarkupParserErrorFieldInfo = Maybe GLib.Callbacks.MarkupParserErrorFieldCallback_WithClosures
        type AttrLabel MarkupParserErrorFieldInfo = "error"
        type AttrOrigin MarkupParserErrorFieldInfo = MarkupParser
        attrGet = getMarkupParserError
        attrSet = setMarkupParserError
        attrConstruct = undefined
        attrClear = clearMarkupParserError
        attrTransfer _ v = do
            GLib.Callbacks.mk_MarkupParserErrorFieldCallback (GLib.Callbacks.wrap_MarkupParserErrorFieldCallback Nothing v)
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GLib.Structs.MarkupParser.error"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-MarkupParser.html#g:attr:error"
            })

    markupParser_error :: AttrLabelProxy "error"
    markupParser_error = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList MarkupParser
    type instance O.AttributeList MarkupParser = MarkupParserAttributeList
    type MarkupParserAttributeList = ('[ '("startElement", MarkupParserStartElementFieldInfo), '("endElement", MarkupParserEndElementFieldInfo), '("text", MarkupParserTextFieldInfo), '("passthrough", MarkupParserPassthroughFieldInfo), '("error", MarkupParserErrorFieldInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolveMarkupParserMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveMarkupParserMethod l o = O.MethodResolutionFailed l o

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

    #endif

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

    #endif