{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.Gtk.Interfaces.Native.Native' is the interface implemented by all widgets that can provide
-- a GdkSurface for widgets to render on.
-- 
-- The obvious example of a t'GI.Gtk.Interfaces.Native.Native' is t'GI.Gtk.Objects.Window.Window'.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Interfaces.Native
    ( 

-- * Exported types
    Native(..)                              ,
    IsNative                                ,
    toNative                                ,


 -- * 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"), [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"), [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"), [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
-- [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"), [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"), [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.Objects.Widget#g:method:getDisplay"), [getFirstChild]("GI.Gtk.Objects.Widget#g:method:getFirstChild"), [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"), [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"), [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"), [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
-- [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"), [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"), [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)
    ResolveNativeMethod                     ,
#endif

-- ** getForSurface #method:getForSurface#

    nativeGetForSurface                     ,


-- ** getRenderer #method:getRenderer#

#if defined(ENABLE_OVERLOADING)
    NativeGetRendererMethodInfo             ,
#endif
    nativeGetRenderer                       ,


-- ** getSurface #method:getSurface#

#if defined(ENABLE_OVERLOADING)
    NativeGetSurfaceMethodInfo              ,
#endif
    nativeGetSurface                        ,


-- ** getSurfaceTransform #method:getSurfaceTransform#

#if defined(ENABLE_OVERLOADING)
    NativeGetSurfaceTransformMethodInfo     ,
#endif
    nativeGetSurfaceTransform               ,


-- ** realize #method:realize#

#if defined(ENABLE_OVERLOADING)
    NativeRealizeMethodInfo                 ,
#endif
    nativeRealize                           ,


-- ** unrealize #method:unrealize#

#if defined(ENABLE_OVERLOADING)
    NativeUnrealizeMethodInfo               ,
#endif
    nativeUnrealize                         ,




    ) 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.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.Text as T
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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
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.Objects.Widget as Gtk.Widget

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

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

foreign import ccall "gtk_native_get_type"
    c_gtk_native_get_type :: IO B.Types.GType

instance B.Types.TypedObject Native where
    glibType :: IO GType
glibType = IO GType
c_gtk_native_get_type

instance B.Types.GObject Native

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

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

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

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

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Native
type instance O.AttributeList Native = NativeAttributeList
type NativeAttributeList = ('[ '("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), '("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, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

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

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

#endif

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

#endif

-- method Native::get_renderer
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Native" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkNative" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gsk" , name = "Renderer" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_native_get_renderer" gtk_native_get_renderer :: 
    Ptr Native ->                           -- self : TInterface (Name {namespace = "Gtk", name = "Native"})
    IO (Ptr Gsk.Renderer.Renderer)

-- | Returns the renderer that is used for this t'GI.Gtk.Interfaces.Native.Native'.
nativeGetRenderer ::
    (B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Interfaces.Native.Native'
    -> m Gsk.Renderer.Renderer
    -- ^ __Returns:__ the renderer for /@self@/
nativeGetRenderer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m Renderer
nativeGetRenderer a
self = IO Renderer -> m Renderer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Renderer -> m Renderer) -> IO Renderer -> m Renderer
forall a b. (a -> b) -> a -> b
$ do
    Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Renderer
result <- Ptr Native -> IO (Ptr Renderer)
gtk_native_get_renderer Ptr Native
self'
    Text -> Ptr Renderer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetRenderer" Ptr Renderer
result
    Renderer
result' <- ((ManagedPtr Renderer -> Renderer) -> Ptr Renderer -> IO Renderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Renderer -> Renderer
Gsk.Renderer.Renderer) Ptr Renderer
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Renderer -> IO Renderer
forall (m :: * -> *) a. Monad m => a -> m a
return Renderer
result'

#if defined(ENABLE_OVERLOADING)
data NativeGetRendererMethodInfo
instance (signature ~ (m Gsk.Renderer.Renderer), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetRendererMethodInfo a signature where
    overloadedMethod = nativeGetRenderer

instance O.OverloadedMethodInfo NativeGetRendererMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeGetRenderer",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Interfaces-Native.html#v:nativeGetRenderer"
        }


#endif

-- method Native::get_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Native" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkNative" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Surface" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_native_get_surface" gtk_native_get_surface :: 
    Ptr Native ->                           -- self : TInterface (Name {namespace = "Gtk", name = "Native"})
    IO (Ptr Gdk.Surface.Surface)

-- | Returns the surface of this t'GI.Gtk.Interfaces.Native.Native'.
nativeGetSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Interfaces.Native.Native'
    -> m Gdk.Surface.Surface
    -- ^ __Returns:__ the surface of /@self@/
nativeGetSurface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m Surface
nativeGetSurface a
self = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
    Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Surface
result <- Ptr Native -> IO (Ptr Surface)
gtk_native_get_surface Ptr Native
self'
    Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetSurface" Ptr Surface
result
    Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Gdk.Surface.Surface) Ptr Surface
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'

#if defined(ENABLE_OVERLOADING)
data NativeGetSurfaceMethodInfo
instance (signature ~ (m Gdk.Surface.Surface), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetSurfaceMethodInfo a signature where
    overloadedMethod = nativeGetSurface

instance O.OverloadedMethodInfo NativeGetSurfaceMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeGetSurface",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Interfaces-Native.html#v:nativeGetSurface"
        }


#endif

-- method Native::get_surface_transform
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Native" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a @GtkNative" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the x coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the y coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_native_get_surface_transform" gtk_native_get_surface_transform :: 
    Ptr Native ->                           -- self : TInterface (Name {namespace = "Gtk", name = "Native"})
    Ptr CDouble ->                          -- x : TBasicType TDouble
    Ptr CDouble ->                          -- y : TBasicType TDouble
    IO ()

-- | Retrieves the surface transform of /@self@/. This is the translation
-- from /@self@/\'s surface coordinates into /@self@/\'s widget coordinates.
nativeGetSurfaceTransform ::
    (B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
    a
    -- ^ /@self@/: a /@gtkNative@/
    -> m ((Double, Double))
nativeGetSurfaceTransform :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m (Double, Double)
nativeGetSurfaceTransform a
self = IO (Double, Double) -> m (Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Double, Double) -> m (Double, Double))
-> IO (Double, Double) -> m (Double, Double)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CDouble
x <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
    Ptr CDouble
y <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
    Ptr Native -> Ptr CDouble -> Ptr CDouble -> IO ()
gtk_native_get_surface_transform Ptr Native
self' Ptr CDouble
x Ptr CDouble
y
    CDouble
x' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
x
    let x'' :: Double
x'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x'
    CDouble
y' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
y
    let y'' :: Double
y'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
x
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
y
    (Double, Double) -> IO (Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
x'', Double
y'')

#if defined(ENABLE_OVERLOADING)
data NativeGetSurfaceTransformMethodInfo
instance (signature ~ (m ((Double, Double))), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetSurfaceTransformMethodInfo a signature where
    overloadedMethod = nativeGetSurfaceTransform

instance O.OverloadedMethodInfo NativeGetSurfaceTransformMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeGetSurfaceTransform",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Interfaces-Native.html#v:nativeGetSurfaceTransform"
        }


#endif

-- method Native::realize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Native" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkNative" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Realizes a t'GI.Gtk.Interfaces.Native.Native'.
nativeRealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Interfaces.Native.Native'
    -> m ()
nativeRealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m ()
nativeRealize a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Native -> IO ()
gtk_native_realize Ptr Native
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data NativeRealizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNative a) => O.OverloadedMethod NativeRealizeMethodInfo a signature where
    overloadedMethod = nativeRealize

instance O.OverloadedMethodInfo NativeRealizeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeRealize",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Interfaces-Native.html#v:nativeRealize"
        }


#endif

-- method Native::unrealize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Native" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkNative" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Unrealizes a t'GI.Gtk.Interfaces.Native.Native'.
nativeUnrealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Interfaces.Native.Native'
    -> m ()
nativeUnrealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m ()
nativeUnrealize a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Native -> IO ()
gtk_native_unrealize Ptr Native
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data NativeUnrealizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNative a) => O.OverloadedMethod NativeUnrealizeMethodInfo a signature where
    overloadedMethod = nativeUnrealize

instance O.OverloadedMethodInfo NativeUnrealizeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeUnrealize",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Interfaces-Native.html#v:nativeUnrealize"
        }


#endif

-- method Native::get_for_surface
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "surface"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Surface" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkSurface" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Native" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_native_get_for_surface" gtk_native_get_for_surface :: 
    Ptr Gdk.Surface.Surface ->              -- surface : TInterface (Name {namespace = "Gdk", name = "Surface"})
    IO (Ptr Native)

-- | Finds the GtkNative associated with the surface.
nativeGetForSurface ::
    (B.CallStack.HasCallStack, MonadIO m, Gdk.Surface.IsSurface a) =>
    a
    -- ^ /@surface@/: a t'GI.Gdk.Objects.Surface.Surface'
    -> m Native
    -- ^ __Returns:__ the t'GI.Gtk.Interfaces.Native.Native' that is associated with /@surface@/
nativeGetForSurface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSurface a) =>
a -> m Native
nativeGetForSurface a
surface = IO Native -> m Native
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Native -> m Native) -> IO Native -> m Native
forall a b. (a -> b) -> a -> b
$ do
    Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
    Ptr Native
result <- Ptr Surface -> IO (Ptr Native)
gtk_native_get_for_surface Ptr Surface
surface'
    Text -> Ptr Native -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetForSurface" Ptr Native
result
    Native
result' <- ((ManagedPtr Native -> Native) -> Ptr Native -> IO Native
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Native -> Native
Native) Ptr Native
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
    Native -> IO Native
forall (m :: * -> *) a. Monad m => a -> m a
return Native
result'

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Native = NativeSignalList
type NativeSignalList = ('[ '("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, *)])

#endif