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

The 'GI.Gdk.Objects.Seat.Seat' object represents a collection of input devices
that belong to a user.
-}

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

module GI.Gdk.Objects.Seat
    (

-- * Exported types
    Seat(..)                                ,
    IsSeat                                  ,
    toSeat                                  ,
    noSeat                                  ,


 -- * Methods
-- ** getCapabilities #method:getCapabilities#

#if ENABLE_OVERLOADING
    SeatGetCapabilitiesMethodInfo           ,
#endif
    seatGetCapabilities                     ,


-- ** getDisplay #method:getDisplay#

#if ENABLE_OVERLOADING
    SeatGetDisplayMethodInfo                ,
#endif
    seatGetDisplay                          ,


-- ** getKeyboard #method:getKeyboard#

#if ENABLE_OVERLOADING
    SeatGetKeyboardMethodInfo               ,
#endif
    seatGetKeyboard                         ,


-- ** getPointer #method:getPointer#

#if ENABLE_OVERLOADING
    SeatGetPointerMethodInfo                ,
#endif
    seatGetPointer                          ,


-- ** getSlaves #method:getSlaves#

#if ENABLE_OVERLOADING
    SeatGetSlavesMethodInfo                 ,
#endif
    seatGetSlaves                           ,


-- ** grab #method:grab#

#if ENABLE_OVERLOADING
    SeatGrabMethodInfo                      ,
#endif
    seatGrab                                ,


-- ** ungrab #method:ungrab#

#if ENABLE_OVERLOADING
    SeatUngrabMethodInfo                    ,
#endif
    seatUngrab                              ,




 -- * Properties
-- ** display #attr:display#
{- | 'GI.Gdk.Objects.Display.Display' of this seat.

/Since: 3.20/
-}
#if ENABLE_OVERLOADING
    SeatDisplayPropertyInfo                 ,
#endif
    constructSeatDisplay                    ,
    getSeatDisplay                          ,
#if ENABLE_OVERLOADING
    seatDisplay                             ,
#endif




 -- * Signals
-- ** deviceAdded #signal:deviceAdded#

    C_SeatDeviceAddedCallback               ,
    SeatDeviceAddedCallback                 ,
#if ENABLE_OVERLOADING
    SeatDeviceAddedSignalInfo               ,
#endif
    afterSeatDeviceAdded                    ,
    genClosure_SeatDeviceAdded              ,
    mk_SeatDeviceAddedCallback              ,
    noSeatDeviceAddedCallback               ,
    onSeatDeviceAdded                       ,
    wrap_SeatDeviceAddedCallback            ,


-- ** deviceRemoved #signal:deviceRemoved#

    C_SeatDeviceRemovedCallback             ,
    SeatDeviceRemovedCallback               ,
#if ENABLE_OVERLOADING
    SeatDeviceRemovedSignalInfo             ,
#endif
    afterSeatDeviceRemoved                  ,
    genClosure_SeatDeviceRemoved            ,
    mk_SeatDeviceRemovedCallback            ,
    noSeatDeviceRemovedCallback             ,
    onSeatDeviceRemoved                     ,
    wrap_SeatDeviceRemovedCallback          ,


-- ** toolAdded #signal:toolAdded#

    C_SeatToolAddedCallback                 ,
    SeatToolAddedCallback                   ,
#if ENABLE_OVERLOADING
    SeatToolAddedSignalInfo                 ,
#endif
    afterSeatToolAdded                      ,
    genClosure_SeatToolAdded                ,
    mk_SeatToolAddedCallback                ,
    noSeatToolAddedCallback                 ,
    onSeatToolAdded                         ,
    wrap_SeatToolAddedCallback              ,


-- ** toolRemoved #signal:toolRemoved#

    C_SeatToolRemovedCallback               ,
    SeatToolRemovedCallback                 ,
#if ENABLE_OVERLOADING
    SeatToolRemovedSignalInfo               ,
#endif
    afterSeatToolRemoved                    ,
    genClosure_SeatToolRemoved              ,
    mk_SeatToolRemovedCallback              ,
    noSeatToolRemovedCallback               ,
    onSeatToolRemoved                       ,
    wrap_SeatToolRemovedCallback            ,




    ) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Callbacks as Gdk.Callbacks
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.DeviceTool as Gdk.DeviceTool
import {-# SOURCE #-} qualified GI.Gdk.Objects.Display as Gdk.Display
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Unions.Event as Gdk.Event

-- | Memory-managed wrapper type.
newtype Seat = Seat (ManagedPtr Seat)
foreign import ccall "gdk_seat_get_type"
    c_gdk_seat_get_type :: IO GType

instance GObject Seat where
    gobjectType _ = c_gdk_seat_get_type


-- | Type class for types which can be safely cast to `Seat`, for instance with `toSeat`.
class GObject o => IsSeat o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Seat a) =>
    IsSeat a
#endif
instance IsSeat Seat
instance GObject.Object.IsObject Seat

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

-- | A convenience alias for `Nothing` :: `Maybe` `Seat`.
noSeat :: Maybe Seat
noSeat = Nothing

#if ENABLE_OVERLOADING
type family ResolveSeatMethod (t :: Symbol) (o :: *) :: * where
    ResolveSeatMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveSeatMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveSeatMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveSeatMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveSeatMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveSeatMethod "grab" o = SeatGrabMethodInfo
    ResolveSeatMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveSeatMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveSeatMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveSeatMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveSeatMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveSeatMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveSeatMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveSeatMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveSeatMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveSeatMethod "ungrab" o = SeatUngrabMethodInfo
    ResolveSeatMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveSeatMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveSeatMethod "getCapabilities" o = SeatGetCapabilitiesMethodInfo
    ResolveSeatMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveSeatMethod "getDisplay" o = SeatGetDisplayMethodInfo
    ResolveSeatMethod "getKeyboard" o = SeatGetKeyboardMethodInfo
    ResolveSeatMethod "getPointer" o = SeatGetPointerMethodInfo
    ResolveSeatMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveSeatMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveSeatMethod "getSlaves" o = SeatGetSlavesMethodInfo
    ResolveSeatMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveSeatMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveSeatMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveSeatMethod t Seat, O.MethodInfo info Seat p) => O.IsLabelProxy t (Seat -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

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

#endif

-- signal Seat::device-added
{- |
The ::device-added signal is emitted when a new input
device is related to this seat.

/Since: 3.20/
-}
type SeatDeviceAddedCallback =
    Gdk.Device.Device
    {- ^ /@device@/: the newly added 'GI.Gdk.Objects.Device.Device'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `SeatDeviceAddedCallback`@.
noSeatDeviceAddedCallback :: Maybe SeatDeviceAddedCallback
noSeatDeviceAddedCallback = Nothing

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

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

-- | Wrap the callback into a `Closure`.
genClosure_SeatDeviceAdded :: SeatDeviceAddedCallback -> IO Closure
genClosure_SeatDeviceAdded cb = do
    let cb' = wrap_SeatDeviceAddedCallback cb
    mk_SeatDeviceAddedCallback cb' >>= newCClosure


-- | Wrap a `SeatDeviceAddedCallback` into a `C_SeatDeviceAddedCallback`.
wrap_SeatDeviceAddedCallback ::
    SeatDeviceAddedCallback ->
    C_SeatDeviceAddedCallback
wrap_SeatDeviceAddedCallback _cb _ device _ = do
    device' <- (newObject Gdk.Device.Device) device
    _cb  device'


{- |
Connect a signal handler for the “@device-added@” 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' seat #deviceAdded callback
@
-}
onSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId
onSeatDeviceAdded obj cb = liftIO $ do
    let cb' = wrap_SeatDeviceAddedCallback cb
    cb'' <- mk_SeatDeviceAddedCallback cb'
    connectSignalFunPtr obj "device-added" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@device-added@” 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' seat #deviceAdded callback
@
-}
afterSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId
afterSeatDeviceAdded obj cb = liftIO $ do
    let cb' = wrap_SeatDeviceAddedCallback cb
    cb'' <- mk_SeatDeviceAddedCallback cb'
    connectSignalFunPtr obj "device-added" cb'' SignalConnectAfter


-- signal Seat::device-removed
{- |
The ::device-removed signal is emitted when an
input device is removed (e.g. unplugged).

/Since: 3.20/
-}
type SeatDeviceRemovedCallback =
    Gdk.Device.Device
    {- ^ /@device@/: the just removed 'GI.Gdk.Objects.Device.Device'. -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `SeatDeviceRemovedCallback`@.
noSeatDeviceRemovedCallback :: Maybe SeatDeviceRemovedCallback
noSeatDeviceRemovedCallback = Nothing

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

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

-- | Wrap the callback into a `Closure`.
genClosure_SeatDeviceRemoved :: SeatDeviceRemovedCallback -> IO Closure
genClosure_SeatDeviceRemoved cb = do
    let cb' = wrap_SeatDeviceRemovedCallback cb
    mk_SeatDeviceRemovedCallback cb' >>= newCClosure


-- | Wrap a `SeatDeviceRemovedCallback` into a `C_SeatDeviceRemovedCallback`.
wrap_SeatDeviceRemovedCallback ::
    SeatDeviceRemovedCallback ->
    C_SeatDeviceRemovedCallback
wrap_SeatDeviceRemovedCallback _cb _ device _ = do
    device' <- (newObject Gdk.Device.Device) device
    _cb  device'


{- |
Connect a signal handler for the “@device-removed@” 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' seat #deviceRemoved callback
@
-}
onSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId
onSeatDeviceRemoved obj cb = liftIO $ do
    let cb' = wrap_SeatDeviceRemovedCallback cb
    cb'' <- mk_SeatDeviceRemovedCallback cb'
    connectSignalFunPtr obj "device-removed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@device-removed@” 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' seat #deviceRemoved callback
@
-}
afterSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId
afterSeatDeviceRemoved obj cb = liftIO $ do
    let cb' = wrap_SeatDeviceRemovedCallback cb
    cb'' <- mk_SeatDeviceRemovedCallback cb'
    connectSignalFunPtr obj "device-removed" cb'' SignalConnectAfter


-- signal Seat::tool-added
{- |
The ::tool-added signal is emitted whenever a new tool
is made known to the seat. The tool may later be assigned
to a device (i.e. on proximity with a tablet). The device
will emit the 'GI.Gdk.Objects.Device.Device'::@/tool-changed/@ signal accordingly.

A same tool may be used by several devices.

/Since: 3.22/
-}
type SeatToolAddedCallback =
    Gdk.DeviceTool.DeviceTool
    {- ^ /@tool@/: the new 'GI.Gdk.Objects.DeviceTool.DeviceTool' known to the seat -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `SeatToolAddedCallback`@.
noSeatToolAddedCallback :: Maybe SeatToolAddedCallback
noSeatToolAddedCallback = Nothing

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

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

-- | Wrap the callback into a `Closure`.
genClosure_SeatToolAdded :: SeatToolAddedCallback -> IO Closure
genClosure_SeatToolAdded cb = do
    let cb' = wrap_SeatToolAddedCallback cb
    mk_SeatToolAddedCallback cb' >>= newCClosure


-- | Wrap a `SeatToolAddedCallback` into a `C_SeatToolAddedCallback`.
wrap_SeatToolAddedCallback ::
    SeatToolAddedCallback ->
    C_SeatToolAddedCallback
wrap_SeatToolAddedCallback _cb _ tool _ = do
    tool' <- (newObject Gdk.DeviceTool.DeviceTool) tool
    _cb  tool'


{- |
Connect a signal handler for the “@tool-added@” 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' seat #toolAdded callback
@
-}
onSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId
onSeatToolAdded obj cb = liftIO $ do
    let cb' = wrap_SeatToolAddedCallback cb
    cb'' <- mk_SeatToolAddedCallback cb'
    connectSignalFunPtr obj "tool-added" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@tool-added@” 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' seat #toolAdded callback
@
-}
afterSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId
afterSeatToolAdded obj cb = liftIO $ do
    let cb' = wrap_SeatToolAddedCallback cb
    cb'' <- mk_SeatToolAddedCallback cb'
    connectSignalFunPtr obj "tool-added" cb'' SignalConnectAfter


-- signal Seat::tool-removed
{- |
This signal is emitted whenever a tool is no longer known
to this /@seat@/.

/Since: 3.22/
-}
type SeatToolRemovedCallback =
    Gdk.DeviceTool.DeviceTool
    {- ^ /@tool@/: the just removed 'GI.Gdk.Objects.DeviceTool.DeviceTool' -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `SeatToolRemovedCallback`@.
noSeatToolRemovedCallback :: Maybe SeatToolRemovedCallback
noSeatToolRemovedCallback = Nothing

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

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

-- | Wrap the callback into a `Closure`.
genClosure_SeatToolRemoved :: SeatToolRemovedCallback -> IO Closure
genClosure_SeatToolRemoved cb = do
    let cb' = wrap_SeatToolRemovedCallback cb
    mk_SeatToolRemovedCallback cb' >>= newCClosure


-- | Wrap a `SeatToolRemovedCallback` into a `C_SeatToolRemovedCallback`.
wrap_SeatToolRemovedCallback ::
    SeatToolRemovedCallback ->
    C_SeatToolRemovedCallback
wrap_SeatToolRemovedCallback _cb _ tool _ = do
    tool' <- (newObject Gdk.DeviceTool.DeviceTool) tool
    _cb  tool'


{- |
Connect a signal handler for the “@tool-removed@” 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' seat #toolRemoved callback
@
-}
onSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId
onSeatToolRemoved obj cb = liftIO $ do
    let cb' = wrap_SeatToolRemovedCallback cb
    cb'' <- mk_SeatToolRemovedCallback cb'
    connectSignalFunPtr obj "tool-removed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@tool-removed@” 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' seat #toolRemoved callback
@
-}
afterSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId
afterSeatToolRemoved obj cb = liftIO $ do
    let cb' = wrap_SeatToolRemovedCallback cb
    cb'' <- mk_SeatToolRemovedCallback cb'
    connectSignalFunPtr obj "tool-removed" cb'' SignalConnectAfter


-- VVV Prop "display"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Display"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@display@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' seat #display
@
-}
getSeatDisplay :: (MonadIO m, IsSeat o) => o -> m Gdk.Display.Display
getSeatDisplay obj = liftIO $ checkUnexpectedNothing "getSeatDisplay" $ getObjectPropertyObject obj "display" Gdk.Display.Display

{- |
Construct a `GValueConstruct` with valid value for the “@display@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructSeatDisplay :: (IsSeat o, Gdk.Display.IsDisplay a) => a -> IO (GValueConstruct o)
constructSeatDisplay val = constructObjectPropertyObject "display" (Just val)

#if ENABLE_OVERLOADING
data SeatDisplayPropertyInfo
instance AttrInfo SeatDisplayPropertyInfo where
    type AttrAllowedOps SeatDisplayPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint SeatDisplayPropertyInfo = Gdk.Display.IsDisplay
    type AttrBaseTypeConstraint SeatDisplayPropertyInfo = IsSeat
    type AttrGetType SeatDisplayPropertyInfo = Gdk.Display.Display
    type AttrLabel SeatDisplayPropertyInfo = "display"
    type AttrOrigin SeatDisplayPropertyInfo = Seat
    attrGet _ = getSeatDisplay
    attrSet _ = undefined
    attrConstruct _ = constructSeatDisplay
    attrClear _ = undefined
#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList Seat
type instance O.AttributeList Seat = SeatAttributeList
type SeatAttributeList = ('[ '("display", SeatDisplayPropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
seatDisplay :: AttrLabelProxy "display"
seatDisplay = AttrLabelProxy

#endif

#if ENABLE_OVERLOADING
data SeatDeviceAddedSignalInfo
instance SignalInfo SeatDeviceAddedSignalInfo where
    type HaskellCallbackType SeatDeviceAddedSignalInfo = SeatDeviceAddedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_SeatDeviceAddedCallback cb
        cb'' <- mk_SeatDeviceAddedCallback cb'
        connectSignalFunPtr obj "device-added" cb'' connectMode

data SeatDeviceRemovedSignalInfo
instance SignalInfo SeatDeviceRemovedSignalInfo where
    type HaskellCallbackType SeatDeviceRemovedSignalInfo = SeatDeviceRemovedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_SeatDeviceRemovedCallback cb
        cb'' <- mk_SeatDeviceRemovedCallback cb'
        connectSignalFunPtr obj "device-removed" cb'' connectMode

data SeatToolAddedSignalInfo
instance SignalInfo SeatToolAddedSignalInfo where
    type HaskellCallbackType SeatToolAddedSignalInfo = SeatToolAddedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_SeatToolAddedCallback cb
        cb'' <- mk_SeatToolAddedCallback cb'
        connectSignalFunPtr obj "tool-added" cb'' connectMode

data SeatToolRemovedSignalInfo
instance SignalInfo SeatToolRemovedSignalInfo where
    type HaskellCallbackType SeatToolRemovedSignalInfo = SeatToolRemovedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_SeatToolRemovedCallback cb
        cb'' <- mk_SeatToolRemovedCallback cb'
        connectSignalFunPtr obj "tool-removed" cb'' connectMode

type instance O.SignalList Seat = SeatSignalList
type SeatSignalList = ('[ '("deviceAdded", SeatDeviceAddedSignalInfo), '("deviceRemoved", SeatDeviceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("toolAdded", SeatToolAddedSignalInfo), '("toolRemoved", SeatToolRemovedSignalInfo)] :: [(Symbol, *)])

#endif

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

foreign import ccall "gdk_seat_get_capabilities" gdk_seat_get_capabilities ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    IO CUInt

{- |
Returns the capabilities this 'GI.Gdk.Objects.Seat.Seat' currently has.

/Since: 3.20/
-}
seatGetCapabilities ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> m [Gdk.Flags.SeatCapabilities]
    {- ^ __Returns:__ the seat capabilities -}
seatGetCapabilities seat = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    result <- gdk_seat_get_capabilities seat'
    let result' = wordToGFlags result
    touchManagedPtr seat
    return result'

#if ENABLE_OVERLOADING
data SeatGetCapabilitiesMethodInfo
instance (signature ~ (m [Gdk.Flags.SeatCapabilities]), MonadIO m, IsSeat a) => O.MethodInfo SeatGetCapabilitiesMethodInfo a signature where
    overloadedMethod _ = seatGetCapabilities

#endif

-- method Seat::get_display
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "seat", argType = TInterface (Name {namespace = "Gdk", name = "Seat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkSeat", 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_seat_get_display" gdk_seat_get_display ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    IO (Ptr Gdk.Display.Display)

{- |
Returns the 'GI.Gdk.Objects.Display.Display' this seat belongs to.
-}
seatGetDisplay ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> m Gdk.Display.Display
    {- ^ __Returns:__ a 'GI.Gdk.Objects.Display.Display'. This object is owned by GTK+
         and must not be freed. -}
seatGetDisplay seat = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    result <- gdk_seat_get_display seat'
    checkUnexpectedReturnNULL "seatGetDisplay" result
    result' <- (newObject Gdk.Display.Display) result
    touchManagedPtr seat
    return result'

#if ENABLE_OVERLOADING
data SeatGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsSeat a) => O.MethodInfo SeatGetDisplayMethodInfo a signature where
    overloadedMethod _ = seatGetDisplay

#endif

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

foreign import ccall "gdk_seat_get_keyboard" gdk_seat_get_keyboard ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    IO (Ptr Gdk.Device.Device)

{- |
Returns the master device that routes keyboard events.

/Since: 3.20/
-}
seatGetKeyboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> m (Maybe Gdk.Device.Device)
    {- ^ __Returns:__ a master 'GI.Gdk.Objects.Device.Device' with keyboard
         capabilities. This object is owned by GTK+ and must not be freed. -}
seatGetKeyboard seat = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    result <- gdk_seat_get_keyboard seat'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Gdk.Device.Device) result'
        return result''
    touchManagedPtr seat
    return maybeResult

#if ENABLE_OVERLOADING
data SeatGetKeyboardMethodInfo
instance (signature ~ (m (Maybe Gdk.Device.Device)), MonadIO m, IsSeat a) => O.MethodInfo SeatGetKeyboardMethodInfo a signature where
    overloadedMethod _ = seatGetKeyboard

#endif

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

foreign import ccall "gdk_seat_get_pointer" gdk_seat_get_pointer ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    IO (Ptr Gdk.Device.Device)

{- |
Returns the master device that routes pointer events.

/Since: 3.20/
-}
seatGetPointer ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> m (Maybe Gdk.Device.Device)
    {- ^ __Returns:__ a master 'GI.Gdk.Objects.Device.Device' with pointer
         capabilities. This object is owned by GTK+ and must not be freed. -}
seatGetPointer seat = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    result <- gdk_seat_get_pointer seat'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Gdk.Device.Device) result'
        return result''
    touchManagedPtr seat
    return maybeResult

#if ENABLE_OVERLOADING
data SeatGetPointerMethodInfo
instance (signature ~ (m (Maybe Gdk.Device.Device)), MonadIO m, IsSeat a) => O.MethodInfo SeatGetPointerMethodInfo a signature where
    overloadedMethod _ = seatGetPointer

#endif

-- method Seat::get_slaves
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "seat", argType = TInterface (Name {namespace = "Gdk", name = "Seat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkSeat", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "capabilities", argType = TInterface (Name {namespace = "Gdk", name = "SeatCapabilities"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "capabilities to get devices for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TGList (TInterface (Name {namespace = "Gdk", name = "Device"})))
-- throws : False
-- Skip return : False

foreign import ccall "gdk_seat_get_slaves" gdk_seat_get_slaves ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    CUInt ->                                -- capabilities : TInterface (Name {namespace = "Gdk", name = "SeatCapabilities"})
    IO (Ptr (GList (Ptr Gdk.Device.Device)))

{- |
Returns the slave devices that match the given capabilities.

/Since: 3.20/
-}
seatGetSlaves ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> [Gdk.Flags.SeatCapabilities]
    {- ^ /@capabilities@/: capabilities to get devices for -}
    -> m [Gdk.Device.Device]
    {- ^ __Returns:__ A list of @/GdkDevices/@.
         The list must be freed with @/g_list_free()/@, the elements are owned
         by GDK and must not be freed. -}
seatGetSlaves seat capabilities = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    let capabilities' = gflagsToWord capabilities
    result <- gdk_seat_get_slaves seat' capabilities'
    result' <- unpackGList result
    result'' <- mapM (newObject Gdk.Device.Device) result'
    g_list_free result
    touchManagedPtr seat
    return result''

#if ENABLE_OVERLOADING
data SeatGetSlavesMethodInfo
instance (signature ~ ([Gdk.Flags.SeatCapabilities] -> m [Gdk.Device.Device]), MonadIO m, IsSeat a) => O.MethodInfo SeatGetSlavesMethodInfo a signature where
    overloadedMethod _ = seatGetSlaves

#endif

-- method Seat::grab
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "seat", argType = TInterface (Name {namespace = "Gdk", name = "Seat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkSeat", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "window", argType = TInterface (Name {namespace = "Gdk", name = "Window"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GdkWindow which will own the grab", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "capabilities", argType = TInterface (Name {namespace = "Gdk", name = "SeatCapabilities"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "capabilities that will be grabbed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "owner_events", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %FALSE then all device events are reported with respect to\n               @window and are only reported if selected by @event_mask. If\n               %TRUE then pointer events for this application are reported\n               as normal, but pointer events outside this application are\n               reported with respect to @window and only if selected by\n               @event_mask. In either mode, unreported events are discarded.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cursor", argType = TInterface (Name {namespace = "Gdk", name = "Cursor"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the cursor to display while the grab is active. If\n         this is %NULL then the normal cursors are used for\n         @window and its descendants, and the cursor for @window is used\n         elsewhere.", 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 = True, argDoc = Documentation {rawDocText = Just "the event that is triggering the grab, or %NULL if none\n        is available.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "prepare_func", argType = TInterface (Name {namespace = "Gdk", name = "SeatGrabPrepareFunc"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "function to\n               prepare the window to be grabbed, it can be %NULL if @window is\n               visible before this call.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 7, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "prepare_func_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data to pass to @prepare_func", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "GrabStatus"}))
-- throws : False
-- Skip return : False

foreign import ccall "gdk_seat_grab" gdk_seat_grab ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- capabilities : TInterface (Name {namespace = "Gdk", name = "SeatCapabilities"})
    CInt ->                                 -- owner_events : TBasicType TBoolean
    Ptr Gdk.Cursor.Cursor ->                -- cursor : TInterface (Name {namespace = "Gdk", name = "Cursor"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    FunPtr Gdk.Callbacks.C_SeatGrabPrepareFunc -> -- prepare_func : TInterface (Name {namespace = "Gdk", name = "SeatGrabPrepareFunc"})
    Ptr () ->                               -- prepare_func_data : TBasicType TPtr
    IO CUInt

{- |
Grabs the seat so that all events corresponding to the given /@capabilities@/
are passed to this application until the seat is ungrabbed with 'GI.Gdk.Objects.Seat.seatUngrab',
or the window becomes hidden. This overrides any previous grab on the
seat by this client.

As a rule of thumb, if a grab is desired over 'GI.Gdk.Flags.SeatCapabilitiesPointer',
all other \"pointing\" capabilities (eg. 'GI.Gdk.Flags.SeatCapabilitiesTouch') should
be grabbed too, so the user is able to interact with all of those while
the grab holds, you should thus use 'GI.Gdk.Flags.SeatCapabilitiesAllPointing' most
commonly.

Grabs are used for operations which need complete control over the
events corresponding to the given capabilities. For example in GTK+ this
is used for Drag and Drop operations, popup menus and such.

Note that if the event mask of a 'GI.Gdk.Objects.Window.Window' has selected both button press
and button release events, or touch begin and touch end, then a press event
will cause an automatic grab until the button is released, equivalent to a
grab on the window with /@ownerEvents@/ set to 'True'. This is done because most
applications expect to receive paired press and release events.

If you set up anything at the time you take the grab that needs to be
cleaned up when the grab ends, you should handle the 'GI.Gdk.Structs.EventGrabBroken.EventGrabBroken'
events that are emitted when the grab ends unvoluntarily.

/Since: 3.20/
-}
seatGrab ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a, Gdk.Window.IsWindow b, Gdk.Cursor.IsCursor c) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> b
    {- ^ /@window@/: the 'GI.Gdk.Objects.Window.Window' which will own the grab -}
    -> [Gdk.Flags.SeatCapabilities]
    {- ^ /@capabilities@/: capabilities that will be grabbed -}
    -> Bool
    {- ^ /@ownerEvents@/: if 'False' then all device events are reported with respect to
               /@window@/ and are only reported if selected by /@eventMask@/. If
               'True' then pointer events for this application are reported
               as normal, but pointer events outside this application are
               reported with respect to /@window@/ and only if selected by
               /@eventMask@/. In either mode, unreported events are discarded. -}
    -> Maybe (c)
    {- ^ /@cursor@/: the cursor to display while the grab is active. If
         this is 'Nothing' then the normal cursors are used for
         /@window@/ and its descendants, and the cursor for /@window@/ is used
         elsewhere. -}
    -> Maybe (Gdk.Event.Event)
    {- ^ /@event@/: the event that is triggering the grab, or 'Nothing' if none
        is available. -}
    -> Maybe (Gdk.Callbacks.SeatGrabPrepareFunc)
    {- ^ /@prepareFunc@/: function to
               prepare the window to be grabbed, it can be 'Nothing' if /@window@/ is
               visible before this call. -}
    -> m Gdk.Enums.GrabStatus
    {- ^ __Returns:__ 'GI.Gdk.Enums.GrabStatusSuccess' if the grab was successful. -}
seatGrab seat window capabilities ownerEvents cursor event prepareFunc = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    window' <- unsafeManagedPtrCastPtr window
    let capabilities' = gflagsToWord capabilities
    let ownerEvents' = (fromIntegral . fromEnum) ownerEvents
    maybeCursor <- case cursor of
        Nothing -> return nullPtr
        Just jCursor -> do
            jCursor' <- unsafeManagedPtrCastPtr jCursor
            return jCursor'
    maybeEvent <- case event of
        Nothing -> return nullPtr
        Just jEvent -> do
            jEvent' <- unsafeManagedPtrGetPtr jEvent
            return jEvent'
    maybePrepareFunc <- case prepareFunc of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jPrepareFunc -> do
            jPrepareFunc' <- Gdk.Callbacks.mk_SeatGrabPrepareFunc (Gdk.Callbacks.wrap_SeatGrabPrepareFunc Nothing (Gdk.Callbacks.drop_closures_SeatGrabPrepareFunc jPrepareFunc))
            return jPrepareFunc'
    let prepareFuncData = nullPtr
    result <- gdk_seat_grab seat' window' capabilities' ownerEvents' maybeCursor maybeEvent maybePrepareFunc prepareFuncData
    let result' = (toEnum . fromIntegral) result
    safeFreeFunPtr $ castFunPtrToPtr maybePrepareFunc
    touchManagedPtr seat
    touchManagedPtr window
    whenJust cursor touchManagedPtr
    whenJust event touchManagedPtr
    return result'

#if ENABLE_OVERLOADING
data SeatGrabMethodInfo
instance (signature ~ (b -> [Gdk.Flags.SeatCapabilities] -> Bool -> Maybe (c) -> Maybe (Gdk.Event.Event) -> Maybe (Gdk.Callbacks.SeatGrabPrepareFunc) -> m Gdk.Enums.GrabStatus), MonadIO m, IsSeat a, Gdk.Window.IsWindow b, Gdk.Cursor.IsCursor c) => O.MethodInfo SeatGrabMethodInfo a signature where
    overloadedMethod _ = seatGrab

#endif

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

foreign import ccall "gdk_seat_ungrab" gdk_seat_ungrab ::
    Ptr Seat ->                             -- seat : TInterface (Name {namespace = "Gdk", name = "Seat"})
    IO ()

{- |
Releases a grab added through 'GI.Gdk.Objects.Seat.seatGrab'.

/Since: 3.20/
-}
seatUngrab ::
    (B.CallStack.HasCallStack, MonadIO m, IsSeat a) =>
    a
    {- ^ /@seat@/: a 'GI.Gdk.Objects.Seat.Seat' -}
    -> m ()
seatUngrab seat = liftIO $ do
    seat' <- unsafeManagedPtrCastPtr seat
    gdk_seat_ungrab seat'
    touchManagedPtr seat
    return ()

#if ENABLE_OVERLOADING
data SeatUngrabMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSeat a) => O.MethodInfo SeatUngrabMethodInfo a signature where
    overloadedMethod _ = seatUngrab

#endif