{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The t'GI.Wnck.Objects.Window.Window' struct contains only private fields and should not be
-- directly accessed.

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

module GI.Wnck.Objects.Window
    ( 

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


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

#if defined(ENABLE_OVERLOADING)
    ResolveWindowMethod                     ,
#endif


-- ** activate #method:activate#

#if defined(ENABLE_OVERLOADING)
    WindowActivateMethodInfo                ,
#endif
    windowActivate                          ,


-- ** activateTransient #method:activateTransient#

#if defined(ENABLE_OVERLOADING)
    WindowActivateTransientMethodInfo       ,
#endif
    windowActivateTransient                 ,


-- ** close #method:close#

#if defined(ENABLE_OVERLOADING)
    WindowCloseMethodInfo                   ,
#endif
    windowClose                             ,


-- ** get #method:get#

    windowGet                               ,


-- ** getActions #method:getActions#

#if defined(ENABLE_OVERLOADING)
    WindowGetActionsMethodInfo              ,
#endif
    windowGetActions                        ,


-- ** getApplication #method:getApplication#

#if defined(ENABLE_OVERLOADING)
    WindowGetApplicationMethodInfo          ,
#endif
    windowGetApplication                    ,


-- ** getClassGroup #method:getClassGroup#

#if defined(ENABLE_OVERLOADING)
    WindowGetClassGroupMethodInfo           ,
#endif
    windowGetClassGroup                     ,


-- ** getClassGroupName #method:getClassGroupName#

#if defined(ENABLE_OVERLOADING)
    WindowGetClassGroupNameMethodInfo       ,
#endif
    windowGetClassGroupName                 ,


-- ** getClassInstanceName #method:getClassInstanceName#

#if defined(ENABLE_OVERLOADING)
    WindowGetClassInstanceNameMethodInfo    ,
#endif
    windowGetClassInstanceName              ,


-- ** getClientWindowGeometry #method:getClientWindowGeometry#

#if defined(ENABLE_OVERLOADING)
    WindowGetClientWindowGeometryMethodInfo ,
#endif
    windowGetClientWindowGeometry           ,


-- ** getGeometry #method:getGeometry#

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


-- ** getGroupLeader #method:getGroupLeader#

#if defined(ENABLE_OVERLOADING)
    WindowGetGroupLeaderMethodInfo          ,
#endif
    windowGetGroupLeader                    ,


-- ** getIcon #method:getIcon#

#if defined(ENABLE_OVERLOADING)
    WindowGetIconMethodInfo                 ,
#endif
    windowGetIcon                           ,


-- ** getIconIsFallback #method:getIconIsFallback#

#if defined(ENABLE_OVERLOADING)
    WindowGetIconIsFallbackMethodInfo       ,
#endif
    windowGetIconIsFallback                 ,


-- ** getIconName #method:getIconName#

#if defined(ENABLE_OVERLOADING)
    WindowGetIconNameMethodInfo             ,
#endif
    windowGetIconName                       ,


-- ** getMiniIcon #method:getMiniIcon#

#if defined(ENABLE_OVERLOADING)
    WindowGetMiniIconMethodInfo             ,
#endif
    windowGetMiniIcon                       ,


-- ** getName #method:getName#

#if defined(ENABLE_OVERLOADING)
    WindowGetNameMethodInfo                 ,
#endif
    windowGetName                           ,


-- ** getPid #method:getPid#

#if defined(ENABLE_OVERLOADING)
    WindowGetPidMethodInfo                  ,
#endif
    windowGetPid                            ,


-- ** getRole #method:getRole#

#if defined(ENABLE_OVERLOADING)
    WindowGetRoleMethodInfo                 ,
#endif
    windowGetRole                           ,


-- ** getScreen #method:getScreen#

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


-- ** getSessionId #method:getSessionId#

#if defined(ENABLE_OVERLOADING)
    WindowGetSessionIdMethodInfo            ,
#endif
    windowGetSessionId                      ,


-- ** getSessionIdUtf8 #method:getSessionIdUtf8#

#if defined(ENABLE_OVERLOADING)
    WindowGetSessionIdUtf8MethodInfo        ,
#endif
    windowGetSessionIdUtf8                  ,


-- ** getSortOrder #method:getSortOrder#

#if defined(ENABLE_OVERLOADING)
    WindowGetSortOrderMethodInfo            ,
#endif
    windowGetSortOrder                      ,


-- ** getState #method:getState#

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


-- ** getTransient #method:getTransient#

#if defined(ENABLE_OVERLOADING)
    WindowGetTransientMethodInfo            ,
#endif
    windowGetTransient                      ,


-- ** getWindowType #method:getWindowType#

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


-- ** getWorkspace #method:getWorkspace#

#if defined(ENABLE_OVERLOADING)
    WindowGetWorkspaceMethodInfo            ,
#endif
    windowGetWorkspace                      ,


-- ** getXid #method:getXid#

#if defined(ENABLE_OVERLOADING)
    WindowGetXidMethodInfo                  ,
#endif
    windowGetXid                            ,


-- ** hasIconName #method:hasIconName#

#if defined(ENABLE_OVERLOADING)
    WindowHasIconNameMethodInfo             ,
#endif
    windowHasIconName                       ,


-- ** hasName #method:hasName#

#if defined(ENABLE_OVERLOADING)
    WindowHasNameMethodInfo                 ,
#endif
    windowHasName                           ,


-- ** isAbove #method:isAbove#

#if defined(ENABLE_OVERLOADING)
    WindowIsAboveMethodInfo                 ,
#endif
    windowIsAbove                           ,


-- ** isActive #method:isActive#

#if defined(ENABLE_OVERLOADING)
    WindowIsActiveMethodInfo                ,
#endif
    windowIsActive                          ,


-- ** isBelow #method:isBelow#

#if defined(ENABLE_OVERLOADING)
    WindowIsBelowMethodInfo                 ,
#endif
    windowIsBelow                           ,


-- ** isFullscreen #method:isFullscreen#

#if defined(ENABLE_OVERLOADING)
    WindowIsFullscreenMethodInfo            ,
#endif
    windowIsFullscreen                      ,


-- ** isInViewport #method:isInViewport#

#if defined(ENABLE_OVERLOADING)
    WindowIsInViewportMethodInfo            ,
#endif
    windowIsInViewport                      ,


-- ** isMaximized #method:isMaximized#

#if defined(ENABLE_OVERLOADING)
    WindowIsMaximizedMethodInfo             ,
#endif
    windowIsMaximized                       ,


-- ** isMaximizedHorizontally #method:isMaximizedHorizontally#

#if defined(ENABLE_OVERLOADING)
    WindowIsMaximizedHorizontallyMethodInfo ,
#endif
    windowIsMaximizedHorizontally           ,


-- ** isMaximizedVertically #method:isMaximizedVertically#

#if defined(ENABLE_OVERLOADING)
    WindowIsMaximizedVerticallyMethodInfo   ,
#endif
    windowIsMaximizedVertically             ,


-- ** isMinimized #method:isMinimized#

#if defined(ENABLE_OVERLOADING)
    WindowIsMinimizedMethodInfo             ,
#endif
    windowIsMinimized                       ,


-- ** isMostRecentlyActivated #method:isMostRecentlyActivated#

#if defined(ENABLE_OVERLOADING)
    WindowIsMostRecentlyActivatedMethodInfo ,
#endif
    windowIsMostRecentlyActivated           ,


-- ** isOnWorkspace #method:isOnWorkspace#

#if defined(ENABLE_OVERLOADING)
    WindowIsOnWorkspaceMethodInfo           ,
#endif
    windowIsOnWorkspace                     ,


-- ** isPinned #method:isPinned#

#if defined(ENABLE_OVERLOADING)
    WindowIsPinnedMethodInfo                ,
#endif
    windowIsPinned                          ,


-- ** isShaded #method:isShaded#

#if defined(ENABLE_OVERLOADING)
    WindowIsShadedMethodInfo                ,
#endif
    windowIsShaded                          ,


-- ** isSkipPager #method:isSkipPager#

#if defined(ENABLE_OVERLOADING)
    WindowIsSkipPagerMethodInfo             ,
#endif
    windowIsSkipPager                       ,


-- ** isSkipTasklist #method:isSkipTasklist#

#if defined(ENABLE_OVERLOADING)
    WindowIsSkipTasklistMethodInfo          ,
#endif
    windowIsSkipTasklist                    ,


-- ** isSticky #method:isSticky#

#if defined(ENABLE_OVERLOADING)
    WindowIsStickyMethodInfo                ,
#endif
    windowIsSticky                          ,


-- ** isVisibleOnWorkspace #method:isVisibleOnWorkspace#

#if defined(ENABLE_OVERLOADING)
    WindowIsVisibleOnWorkspaceMethodInfo    ,
#endif
    windowIsVisibleOnWorkspace              ,


-- ** keyboardMove #method:keyboardMove#

#if defined(ENABLE_OVERLOADING)
    WindowKeyboardMoveMethodInfo            ,
#endif
    windowKeyboardMove                      ,


-- ** keyboardSize #method:keyboardSize#

#if defined(ENABLE_OVERLOADING)
    WindowKeyboardSizeMethodInfo            ,
#endif
    windowKeyboardSize                      ,


-- ** makeAbove #method:makeAbove#

#if defined(ENABLE_OVERLOADING)
    WindowMakeAboveMethodInfo               ,
#endif
    windowMakeAbove                         ,


-- ** makeBelow #method:makeBelow#

#if defined(ENABLE_OVERLOADING)
    WindowMakeBelowMethodInfo               ,
#endif
    windowMakeBelow                         ,


-- ** maximize #method:maximize#

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


-- ** maximizeHorizontally #method:maximizeHorizontally#

#if defined(ENABLE_OVERLOADING)
    WindowMaximizeHorizontallyMethodInfo    ,
#endif
    windowMaximizeHorizontally              ,


-- ** maximizeVertically #method:maximizeVertically#

#if defined(ENABLE_OVERLOADING)
    WindowMaximizeVerticallyMethodInfo      ,
#endif
    windowMaximizeVertically                ,


-- ** minimize #method:minimize#

#if defined(ENABLE_OVERLOADING)
    WindowMinimizeMethodInfo                ,
#endif
    windowMinimize                          ,


-- ** moveToWorkspace #method:moveToWorkspace#

#if defined(ENABLE_OVERLOADING)
    WindowMoveToWorkspaceMethodInfo         ,
#endif
    windowMoveToWorkspace                   ,


-- ** needsAttention #method:needsAttention#

#if defined(ENABLE_OVERLOADING)
    WindowNeedsAttentionMethodInfo          ,
#endif
    windowNeedsAttention                    ,


-- ** orTransientNeedsAttention #method:orTransientNeedsAttention#

#if defined(ENABLE_OVERLOADING)
    WindowOrTransientNeedsAttentionMethodInfo,
#endif
    windowOrTransientNeedsAttention         ,


-- ** pin #method:pin#

#if defined(ENABLE_OVERLOADING)
    WindowPinMethodInfo                     ,
#endif
    windowPin                               ,


-- ** setFullscreen #method:setFullscreen#

#if defined(ENABLE_OVERLOADING)
    WindowSetFullscreenMethodInfo           ,
#endif
    windowSetFullscreen                     ,


-- ** setGeometry #method:setGeometry#

#if defined(ENABLE_OVERLOADING)
    WindowSetGeometryMethodInfo             ,
#endif
    windowSetGeometry                       ,


-- ** setIconGeometry #method:setIconGeometry#

#if defined(ENABLE_OVERLOADING)
    WindowSetIconGeometryMethodInfo         ,
#endif
    windowSetIconGeometry                   ,


-- ** setSkipPager #method:setSkipPager#

#if defined(ENABLE_OVERLOADING)
    WindowSetSkipPagerMethodInfo            ,
#endif
    windowSetSkipPager                      ,


-- ** setSkipTasklist #method:setSkipTasklist#

#if defined(ENABLE_OVERLOADING)
    WindowSetSkipTasklistMethodInfo         ,
#endif
    windowSetSkipTasklist                   ,


-- ** setSortOrder #method:setSortOrder#

#if defined(ENABLE_OVERLOADING)
    WindowSetSortOrderMethodInfo            ,
#endif
    windowSetSortOrder                      ,


-- ** setWindowType #method:setWindowType#

#if defined(ENABLE_OVERLOADING)
    WindowSetWindowTypeMethodInfo           ,
#endif
    windowSetWindowType                     ,


-- ** shade #method:shade#

#if defined(ENABLE_OVERLOADING)
    WindowShadeMethodInfo                   ,
#endif
    windowShade                             ,


-- ** stick #method:stick#

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


-- ** transientIsMostRecentlyActivated #method:transientIsMostRecentlyActivated#

#if defined(ENABLE_OVERLOADING)
    WindowTransientIsMostRecentlyActivatedMethodInfo,
#endif
    windowTransientIsMostRecentlyActivated  ,


-- ** unmakeAbove #method:unmakeAbove#

#if defined(ENABLE_OVERLOADING)
    WindowUnmakeAboveMethodInfo             ,
#endif
    windowUnmakeAbove                       ,


-- ** unmakeBelow #method:unmakeBelow#

#if defined(ENABLE_OVERLOADING)
    WindowUnmakeBelowMethodInfo             ,
#endif
    windowUnmakeBelow                       ,


-- ** unmaximize #method:unmaximize#

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


-- ** unmaximizeHorizontally #method:unmaximizeHorizontally#

#if defined(ENABLE_OVERLOADING)
    WindowUnmaximizeHorizontallyMethodInfo  ,
#endif
    windowUnmaximizeHorizontally            ,


-- ** unmaximizeVertically #method:unmaximizeVertically#

#if defined(ENABLE_OVERLOADING)
    WindowUnmaximizeVerticallyMethodInfo    ,
#endif
    windowUnmaximizeVertically              ,


-- ** unminimize #method:unminimize#

#if defined(ENABLE_OVERLOADING)
    WindowUnminimizeMethodInfo              ,
#endif
    windowUnminimize                        ,


-- ** unpin #method:unpin#

#if defined(ENABLE_OVERLOADING)
    WindowUnpinMethodInfo                   ,
#endif
    windowUnpin                             ,


-- ** unshade #method:unshade#

#if defined(ENABLE_OVERLOADING)
    WindowUnshadeMethodInfo                 ,
#endif
    windowUnshade                           ,


-- ** unstick #method:unstick#

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




 -- * Signals
-- ** actionsChanged #signal:actionsChanged#

    C_WindowActionsChangedCallback          ,
    WindowActionsChangedCallback            ,
#if defined(ENABLE_OVERLOADING)
    WindowActionsChangedSignalInfo          ,
#endif
    afterWindowActionsChanged               ,
    genClosure_WindowActionsChanged         ,
    mk_WindowActionsChangedCallback         ,
    noWindowActionsChangedCallback          ,
    onWindowActionsChanged                  ,
    wrap_WindowActionsChangedCallback       ,


-- ** classChanged #signal:classChanged#

    C_WindowClassChangedCallback            ,
    WindowClassChangedCallback              ,
#if defined(ENABLE_OVERLOADING)
    WindowClassChangedSignalInfo            ,
#endif
    afterWindowClassChanged                 ,
    genClosure_WindowClassChanged           ,
    mk_WindowClassChangedCallback           ,
    noWindowClassChangedCallback            ,
    onWindowClassChanged                    ,
    wrap_WindowClassChangedCallback         ,


-- ** geometryChanged #signal:geometryChanged#

    C_WindowGeometryChangedCallback         ,
    WindowGeometryChangedCallback           ,
#if defined(ENABLE_OVERLOADING)
    WindowGeometryChangedSignalInfo         ,
#endif
    afterWindowGeometryChanged              ,
    genClosure_WindowGeometryChanged        ,
    mk_WindowGeometryChangedCallback        ,
    noWindowGeometryChangedCallback         ,
    onWindowGeometryChanged                 ,
    wrap_WindowGeometryChangedCallback      ,


-- ** iconChanged #signal:iconChanged#

    C_WindowIconChangedCallback             ,
    WindowIconChangedCallback               ,
#if defined(ENABLE_OVERLOADING)
    WindowIconChangedSignalInfo             ,
#endif
    afterWindowIconChanged                  ,
    genClosure_WindowIconChanged            ,
    mk_WindowIconChangedCallback            ,
    noWindowIconChangedCallback             ,
    onWindowIconChanged                     ,
    wrap_WindowIconChangedCallback          ,


-- ** nameChanged #signal:nameChanged#

    C_WindowNameChangedCallback             ,
    WindowNameChangedCallback               ,
#if defined(ENABLE_OVERLOADING)
    WindowNameChangedSignalInfo             ,
#endif
    afterWindowNameChanged                  ,
    genClosure_WindowNameChanged            ,
    mk_WindowNameChangedCallback            ,
    noWindowNameChangedCallback             ,
    onWindowNameChanged                     ,
    wrap_WindowNameChangedCallback          ,


-- ** roleChanged #signal:roleChanged#

    C_WindowRoleChangedCallback             ,
    WindowRoleChangedCallback               ,
#if defined(ENABLE_OVERLOADING)
    WindowRoleChangedSignalInfo             ,
#endif
    afterWindowRoleChanged                  ,
    genClosure_WindowRoleChanged            ,
    mk_WindowRoleChangedCallback            ,
    noWindowRoleChangedCallback             ,
    onWindowRoleChanged                     ,
    wrap_WindowRoleChangedCallback          ,


-- ** stateChanged #signal:stateChanged#

    C_WindowStateChangedCallback            ,
    WindowStateChangedCallback              ,
#if defined(ENABLE_OVERLOADING)
    WindowStateChangedSignalInfo            ,
#endif
    afterWindowStateChanged                 ,
    genClosure_WindowStateChanged           ,
    mk_WindowStateChangedCallback           ,
    noWindowStateChangedCallback            ,
    onWindowStateChanged                    ,
    wrap_WindowStateChangedCallback         ,


-- ** typeChanged #signal:typeChanged#

    C_WindowTypeChangedCallback             ,
    WindowTypeChangedCallback               ,
#if defined(ENABLE_OVERLOADING)
    WindowTypeChangedSignalInfo             ,
#endif
    afterWindowTypeChanged                  ,
    genClosure_WindowTypeChanged            ,
    mk_WindowTypeChangedCallback            ,
    noWindowTypeChangedCallback             ,
    onWindowTypeChanged                     ,
    wrap_WindowTypeChangedCallback          ,


-- ** workspaceChanged #signal:workspaceChanged#

    C_WindowWorkspaceChangedCallback        ,
    WindowWorkspaceChangedCallback          ,
#if defined(ENABLE_OVERLOADING)
    WindowWorkspaceChangedSignalInfo        ,
#endif
    afterWindowWorkspaceChanged             ,
    genClosure_WindowWorkspaceChanged       ,
    mk_WindowWorkspaceChangedCallback       ,
    noWindowWorkspaceChangedCallback        ,
    onWindowWorkspaceChanged                ,
    wrap_WindowWorkspaceChangedCallback     ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import {-# SOURCE #-} qualified GI.Wnck.Enums as Wnck.Enums
import {-# SOURCE #-} qualified GI.Wnck.Flags as Wnck.Flags
import {-# SOURCE #-} qualified GI.Wnck.Objects.Application as Wnck.Application
import {-# SOURCE #-} qualified GI.Wnck.Objects.ClassGroup as Wnck.ClassGroup
import {-# SOURCE #-} qualified GI.Wnck.Objects.Screen as Wnck.Screen
import {-# SOURCE #-} qualified GI.Wnck.Objects.Workspace as Wnck.Workspace

-- | 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 "wnck_window_get_type"
    c_wnck_window_get_type :: IO B.Types.GType

instance B.Types.TypedObject Window where
    glibType :: IO GType
glibType = IO GType
c_wnck_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_wnck_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 "activate" o = WindowActivateMethodInfo
    ResolveWindowMethod "activateTransient" o = WindowActivateTransientMethodInfo
    ResolveWindowMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWindowMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWindowMethod "close" o = WindowCloseMethodInfo
    ResolveWindowMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWindowMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWindowMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWindowMethod "hasIconName" o = WindowHasIconNameMethodInfo
    ResolveWindowMethod "hasName" o = WindowHasNameMethodInfo
    ResolveWindowMethod "isAbove" o = WindowIsAboveMethodInfo
    ResolveWindowMethod "isActive" o = WindowIsActiveMethodInfo
    ResolveWindowMethod "isBelow" o = WindowIsBelowMethodInfo
    ResolveWindowMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWindowMethod "isFullscreen" o = WindowIsFullscreenMethodInfo
    ResolveWindowMethod "isInViewport" o = WindowIsInViewportMethodInfo
    ResolveWindowMethod "isMaximized" o = WindowIsMaximizedMethodInfo
    ResolveWindowMethod "isMaximizedHorizontally" o = WindowIsMaximizedHorizontallyMethodInfo
    ResolveWindowMethod "isMaximizedVertically" o = WindowIsMaximizedVerticallyMethodInfo
    ResolveWindowMethod "isMinimized" o = WindowIsMinimizedMethodInfo
    ResolveWindowMethod "isMostRecentlyActivated" o = WindowIsMostRecentlyActivatedMethodInfo
    ResolveWindowMethod "isOnWorkspace" o = WindowIsOnWorkspaceMethodInfo
    ResolveWindowMethod "isPinned" o = WindowIsPinnedMethodInfo
    ResolveWindowMethod "isShaded" o = WindowIsShadedMethodInfo
    ResolveWindowMethod "isSkipPager" o = WindowIsSkipPagerMethodInfo
    ResolveWindowMethod "isSkipTasklist" o = WindowIsSkipTasklistMethodInfo
    ResolveWindowMethod "isSticky" o = WindowIsStickyMethodInfo
    ResolveWindowMethod "isVisibleOnWorkspace" o = WindowIsVisibleOnWorkspaceMethodInfo
    ResolveWindowMethod "keyboardMove" o = WindowKeyboardMoveMethodInfo
    ResolveWindowMethod "keyboardSize" o = WindowKeyboardSizeMethodInfo
    ResolveWindowMethod "makeAbove" o = WindowMakeAboveMethodInfo
    ResolveWindowMethod "makeBelow" o = WindowMakeBelowMethodInfo
    ResolveWindowMethod "maximize" o = WindowMaximizeMethodInfo
    ResolveWindowMethod "maximizeHorizontally" o = WindowMaximizeHorizontallyMethodInfo
    ResolveWindowMethod "maximizeVertically" o = WindowMaximizeVerticallyMethodInfo
    ResolveWindowMethod "minimize" o = WindowMinimizeMethodInfo
    ResolveWindowMethod "moveToWorkspace" o = WindowMoveToWorkspaceMethodInfo
    ResolveWindowMethod "needsAttention" o = WindowNeedsAttentionMethodInfo
    ResolveWindowMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWindowMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWindowMethod "orTransientNeedsAttention" o = WindowOrTransientNeedsAttentionMethodInfo
    ResolveWindowMethod "pin" o = WindowPinMethodInfo
    ResolveWindowMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWindowMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWindowMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWindowMethod "shade" o = WindowShadeMethodInfo
    ResolveWindowMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWindowMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWindowMethod "stick" o = WindowStickMethodInfo
    ResolveWindowMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWindowMethod "transientIsMostRecentlyActivated" o = WindowTransientIsMostRecentlyActivatedMethodInfo
    ResolveWindowMethod "unmakeAbove" o = WindowUnmakeAboveMethodInfo
    ResolveWindowMethod "unmakeBelow" o = WindowUnmakeBelowMethodInfo
    ResolveWindowMethod "unmaximize" o = WindowUnmaximizeMethodInfo
    ResolveWindowMethod "unmaximizeHorizontally" o = WindowUnmaximizeHorizontallyMethodInfo
    ResolveWindowMethod "unmaximizeVertically" o = WindowUnmaximizeVerticallyMethodInfo
    ResolveWindowMethod "unminimize" o = WindowUnminimizeMethodInfo
    ResolveWindowMethod "unpin" o = WindowUnpinMethodInfo
    ResolveWindowMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWindowMethod "unshade" o = WindowUnshadeMethodInfo
    ResolveWindowMethod "unstick" o = WindowUnstickMethodInfo
    ResolveWindowMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWindowMethod "getActions" o = WindowGetActionsMethodInfo
    ResolveWindowMethod "getApplication" o = WindowGetApplicationMethodInfo
    ResolveWindowMethod "getClassGroup" o = WindowGetClassGroupMethodInfo
    ResolveWindowMethod "getClassGroupName" o = WindowGetClassGroupNameMethodInfo
    ResolveWindowMethod "getClassInstanceName" o = WindowGetClassInstanceNameMethodInfo
    ResolveWindowMethod "getClientWindowGeometry" o = WindowGetClientWindowGeometryMethodInfo
    ResolveWindowMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWindowMethod "getGeometry" o = WindowGetGeometryMethodInfo
    ResolveWindowMethod "getGroupLeader" o = WindowGetGroupLeaderMethodInfo
    ResolveWindowMethod "getIcon" o = WindowGetIconMethodInfo
    ResolveWindowMethod "getIconIsFallback" o = WindowGetIconIsFallbackMethodInfo
    ResolveWindowMethod "getIconName" o = WindowGetIconNameMethodInfo
    ResolveWindowMethod "getMiniIcon" o = WindowGetMiniIconMethodInfo
    ResolveWindowMethod "getName" o = WindowGetNameMethodInfo
    ResolveWindowMethod "getPid" o = WindowGetPidMethodInfo
    ResolveWindowMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWindowMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWindowMethod "getRole" o = WindowGetRoleMethodInfo
    ResolveWindowMethod "getScreen" o = WindowGetScreenMethodInfo
    ResolveWindowMethod "getSessionId" o = WindowGetSessionIdMethodInfo
    ResolveWindowMethod "getSessionIdUtf8" o = WindowGetSessionIdUtf8MethodInfo
    ResolveWindowMethod "getSortOrder" o = WindowGetSortOrderMethodInfo
    ResolveWindowMethod "getState" o = WindowGetStateMethodInfo
    ResolveWindowMethod "getTransient" o = WindowGetTransientMethodInfo
    ResolveWindowMethod "getWindowType" o = WindowGetWindowTypeMethodInfo
    ResolveWindowMethod "getWorkspace" o = WindowGetWorkspaceMethodInfo
    ResolveWindowMethod "getXid" o = WindowGetXidMethodInfo
    ResolveWindowMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWindowMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWindowMethod "setFullscreen" o = WindowSetFullscreenMethodInfo
    ResolveWindowMethod "setGeometry" o = WindowSetGeometryMethodInfo
    ResolveWindowMethod "setIconGeometry" o = WindowSetIconGeometryMethodInfo
    ResolveWindowMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWindowMethod "setSkipPager" o = WindowSetSkipPagerMethodInfo
    ResolveWindowMethod "setSkipTasklist" o = WindowSetSkipTasklistMethodInfo
    ResolveWindowMethod "setSortOrder" o = WindowSetSortOrderMethodInfo
    ResolveWindowMethod "setWindowType" o = WindowSetWindowTypeMethodInfo
    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::actions-changed
-- | Emitted when the actions availabilities for /@window@/ change.
type WindowActionsChangedCallback =
    [Wnck.Flags.WindowActions]
    -- ^ /@changedMask@/: the bitmask containing bits set for all actions
    -- availabilities for /@window@/ that have changed.
    -> [Wnck.Flags.WindowActions]
    -- ^ /@newState@/: the new actions availabilities for /@window@/.
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowActionsChangedCallback`@.
noWindowActionsChangedCallback :: Maybe WindowActionsChangedCallback
noWindowActionsChangedCallback :: Maybe WindowActionsChangedCallback
noWindowActionsChangedCallback = Maybe WindowActionsChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowActionsChanged :: MonadIO m => WindowActionsChangedCallback -> m (GClosure C_WindowActionsChangedCallback)
genClosure_WindowActionsChanged :: WindowActionsChangedCallback
-> m (GClosure C_WindowActionsChangedCallback)
genClosure_WindowActionsChanged WindowActionsChangedCallback
cb = IO (GClosure C_WindowActionsChangedCallback)
-> m (GClosure C_WindowActionsChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowActionsChangedCallback)
 -> m (GClosure C_WindowActionsChangedCallback))
-> IO (GClosure C_WindowActionsChangedCallback)
-> m (GClosure C_WindowActionsChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowActionsChangedCallback
cb' = WindowActionsChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowActionsChangedCallback WindowActionsChangedCallback
cb
    C_WindowActionsChangedCallback
-> IO (FunPtr C_WindowActionsChangedCallback)
mk_WindowActionsChangedCallback C_WindowActionsChangedCallback
cb' IO (FunPtr C_WindowActionsChangedCallback)
-> (FunPtr C_WindowActionsChangedCallback
    -> IO (GClosure C_WindowActionsChangedCallback))
-> IO (GClosure C_WindowActionsChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowActionsChangedCallback
-> IO (GClosure C_WindowActionsChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowActionsChangedCallback` into a `C_WindowActionsChangedCallback`.
wrap_WindowActionsChangedCallback ::
    WindowActionsChangedCallback ->
    C_WindowActionsChangedCallback
wrap_WindowActionsChangedCallback :: WindowActionsChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowActionsChangedCallback WindowActionsChangedCallback
_cb Ptr ()
_ CUInt
changedMask CUInt
newState Ptr ()
_ = do
    let changedMask' :: [WindowActions]
changedMask' = CUInt -> [WindowActions]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
changedMask
    let newState' :: [WindowActions]
newState' = CUInt -> [WindowActions]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
newState
    WindowActionsChangedCallback
_cb  [WindowActions]
changedMask' [WindowActions]
newState'


-- | Connect a signal handler for the [actionsChanged](#signal:actionsChanged) 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 #actionsChanged callback
-- @
-- 
-- 
onWindowActionsChanged :: (IsWindow a, MonadIO m) => a -> WindowActionsChangedCallback -> m SignalHandlerId
onWindowActionsChanged :: a -> WindowActionsChangedCallback -> m SignalHandlerId
onWindowActionsChanged a
obj WindowActionsChangedCallback
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_WindowActionsChangedCallback
cb' = WindowActionsChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowActionsChangedCallback WindowActionsChangedCallback
cb
    FunPtr C_WindowActionsChangedCallback
cb'' <- C_WindowActionsChangedCallback
-> IO (FunPtr C_WindowActionsChangedCallback)
mk_WindowActionsChangedCallback C_WindowActionsChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowActionsChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"actions-changed" FunPtr C_WindowActionsChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [actionsChanged](#signal:actionsChanged) 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 #actionsChanged callback
-- @
-- 
-- 
afterWindowActionsChanged :: (IsWindow a, MonadIO m) => a -> WindowActionsChangedCallback -> m SignalHandlerId
afterWindowActionsChanged :: a -> WindowActionsChangedCallback -> m SignalHandlerId
afterWindowActionsChanged a
obj WindowActionsChangedCallback
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_WindowActionsChangedCallback
cb' = WindowActionsChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowActionsChangedCallback WindowActionsChangedCallback
cb
    FunPtr C_WindowActionsChangedCallback
cb'' <- C_WindowActionsChangedCallback
-> IO (FunPtr C_WindowActionsChangedCallback)
mk_WindowActionsChangedCallback C_WindowActionsChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowActionsChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"actions-changed" FunPtr C_WindowActionsChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowActionsChangedSignalInfo
instance SignalInfo WindowActionsChangedSignalInfo where
    type HaskellCallbackType WindowActionsChangedSignalInfo = WindowActionsChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowActionsChangedCallback cb
        cb'' <- mk_WindowActionsChangedCallback cb'
        connectSignalFunPtr obj "actions-changed" cb'' connectMode detail

#endif

-- signal Window::class-changed
-- | Emitted when the class name or instance name of /@window@/ changes.
type WindowClassChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowClassChangedCallback`@.
noWindowClassChangedCallback :: Maybe WindowClassChangedCallback
noWindowClassChangedCallback :: Maybe (IO ())
noWindowClassChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowClassChanged :: MonadIO m => WindowClassChangedCallback -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowClassChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowClassChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowClassChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowClassChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowClassChangedCallback` into a `C_WindowClassChangedCallback`.
wrap_WindowClassChangedCallback ::
    WindowClassChangedCallback ->
    C_WindowClassChangedCallback
wrap_WindowClassChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowClassChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [classChanged](#signal:classChanged) 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 #classChanged callback
-- @
-- 
-- 
onWindowClassChanged :: (IsWindow a, MonadIO m) => a -> WindowClassChangedCallback -> m SignalHandlerId
onWindowClassChanged :: a -> IO () -> m SignalHandlerId
onWindowClassChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowClassChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowClassChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"class-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [classChanged](#signal:classChanged) 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 #classChanged callback
-- @
-- 
-- 
afterWindowClassChanged :: (IsWindow a, MonadIO m) => a -> WindowClassChangedCallback -> m SignalHandlerId
afterWindowClassChanged :: a -> IO () -> m SignalHandlerId
afterWindowClassChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowClassChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowClassChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"class-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowClassChangedSignalInfo
instance SignalInfo WindowClassChangedSignalInfo where
    type HaskellCallbackType WindowClassChangedSignalInfo = WindowClassChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowClassChangedCallback cb
        cb'' <- mk_WindowClassChangedCallback cb'
        connectSignalFunPtr obj "class-changed" cb'' connectMode detail

#endif

-- signal Window::geometry-changed
-- | Emitted when the geometry of /@window@/ changes.
type WindowGeometryChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowGeometryChangedCallback`@.
noWindowGeometryChangedCallback :: Maybe WindowGeometryChangedCallback
noWindowGeometryChangedCallback :: Maybe (IO ())
noWindowGeometryChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowGeometryChanged :: MonadIO m => WindowGeometryChangedCallback -> m (GClosure C_WindowGeometryChangedCallback)
genClosure_WindowGeometryChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowGeometryChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowGeometryChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowGeometryChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowGeometryChangedCallback` into a `C_WindowGeometryChangedCallback`.
wrap_WindowGeometryChangedCallback ::
    WindowGeometryChangedCallback ->
    C_WindowGeometryChangedCallback
wrap_WindowGeometryChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowGeometryChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [geometryChanged](#signal:geometryChanged) 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 #geometryChanged callback
-- @
-- 
-- 
onWindowGeometryChanged :: (IsWindow a, MonadIO m) => a -> WindowGeometryChangedCallback -> m SignalHandlerId
onWindowGeometryChanged :: a -> IO () -> m SignalHandlerId
onWindowGeometryChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowGeometryChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowGeometryChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"geometry-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [geometryChanged](#signal:geometryChanged) 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 #geometryChanged callback
-- @
-- 
-- 
afterWindowGeometryChanged :: (IsWindow a, MonadIO m) => a -> WindowGeometryChangedCallback -> m SignalHandlerId
afterWindowGeometryChanged :: a -> IO () -> m SignalHandlerId
afterWindowGeometryChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowGeometryChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowGeometryChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"geometry-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowGeometryChangedSignalInfo
instance SignalInfo WindowGeometryChangedSignalInfo where
    type HaskellCallbackType WindowGeometryChangedSignalInfo = WindowGeometryChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowGeometryChangedCallback cb
        cb'' <- mk_WindowGeometryChangedCallback cb'
        connectSignalFunPtr obj "geometry-changed" cb'' connectMode detail

#endif

-- signal Window::icon-changed
-- | Emitted when the icon of /@window@/ changes.
type WindowIconChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowIconChangedCallback`@.
noWindowIconChangedCallback :: Maybe WindowIconChangedCallback
noWindowIconChangedCallback :: Maybe (IO ())
noWindowIconChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowIconChanged :: MonadIO m => WindowIconChangedCallback -> m (GClosure C_WindowIconChangedCallback)
genClosure_WindowIconChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowIconChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowIconChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowIconChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowIconChangedCallback` into a `C_WindowIconChangedCallback`.
wrap_WindowIconChangedCallback ::
    WindowIconChangedCallback ->
    C_WindowIconChangedCallback
wrap_WindowIconChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowIconChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [iconChanged](#signal:iconChanged) 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 #iconChanged callback
-- @
-- 
-- 
onWindowIconChanged :: (IsWindow a, MonadIO m) => a -> WindowIconChangedCallback -> m SignalHandlerId
onWindowIconChanged :: a -> IO () -> m SignalHandlerId
onWindowIconChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowIconChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowIconChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"icon-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [iconChanged](#signal:iconChanged) 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 #iconChanged callback
-- @
-- 
-- 
afterWindowIconChanged :: (IsWindow a, MonadIO m) => a -> WindowIconChangedCallback -> m SignalHandlerId
afterWindowIconChanged :: a -> IO () -> m SignalHandlerId
afterWindowIconChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowIconChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowIconChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"icon-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowIconChangedSignalInfo
instance SignalInfo WindowIconChangedSignalInfo where
    type HaskellCallbackType WindowIconChangedSignalInfo = WindowIconChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowIconChangedCallback cb
        cb'' <- mk_WindowIconChangedCallback cb'
        connectSignalFunPtr obj "icon-changed" cb'' connectMode detail

#endif

-- signal Window::name-changed
-- | Emitted when the name of /@window@/ changes.
type WindowNameChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowNameChangedCallback`@.
noWindowNameChangedCallback :: Maybe WindowNameChangedCallback
noWindowNameChangedCallback :: Maybe (IO ())
noWindowNameChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowNameChanged :: MonadIO m => WindowNameChangedCallback -> m (GClosure C_WindowNameChangedCallback)
genClosure_WindowNameChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowNameChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowNameChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowNameChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowNameChangedCallback` into a `C_WindowNameChangedCallback`.
wrap_WindowNameChangedCallback ::
    WindowNameChangedCallback ->
    C_WindowNameChangedCallback
wrap_WindowNameChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowNameChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [nameChanged](#signal:nameChanged) 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 #nameChanged callback
-- @
-- 
-- 
onWindowNameChanged :: (IsWindow a, MonadIO m) => a -> WindowNameChangedCallback -> m SignalHandlerId
onWindowNameChanged :: a -> IO () -> m SignalHandlerId
onWindowNameChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowNameChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowNameChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"name-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [nameChanged](#signal:nameChanged) 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 #nameChanged callback
-- @
-- 
-- 
afterWindowNameChanged :: (IsWindow a, MonadIO m) => a -> WindowNameChangedCallback -> m SignalHandlerId
afterWindowNameChanged :: a -> IO () -> m SignalHandlerId
afterWindowNameChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowNameChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowNameChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"name-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowNameChangedSignalInfo
instance SignalInfo WindowNameChangedSignalInfo where
    type HaskellCallbackType WindowNameChangedSignalInfo = WindowNameChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowNameChangedCallback cb
        cb'' <- mk_WindowNameChangedCallback cb'
        connectSignalFunPtr obj "name-changed" cb'' connectMode detail

#endif

-- signal Window::role-changed
-- | Emitted when the role of /@window@/ changes.
type WindowRoleChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowRoleChangedCallback`@.
noWindowRoleChangedCallback :: Maybe WindowRoleChangedCallback
noWindowRoleChangedCallback :: Maybe (IO ())
noWindowRoleChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowRoleChanged :: MonadIO m => WindowRoleChangedCallback -> m (GClosure C_WindowRoleChangedCallback)
genClosure_WindowRoleChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowRoleChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowRoleChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowRoleChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowRoleChangedCallback` into a `C_WindowRoleChangedCallback`.
wrap_WindowRoleChangedCallback ::
    WindowRoleChangedCallback ->
    C_WindowRoleChangedCallback
wrap_WindowRoleChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowRoleChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [roleChanged](#signal:roleChanged) 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 #roleChanged callback
-- @
-- 
-- 
onWindowRoleChanged :: (IsWindow a, MonadIO m) => a -> WindowRoleChangedCallback -> m SignalHandlerId
onWindowRoleChanged :: a -> IO () -> m SignalHandlerId
onWindowRoleChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowRoleChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowRoleChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"role-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [roleChanged](#signal:roleChanged) 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 #roleChanged callback
-- @
-- 
-- 
afterWindowRoleChanged :: (IsWindow a, MonadIO m) => a -> WindowRoleChangedCallback -> m SignalHandlerId
afterWindowRoleChanged :: a -> IO () -> m SignalHandlerId
afterWindowRoleChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowRoleChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowRoleChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"role-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowRoleChangedSignalInfo
instance SignalInfo WindowRoleChangedSignalInfo where
    type HaskellCallbackType WindowRoleChangedSignalInfo = WindowRoleChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowRoleChangedCallback cb
        cb'' <- mk_WindowRoleChangedCallback cb'
        connectSignalFunPtr obj "role-changed" cb'' connectMode detail

#endif

-- signal Window::state-changed
-- | Emitted when the state of /@window@/ changes. This can happen when /@window@/ is
-- (un)minimized, (un)maximized, (un)sticked, (un)shaded, (un)made above,
-- (un)made below, (un)set fullscreen, when it needs attention, etc. See
-- t'GI.Wnck.Flags.WindowState' for the complete list of states that might have changed.
type WindowStateChangedCallback =
    [Wnck.Flags.WindowState]
    -- ^ /@changedMask@/: the bitmask containing bits set for all states of /@window@/
    -- that have changed.
    -> [Wnck.Flags.WindowState]
    -- ^ /@newState@/: the new state of /@window@/.
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowStateChangedCallback`@.
noWindowStateChangedCallback :: Maybe WindowStateChangedCallback
noWindowStateChangedCallback :: Maybe WindowStateChangedCallback
noWindowStateChangedCallback = Maybe WindowStateChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowStateChanged :: MonadIO m => WindowStateChangedCallback -> m (GClosure C_WindowStateChangedCallback)
genClosure_WindowStateChanged :: WindowStateChangedCallback
-> m (GClosure C_WindowActionsChangedCallback)
genClosure_WindowStateChanged WindowStateChangedCallback
cb = IO (GClosure C_WindowActionsChangedCallback)
-> m (GClosure C_WindowActionsChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowActionsChangedCallback)
 -> m (GClosure C_WindowActionsChangedCallback))
-> IO (GClosure C_WindowActionsChangedCallback)
-> m (GClosure C_WindowActionsChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowActionsChangedCallback
cb' = WindowStateChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowStateChangedCallback WindowStateChangedCallback
cb
    C_WindowActionsChangedCallback
-> IO (FunPtr C_WindowActionsChangedCallback)
mk_WindowStateChangedCallback C_WindowActionsChangedCallback
cb' IO (FunPtr C_WindowActionsChangedCallback)
-> (FunPtr C_WindowActionsChangedCallback
    -> IO (GClosure C_WindowActionsChangedCallback))
-> IO (GClosure C_WindowActionsChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowActionsChangedCallback
-> IO (GClosure C_WindowActionsChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowStateChangedCallback` into a `C_WindowStateChangedCallback`.
wrap_WindowStateChangedCallback ::
    WindowStateChangedCallback ->
    C_WindowStateChangedCallback
wrap_WindowStateChangedCallback :: WindowStateChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowStateChangedCallback WindowStateChangedCallback
_cb Ptr ()
_ CUInt
changedMask CUInt
newState Ptr ()
_ = do
    let changedMask' :: [WindowState]
changedMask' = CUInt -> [WindowState]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
changedMask
    let newState' :: [WindowState]
newState' = CUInt -> [WindowState]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
newState
    WindowStateChangedCallback
_cb  [WindowState]
changedMask' [WindowState]
newState'


-- | Connect a signal handler for the [stateChanged](#signal:stateChanged) 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 #stateChanged callback
-- @
-- 
-- 
onWindowStateChanged :: (IsWindow a, MonadIO m) => a -> WindowStateChangedCallback -> m SignalHandlerId
onWindowStateChanged :: a -> WindowStateChangedCallback -> m SignalHandlerId
onWindowStateChanged a
obj WindowStateChangedCallback
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_WindowActionsChangedCallback
cb' = WindowStateChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowStateChangedCallback WindowStateChangedCallback
cb
    FunPtr C_WindowActionsChangedCallback
cb'' <- C_WindowActionsChangedCallback
-> IO (FunPtr C_WindowActionsChangedCallback)
mk_WindowStateChangedCallback C_WindowActionsChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowActionsChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"state-changed" FunPtr C_WindowActionsChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [stateChanged](#signal:stateChanged) 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 #stateChanged callback
-- @
-- 
-- 
afterWindowStateChanged :: (IsWindow a, MonadIO m) => a -> WindowStateChangedCallback -> m SignalHandlerId
afterWindowStateChanged :: a -> WindowStateChangedCallback -> m SignalHandlerId
afterWindowStateChanged a
obj WindowStateChangedCallback
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_WindowActionsChangedCallback
cb' = WindowStateChangedCallback -> C_WindowActionsChangedCallback
wrap_WindowStateChangedCallback WindowStateChangedCallback
cb
    FunPtr C_WindowActionsChangedCallback
cb'' <- C_WindowActionsChangedCallback
-> IO (FunPtr C_WindowActionsChangedCallback)
mk_WindowStateChangedCallback C_WindowActionsChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowActionsChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"state-changed" FunPtr C_WindowActionsChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowStateChangedSignalInfo
instance SignalInfo WindowStateChangedSignalInfo where
    type HaskellCallbackType WindowStateChangedSignalInfo = WindowStateChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowStateChangedCallback cb
        cb'' <- mk_WindowStateChangedCallback cb'
        connectSignalFunPtr obj "state-changed" cb'' connectMode detail

#endif

-- signal Window::type-changed
-- | Emitted when the EWMH type hint of the window changes.
-- 
-- /Since: 3.20/
type WindowTypeChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowTypeChangedCallback`@.
noWindowTypeChangedCallback :: Maybe WindowTypeChangedCallback
noWindowTypeChangedCallback :: Maybe (IO ())
noWindowTypeChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowTypeChanged :: MonadIO m => WindowTypeChangedCallback -> m (GClosure C_WindowTypeChangedCallback)
genClosure_WindowTypeChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowTypeChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowTypeChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowTypeChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowTypeChangedCallback` into a `C_WindowTypeChangedCallback`.
wrap_WindowTypeChangedCallback ::
    WindowTypeChangedCallback ->
    C_WindowTypeChangedCallback
wrap_WindowTypeChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowTypeChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [typeChanged](#signal:typeChanged) 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 #typeChanged callback
-- @
-- 
-- 
onWindowTypeChanged :: (IsWindow a, MonadIO m) => a -> WindowTypeChangedCallback -> m SignalHandlerId
onWindowTypeChanged :: a -> IO () -> m SignalHandlerId
onWindowTypeChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowTypeChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowTypeChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"type-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [typeChanged](#signal:typeChanged) 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 #typeChanged callback
-- @
-- 
-- 
afterWindowTypeChanged :: (IsWindow a, MonadIO m) => a -> WindowTypeChangedCallback -> m SignalHandlerId
afterWindowTypeChanged :: a -> IO () -> m SignalHandlerId
afterWindowTypeChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowTypeChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowTypeChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"type-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowTypeChangedSignalInfo
instance SignalInfo WindowTypeChangedSignalInfo where
    type HaskellCallbackType WindowTypeChangedSignalInfo = WindowTypeChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowTypeChangedCallback cb
        cb'' <- mk_WindowTypeChangedCallback cb'
        connectSignalFunPtr obj "type-changed" cb'' connectMode detail

#endif

-- signal Window::workspace-changed
-- | Emitted when the current workspace of /@window@/ changes, or if /@window@/ has
-- been pinned or unpinned.
type WindowWorkspaceChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WindowWorkspaceChangedCallback`@.
noWindowWorkspaceChangedCallback :: Maybe WindowWorkspaceChangedCallback
noWindowWorkspaceChangedCallback :: Maybe (IO ())
noWindowWorkspaceChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WindowWorkspaceChanged :: MonadIO m => WindowWorkspaceChangedCallback -> m (GClosure C_WindowWorkspaceChangedCallback)
genClosure_WindowWorkspaceChanged :: IO () -> m (GClosure C_WindowClassChangedCallback)
genClosure_WindowWorkspaceChanged IO ()
cb = IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowClassChangedCallback)
 -> m (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
-> m (GClosure C_WindowClassChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowWorkspaceChangedCallback IO ()
cb
    C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowWorkspaceChangedCallback C_WindowClassChangedCallback
cb' IO (FunPtr C_WindowClassChangedCallback)
-> (FunPtr C_WindowClassChangedCallback
    -> IO (GClosure C_WindowClassChangedCallback))
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowClassChangedCallback
-> IO (GClosure C_WindowClassChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WindowWorkspaceChangedCallback` into a `C_WindowWorkspaceChangedCallback`.
wrap_WindowWorkspaceChangedCallback ::
    WindowWorkspaceChangedCallback ->
    C_WindowWorkspaceChangedCallback
wrap_WindowWorkspaceChangedCallback :: IO () -> C_WindowClassChangedCallback
wrap_WindowWorkspaceChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [workspaceChanged](#signal:workspaceChanged) 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 #workspaceChanged callback
-- @
-- 
-- 
onWindowWorkspaceChanged :: (IsWindow a, MonadIO m) => a -> WindowWorkspaceChangedCallback -> m SignalHandlerId
onWindowWorkspaceChanged :: a -> IO () -> m SignalHandlerId
onWindowWorkspaceChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowWorkspaceChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowWorkspaceChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"workspace-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [workspaceChanged](#signal:workspaceChanged) 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 #workspaceChanged callback
-- @
-- 
-- 
afterWindowWorkspaceChanged :: (IsWindow a, MonadIO m) => a -> WindowWorkspaceChangedCallback -> m SignalHandlerId
afterWindowWorkspaceChanged :: a -> IO () -> m SignalHandlerId
afterWindowWorkspaceChanged a
obj IO ()
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_WindowClassChangedCallback
cb' = IO () -> C_WindowClassChangedCallback
wrap_WindowWorkspaceChangedCallback IO ()
cb
    FunPtr C_WindowClassChangedCallback
cb'' <- C_WindowClassChangedCallback
-> IO (FunPtr C_WindowClassChangedCallback)
mk_WindowWorkspaceChangedCallback C_WindowClassChangedCallback
cb'
    a
-> Text
-> FunPtr C_WindowClassChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"workspace-changed" FunPtr C_WindowClassChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WindowWorkspaceChangedSignalInfo
instance SignalInfo WindowWorkspaceChangedSignalInfo where
    type HaskellCallbackType WindowWorkspaceChangedSignalInfo = WindowWorkspaceChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WindowWorkspaceChangedCallback cb
        cb'' <- mk_WindowWorkspaceChangedCallback cb'
        connectSignalFunPtr obj "workspace-changed" cb'' connectMode detail

#endif

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

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Window = WindowSignalList
type WindowSignalList = ('[ '("actionsChanged", WindowActionsChangedSignalInfo), '("classChanged", WindowClassChangedSignalInfo), '("geometryChanged", WindowGeometryChangedSignalInfo), '("iconChanged", WindowIconChangedSignalInfo), '("nameChanged", WindowNameChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("roleChanged", WindowRoleChangedSignalInfo), '("stateChanged", WindowStateChangedSignalInfo), '("typeChanged", WindowTypeChangedSignalInfo), '("workspaceChanged", WindowWorkspaceChangedSignalInfo)] :: [(Symbol, *)])

#endif

-- method Window::activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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
--                       "the X server timestamp of the user interaction event that caused\nthis call to occur."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Asks the window manager to make /@window@/ the active window. The
-- window manager may choose to raise /@window@/ along with focusing it, and may
-- decide to refuse the request (to not steal the focus if there is a more
-- recent user activity, for example).
-- 
-- This function existed before 2.10, but the /@timestamp@/ argument was missing
-- in earlier versions.
-- 
-- /Since: 2.10/
windowActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> Word32
    -- ^ /@timestamp@/: the X server timestamp of the user interaction event that caused
    -- this call to occur.
    -> m ()
windowActivate :: a -> Word32 -> m ()
windowActivate 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 ()
wnck_window_activate 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 WindowActivateMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowActivateMethodInfo a signature where
    overloadedMethod = windowActivate

#endif

-- method Window::activate_transient
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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
--                       "the X server timestamp of the user interaction event that caused\nthis call to occur."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | If /@window@/ has transients, activates the most likely transient
-- instead of the window itself. Otherwise activates /@window@/.
-- 
-- FIXME the ideal behavior of this function is probably to activate
-- the most recently active window among /@window@/ and its transients.
-- This is probably best implemented on the window manager side.
-- 
-- This function existed before 2.10, but the /@timestamp@/ argument was missing
-- in earlier versions.
-- 
-- /Since: 2.10/
windowActivateTransient ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> Word32
    -- ^ /@timestamp@/: the X server timestamp of the user interaction event that caused
    -- this call to occur.
    -> m ()
windowActivateTransient :: a -> Word32 -> m ()
windowActivateTransient 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 ()
wnck_window_activate_transient 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 WindowActivateTransientMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowActivateTransientMethodInfo a signature where
    overloadedMethod = windowActivateTransient

#endif

-- method Window::close
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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
--                       "the X server timestamp of the user interaction event that caused\nthis call to occur."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Closes /@window@/.
-- 
-- This function existed before 2.6, but the /@timestamp@/ argument was missing
-- in earlier versions.
-- 
-- /Since: 2.6/
windowClose ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> Word32
    -- ^ /@timestamp@/: the X server timestamp of the user interaction event that caused
    -- this call to occur.
    -> m ()
windowClose :: a -> Word32 -> m ()
windowClose 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 ()
wnck_window_close 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 WindowCloseMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowCloseMethodInfo a signature where
    overloadedMethod = windowClose

#endif

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

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

-- | Gets the actions that can be done for /@window@/.
windowGetActions ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m [Wnck.Flags.WindowActions]
    -- ^ __Returns:__ bitmask of actions that can be done for /@window@/.
windowGetActions :: a -> m [WindowActions]
windowGetActions a
window = IO [WindowActions] -> m [WindowActions]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [WindowActions] -> m [WindowActions])
-> IO [WindowActions] -> m [WindowActions]
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
wnck_window_get_actions Ptr Window
window'
    let result' :: [WindowActions]
result' = CUInt -> [WindowActions]
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
    [WindowActions] -> IO [WindowActions]
forall (m :: * -> *) a. Monad m => a -> m a
return [WindowActions]
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetActionsMethodInfo
instance (signature ~ (m [Wnck.Flags.WindowActions]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetActionsMethodInfo a signature where
    overloadedMethod = windowGetActions

#endif

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

foreign import ccall "wnck_window_get_application" wnck_window_get_application :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO (Ptr Wnck.Application.Application)

-- | Gets the t'GI.Wnck.Objects.Application.Application' to which /@window@/ belongs.
windowGetApplication ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Wnck.Application.Application
    -- ^ __Returns:__ the t'GI.Wnck.Objects.Application.Application' to which /@window@/ belongs.
    -- The returned t'GI.Wnck.Objects.Application.Application' is owned by libwnck and must not be referenced
    -- or unreferenced.
windowGetApplication :: a -> m Application
windowGetApplication a
window = IO Application -> m Application
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Application -> m Application)
-> IO Application -> m Application
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 Application
result <- Ptr Window -> IO (Ptr Application)
wnck_window_get_application Ptr Window
window'
    Text -> Ptr Application -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetApplication" Ptr Application
result
    Application
result' <- ((ManagedPtr Application -> Application)
-> Ptr Application -> IO Application
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Application -> Application
Wnck.Application.Application) Ptr Application
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Application -> IO Application
forall (m :: * -> *) a. Monad m => a -> m a
return Application
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetApplicationMethodInfo
instance (signature ~ (m Wnck.Application.Application), MonadIO m, IsWindow a) => O.MethodInfo WindowGetApplicationMethodInfo a signature where
    overloadedMethod = windowGetApplication

#endif

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

foreign import ccall "wnck_window_get_class_group" wnck_window_get_class_group :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO (Ptr Wnck.ClassGroup.ClassGroup)

-- | Gets the t'GI.Wnck.Objects.ClassGroup.ClassGroup' to which /@window@/ belongs.
-- 
-- /Since: 2.2/
windowGetClassGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Wnck.ClassGroup.ClassGroup
    -- ^ __Returns:__ the t'GI.Wnck.Objects.ClassGroup.ClassGroup' to which /@window@/ belongs.
    -- The returned t'GI.Wnck.Objects.ClassGroup.ClassGroup' is owned by libwnck and must not be referenced
    -- or unreferenced.
windowGetClassGroup :: a -> m ClassGroup
windowGetClassGroup a
window = IO ClassGroup -> m ClassGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ClassGroup -> m ClassGroup) -> IO ClassGroup -> m ClassGroup
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 ClassGroup
result <- Ptr Window -> IO (Ptr ClassGroup)
wnck_window_get_class_group Ptr Window
window'
    Text -> Ptr ClassGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetClassGroup" Ptr ClassGroup
result
    ClassGroup
result' <- ((ManagedPtr ClassGroup -> ClassGroup)
-> Ptr ClassGroup -> IO ClassGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ClassGroup -> ClassGroup
Wnck.ClassGroup.ClassGroup) Ptr ClassGroup
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    ClassGroup -> IO ClassGroup
forall (m :: * -> *) a. Monad m => a -> m a
return ClassGroup
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetClassGroupMethodInfo
instance (signature ~ (m Wnck.ClassGroup.ClassGroup), MonadIO m, IsWindow a) => O.MethodInfo WindowGetClassGroupMethodInfo a signature where
    overloadedMethod = windowGetClassGroup

#endif

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

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

-- | Gets the class group name from the \<ulink
-- url=\"http:\/\/tronche.com\/gui\/x\/icccm\/sec-4.html&num;WM_CLASS\">WM_CLASS Property\<\/ulink>
-- for /@window@/.
-- 
-- The class group name is also the identifier name of the t'GI.Wnck.Objects.ClassGroup.ClassGroup' to
-- which /@window@/ belongs.
windowGetClassGroupName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m T.Text
    -- ^ __Returns:__ the class group name for /@window@/, or 'P.Nothing' if /@window@/ belongs
    -- to no class group.
windowGetClassGroupName :: a -> m Text
windowGetClassGroupName a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_class_group_name Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetClassGroupName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

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

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

-- | Gets the class instance name from the \<ulink
-- url=\"http:\/\/tronche.com\/gui\/x\/icccm\/sec-4.html&num;WM_CLASS\">WM_CLASS Property\<\/ulink>
-- for /@window@/.
-- 
-- The class instance name allows to differentiate windows belonging to the
-- same class group, so that they can use different resources.
windowGetClassInstanceName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m T.Text
    -- ^ __Returns:__ the class instance name for /@window@/, or 'P.Nothing' if /@window@/ has
    -- no class instance.
windowGetClassInstanceName :: a -> m Text
windowGetClassInstanceName a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_class_instance_name Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetClassInstanceName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

-- method Window::get_client_window_geometry
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "xp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for X coordinate in pixels of @window."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "yp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for Y coordinate in pixels of @window."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "widthp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for width in pixels of @window."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "heightp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for height in pixels 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 "wnck_window_get_client_window_geometry" wnck_window_get_client_window_geometry :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    Ptr Int32 ->                            -- xp : TBasicType TInt
    Ptr Int32 ->                            -- yp : TBasicType TInt
    Ptr Int32 ->                            -- widthp : TBasicType TInt
    Ptr Int32 ->                            -- heightp : TBasicType TInt
    IO ()

-- | Gets the size and position of /@window@/, as last received
-- in a ConfigureNotify event (i.e. this call does not round-trip
-- to the server, just gets the last size we were notified of).
-- The X and Y coordinates are relative to the root window.
-- 
-- The window manager usually adds a frame around windows. If
-- you need to know the size of /@window@/ with the frame, use
-- 'GI.Wnck.Objects.Window.windowGetGeometry'.
-- 
-- /Since: 2.20/
windowGetClientWindowGeometry ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m ((Int32, Int32, Int32, Int32))
windowGetClientWindowGeometry :: a -> m (Int32, Int32, Int32, Int32)
windowGetClientWindowGeometry 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
xp <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
yp <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
widthp <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
heightp <- 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 ()
wnck_window_get_client_window_geometry Ptr Window
window' Ptr Int32
xp Ptr Int32
yp Ptr Int32
widthp Ptr Int32
heightp
    Int32
xp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
xp
    Int32
yp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
yp
    Int32
widthp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
widthp
    Int32
heightp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
heightp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
xp
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
yp
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
widthp
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
heightp
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
xp', Int32
yp', Int32
widthp', Int32
heightp')

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

#endif

-- method Window::get_geometry
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "xp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for X coordinate in pixels of @window."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "yp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for Y coordinate in pixels of @window."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "widthp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for width in pixels of @window."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "heightp"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for height in pixels 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 "wnck_window_get_geometry" wnck_window_get_geometry :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    Ptr Int32 ->                            -- xp : TBasicType TInt
    Ptr Int32 ->                            -- yp : TBasicType TInt
    Ptr Int32 ->                            -- widthp : TBasicType TInt
    Ptr Int32 ->                            -- heightp : TBasicType TInt
    IO ()

-- | Gets the size and position of /@window@/, including decorations. This
-- function uses the information last received in a ConfigureNotify
-- event and adjusts it according to the size of the frame that is
-- added by the window manager (this call does not round-trip to the
-- server, it just gets the last sizes that were notified). The
-- X and Y coordinates are relative to the root window.
-- 
-- If you need to know the actual size of /@window@/ ignoring the frame
-- added by the window manager, use 'GI.Wnck.Objects.Window.windowGetClientWindowGeometry'.
windowGetGeometry ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.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
xp <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
yp <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
widthp <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
heightp <- 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 ()
wnck_window_get_geometry Ptr Window
window' Ptr Int32
xp Ptr Int32
yp Ptr Int32
widthp Ptr Int32
heightp
    Int32
xp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
xp
    Int32
yp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
yp
    Int32
widthp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
widthp
    Int32
heightp' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
heightp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
xp
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
yp
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
widthp
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
heightp
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
xp', Int32
yp', Int32
widthp', Int32
heightp')

#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_leader
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TULong)
-- throws : False
-- Skip return : False

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

-- | Gets the group leader of the group of windows to which /@window@/ belongs.
windowGetGroupLeader ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m CULong
    -- ^ __Returns:__ the group leader of the group of windows to which /@window@/
    -- belongs, or the X window ID of /@window@/ if /@window@/ does not belong to any
    -- group.
windowGetGroupLeader :: a -> m SignalHandlerId
windowGetGroupLeader a
window = 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
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    SignalHandlerId
result <- Ptr Window -> IO SignalHandlerId
wnck_window_get_group_leader Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    SignalHandlerId -> IO SignalHandlerId
forall (m :: * -> *) a. Monad m => a -> m a
return SignalHandlerId
result

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

#endif

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

foreign import ccall "wnck_window_get_icon" wnck_window_get_icon :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

-- | Gets the icon to be used for /@window@/. If no icon was found, a fallback
-- icon is used. 'GI.Wnck.Objects.Window.windowGetIconIsFallback' can be used to tell if the
-- icon is the fallback icon.
windowGetIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m GdkPixbuf.Pixbuf.Pixbuf
    -- ^ __Returns:__ the icon for /@window@/. The caller should
    -- reference the returned \<classname>GdkPixbuf\<\/classname> if it needs to keep
    -- the icon around.
windowGetIcon :: a -> m Pixbuf
windowGetIcon a
window = IO Pixbuf -> m Pixbuf
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
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
result <- Ptr Window -> IO (Ptr Pixbuf)
wnck_window_get_icon Ptr Window
window'
    Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetIcon" Ptr Pixbuf
result
    Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetIconMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsWindow a) => O.MethodInfo WindowGetIconMethodInfo a signature where
    overloadedMethod = windowGetIcon

#endif

-- method Window::get_icon_is_fallback
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_get_icon_is_fallback" wnck_window_get_icon_is_fallback :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether a default fallback icon is used for /@window@/ (because none
-- was set on /@window@/).
windowGetIconIsFallback ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the icon for /@window@/ is a fallback, 'P.False' otherwise.
windowGetIconIsFallback :: a -> m Bool
windowGetIconIsFallback 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
wnck_window_get_icon_is_fallback 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 WindowGetIconIsFallbackMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetIconIsFallbackMethodInfo a signature where
    overloadedMethod = windowGetIconIsFallback

#endif

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

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

-- | Gets the icon name of /@window@/, as it should be displayed for an icon
-- (minimized state). Always returns some value, even if /@window@/ has no icon
-- name set; use 'GI.Wnck.Objects.Window.windowHasIconName' if you need to know whether the
-- returned icon name is \"real\" or not.
-- 
-- Contrast with 'GI.Wnck.Objects.Window.windowGetName', which returns /@window@/\'s
-- title, not its icon title.
windowGetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'
    -> m T.Text
    -- ^ __Returns:__ the icon name of /@window@/, or a fallback icon name if no icon
    -- name is available.
windowGetIconName :: a -> m Text
windowGetIconName a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_icon_name Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetIconName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

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

foreign import ccall "wnck_window_get_mini_icon" wnck_window_get_mini_icon :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

-- | Gets the mini-icon to be used for /@window@/. If no mini-icon was found, a
-- fallback mini-icon is used. 'GI.Wnck.Objects.Window.windowGetIconIsFallback' can be used
-- to tell if the mini-icon is the fallback mini-icon.
windowGetMiniIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m GdkPixbuf.Pixbuf.Pixbuf
    -- ^ __Returns:__ the mini-icon for /@window@/. The caller should
    -- reference the returned \<classname>GdkPixbuf\<\/classname> if it needs to keep
    -- the icon around.
windowGetMiniIcon :: a -> m Pixbuf
windowGetMiniIcon a
window = IO Pixbuf -> m Pixbuf
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
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
result <- Ptr Window -> IO (Ptr Pixbuf)
wnck_window_get_mini_icon Ptr Window
window'
    Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetMiniIcon" Ptr Pixbuf
result
    Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetMiniIconMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsWindow a) => O.MethodInfo WindowGetMiniIconMethodInfo a signature where
    overloadedMethod = windowGetMiniIcon

#endif

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

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

-- | Gets the name of /@window@/, as it should be displayed in a pager
-- or tasklist. Always returns some value, even if /@window@/ has no name
-- set; use 'GI.Wnck.Objects.Window.windowHasName' if you need to know whether the returned
-- name is \"real\" or not.
-- 
-- For icons titles, use 'GI.Wnck.Objects.Window.windowGetIconName' instead.
windowGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m T.Text
    -- ^ __Returns:__ the name of /@window@/, or a fallback name if no name is
    -- available.
windowGetName :: a -> m Text
windowGetName a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_name Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

-- method Window::get_pid
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_get_pid" wnck_window_get_pid :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO Int32

-- | Gets the process ID of /@window@/.
windowGetPid ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Int32
    -- ^ __Returns:__ the process ID of /@window@/, or 0 if none is available.
windowGetPid :: a -> m Int32
windowGetPid 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
wnck_window_get_pid 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 WindowGetPidMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWindow a) => O.MethodInfo WindowGetPidMethodInfo a signature where
    overloadedMethod = windowGetPid

#endif

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

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

-- | Gets the role for /@window@/.
-- The role uniquely identifies a window among all windows that have the same
-- client leader window.
windowGetRole ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m T.Text
    -- ^ __Returns:__ role for /@window@/, or 'P.Nothing' if /@window@/ has no role.
windowGetRole :: a -> m Text
windowGetRole a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_role Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetRole" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

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

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

-- | Gets the t'GI.Wnck.Objects.Screen.Screen' /@window@/ is on.
windowGetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Wnck.Screen.Screen
    -- ^ __Returns:__ the t'GI.Wnck.Objects.Screen.Screen' /@window@/ is on. The returned
    -- t'GI.Wnck.Objects.Screen.Screen' is owned by libwnck and must not be referenced or unreferenced.
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)
wnck_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
Wnck.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 Wnck.Screen.Screen), MonadIO m, IsWindow a) => O.MethodInfo WindowGetScreenMethodInfo a signature where
    overloadedMethod = windowGetScreen

#endif

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

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

-- | Gets the session ID for /@window@/ in Latin-1 encoding.
-- NOTE: this is invalid UTF-8. You can\'t display this
-- string in a GTK+ widget without converting to UTF-8.
-- See 'GI.Wnck.Objects.Window.windowGetSessionIdUtf8'.
windowGetSessionId ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m T.Text
    -- ^ __Returns:__ the session ID for /@window@/ in Latin-1, or 'P.Nothing' if /@window@/ has
    -- no session ID.
windowGetSessionId :: a -> m Text
windowGetSessionId a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_session_id Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetSessionId" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

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

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

-- | Gets the session ID for /@window@/ in UTF-8 encoding.
-- The session ID should be in Latin-1 encoding, so the conversion should work,
-- but a broken client could set a session ID that might not be convertable to
-- UTF-8.
windowGetSessionIdUtf8 ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m T.Text
    -- ^ __Returns:__ the session ID for /@window@/ in UTF-8, or 'P.Nothing' if /@window@/ has
    -- no session ID.
windowGetSessionIdUtf8 :: a -> m Text
windowGetSessionIdUtf8 a
window = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Window -> IO CString
wnck_window_get_session_id_utf8 Ptr Window
window'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetSessionIdUtf8" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

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

#endif

-- method Window::get_sort_order
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_get_sort_order" wnck_window_get_sort_order :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO Int32

-- | Gets the sort order of /@window@/, used for ordering of /@window@/ in
-- t'GI.Wnck.Objects.Selector.Selector' and t'GI.Wnck.Objects.Tasklist.Tasklist'. The sort order is an internal state in
-- libwnck. The initial value is defined when the window is created.
-- 
-- /Since: 2.10/
windowGetSortOrder ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Int32
    -- ^ __Returns:__ the sort order of /@window@/, or G_MAXINT if none is available.
windowGetSortOrder :: a -> m Int32
windowGetSortOrder 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
wnck_window_get_sort_order 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 WindowGetSortOrderMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWindow a) => O.MethodInfo WindowGetSortOrderMethodInfo a signature where
    overloadedMethod = windowGetSortOrder

#endif

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

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

-- | Gets the state of /@window@/.
windowGetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m [Wnck.Flags.WindowState]
    -- ^ __Returns:__ bitmask of active states for /@window@/.
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
wnck_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 [Wnck.Flags.WindowState]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetStateMethodInfo a signature where
    overloadedMethod = windowGetState

#endif

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

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

-- | Gets the t'GI.Wnck.Objects.Window.Window' for which /@window@/ is transient.
-- 
-- /Since: 2.12/
windowGetTransient ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Window
    -- ^ __Returns:__ the t'GI.Wnck.Objects.Window.Window' for which /@window@/ is
    -- transient, or 'P.Nothing' if /@window@/ is not transient for any t'GI.Wnck.Objects.Window.Window'.
    -- The returned t'GI.Wnck.Objects.Window.Window' is owned by libwnck and must not be referenced or
    -- unreferenced.
windowGetTransient :: a -> m Window
windowGetTransient 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)
wnck_window_get_transient Ptr Window
window'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetTransient" 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 WindowGetTransientMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetTransientMethodInfo a signature where
    overloadedMethod = windowGetTransient

#endif

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

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

-- | Gets the semantic type of /@window@/.
windowGetWindowType ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Wnck.Enums.WindowType
    -- ^ __Returns:__ the semantic 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
wnck_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 Wnck.Enums.WindowType), MonadIO m, IsWindow a) => O.MethodInfo WindowGetWindowTypeMethodInfo a signature where
    overloadedMethod = windowGetWindowType

#endif

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

foreign import ccall "wnck_window_get_workspace" wnck_window_get_workspace :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO (Ptr Wnck.Workspace.Workspace)

-- | Gets the current workspace /@window@/ is on. If the window is pinned (on all
-- workspaces), or not on any workspaces, 'P.Nothing' may be returned.
windowGetWorkspace ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Wnck.Workspace.Workspace
    -- ^ __Returns:__ the single current workspace /@window@/ is on, or
    -- 'P.Nothing'. The returned t'GI.Wnck.Objects.Workspace.Workspace' is owned by libwnck and must not be
    -- referenced or unreferenced.
windowGetWorkspace :: a -> m Workspace
windowGetWorkspace a
window = IO Workspace -> m Workspace
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Workspace -> m Workspace) -> IO Workspace -> m Workspace
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 Workspace
result <- Ptr Window -> IO (Ptr Workspace)
wnck_window_get_workspace Ptr Window
window'
    Text -> Ptr Workspace -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetWorkspace" Ptr Workspace
result
    Workspace
result' <- ((ManagedPtr Workspace -> Workspace)
-> Ptr Workspace -> IO Workspace
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Workspace -> Workspace
Wnck.Workspace.Workspace) Ptr Workspace
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    Workspace -> IO Workspace
forall (m :: * -> *) a. Monad m => a -> m a
return Workspace
result'

#if defined(ENABLE_OVERLOADING)
data WindowGetWorkspaceMethodInfo
instance (signature ~ (m Wnck.Workspace.Workspace), MonadIO m, IsWindow a) => O.MethodInfo WindowGetWorkspaceMethodInfo a signature where
    overloadedMethod = windowGetWorkspace

#endif

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

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

-- | Gets the X window ID of /@window@/.
windowGetXid ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m CULong
    -- ^ __Returns:__ the X window ID of /@window@/.
windowGetXid :: a -> m SignalHandlerId
windowGetXid a
window = 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
    Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
    SignalHandlerId
result <- Ptr Window -> IO SignalHandlerId
wnck_window_get_xid Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
    SignalHandlerId -> IO SignalHandlerId
forall (m :: * -> *) a. Monad m => a -> m a
return SignalHandlerId
result

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

#endif

-- method Window::has_icon_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow" , 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 "wnck_window_has_icon_name" wnck_window_has_icon_name :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Checks whether or not /@window@/ has an icon name.
-- 'GI.Wnck.Objects.Window.windowGetIconName' will always return some value, even if
-- /@window@/ has no icon name set; 'GI.Wnck.Objects.Window.windowHasIconName' can
-- be used to tell if that icon name is real or not.
-- 
-- (Note that if 'GI.Wnck.Objects.Window.windowHasIconName' returns 'P.False', but
-- 'GI.Wnck.Objects.Window.windowHasName' returns 'P.True', then the name returned by
-- 'GI.Wnck.Objects.Window.windowGetIconName' is /@window@/\'s name. Only when both
-- methods return 'P.False' does 'GI.Wnck.Objects.Window.windowGetIconName' return a
-- generic fallback name.)
-- 
-- /Since: 2.16/
windowHasIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if 'GI.Wnck.Objects.Window.windowGetIconName' returns
    -- /@window@/\'s icon name, 'P.False' if it returns a fallback name.
windowHasIconName :: a -> m Bool
windowHasIconName 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
wnck_window_has_icon_name 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 WindowHasIconNameMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowHasIconNameMethodInfo a signature where
    overloadedMethod = windowHasIconName

#endif

-- method Window::has_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_has_name" wnck_window_has_name :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Checks whether or not /@window@/ has a name. 'GI.Wnck.Objects.Window.windowGetName'
-- will always return some value, even if /@window@/ has no name set;
-- 'GI.Wnck.Objects.Window.windowHasName' can be used to tell if that name is
-- real or not.
-- 
-- For icons titles, use 'GI.Wnck.Objects.Window.windowHasIconName' instead.
-- 
-- /Since: 2.16/
windowHasName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if 'GI.Wnck.Objects.Window.windowGetName' returns /@window@/\'s
    -- name, 'P.False' if it returns a fallback name.
windowHasName :: a -> m Bool
windowHasName 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
wnck_window_has_name 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 WindowHasNameMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowHasNameMethodInfo a signature where
    overloadedMethod = windowHasName

#endif

-- method Window::is_above
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_above" wnck_window_is_above :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is above other windows. This state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
-- 
-- See 'GI.Wnck.Objects.Window.windowMakeAbove' for more details on this state.
-- 
-- /Since: 2.14/
windowIsAbove ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is above other windows, 'P.False' otherwise.
windowIsAbove :: a -> m Bool
windowIsAbove 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
wnck_window_is_above 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 WindowIsAboveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsAboveMethodInfo a signature where
    overloadedMethod = windowIsAbove

#endif

-- method Window::is_active
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_active" wnck_window_is_active :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is the active window on its t'GI.Wnck.Objects.Screen.Screen'.
windowIsActive ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is the active window on its t'GI.Wnck.Objects.Screen.Screen',
    -- 'P.False' otherwise.
windowIsActive :: a -> m Bool
windowIsActive 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
wnck_window_is_active 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 WindowIsActiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsActiveMethodInfo a signature where
    overloadedMethod = windowIsActive

#endif

-- method Window::is_below
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_below" wnck_window_is_below :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is below other windows. This state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
-- 
-- See 'GI.Wnck.Objects.Window.windowMakeBelow' for more details on this state.
-- 
-- /Since: 2.20/
windowIsBelow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is below other windows, 'P.False' otherwise.
windowIsBelow :: a -> m Bool
windowIsBelow 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
wnck_window_is_below 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 WindowIsBelowMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsBelowMethodInfo a signature where
    overloadedMethod = windowIsBelow

#endif

-- method Window::is_fullscreen
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_fullscreen" wnck_window_is_fullscreen :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is fullscreen. Fullscreen state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
-- 
-- /Since: 2.8/
windowIsFullscreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is fullscreen, 'P.False' otherwise.
windowIsFullscreen :: a -> m Bool
windowIsFullscreen 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
wnck_window_is_fullscreen 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 WindowIsFullscreenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsFullscreenMethodInfo a signature where
    overloadedMethod = windowIsFullscreen

#endif

-- method Window::is_in_viewport
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "workspace"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Workspace" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWorkspace." , 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 "wnck_window_is_in_viewport" wnck_window_is_in_viewport :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    Ptr Wnck.Workspace.Workspace ->         -- workspace : TInterface (Name {namespace = "Wnck", name = "Workspace"})
    IO CInt

-- | Gets 'P.True' if /@window@/ appears in the current viewport of /@workspace@/.
-- 
-- /Since: 2.4/
windowIsInViewport ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Wnck.Workspace.IsWorkspace b) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> b
    -- ^ /@workspace@/: a t'GI.Wnck.Objects.Workspace.Workspace'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ appears in current viewport of /@workspace@/,
    -- 'P.False' otherwise.
windowIsInViewport :: a -> b -> m Bool
windowIsInViewport a
window b
workspace = 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 Workspace
workspace' <- b -> IO (Ptr Workspace)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
workspace
    CInt
result <- Ptr Window -> Ptr Workspace -> IO CInt
wnck_window_is_in_viewport Ptr Window
window' Ptr Workspace
workspace'
    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
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
workspace
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowIsInViewportMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWindow a, Wnck.Workspace.IsWorkspace b) => O.MethodInfo WindowIsInViewportMethodInfo a signature where
    overloadedMethod = windowIsInViewport

#endif

-- method Window::is_maximized
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_maximized" wnck_window_is_maximized :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is maximized. Maximization state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
-- 
-- As for GDK, \"maximized\" means both vertically and horizontally. If /@window@/
-- is maximized in only one direction, then /@window@/ is not considered
-- maximized.
windowIsMaximized ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is maximized in both directions, 'P.False'
    -- otherwise.
windowIsMaximized :: a -> m Bool
windowIsMaximized 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
wnck_window_is_maximized 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 WindowIsMaximizedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsMaximizedMethodInfo a signature where
    overloadedMethod = windowIsMaximized

#endif

-- method Window::is_maximized_horizontally
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_maximized_horizontally" wnck_window_is_maximized_horizontally :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is maximized horizontally. Horizontal maximization
-- state may change anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
windowIsMaximizedHorizontally ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is maximized horizontally, 'P.False' otherwise.
windowIsMaximizedHorizontally :: a -> m Bool
windowIsMaximizedHorizontally 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
wnck_window_is_maximized_horizontally 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 WindowIsMaximizedHorizontallyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsMaximizedHorizontallyMethodInfo a signature where
    overloadedMethod = windowIsMaximizedHorizontally

#endif

-- method Window::is_maximized_vertically
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_maximized_vertically" wnck_window_is_maximized_vertically :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is maximized vertically. vertiVal maximization
-- state may change anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
windowIsMaximizedVertically ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is maximized vertically, 'P.False' otherwise.
windowIsMaximizedVertically :: a -> m Bool
windowIsMaximizedVertically 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
wnck_window_is_maximized_vertically 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 WindowIsMaximizedVerticallyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsMaximizedVerticallyMethodInfo a signature where
    overloadedMethod = windowIsMaximizedVertically

#endif

-- method Window::is_minimized
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_minimized" wnck_window_is_minimized :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is minimized. Minimization state may change anytime
-- a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
windowIsMinimized ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is minimized, 'P.False' otherwise.
windowIsMinimized :: a -> m Bool
windowIsMinimized 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
wnck_window_is_minimized 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 WindowIsMinimizedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsMinimizedMethodInfo a signature where
    overloadedMethod = windowIsMinimized

#endif

-- method Window::is_most_recently_activated
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_most_recently_activated" wnck_window_is_most_recently_activated :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is the most recently activated window on its
-- t'GI.Wnck.Objects.Screen.Screen'.
-- 
-- The most recently activated window is identical to the active
-- window for click and sloppy focus methods (since a window is always
-- active in those cases) but differs slightly for mouse focus since
-- there often is no active window.
-- 
-- /Since: 2.8/
windowIsMostRecentlyActivated ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ was the most recently activated window on its
    -- t'GI.Wnck.Objects.Screen.Screen', 'P.False' otherwise.
windowIsMostRecentlyActivated :: a -> m Bool
windowIsMostRecentlyActivated 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
wnck_window_is_most_recently_activated 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 WindowIsMostRecentlyActivatedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsMostRecentlyActivatedMethodInfo a signature where
    overloadedMethod = windowIsMostRecentlyActivated

#endif

-- method Window::is_on_workspace
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "workspace"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Workspace" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWorkspace." , 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 "wnck_window_is_on_workspace" wnck_window_is_on_workspace :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    Ptr Wnck.Workspace.Workspace ->         -- workspace : TInterface (Name {namespace = "Wnck", name = "Workspace"})
    IO CInt

-- | Gets whether /@window@/ appears on /@workspace@/.
windowIsOnWorkspace ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Wnck.Workspace.IsWorkspace b) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> b
    -- ^ /@workspace@/: a t'GI.Wnck.Objects.Workspace.Workspace'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ appears on /@workspace@/, 'P.False' otherwise.
windowIsOnWorkspace :: a -> b -> m Bool
windowIsOnWorkspace a
window b
workspace = 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 Workspace
workspace' <- b -> IO (Ptr Workspace)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
workspace
    CInt
result <- Ptr Window -> Ptr Workspace -> IO CInt
wnck_window_is_on_workspace Ptr Window
window' Ptr Workspace
workspace'
    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
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
workspace
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowIsOnWorkspaceMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWindow a, Wnck.Workspace.IsWorkspace b) => O.MethodInfo WindowIsOnWorkspaceMethodInfo a signature where
    overloadedMethod = windowIsOnWorkspace

#endif

-- method Window::is_pinned
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_pinned" wnck_window_is_pinned :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is on all workspace. Pinned state may change
-- anytime a [workspaceChanged]("GI.Wnck.Objects.Window#g:signal:workspaceChanged") signal gets emitted, but not when
-- a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") gets emitted.
windowIsPinned ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is on all workspaces, 'P.False' otherwise.
windowIsPinned :: a -> m Bool
windowIsPinned 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
wnck_window_is_pinned 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 WindowIsPinnedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsPinnedMethodInfo a signature where
    overloadedMethod = windowIsPinned

#endif

-- method Window::is_shaded
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_shaded" wnck_window_is_shaded :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is shaded. Shade state may change anytime
-- a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
windowIsShaded ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is shaded, 'P.False' otherwise.
windowIsShaded :: a -> m Bool
windowIsShaded 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
wnck_window_is_shaded 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 WindowIsShadedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsShadedMethodInfo a signature where
    overloadedMethod = windowIsShaded

#endif

-- method Window::is_skip_pager
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_skip_pager" wnck_window_is_skip_pager :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is included on pagers. This state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
windowIsSkipPager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is included on pagers, 'P.False' otherwise.
windowIsSkipPager :: a -> m Bool
windowIsSkipPager 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
wnck_window_is_skip_pager 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 WindowIsSkipPagerMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsSkipPagerMethodInfo a signature where
    overloadedMethod = windowIsSkipPager

#endif

-- method Window::is_skip_tasklist
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_skip_tasklist" wnck_window_is_skip_tasklist :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is included on tasklists. This state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
windowIsSkipTasklist ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is included on tasklists, 'P.False' otherwise.
windowIsSkipTasklist :: a -> m Bool
windowIsSkipTasklist 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
wnck_window_is_skip_tasklist 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 WindowIsSkipTasklistMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsSkipTasklistMethodInfo a signature where
    overloadedMethod = windowIsSkipTasklist

#endif

-- method Window::is_sticky
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , 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 "wnck_window_is_sticky" wnck_window_is_sticky :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    IO CInt

-- | Gets whether /@window@/ is sticky. Sticky state may change
-- anytime a [stateChanged]("GI.Wnck.Objects.Window#g:signal:stateChanged") signal gets emitted.
-- 
-- Sticky here means \"stuck to the glass\", i.e. does not scroll with the
-- viewport. In GDK\/GTK+ (e.g. 'GI.Gdk.Objects.Window.windowStick'\/'GI.Gtk.Objects.Window.windowStick'), sticky
-- means \"stuck to the glass\" and \<emphasis>also\<\/emphasis> that the window is
-- on all workspaces. But here it only means the viewport aspect of it.
windowIsSticky ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ is \"stuck to the glass\", 'P.False' otherwise.
windowIsSticky :: a -> m Bool
windowIsSticky 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
wnck_window_is_sticky 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 WindowIsStickyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsStickyMethodInfo a signature where
    overloadedMethod = windowIsSticky

#endif

-- method Window::is_visible_on_workspace
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "window"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWindow." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "workspace"
--           , argType =
--               TInterface Name { namespace = "Wnck" , name = "Workspace" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WnckWorkspace." , 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 "wnck_window_is_visible_on_workspace" wnck_window_is_visible_on_workspace :: 
    Ptr Window ->                           -- window : TInterface (Name {namespace = "Wnck", name = "Window"})
    Ptr Wnck.Workspace.Workspace ->         -- workspace : TInterface (Name {namespace = "Wnck", name = "Workspace"})
    IO CInt

-- | Like 'GI.Wnck.Objects.Window.windowIsOnWorkspace', but also checks that
-- the window is in a visible state (i.e. not minimized or shaded).
windowIsVisibleOnWorkspace ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a, Wnck.Workspace.IsWorkspace b) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> b
    -- ^ /@workspace@/: a t'GI.Wnck.Objects.Workspace.Workspace'.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@window@/ appears on /@workspace@/ in normal state, 'P.False'
    -- otherwise.
windowIsVisibleOnWorkspace :: a -> b -> m Bool
windowIsVisibleOnWorkspace a
window b
workspace = 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 Workspace
workspace' <- b -> IO (Ptr Workspace)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
workspace
    CInt
result <- Ptr Window -> Ptr Workspace -> IO CInt
wnck_window_is_visible_on_workspace Ptr Window
window' Ptr Workspace
workspace'
    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
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
workspace
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WindowIsVisibleOnWorkspaceMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWindow a, Wnck.Workspace.IsWorkspace b) => O.MethodInfo WindowIsVisibleOnWorkspaceMethodInfo a signature where
    overloadedMethod = windowIsVisibleOnWorkspace

#endif

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

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

-- | Asks the window manager to start moving /@window@/ via the keyboard.
windowKeyboardMove ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m ()
windowKeyboardMove :: a -> m ()
windowKeyboardMove 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 ()
wnck_window_keyboard_move 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 WindowKeyboardMoveMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowKeyboardMoveMethodInfo a signature where
    overloadedMethod = windowKeyboardMove

#endif

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

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

-- | Asks the window manager to start resizing /@window@/ via the keyboard.
windowKeyboardSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a
    -- ^ /@window@/: a t'GI.Wnck.Objects.Window.Window'.
    -> m ()
windowKeyboardSize :: a -> m ()
windowKeyboardSize 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 ()
wnck_window_keyboard_size 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 WindowKeyboardSizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowKeyboardSizeMethodInfo a signature where
    overloadedMethod = windowKeyboardSize

#endif

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

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

-- | Asks the window manager to put /@window@/ on top of most windows (/@window@/ will
-- not be on top of focused fullscreen windows, of other windows with this
-- setting and of dock windows).
-- 
-- /Since: 2.14/
windowMakeAbove ::
    (B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
    a