{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- GdkDisplay objects are the GDK representation of a workstation.
-- 
-- Their purpose are two-fold:
-- 
-- * To manage and provide information about input devices (pointers, keyboards, etc)
-- * To manage and provide information about output devices (monitors, projectors, etc)
-- 
-- 
-- Most of the input device handling has been factored out into separate t'GI.Gdk.Objects.Seat.Seat'
-- objects. Every display has a one or more seats, which can be accessed with
-- 'GI.Gdk.Objects.Display.displayGetDefaultSeat' and 'GI.Gdk.Objects.Display.displayListSeats'.
-- 
-- Output devices are represented by t'GI.Gdk.Objects.Monitor.Monitor' objects, which can be accessed
-- with 'GI.Gdk.Objects.Display.displayGetMonitor' and similar APIs.

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

module GI.Gdk.Objects.Display
    ( 

-- * Exported types
    Display(..)                             ,
    IsDisplay                               ,
    toDisplay                               ,
    noDisplay                               ,


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

#if defined(ENABLE_OVERLOADING)
    ResolveDisplayMethod                    ,
#endif


-- ** beep #method:beep#

#if defined(ENABLE_OVERLOADING)
    DisplayBeepMethodInfo                   ,
#endif
    displayBeep                             ,


-- ** close #method:close#

#if defined(ENABLE_OVERLOADING)
    DisplayCloseMethodInfo                  ,
#endif
    displayClose                            ,


-- ** deviceIsGrabbed #method:deviceIsGrabbed#

#if defined(ENABLE_OVERLOADING)
    DisplayDeviceIsGrabbedMethodInfo        ,
#endif
    displayDeviceIsGrabbed                  ,


-- ** flush #method:flush#

#if defined(ENABLE_OVERLOADING)
    DisplayFlushMethodInfo                  ,
#endif
    displayFlush                            ,


-- ** getAppLaunchContext #method:getAppLaunchContext#

#if defined(ENABLE_OVERLOADING)
    DisplayGetAppLaunchContextMethodInfo    ,
#endif
    displayGetAppLaunchContext              ,


-- ** getClipboard #method:getClipboard#

#if defined(ENABLE_OVERLOADING)
    DisplayGetClipboardMethodInfo           ,
#endif
    displayGetClipboard                     ,


-- ** getDefault #method:getDefault#

    displayGetDefault                       ,


-- ** getDefaultGroup #method:getDefaultGroup#

#if defined(ENABLE_OVERLOADING)
    DisplayGetDefaultGroupMethodInfo        ,
#endif
    displayGetDefaultGroup                  ,


-- ** getDefaultSeat #method:getDefaultSeat#

#if defined(ENABLE_OVERLOADING)
    DisplayGetDefaultSeatMethodInfo         ,
#endif
    displayGetDefaultSeat                   ,


-- ** getEvent #method:getEvent#

#if defined(ENABLE_OVERLOADING)
    DisplayGetEventMethodInfo               ,
#endif
    displayGetEvent                         ,


-- ** getKeymap #method:getKeymap#

#if defined(ENABLE_OVERLOADING)
    DisplayGetKeymapMethodInfo              ,
#endif
    displayGetKeymap                        ,


-- ** getMonitor #method:getMonitor#

#if defined(ENABLE_OVERLOADING)
    DisplayGetMonitorMethodInfo             ,
#endif
    displayGetMonitor                       ,


-- ** getMonitorAtPoint #method:getMonitorAtPoint#

#if defined(ENABLE_OVERLOADING)
    DisplayGetMonitorAtPointMethodInfo      ,
#endif
    displayGetMonitorAtPoint                ,


-- ** getMonitorAtSurface #method:getMonitorAtSurface#

#if defined(ENABLE_OVERLOADING)
    DisplayGetMonitorAtSurfaceMethodInfo    ,
#endif
    displayGetMonitorAtSurface              ,


-- ** getNMonitors #method:getNMonitors#

#if defined(ENABLE_OVERLOADING)
    DisplayGetNMonitorsMethodInfo           ,
#endif
    displayGetNMonitors                     ,


-- ** getName #method:getName#

#if defined(ENABLE_OVERLOADING)
    DisplayGetNameMethodInfo                ,
#endif
    displayGetName                          ,


-- ** getPrimaryClipboard #method:getPrimaryClipboard#

#if defined(ENABLE_OVERLOADING)
    DisplayGetPrimaryClipboardMethodInfo    ,
#endif
    displayGetPrimaryClipboard              ,


-- ** getPrimaryMonitor #method:getPrimaryMonitor#

#if defined(ENABLE_OVERLOADING)
    DisplayGetPrimaryMonitorMethodInfo      ,
#endif
    displayGetPrimaryMonitor                ,


-- ** getSetting #method:getSetting#

#if defined(ENABLE_OVERLOADING)
    DisplayGetSettingMethodInfo             ,
#endif
    displayGetSetting                       ,


-- ** getStartupNotificationId #method:getStartupNotificationId#

#if defined(ENABLE_OVERLOADING)
    DisplayGetStartupNotificationIdMethodInfo,
#endif
    displayGetStartupNotificationId         ,


-- ** hasPending #method:hasPending#

#if defined(ENABLE_OVERLOADING)
    DisplayHasPendingMethodInfo             ,
#endif
    displayHasPending                       ,


-- ** isClosed #method:isClosed#

#if defined(ENABLE_OVERLOADING)
    DisplayIsClosedMethodInfo               ,
#endif
    displayIsClosed                         ,


-- ** isComposited #method:isComposited#

#if defined(ENABLE_OVERLOADING)
    DisplayIsCompositedMethodInfo           ,
#endif
    displayIsComposited                     ,


-- ** isRgba #method:isRgba#

#if defined(ENABLE_OVERLOADING)
    DisplayIsRgbaMethodInfo                 ,
#endif
    displayIsRgba                           ,


-- ** listSeats #method:listSeats#

#if defined(ENABLE_OVERLOADING)
    DisplayListSeatsMethodInfo              ,
#endif
    displayListSeats                        ,


-- ** notifyStartupComplete #method:notifyStartupComplete#

#if defined(ENABLE_OVERLOADING)
    DisplayNotifyStartupCompleteMethodInfo  ,
#endif
    displayNotifyStartupComplete            ,


-- ** open #method:open#

    displayOpen                             ,


-- ** peekEvent #method:peekEvent#

#if defined(ENABLE_OVERLOADING)
    DisplayPeekEventMethodInfo              ,
#endif
    displayPeekEvent                        ,


-- ** putEvent #method:putEvent#

#if defined(ENABLE_OVERLOADING)
    DisplayPutEventMethodInfo               ,
#endif
    displayPutEvent                         ,


-- ** supportsInputShapes #method:supportsInputShapes#

#if defined(ENABLE_OVERLOADING)
    DisplaySupportsInputShapesMethodInfo    ,
#endif
    displaySupportsInputShapes              ,


-- ** supportsShapes #method:supportsShapes#

#if defined(ENABLE_OVERLOADING)
    DisplaySupportsShapesMethodInfo         ,
#endif
    displaySupportsShapes                   ,


-- ** sync #method:sync#

#if defined(ENABLE_OVERLOADING)
    DisplaySyncMethodInfo                   ,
#endif
    displaySync                             ,




 -- * Properties
-- ** composited #attr:composited#
-- | 'P.True' if the display properly composits the alpha channel.
-- See 'GI.Gdk.Objects.Display.displayIsComposited' for details.

#if defined(ENABLE_OVERLOADING)
    DisplayCompositedPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    displayComposited                       ,
#endif
    getDisplayComposited                    ,


-- ** rgba #attr:rgba#
-- | 'P.True' if the display supports an alpha channel. See 'GI.Gdk.Objects.Display.displayIsRgba'
-- for details.

#if defined(ENABLE_OVERLOADING)
    DisplayRgbaPropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    displayRgba                             ,
#endif
    getDisplayRgba                          ,




 -- * Signals
-- ** closed #signal:closed#

    C_DisplayClosedCallback                 ,
    DisplayClosedCallback                   ,
#if defined(ENABLE_OVERLOADING)
    DisplayClosedSignalInfo                 ,
#endif
    afterDisplayClosed                      ,
    genClosure_DisplayClosed                ,
    mk_DisplayClosedCallback                ,
    noDisplayClosedCallback                 ,
    onDisplayClosed                         ,
    wrap_DisplayClosedCallback              ,


-- ** monitorAdded #signal:monitorAdded#

    C_DisplayMonitorAddedCallback           ,
    DisplayMonitorAddedCallback             ,
#if defined(ENABLE_OVERLOADING)
    DisplayMonitorAddedSignalInfo           ,
#endif
    afterDisplayMonitorAdded                ,
    genClosure_DisplayMonitorAdded          ,
    mk_DisplayMonitorAddedCallback          ,
    noDisplayMonitorAddedCallback           ,
    onDisplayMonitorAdded                   ,
    wrap_DisplayMonitorAddedCallback        ,


-- ** monitorRemoved #signal:monitorRemoved#

    C_DisplayMonitorRemovedCallback         ,
    DisplayMonitorRemovedCallback           ,
#if defined(ENABLE_OVERLOADING)
    DisplayMonitorRemovedSignalInfo         ,
#endif
    afterDisplayMonitorRemoved              ,
    genClosure_DisplayMonitorRemoved        ,
    mk_DisplayMonitorRemovedCallback        ,
    noDisplayMonitorRemovedCallback         ,
    onDisplayMonitorRemoved                 ,
    wrap_DisplayMonitorRemovedCallback      ,


-- ** opened #signal:opened#

    C_DisplayOpenedCallback                 ,
    DisplayOpenedCallback                   ,
#if defined(ENABLE_OVERLOADING)
    DisplayOpenedSignalInfo                 ,
#endif
    afterDisplayOpened                      ,
    genClosure_DisplayOpened                ,
    mk_DisplayOpenedCallback                ,
    noDisplayOpenedCallback                 ,
    onDisplayOpened                         ,
    wrap_DisplayOpenedCallback              ,


-- ** seatAdded #signal:seatAdded#

    C_DisplaySeatAddedCallback              ,
    DisplaySeatAddedCallback                ,
#if defined(ENABLE_OVERLOADING)
    DisplaySeatAddedSignalInfo              ,
#endif
    afterDisplaySeatAdded                   ,
    genClosure_DisplaySeatAdded             ,
    mk_DisplaySeatAddedCallback             ,
    noDisplaySeatAddedCallback              ,
    onDisplaySeatAdded                      ,
    wrap_DisplaySeatAddedCallback           ,


-- ** seatRemoved #signal:seatRemoved#

    C_DisplaySeatRemovedCallback            ,
    DisplaySeatRemovedCallback              ,
#if defined(ENABLE_OVERLOADING)
    DisplaySeatRemovedSignalInfo            ,
#endif
    afterDisplaySeatRemoved                 ,
    genClosure_DisplaySeatRemoved           ,
    mk_DisplaySeatRemovedCallback           ,
    noDisplaySeatRemovedCallback            ,
    onDisplaySeatRemoved                    ,
    wrap_DisplaySeatRemovedCallback         ,


-- ** settingChanged #signal:settingChanged#

    C_DisplaySettingChangedCallback         ,
    DisplaySettingChangedCallback           ,
#if defined(ENABLE_OVERLOADING)
    DisplaySettingChangedSignalInfo         ,
#endif
    afterDisplaySettingChanged              ,
    genClosure_DisplaySettingChanged        ,
    mk_DisplaySettingChangedCallback        ,
    noDisplaySettingChangedCallback         ,
    onDisplaySettingChanged                 ,
    wrap_DisplaySettingChangedCallback      ,




    ) 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.GI.Base.Signals as B.Signals
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.Gdk.Objects.AppLaunchContext as Gdk.AppLaunchContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.Event as Gdk.Event
import {-# SOURCE #-} qualified GI.Gdk.Objects.Keymap as Gdk.Keymap
import {-# SOURCE #-} qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Seat as Gdk.Seat
import {-# SOURCE #-} qualified GI.Gdk.Objects.Surface as Gdk.Surface

-- | Memory-managed wrapper type.
newtype Display = Display (ManagedPtr Display)
    deriving (Display -> Display -> Bool
(Display -> Display -> Bool)
-> (Display -> Display -> Bool) -> Eq Display
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Display -> Display -> Bool
$c/= :: Display -> Display -> Bool
== :: Display -> Display -> Bool
$c== :: Display -> Display -> Bool
Eq)
foreign import ccall "gdk_display_get_type"
    c_gdk_display_get_type :: IO GType

instance GObject Display where
    gobjectType :: IO GType
gobjectType = IO GType
c_gdk_display_get_type
    

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

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

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

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

-- | A convenience alias for `Nothing` :: `Maybe` `Display`.
noDisplay :: Maybe Display
noDisplay :: Maybe Display
noDisplay = Maybe Display
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveDisplayMethod (t :: Symbol) (o :: *) :: * where
    ResolveDisplayMethod "beep" o = DisplayBeepMethodInfo
    ResolveDisplayMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDisplayMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDisplayMethod "close" o = DisplayCloseMethodInfo
    ResolveDisplayMethod "deviceIsGrabbed" o = DisplayDeviceIsGrabbedMethodInfo
    ResolveDisplayMethod "flush" o = DisplayFlushMethodInfo
    ResolveDisplayMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDisplayMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDisplayMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveDisplayMethod "hasPending" o = DisplayHasPendingMethodInfo
    ResolveDisplayMethod "isClosed" o = DisplayIsClosedMethodInfo
    ResolveDisplayMethod "isComposited" o = DisplayIsCompositedMethodInfo
    ResolveDisplayMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDisplayMethod "isRgba" o = DisplayIsRgbaMethodInfo
    ResolveDisplayMethod "listSeats" o = DisplayListSeatsMethodInfo
    ResolveDisplayMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDisplayMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDisplayMethod "notifyStartupComplete" o = DisplayNotifyStartupCompleteMethodInfo
    ResolveDisplayMethod "peekEvent" o = DisplayPeekEventMethodInfo
    ResolveDisplayMethod "putEvent" o = DisplayPutEventMethodInfo
    ResolveDisplayMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDisplayMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDisplayMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDisplayMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDisplayMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDisplayMethod "supportsInputShapes" o = DisplaySupportsInputShapesMethodInfo
    ResolveDisplayMethod "supportsShapes" o = DisplaySupportsShapesMethodInfo
    ResolveDisplayMethod "sync" o = DisplaySyncMethodInfo
    ResolveDisplayMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDisplayMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDisplayMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDisplayMethod "getAppLaunchContext" o = DisplayGetAppLaunchContextMethodInfo
    ResolveDisplayMethod "getClipboard" o = DisplayGetClipboardMethodInfo
    ResolveDisplayMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDisplayMethod "getDefaultGroup" o = DisplayGetDefaultGroupMethodInfo
    ResolveDisplayMethod "getDefaultSeat" o = DisplayGetDefaultSeatMethodInfo
    ResolveDisplayMethod "getEvent" o = DisplayGetEventMethodInfo
    ResolveDisplayMethod "getKeymap" o = DisplayGetKeymapMethodInfo
    ResolveDisplayMethod "getMonitor" o = DisplayGetMonitorMethodInfo
    ResolveDisplayMethod "getMonitorAtPoint" o = DisplayGetMonitorAtPointMethodInfo
    ResolveDisplayMethod "getMonitorAtSurface" o = DisplayGetMonitorAtSurfaceMethodInfo
    ResolveDisplayMethod "getNMonitors" o = DisplayGetNMonitorsMethodInfo
    ResolveDisplayMethod "getName" o = DisplayGetNameMethodInfo
    ResolveDisplayMethod "getPrimaryClipboard" o = DisplayGetPrimaryClipboardMethodInfo
    ResolveDisplayMethod "getPrimaryMonitor" o = DisplayGetPrimaryMonitorMethodInfo
    ResolveDisplayMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDisplayMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDisplayMethod "getSetting" o = DisplayGetSettingMethodInfo
    ResolveDisplayMethod "getStartupNotificationId" o = DisplayGetStartupNotificationIdMethodInfo
    ResolveDisplayMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDisplayMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveDisplayMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDisplayMethod l o = O.MethodResolutionFailed l o

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

#endif

-- signal Display::closed
-- | The [closed](#signal:closed) signal is emitted when the connection to the windowing
-- system for /@display@/ is closed.
type DisplayClosedCallback =
    Bool
    -- ^ /@isError@/: 'P.True' if the display was closed due to an error
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DisplayClosedCallback`@.
noDisplayClosedCallback :: Maybe DisplayClosedCallback
noDisplayClosedCallback :: Maybe DisplayClosedCallback
noDisplayClosedCallback = Maybe DisplayClosedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplayClosed :: MonadIO m => DisplayClosedCallback -> m (GClosure C_DisplayClosedCallback)
genClosure_DisplayClosed :: DisplayClosedCallback -> m (GClosure C_DisplayClosedCallback)
genClosure_DisplayClosed cb :: DisplayClosedCallback
cb = IO (GClosure C_DisplayClosedCallback)
-> m (GClosure C_DisplayClosedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplayClosedCallback)
 -> m (GClosure C_DisplayClosedCallback))
-> IO (GClosure C_DisplayClosedCallback)
-> m (GClosure C_DisplayClosedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayClosedCallback
cb' = DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
cb
    C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
cb' IO (FunPtr C_DisplayClosedCallback)
-> (FunPtr C_DisplayClosedCallback
    -> IO (GClosure C_DisplayClosedCallback))
-> IO (GClosure C_DisplayClosedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplayClosedCallback
-> IO (GClosure C_DisplayClosedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplayClosedCallback` into a `C_DisplayClosedCallback`.
wrap_DisplayClosedCallback ::
    DisplayClosedCallback ->
    C_DisplayClosedCallback
wrap_DisplayClosedCallback :: DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback _cb :: DisplayClosedCallback
_cb _ isError :: CInt
isError _ = do
    let isError' :: Bool
isError' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
isError
    DisplayClosedCallback
_cb  Bool
isError'


-- | Connect a signal handler for the [closed](#signal: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' display #closed callback
-- @
-- 
-- 
onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> DisplayClosedCallback -> m SignalHandlerId
onDisplayClosed :: a -> DisplayClosedCallback -> m SignalHandlerId
onDisplayClosed obj :: a
obj cb :: DisplayClosedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayClosedCallback
cb' = DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
cb
    FunPtr C_DisplayClosedCallback
cb'' <- C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayClosedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "closed" FunPtr C_DisplayClosedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [closed](#signal: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' display #closed callback
-- @
-- 
-- 
afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> DisplayClosedCallback -> m SignalHandlerId
afterDisplayClosed :: a -> DisplayClosedCallback -> m SignalHandlerId
afterDisplayClosed obj :: a
obj cb :: DisplayClosedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayClosedCallback
cb' = DisplayClosedCallback -> C_DisplayClosedCallback
wrap_DisplayClosedCallback DisplayClosedCallback
cb
    FunPtr C_DisplayClosedCallback
cb'' <- C_DisplayClosedCallback -> IO (FunPtr C_DisplayClosedCallback)
mk_DisplayClosedCallback C_DisplayClosedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayClosedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "closed" FunPtr C_DisplayClosedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplayClosedSignalInfo
instance SignalInfo DisplayClosedSignalInfo where
    type HaskellCallbackType DisplayClosedSignalInfo = DisplayClosedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplayClosedCallback cb
        cb'' <- mk_DisplayClosedCallback cb'
        connectSignalFunPtr obj "closed" cb'' connectMode detail

#endif

-- signal Display::monitor-added
-- | The [monitorAdded](#signal:monitorAdded) signal is emitted whenever a monitor is
-- added.
type DisplayMonitorAddedCallback =
    Gdk.Monitor.Monitor
    -- ^ /@monitor@/: the monitor that was just added
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DisplayMonitorAddedCallback`@.
noDisplayMonitorAddedCallback :: Maybe DisplayMonitorAddedCallback
noDisplayMonitorAddedCallback :: Maybe DisplayMonitorAddedCallback
noDisplayMonitorAddedCallback = Maybe DisplayMonitorAddedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplayMonitorAdded :: MonadIO m => DisplayMonitorAddedCallback -> m (GClosure C_DisplayMonitorAddedCallback)
genClosure_DisplayMonitorAdded :: DisplayMonitorAddedCallback
-> m (GClosure C_DisplayMonitorAddedCallback)
genClosure_DisplayMonitorAdded cb :: DisplayMonitorAddedCallback
cb = IO (GClosure C_DisplayMonitorAddedCallback)
-> m (GClosure C_DisplayMonitorAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplayMonitorAddedCallback)
 -> m (GClosure C_DisplayMonitorAddedCallback))
-> IO (GClosure C_DisplayMonitorAddedCallback)
-> m (GClosure C_DisplayMonitorAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayMonitorAddedCallback
cb' = DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorAddedCallback DisplayMonitorAddedCallback
cb
    C_DisplayMonitorAddedCallback
-> IO (FunPtr C_DisplayMonitorAddedCallback)
mk_DisplayMonitorAddedCallback C_DisplayMonitorAddedCallback
cb' IO (FunPtr C_DisplayMonitorAddedCallback)
-> (FunPtr C_DisplayMonitorAddedCallback
    -> IO (GClosure C_DisplayMonitorAddedCallback))
-> IO (GClosure C_DisplayMonitorAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplayMonitorAddedCallback
-> IO (GClosure C_DisplayMonitorAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplayMonitorAddedCallback` into a `C_DisplayMonitorAddedCallback`.
wrap_DisplayMonitorAddedCallback ::
    DisplayMonitorAddedCallback ->
    C_DisplayMonitorAddedCallback
wrap_DisplayMonitorAddedCallback :: DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorAddedCallback _cb :: DisplayMonitorAddedCallback
_cb _ monitor :: Ptr Monitor
monitor _ = do
    Monitor
monitor' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
monitor
    DisplayMonitorAddedCallback
_cb  Monitor
monitor'


-- | Connect a signal handler for the [monitorAdded](#signal:monitorAdded) 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' display #monitorAdded callback
-- @
-- 
-- 
onDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorAddedCallback -> m SignalHandlerId
onDisplayMonitorAdded :: a -> DisplayMonitorAddedCallback -> m SignalHandlerId
onDisplayMonitorAdded obj :: a
obj cb :: DisplayMonitorAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayMonitorAddedCallback
cb' = DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorAddedCallback DisplayMonitorAddedCallback
cb
    FunPtr C_DisplayMonitorAddedCallback
cb'' <- C_DisplayMonitorAddedCallback
-> IO (FunPtr C_DisplayMonitorAddedCallback)
mk_DisplayMonitorAddedCallback C_DisplayMonitorAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayMonitorAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "monitor-added" FunPtr C_DisplayMonitorAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [monitorAdded](#signal:monitorAdded) 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' display #monitorAdded callback
-- @
-- 
-- 
afterDisplayMonitorAdded :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorAddedCallback -> m SignalHandlerId
afterDisplayMonitorAdded :: a -> DisplayMonitorAddedCallback -> m SignalHandlerId
afterDisplayMonitorAdded obj :: a
obj cb :: DisplayMonitorAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayMonitorAddedCallback
cb' = DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorAddedCallback DisplayMonitorAddedCallback
cb
    FunPtr C_DisplayMonitorAddedCallback
cb'' <- C_DisplayMonitorAddedCallback
-> IO (FunPtr C_DisplayMonitorAddedCallback)
mk_DisplayMonitorAddedCallback C_DisplayMonitorAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayMonitorAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "monitor-added" FunPtr C_DisplayMonitorAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplayMonitorAddedSignalInfo
instance SignalInfo DisplayMonitorAddedSignalInfo where
    type HaskellCallbackType DisplayMonitorAddedSignalInfo = DisplayMonitorAddedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplayMonitorAddedCallback cb
        cb'' <- mk_DisplayMonitorAddedCallback cb'
        connectSignalFunPtr obj "monitor-added" cb'' connectMode detail

#endif

-- signal Display::monitor-removed
-- | The [monitorRemoved](#signal:monitorRemoved) signal is emitted whenever a monitor is
-- removed.
type DisplayMonitorRemovedCallback =
    Gdk.Monitor.Monitor
    -- ^ /@monitor@/: the monitor that was just removed
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DisplayMonitorRemovedCallback`@.
noDisplayMonitorRemovedCallback :: Maybe DisplayMonitorRemovedCallback
noDisplayMonitorRemovedCallback :: Maybe DisplayMonitorAddedCallback
noDisplayMonitorRemovedCallback = Maybe DisplayMonitorAddedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplayMonitorRemoved :: MonadIO m => DisplayMonitorRemovedCallback -> m (GClosure C_DisplayMonitorRemovedCallback)
genClosure_DisplayMonitorRemoved :: DisplayMonitorAddedCallback
-> m (GClosure C_DisplayMonitorAddedCallback)
genClosure_DisplayMonitorRemoved cb :: DisplayMonitorAddedCallback
cb = IO (GClosure C_DisplayMonitorAddedCallback)
-> m (GClosure C_DisplayMonitorAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplayMonitorAddedCallback)
 -> m (GClosure C_DisplayMonitorAddedCallback))
-> IO (GClosure C_DisplayMonitorAddedCallback)
-> m (GClosure C_DisplayMonitorAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayMonitorAddedCallback
cb' = DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorRemovedCallback DisplayMonitorAddedCallback
cb
    C_DisplayMonitorAddedCallback
-> IO (FunPtr C_DisplayMonitorAddedCallback)
mk_DisplayMonitorRemovedCallback C_DisplayMonitorAddedCallback
cb' IO (FunPtr C_DisplayMonitorAddedCallback)
-> (FunPtr C_DisplayMonitorAddedCallback
    -> IO (GClosure C_DisplayMonitorAddedCallback))
-> IO (GClosure C_DisplayMonitorAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplayMonitorAddedCallback
-> IO (GClosure C_DisplayMonitorAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplayMonitorRemovedCallback` into a `C_DisplayMonitorRemovedCallback`.
wrap_DisplayMonitorRemovedCallback ::
    DisplayMonitorRemovedCallback ->
    C_DisplayMonitorRemovedCallback
wrap_DisplayMonitorRemovedCallback :: DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorRemovedCallback _cb :: DisplayMonitorAddedCallback
_cb _ monitor :: Ptr Monitor
monitor _ = do
    Monitor
monitor' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
monitor
    DisplayMonitorAddedCallback
_cb  Monitor
monitor'


-- | Connect a signal handler for the [monitorRemoved](#signal:monitorRemoved) 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' display #monitorRemoved callback
-- @
-- 
-- 
onDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorRemovedCallback -> m SignalHandlerId
onDisplayMonitorRemoved :: a -> DisplayMonitorAddedCallback -> m SignalHandlerId
onDisplayMonitorRemoved obj :: a
obj cb :: DisplayMonitorAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayMonitorAddedCallback
cb' = DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorRemovedCallback DisplayMonitorAddedCallback
cb
    FunPtr C_DisplayMonitorAddedCallback
cb'' <- C_DisplayMonitorAddedCallback
-> IO (FunPtr C_DisplayMonitorAddedCallback)
mk_DisplayMonitorRemovedCallback C_DisplayMonitorAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayMonitorAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "monitor-removed" FunPtr C_DisplayMonitorAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [monitorRemoved](#signal:monitorRemoved) 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' display #monitorRemoved callback
-- @
-- 
-- 
afterDisplayMonitorRemoved :: (IsDisplay a, MonadIO m) => a -> DisplayMonitorRemovedCallback -> m SignalHandlerId
afterDisplayMonitorRemoved :: a -> DisplayMonitorAddedCallback -> m SignalHandlerId
afterDisplayMonitorRemoved obj :: a
obj cb :: DisplayMonitorAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayMonitorAddedCallback
cb' = DisplayMonitorAddedCallback -> C_DisplayMonitorAddedCallback
wrap_DisplayMonitorRemovedCallback DisplayMonitorAddedCallback
cb
    FunPtr C_DisplayMonitorAddedCallback
cb'' <- C_DisplayMonitorAddedCallback
-> IO (FunPtr C_DisplayMonitorAddedCallback)
mk_DisplayMonitorRemovedCallback C_DisplayMonitorAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayMonitorAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "monitor-removed" FunPtr C_DisplayMonitorAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplayMonitorRemovedSignalInfo
instance SignalInfo DisplayMonitorRemovedSignalInfo where
    type HaskellCallbackType DisplayMonitorRemovedSignalInfo = DisplayMonitorRemovedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplayMonitorRemovedCallback cb
        cb'' <- mk_DisplayMonitorRemovedCallback cb'
        connectSignalFunPtr obj "monitor-removed" cb'' connectMode detail

#endif

-- signal Display::opened
-- | The [opened](#signal:opened) signal is emitted when the connection to the windowing
-- system for /@display@/ is opened.
type DisplayOpenedCallback =
    IO ()

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

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplayOpened :: MonadIO m => DisplayOpenedCallback -> m (GClosure C_DisplayOpenedCallback)
genClosure_DisplayOpened :: IO () -> m (GClosure C_DisplayOpenedCallback)
genClosure_DisplayOpened cb :: IO ()
cb = IO (GClosure C_DisplayOpenedCallback)
-> m (GClosure C_DisplayOpenedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplayOpenedCallback)
 -> m (GClosure C_DisplayOpenedCallback))
-> IO (GClosure C_DisplayOpenedCallback)
-> m (GClosure C_DisplayOpenedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayOpenedCallback
cb' = IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
cb
    C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
cb' IO (FunPtr C_DisplayOpenedCallback)
-> (FunPtr C_DisplayOpenedCallback
    -> IO (GClosure C_DisplayOpenedCallback))
-> IO (GClosure C_DisplayOpenedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplayOpenedCallback
-> IO (GClosure C_DisplayOpenedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplayOpenedCallback` into a `C_DisplayOpenedCallback`.
wrap_DisplayOpenedCallback ::
    DisplayOpenedCallback ->
    C_DisplayOpenedCallback
wrap_DisplayOpenedCallback :: IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [opened](#signal: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' display #opened callback
-- @
-- 
-- 
onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> DisplayOpenedCallback -> m SignalHandlerId
onDisplayOpened :: a -> IO () -> m SignalHandlerId
onDisplayOpened obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayOpenedCallback
cb' = IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
cb
    FunPtr C_DisplayOpenedCallback
cb'' <- C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayOpenedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "opened" FunPtr C_DisplayOpenedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [opened](#signal: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' display #opened callback
-- @
-- 
-- 
afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> DisplayOpenedCallback -> m SignalHandlerId
afterDisplayOpened :: a -> IO () -> m SignalHandlerId
afterDisplayOpened obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplayOpenedCallback
cb' = IO () -> C_DisplayOpenedCallback
wrap_DisplayOpenedCallback IO ()
cb
    FunPtr C_DisplayOpenedCallback
cb'' <- C_DisplayOpenedCallback -> IO (FunPtr C_DisplayOpenedCallback)
mk_DisplayOpenedCallback C_DisplayOpenedCallback
cb'
    a
-> Text
-> FunPtr C_DisplayOpenedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "opened" FunPtr C_DisplayOpenedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplayOpenedSignalInfo
instance SignalInfo DisplayOpenedSignalInfo where
    type HaskellCallbackType DisplayOpenedSignalInfo = DisplayOpenedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplayOpenedCallback cb
        cb'' <- mk_DisplayOpenedCallback cb'
        connectSignalFunPtr obj "opened" cb'' connectMode detail

#endif

-- signal Display::seat-added
-- | The [seatAdded](#signal:seatAdded) signal is emitted whenever a new seat is made
-- known to the windowing system.
type DisplaySeatAddedCallback =
    Gdk.Seat.Seat
    -- ^ /@seat@/: the seat that was just added
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DisplaySeatAddedCallback`@.
noDisplaySeatAddedCallback :: Maybe DisplaySeatAddedCallback
noDisplaySeatAddedCallback :: Maybe DisplaySeatAddedCallback
noDisplaySeatAddedCallback = Maybe DisplaySeatAddedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplaySeatAdded :: MonadIO m => DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
genClosure_DisplaySeatAdded :: DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
genClosure_DisplaySeatAdded cb :: DisplaySeatAddedCallback
cb = IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplaySeatAddedCallback)
 -> m (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
cb
    C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
cb' IO (FunPtr C_DisplaySeatAddedCallback)
-> (FunPtr C_DisplaySeatAddedCallback
    -> IO (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplaySeatAddedCallback
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplaySeatAddedCallback` into a `C_DisplaySeatAddedCallback`.
wrap_DisplaySeatAddedCallback ::
    DisplaySeatAddedCallback ->
    C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback :: DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback _cb :: DisplaySeatAddedCallback
_cb _ seat :: Ptr Seat
seat _ = do
    Seat
seat' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
seat
    DisplaySeatAddedCallback
_cb  Seat
seat'


-- | Connect a signal handler for the [seatAdded](#signal:seatAdded) 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' display #seatAdded callback
-- @
-- 
-- 
onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> DisplaySeatAddedCallback -> m SignalHandlerId
onDisplaySeatAdded :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
onDisplaySeatAdded obj :: a
obj cb :: DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
cb
    FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "seat-added" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [seatAdded](#signal:seatAdded) 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' display #seatAdded callback
-- @
-- 
-- 
afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> DisplaySeatAddedCallback -> m SignalHandlerId
afterDisplaySeatAdded :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
afterDisplaySeatAdded obj :: a
obj cb :: DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatAddedCallback DisplaySeatAddedCallback
cb
    FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatAddedCallback C_DisplaySeatAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "seat-added" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplaySeatAddedSignalInfo
instance SignalInfo DisplaySeatAddedSignalInfo where
    type HaskellCallbackType DisplaySeatAddedSignalInfo = DisplaySeatAddedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplaySeatAddedCallback cb
        cb'' <- mk_DisplaySeatAddedCallback cb'
        connectSignalFunPtr obj "seat-added" cb'' connectMode detail

#endif

-- signal Display::seat-removed
-- | The [seatRemoved](#signal:seatRemoved) signal is emitted whenever a seat is removed
-- by the windowing system.
type DisplaySeatRemovedCallback =
    Gdk.Seat.Seat
    -- ^ /@seat@/: the seat that was just removed
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DisplaySeatRemovedCallback`@.
noDisplaySeatRemovedCallback :: Maybe DisplaySeatRemovedCallback
noDisplaySeatRemovedCallback :: Maybe DisplaySeatAddedCallback
noDisplaySeatRemovedCallback = Maybe DisplaySeatAddedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplaySeatRemoved :: MonadIO m => DisplaySeatRemovedCallback -> m (GClosure C_DisplaySeatRemovedCallback)
genClosure_DisplaySeatRemoved :: DisplaySeatAddedCallback -> m (GClosure C_DisplaySeatAddedCallback)
genClosure_DisplaySeatRemoved cb :: DisplaySeatAddedCallback
cb = IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplaySeatAddedCallback)
 -> m (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
-> m (GClosure C_DisplaySeatAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
cb
    C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
cb' IO (FunPtr C_DisplaySeatAddedCallback)
-> (FunPtr C_DisplaySeatAddedCallback
    -> IO (GClosure C_DisplaySeatAddedCallback))
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplaySeatAddedCallback
-> IO (GClosure C_DisplaySeatAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplaySeatRemovedCallback` into a `C_DisplaySeatRemovedCallback`.
wrap_DisplaySeatRemovedCallback ::
    DisplaySeatRemovedCallback ->
    C_DisplaySeatRemovedCallback
wrap_DisplaySeatRemovedCallback :: DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback _cb :: DisplaySeatAddedCallback
_cb _ seat :: Ptr Seat
seat _ = do
    Seat
seat' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
seat
    DisplaySeatAddedCallback
_cb  Seat
seat'


-- | Connect a signal handler for the [seatRemoved](#signal:seatRemoved) 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' display #seatRemoved callback
-- @
-- 
-- 
onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> DisplaySeatRemovedCallback -> m SignalHandlerId
onDisplaySeatRemoved :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
onDisplaySeatRemoved obj :: a
obj cb :: DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
cb
    FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "seat-removed" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [seatRemoved](#signal:seatRemoved) 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' display #seatRemoved callback
-- @
-- 
-- 
afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> DisplaySeatRemovedCallback -> m SignalHandlerId
afterDisplaySeatRemoved :: a -> DisplaySeatAddedCallback -> m SignalHandlerId
afterDisplaySeatRemoved obj :: a
obj cb :: DisplaySeatAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySeatAddedCallback
cb' = DisplaySeatAddedCallback -> C_DisplaySeatAddedCallback
wrap_DisplaySeatRemovedCallback DisplaySeatAddedCallback
cb
    FunPtr C_DisplaySeatAddedCallback
cb'' <- C_DisplaySeatAddedCallback
-> IO (FunPtr C_DisplaySeatAddedCallback)
mk_DisplaySeatRemovedCallback C_DisplaySeatAddedCallback
cb'
    a
-> Text
-> FunPtr C_DisplaySeatAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "seat-removed" FunPtr C_DisplaySeatAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplaySeatRemovedSignalInfo
instance SignalInfo DisplaySeatRemovedSignalInfo where
    type HaskellCallbackType DisplaySeatRemovedSignalInfo = DisplaySeatRemovedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplaySeatRemovedCallback cb
        cb'' <- mk_DisplaySeatRemovedCallback cb'
        connectSignalFunPtr obj "seat-removed" cb'' connectMode detail

#endif

-- signal Display::setting-changed
-- | The [settingChanged](#signal:settingChanged) signal is emitted whenever a setting
-- changes its value.
type DisplaySettingChangedCallback =
    T.Text
    -- ^ /@setting@/: the name of the setting that changed
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DisplaySettingChangedCallback`@.
noDisplaySettingChangedCallback :: Maybe DisplaySettingChangedCallback
noDisplaySettingChangedCallback :: Maybe DisplaySettingChangedCallback
noDisplaySettingChangedCallback = Maybe DisplaySettingChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_DisplaySettingChanged :: MonadIO m => DisplaySettingChangedCallback -> m (GClosure C_DisplaySettingChangedCallback)
genClosure_DisplaySettingChanged :: DisplaySettingChangedCallback
-> m (GClosure C_DisplaySettingChangedCallback)
genClosure_DisplaySettingChanged cb :: DisplaySettingChangedCallback
cb = IO (GClosure C_DisplaySettingChangedCallback)
-> m (GClosure C_DisplaySettingChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DisplaySettingChangedCallback)
 -> m (GClosure C_DisplaySettingChangedCallback))
-> IO (GClosure C_DisplaySettingChangedCallback)
-> m (GClosure C_DisplaySettingChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySettingChangedCallback
cb' = DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
cb
    C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
cb' IO (FunPtr C_DisplaySettingChangedCallback)
-> (FunPtr C_DisplaySettingChangedCallback
    -> IO (GClosure C_DisplaySettingChangedCallback))
-> IO (GClosure C_DisplaySettingChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DisplaySettingChangedCallback
-> IO (GClosure C_DisplaySettingChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DisplaySettingChangedCallback` into a `C_DisplaySettingChangedCallback`.
wrap_DisplaySettingChangedCallback ::
    DisplaySettingChangedCallback ->
    C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback :: DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback _cb :: DisplaySettingChangedCallback
_cb _ setting :: CString
setting _ = do
    Text
setting' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
setting
    DisplaySettingChangedCallback
_cb  Text
setting'


-- | Connect a signal handler for the [settingChanged](#signal:settingChanged) 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' display #settingChanged callback
-- @
-- 
-- 
onDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> DisplaySettingChangedCallback -> m SignalHandlerId
onDisplaySettingChanged :: a -> DisplaySettingChangedCallback -> m SignalHandlerId
onDisplaySettingChanged obj :: a
obj cb :: DisplaySettingChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySettingChangedCallback
cb' = DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
cb
    FunPtr C_DisplaySettingChangedCallback
cb'' <- C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
cb'
    a
-> Text
-> FunPtr C_DisplaySettingChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "setting-changed" FunPtr C_DisplaySettingChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [settingChanged](#signal:settingChanged) 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' display #settingChanged callback
-- @
-- 
-- 
afterDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> DisplaySettingChangedCallback -> m SignalHandlerId
afterDisplaySettingChanged :: a -> DisplaySettingChangedCallback -> m SignalHandlerId
afterDisplaySettingChanged obj :: a
obj cb :: DisplaySettingChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_DisplaySettingChangedCallback
cb' = DisplaySettingChangedCallback -> C_DisplaySettingChangedCallback
wrap_DisplaySettingChangedCallback DisplaySettingChangedCallback
cb
    FunPtr C_DisplaySettingChangedCallback
cb'' <- C_DisplaySettingChangedCallback
-> IO (FunPtr C_DisplaySettingChangedCallback)
mk_DisplaySettingChangedCallback C_DisplaySettingChangedCallback
cb'
    a
-> Text
-> FunPtr C_DisplaySettingChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "setting-changed" FunPtr C_DisplaySettingChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DisplaySettingChangedSignalInfo
instance SignalInfo DisplaySettingChangedSignalInfo where
    type HaskellCallbackType DisplaySettingChangedSignalInfo = DisplaySettingChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DisplaySettingChangedCallback cb
        cb'' <- mk_DisplaySettingChangedCallback cb'
        connectSignalFunPtr obj "setting-changed" cb'' connectMode detail

#endif

-- VVV Prop "composited"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@composited@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' display #composited
-- @
getDisplayComposited :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayComposited :: o -> m Bool
getDisplayComposited obj :: o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "composited"

#if defined(ENABLE_OVERLOADING)
data DisplayCompositedPropertyInfo
instance AttrInfo DisplayCompositedPropertyInfo where
    type AttrAllowedOps DisplayCompositedPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DisplayCompositedPropertyInfo = IsDisplay
    type AttrSetTypeConstraint DisplayCompositedPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DisplayCompositedPropertyInfo = (~) ()
    type AttrTransferType DisplayCompositedPropertyInfo = ()
    type AttrGetType DisplayCompositedPropertyInfo = Bool
    type AttrLabel DisplayCompositedPropertyInfo = "composited"
    type AttrOrigin DisplayCompositedPropertyInfo = Display
    attrGet = getDisplayComposited
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "rgba"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@rgba@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' display #rgba
-- @
getDisplayRgba :: (MonadIO m, IsDisplay o) => o -> m Bool
getDisplayRgba :: o -> m Bool
getDisplayRgba obj :: o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "rgba"

#if defined(ENABLE_OVERLOADING)
data DisplayRgbaPropertyInfo
instance AttrInfo DisplayRgbaPropertyInfo where
    type AttrAllowedOps DisplayRgbaPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DisplayRgbaPropertyInfo = IsDisplay
    type AttrSetTypeConstraint DisplayRgbaPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DisplayRgbaPropertyInfo = (~) ()
    type AttrTransferType DisplayRgbaPropertyInfo = ()
    type AttrGetType DisplayRgbaPropertyInfo = Bool
    type AttrLabel DisplayRgbaPropertyInfo = "rgba"
    type AttrOrigin DisplayRgbaPropertyInfo = Display
    attrGet = getDisplayRgba
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Display
type instance O.AttributeList Display = DisplayAttributeList
type DisplayAttributeList = ('[ '("composited", DisplayCompositedPropertyInfo), '("rgba", DisplayRgbaPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
displayComposited :: AttrLabelProxy "composited"
displayComposited = AttrLabelProxy

displayRgba :: AttrLabelProxy "rgba"
displayRgba = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Display = DisplaySignalList
type DisplaySignalList = ('[ '("closed", DisplayClosedSignalInfo), '("monitorAdded", DisplayMonitorAddedSignalInfo), '("monitorRemoved", DisplayMonitorRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("opened", DisplayOpenedSignalInfo), '("seatAdded", DisplaySeatAddedSignalInfo), '("seatRemoved", DisplaySeatRemovedSignalInfo), '("settingChanged", DisplaySettingChangedSignalInfo)] :: [(Symbol, *)])

#endif

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

foreign import ccall "gdk_display_beep" gdk_display_beep :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO ()

-- | Emits a short beep on /@display@/
displayBeep ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m ()
displayBeep :: a -> m ()
displayBeep display :: a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Display -> IO ()
gdk_display_beep Ptr Display
display'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DisplayBeepMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayBeepMethodInfo a signature where
    overloadedMethod = displayBeep

#endif

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

foreign import ccall "gdk_display_close" gdk_display_close :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO ()

-- | Closes the connection to the windowing system for the given display,
-- and cleans up associated resources.
displayClose ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m ()
displayClose :: a -> m ()
displayClose display :: a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Display -> IO ()
gdk_display_close Ptr Display
display'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DisplayCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayCloseMethodInfo a signature where
    overloadedMethod = displayClose

#endif

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

foreign import ccall "gdk_display_device_is_grabbed" gdk_display_device_is_grabbed :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    IO CInt

-- | Returns 'P.True' if there is an ongoing grab on /@device@/ for /@display@/.
displayDeviceIsGrabbed ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> b
    -- ^ /@device@/: a t'GI.Gdk.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if there is a grab in effect for /@device@/.
displayDeviceIsGrabbed :: a -> b -> m Bool
displayDeviceIsGrabbed display :: a
display device :: b
device = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    CInt
result <- Ptr Display -> Ptr Device -> IO CInt
gdk_display_device_is_grabbed Ptr Display
display' Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplayDeviceIsGrabbedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDisplay a, Gdk.Device.IsDevice b) => O.MethodInfo DisplayDeviceIsGrabbedMethodInfo a signature where
    overloadedMethod = displayDeviceIsGrabbed

#endif

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

foreign import ccall "gdk_display_flush" gdk_display_flush :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO ()

-- | Flushes any requests queued for the windowing system; this happens automatically
-- when the main loop blocks waiting for new events, but if your application
-- is drawing without returning control to the main loop, you may need
-- to call this function explicitly. A common case where this function
-- needs to be called is when an application is executing drawing commands
-- from a thread other than the thread where the main loop is running.
-- 
-- This is most useful for X11. On windowing systems where requests are
-- handled synchronously, this function will do nothing.
displayFlush ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m ()
displayFlush :: a -> m ()
displayFlush display :: a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Display -> IO ()
gdk_display_flush Ptr Display
display'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DisplayFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplayFlushMethodInfo a signature where
    overloadedMethod = displayFlush

#endif

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

foreign import ccall "gdk_display_get_app_launch_context" gdk_display_get_app_launch_context :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.AppLaunchContext.AppLaunchContext)

-- | Returns a t'GI.Gdk.Objects.AppLaunchContext.AppLaunchContext' suitable for launching
-- applications on the given display.
displayGetAppLaunchContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.AppLaunchContext.AppLaunchContext
    -- ^ __Returns:__ a new t'GI.Gdk.Objects.AppLaunchContext.AppLaunchContext' for /@display@/.
    --     Free with 'GI.GObject.Objects.Object.objectUnref' when done
displayGetAppLaunchContext :: a -> m AppLaunchContext
displayGetAppLaunchContext display :: a
display = IO AppLaunchContext -> m AppLaunchContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AppLaunchContext -> m AppLaunchContext)
-> IO AppLaunchContext -> m AppLaunchContext
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr AppLaunchContext
result <- Ptr Display -> IO (Ptr AppLaunchContext)
gdk_display_get_app_launch_context Ptr Display
display'
    Text -> Ptr AppLaunchContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetAppLaunchContext" Ptr AppLaunchContext
result
    AppLaunchContext
result' <- ((ManagedPtr AppLaunchContext -> AppLaunchContext)
-> Ptr AppLaunchContext -> IO AppLaunchContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr AppLaunchContext -> AppLaunchContext
Gdk.AppLaunchContext.AppLaunchContext) Ptr AppLaunchContext
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    AppLaunchContext -> IO AppLaunchContext
forall (m :: * -> *) a. Monad m => a -> m a
return AppLaunchContext
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetAppLaunchContextMethodInfo
instance (signature ~ (m Gdk.AppLaunchContext.AppLaunchContext), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetAppLaunchContextMethodInfo a signature where
    overloadedMethod = displayGetAppLaunchContext

#endif

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

foreign import ccall "gdk_display_get_clipboard" gdk_display_get_clipboard :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Clipboard.Clipboard)

-- | Gets the clipboard used for copy\/paste operations.
displayGetClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.Clipboard.Clipboard
    -- ^ __Returns:__ the display\'s clipboard
displayGetClipboard :: a -> m Clipboard
displayGetClipboard display :: a
display = IO Clipboard -> m Clipboard
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Clipboard -> m Clipboard) -> IO Clipboard -> m Clipboard
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Clipboard
result <- Ptr Display -> IO (Ptr Clipboard)
gdk_display_get_clipboard Ptr Display
display'
    Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetClipboard" Ptr Clipboard
result
    Clipboard
result' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetClipboardMethodInfo a signature where
    overloadedMethod = displayGetClipboard

#endif

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

foreign import ccall "gdk_display_get_default_group" gdk_display_get_default_group :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Surface.Surface)

-- | Returns the default group leader surface for all toplevel surfaces
-- on /@display@/. This surface is implicitly created by GDK.
-- See @/gdk_surface_set_group()/@.
displayGetDefaultGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.Surface.Surface
    -- ^ __Returns:__ The default group leader surface
    -- for /@display@/
displayGetDefaultGroup :: a -> m Surface
displayGetDefaultGroup display :: a
display = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Surface
result <- Ptr Display -> IO (Ptr Surface)
gdk_display_get_default_group Ptr Display
display'
    Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetDefaultGroup" Ptr Surface
result
    Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Gdk.Surface.Surface) Ptr Surface
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetDefaultGroupMethodInfo
instance (signature ~ (m Gdk.Surface.Surface), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetDefaultGroupMethodInfo a signature where
    overloadedMethod = displayGetDefaultGroup

#endif

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

foreign import ccall "gdk_display_get_default_seat" gdk_display_get_default_seat :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Seat.Seat)

-- | Returns the default t'GI.Gdk.Objects.Seat.Seat' for this display.
displayGetDefaultSeat ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.Seat.Seat
    -- ^ __Returns:__ the default seat.
displayGetDefaultSeat :: a -> m Seat
displayGetDefaultSeat display :: a
display = IO Seat -> m Seat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Seat -> m Seat) -> IO Seat -> m Seat
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Seat
result <- Ptr Display -> IO (Ptr Seat)
gdk_display_get_default_seat Ptr Display
display'
    Text -> Ptr Seat -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetDefaultSeat" Ptr Seat
result
    Seat
result' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Seat -> IO Seat
forall (m :: * -> *) a. Monad m => a -> m a
return Seat
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetDefaultSeatMethodInfo
instance (signature ~ (m Gdk.Seat.Seat), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetDefaultSeatMethodInfo a signature where
    overloadedMethod = displayGetDefaultSeat

#endif

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

foreign import ccall "gdk_display_get_event" gdk_display_get_event :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Event.Event)

-- | Gets the next @/GdkEvent/@ to be processed for /@display@/, fetching events from the
-- windowing system if necessary.
displayGetEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m (Maybe Gdk.Event.Event)
    -- ^ __Returns:__ the next @/GdkEvent/@ to be processed,
    --   or 'P.Nothing' if no events are pending
displayGetEvent :: a -> m (Maybe Event)
displayGetEvent display :: a
display = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Event
result <- Ptr Display -> IO (Ptr Event)
gdk_display_get_event Ptr Display
display'
    Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Event
result' -> do
        Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
result'
        Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult

#if defined(ENABLE_OVERLOADING)
data DisplayGetEventMethodInfo
instance (signature ~ (m (Maybe Gdk.Event.Event)), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetEventMethodInfo a signature where
    overloadedMethod = displayGetEvent

#endif

-- method Display::get_keymap
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GdkDisplay" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Keymap" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_get_keymap" gdk_display_get_keymap :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Keymap.Keymap)

-- | Returns the t'GI.Gdk.Objects.Keymap.Keymap' attached to /@display@/.
displayGetKeymap ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: the t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.Keymap.Keymap
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Keymap.Keymap' attached to /@display@/.
displayGetKeymap :: a -> m Keymap
displayGetKeymap display :: a
display = IO Keymap -> m Keymap
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Keymap -> m Keymap) -> IO Keymap -> m Keymap
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Keymap
result <- Ptr Display -> IO (Ptr Keymap)
gdk_display_get_keymap Ptr Display
display'
    Text -> Ptr Keymap -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetKeymap" Ptr Keymap
result
    Keymap
result' <- ((ManagedPtr Keymap -> Keymap) -> Ptr Keymap -> IO Keymap
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Keymap -> Keymap
Gdk.Keymap.Keymap) Ptr Keymap
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Keymap -> IO Keymap
forall (m :: * -> *) a. Monad m => a -> m a
return Keymap
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetKeymapMethodInfo
instance (signature ~ (m Gdk.Keymap.Keymap), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetKeymapMethodInfo a signature where
    overloadedMethod = displayGetKeymap

#endif

-- method Display::get_monitor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "monitor_num"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "number of the monitor"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Monitor" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_get_monitor" gdk_display_get_monitor :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    Int32 ->                                -- monitor_num : TBasicType TInt
    IO (Ptr Gdk.Monitor.Monitor)

-- | Gets a monitor associated with this display.
displayGetMonitor ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> Int32
    -- ^ /@monitorNum@/: number of the monitor
    -> m (Maybe Gdk.Monitor.Monitor)
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Monitor.Monitor', or 'P.Nothing' if
    --    /@monitorNum@/ is not a valid monitor number
displayGetMonitor :: a -> Int32 -> m (Maybe Monitor)
displayGetMonitor display :: a
display monitorNum :: Int32
monitorNum = IO (Maybe Monitor) -> m (Maybe Monitor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Monitor) -> m (Maybe Monitor))
-> IO (Maybe Monitor) -> m (Maybe Monitor)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Monitor
result <- Ptr Display -> Int32 -> IO (Ptr Monitor)
gdk_display_get_monitor Ptr Display
display' Int32
monitorNum
    Maybe Monitor
maybeResult <- Ptr Monitor -> (Ptr Monitor -> IO Monitor) -> IO (Maybe Monitor)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Monitor
result ((Ptr Monitor -> IO Monitor) -> IO (Maybe Monitor))
-> (Ptr Monitor -> IO Monitor) -> IO (Maybe Monitor)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Monitor
result' -> do
        Monitor
result'' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
result'
        Monitor -> IO Monitor
forall (m :: * -> *) a. Monad m => a -> m a
return Monitor
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Maybe Monitor -> IO (Maybe Monitor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Monitor
maybeResult

#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorMethodInfo
instance (signature ~ (Int32 -> m (Maybe Gdk.Monitor.Monitor)), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetMonitorMethodInfo a signature where
    overloadedMethod = displayGetMonitor

#endif

-- method Display::get_monitor_at_point
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , 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 "the x coordinate of the point"
--                 , 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 "the y coordinate of the point"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Monitor" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_get_monitor_at_point" gdk_display_get_monitor_at_point :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO (Ptr Gdk.Monitor.Monitor)

-- | Gets the monitor in which the point (/@x@/, /@y@/) is located,
-- or a nearby monitor if the point is not in any monitor.
displayGetMonitorAtPoint ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> Int32
    -- ^ /@x@/: the x coordinate of the point
    -> Int32
    -- ^ /@y@/: the y coordinate of the point
    -> m Gdk.Monitor.Monitor
    -- ^ __Returns:__ the monitor containing the point
displayGetMonitorAtPoint :: a -> Int32 -> Int32 -> m Monitor
displayGetMonitorAtPoint display :: a
display x :: Int32
x y :: Int32
y = IO Monitor -> m Monitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Monitor -> m Monitor) -> IO Monitor -> m Monitor
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Monitor
result <- Ptr Display -> Int32 -> Int32 -> IO (Ptr Monitor)
gdk_display_get_monitor_at_point Ptr Display
display' Int32
x Int32
y
    Text -> Ptr Monitor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetMonitorAtPoint" Ptr Monitor
result
    Monitor
result' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Monitor -> IO Monitor
forall (m :: * -> *) a. Monad m => a -> m a
return Monitor
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorAtPointMethodInfo
instance (signature ~ (Int32 -> Int32 -> m Gdk.Monitor.Monitor), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetMonitorAtPointMethodInfo a signature where
    overloadedMethod = displayGetMonitorAtPoint

#endif

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

foreign import ccall "gdk_display_get_monitor_at_surface" gdk_display_get_monitor_at_surface :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    Ptr Gdk.Surface.Surface ->              -- surface : TInterface (Name {namespace = "Gdk", name = "Surface"})
    IO (Ptr Gdk.Monitor.Monitor)

-- | Gets the monitor in which the largest area of /@surface@/
-- resides, or a monitor close to /@surface@/ if it is outside
-- of all monitors.
displayGetMonitorAtSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Surface.IsSurface b) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> b
    -- ^ /@surface@/: a t'GI.Gdk.Objects.Surface.Surface'
    -> m Gdk.Monitor.Monitor
    -- ^ __Returns:__ the monitor with the largest overlap with /@surface@/
displayGetMonitorAtSurface :: a -> b -> m Monitor
displayGetMonitorAtSurface display :: a
display surface :: b
surface = IO Monitor -> m Monitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Monitor -> m Monitor) -> IO Monitor -> m Monitor
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Surface
surface' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
surface
    Ptr Monitor
result <- Ptr Display -> Ptr Surface -> IO (Ptr Monitor)
gdk_display_get_monitor_at_surface Ptr Display
display' Ptr Surface
surface'
    Text -> Ptr Monitor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetMonitorAtSurface" Ptr Monitor
result
    Monitor
result' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
surface
    Monitor -> IO Monitor
forall (m :: * -> *) a. Monad m => a -> m a
return Monitor
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetMonitorAtSurfaceMethodInfo
instance (signature ~ (b -> m Gdk.Monitor.Monitor), MonadIO m, IsDisplay a, Gdk.Surface.IsSurface b) => O.MethodInfo DisplayGetMonitorAtSurfaceMethodInfo a signature where
    overloadedMethod = displayGetMonitorAtSurface

#endif

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

foreign import ccall "gdk_display_get_n_monitors" gdk_display_get_n_monitors :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO Int32

-- | Gets the number of monitors that belong to /@display@/.
-- 
-- The returned number is valid until the next emission of the
-- [monitorAdded]("GI.Gdk.Objects.Display#signal:monitorAdded") or [monitorRemoved]("GI.Gdk.Objects.Display#signal:monitorRemoved") signal.
displayGetNMonitors ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Int32
    -- ^ __Returns:__ the number of monitors
displayGetNMonitors :: a -> m Int32
displayGetNMonitors display :: a
display = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Int32
result <- Ptr Display -> IO Int32
gdk_display_get_n_monitors Ptr Display
display'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data DisplayGetNMonitorsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetNMonitorsMethodInfo a signature where
    overloadedMethod = displayGetNMonitors

#endif

-- method Display::get_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , 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 "gdk_display_get_name" gdk_display_get_name :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CString

-- | Gets the name of the display.
displayGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m T.Text
    -- ^ __Returns:__ a string representing the display name. This string is owned
    -- by GDK and should not be modified or freed.
displayGetName :: a -> m Text
displayGetName display :: a
display = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CString
result <- Ptr Display -> IO CString
gdk_display_get_name Ptr Display
display'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetNameMethodInfo a signature where
    overloadedMethod = displayGetName

#endif

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

foreign import ccall "gdk_display_get_primary_clipboard" gdk_display_get_primary_clipboard :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Clipboard.Clipboard)

-- | Gets the clipboard used for the primary selection. On backends where the
-- primary clipboard is not supported natively, GDK emulates this clipboard
-- locally.
displayGetPrimaryClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.Clipboard.Clipboard
    -- ^ __Returns:__ the primary clipboard
displayGetPrimaryClipboard :: a -> m Clipboard
displayGetPrimaryClipboard display :: a
display = IO Clipboard -> m Clipboard
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Clipboard -> m Clipboard) -> IO Clipboard -> m Clipboard
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Clipboard
result <- Ptr Display -> IO (Ptr Clipboard)
gdk_display_get_primary_clipboard Ptr Display
display'
    Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetPrimaryClipboard" Ptr Clipboard
result
    Clipboard
result' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetPrimaryClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetPrimaryClipboardMethodInfo a signature where
    overloadedMethod = displayGetPrimaryClipboard

#endif

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

foreign import ccall "gdk_display_get_primary_monitor" gdk_display_get_primary_monitor :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Monitor.Monitor)

-- | Gets the primary monitor for the display.
-- 
-- The primary monitor is considered the monitor where the “main desktop”
-- lives. While normal application surfaces typically allow the window
-- manager to place the surfaces, specialized desktop applications
-- such as panels should place themselves on the primary monitor.
-- 
-- If no monitor is the designated primary monitor, any monitor
-- (usually the first) may be returned. To make sure there is a dedicated
-- primary monitor, use 'GI.Gdk.Objects.Monitor.monitorIsPrimary' on the returned monitor.
displayGetPrimaryMonitor ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Gdk.Monitor.Monitor
    -- ^ __Returns:__ the primary monitor, or any monitor if no
    --     primary monitor is configured by the user
displayGetPrimaryMonitor :: a -> m Monitor
displayGetPrimaryMonitor display :: a
display = IO Monitor -> m Monitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Monitor -> m Monitor) -> IO Monitor -> m Monitor
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Monitor
result <- Ptr Display -> IO (Ptr Monitor)
gdk_display_get_primary_monitor Ptr Display
display'
    Text -> Ptr Monitor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetPrimaryMonitor" Ptr Monitor
result
    Monitor
result' <- ((ManagedPtr Monitor -> Monitor) -> Ptr Monitor -> IO Monitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Monitor -> Monitor
Gdk.Monitor.Monitor) Ptr Monitor
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Monitor -> IO Monitor
forall (m :: * -> *) a. Monad m => a -> m a
return Monitor
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetPrimaryMonitorMethodInfo
instance (signature ~ (m Gdk.Monitor.Monitor), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetPrimaryMonitorMethodInfo a signature where
    overloadedMethod = displayGetPrimaryMonitor

#endif

-- method Display::get_setting
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the setting"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Value" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the value of the setting"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_get_setting" gdk_display_get_setting :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface (Name {namespace = "GObject", name = "Value"})
    IO CInt

-- | Retrieves a desktop-wide setting such as double-click time
-- for the /@display@/.
displayGetSetting ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> T.Text
    -- ^ /@name@/: the name of the setting
    -> GValue
    -- ^ /@value@/: location to store the value of the setting
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the setting existed and a value was stored
    --   in /@value@/, 'P.False' otherwise
displayGetSetting :: a -> Text -> GValue -> m Bool
displayGetSetting display :: a
display name :: Text
name value :: GValue
value = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
    CInt
result <- Ptr Display -> CString -> Ptr GValue -> IO CInt
gdk_display_get_setting Ptr Display
display' CString
name' Ptr GValue
value'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetSettingMethodInfo
instance (signature ~ (T.Text -> GValue -> m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetSettingMethodInfo a signature where
    overloadedMethod = displayGetSetting

#endif

-- method Display::get_startup_notification_id
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , 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 "gdk_display_get_startup_notification_id" gdk_display_get_startup_notification_id :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CString

-- | Gets the startup notification ID for a Wayland display, or 'P.Nothing'
-- if no ID has been defined.
displayGetStartupNotificationId ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m T.Text
    -- ^ __Returns:__ the startup notification ID for /@display@/, or 'P.Nothing'
displayGetStartupNotificationId :: a -> m Text
displayGetStartupNotificationId display :: a
display = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CString
result <- Ptr Display -> IO CString
gdk_display_get_startup_notification_id Ptr Display
display'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "displayGetStartupNotificationId" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DisplayGetStartupNotificationIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDisplay a) => O.MethodInfo DisplayGetStartupNotificationIdMethodInfo a signature where
    overloadedMethod = displayGetStartupNotificationId

#endif

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

foreign import ccall "gdk_display_has_pending" gdk_display_has_pending :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CInt

-- | Returns whether the display has events that are waiting
-- to be processed.
displayHasPending ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if there are events ready to be processed.
displayHasPending :: a -> m Bool
displayHasPending display :: a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CInt
result <- Ptr Display -> IO CInt
gdk_display_has_pending Ptr Display
display'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplayHasPendingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayHasPendingMethodInfo a signature where
    overloadedMethod = displayHasPending

#endif

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

foreign import ccall "gdk_display_is_closed" gdk_display_is_closed :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CInt

-- | Finds out if the display has been closed.
displayIsClosed ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the display is closed.
displayIsClosed :: a -> m Bool
displayIsClosed display :: a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CInt
result <- Ptr Display -> IO CInt
gdk_display_is_closed Ptr Display
display'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplayIsClosedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayIsClosedMethodInfo a signature where
    overloadedMethod = displayIsClosed

#endif

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

foreign import ccall "gdk_display_is_composited" gdk_display_is_composited :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CInt

-- | Returns whether surfaces can reasonably be expected to have
-- their alpha channel drawn correctly on the screen. Check
-- 'GI.Gdk.Objects.Display.displayIsRgba' for wether the display supports an
-- alpha channel.
-- 
-- On X11 this function returns whether a compositing manager is
-- compositing on /@display@/.
-- 
-- On modern displays, this value is always 'P.True'.
displayIsComposited ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Bool
    -- ^ __Returns:__ Whether surfaces with RGBA visuals can reasonably be
    -- expected to have their alpha channels drawn correctly on the screen.
displayIsComposited :: a -> m Bool
displayIsComposited display :: a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CInt
result <- Ptr Display -> IO CInt
gdk_display_is_composited Ptr Display
display'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplayIsCompositedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayIsCompositedMethodInfo a signature where
    overloadedMethod = displayIsComposited

#endif

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

foreign import ccall "gdk_display_is_rgba" gdk_display_is_rgba :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CInt

-- | Returns wether surfaces on this /@display@/ are created with an
-- alpha channel.
-- 
-- Even if a 'P.True' is returned, it is possible that the
-- surface’s alpha channel won’t be honored when displaying the
-- surface on the screen: in particular, for X an appropriate
-- windowing manager and compositing manager must be running to
-- provide appropriate display. Use 'GI.Gdk.Objects.Display.displayIsComposited'
-- to check if that is the case.
-- 
-- For setting an overall opacity for a top-level surface, see
-- 'GI.Gdk.Objects.Surface.surfaceSetOpacity'.
-- 
-- On modern displays, this value is always 'P.True'.
displayIsRgba ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if surfaces are created with an alpha channel or
    --     'P.False' if the display does not support this functionality.
displayIsRgba :: a -> m Bool
displayIsRgba display :: a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CInt
result <- Ptr Display -> IO CInt
gdk_display_is_rgba Ptr Display
display'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplayIsRgbaMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplayIsRgbaMethodInfo a signature where
    overloadedMethod = displayIsRgba

#endif

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

foreign import ccall "gdk_display_list_seats" gdk_display_list_seats :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr (GList (Ptr Gdk.Seat.Seat)))

-- | Returns the list of seats known to /@display@/.
displayListSeats ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m [Gdk.Seat.Seat]
    -- ^ __Returns:__ the
    --          list of seats known to the t'GI.Gdk.Objects.Display.Display'
displayListSeats :: a -> m [Seat]
displayListSeats display :: a
display = IO [Seat] -> m [Seat]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Seat] -> m [Seat]) -> IO [Seat] -> m [Seat]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr (GList (Ptr Seat))
result <- Ptr Display -> IO (Ptr (GList (Ptr Seat)))
gdk_display_list_seats Ptr Display
display'
    [Ptr Seat]
result' <- Ptr (GList (Ptr Seat)) -> IO [Ptr Seat]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Seat))
result
    [Seat]
result'' <- (Ptr Seat -> IO Seat) -> [Ptr Seat] -> IO [Seat]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) [Ptr Seat]
result'
    Ptr (GList (Ptr Seat)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Seat))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    [Seat] -> IO [Seat]
forall (m :: * -> *) a. Monad m => a -> m a
return [Seat]
result''

#if defined(ENABLE_OVERLOADING)
data DisplayListSeatsMethodInfo
instance (signature ~ (m [Gdk.Seat.Seat]), MonadIO m, IsDisplay a) => O.MethodInfo DisplayListSeatsMethodInfo a signature where
    overloadedMethod = displayListSeats

#endif

-- method Display::notify_startup_complete
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "startup_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a startup-notification identifier, for which\n    notification process should be completed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_notify_startup_complete" gdk_display_notify_startup_complete :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    CString ->                              -- startup_id : TBasicType TUTF8
    IO ()

-- | Indicates to the GUI environment that the application has
-- finished loading, using a given identifier.
-- 
-- GTK+ will call this function automatically for @/GtkWindow/@
-- with custom startup-notification identifier unless
-- @/gtk_window_set_auto_startup_notification()/@ is called to
-- disable that feature.
displayNotifyStartupComplete ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> T.Text
    -- ^ /@startupId@/: a startup-notification identifier, for which
    --     notification process should be completed
    -> m ()
displayNotifyStartupComplete :: a -> Text -> m ()
displayNotifyStartupComplete display :: a
display startupId :: Text
startupId = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CString
startupId' <- Text -> IO CString
textToCString Text
startupId
    Ptr Display -> CString -> IO ()
gdk_display_notify_startup_complete Ptr Display
display' CString
startupId'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
startupId'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

#endif

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

foreign import ccall "gdk_display_peek_event" gdk_display_peek_event :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO (Ptr Gdk.Event.Event)

-- | Gets a copy of the first @/GdkEvent/@ in the /@display@/’s event queue, without
-- removing the event from the queue.  (Note that this function will
-- not get more events from the windowing system.  It only checks the events
-- that have already been moved to the GDK event queue.)
displayPeekEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m (Maybe Gdk.Event.Event)
    -- ^ __Returns:__ the first @/GdkEvent/@ on the
    --   event queue
displayPeekEvent :: a -> m (Maybe Event)
displayPeekEvent display :: a
display = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Event
result <- Ptr Display -> IO (Ptr Event)
gdk_display_peek_event Ptr Display
display'
    Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Event
result' -> do
        Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
result'
        Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult

#if defined(ENABLE_OVERLOADING)
data DisplayPeekEventMethodInfo
instance (signature ~ (m (Maybe Gdk.Event.Event)), MonadIO m, IsDisplay a) => O.MethodInfo DisplayPeekEventMethodInfo a signature where
    overloadedMethod = displayPeekEvent

#endif

-- method Display::put_event
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "display"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Display" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDisplay" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "event"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Event" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkEvent." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_put_event" gdk_display_put_event :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    IO ()

-- | Appends a copy of the given event onto the front of the event
-- queue for /@display@/.
displayPutEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a, Gdk.Event.IsEvent b) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> b
    -- ^ /@event@/: a @/GdkEvent/@.
    -> m ()
displayPutEvent :: a -> b -> m ()
displayPutEvent display :: a
display event :: b
event = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Event
event' <- b -> IO (Ptr Event)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
event
    Ptr Display -> Ptr Event -> IO ()
gdk_display_put_event Ptr Display
display' Ptr Event
event'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
event
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DisplayPutEventMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDisplay a, Gdk.Event.IsEvent b) => O.MethodInfo DisplayPutEventMethodInfo a signature where
    overloadedMethod = displayPutEvent

#endif

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

foreign import ccall "gdk_display_supports_input_shapes" gdk_display_supports_input_shapes :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CInt

-- | Returns 'P.True' if @/gdk_surface_input_shape_combine_mask()/@ can
-- be used to modify the input shape of surfaces on /@display@/.
displaySupportsInputShapes ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if surfaces with modified input shape are supported
displaySupportsInputShapes :: a -> m Bool
displaySupportsInputShapes display :: a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CInt
result <- Ptr Display -> IO CInt
gdk_display_supports_input_shapes Ptr Display
display'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplaySupportsInputShapesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplaySupportsInputShapesMethodInfo a signature where
    overloadedMethod = displaySupportsInputShapes

#endif

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

foreign import ccall "gdk_display_supports_shapes" gdk_display_supports_shapes :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO CInt

-- | Returns 'P.True' if @/gdk_surface_shape_combine_mask()/@ can
-- be used to create shaped windows on /@display@/.
displaySupportsShapes ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if shaped windows are supported
displaySupportsShapes :: a -> m Bool
displaySupportsShapes display :: a
display = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    CInt
result <- Ptr Display -> IO CInt
gdk_display_supports_shapes Ptr Display
display'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DisplaySupportsShapesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDisplay a) => O.MethodInfo DisplaySupportsShapesMethodInfo a signature where
    overloadedMethod = displaySupportsShapes

#endif

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

foreign import ccall "gdk_display_sync" gdk_display_sync :: 
    Ptr Display ->                          -- display : TInterface (Name {namespace = "Gdk", name = "Display"})
    IO ()

-- | Flushes any requests queued for the windowing system and waits until all
-- requests have been handled. This is often used for making sure that the
-- display is synchronized with the current state of the program. Calling
-- 'GI.Gdk.Objects.Display.displaySync' before @/gdk_error_trap_pop()/@ makes sure that any errors
-- generated from earlier requests are handled before the error trap is
-- removed.
-- 
-- This is most useful for X11. On windowing systems where requests are
-- handled synchronously, this function will do nothing.
displaySync ::
    (B.CallStack.HasCallStack, MonadIO m, IsDisplay a) =>
    a
    -- ^ /@display@/: a t'GI.Gdk.Objects.Display.Display'
    -> m ()
displaySync :: a -> m ()
displaySync display :: a
display = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
    Ptr Display -> IO ()
gdk_display_sync Ptr Display
display'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DisplaySyncMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDisplay a) => O.MethodInfo DisplaySyncMethodInfo a signature where
    overloadedMethod = displaySync

#endif

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

foreign import ccall "gdk_display_get_default" gdk_display_get_default :: 
    IO (Ptr Display)

-- | Gets the default t'GI.Gdk.Objects.Display.Display'. This is a convenience
-- function for:
-- @gdk_display_manager_get_default_display (gdk_display_manager_get ())@.
displayGetDefault ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m (Maybe Display)
    -- ^ __Returns:__ a t'GI.Gdk.Objects.Display.Display', or 'P.Nothing' if
    --   there is no default display.
displayGetDefault :: m (Maybe Display)
displayGetDefault  = IO (Maybe Display) -> m (Maybe Display)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Display) -> m (Maybe Display))
-> IO (Maybe Display) -> m (Maybe Display)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Display
result <- IO (Ptr Display)
gdk_display_get_default
    Maybe Display
maybeResult <- Ptr Display -> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Display
result ((Ptr Display -> IO Display) -> IO (Maybe Display))
-> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Display
result' -> do
        Display
result'' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Display) Ptr Display
result'
        Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result''
    Maybe Display -> IO (Maybe Display)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Display
maybeResult

#if defined(ENABLE_OVERLOADING)
#endif

-- method Display::open
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "display_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the display to open"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Display" })
-- throws : False
-- Skip return : False

foreign import ccall "gdk_display_open" gdk_display_open :: 
    CString ->                              -- display_name : TBasicType TUTF8
    IO (Ptr Display)

-- | Opens a display.
displayOpen ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@displayName@/: the name of the display to open
    -> m (Maybe Display)
    -- ^ __Returns:__ a t'GI.Gdk.Objects.Display.Display', or 'P.Nothing' if the
    --     display could not be opened
displayOpen :: Text -> m (Maybe Display)
displayOpen displayName :: Text
displayName = IO (Maybe Display) -> m (Maybe Display)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Display) -> m (Maybe Display))
-> IO (Maybe Display) -> m (Maybe Display)
forall a b. (a -> b) -> a -> b
$ do
    CString
displayName' <- Text -> IO CString
textToCString Text
displayName
    Ptr Display
result <- CString -> IO (Ptr Display)
gdk_display_open CString
displayName'
    Maybe Display
maybeResult <- Ptr Display -> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Display
result ((Ptr Display -> IO Display) -> IO (Maybe Display))
-> (Ptr Display -> IO Display) -> IO (Maybe Display)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Display
result' -> do
        Display
result'' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Display) Ptr Display
result'
        Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result''
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
displayName'
    Maybe Display -> IO (Maybe Display)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Display
maybeResult

#if defined(ENABLE_OVERLOADING)
#endif