{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.Gdk.Objects.Window
    ( 

-- * Exported types
    Window(..)                              ,
    IsWindow                                ,
    toWindow                                ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveWindowMethod                     ,
#endif


-- ** atPointer #method:atPointer#

    windowAtPointer                         ,


-- ** beep #method:beep#

#if defined(ENABLE_OVERLOADING)
    WindowBeepMethodInfo                    ,
#endif
    windowBeep                              ,


-- ** beginDrawFrame #method:beginDrawFrame#

#if defined(ENABLE_OVERLOADING)
    WindowBeginDrawFrameMethodInfo          ,
#endif
    windowBeginDrawFrame                    ,


-- ** beginMoveDrag #method:beginMoveDrag#

#if defined(ENABLE_OVERLOADING)
    WindowBeginMoveDragMethodInfo           ,
#endif
    windowBeginMoveDrag                     ,


-- ** beginMoveDragForDevice #method:beginMoveDragForDevice#

#if defined(ENABLE_OVERLOADING)
    WindowBeginMoveDragForDeviceMethodInfo  ,
#endif
    windowBeginMoveDragForDevice            ,


-- ** beginPaintRect #method:beginPaintRect#

#if defined(ENABLE_OVERLOADING)
    WindowBeginPaintRectMethodInfo          ,
#endif
    windowBeginPaintRect                    ,


-- ** beginPaintRegion #method:beginPaintRegion#

#if defined(ENABLE_OVERLOADING)
    WindowBeginPaintRegionMethodInfo        ,
#endif
    windowBeginPaintRegion                  ,


-- ** beginResizeDrag #method:beginResizeDrag#

#if defined(ENABLE_OVERLOADING)
    WindowBeginResizeDragMethodInfo         ,
#endif
    windowBeginResizeDrag                   ,


-- ** beginResizeDragForDevice #method:beginResizeDragForDevice#

#if defined(ENABLE_OVERLOADING)
    WindowBeginResizeDragForDeviceMethodInfo,
#endif
    windowBeginResizeDragForDevice          ,


-- ** configureFinished #method:configureFinished#

#if defined(ENABLE_OVERLOADING)
    WindowConfigureFinishedMethodInfo       ,
#endif
    windowConfigureFinished                 ,


-- ** constrainSize #method:constrainSize#

    windowConstrainSize                     ,


-- ** coordsFromParent #method:coordsFromParent#

#if defined(ENABLE_OVERLOADING)
    WindowCoordsFromParentMethodInfo        ,
#endif
    windowCoordsFromParent                  ,


-- ** coordsToParent #method:coordsToParent#

#if defined(ENABLE_OVERLOADING)
    WindowCoordsToParentMethodInfo          ,
#endif
    windowCoordsToParent                    ,


-- ** createGlContext #method:createGlContext#

#if defined(ENABLE_OVERLOADING)
    WindowCreateGlContextMethodInfo         ,
#endif
    windowCreateGlContext                   ,


-- ** createSimilarImageSurface #method:createSimilarImageSurface#

#if defined(ENABLE_OVERLOADING)
    WindowCreateSimilarImageSurfaceMethodInfo,
#endif
    windowCreateSimilarImageSurface         ,


-- ** createSimilarSurface #method:createSimilarSurface#

#if defined(ENABLE_OVERLOADING)
    WindowCreateSimilarSurfaceMethodInfo    ,
#endif
    windowCreateSimilarSurface              ,


-- ** deiconify #method:deiconify#

#if defined(ENABLE_OVERLOADING)
    WindowDeiconifyMethodInfo               ,
#endif
    windowDeiconify                         ,


-- ** destroy #method:destroy#

#if defined(ENABLE_OVERLOADING)
    WindowDestroyMethodInfo                 ,
#endif
    windowDestroy                           ,


-- ** destroyNotify #method:destroyNotify#

#if defined(ENABLE_OVERLOADING)
    WindowDestroyNotifyMethodInfo           ,
#endif
    windowDestroyNotify                     ,


-- ** enableSynchronizedConfigure #method:enableSynchronizedConfigure#

#if defined(ENABLE_OVERLOADING)
    WindowEnableSynchronizedConfigureMethodInfo,
#endif
    windowEnableSynchronizedConfigure       ,


-- ** endDrawFrame #method:endDrawFrame#

#if defined(ENABLE_OVERLOADING)
    WindowEndDrawFrameMethodInfo            ,
#endif
    windowEndDrawFrame                      ,


-- ** endPaint #method:endPaint#

#if defined(ENABLE_OVERLOADING)
    WindowEndPaintMethodInfo                ,
#endif
    windowEndPaint                          ,


-- ** ensureNative #method:ensureNative#

#if defined(ENABLE_OVERLOADING)
    WindowEnsureNativeMethodInfo            ,
#endif
    windowEnsureNative                      ,


-- ** flush #method:flush#

#if defined(ENABLE_OVERLOADING)
    WindowFlushMethodInfo                   ,
#endif
    windowFlush                             ,


-- ** focus #method:focus#

#if defined(ENABLE_OVERLOADING)
    WindowFocusMethodInfo                   ,
#endif
    windowFocus                             ,


-- ** freezeToplevelUpdatesLibgtkOnly #method:freezeToplevelUpdatesLibgtkOnly#

#if defined(ENABLE_OVERLOADING)
    WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo,
#endif
    windowFreezeToplevelUpdatesLibgtkOnly   ,


-- ** freezeUpdates #method:freezeUpdates#

#if defined(ENABLE_OVERLOADING)
    WindowFreezeUpdatesMethodInfo           ,
#endif
    windowFreezeUpdates                     ,


-- ** fullscreen #method:fullscreen#

#if defined(ENABLE_OVERLOADING)
    WindowFullscreenMethodInfo              ,
#endif
    windowFullscreen                        ,


-- ** fullscreenOnMonitor #method:fullscreenOnMonitor#

#if defined(ENABLE_OVERLOADING)
    WindowFullscreenOnMonitorMethodInfo     ,
#endif
    windowFullscreenOnMonitor               ,


-- ** geometryChanged #method:geometryChanged#

#if defined(ENABLE_OVERLOADING)
    WindowGeometryChangedMethodInfo         ,
#endif
    windowGeometryChanged                   ,


-- ** getAcceptFocus #method:getAcceptFocus#

#if defined(ENABLE_OVERLOADING)
    WindowGetAcceptFocusMethodInfo          ,
#endif
    windowGetAcceptFocus                    ,


-- ** getBackgroundPattern #method:getBackgroundPattern#

#if defined(ENABLE_OVERLOADING)
    WindowGetBackgroundPatternMethodInfo    ,
#endif
    windowGetBackgroundPattern              ,


-- ** getChildren #method:getChildren#

#if defined(ENABLE_OVERLOADING)
    WindowGetChildrenMethodInfo             ,
#endif
    windowGetChildren                       ,


-- ** getChildrenWithUserData #method:getChildrenWithUserData#

#if defined(ENABLE_OVERLOADING)
    WindowGetChildrenWithUserDataMethodInfo ,
#endif
    windowGetChildrenWithUserData           ,


-- ** getClipRegion #method:getClipRegion#

#if defined(ENABLE_OVERLOADING)
    WindowGetClipRegionMethodInfo           ,
#endif
    windowGetClipRegion                     ,


-- ** getComposited #method:getComposited#

#if defined(ENABLE_OVERLOADING)
    WindowGetCompositedMethodInfo           ,
#endif
    windowGetComposited                     ,


-- ** getCursor #method:getCursor#

#if defined(ENABLE_OVERLOADING)
    WindowGetCursorMethodInfo               ,
#endif
    windowGetCursor                         ,


-- ** getDecorations #method:getDecorations#

#if defined(ENABLE_OVERLOADING)
    WindowGetDecorationsMethodInfo          ,
#endif
    windowGetDecorations                    ,


-- ** getDeviceCursor #method:getDeviceCursor#

#if defined(ENABLE_OVERLOADING)
    WindowGetDeviceCursorMethodInfo         ,
#endif
    windowGetDeviceCursor                   ,


-- ** getDeviceEvents #method:getDeviceEvents#

#if defined(ENABLE_OVERLOADING)
    WindowGetDeviceEventsMethodInfo         ,
#endif
    windowGetDeviceEvents                   ,


-- ** getDevicePosition #method:getDevicePosition#

#if defined(ENABLE_OVERLOADING)
    WindowGetDevicePositionMethodInfo       ,
#endif
    windowGetDevicePosition                 ,


-- ** getDevicePositionDouble #method:getDevicePositionDouble#

#if defined(ENABLE_OVERLOADING)
    WindowGetDevicePositionDoubleMethodInfo ,
#endif
    windowGetDevicePositionDouble           ,


-- ** getDisplay #method:getDisplay#

#if defined(ENABLE_OVERLOADING)
    WindowGetDisplayMethodInfo              ,
#endif
    windowGetDisplay                        ,


-- ** getDragProtocol #method:getDragProtocol#

#if defined(ENABLE_OVERLOADING)
    WindowGetDragProtocolMethodInfo         ,
#endif
    windowGetDragProtocol                   ,


-- ** getEffectiveParent #method:getEffectiveParent#

#if defined(ENABLE_OVERLOADING)
    WindowGetEffectiveParentMethodInfo      ,
#endif
    windowGetEffectiveParent                ,


-- ** getEffectiveToplevel #method:getEffectiveToplevel#

#if defined(ENABLE_OVERLOADING)
    WindowGetEffectiveToplevelMethodInfo    ,
#endif
    windowGetEffectiveToplevel              ,


-- ** getEventCompression #method:getEventCompression#

#if defined(ENABLE_OVERLOADING)
    WindowGetEventCompressionMethodInfo     ,
#endif
    windowGetEventCompression               ,


-- ** getEvents #method:getEvents#

#if defined(ENABLE_OVERLOADING)
    WindowGetEventsMethodInfo               ,
#endif
    windowGetEvents                         ,


-- ** getFocusOnMap #method:getFocusOnMap#

#if defined(ENABLE_OVERLOADING)
    WindowGetFocusOnMapMethodInfo           ,
#endif
    windowGetFocusOnMap                     ,


-- ** getFrameClock #method:getFrameClock#

#if defined(ENABLE_OVERLOADING)
    WindowGetFrameClockMethodInfo           ,
#endif
    windowGetFrameClock                     ,


-- ** getFrameExtents #method:getFrameExtents#

#if defined(ENABLE_OVERLOADING)
    WindowGetFrameExtentsMethodInfo         ,
#endif
    windowGetFrameExtents                   ,


-- ** getFullscreenMode #method:getFullscreenMode#

#if defined(ENABLE_OVERLOADING)
    WindowGetFullscreenModeMethodInfo       ,
#endif
    windowGetFullscreenMode                 ,


-- ** getGeometry #method:getGeometry#

#if defined(ENABLE_OVERLOADING)
    WindowGetGeometryMethodInfo             ,
#endif
    windowGetGeometry                       ,


-- ** getGroup #method:getGroup#

#if defined(ENABLE_OVERLOADING)
    WindowGetGroupMethodInfo                ,
#endif
    windowGetGroup                          ,


-- ** getHeight #method:getHeight#

#if defined(ENABLE_OVERLOADING)
    WindowGetHeightMethodInfo               ,
#endif
    windowGetHeight                         ,


-- ** getModalHint #method:getModalHint#

#if defined(ENABLE_OVERLOADING)
    WindowGetModalHintMethodInfo            ,
#endif
    windowGetModalHint                      ,


-- ** getOrigin #method:getOrigin#

#if defined(ENABLE_OVERLOADING)
    WindowGetOriginMethodInfo               ,
#endif
    windowGetOrigin                         ,


-- ** getParent #method:getParent#

#if defined(ENABLE_OVERLOADING)
    WindowGetParentMethodInfo               ,
#endif
    windowGetParent                         ,


-- ** getPassThrough #method:getPassThrough#

#if defined(ENABLE_OVERLOADING)
    WindowGetPassThroughMethodInfo          ,
#endif
    windowGetPassThrough                    ,


-- ** getPointer #method:getPointer#

#if defined(ENABLE_OVERLOADING)
    WindowGetPointerMethodInfo              ,
#endif
    windowGetPointer                        ,


-- ** getPosition #method:getPosition#

#if defined(ENABLE_OVERLOADING)
    WindowGetPositionMethodInfo             ,
#endif
    windowGetPosition                       ,


-- ** getRootCoords #method:getRootCoords#

#if defined(ENABLE_OVERLOADING)
    WindowGetRootCoordsMethodInfo           ,
#endif
    windowGetRootCoords                     ,


-- ** getRootOrigin #method:getRootOrigin#

#if defined(ENABLE_OVERLOADING)
    WindowGetRootOriginMethodInfo           ,
#endif
    windowGetRootOrigin                     ,


-- ** getScaleFactor #method:getScaleFactor#

#if defined(ENABLE_OVERLOADING)
    WindowGetScaleFactorMethodInfo          ,
#endif
    windowGetScaleFactor                    ,


-- ** getScreen #method:getScreen#

#if defined(ENABLE_OVERLOADING)
    WindowGetScreenMethodInfo               ,
#endif
    windowGetScreen                         ,


-- ** getSourceEvents #method:getSourceEvents#

#if defined(ENABLE_OVERLOADING)
    WindowGetSourceEventsMethodInfo         ,
#endif
    windowGetSourceEvents                   ,


-- ** getState #method:getState#

#if defined(ENABLE_OVERLOADING)
    WindowGetStateMethodInfo                ,
#endif
    windowGetState                          ,


-- ** getSupportMultidevice #method:getSupportMultidevice#

#if defined(ENABLE_OVERLOADING)
    WindowGetSupportMultideviceMethodInfo   ,
#endif
    windowGetSupportMultidevice             ,


-- ** getToplevel #method:getToplevel#

#if defined(ENABLE_OVERLOADING)
    WindowGetToplevelMethodInfo             ,
#endif
    windowGetToplevel                       ,


-- ** getTypeHint #method:getTypeHint#

#if defined(ENABLE_OVERLOADING)
    WindowGetTypeHintMethodInfo             ,
#endif
    windowGetTypeHint                       ,


-- ** getUpdateArea #method:getUpdateArea#

#if defined(ENABLE_OVERLOADING)
    WindowGetUpdateAreaMethodInfo           ,
#endif
    windowGetUpdateArea                     ,


-- ** getUserData #method:getUserData#

#if defined(ENABLE_OVERLOADING)
    WindowGetUserDataMethodInfo             ,
#endif
    windowGetUserData                       ,


-- ** getVisibleRegion #method:getVisibleRegion#

#if defined(ENABLE_OVERLOADING)
    WindowGetVisibleRegionMethodInfo        ,
#endif
    windowGetVisibleRegion                  ,


-- ** getVisual #method:getVisual#

#if defined(ENABLE_OVERLOADING)
    WindowGetVisualMethodInfo               ,
#endif
    windowGetVisual                         ,


-- ** getWidth #method:getWidth#

#if defined(ENABLE_OVERLOADING)
    WindowGetWidthMethodInfo                ,
#endif
    windowGetWidth                          ,


-- ** getWindowType #method:getWindowType#

#if defined(ENABLE_OVERLOADING)
    WindowGetWindowTypeMethodInfo           ,
#endif
    windowGetWindowType                     ,


-- ** hasNative #method:hasNative#

#if defined(ENABLE_OVERLOADING)
    WindowHasNativeMethodInfo               ,
#endif
    windowHasNative                         ,


-- ** hide #method:hide#

#if defined(ENABLE_OVERLOADING)
    WindowHideMethodInfo                    ,
#endif
    windowHide                              ,


-- ** iconify #method:iconify#

#if defined(ENABLE_OVERLOADING)
    WindowIconifyMethodInfo                 ,
#endif
    windowIconify                           ,


-- ** inputShapeCombineRegion #method:inputShapeCombineRegion#

#if defined(ENABLE_OVERLOADING)
    WindowInputShapeCombineRegionMethodInfo ,
#endif
    windowInputShapeCombineRegion           ,


-- ** invalidateMaybeRecurse #method:invalidateMaybeRecurse#

#if defined(ENABLE_OVERLOADING)
    WindowInvalidateMaybeRecurseMethodInfo  ,
#endif
    windowInvalidateMaybeRecurse            ,


-- ** invalidateRect #method:invalidateRect#

#if defined(ENABLE_OVERLOADING)
    WindowInvalidateRectMethodInfo          ,
#endif
    windowInvalidateRect                    ,


-- ** invalidateRegion #method:invalidateRegion#

#if defined(ENABLE_OVERLOADING)
    WindowInvalidateRegionMethodInfo        ,
#endif
    windowInvalidateRegion                  ,


-- ** isDestroyed #method:isDestroyed#

#if defined(ENABLE_OVERLOADING)
    WindowIsDestroyedMethodInfo             ,
#endif
    windowIsDestroyed                       ,


-- ** isInputOnly #method:isInputOnly#

#if defined(ENABLE_OVERLOADING)
    WindowIsInputOnlyMethodInfo             ,
#endif
    windowIsInputOnly                       ,


-- ** isShaped #method:isShaped#

#if defined(ENABLE_OVERLOADING)
    WindowIsShapedMethodInfo                ,
#endif
    windowIsShaped                          ,


-- ** isViewable #method:isViewable#

#if defined(ENABLE_OVERLOADING)
    WindowIsViewableMethodInfo              ,
#endif
    windowIsViewable                        ,


-- ** isVisible #method:isVisible#

#if defined(ENABLE_OVERLOADING)
    WindowIsVisibleMethodInfo               ,
#endif
    windowIsVisible                         ,


-- ** lower #method:lower#

#if defined(ENABLE_OVERLOADING)
    WindowLowerMethodInfo                   ,
#endif
    windowLower                             ,


-- ** markPaintFromClip #method:markPaintFromClip#

#if defined(ENABLE_OVERLOADING)
    WindowMarkPaintFromClipMethodInfo       ,
#endif
    windowMarkPaintFromClip                 ,


-- ** maximize #method:maximize#

#if defined(ENABLE_OVERLOADING)
    WindowMaximizeMethodInfo                ,
#endif
    windowMaximize                          ,


-- ** mergeChildInputShapes #method:mergeChildInputShapes#

#if defined(ENABLE_OVERLOADING)
    WindowMergeChildInputShapesMethodInfo   ,
#endif
    windowMergeChildInputShapes             ,


-- ** mergeChildShapes #method:mergeChildShapes#

#if defined(ENABLE_OVERLOADING)
    WindowMergeChildShapesMethodInfo        ,
#endif
    windowMergeChildShapes                  ,


-- ** move #method:move#

#if defined(ENABLE_OVERLOADING)
    WindowMoveMethodInfo                    ,
#endif
    windowMove                              ,


-- ** moveRegion #method:moveRegion#

#if defined(ENABLE_OVERLOADING)
    WindowMoveRegionMethodInfo              ,
#endif
    windowMoveRegion                        ,


-- ** moveResize #method:moveResize#

#if defined(ENABLE_OVERLOADING)
    WindowMoveResizeMethodInfo              ,
#endif
    windowMoveResize                        ,


-- ** moveToRect #method:moveToRect#

#if defined(ENABLE_OVERLOADING)
    WindowMoveToRectMethodInfo              ,
#endif
    windowMoveToRect                        ,


-- ** new #method:new#

    windowNew                               ,


-- ** peekChildren #method:peekChildren#

#if defined(ENABLE_OVERLOADING)
    WindowPeekChildrenMethodInfo            ,
#endif
    windowPeekChildren                      ,


-- ** processAllUpdates #method:processAllUpdates#

    windowProcessAllUpdates                 ,


-- ** processUpdates #method:processUpdates#

#if defined(ENABLE_OVERLOADING)
    WindowProcessUpdatesMethodInfo          ,
#endif
    windowProcessUpdates                    ,


-- ** raise #method:raise#

#if defined(ENABLE_OVERLOADING)
    WindowRaiseMethodInfo                   ,
#endif
    windowRaise                             ,


-- ** registerDnd #method:registerDnd#

#if defined(ENABLE_OVERLOADING)
    WindowRegisterDndMethodInfo             ,
#endif
    windowRegisterDnd                       ,


-- ** reparent #method:reparent#

#if defined(ENABLE_OVERLOADING)
    WindowReparentMethodInfo                ,
#endif
    windowReparent                          ,


-- ** resize #method:resize#

#if defined(ENABLE_OVERLOADING)
    WindowResizeMethodInfo                  ,
#endif
    windowResize                            ,


-- ** restack #method:restack#

#if defined(ENABLE_OVERLOADING)
    WindowRestackMethodInfo                 ,
#endif
    windowRestack                           ,


-- ** scroll #method:scroll#

#if defined(ENABLE_OVERLOADING)
    WindowScrollMethodInfo                  ,
#endif
    windowScroll                            ,


-- ** setAcceptFocus #method:setAcceptFocus#

#if defined(ENABLE_OVERLOADING)
    WindowSetAcceptFocusMethodInfo          ,
#endif
    windowSetAcceptFocus                    ,


-- ** setBackground #method:setBackground#

#if defined(ENABLE_OVERLOADING)
    WindowSetBackgroundMethodInfo           ,
#endif
    windowSetBackground                     ,


-- ** setBackgroundPattern #method:setBackgroundPattern#

#if defined(ENABLE_OVERLOADING)
    WindowSetBackgroundPatternMethodInfo    ,
#endif
    windowSetBackgroundPattern              ,


-- ** setBackgroundRgba #method:setBackgroundRgba#

#if defined(ENABLE_OVERLOADING)
    WindowSetBackgroundRgbaMethodInfo       ,
#endif
    windowSetBackgroundRgba                 ,


-- ** setChildInputShapes #method:setChildInputShapes#

#if defined(ENABLE_OVERLOADING)
    WindowSetChildInputShapesMethodInfo     ,
#endif
    windowSetChildInputShapes               ,


-- ** setChildShapes #method:setChildShapes#

#if defined(ENABLE_OVERLOADING)
    WindowSetChildShapesMethodInfo          ,
#endif
    windowSetChildShapes                    ,


-- ** setComposited #method:setComposited#

#if defined(ENABLE_OVERLOADING)
    WindowSetCompositedMethodInfo           ,
#endif
    windowSetComposited                     ,


-- ** setCursor #method:setCursor#

#if defined(ENABLE_OVERLOADING)
    WindowSetCursorMethodInfo               ,
#endif
    windowSetCursor                         ,


-- ** setDebugUpdates #method:setDebugUpdates#

    windowSetDebugUpdates                   ,


-- ** setDecorations #method:setDecorations#

#if defined(ENABLE_OVERLOADING)
    WindowSetDecorationsMethodInfo          ,
#endif
    windowSetDecorations                    ,


-- ** setDeviceCursor #method:setDeviceCursor#

#if defined(ENABLE_OVERLOADING)
    WindowSetDeviceCursorMethodInfo         ,
#endif
    windowSetDeviceCursor                   ,


-- ** setDeviceEvents #method:setDeviceEvents#

#if defined(ENABLE_OVERLOADING)
    WindowSetDeviceEventsMethodInfo         ,
#endif
    windowSetDeviceEvents                   ,


-- ** setEventCompression #method:setEventCompression#

#if defined(ENABLE_OVERLOADING)
    WindowSetEventCompressionMethodInfo     ,
#endif
    windowSetEventCompression               ,


-- ** setEvents #method:setEvents#

#if defined(ENABLE_OVERLOADING)
    WindowSetEventsMethodInfo               ,
#endif
    windowSetEvents                         ,


-- ** setFocusOnMap #method:setFocusOnMap#

#if defined(ENABLE_OVERLOADING)
    WindowSetFocusOnMapMethodInfo           ,
#endif
    windowSetFocusOnMap                     ,


-- ** setFullscreenMode #method:setFullscreenMode#

#if defined(ENABLE_OVERLOADING)
    WindowSetFullscreenModeMethodInfo       ,
#endif
    windowSetFullscreenMode                 ,


-- ** setFunctions #method:setFunctions#

#if defined(ENABLE_OVERLOADING)
    WindowSetFunctionsMethodInfo            ,
#endif
    windowSetFunctions                      ,


-- ** setGeometryHints #method:setGeometryHints#

#if defined(ENABLE_OVERLOADING)
    WindowSetGeometryHintsMethodInfo        ,
#endif
    windowSetGeometryHints                  ,


-- ** setGroup #method:setGroup#

#if defined(ENABLE_OVERLOADING)
    WindowSetGroupMethodInfo                ,
#endif
    windowSetGroup                          ,


-- ** setIconList #method:setIconList#

#if defined(ENABLE_OVERLOADING)
    WindowSetIconListMethodInfo             ,
#endif
    windowSetIconList                       ,


-- ** setIconName #method:setIconName#

#if defined(ENABLE_OVERLOADING)
    WindowSetIconNameMethodInfo             ,
#endif
    windowSetIconName                       ,


-- ** setKeepAbove #method:setKeepAbove#

#if defined(ENABLE_OVERLOADING)
    WindowSetKeepAboveMethodInfo            ,
#endif
    windowSetKeepAbove                      ,


-- ** setKeepBelow #method:setKeepBelow#

#if defined(ENABLE_OVERLOADING)
    WindowSetKeepBelowMethodInfo            ,
#endif
    windowSetKeepBelow                      ,


-- ** setModalHint #method:setModalHint#

#if defined(ENABLE_OVERLOADING)
    WindowSetModalHintMethodInfo            ,
#endif
    windowSetModalHint                      ,


-- ** setOpacity #method:setOpacity#

#if defined(ENABLE_OVERLOADING)
    WindowSetOpacityMethodInfo              ,
#endif
    windowSetOpacity                        ,


-- ** setOpaqueRegion #method:setOpaqueRegion#

#if defined(ENABLE_OVERLOADING)
    WindowSetOpaqueRegionMethodInfo         ,
#endif
    windowSetOpaqueRegion                   ,


-- ** setOverrideRedirect #method:setOverrideRedirect#

#if defined(ENABLE_OVERLOADING)
    WindowSetOverrideRedirectMethodInfo     ,
#endif
    windowSetOverrideRedirect               ,


-- ** setPassThrough #method:setPassThrough#

#if defined(ENABLE_OVERLOADING)
    WindowSetPassThroughMethodInfo          ,
#endif
    windowSetPassThrough                    ,


-- ** setRole #method:setRole#

#if defined(ENABLE_OVERLOADING)
    WindowSetRoleMethodInfo                 ,
#endif
    windowSetRole                           ,


-- ** setShadowWidth #method:setShadowWidth#

#if defined(ENABLE_OVERLOADING)
    WindowSetShadowWidthMethodInfo          ,
#endif
    windowSetShadowWidth                    ,


-- ** setSkipPagerHint #method:setSkipPagerHint#

#if defined(ENABLE_OVERLOADING)
    WindowSetSkipPagerHintMethodInfo        ,
#endif
    windowSetSkipPagerHint                  ,


-- ** setSkipTaskbarHint #method:setSkipTaskbarHint#

#if defined(ENABLE_OVERLOADING)
    WindowSetSkipTaskbarHintMethodInfo      ,
#endif
    windowSetSkipTaskbarHint                ,


-- ** setSourceEvents #method:setSourceEvents#

#if defined(ENABLE_OVERLOADING)
    WindowSetSourceEventsMethodInfo         ,
#endif
    windowSetSourceEvents                   ,


-- ** setStartupId #method:setStartupId#

#if defined(ENABLE_OVERLOADING)
    WindowSetStartupIdMethodInfo            ,
#endif
    windowSetStartupId                      ,


-- ** setStaticGravities #method:setStaticGravities#

#if defined(ENABLE_OVERLOADING)
    WindowSetStaticGravitiesMethodInfo      ,
#endif
    windowSetStaticGravities                ,


-- ** setSupportMultidevice #method:setSupportMultidevice#

#if defined(ENABLE_OVERLOADING)
    WindowSetSupportMultideviceMethodInfo   ,
#endif
    windowSetSupportMultidevice             ,


-- ** setTitle #method:setTitle#

#if defined(ENABLE_OVERLOADING)
    WindowSetTitleMethodInfo                ,
#endif
    windowSetTitle                          ,


-- ** setTransientFor #method:setTransientFor#

#if defined(ENABLE_OVERLOADING)
    WindowSetTransientForMethodInfo         ,
#endif
    windowSetTransientFor                   ,


-- ** setTypeHint #method:setTypeHint#

#if defined(ENABLE_OVERLOADING)
    WindowSetTypeHintMethodInfo             ,
#endif
    windowSetTypeHint                       ,


-- ** setUrgencyHint #method:setUrgencyHint#

#if defined(ENABLE_OVERLOADING)
    WindowSetUrgencyHintMethodInfo          ,
#endif
    windowSetUrgencyHint                    ,


-- ** setUserData #method:setUserData#

#if defined(ENABLE_OVERLOADING)
    WindowSetUserDataMethodInfo             ,
#endif
    windowSetUserData                       ,


-- ** shapeCombineRegion #method:shapeCombineRegion#

#if defined(ENABLE_OVERLOADING)
    WindowShapeCombineRegionMethodInfo      ,
#endif
    windowShapeCombineRegion                ,


-- ** show #method:show#

#if defined(ENABLE_OVERLOADING)
    WindowShowMethodInfo                    ,
#endif
    windowShow                              ,


-- ** showUnraised #method:showUnraised#

#if defined(ENABLE_OVERLOADING)
    WindowShowUnraisedMethodInfo            ,
#endif
    windowShowUnraised                      ,


-- ** showWindowMenu #method:showWindowMenu#

#if defined(ENABLE_OVERLOADING)
    WindowShowWindowMenuMethodInfo          ,
#endif
    windowShowWindowMenu                    ,


-- ** stick #method:stick#

#if defined(ENABLE_OVERLOADING)
    WindowStickMethodInfo                   ,
#endif
    windowStick                             ,


-- ** thawToplevelUpdatesLibgtkOnly #method:thawToplevelUpdatesLibgtkOnly#

#if defined(ENABLE_OVERLOADING)
    WindowThawToplevelUpdatesLibgtkOnlyMethodInfo,
#endif
    windowThawToplevelUpdatesLibgtkOnly     ,


-- ** thawUpdates #method:thawUpdates#

#if defined(ENABLE_OVERLOADING)
    WindowThawUpdatesMethodInfo             ,
#endif
    windowThawUpdates                       ,


-- ** unfullscreen #method:unfullscreen#

#if defined(ENABLE_OVERLOADING)
    WindowUnfullscreenMethodInfo            ,
#endif
    windowUnfullscreen                      ,


-- ** unmaximize #method:unmaximize#

#if defined(ENABLE_OVERLOADING)
    WindowUnmaximizeMethodInfo              ,
#endif
    windowUnmaximize                        ,


-- ** unstick #method:unstick#

#if defined(ENABLE_OVERLOADING)
    WindowUnstickMethodInfo                 ,
#endif
    windowUnstick                           ,


-- ** withdraw #method:withdraw#

#if defined(ENABLE_OVERLOADING)
    WindowWithdrawMethodInfo                ,
#endif
    windowWithdraw                          ,




 -- * Properties
-- ** cursor #attr:cursor#
-- | The mouse pointer for a t'GI.Gdk.Objects.Window.Window'. See 'GI.Gdk.Objects.Window.windowSetCursor' and
-- 'GI.Gdk.Objects.Window.windowGetCursor' for details.
-- 
-- /Since: 2.18/

#if defined(ENABLE_OVERLOADING)
    WindowCursorPropertyInfo                ,
#endif
    clearWindowCursor                       ,
    constructWindowCursor                   ,
    getWindowCursor                         ,
    setWindowCursor                         ,
#if defined(ENABLE_OVERLOADING)
    windowCursor                            ,
#endif




 -- * Signals
-- ** createSurface #signal:createSurface#

    C_WindowCreateSurfaceCallback           ,
    WindowCreateSurfaceCallback             ,
#if defined(ENABLE_OVERLOADING)
    WindowCreateSurfaceSignalInfo           ,
#endif
    afterWindowCreateSurface                ,
    genClosure_WindowCreateSurface          ,
    mk_WindowCreateSurfaceCallback          ,
    noWindowCreateSurfaceCallback           ,
    onWindowCreateSurface                   ,
    wrap_WindowCreateSurfaceCallback        ,


-- ** fromEmbedder #signal:fromEmbedder#

    C_WindowFromEmbedderCallback            ,
    WindowFromEmbedderCallback              ,
#if defined(ENABLE_OVERLOADING)
    WindowFromEmbedderSignalInfo            ,
#endif
    afterWindowFromEmbedder                 ,
    genClosure_WindowFromEmbedder           ,
    mk_WindowFromEmbedderCallback           ,
    noWindowFromEmbedderCallback            ,
    onWindowFromEmbedder                    ,
    wrap_WindowFromEmbedderCallback         ,


-- ** movedToRect #signal:movedToRect#

    C_WindowMovedToRectCallback             ,
    WindowMovedToRectCallback               ,
#if defined(ENABLE_OVERLOADING)
    WindowMovedToRectSignalInfo             ,
#endif
    afterWindowMovedToRect                  ,
    genClosure_WindowMovedToRect            ,
    mk_WindowMovedToRectCallback            ,
    noWindowMovedToRectCallback             ,
    onWindowMovedToRect                     ,
    wrap_WindowMovedToRectCallback          ,


-- ** pickEmbeddedChild #signal:pickEmbeddedChild#

    C_WindowPickEmbeddedChildCallback       ,
    WindowPickEmbeddedChildCallback         ,
#if defined(ENABLE_OVERLOADING)
    WindowPickEmbeddedChildSignalInfo       ,
#endif
    afterWindowPickEmbeddedChild            ,
    genClosure_WindowPickEmbeddedChild      ,
    mk_WindowPickEmbeddedChildCallback      ,
    noWindowPickEmbeddedChildCallback       ,
    onWindowPickEmbeddedChild               ,
    wrap_WindowPickEmbeddedChildCallback    ,


-- ** toEmbedder #signal:toEmbedder#

    C_WindowToEmbedderCallback              ,
    WindowToEmbedderCallback                ,
#if defined(ENABLE_OVERLOADING)
    WindowToEmbedderSignalInfo              ,
#endif
    afterWindowToEmbedder                   ,
    genClosure_WindowToEmbedder             ,
    mk_WindowToEmbedderCallback             ,
    noWindowToEmbedderCallback              ,
    onWindowToEmbedder                      ,
    wrap_WindowToEmbedderCallback           ,




    ) 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.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 GI.Cairo.Enums as Cairo.Enums
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.Pattern as Cairo.Pattern
import qualified GI.Cairo.Structs.Region as Cairo.Region
import qualified GI.Cairo.Structs.Surface as Cairo.Surface
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Callbacks as Gdk.Callbacks
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.Display as Gdk.Display
import {-# SOURCE #-} qualified GI.Gdk.Objects.DrawingContext as Gdk.DrawingContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import {-# SOURCE #-} qualified GI.Gdk.Objects.GLContext as Gdk.GLContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Screen as Gdk.Screen
import {-# SOURCE #-} qualified GI.Gdk.Objects.Visual as Gdk.Visual
import {-# SOURCE #-} qualified GI.Gdk.Structs.Color as Gdk.Color
import {-# SOURCE #-} qualified GI.Gdk.Structs.Geometry as Gdk.Geometry
import {-# SOURCE #-} qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import {-# SOURCE #-} qualified GI.Gdk.Structs.WindowAttr as Gdk.WindowAttr
import {-# SOURCE #-} qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf

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

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

foreign import ccall "gdk_window_get_type"
    c_gdk_window_get_type :: IO B.Types.GType

instance B.Types.TypedObject Window where
    glibType :: IO GType
glibType = IO GType
c_gdk_window_get_type

instance B.Types.GObject Window

-- | Convert 'Window' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Window where
    toGValue :: Window -> IO GValue
toGValue Window
o = do
        GType
gtype <- IO GType
c_gdk_window_get_type
        Window -> (Ptr Window -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Window
o (GType -> (GValue -> Ptr Window -> IO ()) -> Ptr Window -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Window -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Window
fromGValue GValue
gv = do
        Ptr Window
ptr <- GValue -> IO (Ptr Window)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Window)
        (ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Window -> Window
Window Ptr Window
ptr
        
    

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

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

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

#if defined(ENABLE_OVERLOADING)
type family ResolveWindowMethod (t :: Symbol) (o :: *) :: * where
    ResolveWindowMethod "beep" o = WindowBeepMethodInfo
    ResolveWindowMethod "beginDrawFrame" o = WindowBeginDrawFrameMethodInfo
    ResolveWindowMethod "beginMoveDrag" o = WindowBeginMoveDragMethodInfo
    ResolveWindowMethod "beginMoveDragForDevice" o = WindowBeginMoveDragForDeviceMethodInfo
    ResolveWindowMethod "beginPaintRect" o = WindowBeginPaintRectMethodInfo
    ResolveWindowMethod "beginPaintRegion" o = WindowBeginPaintRegionMethodInfo
    ResolveWindowMethod "beginResizeDrag" o = WindowBeginResizeDragMethodInfo
    ResolveWindowMethod "beginResizeDragForDevice" o = WindowBeginResizeDragForDeviceMethodInfo
    ResolveWindowMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWindowMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWindowMethod "configureFinished" o = WindowConfigureFinishedMethodInfo
    ResolveWindowMethod "coordsFromParent" o = WindowCoordsFromParentMethodInfo
    ResolveWindowMethod "coordsToParent" o = WindowCoordsToParentMethodInfo
    ResolveWindowMethod "createGlContext" o = WindowCreateGlContextMethodInfo
    ResolveWindowMethod "createSimilarImageSurface" o = WindowCreateSimilarImageSurfaceMethodInfo
    ResolveWindowMethod "createSimilarSurface" o = WindowCreateSimilarSurfaceMethodInfo
    ResolveWindowMethod "deiconify" o = WindowDeiconifyMethodInfo
    ResolveWindowMethod "destroy" o = WindowDestroyMethodInfo
    ResolveWindowMethod "destroyNotify" o = WindowDestroyNotifyMethodInfo
    ResolveWindowMethod "enableSynchronizedConfigure" o = WindowEnableSynchronizedConfigureMethodInfo
    ResolveWindowMethod "endDrawFrame" o = WindowEndDrawFrameMethodInfo
    ResolveWindowMethod "endPaint" o = WindowEndPaintMethodInfo
    ResolveWindowMethod "ensureNative" o = WindowEnsureNativeMethodInfo
    ResolveWindowMethod "flush" o = WindowFlushMethodInfo
    ResolveWindowMethod "focus" o = WindowFocusMethodInfo
    ResolveWindowMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWindowMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWindowMethod "freezeToplevelUpdatesLibgtkOnly" o = WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo
    ResolveWindowMethod "freezeUpdates" o = WindowFreezeUpdatesMethodInfo
    ResolveWindowMethod "fullscreen" o = WindowFullscreenMethodInfo
    ResolveWindowMethod "fullscreenOnMonitor" o = WindowFullscreenOnMonitorMethodInfo
    ResolveWindowMethod "geometryChanged" o = WindowGeometryChangedMethodInfo
    ResolveWindowMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWindowMethod "hasNative" o = WindowHasNativeMethodInfo
    ResolveWindowMethod "hide" o = WindowHideMethodInfo
    ResolveWindowMethod "iconify" o = WindowIconifyMethodInfo
    ResolveWindowMethod "inputShapeCombineRegion" o = WindowInputShapeCombineRegionMethodInfo
    ResolveWindowMethod "invalidateMaybeRecurse" o = WindowInvalidateMaybeRecurseMethodInfo
    ResolveWindowMethod "invalidateRect" o = WindowInvalidateRectMethodInfo
    ResolveWindowMethod "invalidateRegion" o = WindowInvalidateRegionMethodInfo
    ResolveWindowMethod "isDestroyed" o = WindowIsDestroyedMethodInfo
    ResolveWindowMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWindowMethod "isInputOnly" o = WindowIsInputOnlyMethodInfo
    ResolveWindowMethod "isShaped" o = WindowIsShapedMethodInfo
    ResolveWindowMethod "isViewable" o = WindowIsViewableMethodInfo
    ResolveWindowMethod "isVisible" o = WindowIsVisibleMethodInfo
    ResolveWindowMethod "lower" o = WindowLowerMethodInfo
    ResolveWindowMethod "markPaintFromClip" o = WindowMarkPaintFromClipMethodInfo
    ResolveWindowMethod "maximize" o = WindowMaximizeMethodInfo
    ResolveWindowMethod "mergeChildInputShapes" o = WindowMergeChildInputShapesMethodInfo
    ResolveWindowMethod "mergeChildShapes" o = WindowMergeChildShapesMethodInfo
    ResolveWindowMethod "move" o = WindowMoveMethodInfo
    ResolveWindowMethod "moveRegion" o = WindowMoveRegionMethodInfo
    ResolveWindowMethod "moveResize" o = WindowMoveResizeMethodInfo
    ResolveWindowMethod "moveToRect" o = WindowMoveToRectMethodInfo
    ResolveWindowMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWindowMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWindowMethod "peekChildren" o = WindowPeekChildrenMethodInfo
    ResolveWindowMethod "processUpdates" o = WindowProcessUpdatesMethodInfo
    ResolveWindowMethod "raise" o = WindowRaiseMethodInfo
    ResolveWindowMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWindowMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWindowMethod "registerDnd" o = WindowRegisterDndMethodInfo
    ResolveWindowMethod "reparent" o = WindowReparentMethodInfo
    ResolveWindowMethod "resize" o = WindowResizeMethodInfo
    ResolveWindowMethod "restack" o = WindowRestackMethodInfo
    ResolveWindowMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWindowMethod "scroll" o = WindowScrollMethodInfo
    ResolveWindowMethod "shapeCombineRegion" o = WindowShapeCombineRegionMethodInfo
    ResolveWindowMethod "show" o = WindowShowMethodInfo
    ResolveWindowMethod "showUnraised" o = WindowShowUnraisedMethodInfo
    ResolveWindowMethod "showWindowMenu" o = WindowShowWindowMenuMethodInfo
    ResolveWindowMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWindowMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWindowMethod "stick" o = WindowStickMethodInfo
    ResolveWindowMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWindowMethod "thawToplevelUpdatesLibgtkOnly" o = WindowThawToplevelUpdatesLibgtkOnlyMethodInfo
    ResolveWindowMethod "thawUpdates" o = WindowThawUpdatesMethodInfo
    ResolveWindowMethod "unfullscreen" o = WindowUnfullscreenMethodInfo
    ResolveWindowMethod "unmaximize" o = WindowUnmaximizeMethodInfo
    ResolveWindowMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWindowMethod "unstick" o = WindowUnstickMethodInfo
    ResolveWindowMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWindowMethod "withdraw" o = WindowWithdrawMethodInfo
    ResolveWindowMethod "getAcceptFocus" o = WindowGetAcceptFocusMethodInfo
    ResolveWindowMethod "getBackgroundPattern" o = WindowGetBackgroundPatternMethodInfo
    ResolveWindowMethod "getChildren" o = WindowGetChildrenMethodInfo
    ResolveWindowMethod "getChildrenWithUserData" o = WindowGetChildrenWithUserDataMethodInfo
    ResolveWindowMethod "getClipRegion" o = WindowGetClipRegionMethodInfo
    ResolveWindowMethod "getComposited" o = WindowGetCompositedMethodInfo
    ResolveWindowMethod "getCursor" o = WindowGetCursorMethodInfo
    ResolveWindowMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWindowMethod "getDecorations" o = WindowGetDecorationsMethodInfo
    ResolveWindowMethod "getDeviceCursor" o = WindowGetDeviceCursorMethodInfo
    ResolveWindowMethod "getDeviceEvents" o = WindowGetDeviceEventsMethodInfo
    ResolveWindowMethod "getDevicePosition" o = WindowGetDevicePositionMethodInfo
    ResolveWindowMethod "getDevicePositionDouble" o = WindowGetDevicePositionDoubleMethodInfo
    ResolveWindowMethod "getDisplay" o = WindowGetDisplayMethodInfo
    ResolveWindowMethod "getDragProtocol" o = WindowGetDragProtocolMethodInfo
    ResolveWindowMethod "getEffectiveParent" o = WindowGetEffectiveParentMethodInfo
    ResolveWindowMethod "getEffectiveToplevel" o = WindowGetEffectiveToplevelMethodInfo
    ResolveWindowMethod "getEventCompression" o = WindowGetEventCompressionMethodInfo
    ResolveWindowMethod "getEvents" o = WindowGetEventsMethodInfo
    ResolveWindowMethod "getFocusOnMap" o = WindowGetFocusOnMapMethodInfo
    ResolveWindowMethod "getFrameClock" o = WindowGetFrameClockMethodInfo
    ResolveWindowMethod "getFrameExtents" o = WindowGetFrameExtentsMethodInfo
    ResolveWindowMethod "getFullscreenMode" o = WindowGetFullscreenModeMethodInfo
    ResolveWindowMethod "getGeometry" o = WindowGetGeometryMethodInfo
    ResolveWindowMethod "getGroup" o = WindowGetGroupMethodInfo
    ResolveWindowMethod "getHeight" o = WindowGetHeightMethodInfo
    ResolveWindowMethod "getModalHint" o = WindowGetModalHintMethodInfo
    ResolveWindowMethod "getOrigin" o = WindowGetOriginMethodInfo
    ResolveWindowMethod "getParent" o = WindowGetParentMethodInfo
    ResolveWindowMethod "getPassThrough" o = WindowGetPassThroughMethodInfo
    ResolveWindowMethod "getPointer" o = WindowGetPointerMethodInfo
    ResolveWindowMethod "getPosition" o = WindowGetPositionMethodInfo
    ResolveWindowMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWindowMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWindowMethod "getRootCoords" o = WindowGetRootCoordsMethodInfo
    ResolveWindowMethod "getRootOrigin" o = WindowGetRootOriginMethodInfo
    ResolveWindowMethod "getScaleFactor" o = WindowGetScaleFactorMethodInfo
    ResolveWindowMethod "getScreen" o = WindowGetScreenMethodInfo
    ResolveWindowMethod "getSourceEvents" o = WindowGetSourceEventsMethodInfo
    ResolveWindowMethod "getState" o = WindowGetStateMethodInfo
    ResolveWindowMethod "getSupportMultidevice" o = WindowGetSupportMultideviceMethodInfo
    ResolveWindowMethod "getToplevel" o = WindowGetToplevelMethodInfo
    ResolveWindowMethod "getTypeHint" o = WindowGetTypeHintMethodInfo
    ResolveWindowMethod "getUpdateArea" o = WindowGetUpdateAreaMethodInfo
    ResolveWindowMethod "getUserData" o = WindowGetUserDataMethodInfo
    ResolveWindowMethod "getVisibleRegion" o = WindowGetVisibleRegionMethodInfo
    ResolveWindowMethod "getVisual" o = WindowGetVisualMethodInfo
    ResolveWindowMethod "getWidth" o = WindowGetWidthMethodInfo
    ResolveWindowMethod "getWindowType" o = WindowGetWindowTypeMethodInfo
    ResolveWindowMethod "setAcceptFocus" o = WindowSetAcceptFocusMethodInfo
    ResolveWindowMethod "setBackground" o = WindowSetBackgroundMethodInfo
    ResolveWindowMethod "setBackgroundPattern" o = WindowSetBackgroundPatternMethodInfo
    ResolveWindowMethod "setBackgroundRgba" o = WindowSetBackgroundRgbaMethodInfo
    ResolveWindowMethod "setChildInputShapes" o = WindowSetChildInputShapesMethodInfo
    ResolveWindowMethod "setChildShapes" o = WindowSetChildShapesMethodInfo
    ResolveWindowMethod "setComposited" o = WindowSetCompositedMethodInfo
    ResolveWindowMethod "setCursor" o = WindowSetCursorMethodInfo
    ResolveWindowMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWindowMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWindowMethod "setDecorations" o = WindowSetDecorationsMethodInfo
    ResolveWindowMethod "setDeviceCursor" o = WindowSetDeviceCursorMethodInfo
    ResolveWindowMethod "setDeviceEvents" o = WindowSetDeviceEventsMethodInfo
    ResolveWindowMethod "setEventCompression" o = WindowSetEventCompressionMethodInfo
    ResolveWindowMethod "setEvents" o = WindowSetEventsMethodInfo
    ResolveWindowMethod "setFocusOnMap" o = WindowSetFocusOnMapMethodInfo
    ResolveWindowMethod "setFullscreenMode" o = WindowSetFullscreenModeMethodInfo
    ResolveWindowMethod "setFunctions" o = WindowSetFunctionsMethodInfo
    ResolveWindowMethod "setGeometryHints" o = WindowSetGeometryHintsMethodInfo
    ResolveWindowMethod "setGroup" o = WindowSetGroupMethodInfo
    ResolveWindowMethod "setIconList" o = WindowSetIconListMethodInfo
    ResolveWindowMethod "setIconName" o = WindowSetIconNameMethodInfo
    ResolveWindowMethod "setKeepAbove" o = WindowSetKeepAboveMethodInfo
    ResolveWindowMethod "setKeepBelow" o = WindowSetKeepBelowMethodInfo
    ResolveWindowMethod "setModalHint" o = WindowSetModalHintMethodInfo
    ResolveWindowMethod "setOpacity" o = WindowSetOpacityMethodInfo
    ResolveWindowMethod "setOpaqueRegion" o = WindowSetOpaqueRegionMethodInfo
    ResolveWindowMethod "setOverrideRedirect" o = WindowSetOverrideRedirectMethodInfo
    ResolveWindowMethod "setPassThrough" o = WindowSetPassThroughMethodInfo
    ResolveWindowMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWindowMethod "setRole" o = WindowSetRoleMethodInfo
    ResolveWindowMethod "setShadowWidth" o = WindowSetShadowWidthMethodInfo
    ResolveWindowMethod "setSkipPagerHint" o = WindowSetSkipPagerHintMethodInfo
    ResolveWindowMethod "setSkipTaskbarHint" o = WindowSetSkipTaskbarHintMethodInfo
    ResolveWindowMethod "setSourceEvents" o = WindowSetSourceEventsMethodInfo
    ResolveWindowMethod "setStartupId" o = WindowSetStartupIdMethodInfo
    ResolveWindowMethod "setStaticGravities" o = WindowSetStaticGravitiesMethodInfo
    ResolveWindowMethod "setSupportMultidevice" o = WindowSetSupportMultideviceMethodInfo
    ResolveWindowMethod "setTitle" o = WindowSetTitleMethodInfo
    ResolveWindowMethod "setTransientFor" o = WindowSetTransientForMethodInfo
    ResolveWindowMethod "setTypeHint" o = WindowSetTypeHintMethodInfo
    ResolveWindowMethod "setUrgencyHint" o = WindowSetUrgencyHintMethodInfo
    ResolveWindowMethod "setUserData" o = WindowSetUserDataMethodInfo
    ResolveWindowMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveWindowMethod t Window, O.MethodInfo info Window p) => OL.IsLabel t (Window -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

-- signal Window::create-surface
-- | The [createSurface](#g:signal:createSurface) signal is emitted when an offscreen window
-- needs its surface (re)created, which happens either when the
-- window is first drawn to, or when the window is being
-- resized. The first signal handler that returns a non-'P.Nothing'
-- surface will stop any further signal emission, and its surface
-- will be used.
-- 
-- Note that it is not possible to access the window\'s previous
-- surface from within any callback of this signal. Calling
-- 'GI.Gdk.Functions.offscreenWindowGetSurface' will lead to a crash.
-- 
-- /Since: 3.0/
type WindowCreateSurfaceCallback =
    Int32
    -- ^ /@width@/: the width of the offscreen surface to create
    -> Int32
    -- ^ /@height@/: the height of the offscreen surface to create
    -> IO Cairo.Surface.Surface
    -- ^ __Returns:__ the newly created t'GI.Cairo.Structs.Surface.Surface' for the offscreen window

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowCreateSurfaceCallback`@.
noWindowCreateSurfaceCallback :: Maybe WindowCreateSurfaceCallback
noWindowCreateSurfaceCallback :: Maybe WindowCreateSurfaceCallback
noWindowCreateSurfaceCallback = Maybe WindowCreateSurfaceCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WindowCreateSurfaceCallback =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO (Ptr Cairo.Surface.Surface)

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowCreateSurface :: MonadIO m => WindowCreateSurfaceCallback -> m (GClosure C_WindowCreateSurfaceCallback)
genClosure_WindowCreateSurface :: WindowCreateSurfaceCallback
-> m (GClosure C_WindowCreateSurfaceCallback)
genClosure_WindowCreateSurface WindowCreateSurfaceCallback
cb = IO (GClosure C_WindowCreateSurfaceCallback)
-> m (GClosure C_WindowCreateSurfaceCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowCreateSurfaceCallback)
 -> m (GClosure C_WindowCreateSurfaceCallback))
-> IO (GClosure C_WindowCreateSurfaceCallback)
-> m (GClosure C_WindowCreateSurfaceCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowCreateSurfaceCallback
cb' = WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
cb
    C_WindowCreateSurfaceCallback
-> IO (FunPtr C_WindowCreateSurfaceCallback)
mk_WindowCreateSurfaceCallback C_WindowCreateSurfaceCallback
cb' IO (FunPtr C_WindowCreateSurfaceCallback)
-> (FunPtr C_WindowCreateSurfaceCallback
    -> IO (GClosure C_WindowCreateSurfaceCallback))
-> IO (GClosure C_WindowCreateSurfaceCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowCreateSurfaceCallback
-> IO (GClosure C_WindowCreateSurfaceCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowCreateSurfaceCallback` into a `C_WindowCreateSurfaceCallback`.
wrap_WindowCreateSurfaceCallback ::
    WindowCreateSurfaceCallback ->
    C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback :: WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
_cb Ptr ()
_ Int32
width Int32
height Ptr ()
_ = do
    Surface
result <- WindowCreateSurfaceCallback
_cb  Int32
width Int32
height
    Ptr Surface
result' <- Surface -> IO (Ptr Surface)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Surface
result
    Ptr Surface -> IO (Ptr Surface)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Surface
result'


-- | Connect a signal handler for the [createSurface](#signal:createSurface) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' window #createSurface callback
-- @
-- 
-- 
onWindowCreateSurface :: (IsWindow a, MonadIO m) => a -> WindowCreateSurfaceCallback -> m SignalHandlerId
onWindowCreateSurface :: a -> WindowCreateSurfaceCallback -> m SignalHandlerId
onWindowCreateSurface a
obj WindowCreateSurfaceCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowCreateSurfaceCallback
cb' = WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
cb
    FunPtr C_WindowCreateSurfaceCallback
cb'' <- C_WindowCreateSurfaceCallback
-> IO (FunPtr C_WindowCreateSurfaceCallback)
mk_WindowCreateSurfaceCallback C_WindowCreateSurfaceCallback
cb'
    a
-> Text
-> FunPtr C_WindowCreateSurfaceCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"create-surface" FunPtr C_WindowCreateSurfaceCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [createSurface](#signal:createSurface) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' window #createSurface callback
-- @
-- 
-- 
afterWindowCreateSurface :: (IsWindow a, MonadIO m) => a -> WindowCreateSurfaceCallback -> m SignalHandlerId
afterWindowCreateSurface :: a -> WindowCreateSurfaceCallback -> m SignalHandlerId
afterWindowCreateSurface a
obj WindowCreateSurfaceCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowCreateSurfaceCallback
cb' = WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
cb
    FunPtr C_WindowCreateSurfaceCallback
cb'' <- C_WindowCreateSurfaceCallback
-> IO (FunPtr C_WindowCreateSurfaceCallback)
mk_WindowCreateSurfaceCallback C_WindowCreateSurfaceCallback
cb'
    a
-> Text
-> FunPtr C_WindowCreateSurfaceCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"create-surface" FunPtr C_WindowCreateSurfaceCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowCreateSurfaceSignalInfo
instance SignalInfo WindowCreateSurfaceSignalInfo where
    type HaskellCallbackType WindowCreateSurfaceSignalInfo = WindowCreateSurfaceCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowCreateSurfaceCallback cb
        cb'' <- mk_WindowCreateSurfaceCallback cb'
        connectSignalFunPtr obj "create-surface" cb'' connectMode detail

#endif

-- signal Window::from-embedder
-- | The [fromEmbedder](#g:signal:fromEmbedder) signal is emitted to translate coordinates
-- in the embedder of an offscreen window to the offscreen window.
-- 
-- See also [toEmbedder]("GI.Gdk.Objects.Window#g:signal:toEmbedder").
-- 
-- /Since: 2.18/
type WindowFromEmbedderCallback =
    Double
    -- ^ /@embedderX@/: x coordinate in the embedder window
    -> Double
    -- ^ /@embedderY@/: y coordinate in the embedder window
    -> IO ((Double, Double))

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowFromEmbedderCallback`@.
noWindowFromEmbedderCallback :: Maybe WindowFromEmbedderCallback
noWindowFromEmbedderCallback :: Maybe WindowFromEmbedderCallback
noWindowFromEmbedderCallback = Maybe WindowFromEmbedderCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WindowFromEmbedderCallback =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr CDouble ->
    Ptr CDouble ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowFromEmbedder :: MonadIO m => WindowFromEmbedderCallback -> m (GClosure C_WindowFromEmbedderCallback)
genClosure_WindowFromEmbedder :: WindowFromEmbedderCallback
-> m (GClosure C_WindowFromEmbedderCallback)
genClosure_WindowFromEmbedder WindowFromEmbedderCallback
cb = IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowFromEmbedderCallback)
 -> m (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
cb
    C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowFromEmbedderCallback C_WindowFromEmbedderCallback
cb' IO (FunPtr C_WindowFromEmbedderCallback)
-> (FunPtr C_WindowFromEmbedderCallback
    -> IO (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowFromEmbedderCallback
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowFromEmbedderCallback` into a `C_WindowFromEmbedderCallback`.
wrap_WindowFromEmbedderCallback ::
    WindowFromEmbedderCallback ->
    C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback :: WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
_cb Ptr ()
_ CDouble
embedderX CDouble
embedderY Ptr CDouble
offscreenX Ptr CDouble
offscreenY Ptr ()
_ = do
    let embedderX' :: Double
embedderX' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
embedderX
    let embedderY' :: Double
embedderY' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
embedderY
    (Double
outoffscreenX, Double
outoffscreenY) <- WindowFromEmbedderCallback
_cb  Double
embedderX' Double
embedderY'
    let outoffscreenX' :: CDouble
outoffscreenX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outoffscreenX
    Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
offscreenX CDouble
outoffscreenX'
    let outoffscreenY' :: CDouble
outoffscreenY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outoffscreenY
    Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
offscreenY CDouble
outoffscreenY'


-- | Connect a signal handler for the [fromEmbedder](#signal:fromEmbedder) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' window #fromEmbedder callback
-- @
-- 
-- 
onWindowFromEmbedder :: (IsWindow a, MonadIO m) => a -> WindowFromEmbedderCallback -> m SignalHandlerId
onWindowFromEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
onWindowFromEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
cb
    FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowFromEmbedderCallback C_WindowFromEmbedderCallback
cb'
    a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"from-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [fromEmbedder](#signal:fromEmbedder) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' window #fromEmbedder callback
-- @
-- 
-- 
afterWindowFromEmbedder :: (IsWindow a, MonadIO m) => a -> WindowFromEmbedderCallback -> m SignalHandlerId
afterWindowFromEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
afterWindowFromEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
cb
    FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowFromEmbedderCallback C_WindowFromEmbedderCallback
cb'
    a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"from-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowFromEmbedderSignalInfo
instance SignalInfo WindowFromEmbedderSignalInfo where
    type HaskellCallbackType WindowFromEmbedderSignalInfo = WindowFromEmbedderCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowFromEmbedderCallback cb
        cb'' <- mk_WindowFromEmbedderCallback cb'
        connectSignalFunPtr obj "from-embedder" cb'' connectMode detail

#endif

-- signal Window::moved-to-rect
-- | Emitted when the position of /@window@/ is finalized after being moved to a
-- destination rectangle.
-- 
-- /@window@/ might be flipped over the destination rectangle in order to keep
-- it on-screen, in which case /@flippedX@/ and /@flippedY@/ will be set to 'P.True'
-- accordingly.
-- 
-- /@flippedRect@/ is the ideal position of /@window@/ after any possible
-- flipping, but before any possible sliding. /@finalRect@/ is /@flippedRect@/,
-- but possibly translated in the case that flipping is still ineffective in
-- keeping /@window@/ on-screen.
-- 
-- /Since: 3.22/
type WindowMovedToRectCallback =
    Ptr ()
    -- ^ /@flippedRect@/: the position of /@window@/ after any possible
    --                flipping or 'P.Nothing' if the backend can\'t obtain it
    -> Ptr ()
    -- ^ /@finalRect@/: the final position of /@window@/ or 'P.Nothing' if the
    --              backend can\'t obtain it
    -> Bool
    -- ^ /@flippedX@/: 'P.True' if the anchors were flipped horizontally
    -> Bool
    -- ^ /@flippedY@/: 'P.True' if the anchors were flipped vertically
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowMovedToRectCallback`@.
noWindowMovedToRectCallback :: Maybe WindowMovedToRectCallback
noWindowMovedToRectCallback :: Maybe WindowMovedToRectCallback
noWindowMovedToRectCallback = Maybe WindowMovedToRectCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WindowMovedToRectCallback =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->
    CInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowMovedToRect :: MonadIO m => WindowMovedToRectCallback -> m (GClosure C_WindowMovedToRectCallback)
genClosure_WindowMovedToRect :: WindowMovedToRectCallback
-> m (GClosure C_WindowMovedToRectCallback)
genClosure_WindowMovedToRect WindowMovedToRectCallback
cb = IO (GClosure C_WindowMovedToRectCallback)
-> m (GClosure C_WindowMovedToRectCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowMovedToRectCallback)
 -> m (GClosure C_WindowMovedToRectCallback))
-> IO (GClosure C_WindowMovedToRectCallback)
-> m (GClosure C_WindowMovedToRectCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowMovedToRectCallback
cb' = WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
cb
    C_WindowMovedToRectCallback
-> IO (FunPtr C_WindowMovedToRectCallback)
mk_WindowMovedToRectCallback C_WindowMovedToRectCallback
cb' IO (FunPtr C_WindowMovedToRectCallback)
-> (FunPtr C_WindowMovedToRectCallback
    -> IO (GClosure C_WindowMovedToRectCallback))
-> IO (GClosure C_WindowMovedToRectCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowMovedToRectCallback
-> IO (GClosure C_WindowMovedToRectCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowMovedToRectCallback` into a `C_WindowMovedToRectCallback`.
wrap_WindowMovedToRectCallback ::
    WindowMovedToRectCallback ->
    C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback :: WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
_cb Ptr ()
_ Ptr ()
flippedRect Ptr ()
finalRect CInt
flippedX CInt
flippedY Ptr ()
_ = do
    let flippedX' :: Bool
flippedX' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
flippedX
    let flippedY' :: Bool
flippedY' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
flippedY
    WindowMovedToRectCallback
_cb  Ptr ()
flippedRect Ptr ()
finalRect Bool
flippedX' Bool
flippedY'


-- | Connect a signal handler for the [movedToRect](#signal:movedToRect) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' window #movedToRect callback
-- @
-- 
-- 
onWindowMovedToRect :: (IsWindow a, MonadIO m) => a -> WindowMovedToRectCallback -> m SignalHandlerId
onWindowMovedToRect :: a -> WindowMovedToRectCallback -> m SignalHandlerId
onWindowMovedToRect a
obj WindowMovedToRectCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowMovedToRectCallback
cb' = WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
cb
    FunPtr C_WindowMovedToRectCallback
cb'' <- C_WindowMovedToRectCallback
-> IO (FunPtr C_WindowMovedToRectCallback)
mk_WindowMovedToRectCallback C_WindowMovedToRectCallback
cb'
    a
-> Text
-> FunPtr C_WindowMovedToRectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"moved-to-rect" FunPtr C_WindowMovedToRectCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [movedToRect](#signal:movedToRect) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' window #movedToRect callback
-- @
-- 
-- 
afterWindowMovedToRect :: (IsWindow a, MonadIO m) => a -> WindowMovedToRectCallback -> m SignalHandlerId
afterWindowMovedToRect :: a -> WindowMovedToRectCallback -> m SignalHandlerId
afterWindowMovedToRect a
obj WindowMovedToRectCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowMovedToRectCallback
cb' = WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
cb
    FunPtr C_WindowMovedToRectCallback
cb'' <- C_WindowMovedToRectCallback
-> IO (FunPtr C_WindowMovedToRectCallback)
mk_WindowMovedToRectCallback C_WindowMovedToRectCallback
cb'
    a
-> Text
-> FunPtr C_WindowMovedToRectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"moved-to-rect" FunPtr C_WindowMovedToRectCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowMovedToRectSignalInfo
instance SignalInfo WindowMovedToRectSignalInfo where
    type HaskellCallbackType WindowMovedToRectSignalInfo = WindowMovedToRectCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowMovedToRectCallback cb
        cb'' <- mk_WindowMovedToRectCallback cb'
        connectSignalFunPtr obj "moved-to-rect" cb'' connectMode detail

#endif

-- signal Window::pick-embedded-child
-- | The [pickEmbeddedChild](#g:signal:pickEmbeddedChild) signal is emitted to find an embedded
-- child at the given position.
-- 
-- /Since: 2.18/
type WindowPickEmbeddedChildCallback =
    Double
    -- ^ /@x@/: x coordinate in the window
    -> Double
    -- ^ /@y@/: y coordinate in the window
    -> IO (Maybe Window)
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Window.Window' of the
    --     embedded child at /@x@/, /@y@/, or 'P.Nothing'

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowPickEmbeddedChildCallback`@.
noWindowPickEmbeddedChildCallback :: Maybe WindowPickEmbeddedChildCallback
noWindowPickEmbeddedChildCallback :: Maybe WindowPickEmbeddedChildCallback
noWindowPickEmbeddedChildCallback = Maybe WindowPickEmbeddedChildCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WindowPickEmbeddedChildCallback =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO (Ptr Window)

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowPickEmbeddedChild :: MonadIO m => WindowPickEmbeddedChildCallback -> m (GClosure C_WindowPickEmbeddedChildCallback)
genClosure_WindowPickEmbeddedChild :: WindowPickEmbeddedChildCallback
-> m (GClosure C_WindowPickEmbeddedChildCallback)
genClosure_WindowPickEmbeddedChild WindowPickEmbeddedChildCallback
cb = IO (GClosure C_WindowPickEmbeddedChildCallback)
-> m (GClosure C_WindowPickEmbeddedChildCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowPickEmbeddedChildCallback)
 -> m (GClosure C_WindowPickEmbeddedChildCallback))
-> IO (GClosure C_WindowPickEmbeddedChildCallback)
-> m (GClosure C_WindowPickEmbeddedChildCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowPickEmbeddedChildCallback
cb' = WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
cb
    C_WindowPickEmbeddedChildCallback
-> IO (FunPtr C_WindowPickEmbeddedChildCallback)
mk_WindowPickEmbeddedChildCallback C_WindowPickEmbeddedChildCallback
cb' IO (FunPtr C_WindowPickEmbeddedChildCallback)
-> (FunPtr C_WindowPickEmbeddedChildCallback
    -> IO (GClosure C_WindowPickEmbeddedChildCallback))
-> IO (GClosure C_WindowPickEmbeddedChildCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowPickEmbeddedChildCallback
-> IO (GClosure C_WindowPickEmbeddedChildCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowPickEmbeddedChildCallback` into a `C_WindowPickEmbeddedChildCallback`.
wrap_WindowPickEmbeddedChildCallback ::
    WindowPickEmbeddedChildCallback ->
    C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback :: WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
_cb Ptr ()
_ CDouble
x CDouble
y Ptr ()
_ = do
    let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
    let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
    Maybe Window
result <- WindowPickEmbeddedChildCallback
_cb  Double
x' Double
y'
    Ptr Window
-> Maybe Window -> (Window -> IO (Ptr Window)) -> IO (Ptr Window)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr Window
forall a. Ptr a
nullPtr Maybe Window
result ((Window -> IO (Ptr Window)) -> IO (Ptr Window))
-> (Window -> IO (Ptr Window)) -> IO (Ptr Window)
forall a b. (a -> b) -> a -> b
$ \Window
result' -> do
        Ptr Window
result'' <- Window -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr Window
result'
        Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
result''


-- | Connect a signal handler for the [pickEmbeddedChild](#signal:pickEmbeddedChild) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' window #pickEmbeddedChild callback
-- @
-- 
-- 
onWindowPickEmbeddedChild :: (IsWindow a, MonadIO m) => a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
onWindowPickEmbeddedChild :: a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
onWindowPickEmbeddedChild a
obj WindowPickEmbeddedChildCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowPickEmbeddedChildCallback
cb' = WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
cb
    FunPtr C_WindowPickEmbeddedChildCallback
cb'' <- C_WindowPickEmbeddedChildCallback
-> IO (FunPtr C_WindowPickEmbeddedChildCallback)
mk_WindowPickEmbeddedChildCallback C_WindowPickEmbeddedChildCallback
cb'
    a
-> Text
-> FunPtr C_WindowPickEmbeddedChildCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pick-embedded-child" FunPtr C_WindowPickEmbeddedChildCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [pickEmbeddedChild](#signal:pickEmbeddedChild) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' window #pickEmbeddedChild callback
-- @
-- 
-- 
afterWindowPickEmbeddedChild :: (IsWindow a, MonadIO m) => a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
afterWindowPickEmbeddedChild :: a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
afterWindowPickEmbeddedChild a
obj WindowPickEmbeddedChildCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowPickEmbeddedChildCallback
cb' = WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
cb
    FunPtr C_WindowPickEmbeddedChildCallback
cb'' <- C_WindowPickEmbeddedChildCallback
-> IO (FunPtr C_WindowPickEmbeddedChildCallback)
mk_WindowPickEmbeddedChildCallback C_WindowPickEmbeddedChildCallback
cb'
    a
-> Text
-> FunPtr C_WindowPickEmbeddedChildCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pick-embedded-child" FunPtr C_WindowPickEmbeddedChildCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowPickEmbeddedChildSignalInfo
instance SignalInfo WindowPickEmbeddedChildSignalInfo where
    type HaskellCallbackType WindowPickEmbeddedChildSignalInfo = WindowPickEmbeddedChildCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowPickEmbeddedChildCallback cb
        cb'' <- mk_WindowPickEmbeddedChildCallback cb'
        connectSignalFunPtr obj "pick-embedded-child" cb'' connectMode detail

#endif

-- signal Window::to-embedder
-- | The [toEmbedder](#g:signal:toEmbedder) signal is emitted to translate coordinates
-- in an offscreen window to its embedder.
-- 
-- See also [fromEmbedder]("GI.Gdk.Objects.Window#g:signal:fromEmbedder").
-- 
-- /Since: 2.18/
type WindowToEmbedderCallback =
    Double
    -- ^ /@offscreenX@/: x coordinate in the offscreen window
    -> Double
    -- ^ /@offscreenY@/: y coordinate in the offscreen window
    -> IO ((Double, Double))

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowToEmbedderCallback`@.
noWindowToEmbedderCallback :: Maybe WindowToEmbedderCallback
noWindowToEmbedderCallback :: Maybe WindowFromEmbedderCallback
noWindowToEmbedderCallback = Maybe WindowFromEmbedderCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WindowToEmbedderCallback =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr CDouble ->
    Ptr CDouble ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowToEmbedder :: MonadIO m => WindowToEmbedderCallback -> m (GClosure C_WindowToEmbedderCallback)
genClosure_WindowToEmbedder :: WindowFromEmbedderCallback
-> m (GClosure C_WindowFromEmbedderCallback)
genClosure_WindowToEmbedder WindowFromEmbedderCallback
cb = IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowFromEmbedderCallback)
 -> m (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
cb
    C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowToEmbedderCallback C_WindowFromEmbedderCallback
cb' IO (FunPtr C_WindowFromEmbedderCallback)
-> (FunPtr C_WindowFromEmbedderCallback
    -> IO (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowFromEmbedderCallback
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowToEmbedderCallback` into a `C_WindowToEmbedderCallback`.
wrap_WindowToEmbedderCallback ::
    WindowToEmbedderCallback ->
    C_WindowToEmbedderCallback
wrap_WindowToEmbedderCallback :: WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
_cb Ptr ()
_ CDouble
offscreenX CDouble
offscreenY Ptr CDouble
embedderX Ptr CDouble
embedderY Ptr ()
_ = do
    let offscreenX' :: Double
offscreenX' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
offscreenX
    let offscreenY' :: Double
offscreenY' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
offscreenY
    (Double
outembedderX, Double
outembedderY) <- WindowFromEmbedderCallback
_cb  Double
offscreenX' Double
offscreenY'
    let outembedderX' :: CDouble
outembedderX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outembedderX
    Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
embedderX CDouble
outembedderX'
    let outembedderY' :: CDouble
outembedderY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outembedderY
    Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
embedderY CDouble
outembedderY'


-- | Connect a signal handler for the [toEmbedder](#signal:toEmbedder) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' window #toEmbedder callback
-- @
-- 
-- 
onWindowToEmbedder :: (IsWindow a, MonadIO m) => a -> WindowToEmbedderCallback -> m SignalHandlerId
onWindowToEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
onWindowToEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
cb
    FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowToEmbedderCallback C_WindowFromEmbedderCallback
cb'
    a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"to-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [toEmbedder](#signal:toEmbedder) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' window #toEmbedder callback
-- @
-- 
-- 
afterWindowToEmbedder :: (IsWindow a, MonadIO m) => a -> WindowToEmbedderCallback -> m SignalHandlerId
afterWindowToEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
afterWindowToEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
cb
    FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowToEmbedderCallback C_WindowFromEmbedderCallback
cb'
    a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"to-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowToEmbedderSignalInfo
instance SignalInfo WindowToEmbedderSignalInfo where
    type HaskellCallbackType WindowToEmbedderSignalInfo = WindowToEmbedderCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowToEmbedderCallback cb
        cb'' <- mk_WindowToEmbedderCallback cb'
        connectSignalFunPtr obj "to-embedder" cb'' connectMode detail

#endif

-- VVV Prop "cursor"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Cursor"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@cursor@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' window #cursor
-- @
getWindowCursor :: (MonadIO m, IsWindow o) => o -> m (Maybe Gdk.Cursor.Cursor)
getWindowCursor :: o -> m (Maybe Cursor)
getWindowCursor o
obj = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Cursor -> Cursor) -> IO (Maybe Cursor)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"cursor" ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor

-- | Set the value of the “@cursor@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' window [ #cursor 'Data.GI.Base.Attributes.:=' value ]
-- @
setWindowCursor :: (MonadIO m, IsWindow o, Gdk.Cursor.IsCursor a) => o -> a -> m ()
setWindowCursor :: o -> a -> m ()
setWindowCursor o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"cursor" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@cursor@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWindowCursor :: (IsWindow o, MIO.MonadIO m, Gdk.Cursor.IsCursor a) => a -> m (GValueConstruct o)
constructWindowCursor :: a -> m (GValueConstruct o)
constructWindowCursor a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"cursor" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@cursor@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #cursor
-- @
clearWindowCursor :: (MonadIO m, IsWindow o) => o -> m ()
clearWindowCursor :: o -> m ()
clearWindowCursor o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Cursor -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"cursor" (Maybe Cursor
forall a. Maybe a
Nothing :: Maybe Gdk.Cursor.Cursor)

#if defined(ENABLE_OVERLOADING)
data WindowCursorPropertyInfo
instance AttrInfo WindowCursorPropertyInfo where
    type AttrAllowedOps WindowCursorPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WindowCursorPropertyInfo = IsWindow
    type AttrSetTypeConstraint WindowCursorPropertyInfo = Gdk.Cursor.IsCursor
    type AttrTransferTypeConstraint WindowCursorPropertyInfo = Gdk.Cursor.IsCursor
    type AttrTransferType WindowCursorPropertyInfo = Gdk.Cursor.Cursor
    type AttrGetType WindowCursorPropertyInfo = (Maybe Gdk.Cursor.Cursor)
    type AttrLabel WindowCursorPropertyInfo = "cursor"
    type AttrOrigin WindowCursorPropertyInfo = Window
    attrGet = getWindowCursor
    attrSet = setWindowCursor
    attrTransfer _ v = do
        unsafeCastTo Gdk.Cursor.Cursor v
    attrConstruct = constructWindowCursor
    attrClear = clearWindowCursor
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Window
type instance O.AttributeList Window = WindowAttributeList
type WindowAttributeList = ('[ '("cursor", WindowCursorPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
windowCursor :: AttrLabelProxy "cursor"
windowCursor = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Window = WindowSignalList
type WindowSignalList = ('[ '("createSurface", WindowCreateSurfaceSignalInfo), '("fromEmbedder", WindowFromEmbedderSignalInfo), '("movedToRect", WindowMovedToRectSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("pickEmbeddedChild", WindowPickEmbeddedChildSignalInfo), '("toEmbedder", WindowToEmbedderSignalInfo)] :: [(Symbol, *)])

#endif

-- method Window::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GdkWindow, or %NULL to create the window as a child of\n  the default root window for the default display."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attributes"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowAttr" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "attributes of the new window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "attributes_mask"
--           , argType =
--               TInterface
--                 Name { namespace = "Gdk" , name = "WindowAttributesType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "mask indicating which\n  fields in @attributes are valid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_new" gdk_window_new :: 
    Ptr Window ->                           -- parent : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.WindowAttr.WindowAttr ->        -- attributes : TInterface (Name {namespace = "Gdk", name = "WindowAttr"})
    CUInt ->                                -- attributes_mask : TInterface (Name {namespace = "Gdk", name = "WindowAttributesType"})
    IO (Ptr Window)

-- | Creates a new t'GI.Gdk.Objects.Window.Window' using the attributes from
-- /@attributes@/. See t'GI.Gdk.Structs.WindowAttr.WindowAttr' and t'GI.Gdk.Flags.WindowAttributesType' for
-- more details.  Note: to use this on displays other than the default
-- display, /@parent@/ must be specified.
windowNew ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    Maybe (a)
    -- ^ /@parent@/: a t'GI.Gdk.Objects.Window.Window', or 'P.Nothing' to create the window as a child of
    --   the default root window for the default display.
    -> Gdk.WindowAttr.WindowAttr
    -- ^ /@attributes@/: attributes of the new window
    -> [Gdk.Flags.WindowAttributesType]
    -- ^ /@attributesMask@/: mask indicating which
    --   fields in /@attributes@/ are valid
    -> m Window
    -- ^ __Returns:__ the new t'GI.Gdk.Objects.Window.Window'
windowNew :: Maybe a -> WindowAttr -> [WindowAttributesType] -> m Window
windowNew Maybe a
parent WindowAttr
attributes [WindowAttributesType]
attributesMask = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
maybeParent <- case Maybe a
parent of
        Maybe a
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
        Just a
jParent -> do
            Ptr Window
jParent' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jParent
            Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
    Ptr WindowAttr
attributes' <- WindowAttr -> IO (Ptr WindowAttr)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr WindowAttr
attributes
    let attributesMask' :: CUInt
attributesMask' = [WindowAttributesType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WindowAttributesType]
attributesMask
    Ptr Window
result <- Ptr Window -> Ptr WindowAttr -> CUInt -> IO (Ptr Window)
gdk_window_new Ptr Window
maybeParent Ptr WindowAttr
attributes' CUInt
attributesMask'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowNew" Ptr Window
result
    Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Window -> Window
Window) Ptr Window
result
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
parent a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    WindowAttr -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr WindowAttr
attributes
    Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'

#if defined(ENABLE_OVERLOADING)
#endif

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

foreign import ccall "gdk_window_beep" gdk_window_beep :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Emits a short beep associated to /@window@/ in the appropriate
-- display, if supported. Otherwise, emits a short beep on
-- the display just as 'GI.Gdk.Objects.Display.displayBeep'.
-- 
-- /Since: 2.12/
windowBeep ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowBeep :: a -> m ()
windowBeep a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_beep Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeepMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeepMethodInfo a signature where
    overloadedMethod = windowBeep

#endif

-- method Window::begin_draw_frame
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Region" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a Cairo region" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "DrawingContext" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_draw_frame" gdk_window_begin_draw_frame :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    IO (Ptr Gdk.DrawingContext.DrawingContext)

-- | Indicates that you are beginning the process of redrawing /@region@/
-- on /@window@/, and provides you with a t'GI.Gdk.Objects.DrawingContext.DrawingContext'.
-- 
-- If /@window@/ is a top level t'GI.Gdk.Objects.Window.Window', backed by a native window
-- implementation, a backing store (offscreen buffer) large enough to
-- contain /@region@/ will be created. The backing store will be initialized
-- with the background color or background surface for /@window@/. Then, all
-- drawing operations performed on /@window@/ will be diverted to the
-- backing store. When you call @/gdk_window_end_frame()/@, the contents of
-- the backing store will be copied to /@window@/, making it visible
-- on screen. Only the part of /@window@/ contained in /@region@/ will be
-- modified; that is, drawing operations are clipped to /@region@/.
-- 
-- The net result of all this is to remove flicker, because the user
-- sees the finished product appear all at once when you call
-- 'GI.Gdk.Objects.Window.windowEndDrawFrame'. If you draw to /@window@/ directly without
-- calling 'GI.Gdk.Objects.Window.windowBeginDrawFrame', the user may see flicker
-- as individual drawing operations are performed in sequence.
-- 
-- When using GTK+, the widget system automatically places calls to
-- 'GI.Gdk.Objects.Window.windowBeginDrawFrame' and 'GI.Gdk.Objects.Window.windowEndDrawFrame' around
-- emissions of the @GtkWidget::draw@ signal. That is, if you’re
-- drawing the contents of the widget yourself, you can assume that the
-- widget has a cleared background, is already set as the clip region,
-- and already has a backing store. Therefore in most cases, application
-- code in GTK does not need to call 'GI.Gdk.Objects.Window.windowBeginDrawFrame'
-- explicitly.
-- 
-- /Since: 3.22/
windowBeginDrawFrame ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Region.Region
    -- ^ /@region@/: a Cairo region
    -> m Gdk.DrawingContext.DrawingContext
    -- ^ __Returns:__ a t'GI.Gdk.Objects.DrawingContext.DrawingContext' context that should be
    --   used to draw the contents of the window; the returned context is owned
    --   by GDK.
windowBeginDrawFrame :: a -> Region -> m DrawingContext
windowBeginDrawFrame a
window Region
region = IO DrawingContext -> m DrawingContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DrawingContext -> m DrawingContext)
-> IO DrawingContext -> m DrawingContext
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
    Ptr DrawingContext
result <- Ptr Window -> Ptr Region -> IO (Ptr DrawingContext)
gdk_window_begin_draw_frame Ptr Window
window' Ptr Region
region'
    Text -> Ptr DrawingContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowBeginDrawFrame" Ptr DrawingContext
result
    DrawingContext
result' <- ((ManagedPtr DrawingContext -> DrawingContext)
-> Ptr DrawingContext -> IO DrawingContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DrawingContext -> DrawingContext
Gdk.DrawingContext.DrawingContext) Ptr DrawingContext
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
    DrawingContext -> IO DrawingContext
forall (m :: * -> *) a. Monad m => a -> m a
return DrawingContext
result'

#if defined(ENABLE_OVERLOADING)
data WindowBeginDrawFrameMethodInfo
instance (signature ~ (Cairo.Region.Region -> m Gdk.DrawingContext.DrawingContext), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginDrawFrameMethodInfo a signature where
    overloadedMethod = windowBeginDrawFrame

#endif

-- method Window::begin_move_drag
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a toplevel #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "button"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the button being used to drag, or 0 for a keyboard-initiated drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window X coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window Y coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timestamp"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "timestamp of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_move_drag" gdk_window_begin_move_drag :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- button : TBasicType TInt
    Int32 ->                                -- root_x : TBasicType TInt
    Int32 ->                                -- root_y : TBasicType TInt
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()

-- | Begins a window move operation (for a toplevel window).
-- 
-- This function assumes that the drag is controlled by the
-- client pointer device, use 'GI.Gdk.Objects.Window.windowBeginMoveDragForDevice'
-- to begin a drag with a different device.
windowBeginMoveDrag ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@button@/: the button being used to drag, or 0 for a keyboard-initiated drag
    -> Int32
    -- ^ /@rootX@/: root window X coordinate of mouse click that began the drag
    -> Int32
    -- ^ /@rootY@/: root window Y coordinate of mouse click that began the drag
    -> Word32
    -- ^ /@timestamp@/: timestamp of mouse click that began the drag
    -> m ()
windowBeginMoveDrag :: a -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginMoveDrag a
window Int32
button Int32
rootX Int32
rootY Word32
timestamp = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_window_begin_move_drag Ptr Window
window' Int32
button Int32
rootX Int32
rootY Word32
timestamp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeginMoveDragMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginMoveDragMethodInfo a signature where
    overloadedMethod = windowBeginMoveDrag

#endif

-- method Window::begin_move_drag_for_device
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a toplevel #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the device used for the operation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "button"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the button being used to drag, or 0 for a keyboard-initiated drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window X coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window Y coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timestamp"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "timestamp of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_move_drag_for_device" gdk_window_begin_move_drag_for_device :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    Int32 ->                                -- button : TBasicType TInt
    Int32 ->                                -- root_x : TBasicType TInt
    Int32 ->                                -- root_y : TBasicType TInt
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()

-- | Begins a window move operation (for a toplevel window).
-- You might use this function to implement a “window move grip,” for
-- example. The function works best with window managers that support the
-- <http://www.freedesktop.org/Standards/wm-spec Extended Window Manager Hints>
-- but has a fallback implementation for other window managers.
-- 
-- /Since: 3.4/
windowBeginMoveDragForDevice ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> b
    -- ^ /@device@/: the device used for the operation
    -> Int32
    -- ^ /@button@/: the button being used to drag, or 0 for a keyboard-initiated drag
    -> Int32
    -- ^ /@rootX@/: root window X coordinate of mouse click that began the drag
    -> Int32
    -- ^ /@rootY@/: root window Y coordinate of mouse click that began the drag
    -> Word32
    -- ^ /@timestamp@/: timestamp of mouse click that began the drag
    -> m ()
windowBeginMoveDragForDevice :: a -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginMoveDragForDevice a
window b
device Int32
button Int32
rootX Int32
rootY Word32
timestamp = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    Ptr Window
-> Ptr Device -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_window_begin_move_drag_for_device Ptr Window
window' Ptr Device
device' Int32
button Int32
rootX Int32
rootY Word32
timestamp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeginMoveDragForDeviceMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowBeginMoveDragForDeviceMethodInfo a signature where
    overloadedMethod = windowBeginMoveDragForDevice

#endif

-- method Window::begin_paint_rect
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rectangle"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "rectangle you intend to draw to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_paint_rect" gdk_window_begin_paint_rect :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Rectangle.Rectangle ->          -- rectangle : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

{-# DEPRECATED windowBeginPaintRect ["(Since version 3.22)","Use 'GI.Gdk.Objects.Window.windowBeginDrawFrame' instead"] #-}
-- | A convenience wrapper around 'GI.Gdk.Objects.Window.windowBeginPaintRegion' which
-- creates a rectangular region for you. See
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion' for details.
windowBeginPaintRect ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Rectangle.Rectangle
    -- ^ /@rectangle@/: rectangle you intend to draw to
    -> m ()
windowBeginPaintRect :: a -> Rectangle -> m ()
windowBeginPaintRect a
window Rectangle
rectangle = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Rectangle
rectangle' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rectangle
    Ptr Window -> Ptr Rectangle -> IO ()
gdk_window_begin_paint_rect Ptr Window
window' Ptr Rectangle
rectangle'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rectangle
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeginPaintRectMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginPaintRectMethodInfo a signature where
    overloadedMethod = windowBeginPaintRect

#endif

-- method Window::begin_paint_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Region" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "region you intend to draw to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_paint_region" gdk_window_begin_paint_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    IO ()

{-# DEPRECATED windowBeginPaintRegion ["(Since version 3.22)","Use 'GI.Gdk.Objects.Window.windowBeginDrawFrame' instead"] #-}
-- | Indicates that you are beginning the process of redrawing /@region@/.
-- A backing store (offscreen buffer) large enough to contain /@region@/
-- will be created. The backing store will be initialized with the
-- background color or background surface for /@window@/. Then, all
-- drawing operations performed on /@window@/ will be diverted to the
-- backing store.  When you call 'GI.Gdk.Objects.Window.windowEndPaint', the backing
-- store will be copied to /@window@/, making it visible onscreen. Only
-- the part of /@window@/ contained in /@region@/ will be modified; that is,
-- drawing operations are clipped to /@region@/.
-- 
-- The net result of all this is to remove flicker, because the user
-- sees the finished product appear all at once when you call
-- 'GI.Gdk.Objects.Window.windowEndPaint'. If you draw to /@window@/ directly without
-- calling 'GI.Gdk.Objects.Window.windowBeginPaintRegion', the user may see flicker
-- as individual drawing operations are performed in sequence.  The
-- clipping and background-initializing features of
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion' are conveniences for the
-- programmer, so you can avoid doing that work yourself.
-- 
-- When using GTK+, the widget system automatically places calls to
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion' and 'GI.Gdk.Objects.Window.windowEndPaint' around
-- emissions of the expose_event signal. That is, if you’re writing an
-- expose event handler, you can assume that the exposed area in
-- t'GI.Gdk.Structs.EventExpose.EventExpose' has already been cleared to the window background,
-- is already set as the clip region, and already has a backing store.
-- Therefore in most cases, application code need not call
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion'. (You can disable the automatic
-- calls around expose events on a widget-by-widget basis by calling
-- @/gtk_widget_set_double_buffered()/@.)
-- 
-- If you call this function multiple times before calling the
-- matching 'GI.Gdk.Objects.Window.windowEndPaint', the backing stores are pushed onto
-- a stack. 'GI.Gdk.Objects.Window.windowEndPaint' copies the topmost backing store
-- onscreen, subtracts the topmost region from all other regions in
-- the stack, and pops the stack. All drawing operations affect only
-- the topmost backing store in the stack. One matching call to
-- 'GI.Gdk.Objects.Window.windowEndPaint' is required for each call to
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion'.
windowBeginPaintRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Region.Region
    -- ^ /@region@/: region you intend to draw to
    -> m ()
windowBeginPaintRegion :: a -> Region -> m ()
windowBeginPaintRegion a
window Region
region = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
    Ptr Window -> Ptr Region -> IO ()
gdk_window_begin_paint_region Ptr Window
window' Ptr Region
region'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeginPaintRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginPaintRegionMethodInfo a signature where
    overloadedMethod = windowBeginPaintRegion

#endif

-- method Window::begin_resize_drag
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a toplevel #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowEdge" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the edge or corner from which the drag is started"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "button"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the button being used to drag, or 0 for a keyboard-initiated drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window X coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window Y coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timestamp"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "timestamp of mouse click that began the drag (use gdk_event_get_time())"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_resize_drag" gdk_window_begin_resize_drag :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "Gdk", name = "WindowEdge"})
    Int32 ->                                -- button : TBasicType TInt
    Int32 ->                                -- root_x : TBasicType TInt
    Int32 ->                                -- root_y : TBasicType TInt
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()

-- | Begins a window resize operation (for a toplevel window).
-- 
-- This function assumes that the drag is controlled by the
-- client pointer device, use 'GI.Gdk.Objects.Window.windowBeginResizeDragForDevice'
-- to begin a drag with a different device.
windowBeginResizeDrag ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Enums.WindowEdge
    -- ^ /@edge@/: the edge or corner from which the drag is started
    -> Int32
    -- ^ /@button@/: the button being used to drag, or 0 for a keyboard-initiated drag
    -> Int32
    -- ^ /@rootX@/: root window X coordinate of mouse click that began the drag
    -> Int32
    -- ^ /@rootY@/: root window Y coordinate of mouse click that began the drag
    -> Word32
    -- ^ /@timestamp@/: timestamp of mouse click that began the drag (use 'GI.Gdk.Unions.Event.eventGetTime')
    -> m ()
windowBeginResizeDrag :: a -> WindowEdge -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginResizeDrag a
window WindowEdge
edge Int32
button Int32
rootX Int32
rootY Word32
timestamp = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (WindowEdge -> Int) -> WindowEdge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowEdge -> Int
forall a. Enum a => a -> Int
fromEnum) WindowEdge
edge
    Ptr Window -> CUInt -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_window_begin_resize_drag Ptr Window
window' CUInt
edge' Int32
button Int32
rootX Int32
rootY Word32
timestamp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeginResizeDragMethodInfo
instance (signature ~ (Gdk.Enums.WindowEdge -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginResizeDragMethodInfo a signature where
    overloadedMethod = windowBeginResizeDrag

#endif

-- method Window::begin_resize_drag_for_device
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a toplevel #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowEdge" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the edge or corner from which the drag is started"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the device used for the operation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "button"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the button being used to drag, or 0 for a keyboard-initiated drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window X coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "root window Y coordinate of mouse click that began the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timestamp"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "timestamp of mouse click that began the drag (use gdk_event_get_time())"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_begin_resize_drag_for_device" gdk_window_begin_resize_drag_for_device :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "Gdk", name = "WindowEdge"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    Int32 ->                                -- button : TBasicType TInt
    Int32 ->                                -- root_x : TBasicType TInt
    Int32 ->                                -- root_y : TBasicType TInt
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()

-- | Begins a window resize operation (for a toplevel window).
-- You might use this function to implement a “window resize grip,” for
-- example; in fact @/GtkStatusbar/@ uses it. The function works best
-- with window managers that support the
-- <http://www.freedesktop.org/Standards/wm-spec Extended Window Manager Hints>
-- but has a fallback implementation for other window managers.
-- 
-- /Since: 3.4/
windowBeginResizeDragForDevice ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Enums.WindowEdge
    -- ^ /@edge@/: the edge or corner from which the drag is started
    -> b
    -- ^ /@device@/: the device used for the operation
    -> Int32
    -- ^ /@button@/: the button being used to drag, or 0 for a keyboard-initiated drag
    -> Int32
    -- ^ /@rootX@/: root window X coordinate of mouse click that began the drag
    -> Int32
    -- ^ /@rootY@/: root window Y coordinate of mouse click that began the drag
    -> Word32
    -- ^ /@timestamp@/: timestamp of mouse click that began the drag (use 'GI.Gdk.Unions.Event.eventGetTime')
    -> m ()
windowBeginResizeDragForDevice :: a -> WindowEdge -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginResizeDragForDevice a
window WindowEdge
edge b
device Int32
button Int32
rootX Int32
rootY Word32
timestamp = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (WindowEdge -> Int) -> WindowEdge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowEdge -> Int
forall a. Enum a => a -> Int
fromEnum) WindowEdge
edge
    Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    Ptr Window
-> CUInt
-> Ptr Device
-> Int32
-> Int32
-> Int32
-> Word32
-> IO ()
gdk_window_begin_resize_drag_for_device Ptr Window
window' CUInt
edge' Ptr Device
device' Int32
button Int32
rootX Int32
rootY Word32
timestamp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowBeginResizeDragForDeviceMethodInfo
instance (signature ~ (Gdk.Enums.WindowEdge -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowBeginResizeDragForDeviceMethodInfo a signature where
    overloadedMethod = windowBeginResizeDragForDevice

#endif

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

foreign import ccall "gdk_window_configure_finished" gdk_window_configure_finished :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

{-# DEPRECATED windowConfigureFinished ["(Since version 3.8)","this function is no longer needed"] #-}
-- | Does nothing, present only for compatiblity.
-- 
-- /Since: 2.6/
windowConfigureFinished ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowConfigureFinished :: a -> m ()
windowConfigureFinished a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_configure_finished Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowConfigureFinishedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowConfigureFinishedMethodInfo a signature where
    overloadedMethod = windowConfigureFinished

#endif

-- method Window::coords_from_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child window" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent_x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate in parent\8217s coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent_y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y coordinate in parent\8217s coordinate system"
--                 , 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 X coordinate in child\8217s coordinate system"
--                 , 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 Y coordinate in child\8217s coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_coords_from_parent" gdk_window_coords_from_parent :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CDouble ->                              -- parent_x : TBasicType TDouble
    CDouble ->                              -- parent_y : TBasicType TDouble
    Ptr CDouble ->                          -- x : TBasicType TDouble
    Ptr CDouble ->                          -- y : TBasicType TDouble
    IO ()

-- | Transforms window coordinates from a parent window to a child
-- window, where the parent window is the normal parent as returned by
-- 'GI.Gdk.Objects.Window.windowGetParent' for normal windows, and the window\'s
-- embedder as returned by 'GI.Gdk.Functions.offscreenWindowGetEmbedder' for
-- offscreen windows.
-- 
-- For normal windows, calling this function is equivalent to subtracting
-- the return values of 'GI.Gdk.Objects.Window.windowGetPosition' from the parent coordinates.
-- For offscreen windows however (which can be arbitrarily transformed),
-- this function calls the GdkWindow[fromEmbedder](#g:signal:fromEmbedder): signal to translate
-- the coordinates.
-- 
-- You should always use this function when writing generic code that
-- walks down a window hierarchy.
-- 
-- See also: 'GI.Gdk.Objects.Window.windowCoordsToParent'
-- 
-- /Since: 2.22/
windowCoordsFromParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a child window
    -> Double
    -- ^ /@parentX@/: X coordinate in parent’s coordinate system
    -> Double
    -- ^ /@parentY@/: Y coordinate in parent’s coordinate system
    -> m ((Double, Double))
windowCoordsFromParent :: a -> Double -> Double -> m (Double, Double)
windowCoordsFromParent a
window Double
parentX Double
parentY = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    let parentX' :: CDouble
parentX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
parentX
    let parentY' :: CDouble
parentY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
parentY
    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 Window
-> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO ()
gdk_window_coords_from_parent Ptr Window
window' CDouble
parentX' CDouble
parentY' 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
window
    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 WindowCoordsFromParentMethodInfo
instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m, IsWindow a) => O.MethodInfo WindowCoordsFromParentMethodInfo a signature where
    overloadedMethod = windowCoordsFromParent

#endif

-- method Window::coords_to_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child window" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate in child\8217s coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate in child\8217s coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent_x"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for X coordinate\nin parent\8217s coordinate system, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "parent_y"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for Y coordinate\nin parent\8217s coordinate system, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_coords_to_parent" gdk_window_coords_to_parent :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    Ptr CDouble ->                          -- parent_x : TBasicType TDouble
    Ptr CDouble ->                          -- parent_y : TBasicType TDouble
    IO ()

-- | Transforms window coordinates from a child window to its parent
-- window, where the parent window is the normal parent as returned by
-- 'GI.Gdk.Objects.Window.windowGetParent' for normal windows, and the window\'s
-- embedder as returned by 'GI.Gdk.Functions.offscreenWindowGetEmbedder' for
-- offscreen windows.
-- 
-- For normal windows, calling this function is equivalent to adding
-- the return values of 'GI.Gdk.Objects.Window.windowGetPosition' to the child coordinates.
-- For offscreen windows however (which can be arbitrarily transformed),
-- this function calls the GdkWindow[toEmbedder](#g:signal:toEmbedder): signal to translate
-- the coordinates.
-- 
-- You should always use this function when writing generic code that
-- walks up a window hierarchy.
-- 
-- See also: 'GI.Gdk.Objects.Window.windowCoordsFromParent'
-- 
-- /Since: 2.22/
windowCoordsToParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a child window
    -> Double
    -- ^ /@x@/: X coordinate in child’s coordinate system
    -> Double
    -- ^ /@y@/: Y coordinate in child’s coordinate system
    -> m ((Double, Double))
windowCoordsToParent :: a -> Double -> Double -> m (Double, Double)
windowCoordsToParent a
window Double
x Double
y = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    Ptr CDouble
parentX <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
    Ptr CDouble
parentY <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
    Ptr Window
-> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO ()
gdk_window_coords_to_parent Ptr Window
window' CDouble
x' CDouble
y' Ptr CDouble
parentX Ptr CDouble
parentY
    CDouble
parentX' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
parentX
    let parentX'' :: Double
parentX'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
parentX'
    CDouble
parentY' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
parentY
    let parentY'' :: Double
parentY'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
parentY'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
parentX
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
parentY
    (Double, Double) -> IO (Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
parentX'', Double
parentY'')

#if defined(ENABLE_OVERLOADING)
data WindowCoordsToParentMethodInfo
instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m, IsWindow a) => O.MethodInfo WindowCoordsToParentMethodInfo a signature where
    overloadedMethod = windowCoordsToParent

#endif

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

foreign import ccall "gdk_window_create_gl_context" gdk_window_create_gl_context :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Gdk.GLContext.GLContext)

-- | Creates a new t'GI.Gdk.Objects.GLContext.GLContext' matching the
-- framebuffer format to the visual of the t'GI.Gdk.Objects.Window.Window'. The context
-- is disconnected from any particular window or surface.
-- 
-- If the creation of the t'GI.Gdk.Objects.GLContext.GLContext' failed, /@error@/ will be set.
-- 
-- Before using the returned t'GI.Gdk.Objects.GLContext.GLContext', you will need to
-- call 'GI.Gdk.Objects.GLContext.gLContextMakeCurrent' or 'GI.Gdk.Objects.GLContext.gLContextRealize'.
-- 
-- /Since: 3.16/
windowCreateGlContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.GLContext.GLContext
    -- ^ __Returns:__ the newly created t'GI.Gdk.Objects.GLContext.GLContext', or
    -- 'P.Nothing' on error /(Can throw 'Data.GI.Base.GError.GError')/
windowCreateGlContext :: a -> m GLContext
windowCreateGlContext a
window = IO GLContext -> m GLContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GLContext -> m GLContext) -> IO GLContext -> m GLContext
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    IO GLContext -> IO () -> IO GLContext
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr GLContext
result <- (Ptr (Ptr GError) -> IO (Ptr GLContext)) -> IO (Ptr GLContext)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr GLContext)) -> IO (Ptr GLContext))
-> (Ptr (Ptr GError) -> IO (Ptr GLContext)) -> IO (Ptr GLContext)
forall a b. (a -> b) -> a -> b
$ Ptr Window -> Ptr (Ptr GError) -> IO (Ptr GLContext)
gdk_window_create_gl_context Ptr Window
window'
        Text -> Ptr GLContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowCreateGlContext" Ptr GLContext
result
        GLContext
result' <- ((ManagedPtr GLContext -> GLContext)
-> Ptr GLContext -> IO GLContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr GLContext -> GLContext
Gdk.GLContext.GLContext) Ptr GLContext
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
        GLContext -> IO GLContext
forall (m :: * -> *) a. Monad m => a -> m a
return GLContext
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WindowCreateGlContextMethodInfo
instance (signature ~ (m Gdk.GLContext.GLContext), MonadIO m, IsWindow a) => O.MethodInfo WindowCreateGlContextMethodInfo a signature where
    overloadedMethod = windowCreateGlContext

#endif

-- method Window::create_similar_image_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "window to make new surface similar to, or\n  %NULL if none"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "format"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the format for the new surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the new surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the new surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "scale"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the scale of the new surface, or 0 to use same as @window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Surface" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_create_similar_image_surface" gdk_window_create_similar_image_surface :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- format : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Int32 ->                                -- scale : TBasicType TInt
    IO (Ptr Cairo.Surface.Surface)

-- | Create a new image surface that is efficient to draw on the
-- given /@window@/.
-- 
-- Initially the surface contents are all 0 (transparent if contents
-- have transparency, black otherwise.)
-- 
-- The /@width@/ and /@height@/ of the new surface are not affected by
-- the scaling factor of the /@window@/, or by the /@scale@/ argument; they
-- are the size of the surface in device pixels. If you wish to create
-- an image surface capable of holding the contents of /@window@/ you can
-- use:
-- 
-- 
-- === /C code/
-- >
-- >  int scale = gdk_window_get_scale_factor (window);
-- >  int width = gdk_window_get_width (window) * scale;
-- >  int height = gdk_window_get_height (window) * scale;
-- >
-- >  // format is set elsewhere
-- >  cairo_surface_t *surface =
-- >    gdk_window_create_similar_image_surface (window,
-- >                                             format,
-- >                                             width, height,
-- >                                             scale);
-- 
-- 
-- Note that unlike @/cairo_surface_create_similar_image()/@, the new
-- surface\'s device scale is set to /@scale@/, or to the scale factor of
-- /@window@/ if /@scale@/ is 0.
-- 
-- /Since: 3.10/
windowCreateSimilarImageSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: window to make new surface similar to, or
    --   'P.Nothing' if none
    -> Int32
    -- ^ /@format@/: the format for the new surface
    -> Int32
    -- ^ /@width@/: width of the new surface
    -> Int32
    -- ^ /@height@/: height of the new surface
    -> Int32
    -- ^ /@scale@/: the scale of the new surface, or 0 to use same as /@window@/
    -> m Cairo.Surface.Surface
    -- ^ __Returns:__ a pointer to the newly allocated surface. The caller
    -- owns the surface and should call @/cairo_surface_destroy()/@ when done
    -- with it.
    -- 
    -- This function always returns a valid pointer, but it will return a
    -- pointer to a “nil” surface if /@other@/ is already in an error state
    -- or any other error occurs.
windowCreateSimilarImageSurface :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m Surface
windowCreateSimilarImageSurface a
window Int32
format Int32
width Int32
height Int32
scale = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Surface
result <- Ptr Window -> Int32 -> Int32 -> Int32 -> Int32 -> IO (Ptr Surface)
gdk_window_create_similar_image_surface Ptr Window
window' Int32
format Int32
width Int32
height Int32
scale
    Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowCreateSimilarImageSurface" Ptr Surface
result
    Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Surface -> Surface
Cairo.Surface.Surface) Ptr Surface
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'

#if defined(ENABLE_OVERLOADING)
data WindowCreateSimilarImageSurfaceMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m Cairo.Surface.Surface), MonadIO m, IsWindow a) => O.MethodInfo WindowCreateSimilarImageSurfaceMethodInfo a signature where
    overloadedMethod = windowCreateSimilarImageSurface

#endif

-- method Window::create_similar_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "window to make new surface similar to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "content"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Content" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the content for the new surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width of the new surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height of the new surface"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Surface" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_create_similar_surface" gdk_window_create_similar_surface :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- content : TInterface (Name {namespace = "cairo", name = "Content"})
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO (Ptr Cairo.Surface.Surface)

-- | Create a new surface that is as compatible as possible with the
-- given /@window@/. For example the new surface will have the same
-- fallback resolution and font options as /@window@/. Generally, the new
-- surface will also use the same backend as /@window@/, unless that is
-- not possible for some reason. The type of the returned surface may
-- be examined with @/cairo_surface_get_type()/@.
-- 
-- Initially the surface contents are all 0 (transparent if contents
-- have transparency, black otherwise.)
-- 
-- /Since: 2.22/
windowCreateSimilarSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: window to make new surface similar to
    -> Cairo.Enums.Content
    -- ^ /@content@/: the content for the new surface
    -> Int32
    -- ^ /@width@/: width of the new surface
    -> Int32
    -- ^ /@height@/: height of the new surface
    -> m Cairo.Surface.Surface
    -- ^ __Returns:__ a pointer to the newly allocated surface. The caller
    -- owns the surface and should call @/cairo_surface_destroy()/@ when done
    -- with it.
    -- 
    -- This function always returns a valid pointer, but it will return a
    -- pointer to a “nil” surface if /@other@/ is already in an error state
    -- or any other error occurs.
windowCreateSimilarSurface :: a -> Content -> Int32 -> Int32 -> m Surface
windowCreateSimilarSurface a
window Content
content Int32
width Int32
height = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    let content' :: CUInt
content' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Content -> Int) -> Content -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Content -> Int
forall a. Enum a => a -> Int
fromEnum) Content
content
    Ptr Surface
result <- Ptr Window -> CUInt -> Int32 -> Int32 -> IO (Ptr Surface)
gdk_window_create_similar_surface Ptr Window
window' CUInt
content' Int32
width Int32
height
    Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowCreateSimilarSurface" Ptr Surface
result
    Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Surface -> Surface
Cairo.Surface.Surface) Ptr Surface
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'

#if defined(ENABLE_OVERLOADING)
data WindowCreateSimilarSurfaceMethodInfo
instance (signature ~ (Cairo.Enums.Content -> Int32 -> Int32 -> m Cairo.Surface.Surface), MonadIO m, IsWindow a) => O.MethodInfo WindowCreateSimilarSurfaceMethodInfo a signature where
    overloadedMethod = windowCreateSimilarSurface

#endif

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

foreign import ccall "gdk_window_deiconify" gdk_window_deiconify :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Attempt to deiconify (unminimize) /@window@/. On X11 the window manager may
-- choose to ignore the request to deiconify. When using GTK+,
-- use @/gtk_window_deiconify()/@ instead of the t'GI.Gdk.Objects.Window.Window' variant. Or better yet,
-- you probably want to use @/gtk_window_present_with_time()/@, which raises the window, focuses it,
-- unminimizes it, and puts it on the current desktop.
windowDeiconify ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowDeiconify :: a -> m ()
windowDeiconify a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_deiconify Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowDeiconifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowDeiconifyMethodInfo a signature where
    overloadedMethod = windowDeiconify

#endif

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

foreign import ccall "gdk_window_destroy" gdk_window_destroy :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Destroys the window system resources associated with /@window@/ and decrements /@window@/\'s
-- reference count. The window system resources for all children of /@window@/ are also
-- destroyed, but the children’s reference counts are not decremented.
-- 
-- Note that a window will not be destroyed automatically when its reference count
-- reaches zero. You must call this function yourself before that happens.
windowDestroy ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowDestroy :: a -> m ()
windowDestroy a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_destroy Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowDestroyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowDestroyMethodInfo a signature where
    overloadedMethod = windowDestroy

#endif

-- method Window::destroy_notify
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_destroy_notify" gdk_window_destroy_notify :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | /No description available in the introspection data./
windowDestroyNotify ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -> m ()
windowDestroyNotify :: a -> m ()
windowDestroyNotify a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_destroy_notify Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowDestroyNotifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowDestroyNotifyMethodInfo a signature where
    overloadedMethod = windowDestroyNotify

#endif

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

foreign import ccall "gdk_window_enable_synchronized_configure" gdk_window_enable_synchronized_configure :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

{-# DEPRECATED windowEnableSynchronizedConfigure ["(Since version 3.8)","this function is no longer needed"] #-}
-- | Does nothing, present only for compatiblity.
-- 
-- /Since: 2.6/
windowEnableSynchronizedConfigure ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowEnableSynchronizedConfigure :: a -> m ()
windowEnableSynchronizedConfigure a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_enable_synchronized_configure Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowEnableSynchronizedConfigureMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowEnableSynchronizedConfigureMethodInfo a signature where
    overloadedMethod = windowEnableSynchronizedConfigure

#endif

-- method Window::end_draw_frame
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DrawingContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #GdkDrawingContext created by gdk_window_begin_draw_frame()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_end_draw_frame" gdk_window_end_draw_frame :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.DrawingContext.DrawingContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DrawingContext"})
    IO ()

-- | Indicates that the drawing of the contents of /@window@/ started with
-- @/gdk_window_begin_frame()/@ has been completed.
-- 
-- This function will take care of destroying the t'GI.Gdk.Objects.DrawingContext.DrawingContext'.
-- 
-- It is an error to call this function without a matching
-- @/gdk_window_begin_frame()/@ first.
-- 
-- /Since: 3.22/
windowEndDrawFrame ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.DrawingContext.IsDrawingContext b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> b
    -- ^ /@context@/: the t'GI.Gdk.Objects.DrawingContext.DrawingContext' created by 'GI.Gdk.Objects.Window.windowBeginDrawFrame'
    -> m ()
windowEndDrawFrame :: a -> b -> m ()
windowEndDrawFrame a
window b
context = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr DrawingContext
context' <- b -> IO (Ptr DrawingContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
context
    Ptr Window -> Ptr DrawingContext -> IO ()
gdk_window_end_draw_frame Ptr Window
window' Ptr DrawingContext
context'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
context
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowEndDrawFrameMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindow a, Gdk.DrawingContext.IsDrawingContext b) => O.MethodInfo WindowEndDrawFrameMethodInfo a signature where
    overloadedMethod = windowEndDrawFrame

#endif

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

foreign import ccall "gdk_window_end_paint" gdk_window_end_paint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Indicates that the backing store created by the most recent call
-- to 'GI.Gdk.Objects.Window.windowBeginPaintRegion' should be copied onscreen and
-- deleted, leaving the next-most-recent backing store or no backing
-- store at all as the active paint region. See
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion' for full details.
-- 
-- It is an error to call this function without a matching
-- 'GI.Gdk.Objects.Window.windowBeginPaintRegion' first.
windowEndPaint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowEndPaint :: a -> m ()
windowEndPaint a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_end_paint Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowEndPaintMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowEndPaintMethodInfo a signature where
    overloadedMethod = windowEndPaint

#endif

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

foreign import ccall "gdk_window_ensure_native" gdk_window_ensure_native :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Tries to ensure that there is a window-system native window for this
-- GdkWindow. This may fail in some situations, returning 'P.False'.
-- 
-- Offscreen window and children of them can never have native windows.
-- 
-- Some backends may not support native child windows.
-- 
-- /Since: 2.18/
windowEnsureNative ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the window has a native window, 'P.False' otherwise
windowEnsureNative :: a -> m Bool
windowEnsureNative a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    CInt
result <- Ptr Window -> IO CInt
gdk_window_ensure_native Ptr Window
window'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowEnsureNativeMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowEnsureNativeMethodInfo a signature where
    overloadedMethod = windowEnsureNative

#endif

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

foreign import ccall "gdk_window_flush" gdk_window_flush :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

{-# DEPRECATED windowFlush ["(Since version 3.14)"] #-}
-- | This function does nothing.
-- 
-- /Since: 2.18/
windowFlush ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowFlush :: a -> m ()
windowFlush a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_flush Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFlushMethodInfo a signature where
    overloadedMethod = windowFlush

#endif

-- method Window::focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timestamp"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "timestamp of the event triggering the window focus"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_focus" gdk_window_focus :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()

-- | Sets keyboard focus to /@window@/. In most cases, @/gtk_window_present_with_time()/@
-- should be used on a @/GtkWindow/@, rather than calling this function.
windowFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Word32
    -- ^ /@timestamp@/: timestamp of the event triggering the window focus
    -> m ()
windowFocus :: a -> Word32 -> m ()
windowFocus a
window Word32
timestamp = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> Word32 -> IO ()
gdk_window_focus Ptr Window
window' Word32
timestamp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowFocusMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFocusMethodInfo a signature where
    overloadedMethod = windowFocus

#endif

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

foreign import ccall "gdk_window_freeze_toplevel_updates_libgtk_only" gdk_window_freeze_toplevel_updates_libgtk_only :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

{-# DEPRECATED windowFreezeToplevelUpdatesLibgtkOnly ["(Since version 3.16)","This symbol was never meant to be used outside of GTK+"] #-}
-- | Temporarily freezes a window and all its descendants such that it won\'t
-- receive expose events.  The window will begin receiving expose events
-- again when 'GI.Gdk.Objects.Window.windowThawToplevelUpdatesLibgtkOnly' is called. If
-- 'GI.Gdk.Objects.Window.windowFreezeToplevelUpdatesLibgtkOnly'
-- has been called more than once,
-- 'GI.Gdk.Objects.Window.windowThawToplevelUpdatesLibgtkOnly' must be called
-- an equal number of times to begin processing exposes.
-- 
-- This function is not part of the GDK public API and is only
-- for use by GTK+.
windowFreezeToplevelUpdatesLibgtkOnly ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowFreezeToplevelUpdatesLibgtkOnly :: a -> m ()
windowFreezeToplevelUpdatesLibgtkOnly a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_freeze_toplevel_updates_libgtk_only Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo a signature where
    overloadedMethod = windowFreezeToplevelUpdatesLibgtkOnly

#endif

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

foreign import ccall "gdk_window_freeze_updates" gdk_window_freeze_updates :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Temporarily freezes a window such that it won’t receive expose
-- events.  The window will begin receiving expose events again when
-- 'GI.Gdk.Objects.Window.windowThawUpdates' is called. If 'GI.Gdk.Objects.Window.windowFreezeUpdates'
-- has been called more than once, 'GI.Gdk.Objects.Window.windowThawUpdates' must be called
-- an equal number of times to begin processing exposes.
windowFreezeUpdates ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowFreezeUpdates :: a -> m ()
windowFreezeUpdates a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_freeze_updates Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowFreezeUpdatesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFreezeUpdatesMethodInfo a signature where
    overloadedMethod = windowFreezeUpdates

#endif

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

foreign import ccall "gdk_window_fullscreen" gdk_window_fullscreen :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Moves the window into fullscreen mode. This means the
-- window covers the entire screen and is above any panels
-- or task bars.
-- 
-- If the window was already fullscreen, then this function does nothing.
-- 
-- On X11, asks the window manager to put /@window@/ in a fullscreen
-- state, if the window manager supports this operation. Not all
-- window managers support this, and some deliberately ignore it or
-- don’t have a concept of “fullscreen”; so you can’t rely on the
-- fullscreenification actually happening. But it will happen with
-- most standard window managers, and GDK makes a best effort to get
-- it to happen.
-- 
-- /Since: 2.2/
windowFullscreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowFullscreen :: a -> m ()
windowFullscreen a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_fullscreen Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowFullscreenMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFullscreenMethodInfo a signature where
    overloadedMethod = windowFullscreen

#endif

-- method Window::fullscreen_on_monitor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a toplevel #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "monitor"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Which monitor to display fullscreen on."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_fullscreen_on_monitor" gdk_window_fullscreen_on_monitor :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- monitor : TBasicType TInt
    IO ()

-- | Moves the window into fullscreen mode on the given monitor. This means
-- the window covers the entire screen and is above any panels or task bars.
-- 
-- If the window was already fullscreen, then this function does nothing.
windowFullscreenOnMonitor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@monitor@/: Which monitor to display fullscreen on.
    -> m ()
windowFullscreenOnMonitor :: a -> Int32 -> m ()
windowFullscreenOnMonitor a
window Int32
monitor = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> Int32 -> IO ()
gdk_window_fullscreen_on_monitor Ptr Window
window' Int32
monitor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowFullscreenOnMonitorMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFullscreenOnMonitorMethodInfo a signature where
    overloadedMethod = windowFullscreenOnMonitor

#endif

-- method Window::geometry_changed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an embedded offscreen #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_geometry_changed" gdk_window_geometry_changed :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | This function informs GDK that the geometry of an embedded
-- offscreen window has changed. This is necessary for GDK to keep
-- track of which offscreen window the pointer is in.
-- 
-- /Since: 2.18/
windowGeometryChanged ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: an embedded offscreen t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowGeometryChanged :: a -> m ()
windowGeometryChanged a
window = 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 Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Window -> IO ()
gdk_window_geometry_changed Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowGeometryChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowGeometryChangedMethodInfo a signature where
    overloadedMethod = windowGeometryChanged

#endif

-- method Window::get_accept_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a toplevel #GdkWindow."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_accept_focus" gdk_window_get_accept_focus :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Determines whether or not the desktop environment shuld be hinted that
-- the window does not want to receive input focus.
-- 
-- /Since: 2.22/
windowGetAcceptFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ whether or not the window should receive input focus.
windowGetAcceptFocus :: a -> m Bool
windowGetAcceptFocus a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    CInt
result <- Ptr Window -> IO CInt
gdk_window_get_accept_focus Ptr Window
window'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetAcceptFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetAcceptFocusMethodInfo a signature where
    overloadedMethod = windowGetAcceptFocus

#endif

-- method Window::get_background_pattern
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a window" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Pattern" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_background_pattern" gdk_window_get_background_pattern :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr Cairo.Pattern.Pattern)

{-# DEPRECATED windowGetBackgroundPattern ["(Since version 3.22)","Don\\'t use this function"] #-}
-- | Gets the pattern used to clear the background on /@window@/.
-- 
-- /Since: 2.22/
windowGetBackgroundPattern ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a window
    -> m (Maybe Cairo.Pattern.Pattern)
    -- ^ __Returns:__ The pattern to use for the
    -- background or 'P.Nothing' if there is no background.
windowGetBackgroundPattern :: a -> m (Maybe Pattern)
windowGetBackgroundPattern a
window = IO (Maybe Pattern) -> m (Maybe Pattern)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pattern) -> m (Maybe Pattern))
-> IO (Maybe Pattern) -> m (Maybe Pattern)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Pattern
result <- Ptr Window -> IO (Ptr Pattern)
gdk_window_get_background_pattern Ptr Window
window'
    Maybe Pattern
maybeResult <- Ptr Pattern -> (Ptr Pattern -> IO Pattern) -> IO (Maybe Pattern)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pattern
result ((Ptr Pattern -> IO Pattern) -> IO (Maybe Pattern))
-> (Ptr Pattern -> IO Pattern) -> IO (Maybe Pattern)
forall a b. (a -> b) -> a -> b
$ \Ptr Pattern
result' -> do
        Pattern
result'' <- ((ManagedPtr Pattern -> Pattern) -> Ptr Pattern -> IO Pattern
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Pattern -> Pattern
Cairo.Pattern.Pattern) Ptr Pattern
result'
        Pattern -> IO Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return Pattern
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe Pattern -> IO (Maybe Pattern)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pattern
maybeResult

#if defined(ENABLE_OVERLOADING)
data WindowGetBackgroundPatternMethodInfo
instance (signature ~ (m (Maybe Cairo.Pattern.Pattern)), MonadIO m, IsWindow a) => O.MethodInfo WindowGetBackgroundPatternMethodInfo a signature where
    overloadedMethod = windowGetBackgroundPattern

#endif

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

foreign import ccall "gdk_window_get_children" gdk_window_get_children :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr (GList (Ptr Window)))

-- | Gets the list of children of /@window@/ known to GDK.
-- This function only returns children created via GDK,
-- so for example it’s useless when used with the root window;
-- it only returns windows an application created itself.
-- 
-- The returned list must be freed, but the elements in the
-- list need not be.
windowGetChildren ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m [Window]
    -- ^ __Returns:__ 
    --     list of child windows inside /@window@/
windowGetChildren :: a -> m [Window]
windowGetChildren a
window = IO [Window] -> m [Window]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr (GList (Ptr Window))
result <- Ptr Window -> IO (Ptr (GList (Ptr Window)))
gdk_window_get_children Ptr Window
window'
    [Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
    [Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) [Ptr Window]
result'
    Ptr (GList (Ptr Window)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Window))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    [Window] -> IO [Window]
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''

#if defined(ENABLE_OVERLOADING)
data WindowGetChildrenMethodInfo
instance (signature ~ (m [Window]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetChildrenMethodInfo a signature where
    overloadedMethod = windowGetChildren

#endif

-- method Window::get_children_with_user_data
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data to look for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList (TInterface Name { namespace = "Gdk" , name = "Window" }))
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_children_with_user_data" gdk_window_get_children_with_user_data :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO (Ptr (GList (Ptr Window)))

-- | Gets the list of children of /@window@/ known to GDK with a
-- particular /@userData@/ set on it.
-- 
-- The returned list must be freed, but the elements in the
-- list need not be.
-- 
-- The list is returned in (relative) stacking order, i.e. the
-- lowest window is first.
-- 
-- /Since: 3.10/
windowGetChildrenWithUserData ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Ptr ()
    -- ^ /@userData@/: user data to look for
    -> m [Window]
    -- ^ __Returns:__ 
    --     list of child windows inside /@window@/
windowGetChildrenWithUserData :: a -> Ptr () -> m [Window]
windowGetChildrenWithUserData a
window Ptr ()
userData = IO [Window] -> m [Window]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr (GList (Ptr Window))
result <- Ptr Window -> Ptr () -> IO (Ptr (GList (Ptr Window)))
gdk_window_get_children_with_user_data Ptr Window
window' Ptr ()
userData
    [Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
    [Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) [Ptr Window]
result'
    Ptr (GList (Ptr Window)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Window))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    [Window] -> IO [Window]
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''

#if defined(ENABLE_OVERLOADING)
data WindowGetChildrenWithUserDataMethodInfo
instance (signature ~ (Ptr () -> m [Window]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetChildrenWithUserDataMethodInfo a signature where
    overloadedMethod = windowGetChildrenWithUserData

#endif

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

foreign import ccall "gdk_window_get_clip_region" gdk_window_get_clip_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr Cairo.Region.Region)

-- | Computes the region of a window that potentially can be written
-- to by drawing primitives. This region may not take into account
-- other factors such as if the window is obscured by other windows,
-- but no area outside of this region will be affected by drawing
-- primitives.
windowGetClipRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Cairo.Region.Region
    -- ^ __Returns:__ a t'GI.Cairo.Structs.Region.Region'. This must be freed with @/cairo_region_destroy()/@
    --          when you are done.
windowGetClipRegion :: a -> m Region
windowGetClipRegion a
window = IO Region -> m Region
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Region -> m Region) -> IO Region -> m Region
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Region
result <- Ptr Window -> IO (Ptr Region)
gdk_window_get_clip_region Ptr Window
window'
    Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetClipRegion" Ptr Region
result
    Region
result' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Region -> Region
Cairo.Region.Region) Ptr Region
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Region -> IO Region
forall (m :: * -> *) a. Monad m => a -> m a
return Region
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetClipRegionMethodInfo
instance (signature ~ (m Cairo.Region.Region), MonadIO m, IsWindow a) => O.MethodInfo WindowGetClipRegionMethodInfo a signature where
    overloadedMethod = windowGetClipRegion

#endif

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

foreign import ccall "gdk_window_get_composited" gdk_window_get_composited :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

{-# DEPRECATED windowGetComposited ["(Since version 3.16)","Compositing is an outdated technology that","  only ever worked on X11."] #-}
-- | Determines whether /@window@/ is composited.
-- 
-- See 'GI.Gdk.Objects.Window.windowSetComposited'.
-- 
-- /Since: 2.22/
windowGetComposited ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the window is composited.
windowGetComposited :: a -> m Bool
windowGetComposited a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    CInt
result <- Ptr Window -> IO CInt
gdk_window_get_composited Ptr Window
window'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetCompositedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetCompositedMethodInfo a signature where
    overloadedMethod = windowGetComposited

#endif

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

foreign import ccall "gdk_window_get_cursor" gdk_window_get_cursor :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr Gdk.Cursor.Cursor)

-- | Retrieves a t'GI.Gdk.Objects.Cursor.Cursor' pointer for the cursor currently set on the
-- specified t'GI.Gdk.Objects.Window.Window', or 'P.Nothing'.  If the return value is 'P.Nothing' then
-- there is no custom cursor set on the specified window, and it is
-- using the cursor for its parent window.
-- 
-- /Since: 2.18/
windowGetCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m (Maybe Gdk.Cursor.Cursor)
    -- ^ __Returns:__ a t'GI.Gdk.Objects.Cursor.Cursor', or 'P.Nothing'. The
    --   returned object is owned by the t'GI.Gdk.Objects.Window.Window' and should not be
    --   unreferenced directly. Use 'GI.Gdk.Objects.Window.windowSetCursor' to unset the
    --   cursor of the window
windowGetCursor :: a -> m (Maybe Cursor)
windowGetCursor a
window = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Cursor
result <- Ptr Window -> IO (Ptr Cursor)
gdk_window_get_cursor Ptr Window
window'
    Maybe Cursor
maybeResult <- Ptr Cursor -> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Cursor
result ((Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor))
-> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ \Ptr Cursor
result' -> do
        Cursor
result'' <- ((ManagedPtr Cursor -> Cursor) -> Ptr Cursor -> IO Cursor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor) Ptr Cursor
result'
        Cursor -> IO Cursor
forall (m :: * -> *) a. Monad m => a -> m a
return Cursor
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe Cursor -> IO (Maybe Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cursor
maybeResult

#if defined(ENABLE_OVERLOADING)
data WindowGetCursorMethodInfo
instance (signature ~ (m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsWindow a) => O.MethodInfo WindowGetCursorMethodInfo a signature where
    overloadedMethod = windowGetCursor

#endif

-- method Window::get_decorations
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The toplevel #GdkWindow to get the decorations from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "decorations"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WMDecoration" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The window decorations will be written here"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_decorations" gdk_window_get_decorations :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr CUInt ->                            -- decorations : TInterface (Name {namespace = "Gdk", name = "WMDecoration"})
    IO CInt

-- | Returns the decorations set on the GdkWindow with
-- 'GI.Gdk.Objects.Window.windowSetDecorations'.
windowGetDecorations ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: The toplevel t'GI.Gdk.Objects.Window.Window' to get the decorations from
    -> m ((Bool, [Gdk.Flags.WMDecoration]))
    -- ^ __Returns:__ 'P.True' if the window has decorations set, 'P.False' otherwise.
windowGetDecorations :: a -> m (Bool, [WMDecoration])
windowGetDecorations a
window = IO (Bool, [WMDecoration]) -> m (Bool, [WMDecoration])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [WMDecoration]) -> m (Bool, [WMDecoration]))
-> IO (Bool, [WMDecoration]) -> m (Bool, [WMDecoration])
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr CUInt
decorations <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
    CInt
result <- Ptr Window -> Ptr CUInt -> IO CInt
gdk_window_get_decorations