{-# 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 Ptr Window
window' Ptr CUInt
decorations
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    CUInt
decorations' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
decorations
    let decorations'' :: [WMDecoration]
decorations'' = CUInt -> [WMDecoration]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
decorations'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
decorations
    (Bool, [WMDecoration]) -> IO (Bool, [WMDecoration])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [WMDecoration]
decorations'')

#if defined(ENABLE_OVERLOADING)
data WindowGetDecorationsMethodInfo
instance (signature ~ (m ((Bool, [Gdk.Flags.WMDecoration]))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetDecorationsMethodInfo a signature where
    overloadedMethod = windowGetDecorations

#endif

-- method Window::get_device_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
--           }
--       , Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a master, pointer #GdkDevice."
--                 , 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_device_cursor" gdk_window_get_device_cursor :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    IO (Ptr Gdk.Cursor.Cursor)

-- | Retrieves a t'GI.Gdk.Objects.Cursor.Cursor' pointer for the /@device@/ 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: 3.0/
windowGetDeviceCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> b
    -- ^ /@device@/: a master, pointer t'GI.Gdk.Objects.Device.Device'.
    -> 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
windowGetDeviceCursor :: a -> b -> m (Maybe Cursor)
windowGetDeviceCursor a
window b
device = 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 Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    Ptr Cursor
result <- Ptr Window -> Ptr Device -> IO (Ptr Cursor)
gdk_window_get_device_cursor Ptr Window
window' Ptr Device
device'
    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
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    Maybe Cursor -> IO (Maybe Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cursor
maybeResult

#if defined(ENABLE_OVERLOADING)
data WindowGetDeviceCursorMethodInfo
instance (signature ~ (b -> m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDeviceCursorMethodInfo a signature where
    overloadedMethod = windowGetDeviceCursor

#endif

-- method Window::get_device_events
-- 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 = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDevice." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "EventMask" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_device_events" gdk_window_get_device_events :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    IO CUInt

-- | Returns the event mask for /@window@/ corresponding to an specific device.
-- 
-- /Since: 3.0/
windowGetDeviceEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> b
    -- ^ /@device@/: a t'GI.Gdk.Objects.Device.Device'.
    -> m [Gdk.Flags.EventMask]
    -- ^ __Returns:__ device event mask for /@window@/
windowGetDeviceEvents :: a -> b -> m [EventMask]
windowGetDeviceEvents a
window b
device = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
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
    CUInt
result <- Ptr Window -> Ptr Device -> IO CUInt
gdk_window_get_device_events Ptr Window
window' Ptr Device
device'
    let result' :: [EventMask]
result' = CUInt -> [EventMask]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    [EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetDeviceEventsMethodInfo
instance (signature ~ (b -> m [Gdk.Flags.EventMask]), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDeviceEventsMethodInfo a signature where
    overloadedMethod = windowGetDeviceEvents

#endif

-- method Window::get_device_position
-- 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 = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "pointer #GdkDevice to query to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the X coordinate of @device, or %NULL."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the Y coordinate of @device, or %NULL."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the modifier mask, or %NULL."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_device_position" gdk_window_get_device_position :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    Ptr Int32 ->                            -- x : TBasicType TInt
    Ptr Int32 ->                            -- y : TBasicType TInt
    Ptr CUInt ->                            -- mask : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    IO (Ptr Window)

-- | Obtains the current device position and modifier state.
-- The position is given in coordinates relative to the upper left
-- corner of /@window@/.
-- 
-- Use 'GI.Gdk.Objects.Window.windowGetDevicePositionDouble' if you need subpixel precision.
-- 
-- /Since: 3.0/
windowGetDevicePosition ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> b
    -- ^ /@device@/: pointer t'GI.Gdk.Objects.Device.Device' to query to.
    -> m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))
    -- ^ __Returns:__ The window underneath /@device@/
    -- (as with 'GI.Gdk.Objects.Device.deviceGetWindowAtPosition'), or 'P.Nothing' if the
    -- window is not known to GDK.
windowGetDevicePosition :: a -> b -> m (Maybe Window, Int32, Int32, [ModifierType])
windowGetDevicePosition a
window b
device = IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Int32, Int32, [ModifierType])
 -> m (Maybe Window, Int32, Int32, [ModifierType]))
-> IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
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 Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr CUInt
mask <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
    Ptr Window
result <- Ptr Window
-> Ptr Device
-> Ptr Int32
-> Ptr Int32
-> Ptr CUInt
-> IO (Ptr Window)
gdk_window_get_device_position Ptr Window
window' Ptr Device
device' Ptr Int32
x Ptr Int32
y Ptr CUInt
mask
    Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
        Window
result'' <- ((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'
        Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    CUInt
mask' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mask
    let mask'' :: [ModifierType]
mask'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
mask'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mask
    (Maybe Window, Int32, Int32, [ModifierType])
-> IO (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Window
maybeResult, Int32
x', Int32
y', [ModifierType]
mask'')

#if defined(ENABLE_OVERLOADING)
data WindowGetDevicePositionMethodInfo
instance (signature ~ (b -> m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDevicePositionMethodInfo a signature where
    overloadedMethod = windowGetDevicePosition

#endif

-- method Window::get_device_position_double
-- 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 = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "pointer #GdkDevice to query to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the X coordinate of @device, or %NULL."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the Y coordinate of @device, or %NULL."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the modifier mask, or %NULL."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_device_position_double" gdk_window_get_device_position_double :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    Ptr CDouble ->                          -- x : TBasicType TDouble
    Ptr CDouble ->                          -- y : TBasicType TDouble
    Ptr CUInt ->                            -- mask : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    IO (Ptr Window)

-- | Obtains the current device position in doubles and modifier state.
-- The position is given in coordinates relative to the upper left
-- corner of /@window@/.
-- 
-- /Since: 3.10/
windowGetDevicePositionDouble ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> b
    -- ^ /@device@/: pointer t'GI.Gdk.Objects.Device.Device' to query to.
    -> m ((Maybe Window, Double, Double, [Gdk.Flags.ModifierType]))
    -- ^ __Returns:__ The window underneath /@device@/
    -- (as with 'GI.Gdk.Objects.Device.deviceGetWindowAtPosition'), or 'P.Nothing' if the
    -- window is not known to GDK.
windowGetDevicePositionDouble :: a -> b -> m (Maybe Window, Double, Double, [ModifierType])
windowGetDevicePositionDouble a
window b
device = IO (Maybe Window, Double, Double, [ModifierType])
-> m (Maybe Window, Double, Double, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Double, Double, [ModifierType])
 -> m (Maybe Window, Double, Double, [ModifierType]))
-> IO (Maybe Window, Double, Double, [ModifierType])
-> m (Maybe Window, Double, Double, [ModifierType])
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 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 CUInt
mask <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
    Ptr Window
result <- Ptr Window
-> Ptr Device
-> Ptr CDouble
-> Ptr CDouble
-> Ptr CUInt
-> IO (Ptr Window)
gdk_window_get_device_position_double Ptr Window
window' Ptr Device
device' Ptr CDouble
x Ptr CDouble
y Ptr CUInt
mask
    Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
        Window
result'' <- ((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'
        Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
    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'
    CUInt
mask' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mask
    let mask'' :: [ModifierType]
mask'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
mask'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
x
    Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
y
    Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mask
    (Maybe Window, Double, Double, [ModifierType])
-> IO (Maybe Window, Double, Double, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Window
maybeResult, Double
x'', Double
y'', [ModifierType]
mask'')

#if defined(ENABLE_OVERLOADING)
data WindowGetDevicePositionDoubleMethodInfo
instance (signature ~ (b -> m ((Maybe Window, Double, Double, [Gdk.Flags.ModifierType]))), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDevicePositionDoubleMethodInfo a signature where
    overloadedMethod = windowGetDevicePositionDouble

#endif

-- method Window::get_display
-- 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 = "Display" })
-- throws : False
-- Skip return : False

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

-- | Gets the t'GI.Gdk.Objects.Display.Display' associated with a t'GI.Gdk.Objects.Window.Window'.
-- 
-- /Since: 2.24/
windowGetDisplay ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.Display.Display
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Display.Display' associated with /@window@/
windowGetDisplay :: a -> m Display
windowGetDisplay a
window = IO Display -> m Display
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Display -> m Display) -> IO Display -> m Display
forall a b. (a -> b) -> a -> b
$ do
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    Ptr Display
result <- Ptr Window -> IO (Ptr Display)
gdk_window_get_display Ptr Window
window'
    Text -> Ptr Display -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetDisplay" Ptr Display
result
    Display
result' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Gdk.Display.Display) Ptr Display
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsWindow a) => O.MethodInfo WindowGetDisplayMethodInfo a signature where
    overloadedMethod = windowGetDisplay

#endif

-- method Window::get_drag_protocol
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the destination window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location of the window\n   where the drop should happen. This may be @window or a proxy window,\n   or %NULL if @window does not support Drag and Drop."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "DragProtocol" })
-- throws : False
-- Skip return : False

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

-- | Finds out the DND protocol supported by a window.
-- 
-- /Since: 3.0/
windowGetDragProtocol ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: the destination window
    -> m ((Gdk.Enums.DragProtocol, Window))
    -- ^ __Returns:__ the supported DND protocol.
windowGetDragProtocol :: a -> m (DragProtocol, Window)
windowGetDragProtocol a
window = IO (DragProtocol, Window) -> m (DragProtocol, Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (DragProtocol, Window) -> m (DragProtocol, Window))
-> IO (DragProtocol, Window) -> m (DragProtocol, 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 (Ptr Window)
target <- IO (Ptr (Ptr Window))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Window))
    CUInt
result <- Ptr Window -> Ptr (Ptr Window) -> IO CUInt
gdk_window_get_drag_protocol Ptr Window
window' Ptr (Ptr Window)
target
    let result' :: DragProtocol
result' = (Int -> DragProtocol
forall a. Enum a => Int -> a
toEnum (Int -> DragProtocol) -> (CUInt -> Int) -> CUInt -> DragProtocol
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    Ptr Window
target' <- Ptr (Ptr Window) -> IO (Ptr Window)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Window)
target
    Window
target'' <- ((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
target'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr (Ptr Window) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Window)
target
    (DragProtocol, Window) -> IO (DragProtocol, Window)
forall (m :: * -> *) a. Monad m => a -> m a
return (DragProtocol
result', Window
target'')

#if defined(ENABLE_OVERLOADING)
data WindowGetDragProtocolMethodInfo
instance (signature ~ (m ((Gdk.Enums.DragProtocol, Window))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetDragProtocolMethodInfo a signature where
    overloadedMethod = windowGetDragProtocol

#endif

-- method Window::get_effective_parent
-- 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 = "Window" })
-- throws : False
-- Skip return : False

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

-- | Obtains the parent of /@window@/, as known to GDK. Works like
-- 'GI.Gdk.Objects.Window.windowGetParent' for normal windows, but returns the
-- window’s embedder for offscreen windows.
-- 
-- See also: 'GI.Gdk.Functions.offscreenWindowGetEmbedder'
-- 
-- /Since: 2.22/
windowGetEffectiveParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Window
    -- ^ __Returns:__ effective parent of /@window@/
windowGetEffectiveParent :: a -> m Window
windowGetEffectiveParent 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 Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_effective_parent Ptr Window
window'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetEffectiveParent" 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
newObject ManagedPtr Window -> Window
Window) 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 WindowGetEffectiveParentMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEffectiveParentMethodInfo a signature where
    overloadedMethod = windowGetEffectiveParent

#endif

-- method Window::get_effective_toplevel
-- 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 = "Window" })
-- throws : False
-- Skip return : False

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

-- | Gets the toplevel window that’s an ancestor of /@window@/.
-- 
-- Works like 'GI.Gdk.Objects.Window.windowGetToplevel', but treats an offscreen window\'s
-- embedder as its parent, using 'GI.Gdk.Objects.Window.windowGetEffectiveParent'.
-- 
-- See also: 'GI.Gdk.Functions.offscreenWindowGetEmbedder'
-- 
-- /Since: 2.22/
windowGetEffectiveToplevel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Window
    -- ^ __Returns:__ the effective toplevel window containing /@window@/
windowGetEffectiveToplevel :: a -> m Window
windowGetEffectiveToplevel 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 Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_effective_toplevel Ptr Window
window'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetEffectiveToplevel" 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
newObject ManagedPtr Window -> Window
Window) 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 WindowGetEffectiveToplevelMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEffectiveToplevelMethodInfo a signature where
    overloadedMethod = windowGetEffectiveToplevel

#endif

-- method Window::get_event_compression
-- 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_event_compression" gdk_window_get_event_compression :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Get the current event compression setting for this window.
-- 
-- /Since: 3.12/
windowGetEventCompression ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if motion events will be compressed
windowGetEventCompression :: a -> m Bool
windowGetEventCompression 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_event_compression 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 WindowGetEventCompressionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEventCompressionMethodInfo a signature where
    overloadedMethod = windowGetEventCompression

#endif

-- method Window::get_events
-- 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 = "EventMask" })
-- throws : False
-- Skip return : False

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

-- | Gets the event mask for /@window@/ for all master input devices. See
-- 'GI.Gdk.Objects.Window.windowSetEvents'.
windowGetEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m [Gdk.Flags.EventMask]
    -- ^ __Returns:__ event mask for /@window@/
windowGetEvents :: a -> m [EventMask]
windowGetEvents a
window = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
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
    CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_events Ptr Window
window'
    let result' :: [EventMask]
result' = CUInt -> [EventMask]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    [EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetEventsMethodInfo
instance (signature ~ (m [Gdk.Flags.EventMask]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEventsMethodInfo a signature where
    overloadedMethod = windowGetEvents

#endif

-- method Window::get_focus_on_map
-- 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_focus_on_map" gdk_window_get_focus_on_map :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Determines whether or not the desktop environment should be hinted that the
-- window does not want to receive input focus when it is mapped.
-- 
-- /Since: 2.22/
windowGetFocusOnMap ::
    (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 wants to receive input focus when
    -- it is mapped.
windowGetFocusOnMap :: a -> m Bool
windowGetFocusOnMap 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_focus_on_map 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 WindowGetFocusOnMapMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFocusOnMapMethodInfo a signature where
    overloadedMethod = windowGetFocusOnMap

#endif

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

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

-- | Gets the frame clock for the window. The frame clock for a window
-- never changes unless the window is reparented to a new toplevel
-- window.
-- 
-- /Since: 3.8/
windowGetFrameClock ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: window to get frame clock for
    -> m Gdk.FrameClock.FrameClock
    -- ^ __Returns:__ the frame clock
windowGetFrameClock :: a -> m FrameClock
windowGetFrameClock a
window = IO FrameClock -> m FrameClock
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FrameClock -> m FrameClock) -> IO FrameClock -> m FrameClock
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 FrameClock
result <- Ptr Window -> IO (Ptr FrameClock)
gdk_window_get_frame_clock Ptr Window
window'
    Text -> Ptr FrameClock -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetFrameClock" Ptr FrameClock
result
    FrameClock
result' <- ((ManagedPtr FrameClock -> FrameClock)
-> Ptr FrameClock -> IO FrameClock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock) Ptr FrameClock
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    FrameClock -> IO FrameClock
forall (m :: * -> *) a. Monad m => a -> m a
return FrameClock
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetFrameClockMethodInfo
instance (signature ~ (m Gdk.FrameClock.FrameClock), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFrameClockMethodInfo a signature where
    overloadedMethod = windowGetFrameClock

#endif

-- method Window::get_frame_extents
-- 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 = "rect"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "rectangle to fill with bounding box of the window frame"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Obtains the bounding box of the window, including window manager
-- titlebar\/borders if any. The frame position is given in root window
-- coordinates. To get the position of the window itself (rather than
-- the frame) in root window coordinates, use 'GI.Gdk.Objects.Window.windowGetOrigin'.
windowGetFrameExtents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m (Gdk.Rectangle.Rectangle)
windowGetFrameExtents :: a -> m Rectangle
windowGetFrameExtents a
window = IO Rectangle -> m Rectangle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rectangle -> m Rectangle) -> IO Rectangle -> m Rectangle
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
rect <- Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    Ptr Window -> Ptr Rectangle -> IO ()
gdk_window_get_frame_extents Ptr Window
window' Ptr Rectangle
rect
    Rectangle
rect' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
rect
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Rectangle -> IO Rectangle
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
rect'

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

#endif

-- method Window::get_fullscreen_mode
-- 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
--               (TInterface Name { namespace = "Gdk" , name = "FullscreenMode" })
-- throws : False
-- Skip return : False

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

-- | Obtains the t'GI.Gdk.Enums.FullscreenMode' of the /@window@/.
-- 
-- /Since: 3.8/
windowGetFullscreenMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.Enums.FullscreenMode
    -- ^ __Returns:__ The t'GI.Gdk.Enums.FullscreenMode' applied to the window when fullscreen.
windowGetFullscreenMode :: a -> m FullscreenMode
windowGetFullscreenMode a
window = IO FullscreenMode -> m FullscreenMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FullscreenMode -> m FullscreenMode)
-> IO FullscreenMode -> m FullscreenMode
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
    CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_fullscreen_mode Ptr Window
window'
    let result' :: FullscreenMode
result' = (Int -> FullscreenMode
forall a. Enum a => Int -> a
toEnum (Int -> FullscreenMode)
-> (CUInt -> Int) -> CUInt -> FullscreenMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    FullscreenMode -> IO FullscreenMode
forall (m :: * -> *) a. Monad m => a -> m a
return FullscreenMode
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetFullscreenModeMethodInfo
instance (signature ~ (m Gdk.Enums.FullscreenMode), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFullscreenModeMethodInfo a signature where
    overloadedMethod = windowGetFullscreenMode

#endif

-- method Window::get_geometry
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for X coordinate of window (relative to its parent)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for Y coordinate of window (relative to its parent)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for width of window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for height of window"
--                 , 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_get_geometry" gdk_window_get_geometry :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Int32 ->                            -- x : TBasicType TInt
    Ptr Int32 ->                            -- y : TBasicType TInt
    Ptr Int32 ->                            -- width : TBasicType TInt
    Ptr Int32 ->                            -- height : TBasicType TInt
    IO ()

-- | Any of the return location arguments to this function may be 'P.Nothing',
-- if you aren’t interested in getting the value of that field.
-- 
-- The X and Y coordinates returned are relative to the parent window
-- of /@window@/, which for toplevels usually means relative to the
-- window decorations (titlebar, etc.) rather than relative to the
-- root window (screen-size background window).
-- 
-- On the X11 platform, the geometry is obtained from the X server,
-- so reflects the latest position of /@window@/; this may be out-of-sync
-- with the position of /@window@/ delivered in the most-recently-processed
-- t'GI.Gdk.Structs.EventConfigure.EventConfigure'. 'GI.Gdk.Objects.Window.windowGetPosition' in contrast gets the
-- position from the most recent configure event.
-- 
-- Note: If /@window@/ is not a toplevel, it is much better
-- to call 'GI.Gdk.Objects.Window.windowGetPosition', 'GI.Gdk.Objects.Window.windowGetWidth' and
-- 'GI.Gdk.Objects.Window.windowGetHeight' instead, because it avoids the roundtrip to
-- the X server and because these functions support the full 32-bit
-- coordinate space, whereas 'GI.Gdk.Objects.Window.windowGetGeometry' is restricted to
-- the 16-bit coordinates of X11.
windowGetGeometry ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ((Int32, Int32, Int32, Int32))
windowGetGeometry :: a -> m (Int32, Int32, Int32, Int32)
windowGetGeometry a
window = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
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 Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
width <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
height <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Window
-> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_geometry Ptr Window
window' Ptr Int32
x Ptr Int32
y Ptr Int32
width Ptr Int32
height
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    Int32
width' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
width
    Int32
height' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
height
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
width
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
height
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y', Int32
width', Int32
height')

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

#endif

-- method Window::get_group
-- 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 (TInterface Name { namespace = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

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

-- | Returns the group leader window for /@window@/. See 'GI.Gdk.Objects.Window.windowSetGroup'.
-- 
-- /Since: 2.4/
windowGetGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m Window
    -- ^ __Returns:__ the group leader window for /@window@/
windowGetGroup :: a -> m Window
windowGetGroup 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 Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_group Ptr Window
window'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetGroup" 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
newObject ManagedPtr Window -> Window
Window) 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 WindowGetGroupMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetGroupMethodInfo a signature where
    overloadedMethod = windowGetGroup

#endif

-- method Window::get_height
-- 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 TInt)
-- throws : False
-- Skip return : False

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

-- | Returns the height of the given /@window@/.
-- 
-- On the X11 platform the returned size is the size reported in the
-- most-recently-processed configure event, rather than the current
-- size on the X server.
-- 
-- /Since: 2.24/
windowGetHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Int32
    -- ^ __Returns:__ The height of /@window@/
windowGetHeight :: a -> m Int32
windowGetHeight a
window = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
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
    Int32
result <- Ptr Window -> IO Int32
gdk_window_get_height Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

#endif

-- method Window::get_modal_hint
-- 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_modal_hint" gdk_window_get_modal_hint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Determines whether or not the window manager is hinted that /@window@/
-- has modal behaviour.
-- 
-- /Since: 2.22/
windowGetModalHint ::
    (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 has the modal hint set.
windowGetModalHint :: a -> m Bool
windowGetModalHint 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_modal_hint 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 WindowGetModalHintMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetModalHintMethodInfo a signature where
    overloadedMethod = windowGetModalHint

#endif

-- method Window::get_origin
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for X coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for Y coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

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

-- | Obtains the position of a window in root window coordinates.
-- (Compare with 'GI.Gdk.Objects.Window.windowGetPosition' and
-- 'GI.Gdk.Objects.Window.windowGetGeometry' which return the position of a window
-- relative to its parent window.)
windowGetOrigin ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ((Int32, Int32, Int32))
    -- ^ __Returns:__ not meaningful, ignore
windowGetOrigin :: a -> m (Int32, Int32, Int32)
windowGetOrigin a
window = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32))
-> IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
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 Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Int32
result <- Ptr Window -> Ptr Int32 -> Ptr Int32 -> IO Int32
gdk_window_get_origin Ptr Window
window' Ptr Int32
x Ptr Int32
y
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    (Int32, Int32, Int32) -> IO (Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
x', Int32
y')

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

#endif

-- method Window::get_parent
-- 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 = "Window" })
-- throws : False
-- Skip return : False

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

-- | Obtains the parent of /@window@/, as known to GDK. Does not query the
-- X server; thus this returns the parent as passed to 'GI.Gdk.Objects.Window.windowNew',
-- not the actual parent. This should never matter unless you’re using
-- Xlib calls mixed with GDK calls on the X11 platform. It may also
-- matter for toplevel windows, because the window manager may choose
-- to reparent them.
-- 
-- Note that you should use 'GI.Gdk.Objects.Window.windowGetEffectiveParent' when
-- writing generic code that walks up a window hierarchy, because
-- 'GI.Gdk.Objects.Window.windowGetParent' will most likely not do what you expect if
-- there are offscreen windows in the hierarchy.
windowGetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Window
    -- ^ __Returns:__ parent of /@window@/
windowGetParent :: a -> m Window
windowGetParent 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 Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_parent Ptr Window
window'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetParent" 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
newObject ManagedPtr Window -> Window
Window) 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 WindowGetParentMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetParentMethodInfo a signature where
    overloadedMethod = windowGetParent

#endif

-- method Window::get_pass_through
-- 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_pass_through" gdk_window_get_pass_through :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Returns whether input to the window is passed through to the window
-- below.
-- 
-- See 'GI.Gdk.Objects.Window.windowSetPassThrough' for details
-- 
-- /Since: 3.18/
windowGetPassThrough ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Bool
windowGetPassThrough :: a -> m Bool
windowGetPassThrough 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_pass_through 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 WindowGetPassThroughMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetPassThroughMethodInfo a signature where
    overloadedMethod = windowGetPassThrough

#endif

-- method Window::get_pointer
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for X coordinate of pointer or %NULL to not\n     return the X coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for Y coordinate of pointer or %NULL to not\n     return the Y coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for modifier mask or %NULL to not return the\n     modifier mask"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_pointer" gdk_window_get_pointer :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Int32 ->                            -- x : TBasicType TInt
    Ptr Int32 ->                            -- y : TBasicType TInt
    Ptr CUInt ->                            -- mask : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    IO (Ptr Window)

{-# DEPRECATED windowGetPointer ["(Since version 3.0)","Use 'GI.Gdk.Objects.Window.windowGetDevicePosition' instead."] #-}
-- | Obtains the current pointer position and modifier state.
-- The position is given in coordinates relative to the upper left
-- corner of /@window@/.
windowGetPointer ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))
    -- ^ __Returns:__ the window containing the
    -- pointer (as with 'GI.Gdk.Objects.Window.windowAtPointer'), or 'P.Nothing' if the window
    -- containing the pointer isn’t known to GDK
windowGetPointer :: a -> m (Maybe Window, Int32, Int32, [ModifierType])
windowGetPointer a
window = IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Int32, Int32, [ModifierType])
 -> m (Maybe Window, Int32, Int32, [ModifierType]))
-> IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
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 Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr CUInt
mask <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
    Ptr Window
result <- Ptr Window
-> Ptr Int32 -> Ptr Int32 -> Ptr CUInt -> IO (Ptr Window)
gdk_window_get_pointer Ptr Window
window' Ptr Int32
x Ptr Int32
y Ptr CUInt
mask
    Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
        Window
result'' <- ((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'
        Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    CUInt
mask' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mask
    let mask'' :: [ModifierType]
mask'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
mask'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mask
    (Maybe Window, Int32, Int32, [ModifierType])
-> IO (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Window
maybeResult, Int32
x', Int32
y', [ModifierType]
mask'')

#if defined(ENABLE_OVERLOADING)
data WindowGetPointerMethodInfo
instance (signature ~ (m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetPointerMethodInfo a signature where
    overloadedMethod = windowGetPointer

#endif

-- method Window::get_position
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of window"
--                 , 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_get_position" gdk_window_get_position :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Int32 ->                            -- x : TBasicType TInt
    Ptr Int32 ->                            -- y : TBasicType TInt
    IO ()

-- | Obtains the position of the window as reported in the
-- most-recently-processed t'GI.Gdk.Structs.EventConfigure.EventConfigure'. Contrast with
-- 'GI.Gdk.Objects.Window.windowGetGeometry' which queries the X server for the
-- current window position, regardless of which events have been
-- received or processed.
-- 
-- The position coordinates are relative to the window’s parent window.
windowGetPosition ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ((Int32, Int32))
windowGetPosition :: a -> m (Int32, Int32)
windowGetPosition a
window = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
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 Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Window -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_position Ptr Window
window' Ptr Int32
x Ptr Int32
y
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')

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

#endif

-- method Window::get_root_coords
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate in window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate in window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "root_x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for X coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "root_y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for Y coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_get_root_coords" gdk_window_get_root_coords :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Ptr Int32 ->                            -- root_x : TBasicType TInt
    Ptr Int32 ->                            -- root_y : TBasicType TInt
    IO ()

-- | Obtains the position of a window position in root
-- window coordinates. This is similar to
-- 'GI.Gdk.Objects.Window.windowGetOrigin' but allows you to pass
-- in any position in the window, not just the origin.
-- 
-- /Since: 2.18/
windowGetRootCoords ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@x@/: X coordinate in window
    -> Int32
    -- ^ /@y@/: Y coordinate in window
    -> m ((Int32, Int32))
windowGetRootCoords :: a -> Int32 -> Int32 -> m (Int32, Int32)
windowGetRootCoords a
window Int32
x Int32
y = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
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 Int32
rootX <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
rootY <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Window -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_root_coords Ptr Window
window' Int32
x Int32
y Ptr Int32
rootX Ptr Int32
rootY
    Int32
rootX' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
rootX
    Int32
rootY' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
rootY
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
rootX
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
rootY
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
rootX', Int32
rootY')

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

#endif

-- method Window::get_root_origin
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for X position of window frame"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for Y position of window frame"
--                 , 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_get_root_origin" gdk_window_get_root_origin :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Int32 ->                            -- x : TBasicType TInt
    Ptr Int32 ->                            -- y : TBasicType TInt
    IO ()

-- | Obtains the top-left corner of the window manager frame in root
-- window coordinates.
windowGetRootOrigin ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ((Int32, Int32))
windowGetRootOrigin :: a -> m (Int32, Int32)
windowGetRootOrigin a
window = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
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 Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Window -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_root_origin Ptr Window
window' Ptr Int32
x Ptr Int32
y
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')

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

#endif

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

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

-- | Returns the internal scale factor that maps from window coordiantes
-- to the actual device pixels. On traditional systems this is 1, but
-- on very high density outputs this can be a higher value (often 2).
-- 
-- A higher value means that drawing is automatically scaled up to
-- a higher resolution, so any code doing drawing will automatically look
-- nicer. However, if you are supplying pixel-based data the scale
-- value can be used to determine whether to use a pixel resource
-- with higher resolution data.
-- 
-- The scale of a window may change during runtime, if this happens
-- a configure event will be sent to the toplevel window.
-- 
-- /Since: 3.10/
windowGetScaleFactor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: window to get scale factor for
    -> m Int32
    -- ^ __Returns:__ the scale factor
windowGetScaleFactor :: a -> m Int32
windowGetScaleFactor a
window = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
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
    Int32
result <- Ptr Window -> IO Int32
gdk_window_get_scale_factor Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

#endif

-- method Window::get_screen
-- 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 = "Screen" })
-- throws : False
-- Skip return : False

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

-- | Gets the t'GI.Gdk.Objects.Screen.Screen' associated with a t'GI.Gdk.Objects.Window.Window'.
-- 
-- /Since: 2.24/
windowGetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.Screen.Screen
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Screen.Screen' associated with /@window@/
windowGetScreen :: a -> m Screen
windowGetScreen a
window = IO Screen -> m Screen
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Screen -> m Screen) -> IO Screen -> m Screen
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 Screen
result <- Ptr Window -> IO (Ptr Screen)
gdk_window_get_screen Ptr Window
window'
    Text -> Ptr Screen -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetScreen" Ptr Screen
result
    Screen
result' <- ((ManagedPtr Screen -> Screen) -> Ptr Screen -> IO Screen
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Screen -> IO Screen
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m, IsWindow a) => O.MethodInfo WindowGetScreenMethodInfo a signature where
    overloadedMethod = windowGetScreen

#endif

-- method Window::get_source_events
-- 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 = "source"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "InputSource" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkInputSource to define the source class."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "EventMask" })
-- throws : False
-- Skip return : False

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

-- | Returns the event mask for /@window@/ corresponding to the device class specified
-- by /@source@/.
windowGetSourceEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Enums.InputSource
    -- ^ /@source@/: a t'GI.Gdk.Enums.InputSource' to define the source class.
    -> m [Gdk.Flags.EventMask]
    -- ^ __Returns:__ source event mask for /@window@/
windowGetSourceEvents :: a -> InputSource -> m [EventMask]
windowGetSourceEvents a
window InputSource
source = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
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 source' :: CUInt
source' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (InputSource -> Int) -> InputSource -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. InputSource -> Int
forall a. Enum a => a -> Int
fromEnum) InputSource
source
    CUInt
result <- Ptr Window -> CUInt -> IO CUInt
gdk_window_get_source_events Ptr Window
window' CUInt
source'
    let result' :: [EventMask]
result' = CUInt -> [EventMask]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    [EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetSourceEventsMethodInfo
instance (signature ~ (Gdk.Enums.InputSource -> m [Gdk.Flags.EventMask]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetSourceEventsMethodInfo a signature where
    overloadedMethod = windowGetSourceEvents

#endif

-- method Window::get_state
-- 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 = "WindowState" })
-- throws : False
-- Skip return : False

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

-- | Gets the bitwise OR of the currently active window state flags,
-- from the t'GI.Gdk.Flags.WindowState' enumeration.
windowGetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m [Gdk.Flags.WindowState]
    -- ^ __Returns:__ window state bitfield
windowGetState :: a -> m [WindowState]
windowGetState a
window = IO [WindowState] -> m [WindowState]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [WindowState] -> m [WindowState])
-> IO [WindowState] -> m [WindowState]
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
    CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_state Ptr Window
window'
    let result' :: [WindowState]
result' = CUInt -> [WindowState]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    [WindowState] -> IO [WindowState]
forall (m :: * -> *) a. Monad m => a -> m a
return [WindowState]
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetStateMethodInfo
instance (signature ~ (m [Gdk.Flags.WindowState]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetStateMethodInfo a signature where
    overloadedMethod = windowGetState

#endif

-- method Window::get_support_multidevice
-- 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_support_multidevice" gdk_window_get_support_multidevice :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Returns 'P.True' if the window is aware of the existence of multiple
-- devices.
-- 
-- /Since: 3.0/
windowGetSupportMultidevice ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the window handles multidevice features.
windowGetSupportMultidevice :: a -> m Bool
windowGetSupportMultidevice 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_support_multidevice 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 WindowGetSupportMultideviceMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetSupportMultideviceMethodInfo a signature where
    overloadedMethod = windowGetSupportMultidevice

#endif

-- method Window::get_toplevel
-- 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 = "Window" })
-- throws : False
-- Skip return : False

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

-- | Gets the toplevel window that’s an ancestor of /@window@/.
-- 
-- Any window type but 'GI.Gdk.Enums.WindowTypeChild' is considered a
-- toplevel window, as is a 'GI.Gdk.Enums.WindowTypeChild' window that
-- has a root window as parent.
-- 
-- Note that you should use 'GI.Gdk.Objects.Window.windowGetEffectiveToplevel' when
-- you want to get to a window’s toplevel as seen on screen, because
-- 'GI.Gdk.Objects.Window.windowGetToplevel' will most likely not do what you expect
-- if there are offscreen windows in the hierarchy.
windowGetToplevel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Window
    -- ^ __Returns:__ the toplevel window containing /@window@/
windowGetToplevel :: a -> m Window
windowGetToplevel 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 Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_toplevel Ptr Window
window'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetToplevel" 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
newObject ManagedPtr Window -> Window
Window) 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 WindowGetToplevelMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetToplevelMethodInfo a signature where
    overloadedMethod = windowGetToplevel

#endif

-- method Window::get_type_hint
-- 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
--               (TInterface Name { namespace = "Gdk" , name = "WindowTypeHint" })
-- throws : False
-- Skip return : False

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

-- | This function returns the type hint set for a window.
-- 
-- /Since: 2.10/
windowGetTypeHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: A toplevel t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.Enums.WindowTypeHint
    -- ^ __Returns:__ The type hint set for /@window@/
windowGetTypeHint :: a -> m WindowTypeHint
windowGetTypeHint a
window = IO WindowTypeHint -> m WindowTypeHint
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WindowTypeHint -> m WindowTypeHint)
-> IO WindowTypeHint -> m WindowTypeHint
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
    CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_type_hint Ptr Window
window'
    let result' :: WindowTypeHint
result' = (Int -> WindowTypeHint
forall a. Enum a => Int -> a
toEnum (Int -> WindowTypeHint)
-> (CUInt -> Int) -> CUInt -> WindowTypeHint
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    WindowTypeHint -> IO WindowTypeHint
forall (m :: * -> *) a. Monad m => a -> m a
return WindowTypeHint
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetTypeHintMethodInfo
instance (signature ~ (m Gdk.Enums.WindowTypeHint), MonadIO m, IsWindow a) => O.MethodInfo WindowGetTypeHintMethodInfo a signature where
    overloadedMethod = windowGetTypeHint

#endif

-- method Window::get_update_area
-- 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_update_area" gdk_window_get_update_area :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr Cairo.Region.Region)

-- | Transfers ownership of the update area from /@window@/ to the caller
-- of the function. That is, after calling this function, /@window@/ will
-- no longer have an invalid\/dirty region; the update area is removed
-- from /@window@/ and handed to you. If a window has no update area,
-- 'GI.Gdk.Objects.Window.windowGetUpdateArea' returns 'P.Nothing'. You are responsible for
-- calling @/cairo_region_destroy()/@ on the returned region if it’s non-'P.Nothing'.
windowGetUpdateArea ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Cairo.Region.Region
    -- ^ __Returns:__ the update area for /@window@/
windowGetUpdateArea :: a -> m Region
windowGetUpdateArea 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_update_area Ptr Window
window'
    Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetUpdateArea" 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 WindowGetUpdateAreaMethodInfo
instance (signature ~ (m Cairo.Region.Region), MonadIO m, IsWindow a) => O.MethodInfo WindowGetUpdateAreaMethodInfo a signature where
    overloadedMethod = windowGetUpdateArea

#endif

-- method Window::get_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 = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for user data"
--                 , 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_get_user_data" gdk_window_get_user_data :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr (Ptr ()) ->                         -- data : TBasicType TPtr
    IO ()

-- | Retrieves the user data for /@window@/, which is normally the widget
-- that /@window@/ belongs to. See 'GI.Gdk.Objects.Window.windowSetUserData'.
windowGetUserData ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ((Ptr ()))
windowGetUserData :: a -> m (Ptr ())
windowGetUserData a
window = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
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 (Ptr ())
data_ <- IO (Ptr (Ptr ()))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr ()))
    Ptr Window -> Ptr (Ptr ()) -> IO ()
gdk_window_get_user_data Ptr Window
window' Ptr (Ptr ())
data_
    Ptr ()
data_' <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ())
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr (Ptr ()) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ())
data_
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
data_'

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

#endif

-- method Window::get_visible_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_visible_region" gdk_window_get_visible_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr Cairo.Region.Region)

-- | Computes the region of the /@window@/ that is potentially visible.
-- This does not necessarily take into account if the window is
-- obscured by other windows, but no area outside of this region
-- is visible.
windowGetVisibleRegion ::
    (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.
windowGetVisibleRegion :: a -> m Region
windowGetVisibleRegion 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_visible_region Ptr Window
window'
    Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetVisibleRegion" 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 WindowGetVisibleRegionMethodInfo
instance (signature ~ (m Cairo.Region.Region), MonadIO m, IsWindow a) => O.MethodInfo WindowGetVisibleRegionMethodInfo a signature where
    overloadedMethod = windowGetVisibleRegion

#endif

-- method Window::get_visual
-- 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 = "Visual" })
-- throws : False
-- Skip return : False

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

-- | Gets the t'GI.Gdk.Objects.Visual.Visual' describing the pixel format of /@window@/.
-- 
-- /Since: 2.24/
windowGetVisual ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.Visual.Visual
    -- ^ __Returns:__ a t'GI.Gdk.Objects.Visual.Visual'
windowGetVisual :: a -> m Visual
windowGetVisual a
window = IO Visual -> m Visual
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Visual -> m Visual) -> IO Visual -> m Visual
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 Visual
result <- Ptr Window -> IO (Ptr Visual)
gdk_window_get_visual Ptr Window
window'
    Text -> Ptr Visual -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetVisual" Ptr Visual
result
    Visual
result' <- ((ManagedPtr Visual -> Visual) -> Ptr Visual -> IO Visual
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Visual -> Visual
Gdk.Visual.Visual) Ptr Visual
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Visual -> IO Visual
forall (m :: * -> *) a. Monad m => a -> m a
return Visual
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetVisualMethodInfo
instance (signature ~ (m Gdk.Visual.Visual), MonadIO m, IsWindow a) => O.MethodInfo WindowGetVisualMethodInfo a signature where
    overloadedMethod = windowGetVisual

#endif

-- method Window::get_width
-- 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 TInt)
-- throws : False
-- Skip return : False

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

-- | Returns the width of the given /@window@/.
-- 
-- On the X11 platform the returned size is the size reported in the
-- most-recently-processed configure event, rather than the current
-- size on the X server.
-- 
-- /Since: 2.24/
windowGetWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Int32
    -- ^ __Returns:__ The width of /@window@/
windowGetWidth :: a -> m Int32
windowGetWidth a
window = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
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
    Int32
result <- Ptr Window -> IO Int32
gdk_window_get_width Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

#endif

-- method Window::get_window_type
-- 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 = "WindowType" })
-- throws : False
-- Skip return : False

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

-- | Gets the type of the window. See t'GI.Gdk.Enums.WindowType'.
windowGetWindowType ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m Gdk.Enums.WindowType
    -- ^ __Returns:__ type of window
windowGetWindowType :: a -> m WindowType
windowGetWindowType a
window = IO WindowType -> m WindowType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WindowType -> m WindowType) -> IO WindowType -> m WindowType
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
    CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_window_type Ptr Window
window'
    let result' :: WindowType
result' = (Int -> WindowType
forall a. Enum a => Int -> a
toEnum (Int -> WindowType) -> (CUInt -> Int) -> CUInt -> WindowType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    WindowType -> IO WindowType
forall (m :: * -> *) a. Monad m => a -> m a
return WindowType
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetWindowTypeMethodInfo
instance (signature ~ (m Gdk.Enums.WindowType), MonadIO m, IsWindow a) => O.MethodInfo WindowGetWindowTypeMethodInfo a signature where
    overloadedMethod = windowGetWindowType

#endif

-- method Window::has_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_has_native" gdk_window_has_native :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Checks whether the window has a native window or not. Note that
-- you can use 'GI.Gdk.Objects.Window.windowEnsureNative' if a native window is needed.
-- 
-- /Since: 2.22/
windowHasNative ::
    (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.
windowHasNative :: a -> m Bool
windowHasNative 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_has_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 WindowHasNativeMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowHasNativeMethodInfo a signature where
    overloadedMethod = windowHasNative

#endif

-- method Window::hide
-- 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_hide" gdk_window_hide :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | For toplevel windows, withdraws them, so they will no longer be
-- known to the window manager; for all windows, unmaps them, so
-- they won’t be displayed. Normally done automatically as
-- part of @/gtk_widget_hide()/@.
windowHide ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowHide :: a -> m ()
windowHide 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_hide 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 WindowHideMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowHideMethodInfo a signature where
    overloadedMethod = windowHide

#endif

-- method Window::iconify
-- 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_iconify" gdk_window_iconify :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Asks to iconify (minimize) /@window@/. The window manager may choose
-- to ignore the request, but normally will honor it. Using
-- @/gtk_window_iconify()/@ is preferred, if you have a @/GtkWindow/@ widget.
-- 
-- This function only makes sense when /@window@/ is a toplevel window.
windowIconify ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowIconify :: a -> m ()
windowIconify 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_iconify 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 WindowIconifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowIconifyMethodInfo a signature where
    overloadedMethod = windowIconify

#endif

-- method Window::input_shape_combine_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 = "shape_region"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Region" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "region of window to be non-transparent"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X position of @shape_region in @window coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y position of @shape_region in @window coordinates"
--                 , 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_input_shape_combine_region" gdk_window_input_shape_combine_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- shape_region : TInterface (Name {namespace = "cairo", name = "Region"})
    Int32 ->                                -- offset_x : TBasicType TInt
    Int32 ->                                -- offset_y : TBasicType TInt
    IO ()

-- | Like 'GI.Gdk.Objects.Window.windowShapeCombineRegion', but the shape applies
-- only to event handling. Mouse events which happen while
-- the pointer position corresponds to an unset bit in the
-- mask will be passed on the window below /@window@/.
-- 
-- An input shape is typically used with RGBA windows.
-- The alpha channel of the window defines which pixels are
-- invisible and allows for nicely antialiased borders,
-- and the input shape controls where the window is
-- “clickable”.
-- 
-- On the X11 platform, this requires version 1.1 of the
-- shape extension.
-- 
-- On the Win32 platform, this functionality is not present and the
-- function does nothing.
-- 
-- /Since: 2.10/
windowInputShapeCombineRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Region.Region
    -- ^ /@shapeRegion@/: region of window to be non-transparent
    -> Int32
    -- ^ /@offsetX@/: X position of /@shapeRegion@/ in /@window@/ coordinates
    -> Int32
    -- ^ /@offsetY@/: Y position of /@shapeRegion@/ in /@window@/ coordinates
    -> m ()
windowInputShapeCombineRegion :: a -> Region -> Int32 -> Int32 -> m ()
windowInputShapeCombineRegion a
window Region
shapeRegion Int32
offsetX Int32
offsetY = 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
shapeRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
shapeRegion
    Ptr Window -> Ptr Region -> Int32 -> Int32 -> IO ()
gdk_window_input_shape_combine_region Ptr Window
window' Ptr Region
shapeRegion' Int32
offsetX Int32
offsetY
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
shapeRegion
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::invalidate_maybe_recurse
-- 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_t" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child_func"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowChildFunc" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "function to use to decide if to\n    recurse to a child, %NULL means never recurse."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeCall
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data passed to @child_func"
--                 , 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_invalidate_maybe_recurse" gdk_window_invalidate_maybe_recurse :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    FunPtr Gdk.Callbacks.C_WindowChildFunc -> -- child_func : TInterface (Name {namespace = "Gdk", name = "WindowChildFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Adds /@region@/ to the update area for /@window@/. The update area is the
-- region that needs to be redrawn, or “dirty region.” The call
-- 'GI.Gdk.Objects.Window.windowProcessUpdates' sends one or more expose events to the
-- window, which together cover the entire update area. An
-- application would normally redraw the contents of /@window@/ in
-- response to those expose events.
-- 
-- GDK will call 'GI.Gdk.Objects.Window.windowProcessAllUpdates' on your behalf
-- whenever your program returns to the main loop and becomes idle, so
-- normally there’s no need to do that manually, you just need to
-- invalidate regions that you know should be redrawn.
-- 
-- The /@childFunc@/ parameter controls whether the region of
-- each child window that intersects /@region@/ will also be invalidated.
-- Only children for which /@childFunc@/ returns @/TRUE/@ will have the area
-- invalidated.
windowInvalidateMaybeRecurse ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Region.Region
    -- ^ /@region@/: a t'GI.Cairo.Structs.Region.Region'
    -> Maybe (Gdk.Callbacks.WindowChildFunc)
    -- ^ /@childFunc@/: function to use to decide if to
    --     recurse to a child, 'P.Nothing' means never recurse.
    -> m ()
windowInvalidateMaybeRecurse :: a -> Region -> Maybe WindowChildFunc -> m ()
windowInvalidateMaybeRecurse a
window Region
region Maybe WindowChildFunc
childFunc = 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
    FunPtr C_WindowChildFunc
maybeChildFunc <- case Maybe WindowChildFunc
childFunc of
        Maybe WindowChildFunc
Nothing -> FunPtr C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_WindowChildFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just WindowChildFunc
jChildFunc -> do
            FunPtr C_WindowChildFunc
jChildFunc' <- C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc)
Gdk.Callbacks.mk_WindowChildFunc (Maybe (Ptr (FunPtr C_WindowChildFunc))
-> WindowChildFunc_WithClosures -> C_WindowChildFunc
Gdk.Callbacks.wrap_WindowChildFunc Maybe (Ptr (FunPtr C_WindowChildFunc))
forall a. Maybe a
Nothing (WindowChildFunc -> WindowChildFunc_WithClosures
Gdk.Callbacks.drop_closures_WindowChildFunc WindowChildFunc
jChildFunc))
            FunPtr C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_WindowChildFunc
jChildFunc'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Window
-> Ptr Region -> FunPtr C_WindowChildFunc -> Ptr () -> IO ()
gdk_window_invalidate_maybe_recurse Ptr Window
window' Ptr Region
region' FunPtr C_WindowChildFunc
maybeChildFunc Ptr ()
forall a. Ptr a
userData
    Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_WindowChildFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_WindowChildFunc
maybeChildFunc
    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 WindowInvalidateMaybeRecurseMethodInfo
instance (signature ~ (Cairo.Region.Region -> Maybe (Gdk.Callbacks.WindowChildFunc) -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowInvalidateMaybeRecurseMethodInfo a signature where
    overloadedMethod = windowInvalidateMaybeRecurse

#endif

-- method Window::invalidate_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 = "rect"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "rectangle to invalidate or %NULL to invalidate the whole\n     window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "invalidate_children"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to also invalidate child windows"
--                 , 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_invalidate_rect" gdk_window_invalidate_rect :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Rectangle.Rectangle ->          -- rect : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    CInt ->                                 -- invalidate_children : TBasicType TBoolean
    IO ()

-- | A convenience wrapper around 'GI.Gdk.Objects.Window.windowInvalidateRegion' which
-- invalidates a rectangular region. See
-- 'GI.Gdk.Objects.Window.windowInvalidateRegion' for details.
windowInvalidateRect ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Maybe (Gdk.Rectangle.Rectangle)
    -- ^ /@rect@/: rectangle to invalidate or 'P.Nothing' to invalidate the whole
    --      window
    -> Bool
    -- ^ /@invalidateChildren@/: whether to also invalidate child windows
    -> m ()
windowInvalidateRect :: a -> Maybe Rectangle -> Bool -> m ()
windowInvalidateRect a
window Maybe Rectangle
rect Bool
invalidateChildren = 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
maybeRect <- case Maybe Rectangle
rect of
        Maybe Rectangle
Nothing -> Ptr Rectangle -> IO (Ptr Rectangle)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Rectangle
forall a. Ptr a
nullPtr
        Just Rectangle
jRect -> do
            Ptr Rectangle
jRect' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
jRect
            Ptr Rectangle -> IO (Ptr Rectangle)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Rectangle
jRect'
    let invalidateChildren' :: CInt
invalidateChildren' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
invalidateChildren
    Ptr Window -> Ptr Rectangle -> CInt -> IO ()
gdk_window_invalidate_rect Ptr Window
window' Ptr Rectangle
maybeRect CInt
invalidateChildren'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe Rectangle -> (Rectangle -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Rectangle
rect Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::invalidate_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 "a #cairo_region_t" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "invalidate_children"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to also invalidate child windows"
--                 , 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_invalidate_region" gdk_window_invalidate_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    CInt ->                                 -- invalidate_children : TBasicType TBoolean
    IO ()

-- | Adds /@region@/ to the update area for /@window@/. The update area is the
-- region that needs to be redrawn, or “dirty region.” The call
-- 'GI.Gdk.Objects.Window.windowProcessUpdates' sends one or more expose events to the
-- window, which together cover the entire update area. An
-- application would normally redraw the contents of /@window@/ in
-- response to those expose events.
-- 
-- GDK will call 'GI.Gdk.Objects.Window.windowProcessAllUpdates' on your behalf
-- whenever your program returns to the main loop and becomes idle, so
-- normally there’s no need to do that manually, you just need to
-- invalidate regions that you know should be redrawn.
-- 
-- The /@invalidateChildren@/ parameter controls whether the region of
-- each child window that intersects /@region@/ will also be invalidated.
-- If 'P.False', then the update area for child windows will remain
-- unaffected. See gdk_window_invalidate_maybe_recurse if you need
-- fine grained control over which children are invalidated.
windowInvalidateRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Region.Region
    -- ^ /@region@/: a t'GI.Cairo.Structs.Region.Region'
    -> Bool
    -- ^ /@invalidateChildren@/: 'P.True' to also invalidate child windows
    -> m ()
windowInvalidateRegion :: a -> Region -> Bool -> m ()
windowInvalidateRegion a
window Region
region Bool
invalidateChildren = 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
    let invalidateChildren' :: CInt
invalidateChildren' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
invalidateChildren
    Ptr Window -> Ptr Region -> CInt -> IO ()
gdk_window_invalidate_region Ptr Window
window' Ptr Region
region' CInt
invalidateChildren'
    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 WindowInvalidateRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowInvalidateRegionMethodInfo a signature where
    overloadedMethod = windowInvalidateRegion

#endif

-- method Window::is_destroyed
-- 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_is_destroyed" gdk_window_is_destroyed :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Check to see if a window is destroyed..
-- 
-- /Since: 2.18/
windowIsDestroyed ::
    (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 destroyed
windowIsDestroyed :: a -> m Bool
windowIsDestroyed 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_is_destroyed 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 WindowIsDestroyedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsDestroyedMethodInfo a signature where
    overloadedMethod = windowIsDestroyed

#endif

-- method Window::is_input_only
-- 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_is_input_only" gdk_window_is_input_only :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Determines whether or not the window is an input only window.
-- 
-- /Since: 2.22/
windowIsInputOnly ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is input only
windowIsInputOnly :: a -> m Bool
windowIsInputOnly 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_is_input_only 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 WindowIsInputOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsInputOnlyMethodInfo a signature where
    overloadedMethod = windowIsInputOnly

#endif

-- method Window::is_shaped
-- 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_is_shaped" gdk_window_is_shaped :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Determines whether or not the window is shaped.
-- 
-- /Since: 2.22/
windowIsShaped ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is shaped
windowIsShaped :: a -> m Bool
windowIsShaped 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_is_shaped 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 WindowIsShapedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsShapedMethodInfo a signature where
    overloadedMethod = windowIsShaped

#endif

-- method Window::is_viewable
-- 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_is_viewable" gdk_window_is_viewable :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Check if the window and all ancestors of the window are
-- mapped. (This is not necessarily \"viewable\" in the X sense, since
-- we only check as far as we have GDK window parents, not to the root
-- window.)
windowIsViewable ::
    (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 viewable
windowIsViewable :: a -> m Bool
windowIsViewable 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_is_viewable 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 WindowIsViewableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsViewableMethodInfo a signature where
    overloadedMethod = windowIsViewable

#endif

-- method Window::is_visible
-- 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_is_visible" gdk_window_is_visible :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO CInt

-- | Checks whether the window has been mapped (with 'GI.Gdk.Objects.Window.windowShow' or
-- 'GI.Gdk.Objects.Window.windowShowUnraised').
windowIsVisible ::
    (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 mapped
windowIsVisible :: a -> m Bool
windowIsVisible 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_is_visible 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 WindowIsVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsVisibleMethodInfo a signature where
    overloadedMethod = windowIsVisible

#endif

-- method Window::lower
-- 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_lower" gdk_window_lower :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Lowers /@window@/ to the bottom of the Z-order (stacking order), so that
-- other windows with the same parent window appear above /@window@/.
-- This is true whether or not the other windows are visible.
-- 
-- If /@window@/ is a toplevel, the window manager may choose to deny the
-- request to move the window in the Z-order, 'GI.Gdk.Objects.Window.windowLower' only
-- requests the restack, does not guarantee it.
-- 
-- Note that 'GI.Gdk.Objects.Window.windowShow' raises the window again, so don’t call this
-- function before 'GI.Gdk.Objects.Window.windowShow'. (Try 'GI.Gdk.Objects.Window.windowShowUnraised'.)
windowLower ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowLower :: a -> m ()
windowLower 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_lower 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 WindowLowerMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowLowerMethodInfo a signature where
    overloadedMethod = windowLower

#endif

-- method Window::mark_paint_from_clip
-- 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 = "cr"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Context" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #cairo_t" , 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_mark_paint_from_clip" gdk_window_mark_paint_from_clip :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Context.Context ->            -- cr : TInterface (Name {namespace = "cairo", name = "Context"})
    IO ()

-- | If you call this during a paint (e.g. between 'GI.Gdk.Objects.Window.windowBeginPaintRegion'
-- and 'GI.Gdk.Objects.Window.windowEndPaint' then GDK will mark the current clip region of the
-- window as being drawn. This is required when mixing GL rendering via
-- 'GI.Gdk.Functions.cairoDrawFromGl' and cairo rendering, as otherwise GDK has no way
-- of knowing when something paints over the GL-drawn regions.
-- 
-- This is typically called automatically by GTK+ and you don\'t need
-- to care about this.
-- 
-- /Since: 3.16/
windowMarkPaintFromClip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Context.Context
    -- ^ /@cr@/: a t'GI.Cairo.Structs.Context.Context'
    -> m ()
windowMarkPaintFromClip :: a -> Context -> m ()
windowMarkPaintFromClip a
window Context
cr = 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 Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
    Ptr Window -> Ptr Context -> IO ()
gdk_window_mark_paint_from_clip Ptr Window
window' Ptr Context
cr'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::maximize
-- 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_maximize" gdk_window_maximize :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Maximizes the window. If the window was already maximized, then
-- this function does nothing.
-- 
-- On X11, asks the window manager to maximize /@window@/, 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
-- “maximized”; so you can’t rely on the maximization actually
-- happening. But it will happen with most standard window managers,
-- and GDK makes a best effort to get it to happen.
-- 
-- On Windows, reliably maximizes the window.
windowMaximize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowMaximize :: a -> m ()
windowMaximize 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_maximize 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 WindowMaximizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMaximizeMethodInfo a signature where
    overloadedMethod = windowMaximize

#endif

-- method Window::merge_child_input_shapes
-- 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_merge_child_input_shapes" gdk_window_merge_child_input_shapes :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Merges the input shape masks for any child windows into the
-- input shape mask for /@window@/. i.e. the union of all input masks
-- for /@window@/ and its children will become the new input mask
-- for /@window@/. See 'GI.Gdk.Objects.Window.windowInputShapeCombineRegion'.
-- 
-- This function is distinct from 'GI.Gdk.Objects.Window.windowSetChildInputShapes'
-- because it includes /@window@/’s input shape mask in the set of
-- shapes to be merged.
-- 
-- /Since: 2.10/
windowMergeChildInputShapes ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowMergeChildInputShapes :: a -> m ()
windowMergeChildInputShapes 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_merge_child_input_shapes 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 WindowMergeChildInputShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMergeChildInputShapesMethodInfo a signature where
    overloadedMethod = windowMergeChildInputShapes

#endif

-- method Window::merge_child_shapes
-- 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_merge_child_shapes" gdk_window_merge_child_shapes :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Merges the shape masks for any child windows into the
-- shape mask for /@window@/. i.e. the union of all masks
-- for /@window@/ and its children will become the new mask
-- for /@window@/. See 'GI.Gdk.Objects.Window.windowShapeCombineRegion'.
-- 
-- This function is distinct from 'GI.Gdk.Objects.Window.windowSetChildShapes'
-- because it includes /@window@/’s shape mask in the set of shapes to
-- be merged.
windowMergeChildShapes ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowMergeChildShapes :: a -> m ()
windowMergeChildShapes 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_merge_child_shapes 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 WindowMergeChildShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMergeChildShapesMethodInfo a signature where
    overloadedMethod = windowMergeChildShapes

#endif

-- method Window::move
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate relative to window\8217s parent"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate relative to window\8217s parent"
--                 , 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_move" gdk_window_move :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

-- | Repositions a window relative to its parent window.
-- For toplevel windows, window managers may ignore or modify the move;
-- you should probably use @/gtk_window_move()/@ on a @/GtkWindow/@ widget
-- anyway, instead of using GDK functions. For child windows,
-- the move will reliably succeed.
-- 
-- If you’re also planning to resize the window, use 'GI.Gdk.Objects.Window.windowMoveResize'
-- to both move and resize simultaneously, for a nicer visual effect.
windowMove ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@x@/: X coordinate relative to window’s parent
    -> Int32
    -- ^ /@y@/: Y coordinate relative to window’s parent
    -> m ()
windowMove :: a -> Int32 -> Int32 -> m ()
windowMove a
window Int32
x Int32
y = 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 -> IO ()
gdk_window_move Ptr Window
window' Int32
x Int32
y
    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 WindowMoveMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveMethodInfo a signature where
    overloadedMethod = windowMove

#endif

-- method Window::move_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 "The #cairo_region_t to move"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dx"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to move in the X direction"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dy"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to move in the Y direction"
--                 , 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_move_region" gdk_window_move_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    Int32 ->                                -- dx : TBasicType TInt
    Int32 ->                                -- dy : TBasicType TInt
    IO ()

-- | Move the part of /@window@/ indicated by /@region@/ by /@dy@/ pixels in the Y
-- direction and /@dx@/ pixels in the X direction. The portions of /@region@/
-- that not covered by the new position of /@region@/ are invalidated.
-- 
-- Child windows are not moved.
-- 
-- /Since: 2.8/
windowMoveRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Cairo.Region.Region
    -- ^ /@region@/: The t'GI.Cairo.Structs.Region.Region' to move
    -> Int32
    -- ^ /@dx@/: Amount to move in the X direction
    -> Int32
    -- ^ /@dy@/: Amount to move in the Y direction
    -> m ()
windowMoveRegion :: a -> Region -> Int32 -> Int32 -> m ()
windowMoveRegion a
window Region
region Int32
dx Int32
dy = 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 -> Int32 -> Int32 -> IO ()
gdk_window_move_region Ptr Window
window' Ptr Region
region' Int32
dx Int32
dy
    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 WindowMoveRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveRegionMethodInfo a signature where
    overloadedMethod = windowMoveRegion

#endif

-- method Window::move_resize
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "new X position relative to window\8217s parent"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "new Y position relative to window\8217s parent"
--                 , 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 "new width" , 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 "new height" , 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_move_resize" gdk_window_move_resize :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Equivalent to calling 'GI.Gdk.Objects.Window.windowMove' and 'GI.Gdk.Objects.Window.windowResize',
-- except that both operations are performed at once, avoiding strange
-- visual effects. (i.e. the user may be able to see the window first
-- move, then resize, if you don’t use 'GI.Gdk.Objects.Window.windowMoveResize'.)
windowMoveResize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@x@/: new X position relative to window’s parent
    -> Int32
    -- ^ /@y@/: new Y position relative to window’s parent
    -> Int32
    -- ^ /@width@/: new width
    -> Int32
    -- ^ /@height@/: new height
    -> m ()
windowMoveResize :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
windowMoveResize a
window Int32
x Int32
y Int32
width Int32
height = 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 -> Int32 -> IO ()
gdk_window_move_resize Ptr Window
window' Int32
x Int32
y Int32
width Int32
height
    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 WindowMoveResizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveResizeMethodInfo a signature where
    overloadedMethod = windowMoveResize

#endif

-- method Window::move_to_rect
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GdkWindow to move"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rect"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the destination #GdkRectangle to align @window with"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rect_anchor"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Gravity" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the point on @rect to align with @window's anchor point"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "window_anchor"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Gravity" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the point on @window to align with @rect's anchor point"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "anchor_hints"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "AnchorHints" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "positioning hints to use when limited on space"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rect_anchor_dx"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "horizontal offset to shift @window, i.e. @rect's anchor\n                 point"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rect_anchor_dy"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "vertical offset to shift @window, i.e. @rect's anchor point"
--                 , 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_move_to_rect" gdk_window_move_to_rect :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Rectangle.Rectangle ->          -- rect : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    CUInt ->                                -- rect_anchor : TInterface (Name {namespace = "Gdk", name = "Gravity"})
    CUInt ->                                -- window_anchor : TInterface (Name {namespace = "Gdk", name = "Gravity"})
    CUInt ->                                -- anchor_hints : TInterface (Name {namespace = "Gdk", name = "AnchorHints"})
    Int32 ->                                -- rect_anchor_dx : TBasicType TInt
    Int32 ->                                -- rect_anchor_dy : TBasicType TInt
    IO ()

-- | Moves /@window@/ to /@rect@/, aligning their anchor points.
-- 
-- /@rect@/ is relative to the top-left corner of the window that /@window@/ is
-- transient for. /@rectAnchor@/ and /@windowAnchor@/ determine anchor points on
-- /@rect@/ and /@window@/ to pin together. /@rect@/\'s anchor point can optionally be
-- offset by /@rectAnchorDx@/ and /@rectAnchorDy@/, which is equivalent to
-- offsetting the position of /@window@/.
-- 
-- /@anchorHints@/ determines how /@window@/ will be moved if the anchor points cause
-- it to move off-screen. For example, 'GI.Gdk.Flags.AnchorHintsFlipX' will replace
-- 'GI.Gdk.Enums.GravityNorthWest' with 'GI.Gdk.Enums.GravityNorthEast' and vice versa if
-- /@window@/ extends beyond the left or right edges of the monitor.
-- 
-- Connect to the [movedToRect]("GI.Gdk.Objects.Window#g:signal:movedToRect") signal to find out how it was
-- actually positioned.
-- 
-- /Since: 3.24/
windowMoveToRect ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: the t'GI.Gdk.Objects.Window.Window' to move
    -> Gdk.Rectangle.Rectangle
    -- ^ /@rect@/: the destination t'GI.Gdk.Structs.Rectangle.Rectangle' to align /@window@/ with
    -> Gdk.Enums.Gravity
    -- ^ /@rectAnchor@/: the point on /@rect@/ to align with /@window@/\'s anchor point
    -> Gdk.Enums.Gravity
    -- ^ /@windowAnchor@/: the point on /@window@/ to align with /@rect@/\'s anchor point
    -> [Gdk.Flags.AnchorHints]
    -- ^ /@anchorHints@/: positioning hints to use when limited on space
    -> Int32
    -- ^ /@rectAnchorDx@/: horizontal offset to shift /@window@/, i.e. /@rect@/\'s anchor
    --                  point
    -> Int32
    -- ^ /@rectAnchorDy@/: vertical offset to shift /@window@/, i.e. /@rect@/\'s anchor point
    -> m ()
windowMoveToRect :: a
-> Rectangle
-> Gravity
-> Gravity
-> [AnchorHints]
-> Int32
-> Int32
-> m ()
windowMoveToRect a
window Rectangle
rect Gravity
rectAnchor Gravity
windowAnchor [AnchorHints]
anchorHints Int32
rectAnchorDx Int32
rectAnchorDy = 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
rect' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rect
    let rectAnchor' :: CUInt
rectAnchor' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Gravity -> Int) -> Gravity -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Gravity -> Int
forall a. Enum a => a -> Int
fromEnum) Gravity
rectAnchor
    let windowAnchor' :: CUInt
windowAnchor' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Gravity -> Int) -> Gravity -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Gravity -> Int
forall a. Enum a => a -> Int
fromEnum) Gravity
windowAnchor
    let anchorHints' :: CUInt
anchorHints' = [AnchorHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AnchorHints]
anchorHints
    Ptr Window
-> Ptr Rectangle
-> CUInt
-> CUInt
-> CUInt
-> Int32
-> Int32
-> IO ()
gdk_window_move_to_rect Ptr Window
window' Ptr Rectangle
rect' CUInt
rectAnchor' CUInt
windowAnchor' CUInt
anchorHints' Int32
rectAnchorDx Int32
rectAnchorDy
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rect
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowMoveToRectMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> Gdk.Enums.Gravity -> Gdk.Enums.Gravity -> [Gdk.Flags.AnchorHints] -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveToRectMethodInfo a signature where
    overloadedMethod = windowMoveToRect

#endif

-- method Window::peek_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_peek_children" gdk_window_peek_children :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO (Ptr (GList (Ptr Window)))

-- | Like 'GI.Gdk.Objects.Window.windowGetChildren', but does not copy the list of
-- children, so the list does not need to be freed.
windowPeekChildren ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m [Window]
    -- ^ __Returns:__ 
    --     a reference to the list of child windows in /@window@/
windowPeekChildren :: a -> m [Window]
windowPeekChildren 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_peek_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'
    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 WindowPeekChildrenMethodInfo
instance (signature ~ (m [Window]), MonadIO m, IsWindow a) => O.MethodInfo WindowPeekChildrenMethodInfo a signature where
    overloadedMethod = windowPeekChildren

#endif

-- method Window::process_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
--           }
--       , Arg
--           { argCName = "update_children"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether to also process updates for child windows"
--                 , 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_process_updates" gdk_window_process_updates :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- update_children : TBasicType TBoolean
    IO ()

{-# DEPRECATED windowProcessUpdates ["(Since version 3.22)"] #-}
-- | Sends one or more expose events to /@window@/. The areas in each
-- expose event will cover the entire update area for the window (see
-- 'GI.Gdk.Objects.Window.windowInvalidateRegion' for details). Normally GDK calls
-- 'GI.Gdk.Objects.Window.windowProcessAllUpdates' on your behalf, so there’s no
-- need to call this function unless you want to force expose events
-- to be delivered immediately and synchronously (vs. the usual
-- case, where GDK delivers them in an idle handler). Occasionally
-- this is useful to produce nicer scrolling behavior, for example.
windowProcessUpdates ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@updateChildren@/: whether to also process updates for child windows
    -> m ()
windowProcessUpdates :: a -> Bool -> m ()
windowProcessUpdates a
window Bool
updateChildren = 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 updateChildren' :: CInt
updateChildren' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
updateChildren
    Ptr Window -> CInt -> IO ()
gdk_window_process_updates Ptr Window
window' CInt
updateChildren'
    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 WindowProcessUpdatesMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowProcessUpdatesMethodInfo a signature where
    overloadedMethod = windowProcessUpdates

#endif

-- method Window::raise
-- 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_raise" gdk_window_raise :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Raises /@window@/ to the top of the Z-order (stacking order), so that
-- other windows with the same parent window appear below /@window@/.
-- This is true whether or not the windows are visible.
-- 
-- If /@window@/ is a toplevel, the window manager may choose to deny the
-- request to move the window in the Z-order, 'GI.Gdk.Objects.Window.windowRaise' only
-- requests the restack, does not guarantee it.
windowRaise ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowRaise :: a -> m ()
windowRaise 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_raise 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 WindowRaiseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowRaiseMethodInfo a signature where
    overloadedMethod = windowRaise

#endif

-- method Window::register_dnd
-- 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_register_dnd" gdk_window_register_dnd :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Registers a window as a potential drop destination.
windowRegisterDnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> m ()
windowRegisterDnd :: a -> m ()
windowRegisterDnd 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_register_dnd 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 WindowRegisterDndMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowRegisterDndMethodInfo a signature where
    overloadedMethod = windowRegisterDnd

#endif

-- method Window::reparent
-- 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 = "new_parent"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new parent to move @window into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X location inside the new parent"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y location inside the new parent"
--                 , 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_reparent" gdk_window_reparent :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Window ->                           -- new_parent : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

-- | Reparents /@window@/ into the given /@newParent@/. The window being
-- reparented will be unmapped as a side effect.
windowReparent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> b
    -- ^ /@newParent@/: new parent to move /@window@/ into
    -> Int32
    -- ^ /@x@/: X location inside the new parent
    -> Int32
    -- ^ /@y@/: Y location inside the new parent
    -> m ()
windowReparent :: a -> b -> Int32 -> Int32 -> m ()
windowReparent a
window b
newParent Int32
x Int32
y = 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
newParent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
newParent
    Ptr Window -> Ptr Window -> Int32 -> Int32 -> IO ()
gdk_window_reparent Ptr Window
window' Ptr Window
newParent' Int32
x Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
newParent
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::resize
-- 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 = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new width of the window"
--                 , 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 "new height of the window"
--                 , 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_resize" gdk_window_resize :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Resizes /@window@/; for toplevel windows, asks the window manager to resize
-- the window. The window manager may not allow the resize. When using GTK+,
-- use @/gtk_window_resize()/@ instead of this low-level GDK function.
-- 
-- Windows may not be resized below 1x1.
-- 
-- If you’re also planning to move the window, use 'GI.Gdk.Objects.Window.windowMoveResize'
-- to both move and resize simultaneously, for a nicer visual effect.
windowResize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@width@/: new width of the window
    -> Int32
    -- ^ /@height@/: new height of the window
    -> m ()
windowResize :: a -> Int32 -> Int32 -> m ()
windowResize a
window Int32
width Int32
height = 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 -> IO ()
gdk_window_resize Ptr Window
window' Int32
width Int32
height
    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 WindowResizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowResizeMethodInfo a signature where
    overloadedMethod = windowResize

#endif

-- method Window::restack
-- 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 = "sibling"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GdkWindow that is a sibling of @window, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "above"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a boolean" , 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_restack" gdk_window_restack :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Window ->                           -- sibling : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- above : TBasicType TBoolean
    IO ()

-- | Changes the position of  /@window@/ in the Z-order (stacking order), so that
-- it is above /@sibling@/ (if /@above@/ is 'P.True') or below /@sibling@/ (if /@above@/ is
-- 'P.False').
-- 
-- If /@sibling@/ is 'P.Nothing', then this either raises (if /@above@/ is 'P.True') or
-- lowers the window.
-- 
-- If /@window@/ is a toplevel, the window manager may choose to deny the
-- request to move the window in the Z-order, 'GI.Gdk.Objects.Window.windowRestack' only
-- requests the restack, does not guarantee it.
-- 
-- /Since: 2.18/
windowRestack ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Maybe (b)
    -- ^ /@sibling@/: a t'GI.Gdk.Objects.Window.Window' that is a sibling of /@window@/, or 'P.Nothing'
    -> Bool
    -- ^ /@above@/: a boolean
    -> m ()
windowRestack :: a -> Maybe b -> Bool -> m ()
windowRestack a
window Maybe b
sibling Bool
above = 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
maybeSibling <- case Maybe b
sibling of
        Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
        Just b
jSibling -> do
            Ptr Window
jSibling' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSibling
            Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jSibling'
    let above' :: CInt
above' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
above
    Ptr Window -> Ptr Window -> CInt -> IO ()
gdk_window_restack Ptr Window
window' Ptr Window
maybeSibling CInt
above'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
sibling b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowRestackMethodInfo
instance (signature ~ (Maybe (b) -> Bool -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowRestackMethodInfo a signature where
    overloadedMethod = windowRestack

#endif

-- method Window::scroll
-- 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 = "dx"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scroll in the X direction"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dy"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Amount to scroll in the Y direction"
--                 , 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_scroll" gdk_window_scroll :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- dx : TBasicType TInt
    Int32 ->                                -- dy : TBasicType TInt
    IO ()

-- | Scroll the contents of /@window@/, both pixels and children, by the
-- given amount. /@window@/ itself does not move. Portions of the window
-- that the scroll operation brings in from offscreen areas are
-- invalidated. The invalidated region may be bigger than what would
-- strictly be necessary.
-- 
-- For X11, a minimum area will be invalidated if the window has no
-- subwindows, or if the edges of the window’s parent do not extend
-- beyond the edges of the window. In other cases, a multi-step process
-- is used to scroll the window which may produce temporary visual
-- artifacts and unnecessary invalidations.
windowScroll ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@dx@/: Amount to scroll in the X direction
    -> Int32
    -- ^ /@dy@/: Amount to scroll in the Y direction
    -> m ()
windowScroll :: a -> Int32 -> Int32 -> m ()
windowScroll a
window Int32
dx Int32
dy = 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 -> IO ()
gdk_window_scroll Ptr Window
window' Int32
dx Int32
dy
    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 WindowScrollMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowScrollMethodInfo a signature where
    overloadedMethod = windowScroll

#endif

-- method Window::set_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
--           }
--       , Arg
--           { argCName = "accept_focus"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE if the window should receive input 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_set_accept_focus" gdk_window_set_accept_focus :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- accept_focus : TBasicType TBoolean
    IO ()

-- | Setting /@acceptFocus@/ to 'P.False' hints the desktop environment that the
-- window doesn’t want to receive input focus.
-- 
-- On X, it is the responsibility of the window manager to interpret this
-- hint. ICCCM-compliant window manager usually respect it.
-- 
-- /Since: 2.4/
windowSetAcceptFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@acceptFocus@/: 'P.True' if the window should receive input focus
    -> m ()
windowSetAcceptFocus :: a -> Bool -> m ()
windowSetAcceptFocus a
window Bool
acceptFocus = 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 acceptFocus' :: CInt
acceptFocus' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
acceptFocus
    Ptr Window -> CInt -> IO ()
gdk_window_set_accept_focus Ptr Window
window' CInt
acceptFocus'
    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 WindowSetAcceptFocusMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetAcceptFocusMethodInfo a signature where
    overloadedMethod = windowSetAcceptFocus

#endif

-- method Window::set_background
-- 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 = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkColor" , 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_set_background" gdk_window_set_background :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Color.Color ->                  -- color : TInterface (Name {namespace = "Gdk", name = "Color"})
    IO ()

{-# DEPRECATED windowSetBackground ["(Since version 3.4)","Don\\'t use this function"] #-}
-- | Sets the background color of /@window@/.
-- 
-- However, when using GTK+, influence the background of a widget
-- using a style class or CSS — if you’re an application — or with
-- @/gtk_style_context_set_background()/@ — if you\'re implementing a
-- custom widget.
windowSetBackground ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Color.Color
    -- ^ /@color@/: a t'GI.Gdk.Structs.Color.Color'
    -> m ()
windowSetBackground :: a -> Color -> m ()
windowSetBackground a
window Color
color = 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 Color
color' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
color
    Ptr Window -> Ptr Color -> IO ()
gdk_window_set_background Ptr Window
window' Ptr Color
color'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Color
color
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::set_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 #GdkWindow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pattern"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Pattern" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a pattern to use, or %NULL"
--                 , 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_set_background_pattern" gdk_window_set_background_pattern :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Pattern.Pattern ->            -- pattern : TInterface (Name {namespace = "cairo", name = "Pattern"})
    IO ()

{-# DEPRECATED windowSetBackgroundPattern ["(Since version 3.22)","Don\\'t use this function"] #-}
-- | Sets the background of /@window@/.
-- 
-- A background of 'P.Nothing' means that the window won\'t have any background. On the
-- X11 backend it\'s also possible to inherit the background from the parent
-- window using @/gdk_x11_get_parent_relative_pattern()/@.
-- 
-- The windowing system will normally fill a window with its background
-- when the window is obscured then exposed.
windowSetBackgroundPattern ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Maybe (Cairo.Pattern.Pattern)
    -- ^ /@pattern@/: a pattern to use, or 'P.Nothing'
    -> m ()
windowSetBackgroundPattern :: a -> Maybe Pattern -> m ()
windowSetBackgroundPattern a
window Maybe Pattern
pattern = 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 Pattern
maybePattern <- case Maybe Pattern
pattern of
        Maybe Pattern
Nothing -> Ptr Pattern -> IO (Ptr Pattern)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pattern
forall a. Ptr a
nullPtr
        Just Pattern
jPattern -> do
            Ptr Pattern
jPattern' <- Pattern -> IO (Ptr Pattern)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Pattern
jPattern
            Ptr Pattern -> IO (Ptr Pattern)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pattern
jPattern'
    Ptr Window -> Ptr Pattern -> IO ()
gdk_window_set_background_pattern Ptr Window
window' Ptr Pattern
maybePattern
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe Pattern -> (Pattern -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Pattern
pattern Pattern -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::set_background_rgba
-- 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 = "rgba"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkRGBA color" , 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_set_background_rgba" gdk_window_set_background_rgba :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.RGBA.RGBA ->                    -- rgba : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED windowSetBackgroundRgba ["(Since version 3.22)","Don\\'t use this function"] #-}
-- | Sets the background color of /@window@/.
-- 
-- See also 'GI.Gdk.Objects.Window.windowSetBackgroundPattern'.
windowSetBackgroundRgba ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Gdk.RGBA.RGBA
    -- ^ /@rgba@/: a t'GI.Gdk.Structs.RGBA.RGBA' color
    -> m ()
windowSetBackgroundRgba :: a -> RGBA -> m ()
windowSetBackgroundRgba a
window RGBA
rgba = 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 RGBA
rgba' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
rgba
    Ptr Window -> Ptr RGBA -> IO ()
gdk_window_set_background_rgba Ptr Window
window' Ptr RGBA
rgba'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RGBA
rgba
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::set_child_input_shapes
-- 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_set_child_input_shapes" gdk_window_set_child_input_shapes :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Sets the input shape mask of /@window@/ to the union of input shape masks
-- for all children of /@window@/, ignoring the input shape mask of /@window@/
-- itself. Contrast with 'GI.Gdk.Objects.Window.windowMergeChildInputShapes' which includes
-- the input shape mask of /@window@/ in the masks to be merged.
-- 
-- /Since: 2.10/
windowSetChildInputShapes ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowSetChildInputShapes :: a -> m ()
windowSetChildInputShapes 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_set_child_input_shapes 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 WindowSetChildInputShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetChildInputShapesMethodInfo a signature where
    overloadedMethod = windowSetChildInputShapes

#endif

-- method Window::set_child_shapes
-- 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_set_child_shapes" gdk_window_set_child_shapes :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Sets the shape mask of /@window@/ to the union of shape masks
-- for all children of /@window@/, ignoring the shape mask of /@window@/
-- itself. Contrast with 'GI.Gdk.Objects.Window.windowMergeChildShapes' which includes
-- the shape mask of /@window@/ in the masks to be merged.
windowSetChildShapes ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowSetChildShapes :: a -> m ()
windowSetChildShapes 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_set_child_shapes 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 WindowSetChildShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetChildShapesMethodInfo a signature where
    overloadedMethod = windowSetChildShapes

#endif

-- method Window::set_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
--           }
--       , Arg
--           { argCName = "composited"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to set the window as composited"
--                 , 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_set_composited" gdk_window_set_composited :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- composited : TBasicType TBoolean
    IO ()

{-# DEPRECATED windowSetComposited ["(Since version 3.16)","Compositing is an outdated technology that","  only ever worked on X11."] #-}
-- | Sets a t'GI.Gdk.Objects.Window.Window' as composited, or unsets it. Composited
-- windows do not automatically have their contents drawn to
-- the screen. Drawing is redirected to an offscreen buffer
-- and an expose event is emitted on the parent of the composited
-- window. It is the responsibility of the parent’s expose handler
-- to manually merge the off-screen content onto the screen in
-- whatever way it sees fit.
-- 
-- It only makes sense for child windows to be composited; see
-- 'GI.Gdk.Objects.Window.windowSetOpacity' if you need translucent toplevel
-- windows.
-- 
-- An additional effect of this call is that the area of this
-- window is no longer clipped from regions marked for
-- invalidation on its parent. Draws done on the parent
-- window are also no longer clipped by the child.
-- 
-- This call is only supported on some systems (currently,
-- only X11 with new enough Xcomposite and Xdamage extensions).
-- You must call 'GI.Gdk.Objects.Display.displaySupportsComposite' to check if
-- setting a window as composited is supported before
-- attempting to do so.
-- 
-- /Since: 2.12/
windowSetComposited ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@composited@/: 'P.True' to set the window as composited
    -> m ()
windowSetComposited :: a -> Bool -> m ()
windowSetComposited a
window Bool
composited = 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 composited' :: CInt
composited' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
composited
    Ptr Window -> CInt -> IO ()
gdk_window_set_composited Ptr Window
window' CInt
composited'
    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 WindowSetCompositedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetCompositedMethodInfo a signature where
    overloadedMethod = windowSetComposited

#endif

-- method Window::set_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
--           }
--       , Arg
--           { argCName = "cursor"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Cursor" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a cursor" , 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_set_cursor" gdk_window_set_cursor :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Cursor.Cursor ->                -- cursor : TInterface (Name {namespace = "Gdk", name = "Cursor"})
    IO ()

-- | Sets the default mouse pointer for a t'GI.Gdk.Objects.Window.Window'.
-- 
-- Note that /@cursor@/ must be for the same display as /@window@/.
-- 
-- Use 'GI.Gdk.Objects.Cursor.cursorNewForDisplay' or 'GI.Gdk.Objects.Cursor.cursorNewFromPixbuf' to
-- create the cursor. To make the cursor invisible, use 'GI.Gdk.Enums.CursorTypeBlankCursor'.
-- Passing 'P.Nothing' for the /@cursor@/ argument to 'GI.Gdk.Objects.Window.windowSetCursor' means
-- that /@window@/ will use the cursor of its parent window. Most windows
-- should use this default.
windowSetCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Cursor.IsCursor b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Maybe (b)
    -- ^ /@cursor@/: a cursor
    -> m ()
windowSetCursor :: a -> Maybe b -> m ()
windowSetCursor a
window Maybe b
cursor = 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 Cursor
maybeCursor <- case Maybe b
cursor of
        Maybe b
Nothing -> Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
forall a. Ptr a
nullPtr
        Just b
jCursor -> do
            Ptr Cursor
jCursor' <- b -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCursor
            Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
jCursor'
    Ptr Window -> Ptr Cursor -> IO ()
gdk_window_set_cursor Ptr Window
window' Ptr Cursor
maybeCursor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cursor b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetCursorMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, Gdk.Cursor.IsCursor b) => O.MethodInfo WindowSetCursorMethodInfo a signature where
    overloadedMethod = windowSetCursor

#endif

-- method Window::set_decorations
-- 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 = "decorations"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WMDecoration" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "decoration hint mask"
--                 , 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_set_decorations" gdk_window_set_decorations :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- decorations : TInterface (Name {namespace = "Gdk", name = "WMDecoration"})
    IO ()

-- | “Decorations” are the features the window manager adds to a toplevel t'GI.Gdk.Objects.Window.Window'.
-- This function sets the traditional Motif window manager hints that tell the
-- window manager which decorations you would like your window to have.
-- Usually you should use @/gtk_window_set_decorated()/@ on a @/GtkWindow/@ instead of
-- using the GDK function directly.
-- 
-- The /@decorations@/ argument is the logical OR of the fields in
-- the t'GI.Gdk.Flags.WMDecoration' enumeration. If @/GDK_DECOR_ALL/@ is included in the
-- mask, the other bits indicate which decorations should be turned off.
-- If @/GDK_DECOR_ALL/@ is not included, then the other bits indicate
-- which decorations should be turned on.
-- 
-- Most window managers honor a decorations hint of 0 to disable all decorations,
-- but very few honor all possible combinations of bits.
windowSetDecorations ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> [Gdk.Flags.WMDecoration]
    -- ^ /@decorations@/: decoration hint mask
    -> m ()
windowSetDecorations :: a -> [WMDecoration] -> m ()
windowSetDecorations a
window [WMDecoration]
decorations = 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 decorations' :: CUInt
decorations' = [WMDecoration] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WMDecoration]
decorations
    Ptr Window -> CUInt -> IO ()
gdk_window_set_decorations Ptr Window
window' CUInt
decorations'
    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 WindowSetDecorationsMethodInfo
instance (signature ~ ([Gdk.Flags.WMDecoration] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetDecorationsMethodInfo a signature where
    overloadedMethod = windowSetDecorations

#endif

-- method Window::set_device_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
--           }
--       , Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a master, pointer #GdkDevice"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cursor"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Cursor" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkCursor" , 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_set_device_cursor" gdk_window_set_device_cursor :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    Ptr Gdk.Cursor.Cursor ->                -- cursor : TInterface (Name {namespace = "Gdk", name = "Cursor"})
    IO ()

-- | Sets a specific t'GI.Gdk.Objects.Cursor.Cursor' for a given device when it gets inside /@window@/.
-- Use 'GI.Gdk.Objects.Cursor.cursorNewForDisplay' or 'GI.Gdk.Objects.Cursor.cursorNewFromPixbuf' to create
-- the cursor. To make the cursor invisible, use 'GI.Gdk.Enums.CursorTypeBlankCursor'. Passing
-- 'P.Nothing' for the /@cursor@/ argument to 'GI.Gdk.Objects.Window.windowSetCursor' means that
-- /@window@/ will use the cursor of its parent window. Most windows should
-- use this default.
-- 
-- /Since: 3.0/
windowSetDeviceCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b, Gdk.Cursor.IsCursor c) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> b
    -- ^ /@device@/: a master, pointer t'GI.Gdk.Objects.Device.Device'
    -> c
    -- ^ /@cursor@/: a t'GI.Gdk.Objects.Cursor.Cursor'
    -> m ()
windowSetDeviceCursor :: a -> b -> c -> m ()
windowSetDeviceCursor a
window b
device c
cursor = 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 Cursor
cursor' <- c -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
cursor
    Ptr Window -> Ptr Device -> Ptr Cursor -> IO ()
gdk_window_set_device_cursor Ptr Window
window' Ptr Device
device' Ptr Cursor
cursor'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
cursor
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetDeviceCursorMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b, Gdk.Cursor.IsCursor c) => O.MethodInfo WindowSetDeviceCursorMethodInfo a signature where
    overloadedMethod = windowSetDeviceCursor

#endif

-- method Window::set_device_events
-- 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 = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#GdkDevice to enable events for."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "event_mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "event mask for @window"
--                 , 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_set_device_events" gdk_window_set_device_events :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    CUInt ->                                -- event_mask : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | Sets the event mask for a given device (Normally a floating device, not
-- attached to any visible pointer) to /@window@/. For example, an event mask
-- including @/GDK_BUTTON_PRESS_MASK/@ means the window should report button
-- press events. The event mask is the bitwise OR of values from the
-- t'GI.Gdk.Flags.EventMask' enumeration.
-- 
-- See the [input handling overview][event-masks] for details.
-- 
-- /Since: 3.0/
windowSetDeviceEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> b
    -- ^ /@device@/: t'GI.Gdk.Objects.Device.Device' to enable events for.
    -> [Gdk.Flags.EventMask]
    -- ^ /@eventMask@/: event mask for /@window@/
    -> m ()
windowSetDeviceEvents :: a -> b -> [EventMask] -> m ()
windowSetDeviceEvents a
window b
device [EventMask]
eventMask = 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
    let eventMask' :: CUInt
eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
    Ptr Window -> Ptr Device -> CUInt -> IO ()
gdk_window_set_device_events Ptr Window
window' Ptr Device
device' CUInt
eventMask'
    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 WindowSetDeviceEventsMethodInfo
instance (signature ~ (b -> [Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowSetDeviceEventsMethodInfo a signature where
    overloadedMethod = windowSetDeviceEvents

#endif

-- method Window::set_event_compression
-- 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 = "event_compression"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE if motion events should be compressed"
--                 , 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_set_event_compression" gdk_window_set_event_compression :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- event_compression : TBasicType TBoolean
    IO ()

-- | Determines whether or not extra unprocessed motion events in
-- the event queue can be discarded. If 'P.True' only the most recent
-- event will be delivered.
-- 
-- Some types of applications, e.g. paint programs, need to see all
-- motion events and will benefit from turning off event compression.
-- 
-- By default, event compression is enabled.
-- 
-- /Since: 3.12/
windowSetEventCompression ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@eventCompression@/: 'P.True' if motion events should be compressed
    -> m ()
windowSetEventCompression :: a -> Bool -> m ()
windowSetEventCompression a
window Bool
eventCompression = 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 eventCompression' :: CInt
eventCompression' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
eventCompression
    Ptr Window -> CInt -> IO ()
gdk_window_set_event_compression Ptr Window
window' CInt
eventCompression'
    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 WindowSetEventCompressionMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetEventCompressionMethodInfo a signature where
    overloadedMethod = windowSetEventCompression

#endif

-- method Window::set_events
-- 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 = "event_mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "event mask for @window"
--                 , 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_set_events" gdk_window_set_events :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- event_mask : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | The event mask for a window determines which events will be reported
-- for that window from all master input devices. For example, an event mask
-- including @/GDK_BUTTON_PRESS_MASK/@ means the window should report button
-- press events. The event mask is the bitwise OR of values from the
-- t'GI.Gdk.Flags.EventMask' enumeration.
-- 
-- See the [input handling overview][event-masks] for details.
windowSetEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> [Gdk.Flags.EventMask]
    -- ^ /@eventMask@/: event mask for /@window@/
    -> m ()
windowSetEvents :: a -> [EventMask] -> m ()
windowSetEvents a
window [EventMask]
eventMask = 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 eventMask' :: CUInt
eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
    Ptr Window -> CUInt -> IO ()
gdk_window_set_events Ptr Window
window' CUInt
eventMask'
    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 WindowSetEventsMethodInfo
instance (signature ~ ([Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetEventsMethodInfo a signature where
    overloadedMethod = windowSetEvents

#endif

-- method Window::set_focus_on_map
-- 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 = "focus_on_map"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE if the window should receive input focus when mapped"
--                 , 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_set_focus_on_map" gdk_window_set_focus_on_map :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- focus_on_map : TBasicType TBoolean
    IO ()

-- | Setting /@focusOnMap@/ to 'P.False' hints the desktop environment that the
-- window doesn’t want to receive input focus when it is mapped.
-- focus_on_map should be turned off for windows that aren’t triggered
-- interactively (such as popups from network activity).
-- 
-- On X, it is the responsibility of the window manager to interpret
-- this hint. Window managers following the freedesktop.org window
-- manager extension specification should respect it.
-- 
-- /Since: 2.6/
windowSetFocusOnMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@focusOnMap@/: 'P.True' if the window should receive input focus when mapped
    -> m ()
windowSetFocusOnMap :: a -> Bool -> m ()
windowSetFocusOnMap a
window Bool
focusOnMap = 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 focusOnMap' :: CInt
focusOnMap' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
focusOnMap
    Ptr Window -> CInt -> IO ()
gdk_window_set_focus_on_map Ptr Window
window' CInt
focusOnMap'
    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 WindowSetFocusOnMapMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetFocusOnMapMethodInfo a signature where
    overloadedMethod = windowSetFocusOnMap

#endif

-- method Window::set_fullscreen_mode
-- 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 = "mode"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "FullscreenMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "fullscreen mode" , 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_set_fullscreen_mode" gdk_window_set_fullscreen_mode :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- mode : TInterface (Name {namespace = "Gdk", name = "FullscreenMode"})
    IO ()

-- | Specifies whether the /@window@/ should span over all monitors (in a multi-head
-- setup) or only the current monitor when in fullscreen mode.
-- 
-- The /@mode@/ argument is from the t'GI.Gdk.Enums.FullscreenMode' enumeration.
-- If @/GDK_FULLSCREEN_ON_ALL_MONITORS/@ is specified, the fullscreen /@window@/ will
-- span over all monitors from the t'GI.Gdk.Objects.Screen.Screen'.
-- 
-- On X11, searches through the list of monitors from the t'GI.Gdk.Objects.Screen.Screen' the ones
-- which delimit the 4 edges of the entire t'GI.Gdk.Objects.Screen.Screen' and will ask the window
-- manager to span the /@window@/ over these monitors.
-- 
-- If the XINERAMA extension is not available or not usable, this function
-- has no effect.
-- 
-- Not all window managers support this, so you can’t rely on the fullscreen
-- window to span over the multiple monitors when @/GDK_FULLSCREEN_ON_ALL_MONITORS/@
-- is specified.
-- 
-- /Since: 3.8/
windowSetFullscreenMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Enums.FullscreenMode
    -- ^ /@mode@/: fullscreen mode
    -> m ()
windowSetFullscreenMode :: a -> FullscreenMode -> m ()
windowSetFullscreenMode a
window FullscreenMode
mode = 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 mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FullscreenMode -> Int) -> FullscreenMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FullscreenMode -> Int
forall a. Enum a => a -> Int
fromEnum) FullscreenMode
mode
    Ptr Window -> CUInt -> IO ()
gdk_window_set_fullscreen_mode Ptr Window
window' CUInt
mode'
    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 WindowSetFullscreenModeMethodInfo
instance (signature ~ (Gdk.Enums.FullscreenMode -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetFullscreenModeMethodInfo a signature where
    overloadedMethod = windowSetFullscreenMode

#endif

-- method Window::set_functions
-- 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 = "functions"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WMFunction" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "bitmask of operations to allow on @window"
--                 , 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_set_functions" gdk_window_set_functions :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- functions : TInterface (Name {namespace = "Gdk", name = "WMFunction"})
    IO ()

-- | Sets hints about the window management functions to make available
-- via buttons on the window frame.
-- 
-- On the X backend, this function sets the traditional Motif window
-- manager hint for this purpose. However, few window managers do
-- anything reliable or interesting with this hint. Many ignore it
-- entirely.
-- 
-- The /@functions@/ argument is the logical OR of values from the
-- t'GI.Gdk.Flags.WMFunction' enumeration. If the bitmask includes @/GDK_FUNC_ALL/@,
-- then the other bits indicate which functions to disable; if
-- it doesn’t include @/GDK_FUNC_ALL/@, it indicates which functions to
-- enable.
windowSetFunctions ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> [Gdk.Flags.WMFunction]
    -- ^ /@functions@/: bitmask of operations to allow on /@window@/
    -> m ()
windowSetFunctions :: a -> [WMFunction] -> m ()
windowSetFunctions a
window [WMFunction]
functions = 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 functions' :: CUInt
functions' = [WMFunction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WMFunction]
functions
    Ptr Window -> CUInt -> IO ()
gdk_window_set_functions Ptr Window
window' CUInt
functions'
    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 WindowSetFunctionsMethodInfo
instance (signature ~ ([Gdk.Flags.WMFunction] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetFunctionsMethodInfo a signature where
    overloadedMethod = windowSetFunctions

#endif

-- method Window::set_geometry_hints
-- 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 = "geometry"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Geometry" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "geometry hints" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "geom_mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowHints" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "bitmask indicating fields of @geometry to pay attention 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_set_geometry_hints" gdk_window_set_geometry_hints :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Geometry.Geometry ->            -- geometry : TInterface (Name {namespace = "Gdk", name = "Geometry"})
    CUInt ->                                -- geom_mask : TInterface (Name {namespace = "Gdk", name = "WindowHints"})
    IO ()

-- | Sets the geometry hints for /@window@/. Hints flagged in /@geomMask@/
-- are set, hints not flagged in /@geomMask@/ are unset.
-- To unset all hints, use a /@geomMask@/ of 0 and a /@geometry@/ of 'P.Nothing'.
-- 
-- This function provides hints to the windowing system about
-- acceptable sizes for a toplevel window. The purpose of
-- this is to constrain user resizing, but the windowing system
-- will typically  (but is not required to) also constrain the
-- current size of the window to the provided values and
-- constrain programatic resizing via 'GI.Gdk.Objects.Window.windowResize' or
-- 'GI.Gdk.Objects.Window.windowMoveResize'.
-- 
-- Note that on X11, this effect has no effect on windows
-- of type 'GI.Gdk.Enums.WindowTypeTemp' or windows where override redirect
-- has been turned on via 'GI.Gdk.Objects.Window.windowSetOverrideRedirect'
-- since these windows are not resizable by the user.
-- 
-- Since you can’t count on the windowing system doing the
-- constraints for programmatic resizes, you should generally
-- call 'GI.Gdk.Objects.Window.windowConstrainSize' yourself to determine
-- appropriate sizes.
windowSetGeometryHints ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Geometry.Geometry
    -- ^ /@geometry@/: geometry hints
    -> [Gdk.Flags.WindowHints]
    -- ^ /@geomMask@/: bitmask indicating fields of /@geometry@/ to pay attention to
    -> m ()
windowSetGeometryHints :: a -> Geometry -> [WindowHints] -> m ()
windowSetGeometryHints a
window Geometry
geometry [WindowHints]
geomMask = 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 Geometry
geometry' <- Geometry -> IO (Ptr Geometry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Geometry
geometry
    let geomMask' :: CUInt
geomMask' = [WindowHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WindowHints]
geomMask
    Ptr Window -> Ptr Geometry -> CUInt -> IO ()
gdk_window_set_geometry_hints Ptr Window
window' Ptr Geometry
geometry' CUInt
geomMask'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Geometry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Geometry
geometry
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetGeometryHintsMethodInfo
instance (signature ~ (Gdk.Geometry.Geometry -> [Gdk.Flags.WindowHints] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetGeometryHintsMethodInfo a signature where
    overloadedMethod = windowSetGeometryHints

#endif

-- method Window::set_group
-- 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 = "leader"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "group leader window, or %NULL to restore the default group leader window"
--                 , 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_set_group" gdk_window_set_group :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Window ->                           -- leader : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Sets the group leader window for /@window@/. By default,
-- GDK sets the group leader for all toplevel windows
-- to a global window implicitly created by GDK. With this function
-- you can override this default.
-- 
-- The group leader window allows the window manager to distinguish
-- all windows that belong to a single application. It may for example
-- allow users to minimize\/unminimize all windows belonging to an
-- application at once. You should only set a non-default group window
-- if your application pretends to be multiple applications.
windowSetGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Maybe (b)
    -- ^ /@leader@/: group leader window, or 'P.Nothing' to restore the default group leader window
    -> m ()
windowSetGroup :: a -> Maybe b -> m ()
windowSetGroup a
window Maybe b
leader = 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
maybeLeader <- case Maybe b
leader of
        Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
        Just b
jLeader -> do
            Ptr Window
jLeader' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jLeader
            Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jLeader'
    Ptr Window -> Ptr Window -> IO ()
gdk_window_set_group Ptr Window
window' Ptr Window
maybeLeader
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
leader b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowSetGroupMethodInfo a signature where
    overloadedMethod = windowSetGroup

#endif

-- method Window::set_icon_list
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The #GdkWindow toplevel window to set the icon of."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "pixbufs"
--           , argType =
--               TGList
--                 (TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "\n    A list of pixbufs, of different sizes."
--                 , 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_set_icon_list" gdk_window_set_icon_list :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr (GList (Ptr GdkPixbuf.Pixbuf.Pixbuf)) -> -- pixbufs : TGList (TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"}))
    IO ()

-- | Sets a list of icons for the window. One of these will be used
-- to represent the window when it has been iconified. The icon is
-- usually shown in an icon box or some sort of task bar. Which icon
-- size is shown depends on the window manager. The window manager
-- can scale the icon  but setting several size icons can give better
-- image quality since the window manager may only need to scale the
-- icon by a small amount or not at all.
-- 
-- Note that some platforms don\'t support window icons.
windowSetIconList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
    a
    -- ^ /@window@/: The t'GI.Gdk.Objects.Window.Window' toplevel window to set the icon of.
    -> [b]
    -- ^ /@pixbufs@/: 
    --     A list of pixbufs, of different sizes.
    -> m ()
windowSetIconList :: a -> [b] -> m ()
windowSetIconList a
window [b]
pixbufs = 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 Pixbuf]
pixbufs' <- (b -> IO (Ptr Pixbuf)) -> [b] -> IO [Ptr Pixbuf]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM b -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [b]
pixbufs
    Ptr (GList (Ptr Pixbuf))
pixbufs'' <- [Ptr Pixbuf] -> IO (Ptr (GList (Ptr Pixbuf)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr Pixbuf]
pixbufs'
    Ptr Window -> Ptr (GList (Ptr Pixbuf)) -> IO ()
gdk_window_set_icon_list Ptr Window
window' Ptr (GList (Ptr Pixbuf))
pixbufs''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    (b -> IO ()) -> [b] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [b]
pixbufs
    Ptr (GList (Ptr Pixbuf)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Pixbuf))
pixbufs''
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetIconListMethodInfo
instance (signature ~ ([b] -> m ()), MonadIO m, IsWindow a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo WindowSetIconListMethodInfo a signature where
    overloadedMethod = windowSetIconList

#endif

-- method Window::set_icon_name
-- 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 = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "name of window while iconified (minimized)"
--                 , 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_set_icon_name" gdk_window_set_icon_name :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CString ->                              -- name : TBasicType TUTF8
    IO ()

-- | Windows may have a name used while minimized, distinct from the
-- name they display in their titlebar. Most of the time this is a bad
-- idea from a user interface standpoint. But you can set such a name
-- with this function, if you like.
-- 
-- After calling this with a non-'P.Nothing' /@name@/, calls to 'GI.Gdk.Objects.Window.windowSetTitle'
-- will not update the icon title.
-- 
-- Using 'P.Nothing' for /@name@/ unsets the icon title; further calls to
-- 'GI.Gdk.Objects.Window.windowSetTitle' will again update the icon title as well.
-- 
-- Note that some platforms don\'t support window icons.
windowSetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Maybe (T.Text)
    -- ^ /@name@/: name of window while iconified (minimized)
    -> m ()
windowSetIconName :: a -> Maybe Text -> m ()
windowSetIconName a
window Maybe Text
name = 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 CChar
maybeName <- case Maybe Text
name of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jName -> do
            Ptr CChar
jName' <- Text -> IO (Ptr CChar)
textToCString Text
jName
            Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jName'
    Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_icon_name Ptr Window
window' Ptr CChar
maybeName
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeName
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetIconNameMethodInfo a signature where
    overloadedMethod = windowSetIconName

#endif

-- method Window::set_keep_above
-- 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 = "setting"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to keep @window above other windows"
--                 , 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_set_keep_above" gdk_window_set_keep_above :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

-- | Set if /@window@/ must be kept above other windows. If the
-- window was already above, then this function does nothing.
-- 
-- On X11, asks the window manager to keep /@window@/ above, 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
-- “keep above”; so you can’t rely on the window being kept above.
-- But it will happen with most standard window managers,
-- and GDK makes a best effort to get it to happen.
-- 
-- /Since: 2.4/
windowSetKeepAbove ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@setting@/: whether to keep /@window@/ above other windows
    -> m ()
windowSetKeepAbove :: a -> Bool -> m ()
windowSetKeepAbove a
window Bool
setting = 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 setting' :: CInt
setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
setting
    Ptr Window -> CInt -> IO ()
gdk_window_set_keep_above Ptr Window
window' CInt
setting'
    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 WindowSetKeepAboveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetKeepAboveMethodInfo a signature where
    overloadedMethod = windowSetKeepAbove

#endif

-- method Window::set_keep_below
-- 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 = "setting"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to keep @window below other windows"
--                 , 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_set_keep_below" gdk_window_set_keep_below :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

-- | Set if /@window@/ must be kept below other windows. If the
-- window was already below, then this function does nothing.
-- 
-- On X11, asks the window manager to keep /@window@/ below, 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
-- “keep below”; so you can’t rely on the window being kept below.
-- But it will happen with most standard window managers,
-- and GDK makes a best effort to get it to happen.
-- 
-- /Since: 2.4/
windowSetKeepBelow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@setting@/: whether to keep /@window@/ below other windows
    -> m ()
windowSetKeepBelow :: a -> Bool -> m ()
windowSetKeepBelow a
window Bool
setting = 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 setting' :: CInt
setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
setting
    Ptr Window -> CInt -> IO ()
gdk_window_set_keep_below Ptr Window
window' CInt
setting'
    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 WindowSetKeepBelowMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetKeepBelowMethodInfo a signature where
    overloadedMethod = windowSetKeepBelow

#endif

-- method Window::set_modal_hint
-- 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 = "modal"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE if the window is modal, %FALSE otherwise."
--                 , 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_set_modal_hint" gdk_window_set_modal_hint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- modal : TBasicType TBoolean
    IO ()

-- | The application can use this hint to tell the window manager
-- that a certain window has modal behaviour. The window manager
-- can use this information to handle modal windows in a special
-- way.
-- 
-- You should only use this on windows for which you have
-- previously called 'GI.Gdk.Objects.Window.windowSetTransientFor'
windowSetModalHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: A toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@modal@/: 'P.True' if the window is modal, 'P.False' otherwise.
    -> m ()
windowSetModalHint :: a -> Bool -> m ()
windowSetModalHint a
window Bool
modal = 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 modal' :: CInt
modal' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
modal
    Ptr Window -> CInt -> IO ()
gdk_window_set_modal_hint Ptr Window
window' CInt
modal'
    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 WindowSetModalHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetModalHintMethodInfo a signature where
    overloadedMethod = windowSetModalHint

#endif

-- method Window::set_opacity
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a top-level or non-native #GdkWindow"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "opacity" , 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_set_opacity" gdk_window_set_opacity :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CDouble ->                              -- opacity : TBasicType TDouble
    IO ()

-- | Set /@window@/ to render as partially transparent,
-- with opacity 0 being fully transparent and 1 fully opaque. (Values
-- of the opacity parameter are clamped to the [0,1] range.)
-- 
-- For toplevel windows this depends on support from the windowing system
-- that may not always be there. For instance, On X11, this works only on
-- X screens with a compositing manager running. On Wayland, there is no
-- per-window opacity value that the compositor would apply. Instead, use
-- @gdk_window_set_opaque_region (window, NULL)@ to tell the compositor
-- that the entire window is (potentially) non-opaque, and draw your content
-- with alpha, or use @/gtk_widget_set_opacity()/@ to set an overall opacity
-- for your widgets.
-- 
-- For child windows this function only works for non-native windows.
-- 
-- For setting up per-pixel alpha topelevels, see 'GI.Gdk.Objects.Screen.screenGetRgbaVisual',
-- and for non-toplevels, see 'GI.Gdk.Objects.Window.windowSetComposited'.
-- 
-- Support for non-toplevel windows was added in 3.8.
-- 
-- /Since: 2.12/
windowSetOpacity ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a top-level or non-native t'GI.Gdk.Objects.Window.Window'
    -> Double
    -- ^ /@opacity@/: opacity
    -> m ()
windowSetOpacity :: a -> Double -> m ()
windowSetOpacity a
window Double
opacity = 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 opacity' :: CDouble
opacity' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
opacity
    Ptr Window -> CDouble -> IO ()
gdk_window_set_opacity Ptr Window
window' CDouble
opacity'
    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 WindowSetOpacityMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetOpacityMethodInfo a signature where
    overloadedMethod = windowSetOpacity

#endif

-- method Window::set_opaque_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a top-level or non-native #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 = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a region, or %NULL" , 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_set_opaque_region" gdk_window_set_opaque_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    IO ()

-- | For optimisation purposes, compositing window managers may
-- like to not draw obscured regions of windows, or turn off blending
-- during for these regions. With RGB windows with no transparency,
-- this is just the shape of the window, but with ARGB32 windows, the
-- compositor does not know what regions of the window are transparent
-- or not.
-- 
-- This function only works for toplevel windows.
-- 
-- GTK+ will update this property automatically if
-- the /@window@/ background is opaque, as we know where the opaque regions
-- are. If your window background is not opaque, please update this
-- property in your @/GtkWidget::style-updated/@ handler.
-- 
-- /Since: 3.10/
windowSetOpaqueRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a top-level or non-native t'GI.Gdk.Objects.Window.Window'
    -> Maybe (Cairo.Region.Region)
    -- ^ /@region@/: a region, or 'P.Nothing'
    -> m ()
windowSetOpaqueRegion :: a -> Maybe Region -> m ()
windowSetOpaqueRegion a
window Maybe 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
maybeRegion <- case Maybe Region
region of
        Maybe Region
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
        Just Region
jRegion -> do
            Ptr Region
jRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
jRegion
            Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
jRegion'
    Ptr Window -> Ptr Region -> IO ()
gdk_window_set_opaque_region Ptr Window
window' Ptr Region
maybeRegion
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe Region -> (Region -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Region
region Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::set_override_redirect
-- 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 = "override_redirect"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE if window should be override redirect"
--                 , 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_set_override_redirect" gdk_window_set_override_redirect :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- override_redirect : TBasicType TBoolean
    IO ()

-- | An override redirect window is not under the control of the window manager.
-- This means it won’t have a titlebar, won’t be minimizable, etc. - it will
-- be entirely under the control of the application. The window manager
-- can’t see the override redirect window at all.
-- 
-- Override redirect should only be used for short-lived temporary
-- windows, such as popup menus. @/GtkMenu/@ uses an override redirect
-- window in its implementation, for example.
windowSetOverrideRedirect ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@overrideRedirect@/: 'P.True' if window should be override redirect
    -> m ()
windowSetOverrideRedirect :: a -> Bool -> m ()
windowSetOverrideRedirect a
window Bool
overrideRedirect = 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 overrideRedirect' :: CInt
overrideRedirect' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
overrideRedirect
    Ptr Window -> CInt -> IO ()
gdk_window_set_override_redirect Ptr Window
window' CInt
overrideRedirect'
    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 WindowSetOverrideRedirectMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetOverrideRedirectMethodInfo a signature where
    overloadedMethod = windowSetOverrideRedirect

#endif

-- method Window::set_pass_through
-- 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 = "pass_through"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a boolean" , 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_set_pass_through" gdk_window_set_pass_through :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- pass_through : TBasicType TBoolean
    IO ()

-- | Sets whether input to the window is passed through to the window
-- below.
-- 
-- The default value of this is 'P.False', which means that pointer
-- events that happen inside the window are send first to the window,
-- but if the event is not selected by the event mask then the event
-- is sent to the parent window, and so on up the hierarchy.
-- 
-- If /@passThrough@/ is 'P.True' then such pointer events happen as if the
-- window wasn\'t there at all, and thus will be sent first to any
-- windows below /@window@/. This is useful if the window is used in a
-- transparent fashion. In the terminology of the web this would be called
-- \"pointer-events: none\".
-- 
-- Note that a window with /@passThrough@/ 'P.True' can still have a subwindow
-- without pass through, so you can get events on a subset of a window. And in
-- that cases you would get the in-between related events such as the pointer
-- enter\/leave events on its way to the destination window.
-- 
-- /Since: 3.18/
windowSetPassThrough ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@passThrough@/: a boolean
    -> m ()
windowSetPassThrough :: a -> Bool -> m ()
windowSetPassThrough a
window Bool
passThrough = 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 passThrough' :: CInt
passThrough' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
passThrough
    Ptr Window -> CInt -> IO ()
gdk_window_set_pass_through Ptr Window
window' CInt
passThrough'
    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 WindowSetPassThroughMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetPassThroughMethodInfo a signature where
    overloadedMethod = windowSetPassThrough

#endif

-- method Window::set_role
-- 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 = "role"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a string indicating its role"
--                 , 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_set_role" gdk_window_set_role :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CString ->                              -- role : TBasicType TUTF8
    IO ()

-- | When using GTK+, typically you should use @/gtk_window_set_role()/@ instead
-- of this low-level function.
-- 
-- The window manager and session manager use a window’s role to
-- distinguish it from other kinds of window in the same application.
-- When an application is restarted after being saved in a previous
-- session, all windows with the same title and role are treated as
-- interchangeable.  So if you have two windows with the same title
-- that should be distinguished for session management purposes, you
-- should set the role on those windows. It doesn’t matter what string
-- you use for the role, as long as you have a different role for each
-- non-interchangeable kind of window.
windowSetRole ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> T.Text
    -- ^ /@role@/: a string indicating its role
    -> m ()
windowSetRole :: a -> Text -> m ()
windowSetRole a
window Text
role = 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 CChar
role' <- Text -> IO (Ptr CChar)
textToCString Text
role
    Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_role Ptr Window
window' Ptr CChar
role'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
role'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetRoleMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetRoleMethodInfo a signature where
    overloadedMethod = windowSetRole

#endif

-- method Window::set_shadow_width
-- 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 = "left"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The left extent" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "right"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The right extent" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "top"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The top extent" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bottom"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The bottom extent" , 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_set_shadow_width" gdk_window_set_shadow_width :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Int32 ->                                -- left : TBasicType TInt
    Int32 ->                                -- right : TBasicType TInt
    Int32 ->                                -- top : TBasicType TInt
    Int32 ->                                -- bottom : TBasicType TInt
    IO ()

-- | Newer GTK+ windows using client-side decorations use extra geometry
-- around their frames for effects like shadows and invisible borders.
-- Window managers that want to maximize windows or snap to edges need
-- to know where the extents of the actual frame lie, so that users
-- don’t feel like windows are snapping against random invisible edges.
-- 
-- Note that this property is automatically updated by GTK+, so this
-- function should only be used by applications which do not use GTK+
-- to create toplevel windows.
-- 
-- /Since: 3.12/
windowSetShadowWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Int32
    -- ^ /@left@/: The left extent
    -> Int32
    -- ^ /@right@/: The right extent
    -> Int32
    -- ^ /@top@/: The top extent
    -> Int32
    -- ^ /@bottom@/: The bottom extent
    -> m ()
windowSetShadowWidth :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
windowSetShadowWidth a
window Int32
left Int32
right Int32
top Int32
bottom = 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 -> Int32 -> IO ()
gdk_window_set_shadow_width Ptr Window
window' Int32
left Int32
right Int32
top Int32
bottom
    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 WindowSetShadowWidthMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetShadowWidthMethodInfo a signature where
    overloadedMethod = windowSetShadowWidth

#endif

-- method Window::set_skip_pager_hint
-- 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 = "skips_pager"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to skip the pager"
--                 , 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_set_skip_pager_hint" gdk_window_set_skip_pager_hint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- skips_pager : TBasicType TBoolean
    IO ()

-- | Toggles whether a window should appear in a pager (workspace
-- switcher, or other desktop utility program that displays a small
-- thumbnail representation of the windows on the desktop). If a
-- window’s semantic type as specified with 'GI.Gdk.Objects.Window.windowSetTypeHint'
-- already fully describes the window, this function should
-- not be called in addition, instead you should
-- allow the window to be treated according to standard policy for
-- its semantic type.
-- 
-- /Since: 2.2/
windowSetSkipPagerHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@skipsPager@/: 'P.True' to skip the pager
    -> m ()
windowSetSkipPagerHint :: a -> Bool -> m ()
windowSetSkipPagerHint a
window Bool
skipsPager = 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 skipsPager' :: CInt
skipsPager' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
skipsPager
    Ptr Window -> CInt -> IO ()
gdk_window_set_skip_pager_hint Ptr Window
window' CInt
skipsPager'
    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 WindowSetSkipPagerHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSkipPagerHintMethodInfo a signature where
    overloadedMethod = windowSetSkipPagerHint

#endif

-- method Window::set_skip_taskbar_hint
-- 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 = "skips_taskbar"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to skip the taskbar"
--                 , 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_set_skip_taskbar_hint" gdk_window_set_skip_taskbar_hint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- skips_taskbar : TBasicType TBoolean
    IO ()

-- | Toggles whether a window should appear in a task list or window
-- list. If a window’s semantic type as specified with
-- 'GI.Gdk.Objects.Window.windowSetTypeHint' already fully describes the window, this
-- function should not be called in addition,
-- instead you should allow the window to be treated according to
-- standard policy for its semantic type.
-- 
-- /Since: 2.2/
windowSetSkipTaskbarHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@skipsTaskbar@/: 'P.True' to skip the taskbar
    -> m ()
windowSetSkipTaskbarHint :: a -> Bool -> m ()
windowSetSkipTaskbarHint a
window Bool
skipsTaskbar = 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 skipsTaskbar' :: CInt
skipsTaskbar' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
skipsTaskbar
    Ptr Window -> CInt -> IO ()
gdk_window_set_skip_taskbar_hint Ptr Window
window' CInt
skipsTaskbar'
    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 WindowSetSkipTaskbarHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSkipTaskbarHintMethodInfo a signature where
    overloadedMethod = windowSetSkipTaskbarHint

#endif

-- method Window::set_source_events
-- 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 = "source"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "InputSource" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkInputSource to define the source class."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "event_mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "event mask for @window"
--                 , 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_set_source_events" gdk_window_set_source_events :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- source : TInterface (Name {namespace = "Gdk", name = "InputSource"})
    CUInt ->                                -- event_mask : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | Sets the event mask for any floating device (i.e. not attached to any
-- visible pointer) that has the source defined as /@source@/. This event
-- mask will be applied both to currently existing, newly added devices
-- after this call, and devices being attached\/detached.
-- 
-- /Since: 3.0/
windowSetSourceEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Enums.InputSource
    -- ^ /@source@/: a t'GI.Gdk.Enums.InputSource' to define the source class.
    -> [Gdk.Flags.EventMask]
    -- ^ /@eventMask@/: event mask for /@window@/
    -> m ()
windowSetSourceEvents :: a -> InputSource -> [EventMask] -> m ()
windowSetSourceEvents a
window InputSource
source [EventMask]
eventMask = 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 source' :: CUInt
source' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (InputSource -> Int) -> InputSource -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. InputSource -> Int
forall a. Enum a => a -> Int
fromEnum) InputSource
source
    let eventMask' :: CUInt
eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
    Ptr Window -> CUInt -> CUInt -> IO ()
gdk_window_set_source_events Ptr Window
window' CUInt
source' CUInt
eventMask'
    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 WindowSetSourceEventsMethodInfo
instance (signature ~ (Gdk.Enums.InputSource -> [Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSourceEventsMethodInfo a signature where
    overloadedMethod = windowSetSourceEvents

#endif

-- method Window::set_startup_id
-- 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 = "startup_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a string with startup-notification identifier"
--                 , 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_set_startup_id" gdk_window_set_startup_id :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CString ->                              -- startup_id : TBasicType TUTF8
    IO ()

-- | When using GTK+, typically you should use @/gtk_window_set_startup_id()/@
-- instead of this low-level function.
-- 
-- /Since: 2.12/
windowSetStartupId ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> T.Text
    -- ^ /@startupId@/: a string with startup-notification identifier
    -> m ()
windowSetStartupId :: a -> Text -> m ()
windowSetStartupId a
window Text
startupId = 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 CChar
startupId' <- Text -> IO (Ptr CChar)
textToCString Text
startupId
    Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_startup_id Ptr Window
window' Ptr CChar
startupId'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
startupId'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetStartupIdMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetStartupIdMethodInfo a signature where
    overloadedMethod = windowSetStartupId

#endif

-- method Window::set_static_gravities
-- 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 = "use_static"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to turn on static gravity"
--                 , 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_set_static_gravities" gdk_window_set_static_gravities :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- use_static : TBasicType TBoolean
    IO CInt

{-# DEPRECATED windowSetStaticGravities ["(Since version 3.16)","static gravities haven\\'t worked on anything but X11","  for a long time."] #-}
-- | Used to set the bit gravity of the given window to static, and flag
-- it so all children get static subwindow gravity. This is used if you
-- are implementing scary features that involve deep knowledge of the
-- windowing system. Don’t worry about it.
windowSetStaticGravities ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@useStatic@/: 'P.True' to turn on static gravity
    -> m Bool
    -- ^ __Returns:__ 'P.False'
windowSetStaticGravities :: a -> Bool -> m Bool
windowSetStaticGravities a
window Bool
useStatic = 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
    let useStatic' :: CInt
useStatic' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
useStatic
    CInt
result <- Ptr Window -> CInt -> IO CInt
gdk_window_set_static_gravities Ptr Window
window' CInt
useStatic'
    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 WindowSetStaticGravitiesMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowSetStaticGravitiesMethodInfo a signature where
    overloadedMethod = windowSetStaticGravities

#endif

-- method Window::set_support_multidevice
-- 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 = "support_multidevice"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE to enable multidevice support in @window."
--                 , 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_set_support_multidevice" gdk_window_set_support_multidevice :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- support_multidevice : TBasicType TBoolean
    IO ()

-- | This function will enable multidevice features in /@window@/.
-- 
-- Multidevice aware windows will need to handle properly multiple,
-- per device enter\/leave events, device grabs and grab ownerships.
-- 
-- /Since: 3.0/
windowSetSupportMultidevice ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'.
    -> Bool
    -- ^ /@supportMultidevice@/: 'P.True' to enable multidevice support in /@window@/.
    -> m ()
windowSetSupportMultidevice :: a -> Bool -> m ()
windowSetSupportMultidevice a
window Bool
supportMultidevice = 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 supportMultidevice' :: CInt
supportMultidevice' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
supportMultidevice
    Ptr Window -> CInt -> IO ()
gdk_window_set_support_multidevice Ptr Window
window' CInt
supportMultidevice'
    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 WindowSetSupportMultideviceMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSupportMultideviceMethodInfo a signature where
    overloadedMethod = windowSetSupportMultidevice

#endif

-- method Window::set_title
-- 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 = "title"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "title of @window" , 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_set_title" gdk_window_set_title :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CString ->                              -- title : TBasicType TUTF8
    IO ()

-- | Sets the title of a toplevel window, to be displayed in the titlebar.
-- If you haven’t explicitly set the icon name for the window
-- (using 'GI.Gdk.Objects.Window.windowSetIconName'), the icon name will be set to
-- /@title@/ as well. /@title@/ must be in UTF-8 encoding (as with all
-- user-readable strings in GDK\/GTK+). /@title@/ may not be 'P.Nothing'.
windowSetTitle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> T.Text
    -- ^ /@title@/: title of /@window@/
    -> m ()
windowSetTitle :: a -> Text -> m ()
windowSetTitle a
window Text
title = 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 CChar
title' <- Text -> IO (Ptr CChar)
textToCString Text
title
    Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_title Ptr Window
window' Ptr CChar
title'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
title'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetTitleMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetTitleMethodInfo a signature where
    overloadedMethod = windowSetTitle

#endif

-- method Window::set_transient_for
-- 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 = "parent"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "another 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_set_transient_for" gdk_window_set_transient_for :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Window ->                           -- parent : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Indicates to the window manager that /@window@/ is a transient dialog
-- associated with the application window /@parent@/. This allows the
-- window manager to do things like center /@window@/ on /@parent@/ and
-- keep /@window@/ above /@parent@/.
-- 
-- See @/gtk_window_set_transient_for()/@ if you’re using @/GtkWindow/@ or
-- @/GtkDialog/@.
windowSetTransientFor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> b
    -- ^ /@parent@/: another toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowSetTransientFor :: a -> b -> m ()
windowSetTransientFor a
window b
parent = 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
parent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parent
    Ptr Window -> Ptr Window -> IO ()
gdk_window_set_transient_for Ptr Window
window' Ptr Window
parent'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
parent
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetTransientForMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowSetTransientForMethodInfo a signature where
    overloadedMethod = windowSetTransientFor

#endif

-- method Window::set_type_hint
-- 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 = "hint"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowTypeHint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A hint of the function this window will have"
--                 , 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_set_type_hint" gdk_window_set_type_hint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- hint : TInterface (Name {namespace = "Gdk", name = "WindowTypeHint"})
    IO ()

-- | The application can use this call to provide a hint to the window
-- manager about the functionality of a window. The window manager
-- can use this information when determining the decoration and behaviour
-- of the window.
-- 
-- The hint must be set before the window is mapped.
windowSetTypeHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: A toplevel t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Enums.WindowTypeHint
    -- ^ /@hint@/: A hint of the function this window will have
    -> m ()
windowSetTypeHint :: a -> WindowTypeHint -> m ()
windowSetTypeHint a
window WindowTypeHint
hint = 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 hint' :: CUInt
hint' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (WindowTypeHint -> Int) -> WindowTypeHint -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowTypeHint -> Int
forall a. Enum a => a -> Int
fromEnum) WindowTypeHint
hint
    Ptr Window -> CUInt -> IO ()
gdk_window_set_type_hint Ptr Window
window' CUInt
hint'
    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 WindowSetTypeHintMethodInfo
instance (signature ~ (Gdk.Enums.WindowTypeHint -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetTypeHintMethodInfo a signature where
    overloadedMethod = windowSetTypeHint

#endif

-- method Window::set_urgency_hint
-- 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 = "urgent"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE if the window is urgent"
--                 , 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_set_urgency_hint" gdk_window_set_urgency_hint :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CInt ->                                 -- urgent : TBasicType TBoolean
    IO ()

-- | Toggles whether a window needs the user\'s
-- urgent attention.
-- 
-- /Since: 2.8/
windowSetUrgencyHint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> Bool
    -- ^ /@urgent@/: 'P.True' if the window is urgent
    -> m ()
windowSetUrgencyHint :: a -> Bool -> m ()
windowSetUrgencyHint a
window Bool
urgent = 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 urgent' :: CInt
urgent' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
urgent
    Ptr Window -> CInt -> IO ()
gdk_window_set_urgency_hint Ptr Window
window' CInt
urgent'
    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 WindowSetUrgencyHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetUrgencyHintMethodInfo a signature where
    overloadedMethod = windowSetUrgencyHint

#endif

-- method Window::set_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 =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , 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_set_user_data" gdk_window_set_user_data :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr GObject.Object.Object ->            -- user_data : TInterface (Name {namespace = "GObject", name = "Object"})
    IO ()

-- | For most purposes this function is deprecated in favor of
-- 'GI.GObject.Objects.Object.objectSetData'. However, for historical reasons GTK+ stores
-- the @/GtkWidget/@ that owns a t'GI.Gdk.Objects.Window.Window' as user data on the
-- t'GI.Gdk.Objects.Window.Window'. So, custom widget implementations should use
-- this function for that. If GTK+ receives an event for a t'GI.Gdk.Objects.Window.Window',
-- and the user data for the window is non-'P.Nothing', GTK+ will assume the
-- user data is a @/GtkWidget/@, and forward the event to that widget.
windowSetUserData ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, GObject.Object.IsObject b) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Maybe (b)
    -- ^ /@userData@/: user data
    -> m ()
windowSetUserData :: a -> Maybe b -> m ()
windowSetUserData a
window Maybe b
userData = 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 Object
maybeUserData <- case Maybe b
userData of
        Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
        Just b
jUserData -> do
            Ptr Object
jUserData' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jUserData
            Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jUserData'
    Ptr Window -> Ptr Object -> IO ()
gdk_window_set_user_data Ptr Window
window' Ptr Object
maybeUserData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
userData b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WindowSetUserDataMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, GObject.Object.IsObject b) => O.MethodInfo WindowSetUserDataMethodInfo a signature where
    overloadedMethod = windowSetUserData

#endif

-- method Window::shape_combine_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 = "shape_region"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Region" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "region of window to be non-transparent"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X position of @shape_region in @window coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y position of @shape_region in @window coordinates"
--                 , 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_shape_combine_region" gdk_window_shape_combine_region :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Cairo.Region.Region ->              -- shape_region : TInterface (Name {namespace = "cairo", name = "Region"})
    Int32 ->                                -- offset_x : TBasicType TInt
    Int32 ->                                -- offset_y : TBasicType TInt
    IO ()

-- | Makes pixels in /@window@/ outside /@shapeRegion@/ be transparent,
-- so that the window may be nonrectangular.
-- 
-- If /@shapeRegion@/ is 'P.Nothing', the shape will be unset, so the whole
-- window will be opaque again. /@offsetX@/ and /@offsetY@/ are ignored
-- if /@shapeRegion@/ is 'P.Nothing'.
-- 
-- On the X11 platform, this uses an X server extension which is
-- widely available on most common platforms, but not available on
-- very old X servers, and occasionally the implementation will be
-- buggy. On servers without the shape extension, this function
-- will do nothing.
-- 
-- This function works on both toplevel and child windows.
windowShapeCombineRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Maybe (Cairo.Region.Region)
    -- ^ /@shapeRegion@/: region of window to be non-transparent
    -> Int32
    -- ^ /@offsetX@/: X position of /@shapeRegion@/ in /@window@/ coordinates
    -> Int32
    -- ^ /@offsetY@/: Y position of /@shapeRegion@/ in /@window@/ coordinates
    -> m ()
windowShapeCombineRegion :: a -> Maybe Region -> Int32 -> Int32 -> m ()
windowShapeCombineRegion a
window Maybe Region
shapeRegion Int32
offsetX Int32
offsetY = 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
maybeShapeRegion <- case Maybe Region
shapeRegion of
        Maybe Region
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
        Just Region
jShapeRegion -> do
            Ptr Region
jShapeRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
jShapeRegion
            Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
jShapeRegion'
    Ptr Window -> Ptr Region -> Int32 -> Int32 -> IO ()
gdk_window_shape_combine_region Ptr Window
window' Ptr Region
maybeShapeRegion Int32
offsetX Int32
offsetY
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Maybe Region -> (Region -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Region
shapeRegion Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

-- method Window::show
-- 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_show" gdk_window_show :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Like 'GI.Gdk.Objects.Window.windowShowUnraised', but also raises the window to the
-- top of the window stack (moves the window to the front of the
-- Z-order).
-- 
-- This function maps a window so it’s visible onscreen. Its opposite
-- is 'GI.Gdk.Objects.Window.windowHide'.
-- 
-- When implementing a @/GtkWidget/@, you should call this function on the widget\'s
-- t'GI.Gdk.Objects.Window.Window' as part of the “map” method.
windowShow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowShow :: a -> m ()
windowShow 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_show 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 WindowShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowShowMethodInfo a signature where
    overloadedMethod = windowShow

#endif

-- method Window::show_unraised
-- 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_show_unraised" gdk_window_show_unraised :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Shows a t'GI.Gdk.Objects.Window.Window' onscreen, but does not modify its stacking
-- order. In contrast, 'GI.Gdk.Objects.Window.windowShow' will raise the window
-- to the top of the window stack.
-- 
-- On the X11 platform, in Xlib terms, this function calls
-- @/XMapWindow()/@ (it also updates some internal GDK state, which means
-- that you can’t really use @/XMapWindow()/@ directly on a GDK window).
windowShowUnraised ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowShowUnraised :: a -> m ()
windowShowUnraised 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_show_unraised 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 WindowShowUnraisedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowShowUnraisedMethodInfo a signature where
    overloadedMethod = windowShowUnraised

#endif

-- method Window::show_window_menu
-- 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 = "event"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Event" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkEvent to show the menu for"
--                 , 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_show_window_menu" gdk_window_show_window_menu :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    IO CInt

-- | Asks the windowing system to show the window menu. The window menu
-- is the menu shown when right-clicking the titlebar on traditional
-- windows managed by the window manager. This is useful for windows
-- using client-side decorations, activating it with a right-click
-- on the window decorations.
-- 
-- /Since: 3.14/
windowShowWindowMenu ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> Gdk.Event.Event
    -- ^ /@event@/: a t'GI.Gdk.Unions.Event.Event' to show the menu for
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the window menu was shown and 'P.False' otherwise.
windowShowWindowMenu :: a -> Event -> m Bool
windowShowWindowMenu a
window Event
event = 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
    Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
    CInt
result <- Ptr Window -> Ptr Event -> IO CInt
gdk_window_show_window_menu Ptr Window
window' Ptr Event
event'
    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
    Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowShowWindowMenuMethodInfo
instance (signature ~ (Gdk.Event.Event -> m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowShowWindowMenuMethodInfo a signature where
    overloadedMethod = windowShowWindowMenu

#endif

-- method Window::stick
-- 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_stick" gdk_window_stick :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | “Pins” a window such that it’s on all workspaces and does not scroll
-- with viewports, for window managers that have scrollable viewports.
-- (When using @/GtkWindow/@, @/gtk_window_stick()/@ may be more useful.)
-- 
-- On the X11 platform, this function depends on window manager
-- support, so may have no effect with many window managers. However,
-- GDK will do the best it can to convince the window manager to stick
-- the window. For window managers that don’t support this operation,
-- there’s nothing you can do to force it to happen.
windowStick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowStick :: a -> m ()
windowStick 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_stick 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 WindowStickMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowStickMethodInfo a signature where
    overloadedMethod = windowStick

#endif

-- method Window::thaw_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_thaw_toplevel_updates_libgtk_only" gdk_window_thaw_toplevel_updates_libgtk_only :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

{-# DEPRECATED windowThawToplevelUpdatesLibgtkOnly ["(Since version 3.16)","This symbol was never meant to be used outside of GTK+"] #-}
-- | Thaws a window frozen with
-- 'GI.Gdk.Objects.Window.windowFreezeToplevelUpdatesLibgtkOnly'.
-- 
-- This function is not part of the GDK public API and is only
-- for use by GTK+.
windowThawToplevelUpdatesLibgtkOnly ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowThawToplevelUpdatesLibgtkOnly :: a -> m ()
windowThawToplevelUpdatesLibgtkOnly 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_thaw_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 WindowThawToplevelUpdatesLibgtkOnlyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowThawToplevelUpdatesLibgtkOnlyMethodInfo a signature where
    overloadedMethod = windowThawToplevelUpdatesLibgtkOnly

#endif

-- method Window::thaw_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_thaw_updates" gdk_window_thaw_updates :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Thaws a window frozen with 'GI.Gdk.Objects.Window.windowFreezeUpdates'.
windowThawUpdates ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowThawUpdates :: a -> m ()
windowThawUpdates 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_thaw_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 WindowThawUpdatesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowThawUpdatesMethodInfo a signature where
    overloadedMethod = windowThawUpdates

#endif

-- method Window::unfullscreen
-- 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_unfullscreen" gdk_window_unfullscreen :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Moves the window out of fullscreen mode. If the window was not
-- fullscreen, does nothing.
-- 
-- On X11, asks the window manager to move /@window@/ out of the 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
-- unfullscreenification 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/
windowUnfullscreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowUnfullscreen :: a -> m ()
windowUnfullscreen 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_unfullscreen 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 WindowUnfullscreenMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowUnfullscreenMethodInfo a signature where
    overloadedMethod = windowUnfullscreen

#endif

-- method Window::unmaximize
-- 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_unmaximize" gdk_window_unmaximize :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Unmaximizes the window. If the window wasn’t maximized, then this
-- function does nothing.
-- 
-- On X11, asks the window manager to unmaximize /@window@/, 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 “maximized”; so you can’t rely on the unmaximization
-- actually happening. But it will happen with most standard window
-- managers, and GDK makes a best effort to get it to happen.
-- 
-- On Windows, reliably unmaximizes the window.
windowUnmaximize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowUnmaximize :: a -> m ()
windowUnmaximize 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_unmaximize 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 WindowUnmaximizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowUnmaximizeMethodInfo a signature where
    overloadedMethod = windowUnmaximize

#endif

-- method Window::unstick
-- 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_unstick" gdk_window_unstick :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Reverse operation for 'GI.Gdk.Objects.Window.windowStick'; see 'GI.Gdk.Objects.Window.windowStick',
-- and @/gtk_window_unstick()/@.
windowUnstick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowUnstick :: a -> m ()
windowUnstick 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_unstick 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 WindowUnstickMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowUnstickMethodInfo a signature where
    overloadedMethod = windowUnstick

#endif

-- method Window::withdraw
-- 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_withdraw" gdk_window_withdraw :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Withdraws a window (unmaps it and asks the window manager to forget about it).
-- This function is not really useful as 'GI.Gdk.Objects.Window.windowHide' automatically
-- withdraws toplevel windows before hiding them.
windowWithdraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a toplevel t'GI.Gdk.Objects.Window.Window'
    -> m ()
windowWithdraw :: a -> m ()
windowWithdraw 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_withdraw 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 WindowWithdrawMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowWithdrawMethodInfo a signature where
    overloadedMethod = windowWithdraw

#endif

-- method Window::at_pointer
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "win_x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for origin of the window under the pointer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "win_y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for origin of the window under the pointer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_at_pointer" gdk_window_at_pointer :: 
    Ptr Int32 ->                            -- win_x : TBasicType TInt
    Ptr Int32 ->                            -- win_y : TBasicType TInt
    IO (Ptr Window)

{-# DEPRECATED windowAtPointer ["(Since version 3.0)","Use 'GI.Gdk.Objects.Device.deviceGetWindowAtPosition' instead."] #-}
-- | Obtains the window underneath the mouse pointer, returning the
-- location of that window in /@winX@/, /@winY@/. Returns 'P.Nothing' if the
-- window under the mouse pointer is not known to GDK (if the window
-- belongs to another application and a t'GI.Gdk.Objects.Window.Window' hasn’t been created
-- for it with @/gdk_window_foreign_new()/@)
-- 
-- NOTE: For multihead-aware widgets or applications use
-- 'GI.Gdk.Objects.Display.displayGetWindowAtPointer' instead.
windowAtPointer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ((Window, Int32, Int32))
    -- ^ __Returns:__ window under the mouse pointer
windowAtPointer :: m (Window, Int32, Int32)
windowAtPointer  = IO (Window, Int32, Int32) -> m (Window, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Window, Int32, Int32) -> m (Window, Int32, Int32))
-> IO (Window, Int32, Int32) -> m (Window, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Int32
winX <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
winY <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Window
result <- Ptr Int32 -> Ptr Int32 -> IO (Ptr Window)
gdk_window_at_pointer Ptr Int32
winX Ptr Int32
winY
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowAtPointer" 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
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
    Int32
winX' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
winX
    Int32
winY' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
winY
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
winX
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
winY
    (Window, Int32, Int32) -> IO (Window, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Window
result', Int32
winX', Int32
winY')

#if defined(ENABLE_OVERLOADING)
#endif

-- method Window::constrain_size
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "geometry"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Geometry" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkGeometry structure"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "WindowHints" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a mask indicating what portions of @geometry are set"
--                 , 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 "desired width of window"
--                 , 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 "desired height of the window"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "new_width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store resulting width"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "new_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store resulting height"
--                 , 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_constrain_size" gdk_window_constrain_size :: 
    Ptr Gdk.Geometry.Geometry ->            -- geometry : TInterface (Name {namespace = "Gdk", name = "Geometry"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gdk", name = "WindowHints"})
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Ptr Int32 ->                            -- new_width : TBasicType TInt
    Ptr Int32 ->                            -- new_height : TBasicType TInt
    IO ()

-- | Constrains a desired width and height according to a
-- set of geometry hints (such as minimum and maximum size).
windowConstrainSize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gdk.Geometry.Geometry
    -- ^ /@geometry@/: a t'GI.Gdk.Structs.Geometry.Geometry' structure
    -> [Gdk.Flags.WindowHints]
    -- ^ /@flags@/: a mask indicating what portions of /@geometry@/ are set
    -> Int32
    -- ^ /@width@/: desired width of window
    -> Int32
    -- ^ /@height@/: desired height of the window
    -> m ((Int32, Int32))
windowConstrainSize :: Geometry -> [WindowHints] -> Int32 -> Int32 -> m (Int32, Int32)
windowConstrainSize Geometry
geometry [WindowHints]
flags Int32
width Int32
height = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Geometry
geometry' <- Geometry -> IO (Ptr Geometry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Geometry
geometry
    let flags' :: CUInt
flags' = [WindowHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WindowHints]
flags
    Ptr Int32
newWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
newHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Geometry
-> CUInt -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_constrain_size Ptr Geometry
geometry' CUInt
flags' Int32
width Int32
height Ptr Int32
newWidth Ptr Int32
newHeight
    Int32
newWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
newWidth
    Int32
newHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
newHeight
    Geometry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Geometry
geometry
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
newWidth
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
newHeight
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
newWidth', Int32
newHeight')

#if defined(ENABLE_OVERLOADING)
#endif

-- method Window::process_all_updates
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_window_process_all_updates" gdk_window_process_all_updates :: 
    IO ()

{-# DEPRECATED windowProcessAllUpdates ["(Since version 3.22)"] #-}
-- | Calls 'GI.Gdk.Objects.Window.windowProcessUpdates' for all windows (see t'GI.Gdk.Objects.Window.Window')
-- in the application.
windowProcessAllUpdates ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
windowProcessAllUpdates :: m ()
windowProcessAllUpdates  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
gdk_window_process_all_updates
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Window::set_debug_updates
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "setting"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to turn on update debugging"
--                 , 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_set_debug_updates" gdk_window_set_debug_updates :: 
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

{-# DEPRECATED windowSetDebugUpdates ["(Since version 3.22)"] #-}
-- | With update debugging enabled, calls to
-- 'GI.Gdk.Objects.Window.windowInvalidateRegion' clear the invalidated region of the
-- screen to a noticeable color, and GDK pauses for a short time
-- before sending exposes to windows during
-- 'GI.Gdk.Objects.Window.windowProcessUpdates'.  The net effect is that you can see
-- the invalid region for each window and watch redraws as they
-- occur. This allows you to diagnose inefficiencies in your application.
-- 
-- In essence, because the GDK rendering model prevents all flicker,
-- if you are redrawing the same region 400 times you may never
-- notice, aside from noticing a speed problem. Enabling update
-- debugging causes GTK to flicker slowly and noticeably, so you can
-- see exactly what’s being redrawn when, in what order.
-- 
-- The --gtk-debug=updates command line option passed to GTK+ programs
-- enables this debug option at application startup time. That\'s
-- usually more useful than calling 'GI.Gdk.Objects.Window.windowSetDebugUpdates'
-- yourself, though you might want to use this function to enable
-- updates sometime after application startup time.
windowSetDebugUpdates ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Bool
    -- ^ /@setting@/: 'P.True' to turn on update debugging
    -> m ()
windowSetDebugUpdates :: Bool -> m ()
windowSetDebugUpdates Bool
setting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let setting' :: CInt
setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
setting
    CInt -> IO ()
gdk_window_set_debug_updates CInt
setting'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif