    {-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- A paintable implementation that renders (a subset of) SVG,
    -- with animations.
    --
    -- @GtkSvg@ objects are created by parsing a subset of SVG,
    -- including SVG animations.
    --
    -- The @GtkSvg@ fills or strokes paths with symbolic or fixed
    -- colors. It can have multiple states, and paths can be included
    -- in a subset of the states. The special \'empty\' state is always
    --
    -- available. States can have animation, and the transition between
    -- different states can also be animated.
    --
    -- To find out what states a @GtkSvg@ has, use 'GI.Gtk.Objects.Svg.svgGetNStates'.
    -- To set the current state, use 'GI.Gtk.Objects.Svg.svgSetState'.
    --
    -- To play the animations in an SVG file, use
    -- 'GI.Gtk.Objects.Svg.svgSetFrameClock' to connect the paintable to a frame clock,
    -- and then use 'GI.Gtk.Objects.Svg.svgPlay' to start the animation.
    --
    --
    -- == Error handling
    --
    -- Loading an SVG into @GtkSvg@ will always produce a (possibly empty)
    -- paintable. GTK will drop things that it can\'t handle and try to make
    -- sense of the rest.
    --
    -- To track errors during parsing or rendering, connect to the
    -- [Svg::error]("GI.Gtk.Objects.Svg#g:signal:error") signal.
    --
    -- For parsing errors in the @GTK_SVG_ERROR@ domain, the functions
    -- t'GI.Gtk.Enums.SvgError'.@/get_start/@(), t'GI.Gtk.Enums.SvgError'.@/get_end/@(),
    -- t'GI.Gtk.Enums.SvgError'.@/get_element/@() and t'GI.Gtk.Enums.SvgError'.@/get_attribute/@()
    -- can be used to obtain information about where the error occurred.
    --
    --
    -- == The supported subset of SVG
    --
    -- The paintable supports much of SVG 2, some notable exceptions.
    --
    -- Among the graphical elements, @\<textPath>@ and @\<foreignObject>@
    -- are not supported.
    --
    -- Among the structural elements, @\<a>@, @\<switch>@ and @\<view>@
    -- are not supported.
    --
    -- All filter functions are supported, plus a custom @alpha-level()@
    -- function, which implements one particular case of feComponentTransfer.
    --
    -- In the @\<filter>@ element, the following primitives are not
    -- supported: feConvolveMatrix, feDiffuseLighting,
    -- feMorphology, feSpecularLighting and feTurbulence.
    --
    -- The support for the @mask@ attribute is limited to just a url
    -- referring to the @\<mask>@ element by ID.
    --
    -- In animation elements, the parsing of @begin@ and @end@ attributes
    -- is limited, and the @min@ and @max@ attributes are not supported.
    --
    -- Lastly, there is only minimal CSS support (the style attribute,
    -- but not @\<style>@), and no interactivity.
    --
    --
    -- == SVG Extensions
    --
    -- The paintable supports a number of <https://docs.gtk.org/gtk4/icon-format.html custom attributes>
    -- that offer a convenient way to define states, transitions and animations.
    -- For example,
    --
    --     \<circle cx=\'5\' cy=\'5\' r=\'5\'
    --             gpa:states=\'0 1\'
    --             gpa:animation-type=\'automatic\'
    --             gpa:animation-direction=\'segment\'
    --             gpa:animation-duration=\'600ms\'\/>
    --
    -- defines the circle to be shown in states 0 and 1, and animates a segment
    -- of the circle.
    --
    -- \<image src=\"svg-renderer1.svg\">
    --
    -- Note that the generated animations assume a @pathLengh@ value of 1.
    -- Setting @pathLength@ in your SVG is therefore going to interfere with
    -- generated animations.
    --
    -- To connect general SVG animations to the states of the paintable,
    -- use the custom @gpa:states(...)@ condition in the @begin@ and @end@
    -- attributes of SVG animation elements. For example,
    --
    --     \<animate href=\'path1\'
    --              attributeName=\'fill\'
    --              begin=\'gpa:states(0).begin\'
    --              dur=\'300ms\'
    --              fill=\'freeze\'
    --              from=\'black\'
    --              to=\'magenta\'\/>
    --
    -- will make the fill color of path1 transition from black to
    -- magenta when the renderer enters state 0.
    --
    -- \<image src=\"svg-renderer2.svg\">
    --
    -- The @gpa:states(...)@ condition triggers for upcoming state changes
    -- as well, to support fade-out transitions. For example,
    --
    --     \<animate href=\'path1\'
    --              attributeName=\'opacity\'
    --              begin=\'gpa:states(0).end -300ms\'
    --              dur=\'300ms\'
    --              fill=\'freeze\'
    --              from=\'1\'
    --              to=\'0\'\/>
    --
    -- will start a fade-out of path1 300ms before state 0 ends.
    --
    -- In addition to @gpa:fill@ and @gpa:stroke@, symbolic colors can
    -- also be specified as a custom paint server reference, like this:
    -- @url(gpa:#warning)@. This works in @fill@ and @stroke@ attributes,
    -- but also when specifying colors in SVG animation attributes like
    -- @to@ or @values@.
    --
    -- Note that the SVG syntax allows for a fallback RGB color to be
    -- specified after the url, for compatibility with other SVG consumers:
    --
    --     fill=\'url(gpa:@/warning/@) orange\'
    --
    -- In contrast to SVG 1.1 and 2.0, we allow the @transform@ attribute
    -- to be animated with @\<animate>@.
    --
    -- /Since: 4.22/

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

    module GI.Gtk.Objects.Svg
        (

    -- * Exported types
        Svg(..)                                 ,
        IsSvg                                   ,
        toSvg                                   ,

     -- * 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"), [computeConcreteSize]("GI.Gdk.Interfaces.Paintable#g:method:computeConcreteSize"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [invalidateContents]("GI.Gdk.Interfaces.Paintable#g:method:invalidateContents"), [invalidateSize]("GI.Gdk.Interfaces.Paintable#g:method:invalidateSize"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [loadFromBytes]("GI.Gtk.Objects.Svg#g:method:loadFromBytes"), [loadFromResource]("GI.Gtk.Objects.Svg#g:method:loadFromResource"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [pause]("GI.Gtk.Objects.Svg#g:method:pause"), [play]("GI.Gtk.Objects.Svg#g:method:play"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [serialize]("GI.Gtk.Objects.Svg#g:method:serialize"), [snapshot]("GI.Gdk.Interfaces.Paintable#g:method:snapshot"), [snapshotSymbolic]("GI.Gtk.Interfaces.SymbolicPaintable#g:method:snapshotSymbolic"), [snapshotWithWeight]("GI.Gtk.Interfaces.SymbolicPaintable#g:method:snapshotWithWeight"), [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"), [writeToFile]("GI.Gtk.Objects.Svg#g:method:writeToFile").
    --
    -- ==== Getters
    -- [getCurrentImage]("GI.Gdk.Interfaces.Paintable#g:method:getCurrentImage"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getFeatures]("GI.Gtk.Objects.Svg#g:method:getFeatures"), [getFlags]("GI.Gdk.Interfaces.Paintable#g:method:getFlags"), [getIntrinsicAspectRatio]("GI.Gdk.Interfaces.Paintable#g:method:getIntrinsicAspectRatio"), [getIntrinsicHeight]("GI.Gdk.Interfaces.Paintable#g:method:getIntrinsicHeight"), [getIntrinsicWidth]("GI.Gdk.Interfaces.Paintable#g:method:getIntrinsicWidth"), [getNStates]("GI.Gtk.Objects.Svg#g:method:getNStates"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getState]("GI.Gtk.Objects.Svg#g:method:getState"), [getWeight]("GI.Gtk.Objects.Svg#g:method:getWeight").
    --
    -- ==== Setters
    -- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setFeatures]("GI.Gtk.Objects.Svg#g:method:setFeatures"), [setFrameClock]("GI.Gtk.Objects.Svg#g:method:setFrameClock"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setState]("GI.Gtk.Objects.Svg#g:method:setState"), [setWeight]("GI.Gtk.Objects.Svg#g:method:setWeight").

    #if defined(ENABLE_OVERLOADING)
        ResolveSvgMethod                        ,
    #endif

    -- ** getFeatures #method:getFeatures#

    #if defined(ENABLE_OVERLOADING)
        SvgGetFeaturesMethodInfo                ,
    #endif
        svgGetFeatures                          ,

    -- ** getNStates #method:getNStates#

    #if defined(ENABLE_OVERLOADING)
        SvgGetNStatesMethodInfo                 ,
    #endif
        svgGetNStates                           ,

    -- ** getState #method:getState#

    #if defined(ENABLE_OVERLOADING)
        SvgGetStateMethodInfo                   ,
    #endif
        svgGetState                             ,

    -- ** getWeight #method:getWeight#

    #if defined(ENABLE_OVERLOADING)
        SvgGetWeightMethodInfo                  ,
    #endif
        svgGetWeight                            ,

    -- ** loadFromBytes #method:loadFromBytes#

    #if defined(ENABLE_OVERLOADING)
        SvgLoadFromBytesMethodInfo              ,
    #endif
        svgLoadFromBytes                        ,

    -- ** loadFromResource #method:loadFromResource#

    #if defined(ENABLE_OVERLOADING)
        SvgLoadFromResourceMethodInfo           ,
    #endif
        svgLoadFromResource                     ,

    -- ** new #method:new#

        svgNew                                  ,

    -- ** newFromBytes #method:newFromBytes#

        svgNewFromBytes                         ,

    -- ** newFromResource #method:newFromResource#

        svgNewFromResource                      ,

    -- ** pause #method:pause#

    #if defined(ENABLE_OVERLOADING)
        SvgPauseMethodInfo                      ,
    #endif
        svgPause                                ,

    -- ** play #method:play#

    #if defined(ENABLE_OVERLOADING)
        SvgPlayMethodInfo                       ,
    #endif
        svgPlay                                 ,

    -- ** serialize #method:serialize#

    #if defined(ENABLE_OVERLOADING)
        SvgSerializeMethodInfo                  ,
    #endif
        svgSerialize                            ,

    -- ** setFeatures #method:setFeatures#

    #if defined(ENABLE_OVERLOADING)
        SvgSetFeaturesMethodInfo                ,
    #endif
        svgSetFeatures                          ,

    -- ** setFrameClock #method:setFrameClock#

    #if defined(ENABLE_OVERLOADING)
        SvgSetFrameClockMethodInfo              ,
    #endif
        svgSetFrameClock                        ,

    -- ** setState #method:setState#

    #if defined(ENABLE_OVERLOADING)
        SvgSetStateMethodInfo                   ,
    #endif
        svgSetState                             ,

    -- ** setWeight #method:setWeight#

    #if defined(ENABLE_OVERLOADING)
        SvgSetWeightMethodInfo                  ,
    #endif
        svgSetWeight                            ,

    -- ** writeToFile #method:writeToFile#

    #if defined(ENABLE_OVERLOADING)
        SvgWriteToFileMethodInfo                ,
    #endif
        svgWriteToFile                          ,

     -- * Properties

    -- ** features #attr:features#
    -- | Enabled features for this paintable.
    --
    -- Note that features have to be set before
    -- loading SVG data to take effect.
    --
    -- /Since: 4.22/

    #if defined(ENABLE_OVERLOADING)
        SvgFeaturesPropertyInfo                 ,
    #endif
        constructSvgFeatures                    ,
        getSvgFeatures                          ,
        setSvgFeatures                          ,
    #if defined(ENABLE_OVERLOADING)
        svgFeatures                             ,
    #endif

    -- ** playing #attr:playing#
    -- | Whether the paintable is currently animating its content.
    --
    -- To set this property, use the 'GI.Gtk.Objects.Svg.svgPlay' and
    -- 'GI.Gtk.Objects.Svg.svgPause' functions.
    --
    -- /Since: 4.22/

    #if defined(ENABLE_OVERLOADING)
        SvgPlayingPropertyInfo                  ,
    #endif
        constructSvgPlaying                     ,
        getSvgPlaying                           ,
        setSvgPlaying                           ,
    #if defined(ENABLE_OVERLOADING)
        svgPlaying                              ,
    #endif

    -- ** resource #attr:resource#
    -- | Resource to load SVG data from.
    --
    -- This property is meant to create a paintable
    -- from a resource in ui files.
    --
    -- /Since: 4.22/

    #if defined(ENABLE_OVERLOADING)
        SvgResourcePropertyInfo                 ,
    #endif
        clearSvgResource                        ,
        constructSvgResource                    ,
        getSvgResource                          ,
        setSvgResource                          ,
    #if defined(ENABLE_OVERLOADING)
        svgResource                             ,
    #endif

    -- ** state #attr:state#
    -- | The current state of the renderer.
    --
    -- This can be a number between 0 and 63, or the special value
    -- @(unsigned int) -1@ to indicate the \'empty\' state in which
    -- nothing is drawn.
    --
    -- /Since: 4.22/

    #if defined(ENABLE_OVERLOADING)
        SvgStatePropertyInfo                    ,
    #endif
        constructSvgState                       ,
        getSvgState                             ,
        setSvgState                             ,
    #if defined(ENABLE_OVERLOADING)
        svgState                                ,
    #endif

    -- ** weight #attr:weight#
    -- | If not set to -1, this value overrides the weight used
    -- when rendering the paintable.
    --
    -- /Since: 4.22/

    #if defined(ENABLE_OVERLOADING)
        SvgWeightPropertyInfo                   ,
    #endif
        constructSvgWeight                      ,
        getSvgWeight                            ,
        setSvgWeight                            ,
    #if defined(ENABLE_OVERLOADING)
        svgWeight                               ,
    #endif

     -- * Signals

    -- ** error #signal:error#

        SvgErrorCallback                        ,
    #if defined(ENABLE_OVERLOADING)
        SvgErrorSignalInfo                      ,
    #endif
        afterSvgError                           ,
        onSvgError                              ,

        ) 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.Bytes as GLib.Bytes
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
    import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
    import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
    import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
    import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SymbolicPaintable as Gtk.SymbolicPaintable

    #else
    import qualified GI.GLib.Structs.Bytes as GLib.Bytes
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
    import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
    import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SymbolicPaintable as Gtk.SymbolicPaintable

    #endif

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

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

    foreign import ccall "gtk_svg_get_type"
        c_gtk_svg_get_type :: IO B.Types.GType

    instance B.Types.TypedObject Svg where
        glibType :: IO GType
    glibType = IO GType
    c_gtk_svg_get_type

    instance B.Types.GObject Svg

    -- | Type class for types which can be safely cast to t'Svg', for instance with `toSvg`.
    class (SP.GObject o, O.IsDescendantOf Svg o) => IsSvg o
    instance (SP.GObject o, O.IsDescendantOf Svg o) => IsSvg o

    instance O.HasParentTypes Svg
    type instance O.ParentTypes Svg = '[GObject.Object.Object, Gdk.Paintable.Paintable, Gtk.SymbolicPaintable.SymbolicPaintable]

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

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

    #if defined(ENABLE_OVERLOADING)
    type family ResolveSvgMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveSvgMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveSvgMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveSvgMethod "computeConcreteSize" o = Gdk.Paintable.PaintableComputeConcreteSizeMethodInfo
        ResolveSvgMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveSvgMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveSvgMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveSvgMethod "invalidateContents" o = Gdk.Paintable.PaintableInvalidateContentsMethodInfo
        ResolveSvgMethod "invalidateSize" o = Gdk.Paintable.PaintableInvalidateSizeMethodInfo
        ResolveSvgMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveSvgMethod "loadFromBytes" o = SvgLoadFromBytesMethodInfo
        ResolveSvgMethod "loadFromResource" o = SvgLoadFromResourceMethodInfo
        ResolveSvgMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveSvgMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveSvgMethod "pause" o = SvgPauseMethodInfo
        ResolveSvgMethod "play" o = SvgPlayMethodInfo
        ResolveSvgMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveSvgMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveSvgMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveSvgMethod "serialize" o = SvgSerializeMethodInfo
        ResolveSvgMethod "snapshot" o = Gdk.Paintable.PaintableSnapshotMethodInfo
        ResolveSvgMethod "snapshotSymbolic" o = Gtk.SymbolicPaintable.SymbolicPaintableSnapshotSymbolicMethodInfo
        ResolveSvgMethod "snapshotWithWeight" o = Gtk.SymbolicPaintable.SymbolicPaintableSnapshotWithWeightMethodInfo
        ResolveSvgMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveSvgMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveSvgMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveSvgMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveSvgMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveSvgMethod "writeToFile" o = SvgWriteToFileMethodInfo
        ResolveSvgMethod "getCurrentImage" o = Gdk.Paintable.PaintableGetCurrentImageMethodInfo
        ResolveSvgMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveSvgMethod "getFeatures" o = SvgGetFeaturesMethodInfo
        ResolveSvgMethod "getFlags" o = Gdk.Paintable.PaintableGetFlagsMethodInfo
        ResolveSvgMethod "getIntrinsicAspectRatio" o = Gdk.Paintable.PaintableGetIntrinsicAspectRatioMethodInfo
        ResolveSvgMethod "getIntrinsicHeight" o = Gdk.Paintable.PaintableGetIntrinsicHeightMethodInfo
        ResolveSvgMethod "getIntrinsicWidth" o = Gdk.Paintable.PaintableGetIntrinsicWidthMethodInfo
        ResolveSvgMethod "getNStates" o = SvgGetNStatesMethodInfo
        ResolveSvgMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveSvgMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveSvgMethod "getState" o = SvgGetStateMethodInfo
        ResolveSvgMethod "getWeight" o = SvgGetWeightMethodInfo
        ResolveSvgMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveSvgMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveSvgMethod "setFeatures" o = SvgSetFeaturesMethodInfo
        ResolveSvgMethod "setFrameClock" o = SvgSetFrameClockMethodInfo
        ResolveSvgMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveSvgMethod "setState" o = SvgSetStateMethodInfo
        ResolveSvgMethod "setWeight" o = SvgSetWeightMethodInfo
        ResolveSvgMethod l o = O.MethodResolutionFailed l o

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

    #endif

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

    #endif

    -- signal Svg::error
    -- | Signals that an error occurred.
    --
    -- Errors can occur both during parsing and during rendering.
    --
    -- The expected error values are in the [error/@gtk@/.SvgError] enumeration,
    -- context information about the location of parsing errors can
    -- be obtained with the various @gtk_svg_error@ functions.
    --
    -- Parsing errors are never fatal, so the parsing will resume after
    -- the error. Errors may however cause parts of the given data or
    -- even all of it to not be parsed at all. So it is a useful idea
    -- to check that the parsing succeeds by connecting to this signal.
    --
    -- ::: note
    --     This signal is emitted in the middle of parsing or rendering,
    --     and if you handle it, you must be careful. Logging the errors
    --     you receive is fine, but modifying the widget hierarchy or
    --     changing the paintable state definitively isn\'t.
    --
    --     If in doubt, defer to an idle.
    --
    -- /Since: 4.22/
    type SvgErrorCallback =
        GError
        -- ^ /@error@/: the error
        -> IO ()

    type C_SvgErrorCallback =
        Ptr Svg ->                              -- object
        Ptr GError ->
        Ptr () ->                               -- user_data
        IO ()

    -- | Generate a function pointer callable from C code, from a `C_SvgErrorCallback`.
    foreign import ccall "wrapper"
        mk_SvgErrorCallback :: C_SvgErrorCallback -> IO (FunPtr C_SvgErrorCallback)

    wrap_SvgErrorCallback ::
        GObject a => (a -> SvgErrorCallback) ->
        C_SvgErrorCallback
    wrap_SvgErrorCallback :: forall a.
    GObject a =>
    (a -> SvgErrorCallback) -> C_SvgErrorCallback
    wrap_SvgErrorCallback a -> SvgErrorCallback
    gi'cb Ptr Svg
    gi'selfPtr Ptr GError
    error_ Ptr ()
    _ = do
        error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
    forall a.
    (HasCallStack, GBoxed a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    newBoxed ManagedPtr GError -> GError
    GError) Ptr GError
    error_
        B.ManagedPtr.withNewObject gi'selfPtr $ \Svg
    gi'self -> a -> SvgErrorCallback
    gi'cb (Svg -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce Svg
    gi'self)  GError
    error_'

    -- | Connect a signal handler for the [error](#signal:error) signal, to be run before the default handler.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Signals.on' svg #error callback
    -- @
    --
    --
    onSvgError :: (IsSvg a, MonadIO m) => a -> ((?self :: a) => SvgErrorCallback) -> m SignalHandlerId
    onSvgError :: forall a (m :: * -> *).
    (IsSvg a, MonadIO m) =>
    a -> ((?self::a) => SvgErrorCallback) -> m SignalHandlerId
    onSvgError a
    obj (?self::a) => SvgErrorCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO SignalHandlerId -> m SignalHandlerId)
    -> IO SignalHandlerId -> m SignalHandlerId
    forall a b. (a -> b) -> a -> b
    $ do
        let wrapped :: a -> SvgErrorCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => SvgErrorCallback
    SvgErrorCallback
    cb
        let wrapped' :: C_SvgErrorCallback
    wrapped' = (a -> SvgErrorCallback) -> C_SvgErrorCallback
    forall a.
    GObject a =>
    (a -> SvgErrorCallback) -> C_SvgErrorCallback
    wrap_SvgErrorCallback a -> SvgErrorCallback
    wrapped
        wrapped'' <- C_SvgErrorCallback -> IO (FunPtr C_SvgErrorCallback)
    mk_SvgErrorCallback C_SvgErrorCallback
    wrapped'
        connectSignalFunPtr obj "error" wrapped'' SignalConnectBefore Nothing

    -- | Connect a signal handler for the [error](#signal:error) signal, to be run after the default handler.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Signals.after' svg #error callback
    -- @
    --
    --
    --
    -- By default the object invoking the signal is not passed to the callback.
    -- If you need to access it, you can use the implit @?self@ parameter.
    -- Note that this requires activating the @ImplicitParams@ GHC extension.
    --
    afterSvgError :: (IsSvg a, MonadIO m) => a -> ((?self :: a) => SvgErrorCallback) -> m SignalHandlerId
    afterSvgError :: forall a (m :: * -> *).
    (IsSvg a, MonadIO m) =>
    a -> ((?self::a) => SvgErrorCallback) -> m SignalHandlerId
    afterSvgError a
    obj (?self::a) => SvgErrorCallback
    cb = IO SignalHandlerId -> m SignalHandlerId
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO SignalHandlerId -> m SignalHandlerId)
    -> IO SignalHandlerId -> m SignalHandlerId
    forall a b. (a -> b) -> a -> b
    $ do
        let wrapped :: a -> SvgErrorCallback
    wrapped a
    self = let ?self = a
    ?self::a
    self in (?self::a) => SvgErrorCallback
    SvgErrorCallback
    cb
        let wrapped' :: C_SvgErrorCallback
    wrapped' = (a -> SvgErrorCallback) -> C_SvgErrorCallback
    forall a.
    GObject a =>
    (a -> SvgErrorCallback) -> C_SvgErrorCallback
    wrap_SvgErrorCallback a -> SvgErrorCallback
    wrapped
        wrapped'' <- C_SvgErrorCallback -> IO (FunPtr C_SvgErrorCallback)
    mk_SvgErrorCallback C_SvgErrorCallback
    wrapped'
        connectSignalFunPtr obj "error" wrapped'' SignalConnectAfter Nothing

    #if defined(ENABLE_OVERLOADING)
    data SvgErrorSignalInfo
    instance SignalInfo SvgErrorSignalInfo where
        type HaskellCallbackType SvgErrorSignalInfo = SvgErrorCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_SvgErrorCallback cb
            cb'' <- mk_SvgErrorCallback cb'
            connectSignalFunPtr obj "error" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg::error"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:signal:error"})

    #endif

    -- VVV Prop "features"
       -- Type: TInterface (Name {namespace = "Gtk", name = "SvgFeatures"})
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Just False,Just False)

    -- | Get the value of the “@features@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' svg #features
    -- @
    getSvgFeatures :: (MonadIO m, IsSvg o) => o -> m [Gtk.Flags.SvgFeatures]
    getSvgFeatures :: forall (m :: * -> *) o.
    (MonadIO m, IsSvg o) =>
    o -> m [SvgFeatures]
    getSvgFeatures o
    obj = IO [SvgFeatures] -> m [SvgFeatures]
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO [SvgFeatures] -> m [SvgFeatures])
    -> IO [SvgFeatures] -> m [SvgFeatures]
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO [SvgFeatures]
    forall a b.
    (GObject a, IsGFlag b, BoxedFlags b) =>
    a -> String -> IO [b]
    B.Properties.getObjectPropertyFlags o
    obj String
    "features"

    -- | Set the value of the “@features@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' svg [ #features 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setSvgFeatures :: (MonadIO m, IsSvg o) => o -> [Gtk.Flags.SvgFeatures] -> m ()
    setSvgFeatures :: forall (m :: * -> *) o.
    (MonadIO m, IsSvg o) =>
    o -> [SvgFeatures] -> m ()
    setSvgFeatures o
    obj [SvgFeatures]
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> [SvgFeatures] -> IO ()
    forall a b.
    (IsGFlag b, BoxedFlags b, GObject a) =>
    a -> String -> [b] -> IO ()
    B.Properties.setObjectPropertyFlags o
    obj String
    "features" [SvgFeatures]
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@features@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructSvgFeatures :: (IsSvg o, MIO.MonadIO m) => [Gtk.Flags.SvgFeatures] -> m (GValueConstruct o)
    constructSvgFeatures :: forall o (m :: * -> *).
    (IsSvg o, MonadIO m) =>
    [SvgFeatures] -> m (GValueConstruct o)
    constructSvgFeatures [SvgFeatures]
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> [SvgFeatures] -> IO (GValueConstruct o)
    forall a o.
    (IsGFlag a, BoxedFlags a) =>
    String -> [a] -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyFlags String
    "features" [SvgFeatures]
    val

    #if defined(ENABLE_OVERLOADING)
    data SvgFeaturesPropertyInfo
    instance AttrInfo SvgFeaturesPropertyInfo where
        type AttrAllowedOps SvgFeaturesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint SvgFeaturesPropertyInfo = IsSvg
        type AttrSetTypeConstraint SvgFeaturesPropertyInfo = (~) [Gtk.Flags.SvgFeatures]
        type AttrTransferTypeConstraint SvgFeaturesPropertyInfo = (~) [Gtk.Flags.SvgFeatures]
        type AttrTransferType SvgFeaturesPropertyInfo = [Gtk.Flags.SvgFeatures]
        type AttrGetType SvgFeaturesPropertyInfo = [Gtk.Flags.SvgFeatures]
        type AttrLabel SvgFeaturesPropertyInfo = "features"
        type AttrOrigin SvgFeaturesPropertyInfo = Svg
        attrGet = getSvgFeatures
        attrSet = setSvgFeatures
        attrPut = setSvgFeatures
        attrTransfer _ v = do
            return v
        attrConstruct = constructSvgFeatures
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.features"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:features"
            })
    #endif

    -- VVV Prop "playing"
       -- Type: TBasicType TBoolean
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Nothing,Nothing)

    -- | Get the value of the “@playing@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' svg #playing
    -- @
    getSvgPlaying :: (MonadIO m, IsSvg o) => o -> m Bool
    getSvgPlaying :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Bool
    getSvgPlaying o
    obj = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Bool
    forall a. GObject a => a -> String -> IO Bool
    B.Properties.getObjectPropertyBool o
    obj String
    "playing"

    -- | Set the value of the “@playing@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' svg [ #playing 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setSvgPlaying :: (MonadIO m, IsSvg o) => o -> Bool -> m ()
    setSvgPlaying :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Bool -> m ()
    setSvgPlaying o
    obj Bool
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Bool -> IO ()
    forall a. GObject a => a -> String -> Bool -> IO ()
    B.Properties.setObjectPropertyBool o
    obj String
    "playing" Bool
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@playing@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructSvgPlaying :: (IsSvg o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
    constructSvgPlaying :: forall o (m :: * -> *).
    (IsSvg o, MonadIO m) =>
    Bool -> m (GValueConstruct o)
    constructSvgPlaying Bool
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Bool -> IO (GValueConstruct o)
    forall o. String -> Bool -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyBool String
    "playing" Bool
    val

    #if defined(ENABLE_OVERLOADING)
    data SvgPlayingPropertyInfo
    instance AttrInfo SvgPlayingPropertyInfo where
        type AttrAllowedOps SvgPlayingPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint SvgPlayingPropertyInfo = IsSvg
        type AttrSetTypeConstraint SvgPlayingPropertyInfo = (~) Bool
        type AttrTransferTypeConstraint SvgPlayingPropertyInfo = (~) Bool
        type AttrTransferType SvgPlayingPropertyInfo = Bool
        type AttrGetType SvgPlayingPropertyInfo = Bool
        type AttrLabel SvgPlayingPropertyInfo = "playing"
        type AttrOrigin SvgPlayingPropertyInfo = Svg
        attrGet = getSvgPlaying
        attrSet = setSvgPlaying
        attrPut = setSvgPlaying
        attrTransfer _ v = do
            return v
        attrConstruct = constructSvgPlaying
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.playing"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:playing"
            })
    #endif

    -- VVV Prop "resource"
       -- Type: TBasicType TUTF8
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Nothing,Nothing)

    -- | Get the value of the “@resource@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' svg #resource
    -- @
    getSvgResource :: (MonadIO m, IsSvg o) => o -> m (Maybe T.Text)
    getSvgResource :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m (Maybe Text)
    getSvgResource o
    obj = IO (Maybe Text) -> m (Maybe Text)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
    -> IO (Maybe Text) -> m (Maybe Text)
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO (Maybe Text)
    forall a. GObject a => a -> String -> IO (Maybe Text)
    B.Properties.getObjectPropertyString o
    obj String
    "resource"

    -- | Set the value of the “@resource@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' svg [ #resource 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setSvgResource :: (MonadIO m, IsSvg o) => o -> T.Text -> m ()
    setSvgResource :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Text -> m ()
    setSvgResource o
    obj Text
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Maybe Text -> IO ()
    forall a. GObject a => a -> String -> Maybe Text -> IO ()
    B.Properties.setObjectPropertyString o
    obj String
    "resource" (Text -> Maybe Text
    forall a. a -> Maybe a
    Just Text
    val)

    -- | Construct a t'GValueConstruct' with valid value for the “@resource@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructSvgResource :: (IsSvg o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
    constructSvgResource :: forall o (m :: * -> *).
    (IsSvg o, MonadIO m) =>
    Text -> m (GValueConstruct o)
    constructSvgResource Text
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Maybe Text -> IO (GValueConstruct o)
    forall o. String -> Maybe Text -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyString String
    "resource" (Text -> Maybe Text
    forall a. a -> Maybe a
    P.Just Text
    val)

    -- | Set the value of the “@resource@” property to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #resource
    -- @
    clearSvgResource :: (MonadIO m, IsSvg o) => o -> m ()
    clearSvgResource :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m ()
    clearSvgResource o
    obj = 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
    $ o -> String -> Maybe Text -> IO ()
    forall a. GObject a => a -> String -> Maybe Text -> IO ()
    B.Properties.setObjectPropertyString o
    obj String
    "resource" (Maybe Text
    forall a. Maybe a
    Nothing :: Maybe T.Text)

    #if defined(ENABLE_OVERLOADING)
    data SvgResourcePropertyInfo
    instance AttrInfo SvgResourcePropertyInfo where
        type AttrAllowedOps SvgResourcePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint SvgResourcePropertyInfo = IsSvg
        type AttrSetTypeConstraint SvgResourcePropertyInfo = (~) T.Text
        type AttrTransferTypeConstraint SvgResourcePropertyInfo = (~) T.Text
        type AttrTransferType SvgResourcePropertyInfo = T.Text
        type AttrGetType SvgResourcePropertyInfo = (Maybe T.Text)
        type AttrLabel SvgResourcePropertyInfo = "resource"
        type AttrOrigin SvgResourcePropertyInfo = Svg
        attrGet = getSvgResource
        attrSet = setSvgResource
        attrPut = undefined
        attrTransfer _ v = do
            return v
        attrConstruct = constructSvgResource
        attrClear = clearSvgResource
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.resource"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:resource"
            })
    #endif

    -- VVV Prop "state"
       -- Type: TBasicType TUInt
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Just False,Just False)

    -- | Get the value of the “@state@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' svg #state
    -- @
    getSvgState :: (MonadIO m, IsSvg o) => o -> m Word32
    getSvgState :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Word32
    getSvgState o
    obj = IO Word32 -> m Word32
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Word32
    forall a. GObject a => a -> String -> IO Word32
    B.Properties.getObjectPropertyUInt32 o
    obj String
    "state"

    -- | Set the value of the “@state@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' svg [ #state 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setSvgState :: (MonadIO m, IsSvg o) => o -> Word32 -> m ()
    setSvgState :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Word32 -> m ()
    setSvgState o
    obj Word32
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Word32 -> IO ()
    forall a. GObject a => a -> String -> Word32 -> IO ()
    B.Properties.setObjectPropertyUInt32 o
    obj String
    "state" Word32
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@state@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructSvgState :: (IsSvg o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
    constructSvgState :: forall o (m :: * -> *).
    (IsSvg o, MonadIO m) =>
    Word32 -> m (GValueConstruct o)
    constructSvgState Word32
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Word32 -> IO (GValueConstruct o)
    forall o. String -> Word32 -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyUInt32 String
    "state" Word32
    val

    #if defined(ENABLE_OVERLOADING)
    data SvgStatePropertyInfo
    instance AttrInfo SvgStatePropertyInfo where
        type AttrAllowedOps SvgStatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint SvgStatePropertyInfo = IsSvg
        type AttrSetTypeConstraint SvgStatePropertyInfo = (~) Word32
        type AttrTransferTypeConstraint SvgStatePropertyInfo = (~) Word32
        type AttrTransferType SvgStatePropertyInfo = Word32
        type AttrGetType SvgStatePropertyInfo = Word32
        type AttrLabel SvgStatePropertyInfo = "state"
        type AttrOrigin SvgStatePropertyInfo = Svg
        attrGet = getSvgState
        attrSet = setSvgState
        attrPut = setSvgState
        attrTransfer _ v = do
            return v
        attrConstruct = constructSvgState
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.state"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:state"
            })
    #endif

    -- VVV Prop "weight"
       -- Type: TBasicType TDouble
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Just False,Just False)

    -- | Get the value of the “@weight@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' svg #weight
    -- @
    getSvgWeight :: (MonadIO m, IsSvg o) => o -> m Double
    getSvgWeight :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> m Double
    getSvgWeight o
    obj = IO Double -> m Double
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Double
    forall a. GObject a => a -> String -> IO Double
    B.Properties.getObjectPropertyDouble o
    obj String
    "weight"

    -- | Set the value of the “@weight@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' svg [ #weight 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setSvgWeight :: (MonadIO m, IsSvg o) => o -> Double -> m ()
    setSvgWeight :: forall (m :: * -> *) o. (MonadIO m, IsSvg o) => o -> Double -> m ()
    setSvgWeight o
    obj Double
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Double -> IO ()
    forall a. GObject a => a -> String -> Double -> IO ()
    B.Properties.setObjectPropertyDouble o
    obj String
    "weight" Double
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@weight@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructSvgWeight :: (IsSvg o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
    constructSvgWeight :: forall o (m :: * -> *).
    (IsSvg o, MonadIO m) =>
    Double -> m (GValueConstruct o)
    constructSvgWeight Double
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Double -> IO (GValueConstruct o)
    forall o. String -> Double -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyDouble String
    "weight" Double
    val

    #if defined(ENABLE_OVERLOADING)
    data SvgWeightPropertyInfo
    instance AttrInfo SvgWeightPropertyInfo where
        type AttrAllowedOps SvgWeightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint SvgWeightPropertyInfo = IsSvg
        type AttrSetTypeConstraint SvgWeightPropertyInfo = (~) Double
        type AttrTransferTypeConstraint SvgWeightPropertyInfo = (~) Double
        type AttrTransferType SvgWeightPropertyInfo = Double
        type AttrGetType SvgWeightPropertyInfo = Double
        type AttrLabel SvgWeightPropertyInfo = "weight"
        type AttrOrigin SvgWeightPropertyInfo = Svg
        attrGet = getSvgWeight
        attrSet = setSvgWeight
        attrPut = setSvgWeight
        attrTransfer _ v = do
            return v
        attrConstruct = constructSvgWeight
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.weight"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#g:attr:weight"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList Svg
    type instance O.AttributeList Svg = SvgAttributeList
    type SvgAttributeList = ('[ '("features", SvgFeaturesPropertyInfo), '("playing", SvgPlayingPropertyInfo), '("resource", SvgResourcePropertyInfo), '("state", SvgStatePropertyInfo), '("weight", SvgWeightPropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    svgFeatures :: AttrLabelProxy "features"
    svgFeatures = AttrLabelProxy

    svgPlaying :: AttrLabelProxy "playing"
    svgPlaying = AttrLabelProxy

    svgResource :: AttrLabelProxy "resource"
    svgResource = AttrLabelProxy

    svgState :: AttrLabelProxy "state"
    svgState = AttrLabelProxy

    svgWeight :: AttrLabelProxy "weight"
    svgWeight = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList Svg = SvgSignalList
    type SvgSignalList = ('[ '("error", SvgErrorSignalInfo), '("invalidateContents", Gdk.Paintable.PaintableInvalidateContentsSignalInfo), '("invalidateSize", Gdk.Paintable.PaintableInvalidateSizeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif

    -- method Svg::new
    -- method type : Constructor
    -- Args: []
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Svg" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_new" gtk_svg_new ::
        IO (Ptr Svg)

    -- | Creates a new, empty SVG paintable.
    --
    -- /Since: 4.22/
    svgNew ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m Svg
        -- ^ __Returns:__ the paintable
    svgNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Svg
    svgNew  = IO Svg -> m Svg
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Svg -> m Svg) -> IO Svg -> m Svg
    forall a b. (a -> b) -> a -> b
    $ do
        result <- IO (Ptr Svg)
    gtk_svg_new
        checkUnexpectedReturnNULL "svgNew" result
        result' <- (wrapObject Svg) result
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method Svg::new_from_bytes
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "bytes"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
    --           , argCType = Just "GBytes*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Svg" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_new_from_bytes" gtk_svg_new_from_bytes ::
        Ptr GLib.Bytes.Bytes ->                 -- bytes : TInterface (Name {namespace = "GLib", name = "Bytes"})
        IO (Ptr Svg)

    -- | Parses the SVG data in /@bytes@/ and creates a paintable.
    --
    -- /Since: 4.22/
    svgNewFromBytes ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        GLib.Bytes.Bytes
        -- ^ /@bytes@/: the data
        -> m Svg
        -- ^ __Returns:__ the paintable
    svgNewFromBytes :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Bytes -> m Svg
    svgNewFromBytes Bytes
    bytes = IO Svg -> m Svg
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Svg -> m Svg) -> IO Svg -> m Svg
    forall a b. (a -> b) -> a -> b
    $ do
        bytes' <- Bytes -> IO (Ptr Bytes)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr Bytes
    bytes
        result <- gtk_svg_new_from_bytes bytes'
        checkUnexpectedReturnNULL "svgNewFromBytes" result
        result' <- (wrapObject Svg) result
        touchManagedPtr bytes
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method Svg::new_from_resource
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "path"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const char*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the resource path" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Svg" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_new_from_resource" gtk_svg_new_from_resource ::
        CString ->                              -- path : TBasicType TUTF8
        IO (Ptr Svg)

    -- | Parses the SVG data in the resource and creates a paintable.
    --
    -- /Since: 4.22/
    svgNewFromResource ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        T.Text
        -- ^ /@path@/: the resource path
        -> m Svg
        -- ^ __Returns:__ the paintable
    svgNewFromResource :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Svg
    svgNewFromResource Text
    path = IO Svg -> m Svg
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Svg -> m Svg) -> IO Svg -> m Svg
    forall a b. (a -> b) -> a -> b
    $ do
        path' <- Text -> IO CString
    textToCString Text
    path
        result <- gtk_svg_new_from_resource path'
        checkUnexpectedReturnNULL "svgNewFromResource" result
        result' <- (wrapObject Svg) result
        freeMem path'
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method Svg::get_features
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "SvgFeatures" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_get_features" gtk_svg_get_features ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO CUInt

    -- | Returns the currently enabled features.
    --
    -- /Since: 4.22/
    svgGetFeatures ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m [Gtk.Flags.SvgFeatures]
        -- ^ __Returns:__ the enabled features
    svgGetFeatures :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m [SvgFeatures]
    svgGetFeatures a
    self = IO [SvgFeatures] -> m [SvgFeatures]
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO [SvgFeatures] -> m [SvgFeatures])
    -> IO [SvgFeatures] -> m [SvgFeatures]
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_svg_get_features self'
        let result' = CUInt -> [SvgFeatures]
    forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
    wordToGFlags CUInt
    result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data SvgGetFeaturesMethodInfo
    instance (signature ~ (m [Gtk.Flags.SvgFeatures]), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetFeaturesMethodInfo a signature where
        overloadedMethod = svgGetFeatures

    instance O.OverloadedMethodInfo SvgGetFeaturesMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetFeatures",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetFeatures"
            })

    #endif

    -- method Svg::get_n_states
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_get_n_states" gtk_svg_get_n_states ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO Word32

    -- | Gets the number of states defined in the SVG.
    --
    -- Note that there is always an empty state, which does
    -- not count towards this number. If this function returns
    -- the value N, the meaningful states of the SVG are
    -- 0, 1, ..., N - 1 and @GTK_SVG_STATE_EMPTY@.
    --
    -- /Since: 4.22/
    svgGetNStates ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m Word32
        -- ^ __Returns:__ the number of states
    svgGetNStates :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m Word32
    svgGetNStates a
    self = IO Word32 -> m Word32
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_svg_get_n_states self'
        touchManagedPtr self
        return result

    #if defined(ENABLE_OVERLOADING)
    data SvgGetNStatesMethodInfo
    instance (signature ~ (m Word32), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetNStatesMethodInfo a signature where
        overloadedMethod = svgGetNStates

    instance O.OverloadedMethodInfo SvgGetNStatesMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetNStates",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetNStates"
            })

    #endif

    -- method Svg::get_state
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_get_state" gtk_svg_get_state ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO Word32

    -- | Gets the current state of the paintable.
    --
    -- /Since: 4.22/
    svgGetState ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m Word32
        -- ^ __Returns:__ the state
    svgGetState :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m Word32
    svgGetState a
    self = IO Word32 -> m Word32
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_svg_get_state self'
        touchManagedPtr self
        return result

    #if defined(ENABLE_OVERLOADING)
    data SvgGetStateMethodInfo
    instance (signature ~ (m Word32), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetStateMethodInfo a signature where
        overloadedMethod = svgGetState

    instance O.OverloadedMethodInfo SvgGetStateMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetState",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetState"
            })

    #endif

    -- method Svg::get_weight
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TDouble)
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_get_weight" gtk_svg_get_weight ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO CDouble

    -- | Gets the value of the weight property.
    --
    -- /Since: 4.22/
    svgGetWeight ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m Double
        -- ^ __Returns:__ the weight
    svgGetWeight :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m Double
    svgGetWeight a
    self = IO Double -> m Double
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Double -> m Double) -> IO Double -> m Double
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_svg_get_weight self'
        let result' = CDouble -> Double
    forall a b. (Real a, Fractional b) => a -> b
    realToFrac CDouble
    result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data SvgGetWeightMethodInfo
    instance (signature ~ (m Double), MonadIO m, IsSvg a) => O.OverloadedMethod SvgGetWeightMethodInfo a signature where
        overloadedMethod = svgGetWeight

    instance O.OverloadedMethodInfo SvgGetWeightMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgGetWeight",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgGetWeight"
            })

    #endif

    -- method Svg::load_from_bytes
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "bytes"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
    --           , argCType = Just "GBytes*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data to load" , 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 "gtk_svg_load_from_bytes" gtk_svg_load_from_bytes ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        Ptr GLib.Bytes.Bytes ->                 -- bytes : TInterface (Name {namespace = "GLib", name = "Bytes"})
        IO ()

    -- | Loads SVG content into an existing SVG paintable.
    --
    -- To track errors while loading SVG content,
    -- connect to the [Svg::error]("GI.Gtk.Objects.Svg#g:signal:error") signal.
    --
    -- This clears any previously loaded content.
    --
    -- /Since: 4.22/
    svgLoadFromBytes ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> GLib.Bytes.Bytes
        -- ^ /@bytes@/: the data to load
        -> m ()
    svgLoadFromBytes :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> Bytes -> m ()
    svgLoadFromBytes a
    self Bytes
    bytes = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        bytes' <- unsafeManagedPtrGetPtr bytes
        gtk_svg_load_from_bytes self' bytes'
        touchManagedPtr self
        touchManagedPtr bytes
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgLoadFromBytesMethodInfo
    instance (signature ~ (GLib.Bytes.Bytes -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgLoadFromBytesMethodInfo a signature where
        overloadedMethod = svgLoadFromBytes

    instance O.OverloadedMethodInfo SvgLoadFromBytesMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgLoadFromBytes",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgLoadFromBytes"
            })

    #endif

    -- method Svg::load_from_resource
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "path"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const char*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the resource 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 "gtk_svg_load_from_resource" gtk_svg_load_from_resource ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        CString ->                              -- path : TBasicType TUTF8
        IO ()

    -- | Loads SVG content into an existing SVG paintable.
    --
    -- To track errors while loading SVG content,
    -- connect to the [Svg::error]("GI.Gtk.Objects.Svg#g:signal:error") signal.
    --
    -- This clears any previously loaded content.
    --
    -- /Since: 4.22/
    svgLoadFromResource ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> T.Text
        -- ^ /@path@/: the resource path
        -> m ()
    svgLoadFromResource :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> Text -> m ()
    svgLoadFromResource a
    self 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        path' <- textToCString path
        gtk_svg_load_from_resource self' path'
        touchManagedPtr self
        freeMem path'
        return ()

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

    instance O.OverloadedMethodInfo SvgLoadFromResourceMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgLoadFromResource",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgLoadFromResource"
            })

    #endif

    -- method Svg::pause
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , 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 "gtk_svg_pause" gtk_svg_pause ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO ()

    -- | Stop any playing animations.
    --
    -- Animations can be paused and started repeatedly.
    --
    -- /Since: 4.22/
    svgPause ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m ()
    svgPause :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m ()
    svgPause a
    self = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        gtk_svg_pause self'
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgPauseMethodInfo
    instance (signature ~ (m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgPauseMethodInfo a signature where
        overloadedMethod = svgPause

    instance O.OverloadedMethodInfo SvgPauseMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgPause",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgPause"
            })

    #endif

    -- method Svg::play
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , 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 "gtk_svg_play" gtk_svg_play ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO ()

    -- | Start playing animations.
    --
    -- Note that this is necessary for state changes as
    -- well.
    --
    -- /Since: 4.22/
    svgPlay ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m ()
    svgPlay :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m ()
    svgPlay a
    self = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        gtk_svg_play self'
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgPlayMethodInfo
    instance (signature ~ (m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgPlayMethodInfo a signature where
        overloadedMethod = svgPlay

    instance O.OverloadedMethodInfo SvgPlayMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgPlay",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgPlay"
            })

    #endif

    -- method Svg::serialize
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "GLib" , name = "Bytes" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_svg_serialize" gtk_svg_serialize ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        IO (Ptr GLib.Bytes.Bytes)

    -- | Serializes the content of the renderer as SVG.
    --
    -- The SVG will be similar to the orignally loaded one,
    -- but is not guaranteed to be 100% identical.
    --
    -- This function serializes the DOM, i.e. the results
    -- of parsing the SVG. It does not reflect the effect
    -- of applying animations.
    --
    -- /Since: 4.22/
    svgSerialize ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> m GLib.Bytes.Bytes
        -- ^ __Returns:__ the serialized contents
    svgSerialize :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> m Bytes
    svgSerialize a
    self = IO Bytes -> m Bytes
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Bytes -> m Bytes) -> IO Bytes -> m Bytes
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_svg_serialize self'
        checkUnexpectedReturnNULL "svgSerialize" result
        result' <- (wrapBoxed GLib.Bytes.Bytes) result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data SvgSerializeMethodInfo
    instance (signature ~ (m GLib.Bytes.Bytes), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSerializeMethodInfo a signature where
        overloadedMethod = svgSerialize

    instance O.OverloadedMethodInfo SvgSerializeMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSerialize",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSerialize"
            })

    #endif

    -- method Svg::set_features
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "features"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "SvgFeatures" }
    --           , argCType = Just "GtkSvgFeatures"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "features to enable" , 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 "gtk_svg_set_features" gtk_svg_set_features ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        CUInt ->                                -- features : TInterface (Name {namespace = "Gtk", name = "SvgFeatures"})
        IO ()

    -- | Enables or disables features of the SVG paintable.
    --
    -- By default, all features are enabled.
    --
    -- Note that this call only has an effect before the
    -- SVG is loaded.
    --
    -- /Since: 4.22/
    svgSetFeatures ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> [Gtk.Flags.SvgFeatures]
        -- ^ /@features@/: features to enable
        -> m ()
    svgSetFeatures :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> [SvgFeatures] -> m ()
    svgSetFeatures a
    self [SvgFeatures]
    features = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        let features' = [SvgFeatures] -> CUInt
    forall b a. (Num b, IsGFlag a) => [a] -> b
    gflagsToWord [SvgFeatures]
    features
        gtk_svg_set_features self' features'
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgSetFeaturesMethodInfo
    instance (signature ~ ([Gtk.Flags.SvgFeatures] -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetFeaturesMethodInfo a signature where
        overloadedMethod = svgSetFeatures

    instance O.OverloadedMethodInfo SvgSetFeaturesMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetFeatures",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetFeatures"
            })

    #endif

    -- method Svg::set_frame_clock
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "clock"
    --           , argType =
    --               TInterface Name { namespace = "Gdk" , name = "FrameClock" }
    --           , argCType = Just "GdkFrameClock*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the frame clock" , 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 "gtk_svg_set_frame_clock" gtk_svg_set_frame_clock ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        Ptr Gdk.FrameClock.FrameClock ->        -- clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
        IO ()

    -- | Sets a frame clock.
    --
    -- Without a frame clock, GTK has to rely
    -- on simple timeouts to run animations.
    --
    -- /Since: 4.22/
    svgSetFrameClock ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a, Gdk.FrameClock.IsFrameClock b) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> b
        -- ^ /@clock@/: the frame clock
        -> m ()
    svgSetFrameClock :: forall (m :: * -> *) a b.
    (HasCallStack, MonadIO m, IsSvg a, IsFrameClock b) =>
    a -> b -> m ()
    svgSetFrameClock a
    self b
    clock = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        clock' <- unsafeManagedPtrCastPtr clock
        gtk_svg_set_frame_clock self' clock'
        touchManagedPtr self
        touchManagedPtr clock
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgSetFrameClockMethodInfo
    instance (signature ~ (b -> m ()), MonadIO m, IsSvg a, Gdk.FrameClock.IsFrameClock b) => O.OverloadedMethod SvgSetFrameClockMethodInfo a signature where
        overloadedMethod = svgSetFrameClock

    instance O.OverloadedMethodInfo SvgSetFrameClockMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetFrameClock",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetFrameClock"
            })

    #endif

    -- method Svg::set_state
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "state"
    --           , argType = TBasicType TUInt
    --           , argCType = Just "unsigned int"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the state to set, as a value between 0 and 63,\n  or `(unsigned int) -1`"
    --                 , 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 "gtk_svg_set_state" gtk_svg_set_state ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        Word32 ->                               -- state : TBasicType TUInt
        IO ()

    -- | Sets the state of the paintable.
    --
    -- Use 'GI.Gtk.Objects.Svg.svgGetNStates' to find out
    -- what states /@self@/ has.
    --
    -- Note that 'GI.Gtk.Objects.Svg.svgPlay' must have been
    -- called for the SVG paintable to react to state changes.
    --
    -- /Since: 4.22/
    svgSetState ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> Word32
        -- ^ /@state@/: the state to set, as a value between 0 and 63,
        --   or @(unsigned int) -1@
        -> m ()
    svgSetState :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> Word32 -> m ()
    svgSetState a
    self Word32
    state = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        gtk_svg_set_state self' state
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgSetStateMethodInfo
    instance (signature ~ (Word32 -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetStateMethodInfo a signature where
        overloadedMethod = svgSetState

    instance O.OverloadedMethodInfo SvgSetStateMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetState",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetState"
            })

    #endif

    -- method Svg::set_weight
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "weight"
    --           , argType = TBasicType TDouble
    --           , argCType = Just "double"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "the font weight, as a value between -1 and 1000"
    --                 , 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 "gtk_svg_set_weight" gtk_svg_set_weight ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        CDouble ->                              -- weight : TBasicType TDouble
        IO ()

    -- | Sets the weight that is used when rendering.
    --
    -- The default value of -1 means to use the font weight
    -- from CSS.
    --
    -- /Since: 4.22/
    svgSetWeight ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> Double
        -- ^ /@weight@/: the font weight, as a value between -1 and 1000
        -> m ()
    svgSetWeight :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> Double -> m ()
    svgSetWeight a
    self Double
    weight = 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
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        let weight' = Double -> CDouble
    forall a b. (Real a, Fractional b) => a -> b
    realToFrac Double
    weight
        gtk_svg_set_weight self' weight'
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data SvgSetWeightMethodInfo
    instance (signature ~ (Double -> m ()), MonadIO m, IsSvg a) => O.OverloadedMethod SvgSetWeightMethodInfo a signature where
        overloadedMethod = svgSetWeight

    instance O.OverloadedMethodInfo SvgSetWeightMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgSetWeight",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgSetWeight"
            })

    #endif

    -- method Svg::write_to_file
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Svg" }
    --           , argCType = Just "GtkSvg*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an SVG paintable" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "filename"
    --           , argType = TBasicType TUTF8
    --           , argCType = Just "const char*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the file to save to"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : True
    -- Skip return : False

    foreign import ccall "gtk_svg_write_to_file" gtk_svg_write_to_file ::
        Ptr Svg ->                              -- self : TInterface (Name {namespace = "Gtk", name = "Svg"})
        CString ->                              -- filename : TBasicType TUTF8
        Ptr (Ptr GError) ->                     -- error
        IO CInt

    -- | Serializes the paintable, and saves the result to a file.
    --
    -- /Since: 4.22/
    svgWriteToFile ::
        (B.CallStack.HasCallStack, MonadIO m, IsSvg a) =>
        a
        -- ^ /@self@/: an SVG paintable
        -> T.Text
        -- ^ /@filename@/: the file to save to
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    svgWriteToFile :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsSvg a) =>
    a -> Text -> m ()
    svgWriteToFile a
    self Text
    filename = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Svg)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        filename' <- textToCString filename
        onException (do
            _ <- propagateGError $ gtk_svg_write_to_file self' filename'
            touchManagedPtr self
            freeMem filename'
            return ()
         ) (do
            freeMem filename'
         )

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

    instance O.OverloadedMethodInfo SvgWriteToFileMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.Svg.svgWriteToFile",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Svg.html#v:svgWriteToFile"
            })

    #endif