    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- An interface for widgets that can act as the root of a widget hierarchy.
    --
    -- The root widget takes care of providing the connection to the windowing
    -- system and manages layout, drawing and event delivery for its widget
    -- hierarchy.
    --
    -- The obvious example of a @GtkRoot@ is @GtkWindow@.
    --
    -- To get the display to which a @GtkRoot@ belongs, use
    -- 'GI.Gtk.Interfaces.Root.rootGetDisplay'.
    --
    -- @GtkRoot@ also maintains the location of keyboard focus inside its widget
    -- hierarchy, with 'GI.Gtk.Interfaces.Root.rootSetFocus' and 'GI.Gtk.Interfaces.Root.rootGetFocus'.

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

    module GI.Gtk.Interfaces.Root
        (

    -- * Exported types
        Root(..)                                ,
        IsRoot                                  ,
        toRoot                                  ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [actionSetEnabled]("GI.Gtk.Objects.Widget#g:method:actionSetEnabled"), [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [activateAction]("GI.Gtk.Objects.Widget#g:method:activateAction"), [activateDefault]("GI.Gtk.Objects.Widget#g:method:activateDefault"), [addController]("GI.Gtk.Objects.Widget#g:method:addController"), [addCssClass]("GI.Gtk.Objects.Widget#g:method:addCssClass"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [allocate]("GI.Gtk.Objects.Widget#g:method:allocate"), [announce]("GI.Gtk.Interfaces.Accessible#g:method:announce"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [computeBounds]("GI.Gtk.Objects.Widget#g:method:computeBounds"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [computePoint]("GI.Gtk.Objects.Widget#g:method:computePoint"), [computeTransform]("GI.Gtk.Objects.Widget#g:method:computeTransform"), [contains]("GI.Gtk.Objects.Widget#g:method:contains"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [disposeTemplate]("GI.Gtk.Objects.Widget#g:method:disposeTemplate"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [hasCssClass]("GI.Gtk.Objects.Widget#g:method:hasCssClass"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [insertAfter]("GI.Gtk.Objects.Widget#g:method:insertAfter"), [insertBefore]("GI.Gtk.Objects.Widget#g:method:insertBefore"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [isDrawable]("GI.Gtk.Objects.Widget#g:method:isDrawable"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isFocus]("GI.Gtk.Objects.Widget#g:method:isFocus"), [isSensitive]("GI.Gtk.Objects.Widget#g:method:isSensitive"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [measure]("GI.Gtk.Objects.Widget#g:method:measure"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [observeChildren]("GI.Gtk.Objects.Widget#g:method:observeChildren"), [observeControllers]("GI.Gtk.Objects.Widget#g:method:observeControllers"), [pick]("GI.Gtk.Objects.Widget#g:method:pick"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [realize]("GI.Gtk.Interfaces.Native#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [removeController]("GI.Gtk.Objects.Widget#g:method:removeController"), [removeCssClass]("GI.Gtk.Objects.Widget#g:method:removeCssClass"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [resetProperty]("GI.Gtk.Interfaces.Accessible#g:method:resetProperty"), [resetRelation]("GI.Gtk.Interfaces.Accessible#g:method:resetRelation"), [resetState]("GI.Gtk.Interfaces.Accessible#g:method:resetState"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [shouldLayout]("GI.Gtk.Objects.Widget#g:method:shouldLayout"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [snapshotChild]("GI.Gtk.Objects.Widget#g:method:snapshotChild"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [translateCoordinates]("GI.Gtk.Objects.Widget#g:method:translateCoordinates"), [triggerTooltipQuery]("GI.Gtk.Objects.Widget#g:method:triggerTooltipQuery"), [unmap]("GI.Gtk.Objects.Widget#g:method:unmap"), [unparent]("GI.Gtk.Objects.Widget#g:method:unparent"), [unrealize]("GI.Gtk.Interfaces.Native#g:method:unrealize"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [updateNextAccessibleSibling]("GI.Gtk.Interfaces.Accessible#g:method:updateNextAccessibleSibling"), [updatePlatformState]("GI.Gtk.Interfaces.Accessible#g:method:updatePlatformState"), [updateProperty]("GI.Gtk.Interfaces.Accessible#g:method:updateProperty"), [updateRelation]("GI.Gtk.Interfaces.Accessible#g:method:updateRelation"), [updateState]("GI.Gtk.Interfaces.Accessible#g:method:updateState"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
    --
    -- ==== Getters
    -- [getAccessibleId]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleId"), [getAccessibleParent]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleParent"), [getAccessibleRole]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleRole"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getAtContext]("GI.Gtk.Interfaces.Accessible#g:method:getAtContext"), [getBaseline]("GI.Gtk.Objects.Widget#g:method:getBaseline"), [getBounds]("GI.Gtk.Interfaces.Accessible#g:method:getBounds"), [getBuildableId]("GI.Gtk.Interfaces.Buildable#g:method:getBuildableId"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getCanTarget]("GI.Gtk.Objects.Widget#g:method:getCanTarget"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getColor]("GI.Gtk.Objects.Widget#g:method:getColor"), [getCssClasses]("GI.Gtk.Objects.Widget#g:method:getCssClasses"), [getCssName]("GI.Gtk.Objects.Widget#g:method:getCssName"), [getCursor]("GI.Gtk.Objects.Widget#g:method:getCursor"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Interfaces.Root#g:method:getDisplay"), [getFirstAccessibleChild]("GI.Gtk.Interfaces.Accessible#g:method:getFirstAccessibleChild"), [getFirstChild]("GI.Gtk.Objects.Widget#g:method:getFirstChild"), [getFocus]("GI.Gtk.Interfaces.Root#g:method:getFocus"), [getFocusChild]("GI.Gtk.Objects.Widget#g:method:getFocusChild"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFocusable]("GI.Gtk.Objects.Widget#g:method:getFocusable"), [getFontMap]("GI.Gtk.Objects.Widget#g:method:getFontMap"), [getFontOptions]("GI.Gtk.Objects.Widget#g:method:getFontOptions"), [getFrameClock]("GI.Gtk.Objects.Widget#g:method:getFrameClock"), [getHalign]("GI.Gtk.Objects.Widget#g:method:getHalign"), [getHasTooltip]("GI.Gtk.Objects.Widget#g:method:getHasTooltip"), [getHeight]("GI.Gtk.Objects.Widget#g:method:getHeight"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getLastChild]("GI.Gtk.Objects.Widget#g:method:getLastChild"), [getLayoutManager]("GI.Gtk.Objects.Widget#g:method:getLayoutManager"), [getLimitEvents]("GI.Gtk.Objects.Widget#g:method:getLimitEvents"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNative]("GI.Gtk.Objects.Widget#g:method:getNative"), [getNextAccessibleSibling]("GI.Gtk.Interfaces.Accessible#g:method:getNextAccessibleSibling"), [getNextSibling]("GI.Gtk.Objects.Widget#g:method:getNextSibling"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getOverflow]("GI.Gtk.Objects.Widget#g:method:getOverflow"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getPlatformState]("GI.Gtk.Interfaces.Accessible#g:method:getPlatformState"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPrevSibling]("GI.Gtk.Objects.Widget#g:method:getPrevSibling"), [getPrimaryClipboard]("GI.Gtk.Objects.Widget#g:method:getPrimaryClipboard"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRealized]("GI.Gtk.Objects.Widget#g:method:getRealized"), [getReceivesDefault]("GI.Gtk.Objects.Widget#g:method:getReceivesDefault"), [getRenderer]("GI.Gtk.Interfaces.Native#g:method:getRenderer"), [getRequestMode]("GI.Gtk.Objects.Widget#g:method:getRequestMode"), [getRoot]("GI.Gtk.Objects.Widget#g:method:getRoot"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSettings]("GI.Gtk.Objects.Widget#g:method:getSettings"), [getSize]("GI.Gtk.Objects.Widget#g:method:getSize"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getSurface]("GI.Gtk.Interfaces.Native#g:method:getSurface"), [getSurfaceTransform]("GI.Gtk.Interfaces.Native#g:method:getSurfaceTransform"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getWidth]("GI.Gtk.Objects.Widget#g:method:getWidth").
    --
    -- ==== Setters
    -- [setAccessibleParent]("GI.Gtk.Interfaces.Accessible#g:method:setAccessibleParent"), [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setCanTarget]("GI.Gtk.Objects.Widget#g:method:setCanTarget"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setCssClasses]("GI.Gtk.Objects.Widget#g:method:setCssClasses"), [setCursor]("GI.Gtk.Objects.Widget#g:method:setCursor"), [setCursorFromName]("GI.Gtk.Objects.Widget#g:method:setCursorFromName"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setFocus]("GI.Gtk.Interfaces.Root#g:method:setFocus"), [setFocusChild]("GI.Gtk.Objects.Widget#g:method:setFocusChild"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFocusable]("GI.Gtk.Objects.Widget#g:method:setFocusable"), [setFontMap]("GI.Gtk.Objects.Widget#g:method:setFontMap"), [setFontOptions]("GI.Gtk.Objects.Widget#g:method:setFontOptions"), [setHalign]("GI.Gtk.Objects.Widget#g:method:setHalign"), [setHasTooltip]("GI.Gtk.Objects.Widget#g:method:setHasTooltip"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setLayoutManager]("GI.Gtk.Objects.Widget#g:method:setLayoutManager"), [setLimitEvents]("GI.Gtk.Objects.Widget#g:method:setLimitEvents"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setOverflow]("GI.Gtk.Objects.Widget#g:method:setOverflow"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [setValign]("GI.Gtk.Objects.Widget#g:method:setValign"), [setVexpand]("GI.Gtk.Objects.Widget#g:method:setVexpand"), [setVexpandSet]("GI.Gtk.Objects.Widget#g:method:setVexpandSet"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible").

    #if defined(ENABLE_OVERLOADING)
        ResolveRootMethod                       ,
    #endif

    -- ** getDisplay #method:getDisplay#

    #if defined(ENABLE_OVERLOADING)
        RootGetDisplayMethodInfo                ,
    #endif
        rootGetDisplay                          ,

    -- ** getFocus #method:getFocus#

    #if defined(ENABLE_OVERLOADING)
        RootGetFocusMethodInfo                  ,
    #endif
        rootGetFocus                            ,

    -- ** setFocus #method:setFocus#

    #if defined(ENABLE_OVERLOADING)
        RootSetFocusMethodInfo                  ,
    #endif
        rootSetFocus                            ,

        ) 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.Cairo.Structs.Context as Cairo.Context
    import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
    import qualified GI.GLib.Callbacks as GLib.Callbacks
    import qualified GI.GLib.Structs.Bytes as GLib.Bytes
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gdk.Flags as Gdk.Flags
    import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
    import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
    import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
    import qualified GI.Gdk.Objects.Device as Gdk.Device
    import qualified GI.Gdk.Objects.Display as Gdk.Display
    import qualified GI.Gdk.Objects.Event as Gdk.Event
    import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
    import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
    import qualified GI.Gdk.Objects.Surface as Gdk.Surface
    import qualified GI.Gdk.Objects.Texture as Gdk.Texture
    import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
    import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
    import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
    import qualified GI.Gio.Interfaces.Icon as Gio.Icon
    import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
    import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
    import qualified GI.Graphene.Structs.Point as Graphene.Point
    import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
    import qualified GI.Graphene.Structs.Rect as Graphene.Rect
    import qualified GI.Graphene.Structs.Size as Graphene.Size
    import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
    import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
    import qualified GI.Gsk.Enums as Gsk.Enums
    import qualified GI.Gsk.Flags as Gsk.Flags
    import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
    import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
    import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
    import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
    import qualified GI.Gsk.Structs.ComponentTransfer as Gsk.ComponentTransfer
    import qualified GI.Gsk.Structs.Path as Gsk.Path
    import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
    import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
    import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
    import qualified GI.Gsk.Structs.Transform as Gsk.Transform
    import qualified GI.Gtk.Callbacks as Gtk.Callbacks
    import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
    import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
    import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
    import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
    import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
    import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
    import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
    import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
    import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
    import qualified GI.Pango.Enums as Pango.Enums
    import qualified GI.Pango.Objects.Context as Pango.Context
    import qualified GI.Pango.Objects.FontMap as Pango.FontMap
    import qualified GI.Pango.Objects.Layout as Pango.Layout

    #else
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gdk.Objects.Display as Gdk.Display
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
    import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

    #endif

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

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

    foreign import ccall "gtk_root_get_type"
        c_gtk_root_get_type :: IO B.Types.GType

    instance B.Types.TypedObject Root where
        glibType :: IO GType
    glibType = IO GType
    c_gtk_root_get_type

    instance B.Types.GObject Root

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

    instance O.HasParentTypes Root
    type instance O.ParentTypes Root = '[Gtk.Native.Native, Gtk.Widget.Widget, GObject.Object.Object]

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

    -- | Convert t'Root' 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 Root) where
        gvalueGType_ :: IO GType
    gvalueGType_ = IO GType
    c_gtk_root_get_type
        gvalueSet_ :: Ptr GValue -> Maybe Root -> IO ()
    gvalueSet_ Ptr GValue
    gv Maybe Root
    P.Nothing = Ptr GValue -> Ptr Root -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv (Ptr Root
    forall a. Ptr a
    FP.nullPtr :: FP.Ptr Root)
        gvalueSet_ Ptr GValue
    gv (P.Just Root
    obj) = Root -> (Ptr Root -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr Root
    obj (Ptr GValue -> Ptr Root -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv)
        gvalueGet_ :: Ptr GValue -> IO (Maybe Root)
    gvalueGet_ Ptr GValue
    gv = do
            ptr <- Ptr GValue -> IO (Ptr Root)
    forall a. GObject a => Ptr GValue -> IO (Ptr a)
    B.GValue.get_object Ptr GValue
    gv :: IO (FP.Ptr Root)
            if ptr /= FP.nullPtr
            then P.Just <$> B.ManagedPtr.newObject Root ptr
            else return P.Nothing

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList Root
    type instance O.AttributeList Root = RootAttributeList
    type RootAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("limitEvents", Gtk.Widget.WidgetLimitEventsPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolveRootMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveRootMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
        ResolveRootMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
        ResolveRootMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
        ResolveRootMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
        ResolveRootMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
        ResolveRootMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
        ResolveRootMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
        ResolveRootMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
        ResolveRootMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
        ResolveRootMethod "announce" o = Gtk.Accessible.AccessibleAnnounceMethodInfo
        ResolveRootMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveRootMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveRootMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
        ResolveRootMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
        ResolveRootMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
        ResolveRootMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
        ResolveRootMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
        ResolveRootMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
        ResolveRootMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
        ResolveRootMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
        ResolveRootMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
        ResolveRootMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
        ResolveRootMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
        ResolveRootMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveRootMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveRootMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveRootMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
        ResolveRootMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
        ResolveRootMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
        ResolveRootMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
        ResolveRootMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
        ResolveRootMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
        ResolveRootMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
        ResolveRootMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
        ResolveRootMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
        ResolveRootMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
        ResolveRootMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
        ResolveRootMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
        ResolveRootMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
        ResolveRootMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveRootMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
        ResolveRootMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
        ResolveRootMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
        ResolveRootMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
        ResolveRootMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
        ResolveRootMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
        ResolveRootMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
        ResolveRootMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
        ResolveRootMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveRootMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveRootMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
        ResolveRootMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
        ResolveRootMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
        ResolveRootMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
        ResolveRootMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
        ResolveRootMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
        ResolveRootMethod "realize" o = Gtk.Native.NativeRealizeMethodInfo
        ResolveRootMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveRootMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveRootMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
        ResolveRootMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
        ResolveRootMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
        ResolveRootMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
        ResolveRootMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
        ResolveRootMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
        ResolveRootMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
        ResolveRootMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveRootMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
        ResolveRootMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
        ResolveRootMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
        ResolveRootMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
        ResolveRootMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveRootMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveRootMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveRootMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
        ResolveRootMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
        ResolveRootMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
        ResolveRootMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
        ResolveRootMethod "unrealize" o = Gtk.Native.NativeUnrealizeMethodInfo
        ResolveRootMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveRootMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
        ResolveRootMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
        ResolveRootMethod "updatePlatformState" o = Gtk.Accessible.AccessibleUpdatePlatformStateMethodInfo
        ResolveRootMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
        ResolveRootMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
        ResolveRootMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
        ResolveRootMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveRootMethod "getAccessibleId" o = Gtk.Accessible.AccessibleGetAccessibleIdMethodInfo
        ResolveRootMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
        ResolveRootMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
        ResolveRootMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
        ResolveRootMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
        ResolveRootMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
        ResolveRootMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
        ResolveRootMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
        ResolveRootMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
        ResolveRootMethod "getBaseline" o = Gtk.Widget.WidgetGetBaselineMethodInfo
        ResolveRootMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
        ResolveRootMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
        ResolveRootMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
        ResolveRootMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
        ResolveRootMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
        ResolveRootMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
        ResolveRootMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
        ResolveRootMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
        ResolveRootMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
        ResolveRootMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
        ResolveRootMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveRootMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
        ResolveRootMethod "getDisplay" o = RootGetDisplayMethodInfo
        ResolveRootMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
        ResolveRootMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
        ResolveRootMethod "getFocus" o = RootGetFocusMethodInfo
        ResolveRootMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
        ResolveRootMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
        ResolveRootMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
        ResolveRootMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
        ResolveRootMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
        ResolveRootMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
        ResolveRootMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
        ResolveRootMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
        ResolveRootMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
        ResolveRootMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
        ResolveRootMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
        ResolveRootMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
        ResolveRootMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
        ResolveRootMethod "getLimitEvents" o = Gtk.Widget.WidgetGetLimitEventsMethodInfo
        ResolveRootMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
        ResolveRootMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
        ResolveRootMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
        ResolveRootMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
        ResolveRootMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
        ResolveRootMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
        ResolveRootMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
        ResolveRootMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
        ResolveRootMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
        ResolveRootMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
        ResolveRootMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
        ResolveRootMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
        ResolveRootMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
        ResolveRootMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
        ResolveRootMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
        ResolveRootMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
        ResolveRootMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
        ResolveRootMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveRootMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveRootMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
        ResolveRootMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
        ResolveRootMethod "getRenderer" o = Gtk.Native.NativeGetRendererMethodInfo
        ResolveRootMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
        ResolveRootMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
        ResolveRootMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
        ResolveRootMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
        ResolveRootMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
        ResolveRootMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
        ResolveRootMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
        ResolveRootMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
        ResolveRootMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
        ResolveRootMethod "getSurface" o = Gtk.Native.NativeGetSurfaceMethodInfo
        ResolveRootMethod "getSurfaceTransform" o = Gtk.Native.NativeGetSurfaceTransformMethodInfo
        ResolveRootMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
        ResolveRootMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
        ResolveRootMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
        ResolveRootMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
        ResolveRootMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
        ResolveRootMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
        ResolveRootMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
        ResolveRootMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
        ResolveRootMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
        ResolveRootMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
        ResolveRootMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
        ResolveRootMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
        ResolveRootMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
        ResolveRootMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
        ResolveRootMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
        ResolveRootMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveRootMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveRootMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
        ResolveRootMethod "setFocus" o = RootSetFocusMethodInfo
        ResolveRootMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
        ResolveRootMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
        ResolveRootMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
        ResolveRootMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
        ResolveRootMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
        ResolveRootMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
        ResolveRootMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
        ResolveRootMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
        ResolveRootMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
        ResolveRootMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
        ResolveRootMethod "setLimitEvents" o = Gtk.Widget.WidgetSetLimitEventsMethodInfo
        ResolveRootMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
        ResolveRootMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
        ResolveRootMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
        ResolveRootMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
        ResolveRootMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
        ResolveRootMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
        ResolveRootMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
        ResolveRootMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
        ResolveRootMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveRootMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
        ResolveRootMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
        ResolveRootMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
        ResolveRootMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
        ResolveRootMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
        ResolveRootMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
        ResolveRootMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
        ResolveRootMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
        ResolveRootMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
        ResolveRootMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
        ResolveRootMethod l o = O.MethodResolutionFailed l o

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

    #endif

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

    #endif

    -- method Root::get_display
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Root" }
    --           , argCType = Just "GtkRoot*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkRoot`" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Display" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_root_get_display" gtk_root_get_display ::
        Ptr Root ->                             -- self : TInterface (Name {namespace = "Gtk", name = "Root"})
        IO (Ptr Gdk.Display.Display)

    -- | Returns the display that this @GtkRoot@ is on.
    rootGetDisplay ::
        (B.CallStack.HasCallStack, MonadIO m, IsRoot a) =>
        a
        -- ^ /@self@/: a @GtkRoot@
        -> m Gdk.Display.Display
        -- ^ __Returns:__ the display of /@root@/
    rootGetDisplay :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsRoot a) =>
    a -> m Display
    rootGetDisplay a
    self = IO Display -> m Display
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Display -> m Display) -> IO Display -> m Display
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Root)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_root_get_display self'
        checkUnexpectedReturnNULL "rootGetDisplay" result
        result' <- (newObject Gdk.Display.Display) result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data RootGetDisplayMethodInfo
    instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsRoot a) => O.OverloadedMethod RootGetDisplayMethodInfo a signature where
        overloadedMethod = rootGetDisplay

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

    #endif

    -- method Root::get_focus
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Root" }
    --           , argCType = Just "GtkRoot*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkRoot`" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_root_get_focus" gtk_root_get_focus ::
        Ptr Root ->                             -- self : TInterface (Name {namespace = "Gtk", name = "Root"})
        IO (Ptr Gtk.Widget.Widget)

    -- | Retrieves the current focused widget within the root.
    --
    -- Note that this is the widget that would have the focus
    -- if the root is active; if the root is not focused then
    -- @gtk_widget_has_focus (widget)@ will be 'P.False' for the
    -- widget.
    rootGetFocus ::
        (B.CallStack.HasCallStack, MonadIO m, IsRoot a) =>
        a
        -- ^ /@self@/: a @GtkRoot@
        -> m (Maybe Gtk.Widget.Widget)
        -- ^ __Returns:__ the currently focused widget
    rootGetFocus :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsRoot a) =>
    a -> m (Maybe Widget)
    rootGetFocus a
    self = IO (Maybe Widget) -> m (Maybe Widget)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe Widget) -> m (Maybe Widget))
    -> IO (Maybe Widget) -> m (Maybe Widget)
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr Root)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_root_get_focus self'
        maybeResult <- convertIfNonNull result $ \Ptr Widget
    result' -> do
            result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    newObject ManagedPtr Widget -> Widget
    Gtk.Widget.Widget) Ptr Widget
    result'
            return result''
        touchManagedPtr self
        return maybeResult

    #if defined(ENABLE_OVERLOADING)
    data RootGetFocusMethodInfo
    instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsRoot a) => O.OverloadedMethod RootGetFocusMethodInfo a signature where
        overloadedMethod = rootGetFocus

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

    #endif

    -- method Root::set_focus
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Root" }
    --           , argCType = Just "GtkRoot*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkRoot`" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "focus"
    --           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
    --           , argCType = Just "GtkWidget*"
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "widget to be the new focus widget, or %NULL\n   to unset the focus widget"
    --                 , 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_root_set_focus" gtk_root_set_focus ::
        Ptr Root ->                             -- self : TInterface (Name {namespace = "Gtk", name = "Root"})
        Ptr Gtk.Widget.Widget ->                -- focus : TInterface (Name {namespace = "Gtk", name = "Widget"})
        IO ()

    -- | If /@focus@/ is not the current focus widget, and is focusable, sets
    -- it as the focus widget for the root.
    --
    -- If /@focus@/ is 'P.Nothing', unsets the focus widget for the root.
    --
    -- To set the focus to a particular widget in the root, it is usually
    -- more convenient to use 'GI.Gtk.Objects.Widget.widgetGrabFocus' instead of
    -- this function.
    rootSetFocus ::
        (B.CallStack.HasCallStack, MonadIO m, IsRoot a, Gtk.Widget.IsWidget b) =>
        a
        -- ^ /@self@/: a @GtkRoot@
        -> Maybe (b)
        -- ^ /@focus@/: widget to be the new focus widget, or 'P.Nothing'
        --    to unset the focus widget
        -> m ()
    rootSetFocus :: forall (m :: * -> *) a b.
    (HasCallStack, MonadIO m, IsRoot a, IsWidget b) =>
    a -> Maybe b -> m ()
    rootSetFocus a
    self Maybe b
    focus = 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 Root)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        maybeFocus <- case focus of
            Maybe b
    Nothing -> Ptr Widget -> IO (Ptr Widget)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr Widget
    forall a. Ptr a
    FP.nullPtr
            Just b
    jFocus -> do
                jFocus' <- b -> IO (Ptr Widget)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr b
    jFocus
                return jFocus'
        gtk_root_set_focus self' maybeFocus
        touchManagedPtr self
        whenJust focus touchManagedPtr
        return ()

    #if defined(ENABLE_OVERLOADING)
    data RootSetFocusMethodInfo
    instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRoot a, Gtk.Widget.IsWidget b) => O.OverloadedMethod RootSetFocusMethodInfo a signature where
        overloadedMethod = rootSetFocus

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

    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList Root = RootSignalList
    type RootSignalList = ('[ '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, DK.Type)])

    #endif