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

/No description available in the introspection data./
-}

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

module GI.GdkX11.Objects.X11DeviceXI2
    (

-- * Exported types
    X11DeviceXI2(..)                        ,
    IsX11DeviceXI2                          ,
    toX11DeviceXI2                          ,
    noX11DeviceXI2                          ,


 -- * Properties
-- ** deviceId #attr:deviceId#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    X11DeviceXI2DeviceIdPropertyInfo        ,
#endif
    constructX11DeviceXI2DeviceId           ,
    getX11DeviceXI2DeviceId                 ,
#if ENABLE_OVERLOADING
    x11DeviceXI2DeviceId                    ,
#endif




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Device as Gdk.Device

-- | Memory-managed wrapper type.
newtype X11DeviceXI2 = X11DeviceXI2 (ManagedPtr X11DeviceXI2)
foreign import ccall "gdk_x11_device_xi2_get_type"
    c_gdk_x11_device_xi2_get_type :: IO GType

instance GObject X11DeviceXI2 where
    gobjectType = c_gdk_x11_device_xi2_get_type


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

instance O.HasParentTypes X11DeviceXI2
type instance O.ParentTypes X11DeviceXI2 = '[Gdk.Device.Device, GObject.Object.Object]

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

-- | A convenience alias for `Nothing` :: `Maybe` `X11DeviceXI2`.
noX11DeviceXI2 :: Maybe X11DeviceXI2
noX11DeviceXI2 = Nothing

#if ENABLE_OVERLOADING
type family ResolveX11DeviceXI2Method (t :: Symbol) (o :: *) :: * where
    ResolveX11DeviceXI2Method "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveX11DeviceXI2Method "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveX11DeviceXI2Method "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveX11DeviceXI2Method "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveX11DeviceXI2Method "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveX11DeviceXI2Method "grab" o = Gdk.Device.DeviceGrabMethodInfo
    ResolveX11DeviceXI2Method "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveX11DeviceXI2Method "listAxes" o = Gdk.Device.DeviceListAxesMethodInfo
    ResolveX11DeviceXI2Method "listSlaveDevices" o = Gdk.Device.DeviceListSlaveDevicesMethodInfo
    ResolveX11DeviceXI2Method "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveX11DeviceXI2Method "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveX11DeviceXI2Method "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveX11DeviceXI2Method "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveX11DeviceXI2Method "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveX11DeviceXI2Method "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveX11DeviceXI2Method "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveX11DeviceXI2Method "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveX11DeviceXI2Method "ungrab" o = Gdk.Device.DeviceUngrabMethodInfo
    ResolveX11DeviceXI2Method "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveX11DeviceXI2Method "warp" o = Gdk.Device.DeviceWarpMethodInfo
    ResolveX11DeviceXI2Method "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveX11DeviceXI2Method "getAssociatedDevice" o = Gdk.Device.DeviceGetAssociatedDeviceMethodInfo
    ResolveX11DeviceXI2Method "getAxes" o = Gdk.Device.DeviceGetAxesMethodInfo
    ResolveX11DeviceXI2Method "getAxisUse" o = Gdk.Device.DeviceGetAxisUseMethodInfo
    ResolveX11DeviceXI2Method "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveX11DeviceXI2Method "getDeviceType" o = Gdk.Device.DeviceGetDeviceTypeMethodInfo
    ResolveX11DeviceXI2Method "getDisplay" o = Gdk.Device.DeviceGetDisplayMethodInfo
    ResolveX11DeviceXI2Method "getHasCursor" o = Gdk.Device.DeviceGetHasCursorMethodInfo
    ResolveX11DeviceXI2Method "getKey" o = Gdk.Device.DeviceGetKeyMethodInfo
    ResolveX11DeviceXI2Method "getLastEventWindow" o = Gdk.Device.DeviceGetLastEventWindowMethodInfo
    ResolveX11DeviceXI2Method "getMode" o = Gdk.Device.DeviceGetModeMethodInfo
    ResolveX11DeviceXI2Method "getNAxes" o = Gdk.Device.DeviceGetNAxesMethodInfo
    ResolveX11DeviceXI2Method "getNKeys" o = Gdk.Device.DeviceGetNKeysMethodInfo
    ResolveX11DeviceXI2Method "getName" o = Gdk.Device.DeviceGetNameMethodInfo
    ResolveX11DeviceXI2Method "getPosition" o = Gdk.Device.DeviceGetPositionMethodInfo
    ResolveX11DeviceXI2Method "getPositionDouble" o = Gdk.Device.DeviceGetPositionDoubleMethodInfo
    ResolveX11DeviceXI2Method "getProductId" o = Gdk.Device.DeviceGetProductIdMethodInfo
    ResolveX11DeviceXI2Method "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveX11DeviceXI2Method "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveX11DeviceXI2Method "getSeat" o = Gdk.Device.DeviceGetSeatMethodInfo
    ResolveX11DeviceXI2Method "getSource" o = Gdk.Device.DeviceGetSourceMethodInfo
    ResolveX11DeviceXI2Method "getVendorId" o = Gdk.Device.DeviceGetVendorIdMethodInfo
    ResolveX11DeviceXI2Method "getWindowAtPosition" o = Gdk.Device.DeviceGetWindowAtPositionMethodInfo
    ResolveX11DeviceXI2Method "getWindowAtPositionDouble" o = Gdk.Device.DeviceGetWindowAtPositionDoubleMethodInfo
    ResolveX11DeviceXI2Method "setAxisUse" o = Gdk.Device.DeviceSetAxisUseMethodInfo
    ResolveX11DeviceXI2Method "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveX11DeviceXI2Method "setKey" o = Gdk.Device.DeviceSetKeyMethodInfo
    ResolveX11DeviceXI2Method "setMode" o = Gdk.Device.DeviceSetModeMethodInfo
    ResolveX11DeviceXI2Method "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveX11DeviceXI2Method l o = O.MethodResolutionFailed l o

instance (info ~ ResolveX11DeviceXI2Method t X11DeviceXI2, O.MethodInfo info X11DeviceXI2 p) => OL.IsLabel t (X11DeviceXI2 -> 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

-- VVV Prop "device-id"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

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

@
'Data.GI.Base.Attributes.get' x11DeviceXI2 #deviceId
@
-}
getX11DeviceXI2DeviceId :: (MonadIO m, IsX11DeviceXI2 o) => o -> m Int32
getX11DeviceXI2DeviceId obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "device-id"

{- |
Construct a `GValueConstruct` with valid value for the “@device-id@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructX11DeviceXI2DeviceId :: (IsX11DeviceXI2 o) => Int32 -> IO (GValueConstruct o)
constructX11DeviceXI2DeviceId val = B.Properties.constructObjectPropertyInt32 "device-id" val

#if ENABLE_OVERLOADING
data X11DeviceXI2DeviceIdPropertyInfo
instance AttrInfo X11DeviceXI2DeviceIdPropertyInfo where
    type AttrAllowedOps X11DeviceXI2DeviceIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint X11DeviceXI2DeviceIdPropertyInfo = (~) Int32
    type AttrBaseTypeConstraint X11DeviceXI2DeviceIdPropertyInfo = IsX11DeviceXI2
    type AttrGetType X11DeviceXI2DeviceIdPropertyInfo = Int32
    type AttrLabel X11DeviceXI2DeviceIdPropertyInfo = "device-id"
    type AttrOrigin X11DeviceXI2DeviceIdPropertyInfo = X11DeviceXI2
    attrGet _ = getX11DeviceXI2DeviceId
    attrSet _ = undefined
    attrConstruct _ = constructX11DeviceXI2DeviceId
    attrClear _ = undefined
#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList X11DeviceXI2
type instance O.AttributeList X11DeviceXI2 = X11DeviceXI2AttributeList
type X11DeviceXI2AttributeList = ('[ '("associatedDevice", Gdk.Device.DeviceAssociatedDevicePropertyInfo), '("axes", Gdk.Device.DeviceAxesPropertyInfo), '("deviceId", X11DeviceXI2DeviceIdPropertyInfo), '("deviceManager", Gdk.Device.DeviceDeviceManagerPropertyInfo), '("display", Gdk.Device.DeviceDisplayPropertyInfo), '("hasCursor", Gdk.Device.DeviceHasCursorPropertyInfo), '("inputMode", Gdk.Device.DeviceInputModePropertyInfo), '("inputSource", Gdk.Device.DeviceInputSourcePropertyInfo), '("nAxes", Gdk.Device.DeviceNAxesPropertyInfo), '("name", Gdk.Device.DeviceNamePropertyInfo), '("numTouches", Gdk.Device.DeviceNumTouchesPropertyInfo), '("productId", Gdk.Device.DeviceProductIdPropertyInfo), '("seat", Gdk.Device.DeviceSeatPropertyInfo), '("tool", Gdk.Device.DeviceToolPropertyInfo), '("type", Gdk.Device.DeviceTypePropertyInfo), '("vendorId", Gdk.Device.DeviceVendorIdPropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
x11DeviceXI2DeviceId :: AttrLabelProxy "deviceId"
x11DeviceXI2DeviceId = AttrLabelProxy

#endif

#if ENABLE_OVERLOADING
type instance O.SignalList X11DeviceXI2 = X11DeviceXI2SignalList
type X11DeviceXI2SignalList = ('[ '("changed", Gdk.Device.DeviceChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("toolChanged", Gdk.Device.DeviceToolChangedSignalInfo)] :: [(Symbol, *)])

#endif