{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

The 'GI.Wnck.Objects.Screen.Screen' struct contains only private fields and should not be
directly accessed.
-}

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

module GI.Wnck.Objects.Screen
    (

-- * Exported types
    Screen(..)                              ,
    IsScreen                                ,
    toScreen                                ,
    noScreen                                ,


 -- * Methods
-- ** calcWorkspaceLayout #method:calcWorkspaceLayout#

#if ENABLE_OVERLOADING
    ScreenCalcWorkspaceLayoutMethodInfo     ,
#endif
    screenCalcWorkspaceLayout               ,


-- ** changeWorkspaceCount #method:changeWorkspaceCount#

#if ENABLE_OVERLOADING
    ScreenChangeWorkspaceCountMethodInfo    ,
#endif
    screenChangeWorkspaceCount              ,


-- ** forceUpdate #method:forceUpdate#

#if ENABLE_OVERLOADING
    ScreenForceUpdateMethodInfo             ,
#endif
    screenForceUpdate                       ,


-- ** freeWorkspaceLayout #method:freeWorkspaceLayout#

    screenFreeWorkspaceLayout               ,


-- ** get #method:get#

    screenGet                               ,


-- ** getActiveWindow #method:getActiveWindow#

#if ENABLE_OVERLOADING
    ScreenGetActiveWindowMethodInfo         ,
#endif
    screenGetActiveWindow                   ,


-- ** getActiveWorkspace #method:getActiveWorkspace#

#if ENABLE_OVERLOADING
    ScreenGetActiveWorkspaceMethodInfo      ,
#endif
    screenGetActiveWorkspace                ,


-- ** getBackgroundPixmap #method:getBackgroundPixmap#

#if ENABLE_OVERLOADING
    ScreenGetBackgroundPixmapMethodInfo     ,
#endif
    screenGetBackgroundPixmap               ,


-- ** getDefault #method:getDefault#

    screenGetDefault                        ,


-- ** getForRoot #method:getForRoot#

    screenGetForRoot                        ,


-- ** getHeight #method:getHeight#

#if ENABLE_OVERLOADING
    ScreenGetHeightMethodInfo               ,
#endif
    screenGetHeight                         ,


-- ** getNumber #method:getNumber#

#if ENABLE_OVERLOADING
    ScreenGetNumberMethodInfo               ,
#endif
    screenGetNumber                         ,


-- ** getPreviouslyActiveWindow #method:getPreviouslyActiveWindow#

#if ENABLE_OVERLOADING
    ScreenGetPreviouslyActiveWindowMethodInfo,
#endif
    screenGetPreviouslyActiveWindow         ,


-- ** getShowingDesktop #method:getShowingDesktop#

#if ENABLE_OVERLOADING
    ScreenGetShowingDesktopMethodInfo       ,
#endif
    screenGetShowingDesktop                 ,


-- ** getWidth #method:getWidth#

#if ENABLE_OVERLOADING
    ScreenGetWidthMethodInfo                ,
#endif
    screenGetWidth                          ,


-- ** getWindowManagerName #method:getWindowManagerName#

#if ENABLE_OVERLOADING
    ScreenGetWindowManagerNameMethodInfo    ,
#endif
    screenGetWindowManagerName              ,


-- ** getWindows #method:getWindows#

#if ENABLE_OVERLOADING
    ScreenGetWindowsMethodInfo              ,
#endif
    screenGetWindows                        ,


-- ** getWindowsStacked #method:getWindowsStacked#

#if ENABLE_OVERLOADING
    ScreenGetWindowsStackedMethodInfo       ,
#endif
    screenGetWindowsStacked                 ,


-- ** getWorkspace #method:getWorkspace#

#if ENABLE_OVERLOADING
    ScreenGetWorkspaceMethodInfo            ,
#endif
    screenGetWorkspace                      ,


-- ** getWorkspaceCount #method:getWorkspaceCount#

#if ENABLE_OVERLOADING
    ScreenGetWorkspaceCountMethodInfo       ,
#endif
    screenGetWorkspaceCount                 ,


-- ** getWorkspaces #method:getWorkspaces#

#if ENABLE_OVERLOADING
    ScreenGetWorkspacesMethodInfo           ,
#endif
    screenGetWorkspaces                     ,


-- ** moveViewport #method:moveViewport#

#if ENABLE_OVERLOADING
    ScreenMoveViewportMethodInfo            ,
#endif
    screenMoveViewport                      ,


-- ** netWmSupports #method:netWmSupports#

#if ENABLE_OVERLOADING
    ScreenNetWmSupportsMethodInfo           ,
#endif
    screenNetWmSupports                     ,


-- ** releaseWorkspaceLayout #method:releaseWorkspaceLayout#

#if ENABLE_OVERLOADING
    ScreenReleaseWorkspaceLayoutMethodInfo  ,
#endif
    screenReleaseWorkspaceLayout            ,


-- ** toggleShowingDesktop #method:toggleShowingDesktop#

#if ENABLE_OVERLOADING
    ScreenToggleShowingDesktopMethodInfo    ,
#endif
    screenToggleShowingDesktop              ,


-- ** trySetWorkspaceLayout #method:trySetWorkspaceLayout#

#if ENABLE_OVERLOADING
    ScreenTrySetWorkspaceLayoutMethodInfo   ,
#endif
    screenTrySetWorkspaceLayout             ,




 -- * Signals
-- ** activeWindowChanged #signal:activeWindowChanged#

    C_ScreenActiveWindowChangedCallback     ,
    ScreenActiveWindowChangedCallback       ,
#if ENABLE_OVERLOADING
    ScreenActiveWindowChangedSignalInfo     ,
#endif
    afterScreenActiveWindowChanged          ,
    genClosure_ScreenActiveWindowChanged    ,
    mk_ScreenActiveWindowChangedCallback    ,
    noScreenActiveWindowChangedCallback     ,
    onScreenActiveWindowChanged             ,
    wrap_ScreenActiveWindowChangedCallback  ,


-- ** activeWorkspaceChanged #signal:activeWorkspaceChanged#

    C_ScreenActiveWorkspaceChangedCallback  ,
    ScreenActiveWorkspaceChangedCallback    ,
#if ENABLE_OVERLOADING
    ScreenActiveWorkspaceChangedSignalInfo  ,
#endif
    afterScreenActiveWorkspaceChanged       ,
    genClosure_ScreenActiveWorkspaceChanged ,
    mk_ScreenActiveWorkspaceChangedCallback ,
    noScreenActiveWorkspaceChangedCallback  ,
    onScreenActiveWorkspaceChanged          ,
    wrap_ScreenActiveWorkspaceChangedCallback,


-- ** applicationClosed #signal:applicationClosed#

    C_ScreenApplicationClosedCallback       ,
    ScreenApplicationClosedCallback         ,
#if ENABLE_OVERLOADING
    ScreenApplicationClosedSignalInfo       ,
#endif
    afterScreenApplicationClosed            ,
    genClosure_ScreenApplicationClosed      ,
    mk_ScreenApplicationClosedCallback      ,
    noScreenApplicationClosedCallback       ,
    onScreenApplicationClosed               ,
    wrap_ScreenApplicationClosedCallback    ,


-- ** applicationOpened #signal:applicationOpened#

    C_ScreenApplicationOpenedCallback       ,
    ScreenApplicationOpenedCallback         ,
#if ENABLE_OVERLOADING
    ScreenApplicationOpenedSignalInfo       ,
#endif
    afterScreenApplicationOpened            ,
    genClosure_ScreenApplicationOpened      ,
    mk_ScreenApplicationOpenedCallback      ,
    noScreenApplicationOpenedCallback       ,
    onScreenApplicationOpened               ,
    wrap_ScreenApplicationOpenedCallback    ,


-- ** backgroundChanged #signal:backgroundChanged#

    C_ScreenBackgroundChangedCallback       ,
    ScreenBackgroundChangedCallback         ,
#if ENABLE_OVERLOADING
    ScreenBackgroundChangedSignalInfo       ,
#endif
    afterScreenBackgroundChanged            ,
    genClosure_ScreenBackgroundChanged      ,
    mk_ScreenBackgroundChangedCallback      ,
    noScreenBackgroundChangedCallback       ,
    onScreenBackgroundChanged               ,
    wrap_ScreenBackgroundChangedCallback    ,


-- ** classGroupClosed #signal:classGroupClosed#

    C_ScreenClassGroupClosedCallback        ,
    ScreenClassGroupClosedCallback          ,
#if ENABLE_OVERLOADING
    ScreenClassGroupClosedSignalInfo        ,
#endif
    afterScreenClassGroupClosed             ,
    genClosure_ScreenClassGroupClosed       ,
    mk_ScreenClassGroupClosedCallback       ,
    noScreenClassGroupClosedCallback        ,
    onScreenClassGroupClosed                ,
    wrap_ScreenClassGroupClosedCallback     ,


-- ** classGroupOpened #signal:classGroupOpened#

    C_ScreenClassGroupOpenedCallback        ,
    ScreenClassGroupOpenedCallback          ,
#if ENABLE_OVERLOADING
    ScreenClassGroupOpenedSignalInfo        ,
#endif
    afterScreenClassGroupOpened             ,
    genClosure_ScreenClassGroupOpened       ,
    mk_ScreenClassGroupOpenedCallback       ,
    noScreenClassGroupOpenedCallback        ,
    onScreenClassGroupOpened                ,
    wrap_ScreenClassGroupOpenedCallback     ,


-- ** showingDesktopChanged #signal:showingDesktopChanged#

    C_ScreenShowingDesktopChangedCallback   ,
    ScreenShowingDesktopChangedCallback     ,
#if ENABLE_OVERLOADING
    ScreenShowingDesktopChangedSignalInfo   ,
#endif
    afterScreenShowingDesktopChanged        ,
    genClosure_ScreenShowingDesktopChanged  ,
    mk_ScreenShowingDesktopChangedCallback  ,
    noScreenShowingDesktopChangedCallback   ,
    onScreenShowingDesktopChanged           ,
    wrap_ScreenShowingDesktopChangedCallback,


-- ** viewportsChanged #signal:viewportsChanged#

    C_ScreenViewportsChangedCallback        ,
    ScreenViewportsChangedCallback          ,
#if ENABLE_OVERLOADING
    ScreenViewportsChangedSignalInfo        ,
#endif
    afterScreenViewportsChanged             ,
    genClosure_ScreenViewportsChanged       ,
    mk_ScreenViewportsChangedCallback       ,
    noScreenViewportsChangedCallback        ,
    onScreenViewportsChanged                ,
    wrap_ScreenViewportsChangedCallback     ,


-- ** windowClosed #signal:windowClosed#

    C_ScreenWindowClosedCallback            ,
    ScreenWindowClosedCallback              ,
#if ENABLE_OVERLOADING
    ScreenWindowClosedSignalInfo            ,
#endif
    afterScreenWindowClosed                 ,
    genClosure_ScreenWindowClosed           ,
    mk_ScreenWindowClosedCallback           ,
    noScreenWindowClosedCallback            ,
    onScreenWindowClosed                    ,
    wrap_ScreenWindowClosedCallback         ,


-- ** windowManagerChanged #signal:windowManagerChanged#

    C_ScreenWindowManagerChangedCallback    ,
    ScreenWindowManagerChangedCallback      ,
#if ENABLE_OVERLOADING
    ScreenWindowManagerChangedSignalInfo    ,
#endif
    afterScreenWindowManagerChanged         ,
    genClosure_ScreenWindowManagerChanged   ,
    mk_ScreenWindowManagerChangedCallback   ,
    noScreenWindowManagerChangedCallback    ,
    onScreenWindowManagerChanged            ,
    wrap_ScreenWindowManagerChangedCallback ,


-- ** windowOpened #signal:windowOpened#

    C_ScreenWindowOpenedCallback            ,
    ScreenWindowOpenedCallback              ,
#if ENABLE_OVERLOADING
    ScreenWindowOpenedSignalInfo            ,
#endif
    afterScreenWindowOpened                 ,
    genClosure_ScreenWindowOpened           ,
    mk_ScreenWindowOpenedCallback           ,
    noScreenWindowOpenedCallback            ,
    onScreenWindowOpened                    ,
    wrap_ScreenWindowOpenedCallback         ,


-- ** windowStackingChanged #signal:windowStackingChanged#

    C_ScreenWindowStackingChangedCallback   ,
    ScreenWindowStackingChangedCallback     ,
#if ENABLE_OVERLOADING
    ScreenWindowStackingChangedSignalInfo   ,
#endif
    afterScreenWindowStackingChanged        ,
    genClosure_ScreenWindowStackingChanged  ,
    mk_ScreenWindowStackingChangedCallback  ,
    noScreenWindowStackingChangedCallback   ,
    onScreenWindowStackingChanged           ,
    wrap_ScreenWindowStackingChangedCallback,


-- ** workspaceCreated #signal:workspaceCreated#

    C_ScreenWorkspaceCreatedCallback        ,
    ScreenWorkspaceCreatedCallback          ,
#if ENABLE_OVERLOADING
    ScreenWorkspaceCreatedSignalInfo        ,
#endif
    afterScreenWorkspaceCreated             ,
    genClosure_ScreenWorkspaceCreated       ,
    mk_ScreenWorkspaceCreatedCallback       ,
    noScreenWorkspaceCreatedCallback        ,
    onScreenWorkspaceCreated                ,
    wrap_ScreenWorkspaceCreatedCallback     ,


-- ** workspaceDestroyed #signal:workspaceDestroyed#

    C_ScreenWorkspaceDestroyedCallback      ,
    ScreenWorkspaceDestroyedCallback        ,
#if ENABLE_OVERLOADING
    ScreenWorkspaceDestroyedSignalInfo      ,
#endif
    afterScreenWorkspaceDestroyed           ,
    genClosure_ScreenWorkspaceDestroyed     ,
    mk_ScreenWorkspaceDestroyedCallback     ,
    noScreenWorkspaceDestroyedCallback      ,
    onScreenWorkspaceDestroyed              ,
    wrap_ScreenWorkspaceDestroyedCallback   ,




    ) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.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 {-# 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.Window as Wnck.Window
import {-# SOURCE #-} qualified GI.Wnck.Objects.Workspace as Wnck.Workspace
import {-# SOURCE #-} qualified GI.Wnck.Structs.WorkspaceLayout as Wnck.WorkspaceLayout

-- | Memory-managed wrapper type.
newtype Screen = Screen (ManagedPtr Screen)
foreign import ccall "wnck_screen_get_type"
    c_wnck_screen_get_type :: IO GType

instance GObject Screen where
    gobjectType = c_wnck_screen_get_type


-- | Type class for types which can be safely cast to `Screen`, for instance with `toScreen`.
class (GObject o, O.IsDescendantOf Screen o) => IsScreen o
instance (GObject o, O.IsDescendantOf Screen o) => IsScreen o

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

-- | Cast to `Screen`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toScreen :: (MonadIO m, IsScreen o) => o -> m Screen
toScreen = liftIO . unsafeCastTo Screen

-- | A convenience alias for `Nothing` :: `Maybe` `Screen`.
noScreen :: Maybe Screen
noScreen = Nothing

#if ENABLE_OVERLOADING
type family ResolveScreenMethod (t :: Symbol) (o :: *) :: * where
    ResolveScreenMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveScreenMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveScreenMethod "calcWorkspaceLayout" o = ScreenCalcWorkspaceLayoutMethodInfo
    ResolveScreenMethod "changeWorkspaceCount" o = ScreenChangeWorkspaceCountMethodInfo
    ResolveScreenMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveScreenMethod "forceUpdate" o = ScreenForceUpdateMethodInfo
    ResolveScreenMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveScreenMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveScreenMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveScreenMethod "moveViewport" o = ScreenMoveViewportMethodInfo
    ResolveScreenMethod "netWmSupports" o = ScreenNetWmSupportsMethodInfo
    ResolveScreenMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveScreenMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveScreenMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveScreenMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveScreenMethod "releaseWorkspaceLayout" o = ScreenReleaseWorkspaceLayoutMethodInfo
    ResolveScreenMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveScreenMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveScreenMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveScreenMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveScreenMethod "toggleShowingDesktop" o = ScreenToggleShowingDesktopMethodInfo
    ResolveScreenMethod "trySetWorkspaceLayout" o = ScreenTrySetWorkspaceLayoutMethodInfo
    ResolveScreenMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveScreenMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveScreenMethod "getActiveWindow" o = ScreenGetActiveWindowMethodInfo
    ResolveScreenMethod "getActiveWorkspace" o = ScreenGetActiveWorkspaceMethodInfo
    ResolveScreenMethod "getBackgroundPixmap" o = ScreenGetBackgroundPixmapMethodInfo
    ResolveScreenMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveScreenMethod "getHeight" o = ScreenGetHeightMethodInfo
    ResolveScreenMethod "getNumber" o = ScreenGetNumberMethodInfo
    ResolveScreenMethod "getPreviouslyActiveWindow" o = ScreenGetPreviouslyActiveWindowMethodInfo
    ResolveScreenMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveScreenMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveScreenMethod "getShowingDesktop" o = ScreenGetShowingDesktopMethodInfo
    ResolveScreenMethod "getWidth" o = ScreenGetWidthMethodInfo
    ResolveScreenMethod "getWindowManagerName" o = ScreenGetWindowManagerNameMethodInfo
    ResolveScreenMethod "getWindows" o = ScreenGetWindowsMethodInfo
    ResolveScreenMethod "getWindowsStacked" o = ScreenGetWindowsStackedMethodInfo
    ResolveScreenMethod "getWorkspace" o = ScreenGetWorkspaceMethodInfo
    ResolveScreenMethod "getWorkspaceCount" o = ScreenGetWorkspaceCountMethodInfo
    ResolveScreenMethod "getWorkspaces" o = ScreenGetWorkspacesMethodInfo
    ResolveScreenMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveScreenMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveScreenMethod l o = O.MethodResolutionFailed l o

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

#endif

-- signal Screen::active-window-changed
{- |
Emitted when the active window on /@screen@/ has changed.
-}
type ScreenActiveWindowChangedCallback =
    Wnck.Window.Window
    {- ^ /@previouslyActiveWindow@/: the previously active 'GI.Wnck.Objects.Window.Window' before this
change. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenActiveWindowChangedCallback`@.
noScreenActiveWindowChangedCallback :: Maybe ScreenActiveWindowChangedCallback
noScreenActiveWindowChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenActiveWindowChanged :: MonadIO m => ScreenActiveWindowChangedCallback -> m (GClosure C_ScreenActiveWindowChangedCallback)
genClosure_ScreenActiveWindowChanged cb = liftIO $ do
    let cb' = wrap_ScreenActiveWindowChangedCallback cb
    mk_ScreenActiveWindowChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenActiveWindowChangedCallback` into a `C_ScreenActiveWindowChangedCallback`.
wrap_ScreenActiveWindowChangedCallback ::
    ScreenActiveWindowChangedCallback ->
    C_ScreenActiveWindowChangedCallback
wrap_ScreenActiveWindowChangedCallback _cb _ previouslyActiveWindow _ = do
    previouslyActiveWindow' <- (newObject Wnck.Window.Window) previouslyActiveWindow
    _cb  previouslyActiveWindow'


{- |
Connect a signal handler for the “@active-window-changed@” 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' screen #activeWindowChanged callback
@
-}
onScreenActiveWindowChanged :: (IsScreen a, MonadIO m) => a -> ScreenActiveWindowChangedCallback -> m SignalHandlerId
onScreenActiveWindowChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenActiveWindowChangedCallback cb
    cb'' <- mk_ScreenActiveWindowChangedCallback cb'
    connectSignalFunPtr obj "active-window-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@active-window-changed@” 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' screen #activeWindowChanged callback
@
-}
afterScreenActiveWindowChanged :: (IsScreen a, MonadIO m) => a -> ScreenActiveWindowChangedCallback -> m SignalHandlerId
afterScreenActiveWindowChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenActiveWindowChangedCallback cb
    cb'' <- mk_ScreenActiveWindowChangedCallback cb'
    connectSignalFunPtr obj "active-window-changed" cb'' SignalConnectAfter


-- signal Screen::active-workspace-changed
{- |
Emitted when the active workspace on /@screen@/ has changed.
-}
type ScreenActiveWorkspaceChangedCallback =
    Wnck.Workspace.Workspace
    {- ^ /@previouslyActiveSpace@/: the previously active 'GI.Wnck.Objects.Workspace.Workspace' before this
change. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenActiveWorkspaceChangedCallback`@.
noScreenActiveWorkspaceChangedCallback :: Maybe ScreenActiveWorkspaceChangedCallback
noScreenActiveWorkspaceChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenActiveWorkspaceChanged :: MonadIO m => ScreenActiveWorkspaceChangedCallback -> m (GClosure C_ScreenActiveWorkspaceChangedCallback)
genClosure_ScreenActiveWorkspaceChanged cb = liftIO $ do
    let cb' = wrap_ScreenActiveWorkspaceChangedCallback cb
    mk_ScreenActiveWorkspaceChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenActiveWorkspaceChangedCallback` into a `C_ScreenActiveWorkspaceChangedCallback`.
wrap_ScreenActiveWorkspaceChangedCallback ::
    ScreenActiveWorkspaceChangedCallback ->
    C_ScreenActiveWorkspaceChangedCallback
wrap_ScreenActiveWorkspaceChangedCallback _cb _ previouslyActiveSpace _ = do
    previouslyActiveSpace' <- (newObject Wnck.Workspace.Workspace) previouslyActiveSpace
    _cb  previouslyActiveSpace'


{- |
Connect a signal handler for the “@active-workspace-changed@” 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' screen #activeWorkspaceChanged callback
@
-}
onScreenActiveWorkspaceChanged :: (IsScreen a, MonadIO m) => a -> ScreenActiveWorkspaceChangedCallback -> m SignalHandlerId
onScreenActiveWorkspaceChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenActiveWorkspaceChangedCallback cb
    cb'' <- mk_ScreenActiveWorkspaceChangedCallback cb'
    connectSignalFunPtr obj "active-workspace-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@active-workspace-changed@” 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' screen #activeWorkspaceChanged callback
@
-}
afterScreenActiveWorkspaceChanged :: (IsScreen a, MonadIO m) => a -> ScreenActiveWorkspaceChangedCallback -> m SignalHandlerId
afterScreenActiveWorkspaceChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenActiveWorkspaceChangedCallback cb
    cb'' <- mk_ScreenActiveWorkspaceChangedCallback cb'
    connectSignalFunPtr obj "active-workspace-changed" cb'' SignalConnectAfter


-- signal Screen::application-closed
{- |
Emitted when a 'GI.Wnck.Objects.Application.Application' is closed on /@screen@/.
-}
type ScreenApplicationClosedCallback =
    Wnck.Application.Application
    {- ^ /@app@/: the closed 'GI.Wnck.Objects.Application.Application'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenApplicationClosedCallback`@.
noScreenApplicationClosedCallback :: Maybe ScreenApplicationClosedCallback
noScreenApplicationClosedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenApplicationClosed :: MonadIO m => ScreenApplicationClosedCallback -> m (GClosure C_ScreenApplicationClosedCallback)
genClosure_ScreenApplicationClosed cb = liftIO $ do
    let cb' = wrap_ScreenApplicationClosedCallback cb
    mk_ScreenApplicationClosedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenApplicationClosedCallback` into a `C_ScreenApplicationClosedCallback`.
wrap_ScreenApplicationClosedCallback ::
    ScreenApplicationClosedCallback ->
    C_ScreenApplicationClosedCallback
wrap_ScreenApplicationClosedCallback _cb _ app _ = do
    app' <- (newObject Wnck.Application.Application) app
    _cb  app'


{- |
Connect a signal handler for the “@application-closed@” 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' screen #applicationClosed callback
@
-}
onScreenApplicationClosed :: (IsScreen a, MonadIO m) => a -> ScreenApplicationClosedCallback -> m SignalHandlerId
onScreenApplicationClosed obj cb = liftIO $ do
    let cb' = wrap_ScreenApplicationClosedCallback cb
    cb'' <- mk_ScreenApplicationClosedCallback cb'
    connectSignalFunPtr obj "application-closed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@application-closed@” 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' screen #applicationClosed callback
@
-}
afterScreenApplicationClosed :: (IsScreen a, MonadIO m) => a -> ScreenApplicationClosedCallback -> m SignalHandlerId
afterScreenApplicationClosed obj cb = liftIO $ do
    let cb' = wrap_ScreenApplicationClosedCallback cb
    cb'' <- mk_ScreenApplicationClosedCallback cb'
    connectSignalFunPtr obj "application-closed" cb'' SignalConnectAfter


-- signal Screen::application-opened
{- |
Emitted when a new 'GI.Wnck.Objects.Application.Application' is opened on /@screen@/.
-}
type ScreenApplicationOpenedCallback =
    Wnck.Application.Application
    {- ^ /@app@/: the opened 'GI.Wnck.Objects.Application.Application'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenApplicationOpenedCallback`@.
noScreenApplicationOpenedCallback :: Maybe ScreenApplicationOpenedCallback
noScreenApplicationOpenedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenApplicationOpened :: MonadIO m => ScreenApplicationOpenedCallback -> m (GClosure C_ScreenApplicationOpenedCallback)
genClosure_ScreenApplicationOpened cb = liftIO $ do
    let cb' = wrap_ScreenApplicationOpenedCallback cb
    mk_ScreenApplicationOpenedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenApplicationOpenedCallback` into a `C_ScreenApplicationOpenedCallback`.
wrap_ScreenApplicationOpenedCallback ::
    ScreenApplicationOpenedCallback ->
    C_ScreenApplicationOpenedCallback
wrap_ScreenApplicationOpenedCallback _cb _ app _ = do
    app' <- (newObject Wnck.Application.Application) app
    _cb  app'


{- |
Connect a signal handler for the “@application-opened@” 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' screen #applicationOpened callback
@
-}
onScreenApplicationOpened :: (IsScreen a, MonadIO m) => a -> ScreenApplicationOpenedCallback -> m SignalHandlerId
onScreenApplicationOpened obj cb = liftIO $ do
    let cb' = wrap_ScreenApplicationOpenedCallback cb
    cb'' <- mk_ScreenApplicationOpenedCallback cb'
    connectSignalFunPtr obj "application-opened" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@application-opened@” 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' screen #applicationOpened callback
@
-}
afterScreenApplicationOpened :: (IsScreen a, MonadIO m) => a -> ScreenApplicationOpenedCallback -> m SignalHandlerId
afterScreenApplicationOpened obj cb = liftIO $ do
    let cb' = wrap_ScreenApplicationOpenedCallback cb
    cb'' <- mk_ScreenApplicationOpenedCallback cb'
    connectSignalFunPtr obj "application-opened" cb'' SignalConnectAfter


-- signal Screen::background-changed
{- |
Emitted when the background on the root window of /@screen@/ has changed.
-}
type ScreenBackgroundChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenBackgroundChangedCallback`@.
noScreenBackgroundChangedCallback :: Maybe ScreenBackgroundChangedCallback
noScreenBackgroundChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenBackgroundChanged :: MonadIO m => ScreenBackgroundChangedCallback -> m (GClosure C_ScreenBackgroundChangedCallback)
genClosure_ScreenBackgroundChanged cb = liftIO $ do
    let cb' = wrap_ScreenBackgroundChangedCallback cb
    mk_ScreenBackgroundChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenBackgroundChangedCallback` into a `C_ScreenBackgroundChangedCallback`.
wrap_ScreenBackgroundChangedCallback ::
    ScreenBackgroundChangedCallback ->
    C_ScreenBackgroundChangedCallback
wrap_ScreenBackgroundChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@background-changed@” 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' screen #backgroundChanged callback
@
-}
onScreenBackgroundChanged :: (IsScreen a, MonadIO m) => a -> ScreenBackgroundChangedCallback -> m SignalHandlerId
onScreenBackgroundChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenBackgroundChangedCallback cb
    cb'' <- mk_ScreenBackgroundChangedCallback cb'
    connectSignalFunPtr obj "background-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@background-changed@” 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' screen #backgroundChanged callback
@
-}
afterScreenBackgroundChanged :: (IsScreen a, MonadIO m) => a -> ScreenBackgroundChangedCallback -> m SignalHandlerId
afterScreenBackgroundChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenBackgroundChangedCallback cb
    cb'' <- mk_ScreenBackgroundChangedCallback cb'
    connectSignalFunPtr obj "background-changed" cb'' SignalConnectAfter


-- signal Screen::class-group-closed
{- |
Emitted when a 'GI.Wnck.Objects.ClassGroup.ClassGroup' is closed on /@screen@/.

/Since: 2.20/
-}
type ScreenClassGroupClosedCallback =
    Wnck.ClassGroup.ClassGroup
    {- ^ /@classGroup@/: the closed 'GI.Wnck.Objects.ClassGroup.ClassGroup'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenClassGroupClosedCallback`@.
noScreenClassGroupClosedCallback :: Maybe ScreenClassGroupClosedCallback
noScreenClassGroupClosedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenClassGroupClosed :: MonadIO m => ScreenClassGroupClosedCallback -> m (GClosure C_ScreenClassGroupClosedCallback)
genClosure_ScreenClassGroupClosed cb = liftIO $ do
    let cb' = wrap_ScreenClassGroupClosedCallback cb
    mk_ScreenClassGroupClosedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenClassGroupClosedCallback` into a `C_ScreenClassGroupClosedCallback`.
wrap_ScreenClassGroupClosedCallback ::
    ScreenClassGroupClosedCallback ->
    C_ScreenClassGroupClosedCallback
wrap_ScreenClassGroupClosedCallback _cb _ classGroup _ = do
    classGroup' <- (newObject Wnck.ClassGroup.ClassGroup) classGroup
    _cb  classGroup'


{- |
Connect a signal handler for the “@class-group-closed@” 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' screen #classGroupClosed callback
@
-}
onScreenClassGroupClosed :: (IsScreen a, MonadIO m) => a -> ScreenClassGroupClosedCallback -> m SignalHandlerId
onScreenClassGroupClosed obj cb = liftIO $ do
    let cb' = wrap_ScreenClassGroupClosedCallback cb
    cb'' <- mk_ScreenClassGroupClosedCallback cb'
    connectSignalFunPtr obj "class-group-closed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@class-group-closed@” 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' screen #classGroupClosed callback
@
-}
afterScreenClassGroupClosed :: (IsScreen a, MonadIO m) => a -> ScreenClassGroupClosedCallback -> m SignalHandlerId
afterScreenClassGroupClosed obj cb = liftIO $ do
    let cb' = wrap_ScreenClassGroupClosedCallback cb
    cb'' <- mk_ScreenClassGroupClosedCallback cb'
    connectSignalFunPtr obj "class-group-closed" cb'' SignalConnectAfter


-- signal Screen::class-group-opened
{- |
Emitted when a new 'GI.Wnck.Objects.ClassGroup.ClassGroup' is opened on /@screen@/.

/Since: 2.20/
-}
type ScreenClassGroupOpenedCallback =
    Wnck.ClassGroup.ClassGroup
    {- ^ /@classGroup@/: the opened 'GI.Wnck.Objects.ClassGroup.ClassGroup'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenClassGroupOpenedCallback`@.
noScreenClassGroupOpenedCallback :: Maybe ScreenClassGroupOpenedCallback
noScreenClassGroupOpenedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenClassGroupOpened :: MonadIO m => ScreenClassGroupOpenedCallback -> m (GClosure C_ScreenClassGroupOpenedCallback)
genClosure_ScreenClassGroupOpened cb = liftIO $ do
    let cb' = wrap_ScreenClassGroupOpenedCallback cb
    mk_ScreenClassGroupOpenedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenClassGroupOpenedCallback` into a `C_ScreenClassGroupOpenedCallback`.
wrap_ScreenClassGroupOpenedCallback ::
    ScreenClassGroupOpenedCallback ->
    C_ScreenClassGroupOpenedCallback
wrap_ScreenClassGroupOpenedCallback _cb _ classGroup _ = do
    classGroup' <- (newObject Wnck.ClassGroup.ClassGroup) classGroup
    _cb  classGroup'


{- |
Connect a signal handler for the “@class-group-opened@” 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' screen #classGroupOpened callback
@
-}
onScreenClassGroupOpened :: (IsScreen a, MonadIO m) => a -> ScreenClassGroupOpenedCallback -> m SignalHandlerId
onScreenClassGroupOpened obj cb = liftIO $ do
    let cb' = wrap_ScreenClassGroupOpenedCallback cb
    cb'' <- mk_ScreenClassGroupOpenedCallback cb'
    connectSignalFunPtr obj "class-group-opened" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@class-group-opened@” 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' screen #classGroupOpened callback
@
-}
afterScreenClassGroupOpened :: (IsScreen a, MonadIO m) => a -> ScreenClassGroupOpenedCallback -> m SignalHandlerId
afterScreenClassGroupOpened obj cb = liftIO $ do
    let cb' = wrap_ScreenClassGroupOpenedCallback cb
    cb'' <- mk_ScreenClassGroupOpenedCallback cb'
    connectSignalFunPtr obj "class-group-opened" cb'' SignalConnectAfter


-- signal Screen::showing-desktop-changed
{- |
Emitted when \"showing the desktop\" mode of /@screen@/ is toggled.

/Since: 2.20/
-}
type ScreenShowingDesktopChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenShowingDesktopChangedCallback`@.
noScreenShowingDesktopChangedCallback :: Maybe ScreenShowingDesktopChangedCallback
noScreenShowingDesktopChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenShowingDesktopChanged :: MonadIO m => ScreenShowingDesktopChangedCallback -> m (GClosure C_ScreenShowingDesktopChangedCallback)
genClosure_ScreenShowingDesktopChanged cb = liftIO $ do
    let cb' = wrap_ScreenShowingDesktopChangedCallback cb
    mk_ScreenShowingDesktopChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenShowingDesktopChangedCallback` into a `C_ScreenShowingDesktopChangedCallback`.
wrap_ScreenShowingDesktopChangedCallback ::
    ScreenShowingDesktopChangedCallback ->
    C_ScreenShowingDesktopChangedCallback
wrap_ScreenShowingDesktopChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@showing-desktop-changed@” 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' screen #showingDesktopChanged callback
@
-}
onScreenShowingDesktopChanged :: (IsScreen a, MonadIO m) => a -> ScreenShowingDesktopChangedCallback -> m SignalHandlerId
onScreenShowingDesktopChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenShowingDesktopChangedCallback cb
    cb'' <- mk_ScreenShowingDesktopChangedCallback cb'
    connectSignalFunPtr obj "showing-desktop-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@showing-desktop-changed@” 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' screen #showingDesktopChanged callback
@
-}
afterScreenShowingDesktopChanged :: (IsScreen a, MonadIO m) => a -> ScreenShowingDesktopChangedCallback -> m SignalHandlerId
afterScreenShowingDesktopChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenShowingDesktopChangedCallback cb
    cb'' <- mk_ScreenShowingDesktopChangedCallback cb'
    connectSignalFunPtr obj "showing-desktop-changed" cb'' SignalConnectAfter


-- signal Screen::viewports-changed
{- |
Emitted when a viewport position has changed in a 'GI.Wnck.Objects.Workspace.Workspace' of
/@screen@/ or when a 'GI.Wnck.Objects.Workspace.Workspace' of /@screen@/ gets or loses its viewport.

/Since: 2.20/
-}
type ScreenViewportsChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenViewportsChangedCallback`@.
noScreenViewportsChangedCallback :: Maybe ScreenViewportsChangedCallback
noScreenViewportsChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenViewportsChanged :: MonadIO m => ScreenViewportsChangedCallback -> m (GClosure C_ScreenViewportsChangedCallback)
genClosure_ScreenViewportsChanged cb = liftIO $ do
    let cb' = wrap_ScreenViewportsChangedCallback cb
    mk_ScreenViewportsChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenViewportsChangedCallback` into a `C_ScreenViewportsChangedCallback`.
wrap_ScreenViewportsChangedCallback ::
    ScreenViewportsChangedCallback ->
    C_ScreenViewportsChangedCallback
wrap_ScreenViewportsChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@viewports-changed@” 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' screen #viewportsChanged callback
@
-}
onScreenViewportsChanged :: (IsScreen a, MonadIO m) => a -> ScreenViewportsChangedCallback -> m SignalHandlerId
onScreenViewportsChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenViewportsChangedCallback cb
    cb'' <- mk_ScreenViewportsChangedCallback cb'
    connectSignalFunPtr obj "viewports-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@viewports-changed@” 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' screen #viewportsChanged callback
@
-}
afterScreenViewportsChanged :: (IsScreen a, MonadIO m) => a -> ScreenViewportsChangedCallback -> m SignalHandlerId
afterScreenViewportsChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenViewportsChangedCallback cb
    cb'' <- mk_ScreenViewportsChangedCallback cb'
    connectSignalFunPtr obj "viewports-changed" cb'' SignalConnectAfter


-- signal Screen::window-closed
{- |
Emitted when a 'GI.Wnck.Objects.Window.Window' is closed on /@screen@/.
-}
type ScreenWindowClosedCallback =
    Wnck.Window.Window
    {- ^ /@window@/: the closed 'GI.Wnck.Objects.Window.Window'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenWindowClosedCallback`@.
noScreenWindowClosedCallback :: Maybe ScreenWindowClosedCallback
noScreenWindowClosedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenWindowClosed :: MonadIO m => ScreenWindowClosedCallback -> m (GClosure C_ScreenWindowClosedCallback)
genClosure_ScreenWindowClosed cb = liftIO $ do
    let cb' = wrap_ScreenWindowClosedCallback cb
    mk_ScreenWindowClosedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenWindowClosedCallback` into a `C_ScreenWindowClosedCallback`.
wrap_ScreenWindowClosedCallback ::
    ScreenWindowClosedCallback ->
    C_ScreenWindowClosedCallback
wrap_ScreenWindowClosedCallback _cb _ window _ = do
    window' <- (newObject Wnck.Window.Window) window
    _cb  window'


{- |
Connect a signal handler for the “@window-closed@” 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' screen #windowClosed callback
@
-}
onScreenWindowClosed :: (IsScreen a, MonadIO m) => a -> ScreenWindowClosedCallback -> m SignalHandlerId
onScreenWindowClosed obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowClosedCallback cb
    cb'' <- mk_ScreenWindowClosedCallback cb'
    connectSignalFunPtr obj "window-closed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@window-closed@” 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' screen #windowClosed callback
@
-}
afterScreenWindowClosed :: (IsScreen a, MonadIO m) => a -> ScreenWindowClosedCallback -> m SignalHandlerId
afterScreenWindowClosed obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowClosedCallback cb
    cb'' <- mk_ScreenWindowClosedCallback cb'
    connectSignalFunPtr obj "window-closed" cb'' SignalConnectAfter


-- signal Screen::window-manager-changed
{- |
Emitted when the window manager on /@screen@/ has changed.

/Since: 2.20/
-}
type ScreenWindowManagerChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenWindowManagerChangedCallback`@.
noScreenWindowManagerChangedCallback :: Maybe ScreenWindowManagerChangedCallback
noScreenWindowManagerChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenWindowManagerChanged :: MonadIO m => ScreenWindowManagerChangedCallback -> m (GClosure C_ScreenWindowManagerChangedCallback)
genClosure_ScreenWindowManagerChanged cb = liftIO $ do
    let cb' = wrap_ScreenWindowManagerChangedCallback cb
    mk_ScreenWindowManagerChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenWindowManagerChangedCallback` into a `C_ScreenWindowManagerChangedCallback`.
wrap_ScreenWindowManagerChangedCallback ::
    ScreenWindowManagerChangedCallback ->
    C_ScreenWindowManagerChangedCallback
wrap_ScreenWindowManagerChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@window-manager-changed@” 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' screen #windowManagerChanged callback
@
-}
onScreenWindowManagerChanged :: (IsScreen a, MonadIO m) => a -> ScreenWindowManagerChangedCallback -> m SignalHandlerId
onScreenWindowManagerChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowManagerChangedCallback cb
    cb'' <- mk_ScreenWindowManagerChangedCallback cb'
    connectSignalFunPtr obj "window-manager-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@window-manager-changed@” 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' screen #windowManagerChanged callback
@
-}
afterScreenWindowManagerChanged :: (IsScreen a, MonadIO m) => a -> ScreenWindowManagerChangedCallback -> m SignalHandlerId
afterScreenWindowManagerChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowManagerChangedCallback cb
    cb'' <- mk_ScreenWindowManagerChangedCallback cb'
    connectSignalFunPtr obj "window-manager-changed" cb'' SignalConnectAfter


-- signal Screen::window-opened
{- |
Emitted when a new 'GI.Wnck.Objects.Window.Window' is opened on /@screen@/.
-}
type ScreenWindowOpenedCallback =
    Wnck.Window.Window
    {- ^ /@window@/: the opened 'GI.Wnck.Objects.Window.Window'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenWindowOpenedCallback`@.
noScreenWindowOpenedCallback :: Maybe ScreenWindowOpenedCallback
noScreenWindowOpenedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenWindowOpened :: MonadIO m => ScreenWindowOpenedCallback -> m (GClosure C_ScreenWindowOpenedCallback)
genClosure_ScreenWindowOpened cb = liftIO $ do
    let cb' = wrap_ScreenWindowOpenedCallback cb
    mk_ScreenWindowOpenedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenWindowOpenedCallback` into a `C_ScreenWindowOpenedCallback`.
wrap_ScreenWindowOpenedCallback ::
    ScreenWindowOpenedCallback ->
    C_ScreenWindowOpenedCallback
wrap_ScreenWindowOpenedCallback _cb _ window _ = do
    window' <- (newObject Wnck.Window.Window) window
    _cb  window'


{- |
Connect a signal handler for the “@window-opened@” 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' screen #windowOpened callback
@
-}
onScreenWindowOpened :: (IsScreen a, MonadIO m) => a -> ScreenWindowOpenedCallback -> m SignalHandlerId
onScreenWindowOpened obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowOpenedCallback cb
    cb'' <- mk_ScreenWindowOpenedCallback cb'
    connectSignalFunPtr obj "window-opened" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@window-opened@” 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' screen #windowOpened callback
@
-}
afterScreenWindowOpened :: (IsScreen a, MonadIO m) => a -> ScreenWindowOpenedCallback -> m SignalHandlerId
afterScreenWindowOpened obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowOpenedCallback cb
    cb'' <- mk_ScreenWindowOpenedCallback cb'
    connectSignalFunPtr obj "window-opened" cb'' SignalConnectAfter


-- signal Screen::window-stacking-changed
{- |
Emitted when the stacking order of 'GI.Wnck.Objects.Window.Window' on /@screen@/ has changed.
-}
type ScreenWindowStackingChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenWindowStackingChangedCallback`@.
noScreenWindowStackingChangedCallback :: Maybe ScreenWindowStackingChangedCallback
noScreenWindowStackingChangedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenWindowStackingChanged :: MonadIO m => ScreenWindowStackingChangedCallback -> m (GClosure C_ScreenWindowStackingChangedCallback)
genClosure_ScreenWindowStackingChanged cb = liftIO $ do
    let cb' = wrap_ScreenWindowStackingChangedCallback cb
    mk_ScreenWindowStackingChangedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenWindowStackingChangedCallback` into a `C_ScreenWindowStackingChangedCallback`.
wrap_ScreenWindowStackingChangedCallback ::
    ScreenWindowStackingChangedCallback ->
    C_ScreenWindowStackingChangedCallback
wrap_ScreenWindowStackingChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@window-stacking-changed@” 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' screen #windowStackingChanged callback
@
-}
onScreenWindowStackingChanged :: (IsScreen a, MonadIO m) => a -> ScreenWindowStackingChangedCallback -> m SignalHandlerId
onScreenWindowStackingChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowStackingChangedCallback cb
    cb'' <- mk_ScreenWindowStackingChangedCallback cb'
    connectSignalFunPtr obj "window-stacking-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@window-stacking-changed@” 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' screen #windowStackingChanged callback
@
-}
afterScreenWindowStackingChanged :: (IsScreen a, MonadIO m) => a -> ScreenWindowStackingChangedCallback -> m SignalHandlerId
afterScreenWindowStackingChanged obj cb = liftIO $ do
    let cb' = wrap_ScreenWindowStackingChangedCallback cb
    cb'' <- mk_ScreenWindowStackingChangedCallback cb'
    connectSignalFunPtr obj "window-stacking-changed" cb'' SignalConnectAfter


-- signal Screen::workspace-created
{- |
Emitted when a 'GI.Wnck.Objects.Workspace.Workspace' is created on /@screen@/.
-}
type ScreenWorkspaceCreatedCallback =
    Wnck.Workspace.Workspace
    {- ^ /@space@/: the workspace that has been created. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenWorkspaceCreatedCallback`@.
noScreenWorkspaceCreatedCallback :: Maybe ScreenWorkspaceCreatedCallback
noScreenWorkspaceCreatedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenWorkspaceCreated :: MonadIO m => ScreenWorkspaceCreatedCallback -> m (GClosure C_ScreenWorkspaceCreatedCallback)
genClosure_ScreenWorkspaceCreated cb = liftIO $ do
    let cb' = wrap_ScreenWorkspaceCreatedCallback cb
    mk_ScreenWorkspaceCreatedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenWorkspaceCreatedCallback` into a `C_ScreenWorkspaceCreatedCallback`.
wrap_ScreenWorkspaceCreatedCallback ::
    ScreenWorkspaceCreatedCallback ->
    C_ScreenWorkspaceCreatedCallback
wrap_ScreenWorkspaceCreatedCallback _cb _ space _ = do
    space' <- (newObject Wnck.Workspace.Workspace) space
    _cb  space'


{- |
Connect a signal handler for the “@workspace-created@” 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' screen #workspaceCreated callback
@
-}
onScreenWorkspaceCreated :: (IsScreen a, MonadIO m) => a -> ScreenWorkspaceCreatedCallback -> m SignalHandlerId
onScreenWorkspaceCreated obj cb = liftIO $ do
    let cb' = wrap_ScreenWorkspaceCreatedCallback cb
    cb'' <- mk_ScreenWorkspaceCreatedCallback cb'
    connectSignalFunPtr obj "workspace-created" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@workspace-created@” 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' screen #workspaceCreated callback
@
-}
afterScreenWorkspaceCreated :: (IsScreen a, MonadIO m) => a -> ScreenWorkspaceCreatedCallback -> m SignalHandlerId
afterScreenWorkspaceCreated obj cb = liftIO $ do
    let cb' = wrap_ScreenWorkspaceCreatedCallback cb
    cb'' <- mk_ScreenWorkspaceCreatedCallback cb'
    connectSignalFunPtr obj "workspace-created" cb'' SignalConnectAfter


-- signal Screen::workspace-destroyed
{- |
Emitted when a 'GI.Wnck.Objects.Workspace.Workspace' is destroyed on /@screen@/.
-}
type ScreenWorkspaceDestroyedCallback =
    Wnck.Workspace.Workspace
    {- ^ /@space@/: the workspace that has been destroyed. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ScreenWorkspaceDestroyedCallback`@.
noScreenWorkspaceDestroyedCallback :: Maybe ScreenWorkspaceDestroyedCallback
noScreenWorkspaceDestroyedCallback = Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_ScreenWorkspaceDestroyed :: MonadIO m => ScreenWorkspaceDestroyedCallback -> m (GClosure C_ScreenWorkspaceDestroyedCallback)
genClosure_ScreenWorkspaceDestroyed cb = liftIO $ do
    let cb' = wrap_ScreenWorkspaceDestroyedCallback cb
    mk_ScreenWorkspaceDestroyedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `ScreenWorkspaceDestroyedCallback` into a `C_ScreenWorkspaceDestroyedCallback`.
wrap_ScreenWorkspaceDestroyedCallback ::
    ScreenWorkspaceDestroyedCallback ->
    C_ScreenWorkspaceDestroyedCallback
wrap_ScreenWorkspaceDestroyedCallback _cb _ space _ = do
    space' <- (newObject Wnck.Workspace.Workspace) space
    _cb  space'


{- |
Connect a signal handler for the “@workspace-destroyed@” 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' screen #workspaceDestroyed callback
@
-}
onScreenWorkspaceDestroyed :: (IsScreen a, MonadIO m) => a -> ScreenWorkspaceDestroyedCallback -> m SignalHandlerId
onScreenWorkspaceDestroyed obj cb = liftIO $ do
    let cb' = wrap_ScreenWorkspaceDestroyedCallback cb
    cb'' <- mk_ScreenWorkspaceDestroyedCallback cb'
    connectSignalFunPtr obj "workspace-destroyed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@workspace-destroyed@” 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' screen #workspaceDestroyed callback
@
-}
afterScreenWorkspaceDestroyed :: (IsScreen a, MonadIO m) => a -> ScreenWorkspaceDestroyedCallback -> m SignalHandlerId
afterScreenWorkspaceDestroyed obj cb = liftIO $ do
    let cb' = wrap_ScreenWorkspaceDestroyedCallback cb
    cb'' <- mk_ScreenWorkspaceDestroyedCallback cb'
    connectSignalFunPtr obj "workspace-destroyed" cb'' SignalConnectAfter


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

#if ENABLE_OVERLOADING
#endif

#if ENABLE_OVERLOADING
data ScreenActiveWindowChangedSignalInfo
instance SignalInfo ScreenActiveWindowChangedSignalInfo where
    type HaskellCallbackType ScreenActiveWindowChangedSignalInfo = ScreenActiveWindowChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenActiveWindowChangedCallback cb
        cb'' <- mk_ScreenActiveWindowChangedCallback cb'
        connectSignalFunPtr obj "active-window-changed" cb'' connectMode

data ScreenActiveWorkspaceChangedSignalInfo
instance SignalInfo ScreenActiveWorkspaceChangedSignalInfo where
    type HaskellCallbackType ScreenActiveWorkspaceChangedSignalInfo = ScreenActiveWorkspaceChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenActiveWorkspaceChangedCallback cb
        cb'' <- mk_ScreenActiveWorkspaceChangedCallback cb'
        connectSignalFunPtr obj "active-workspace-changed" cb'' connectMode

data ScreenApplicationClosedSignalInfo
instance SignalInfo ScreenApplicationClosedSignalInfo where
    type HaskellCallbackType ScreenApplicationClosedSignalInfo = ScreenApplicationClosedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenApplicationClosedCallback cb
        cb'' <- mk_ScreenApplicationClosedCallback cb'
        connectSignalFunPtr obj "application-closed" cb'' connectMode

data ScreenApplicationOpenedSignalInfo
instance SignalInfo ScreenApplicationOpenedSignalInfo where
    type HaskellCallbackType ScreenApplicationOpenedSignalInfo = ScreenApplicationOpenedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenApplicationOpenedCallback cb
        cb'' <- mk_ScreenApplicationOpenedCallback cb'
        connectSignalFunPtr obj "application-opened" cb'' connectMode

data ScreenBackgroundChangedSignalInfo
instance SignalInfo ScreenBackgroundChangedSignalInfo where
    type HaskellCallbackType ScreenBackgroundChangedSignalInfo = ScreenBackgroundChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenBackgroundChangedCallback cb
        cb'' <- mk_ScreenBackgroundChangedCallback cb'
        connectSignalFunPtr obj "background-changed" cb'' connectMode

data ScreenClassGroupClosedSignalInfo
instance SignalInfo ScreenClassGroupClosedSignalInfo where
    type HaskellCallbackType ScreenClassGroupClosedSignalInfo = ScreenClassGroupClosedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenClassGroupClosedCallback cb
        cb'' <- mk_ScreenClassGroupClosedCallback cb'
        connectSignalFunPtr obj "class-group-closed" cb'' connectMode

data ScreenClassGroupOpenedSignalInfo
instance SignalInfo ScreenClassGroupOpenedSignalInfo where
    type HaskellCallbackType ScreenClassGroupOpenedSignalInfo = ScreenClassGroupOpenedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenClassGroupOpenedCallback cb
        cb'' <- mk_ScreenClassGroupOpenedCallback cb'
        connectSignalFunPtr obj "class-group-opened" cb'' connectMode

data ScreenShowingDesktopChangedSignalInfo
instance SignalInfo ScreenShowingDesktopChangedSignalInfo where
    type HaskellCallbackType ScreenShowingDesktopChangedSignalInfo = ScreenShowingDesktopChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenShowingDesktopChangedCallback cb
        cb'' <- mk_ScreenShowingDesktopChangedCallback cb'
        connectSignalFunPtr obj "showing-desktop-changed" cb'' connectMode

data ScreenViewportsChangedSignalInfo
instance SignalInfo ScreenViewportsChangedSignalInfo where
    type HaskellCallbackType ScreenViewportsChangedSignalInfo = ScreenViewportsChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenViewportsChangedCallback cb
        cb'' <- mk_ScreenViewportsChangedCallback cb'
        connectSignalFunPtr obj "viewports-changed" cb'' connectMode

data ScreenWindowClosedSignalInfo
instance SignalInfo ScreenWindowClosedSignalInfo where
    type HaskellCallbackType ScreenWindowClosedSignalInfo = ScreenWindowClosedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenWindowClosedCallback cb
        cb'' <- mk_ScreenWindowClosedCallback cb'
        connectSignalFunPtr obj "window-closed" cb'' connectMode

data ScreenWindowManagerChangedSignalInfo
instance SignalInfo ScreenWindowManagerChangedSignalInfo where
    type HaskellCallbackType ScreenWindowManagerChangedSignalInfo = ScreenWindowManagerChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenWindowManagerChangedCallback cb
        cb'' <- mk_ScreenWindowManagerChangedCallback cb'
        connectSignalFunPtr obj "window-manager-changed" cb'' connectMode

data ScreenWindowOpenedSignalInfo
instance SignalInfo ScreenWindowOpenedSignalInfo where
    type HaskellCallbackType ScreenWindowOpenedSignalInfo = ScreenWindowOpenedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenWindowOpenedCallback cb
        cb'' <- mk_ScreenWindowOpenedCallback cb'
        connectSignalFunPtr obj "window-opened" cb'' connectMode

data ScreenWindowStackingChangedSignalInfo
instance SignalInfo ScreenWindowStackingChangedSignalInfo where
    type HaskellCallbackType ScreenWindowStackingChangedSignalInfo = ScreenWindowStackingChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenWindowStackingChangedCallback cb
        cb'' <- mk_ScreenWindowStackingChangedCallback cb'
        connectSignalFunPtr obj "window-stacking-changed" cb'' connectMode

data ScreenWorkspaceCreatedSignalInfo
instance SignalInfo ScreenWorkspaceCreatedSignalInfo where
    type HaskellCallbackType ScreenWorkspaceCreatedSignalInfo = ScreenWorkspaceCreatedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenWorkspaceCreatedCallback cb
        cb'' <- mk_ScreenWorkspaceCreatedCallback cb'
        connectSignalFunPtr obj "workspace-created" cb'' connectMode

data ScreenWorkspaceDestroyedSignalInfo
instance SignalInfo ScreenWorkspaceDestroyedSignalInfo where
    type HaskellCallbackType ScreenWorkspaceDestroyedSignalInfo = ScreenWorkspaceDestroyedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_ScreenWorkspaceDestroyedCallback cb
        cb'' <- mk_ScreenWorkspaceDestroyedCallback cb'
        connectSignalFunPtr obj "workspace-destroyed" cb'' connectMode

type instance O.SignalList Screen = ScreenSignalList
type ScreenSignalList = ('[ '("activeWindowChanged", ScreenActiveWindowChangedSignalInfo), '("activeWorkspaceChanged", ScreenActiveWorkspaceChangedSignalInfo), '("applicationClosed", ScreenApplicationClosedSignalInfo), '("applicationOpened", ScreenApplicationOpenedSignalInfo), '("backgroundChanged", ScreenBackgroundChangedSignalInfo), '("classGroupClosed", ScreenClassGroupClosedSignalInfo), '("classGroupOpened", ScreenClassGroupOpenedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("showingDesktopChanged", ScreenShowingDesktopChangedSignalInfo), '("viewportsChanged", ScreenViewportsChangedSignalInfo), '("windowClosed", ScreenWindowClosedSignalInfo), '("windowManagerChanged", ScreenWindowManagerChangedSignalInfo), '("windowOpened", ScreenWindowOpenedSignalInfo), '("windowStackingChanged", ScreenWindowStackingChangedSignalInfo), '("workspaceCreated", ScreenWorkspaceCreatedSignalInfo), '("workspaceDestroyed", ScreenWorkspaceDestroyedSignalInfo)] :: [(Symbol, *)])

#endif

-- method Screen::calc_workspace_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "num_workspaces", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of #WnckWorkspace on @screen, or -1 to let\nwnck_screen_calc_workspace_layout() find this number.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "space_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the index of a #WnckWorkspace.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "layout", argType = TInterface (Name {namespace = "Wnck", name = "WorkspaceLayout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "return location for the layout of #WnckWorkspace with additional\ninformation.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wnck_screen_calc_workspace_layout" wnck_screen_calc_workspace_layout ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    Int32 ->                                -- num_workspaces : TBasicType TInt
    Int32 ->                                -- space_index : TBasicType TInt
    Ptr Wnck.WorkspaceLayout.WorkspaceLayout -> -- layout : TInterface (Name {namespace = "Wnck", name = "WorkspaceLayout"})
    IO ()

{-# DEPRECATED screenCalcWorkspaceLayout ["(Since version 2.20)"] #-}
{- |
Calculates the layout of 'GI.Wnck.Objects.Workspace.Workspace', with additional information like
the row and column of the 'GI.Wnck.Objects.Workspace.Workspace' with index /@spaceIndex@/.

/Since: 2.12/
-}
screenCalcWorkspaceLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Int32
    {- ^ /@numWorkspaces@/: the number of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/, or -1 to let
'GI.Wnck.Objects.Screen.screenCalcWorkspaceLayout' find this number. -}
    -> Int32
    {- ^ /@spaceIndex@/: the index of a 'GI.Wnck.Objects.Workspace.Workspace'. -}
    -> Wnck.WorkspaceLayout.WorkspaceLayout
    {- ^ /@layout@/: return location for the layout of 'GI.Wnck.Objects.Workspace.Workspace' with additional
information. -}
    -> m ()
screenCalcWorkspaceLayout screen numWorkspaces spaceIndex layout = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    layout' <- unsafeManagedPtrGetPtr layout
    wnck_screen_calc_workspace_layout screen' numWorkspaces spaceIndex layout'
    touchManagedPtr screen
    touchManagedPtr layout
    return ()

#if ENABLE_OVERLOADING
data ScreenCalcWorkspaceLayoutMethodInfo
instance (signature ~ (Int32 -> Int32 -> Wnck.WorkspaceLayout.WorkspaceLayout -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenCalcWorkspaceLayoutMethodInfo a signature where
    overloadedMethod _ = screenCalcWorkspaceLayout

#endif

-- method Screen::change_workspace_count
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of #WnckWorkspace to request.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wnck_screen_change_workspace_count" wnck_screen_change_workspace_count ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    Int32 ->                                -- count : TBasicType TInt
    IO ()

{- |
Asks the window manager to change the number of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/.

/Since: 2.2/
-}
screenChangeWorkspaceCount ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Int32
    {- ^ /@count@/: the number of 'GI.Wnck.Objects.Workspace.Workspace' to request. -}
    -> m ()
screenChangeWorkspaceCount screen count = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    wnck_screen_change_workspace_count screen' count
    touchManagedPtr screen
    return ()

#if ENABLE_OVERLOADING
data ScreenChangeWorkspaceCountMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenChangeWorkspaceCountMethodInfo a signature where
    overloadedMethod _ = screenChangeWorkspaceCount

#endif

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

foreign import ccall "wnck_screen_force_update" wnck_screen_force_update ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO ()

{- |
Synchronously and immediately updates the list of 'GI.Wnck.Objects.Window.Window' on /@screen@/.
This bypasses the standard update mechanism, where the list of 'GI.Wnck.Objects.Window.Window'
is updated in the idle loop.

This is usually a bad idea for both performance and correctness reasons (to
get things right, you need to write model-view code that tracks changes, not
get a static list of open windows). However, this function can be useful for
small applications that just do something and then exit.
-}
screenForceUpdate ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m ()
screenForceUpdate screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    wnck_screen_force_update screen'
    touchManagedPtr screen
    return ()

#if ENABLE_OVERLOADING
data ScreenForceUpdateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenForceUpdateMethodInfo a signature where
    overloadedMethod _ = screenForceUpdate

#endif

-- method Screen::get_active_window
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_active_window" wnck_screen_get_active_window ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO (Ptr Wnck.Window.Window)

{- |
Gets the active 'GI.Wnck.Objects.Window.Window' on /@screen@/. May return 'Nothing' sometimes, since
not all window managers guarantee that a window is always active.
-}
screenGetActiveWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m (Maybe Wnck.Window.Window)
    {- ^ __Returns:__ the active 'GI.Wnck.Objects.Window.Window' on /@screen@/, or 'Nothing'.
The returned 'GI.Wnck.Objects.Window.Window' is owned by libwnck and must not be referenced or
unreferenced. -}
screenGetActiveWindow screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_active_window screen'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Wnck.Window.Window) result'
        return result''
    touchManagedPtr screen
    return maybeResult

#if ENABLE_OVERLOADING
data ScreenGetActiveWindowMethodInfo
instance (signature ~ (m (Maybe Wnck.Window.Window)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetActiveWindowMethodInfo a signature where
    overloadedMethod _ = screenGetActiveWindow

#endif

-- method Screen::get_active_workspace
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_active_workspace" wnck_screen_get_active_workspace ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO (Ptr Wnck.Workspace.Workspace)

{- |
Gets the active 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/. May return 'Nothing' sometimes,
if libwnck is in a weird state due to the asynchronous nature of the
interaction with the window manager.
-}
screenGetActiveWorkspace ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m (Maybe Wnck.Workspace.Workspace)
    {- ^ __Returns:__ the active 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/, or
'Nothing'. The returned 'GI.Wnck.Objects.Workspace.Workspace' is owned by libwnck and must not be
referenced or unreferenced. -}
screenGetActiveWorkspace screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_active_workspace screen'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Wnck.Workspace.Workspace) result'
        return result''
    touchManagedPtr screen
    return maybeResult

#if ENABLE_OVERLOADING
data ScreenGetActiveWorkspaceMethodInfo
instance (signature ~ (m (Maybe Wnck.Workspace.Workspace)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetActiveWorkspaceMethodInfo a signature where
    overloadedMethod _ = screenGetActiveWorkspace

#endif

-- method Screen::get_background_pixmap
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_background_pixmap" wnck_screen_get_background_pixmap ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO CULong

{- |
Gets the X window ID of the background pixmap of /@screen@/.
-}
screenGetBackgroundPixmap ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m CULong
    {- ^ __Returns:__ the X window ID of the background pixmap of /@screen@/. -}
screenGetBackgroundPixmap screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_background_pixmap screen'
    touchManagedPtr screen
    return result

#if ENABLE_OVERLOADING
data ScreenGetBackgroundPixmapMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetBackgroundPixmapMethodInfo a signature where
    overloadedMethod _ = screenGetBackgroundPixmap

#endif

-- method Screen::get_height
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_height" wnck_screen_get_height ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO Int32

{- |
Gets the height of /@screen@/.
-}
screenGetHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m Int32
    {- ^ __Returns:__ the height of /@screen@/. -}
screenGetHeight screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_height screen'
    touchManagedPtr screen
    return result

#if ENABLE_OVERLOADING
data ScreenGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetHeightMethodInfo a signature where
    overloadedMethod _ = screenGetHeight

#endif

-- method Screen::get_number
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_number" wnck_screen_get_number ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO Int32

{- |
Gets the index of /@screen@/ on the display to which it belongs. The first
'GI.Wnck.Objects.Screen.Screen' has an index of 0.

/Since: 2.20/
-}
screenGetNumber ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m Int32
    {- ^ __Returns:__ the index of /@space@/ on /@screen@/, or -1 on errors. -}
screenGetNumber screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_number screen'
    touchManagedPtr screen
    return result

#if ENABLE_OVERLOADING
data ScreenGetNumberMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetNumberMethodInfo a signature where
    overloadedMethod _ = screenGetNumber

#endif

-- method Screen::get_previously_active_window
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_previously_active_window" wnck_screen_get_previously_active_window ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO (Ptr Wnck.Window.Window)

{- |
Gets the previously active 'GI.Wnck.Objects.Window.Window' on /@screen@/. May return 'Nothing'
sometimes, since not all window managers guarantee that a window is always
active.

/Since: 2.8/
-}
screenGetPreviouslyActiveWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m Wnck.Window.Window
    {- ^ __Returns:__ the previously active 'GI.Wnck.Objects.Window.Window' on /@screen@/,
or 'Nothing'. The returned 'GI.Wnck.Objects.Window.Window' is owned by libwnck and must not be
referenced or unreferenced. -}
screenGetPreviouslyActiveWindow screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_previously_active_window screen'
    checkUnexpectedReturnNULL "screenGetPreviouslyActiveWindow" result
    result' <- (newObject Wnck.Window.Window) result
    touchManagedPtr screen
    return result'

#if ENABLE_OVERLOADING
data ScreenGetPreviouslyActiveWindowMethodInfo
instance (signature ~ (m Wnck.Window.Window), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetPreviouslyActiveWindowMethodInfo a signature where
    overloadedMethod _ = screenGetPreviouslyActiveWindow

#endif

-- method Screen::get_showing_desktop
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_showing_desktop" wnck_screen_get_showing_desktop ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO CInt

{- |
Gets whether /@screen@/ is in the \"showing the desktop\" mode. This mode is
changed when a 'GI.Wnck.Objects.Screen.Screen'::@/showing-desktop-changed/@ signal gets emitted.

/Since: 2.2/
-}
screenGetShowingDesktop ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@window@/ is fullscreen, 'False' otherwise. -}
screenGetShowingDesktop screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_showing_desktop screen'
    let result' = (/= 0) result
    touchManagedPtr screen
    return result'

#if ENABLE_OVERLOADING
data ScreenGetShowingDesktopMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetShowingDesktopMethodInfo a signature where
    overloadedMethod _ = screenGetShowingDesktop

#endif

-- method Screen::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_width" wnck_screen_get_width ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO Int32

{- |
Gets the width of /@screen@/.
-}
screenGetWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m Int32
    {- ^ __Returns:__ the width of /@screen@/. -}
screenGetWidth screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_width screen'
    touchManagedPtr screen
    return result

#if ENABLE_OVERLOADING
data ScreenGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWidthMethodInfo a signature where
    overloadedMethod _ = screenGetWidth

#endif

-- method Screen::get_window_manager_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_window_manager_name" wnck_screen_get_window_manager_name ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO CString

{- |
Gets the name of the window manager.

/Since: 2.20/
-}
screenGetWindowManagerName ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m T.Text
    {- ^ __Returns:__ the name of the window manager, or 'Nothing' if the window manager
does not comply with the \<ulink
url=\"http:\/\/standards.freedesktop.org\/wm-spec\/wm-spec-latest.html\">EWMH\<\/ulink>
specification. -}
screenGetWindowManagerName screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_window_manager_name screen'
    checkUnexpectedReturnNULL "screenGetWindowManagerName" result
    result' <- cstringToText result
    touchManagedPtr screen
    return result'

#if ENABLE_OVERLOADING
data ScreenGetWindowManagerNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWindowManagerNameMethodInfo a signature where
    overloadedMethod _ = screenGetWindowManagerName

#endif

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

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

{- |
Gets the list of 'GI.Wnck.Objects.Window.Window' on /@screen@/. The list is not in a defined
order, but should be \"stable\" (windows should not be reordered in it).
However, the stability of the list is established by the window manager, so
don\'t blame libwnck if it breaks down.
-}
screenGetWindows ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m [Wnck.Window.Window]
    {- ^ __Returns:__ the list of
'GI.Wnck.Objects.Window.Window' on /@screen@/, or 'Nothing' if there is no window on /@screen@/. The list
should not be modified nor freed, as it is owned by /@screen@/. -}
screenGetWindows screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_windows screen'
    result' <- unpackGList result
    result'' <- mapM (newObject Wnck.Window.Window) result'
    touchManagedPtr screen
    return result''

#if ENABLE_OVERLOADING
data ScreenGetWindowsMethodInfo
instance (signature ~ (m [Wnck.Window.Window]), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWindowsMethodInfo a signature where
    overloadedMethod _ = screenGetWindows

#endif

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

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

{- |
Gets the list of 'GI.Wnck.Objects.Window.Window' on /@screen@/ in bottom-to-top order.
-}
screenGetWindowsStacked ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m [Wnck.Window.Window]
    {- ^ __Returns:__ the list of
'GI.Wnck.Objects.Window.Window' in stacking order on /@screen@/, or 'Nothing' if there is no window on
/@screen@/. The list should not be modified nor freed, as it is owned by
/@screen@/. -}
screenGetWindowsStacked screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_windows_stacked screen'
    result' <- unpackGList result
    result'' <- mapM (newObject Wnck.Window.Window) result'
    touchManagedPtr screen
    return result''

#if ENABLE_OVERLOADING
data ScreenGetWindowsStackedMethodInfo
instance (signature ~ (m [Wnck.Window.Window]), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWindowsStackedMethodInfo a signature where
    overloadedMethod _ = screenGetWindowsStacked

#endif

-- method Screen::get_workspace
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "workspace", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a workspace index, starting from 0.", 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_screen_get_workspace" wnck_screen_get_workspace ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    Int32 ->                                -- workspace : TBasicType TInt
    IO (Ptr Wnck.Workspace.Workspace)

{- |
Gets the 'GI.Wnck.Objects.Workspace.Workspace' numbered /@workspace@/ on /@screen@/.
-}
screenGetWorkspace ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Int32
    {- ^ /@workspace@/: a workspace index, starting from 0. -}
    -> m Wnck.Workspace.Workspace
    {- ^ __Returns:__ the 'GI.Wnck.Objects.Workspace.Workspace' numbered /@workspace@/ on
/@screen@/, or 'Nothing' if no such workspace exists. The returned 'GI.Wnck.Objects.Workspace.Workspace'
is owned by libwnck and must not be referenced or unreferenced. -}
screenGetWorkspace screen workspace = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_workspace screen' workspace
    checkUnexpectedReturnNULL "screenGetWorkspace" result
    result' <- (newObject Wnck.Workspace.Workspace) result
    touchManagedPtr screen
    return result'

#if ENABLE_OVERLOADING
data ScreenGetWorkspaceMethodInfo
instance (signature ~ (Int32 -> m Wnck.Workspace.Workspace), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWorkspaceMethodInfo a signature where
    overloadedMethod _ = screenGetWorkspace

#endif

-- method Screen::get_workspace_count
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", 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_screen_get_workspace_count" wnck_screen_get_workspace_count ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO Int32

{- |
Gets the number of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/.
-}
screenGetWorkspaceCount ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m Int32
    {- ^ __Returns:__ the number of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/. -}
screenGetWorkspaceCount screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_workspace_count screen'
    touchManagedPtr screen
    return result

#if ENABLE_OVERLOADING
data ScreenGetWorkspaceCountMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWorkspaceCountMethodInfo a signature where
    overloadedMethod _ = screenGetWorkspaceCount

#endif

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

foreign import ccall "wnck_screen_get_workspaces" wnck_screen_get_workspaces ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    IO (Ptr (GList (Ptr Wnck.Workspace.Workspace)))

{- |
Gets the list of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/. The list is ordered: the
first element in the list is the first 'GI.Wnck.Objects.Workspace.Workspace', etc..

/Since: 2.20/
-}
screenGetWorkspaces ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> m [Wnck.Workspace.Workspace]
    {- ^ __Returns:__ the list of
'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/. The list should not be modified nor freed, as it
is owned by /@screen@/. -}
screenGetWorkspaces screen = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_get_workspaces screen'
    result' <- unpackGList result
    result'' <- mapM (newObject Wnck.Workspace.Workspace) result'
    touchManagedPtr screen
    return result''

#if ENABLE_OVERLOADING
data ScreenGetWorkspacesMethodInfo
instance (signature ~ (m [Wnck.Workspace.Workspace]), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWorkspacesMethodInfo a signature where
    overloadedMethod _ = screenGetWorkspaces

#endif

-- method Screen::move_viewport
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X offset in pixels of viewport.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y offset in pixels of viewport.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wnck_screen_move_viewport" wnck_screen_move_viewport ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

{- |
Asks the window manager to move the viewport of the current 'GI.Wnck.Objects.Workspace.Workspace'
on /@screen@/.

/Since: 2.4/
-}
screenMoveViewport ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Int32
    {- ^ /@x@/: X offset in pixels of viewport. -}
    -> Int32
    {- ^ /@y@/: Y offset in pixels of viewport. -}
    -> m ()
screenMoveViewport screen x y = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    wnck_screen_move_viewport screen' x y
    touchManagedPtr screen
    return ()

#if ENABLE_OVERLOADING
data ScreenMoveViewportMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenMoveViewportMethodInfo a signature where
    overloadedMethod _ = screenMoveViewport

#endif

-- method Screen::net_wm_supports
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "atom", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a property atom.", 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_screen_net_wm_supports" wnck_screen_net_wm_supports ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    CString ->                              -- atom : TBasicType TUTF8
    IO CInt

{- |
Gets whether the window manager for /@screen@/ supports a certain hint from
the \<ulink
url=\"http:\/\/standards.freedesktop.org\/wm-spec\/wm-spec-latest.html\">Extended
Window Manager Hints specification\<\/ulink> (EWMH).

When using this function, keep in mind that the window manager can change
over time; so you should not use this function in a way that impacts
persistent application state. A common bug is that your application can
start up before the window manager does when the user logs in, and before
the window manager starts 'GI.Wnck.Objects.Screen.screenNetWmSupports' will return 'False'
for every property.

See also @/gdk_x11_screen_supports_net_wm_hint()/@ in GDK.
-}
screenNetWmSupports ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> T.Text
    {- ^ /@atom@/: a property atom. -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the window manager for /@screen@/ supports the /@atom@/
hint, 'False' otherwise. -}
screenNetWmSupports screen atom = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    atom' <- textToCString atom
    result <- wnck_screen_net_wm_supports screen' atom'
    let result' = (/= 0) result
    touchManagedPtr screen
    freeMem atom'
    return result'

#if ENABLE_OVERLOADING
data ScreenNetWmSupportsMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsScreen a) => O.MethodInfo ScreenNetWmSupportsMethodInfo a signature where
    overloadedMethod _ = screenNetWmSupports

#endif

-- method Screen::release_workspace_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "current_token", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the token obtained through\nwnck_screen_try_set_workspace_layout().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wnck_screen_release_workspace_layout" wnck_screen_release_workspace_layout ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    Int32 ->                                -- current_token : TBasicType TInt
    IO ()

{- |
Releases the ownership of the layout of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/.
/@currentToken@/ is used to verify that the caller is the owner of the layout.
If the verification fails, nothing happens.
-}
screenReleaseWorkspaceLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Int32
    {- ^ /@currentToken@/: the token obtained through
'GI.Wnck.Objects.Screen.screenTrySetWorkspaceLayout'. -}
    -> m ()
screenReleaseWorkspaceLayout screen currentToken = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    wnck_screen_release_workspace_layout screen' currentToken
    touchManagedPtr screen
    return ()

#if ENABLE_OVERLOADING
data ScreenReleaseWorkspaceLayoutMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenReleaseWorkspaceLayoutMethodInfo a signature where
    overloadedMethod _ = screenReleaseWorkspaceLayout

#endif

-- method Screen::toggle_showing_desktop
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to activate the \"showing the desktop\" mode on @screen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wnck_screen_toggle_showing_desktop" wnck_screen_toggle_showing_desktop ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    CInt ->                                 -- show : TBasicType TBoolean
    IO ()

{- |
Asks the window manager to set the \"showing the desktop\" mode on /@screen@/
according to /@show@/.

/Since: 2.2/
-}
screenToggleShowingDesktop ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Bool
    {- ^ /@show@/: whether to activate the \"showing the desktop\" mode on /@screen@/. -}
    -> m ()
screenToggleShowingDesktop screen show_ = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    let show_' = (fromIntegral . fromEnum) show_
    wnck_screen_toggle_showing_desktop screen' show_'
    touchManagedPtr screen
    return ()

#if ENABLE_OVERLOADING
data ScreenToggleShowingDesktopMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenToggleShowingDesktopMethodInfo a signature where
    overloadedMethod _ = screenToggleShowingDesktop

#endif

-- method Screen::try_set_workspace_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Wnck", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WnckScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "current_token", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a token. Use 0 if you do not called\nwnck_screen_try_set_workspace_layout() before, or if you did not keep the\nold token.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "rows", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of rows to use for the #WnckWorkspace layout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "columns", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of columns to use for the #WnckWorkspace layout.", 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_screen_try_set_workspace_layout" wnck_screen_try_set_workspace_layout ::
    Ptr Screen ->                           -- screen : TInterface (Name {namespace = "Wnck", name = "Screen"})
    Int32 ->                                -- current_token : TBasicType TInt
    Int32 ->                                -- rows : TBasicType TInt
    Int32 ->                                -- columns : TBasicType TInt
    IO Int32

{- |
Tries to modify the layout of 'GI.Wnck.Objects.Workspace.Workspace' on /@screen@/. To do this, tries
to acquire ownership of the layout. If the current process is the owner of
the layout, /@currentToken@/ is used to determine if the caller is the owner
(there might be more than one part of the same process trying to set the
layout). Since no more than one application should set this property of
/@screen@/ at a time, setting the layout is not guaranteed to work.

If /@rows@/ is 0, the actual number of rows will be determined based on
/@columns@/ and the number of 'GI.Wnck.Objects.Workspace.Workspace'. If /@columns@/ is 0, the actual
number of columns will be determined based on /@rows@/ and the number of
'GI.Wnck.Objects.Workspace.Workspace'. /@rows@/ and /@columns@/ must not be 0 at the same time.

You have to release the ownership of the layout with
'GI.Wnck.Objects.Screen.screenReleaseWorkspaceLayout' when you do not need it anymore.
-}
screenTrySetWorkspaceLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsScreen a) =>
    a
    {- ^ /@screen@/: a 'GI.Wnck.Objects.Screen.Screen'. -}
    -> Int32
    {- ^ /@currentToken@/: a token. Use 0 if you do not called
'GI.Wnck.Objects.Screen.screenTrySetWorkspaceLayout' before, or if you did not keep the
old token. -}
    -> Int32
    {- ^ /@rows@/: the number of rows to use for the 'GI.Wnck.Objects.Workspace.Workspace' layout. -}
    -> Int32
    {- ^ /@columns@/: the number of columns to use for the 'GI.Wnck.Objects.Workspace.Workspace' layout. -}
    -> m Int32
    {- ^ __Returns:__ a token to use for future calls to
'GI.Wnck.Objects.Screen.screenTrySetWorkspaceLayout' and to
'GI.Wnck.Objects.Screen.screenReleaseWorkspaceLayout', or 0 if the layout could not be set. -}
screenTrySetWorkspaceLayout screen currentToken rows columns = liftIO $ do
    screen' <- unsafeManagedPtrCastPtr screen
    result <- wnck_screen_try_set_workspace_layout screen' currentToken rows columns
    touchManagedPtr screen
    return result

#if ENABLE_OVERLOADING
data ScreenTrySetWorkspaceLayoutMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenTrySetWorkspaceLayoutMethodInfo a signature where
    overloadedMethod _ = screenTrySetWorkspaceLayout

#endif

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

foreign import ccall "wnck_screen_free_workspace_layout" wnck_screen_free_workspace_layout ::
    Ptr Wnck.WorkspaceLayout.WorkspaceLayout -> -- layout : TInterface (Name {namespace = "Wnck", name = "WorkspaceLayout"})
    IO ()

{-# DEPRECATED screenFreeWorkspaceLayout ["(Since version 2.20)"] #-}
{- |
Frees the content of /@layout@/. This does not free /@layout@/ itself, so you
might want to free /@layout@/ yourself after calling this.

/Since: 2.12/
-}
screenFreeWorkspaceLayout ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Wnck.WorkspaceLayout.WorkspaceLayout
    {- ^ /@layout@/: a 'GI.Wnck.Structs.WorkspaceLayout.WorkspaceLayout'. -}
    -> m ()
screenFreeWorkspaceLayout layout = liftIO $ do
    layout' <- unsafeManagedPtrGetPtr layout
    wnck_screen_free_workspace_layout layout'
    touchManagedPtr layout
    return ()

#if ENABLE_OVERLOADING
#endif

-- method Screen::get
-- method type : MemberFunction
-- Args : [Arg {argCName = "index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "screen number, starting from 0.", 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_screen_get" wnck_screen_get ::
    Int32 ->                                -- index : TBasicType TInt
    IO (Ptr Screen)

{- |
Gets the 'GI.Wnck.Objects.Screen.Screen' for a given screen on the default display.
-}
screenGet ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    {- ^ /@index@/: screen number, starting from 0. -}
    -> m Screen
    {- ^ __Returns:__ the 'GI.Wnck.Objects.Screen.Screen' for screen /@index@/, or 'Nothing'
if no such screen exists. The returned 'GI.Wnck.Objects.Screen.Screen' is owned by libwnck and
must not be referenced or unreferenced. -}
screenGet index = liftIO $ do
    result <- wnck_screen_get index
    checkUnexpectedReturnNULL "screenGet" result
    result' <- (newObject Screen) result
    return result'

#if ENABLE_OVERLOADING
#endif

-- method Screen::get_default
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Wnck", name = "Screen"}))
-- throws : False
-- Skip return : False

foreign import ccall "wnck_screen_get_default" wnck_screen_get_default ::
    IO (Ptr Screen)

{- |
Gets the default 'GI.Wnck.Objects.Screen.Screen' on the default display.
-}
screenGetDefault ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m (Maybe Screen)
    {- ^ __Returns:__ the default 'GI.Wnck.Objects.Screen.Screen'. The returned
'GI.Wnck.Objects.Screen.Screen' is owned by libwnck and must not be referenced or unreferenced. This
can return 'Nothing' if not on X11. -}
screenGetDefault  = liftIO $ do
    result <- wnck_screen_get_default
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Screen) result'
        return result''
    return maybeResult

#if ENABLE_OVERLOADING
#endif

-- method Screen::get_for_root
-- method type : MemberFunction
-- Args : [Arg {argCName = "root_window_id", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an X window ID.", 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_screen_get_for_root" wnck_screen_get_for_root ::
    CULong ->                               -- root_window_id : TBasicType TULong
    IO (Ptr Screen)

{- |
Gets the 'GI.Wnck.Objects.Screen.Screen' for the root window at /@rootWindowId@/, or
'Nothing' if no 'GI.Wnck.Objects.Screen.Screen' exists for this root window.

This function does not work if 'GI.Wnck.Objects.Screen.screenGet' was not called for the
sought 'GI.Wnck.Objects.Screen.Screen' before, and returns 'Nothing'.
-}
screenGetForRoot ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    CULong
    {- ^ /@rootWindowId@/: an X window ID. -}
    -> m Screen
    {- ^ __Returns:__ the 'GI.Wnck.Objects.Screen.Screen' for the root window at
/@rootWindowId@/, or 'Nothing'. The returned 'GI.Wnck.Objects.Screen.Screen' is owned by libwnck and
must not be referenced or unreferenced. -}
screenGetForRoot rootWindowId = liftIO $ do
    result <- wnck_screen_get_for_root rootWindowId
    checkUnexpectedReturnNULL "screenGetForRoot" result
    result' <- (newObject Screen) result
    return result'

#if ENABLE_OVERLOADING
#endif