{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if !defined(__HADDOCK_VERSION__)
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.Device
(
Device(..) ,
IsDevice ,
toDevice ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceGetAssociatedDeviceMethodInfo ,
#endif
deviceGetAssociatedDevice ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAxesMethodInfo ,
#endif
deviceGetAxes ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAxisUseMethodInfo ,
#endif
deviceGetAxisUse ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDeviceTypeMethodInfo ,
#endif
deviceGetDeviceType ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDisplayMethodInfo ,
#endif
deviceGetDisplay ,
#if defined(ENABLE_OVERLOADING)
DeviceGetHasCursorMethodInfo ,
#endif
deviceGetHasCursor ,
#if defined(ENABLE_OVERLOADING)
DeviceGetKeyMethodInfo ,
#endif
deviceGetKey ,
#if defined(ENABLE_OVERLOADING)
DeviceGetLastEventWindowMethodInfo ,
#endif
deviceGetLastEventWindow ,
#if defined(ENABLE_OVERLOADING)
DeviceGetModeMethodInfo ,
#endif
deviceGetMode ,
#if defined(ENABLE_OVERLOADING)
DeviceGetNAxesMethodInfo ,
#endif
deviceGetNAxes ,
#if defined(ENABLE_OVERLOADING)
DeviceGetNKeysMethodInfo ,
#endif
deviceGetNKeys ,
#if defined(ENABLE_OVERLOADING)
DeviceGetNameMethodInfo ,
#endif
deviceGetName ,
#if defined(ENABLE_OVERLOADING)
DeviceGetPositionMethodInfo ,
#endif
deviceGetPosition ,
#if defined(ENABLE_OVERLOADING)
DeviceGetPositionDoubleMethodInfo ,
#endif
deviceGetPositionDouble ,
#if defined(ENABLE_OVERLOADING)
DeviceGetProductIdMethodInfo ,
#endif
deviceGetProductId ,
#if defined(ENABLE_OVERLOADING)
DeviceGetSeatMethodInfo ,
#endif
deviceGetSeat ,
#if defined(ENABLE_OVERLOADING)
DeviceGetSourceMethodInfo ,
#endif
deviceGetSource ,
#if defined(ENABLE_OVERLOADING)
DeviceGetVendorIdMethodInfo ,
#endif
deviceGetVendorId ,
#if defined(ENABLE_OVERLOADING)
DeviceGetWindowAtPositionMethodInfo ,
#endif
deviceGetWindowAtPosition ,
#if defined(ENABLE_OVERLOADING)
DeviceGetWindowAtPositionDoubleMethodInfo,
#endif
deviceGetWindowAtPositionDouble ,
#if defined(ENABLE_OVERLOADING)
DeviceGrabMethodInfo ,
#endif
deviceGrab ,
deviceGrabInfoLibgtkOnly ,
#if defined(ENABLE_OVERLOADING)
DeviceListAxesMethodInfo ,
#endif
deviceListAxes ,
#if defined(ENABLE_OVERLOADING)
DeviceListSlaveDevicesMethodInfo ,
#endif
deviceListSlaveDevices ,
#if defined(ENABLE_OVERLOADING)
DeviceSetAxisUseMethodInfo ,
#endif
deviceSetAxisUse ,
#if defined(ENABLE_OVERLOADING)
DeviceSetKeyMethodInfo ,
#endif
deviceSetKey ,
#if defined(ENABLE_OVERLOADING)
DeviceSetModeMethodInfo ,
#endif
deviceSetMode ,
#if defined(ENABLE_OVERLOADING)
DeviceUngrabMethodInfo ,
#endif
deviceUngrab ,
#if defined(ENABLE_OVERLOADING)
DeviceWarpMethodInfo ,
#endif
deviceWarp ,
#if defined(ENABLE_OVERLOADING)
DeviceAssociatedDevicePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceAssociatedDevice ,
#endif
getDeviceAssociatedDevice ,
#if defined(ENABLE_OVERLOADING)
DeviceAxesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceAxes ,
#endif
getDeviceAxes ,
#if defined(ENABLE_OVERLOADING)
DeviceDeviceManagerPropertyInfo ,
#endif
constructDeviceDeviceManager ,
#if defined(ENABLE_OVERLOADING)
deviceDeviceManager ,
#endif
getDeviceDeviceManager ,
#if defined(ENABLE_OVERLOADING)
DeviceDisplayPropertyInfo ,
#endif
constructDeviceDisplay ,
#if defined(ENABLE_OVERLOADING)
deviceDisplay ,
#endif
getDeviceDisplay ,
#if defined(ENABLE_OVERLOADING)
DeviceHasCursorPropertyInfo ,
#endif
constructDeviceHasCursor ,
#if defined(ENABLE_OVERLOADING)
deviceHasCursor ,
#endif
getDeviceHasCursor ,
#if defined(ENABLE_OVERLOADING)
DeviceInputModePropertyInfo ,
#endif
constructDeviceInputMode ,
#if defined(ENABLE_OVERLOADING)
deviceInputMode ,
#endif
getDeviceInputMode ,
setDeviceInputMode ,
#if defined(ENABLE_OVERLOADING)
DeviceInputSourcePropertyInfo ,
#endif
constructDeviceInputSource ,
#if defined(ENABLE_OVERLOADING)
deviceInputSource ,
#endif
getDeviceInputSource ,
#if defined(ENABLE_OVERLOADING)
DeviceNAxesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceNAxes ,
#endif
getDeviceNAxes ,
#if defined(ENABLE_OVERLOADING)
DeviceNamePropertyInfo ,
#endif
constructDeviceName ,
#if defined(ENABLE_OVERLOADING)
deviceName ,
#endif
getDeviceName ,
#if defined(ENABLE_OVERLOADING)
DeviceNumTouchesPropertyInfo ,
#endif
constructDeviceNumTouches ,
#if defined(ENABLE_OVERLOADING)
deviceNumTouches ,
#endif
getDeviceNumTouches ,
#if defined(ENABLE_OVERLOADING)
DeviceProductIdPropertyInfo ,
#endif
constructDeviceProductId ,
#if defined(ENABLE_OVERLOADING)
deviceProductId ,
#endif
getDeviceProductId ,
#if defined(ENABLE_OVERLOADING)
DeviceSeatPropertyInfo ,
#endif
clearDeviceSeat ,
constructDeviceSeat ,
#if defined(ENABLE_OVERLOADING)
deviceSeat ,
#endif
getDeviceSeat ,
setDeviceSeat ,
#if defined(ENABLE_OVERLOADING)
DeviceToolPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTool ,
#endif
getDeviceTool ,
#if defined(ENABLE_OVERLOADING)
DeviceTypePropertyInfo ,
#endif
constructDeviceType ,
#if defined(ENABLE_OVERLOADING)
deviceType ,
#endif
getDeviceType ,
#if defined(ENABLE_OVERLOADING)
DeviceVendorIdPropertyInfo ,
#endif
constructDeviceVendorId ,
#if defined(ENABLE_OVERLOADING)
deviceVendorId ,
#endif
getDeviceVendorId ,
DeviceChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DeviceChangedSignalInfo ,
#endif
afterDeviceChanged ,
onDeviceChanged ,
DeviceToolChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DeviceToolChangedSignalInfo ,
#endif
afterDeviceToolChanged ,
onDeviceToolChanged ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Enums as Cairo.Enums
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.Cairo.Structs.Pattern as Cairo.Pattern
import qualified GI.Cairo.Structs.Region as Cairo.Region
import qualified GI.Cairo.Structs.Surface as Cairo.Surface
import qualified GI.GLib.Callbacks as GLib.Callbacks
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.AppLaunchContext as Gdk.AppLaunchContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import {-# SOURCE #-} qualified GI.Gdk.Objects.DeviceManager as Gdk.DeviceManager
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.DragContext as Gdk.DragContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.DrawingContext as Gdk.DrawingContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import {-# SOURCE #-} qualified GI.Gdk.Objects.GLContext as Gdk.GLContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Screen as Gdk.Screen
import {-# SOURCE #-} qualified GI.Gdk.Objects.Seat as Gdk.Seat
import {-# SOURCE #-} qualified GI.Gdk.Objects.Visual as Gdk.Visual
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Structs.Atom as Gdk.Atom
import {-# SOURCE #-} qualified GI.Gdk.Structs.Color as Gdk.Color
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventAny as Gdk.EventAny
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventButton as Gdk.EventButton
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventConfigure as Gdk.EventConfigure
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventCrossing as Gdk.EventCrossing
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventDND as Gdk.EventDND
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventExpose as Gdk.EventExpose
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventFocus as Gdk.EventFocus
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventGrabBroken as Gdk.EventGrabBroken
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventKey as Gdk.EventKey
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventMotion as Gdk.EventMotion
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventOwnerChange as Gdk.EventOwnerChange
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventPadAxis as Gdk.EventPadAxis
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventPadButton as Gdk.EventPadButton
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventPadGroupMode as Gdk.EventPadGroupMode
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventProperty as Gdk.EventProperty
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventProximity as Gdk.EventProximity
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventScroll as Gdk.EventScroll
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventSelection as Gdk.EventSelection
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventSequence as Gdk.EventSequence
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventSetting as Gdk.EventSetting
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventTouch as Gdk.EventTouch
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventTouchpadPinch as Gdk.EventTouchpadPinch
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventTouchpadSwipe as Gdk.EventTouchpadSwipe
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventVisibility as Gdk.EventVisibility
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventWindowState as Gdk.EventWindowState
import {-# SOURCE #-} qualified GI.Gdk.Structs.FrameTimings as Gdk.FrameTimings
import {-# SOURCE #-} qualified GI.Gdk.Structs.Geometry as Gdk.Geometry
import {-# SOURCE #-} qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import {-# SOURCE #-} qualified GI.Gdk.Structs.WindowAttr as Gdk.WindowAttr
import {-# SOURCE #-} qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Objects.AppLaunchContext as Gio.AppLaunchContext
#else
import qualified GI.GObject.Objects.Object as GObject.Object
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.DeviceManager as Gdk.DeviceManager
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.Screen as Gdk.Screen
import {-# SOURCE #-} qualified GI.Gdk.Objects.Seat as Gdk.Seat
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Structs.Atom as Gdk.Atom
#endif
newtype Device = Device (SP.ManagedPtr Device)
deriving (Device -> Device -> Bool
(Device -> Device -> Bool)
-> (Device -> Device -> Bool) -> Eq Device
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Device -> Device -> Bool
== :: Device -> Device -> Bool
$c/= :: Device -> Device -> Bool
/= :: Device -> Device -> Bool
Eq)
instance SP.ManagedPtrNewtype Device where
toManagedPtr :: Device -> ManagedPtr Device
toManagedPtr (Device ManagedPtr Device
p) = ManagedPtr Device
p
foreign import ccall "gdk_device_get_type"
c_gdk_device_get_type :: IO B.Types.GType
instance B.Types.TypedObject Device where
glibType :: IO GType
glibType = IO GType
c_gdk_device_get_type
instance B.Types.GObject Device
class (SP.GObject o, O.IsDescendantOf Device o) => IsDevice o
instance (SP.GObject o, O.IsDescendantOf Device o) => IsDevice o
instance O.HasParentTypes Device
type instance O.ParentTypes Device = '[GObject.Object.Object]
toDevice :: (MIO.MonadIO m, IsDevice o) => o -> m Device
toDevice :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Device
toDevice = IO Device -> m Device
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Device -> m Device) -> (o -> IO Device) -> o -> m Device
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Device -> Device) -> o -> IO Device
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Device -> Device
Device
instance B.GValue.IsGValue (Maybe Device) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gdk_device_get_type
gvalueSet_ :: Ptr GValue -> Maybe Device -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Device
P.Nothing = Ptr GValue -> Ptr Device -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Device
forall a. Ptr a
FP.nullPtr :: FP.Ptr Device)
gvalueSet_ Ptr GValue
gv (P.Just Device
obj) = Device -> (Ptr Device -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Device
obj (Ptr GValue -> Ptr Device -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Device)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Device)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Device)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Device ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceMethod "grab" o = DeviceGrabMethodInfo
ResolveDeviceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceMethod "listAxes" o = DeviceListAxesMethodInfo
ResolveDeviceMethod "listSlaveDevices" o = DeviceListSlaveDevicesMethodInfo
ResolveDeviceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceMethod "ungrab" o = DeviceUngrabMethodInfo
ResolveDeviceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceMethod "warp" o = DeviceWarpMethodInfo
ResolveDeviceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceMethod "getAssociatedDevice" o = DeviceGetAssociatedDeviceMethodInfo
ResolveDeviceMethod "getAxes" o = DeviceGetAxesMethodInfo
ResolveDeviceMethod "getAxisUse" o = DeviceGetAxisUseMethodInfo
ResolveDeviceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceMethod "getDeviceType" o = DeviceGetDeviceTypeMethodInfo
ResolveDeviceMethod "getDisplay" o = DeviceGetDisplayMethodInfo
ResolveDeviceMethod "getHasCursor" o = DeviceGetHasCursorMethodInfo
ResolveDeviceMethod "getKey" o = DeviceGetKeyMethodInfo
ResolveDeviceMethod "getLastEventWindow" o = DeviceGetLastEventWindowMethodInfo
ResolveDeviceMethod "getMode" o = DeviceGetModeMethodInfo
ResolveDeviceMethod "getNAxes" o = DeviceGetNAxesMethodInfo
ResolveDeviceMethod "getNKeys" o = DeviceGetNKeysMethodInfo
ResolveDeviceMethod "getName" o = DeviceGetNameMethodInfo
ResolveDeviceMethod "getPosition" o = DeviceGetPositionMethodInfo
ResolveDeviceMethod "getPositionDouble" o = DeviceGetPositionDoubleMethodInfo
ResolveDeviceMethod "getProductId" o = DeviceGetProductIdMethodInfo
ResolveDeviceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceMethod "getSeat" o = DeviceGetSeatMethodInfo
ResolveDeviceMethod "getSource" o = DeviceGetSourceMethodInfo
ResolveDeviceMethod "getVendorId" o = DeviceGetVendorIdMethodInfo
ResolveDeviceMethod "getWindowAtPosition" o = DeviceGetWindowAtPositionMethodInfo
ResolveDeviceMethod "getWindowAtPositionDouble" o = DeviceGetWindowAtPositionDoubleMethodInfo
ResolveDeviceMethod "setAxisUse" o = DeviceSetAxisUseMethodInfo
ResolveDeviceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceMethod "setKey" o = DeviceSetKeyMethodInfo
ResolveDeviceMethod "setMode" o = DeviceSetModeMethodInfo
ResolveDeviceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethod info Device p) => OL.IsLabel t (Device -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethod info Device p, R.HasField t Device p) => R.HasField t Device p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethodInfo info Device) => OL.IsLabel t (O.MethodProxy info Device) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DeviceChangedCallback =
IO ()
type C_DeviceChangedCallback =
Ptr Device ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DeviceChangedCallback :: C_DeviceChangedCallback -> IO (FunPtr C_DeviceChangedCallback)
wrap_DeviceChangedCallback ::
GObject a => (a -> DeviceChangedCallback) ->
C_DeviceChangedCallback
wrap_DeviceChangedCallback :: forall a. GObject a => (a -> IO ()) -> C_DeviceChangedCallback
wrap_DeviceChangedCallback a -> IO ()
gi'cb Ptr Device
gi'selfPtr Ptr ()
_ = do
Ptr Device -> (Device -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Device
gi'selfPtr ((Device -> IO ()) -> IO ()) -> (Device -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Device
gi'self -> a -> IO ()
gi'cb (Device -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Device
gi'self)
onDeviceChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceChangedCallback) -> m SignalHandlerId
onDeviceChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onDeviceChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_DeviceChangedCallback
wrapped' = (a -> IO ()) -> C_DeviceChangedCallback
forall a. GObject a => (a -> IO ()) -> C_DeviceChangedCallback
wrap_DeviceChangedCallback a -> IO ()
wrapped
wrapped'' <- C_DeviceChangedCallback -> IO (FunPtr C_DeviceChangedCallback)
mk_DeviceChangedCallback C_DeviceChangedCallback
wrapped'
connectSignalFunPtr obj "changed" wrapped'' SignalConnectBefore Nothing
afterDeviceChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceChangedCallback) -> m SignalHandlerId
afterDeviceChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterDeviceChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_DeviceChangedCallback
wrapped' = (a -> IO ()) -> C_DeviceChangedCallback
forall a. GObject a => (a -> IO ()) -> C_DeviceChangedCallback
wrap_DeviceChangedCallback a -> IO ()
wrapped
wrapped'' <- C_DeviceChangedCallback -> IO (FunPtr C_DeviceChangedCallback)
mk_DeviceChangedCallback C_DeviceChangedCallback
wrapped'
connectSignalFunPtr obj "changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DeviceChangedSignalInfo
instance SignalInfo DeviceChangedSignalInfo where
type HaskellCallbackType DeviceChangedSignalInfo = DeviceChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DeviceChangedCallback cb
cb'' <- mk_DeviceChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device::changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:signal:changed"})
#endif
type DeviceToolChangedCallback =
Gdk.DeviceTool.DeviceTool
-> IO ()
type C_DeviceToolChangedCallback =
Ptr Device ->
Ptr Gdk.DeviceTool.DeviceTool ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DeviceToolChangedCallback :: C_DeviceToolChangedCallback -> IO (FunPtr C_DeviceToolChangedCallback)
wrap_DeviceToolChangedCallback ::
GObject a => (a -> DeviceToolChangedCallback) ->
C_DeviceToolChangedCallback
wrap_DeviceToolChangedCallback :: forall a.
GObject a =>
(a -> DeviceToolChangedCallback) -> C_DeviceToolChangedCallback
wrap_DeviceToolChangedCallback a -> DeviceToolChangedCallback
gi'cb Ptr Device
gi'selfPtr Ptr DeviceTool
tool Ptr ()
_ = do
tool' <- ((ManagedPtr DeviceTool -> DeviceTool)
-> Ptr DeviceTool -> IO DeviceTool
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DeviceTool -> DeviceTool
Gdk.DeviceTool.DeviceTool) Ptr DeviceTool
tool
B.ManagedPtr.withNewObject gi'selfPtr $ \Device
gi'self -> a -> DeviceToolChangedCallback
gi'cb (Device -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Device
gi'self) DeviceTool
tool'
onDeviceToolChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceToolChangedCallback) -> m SignalHandlerId
onDeviceToolChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a -> ((?self::a) => DeviceToolChangedCallback) -> m SignalHandlerId
onDeviceToolChanged a
obj (?self::a) => DeviceToolChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> DeviceToolChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DeviceToolChangedCallback
DeviceToolChangedCallback
cb
let wrapped' :: C_DeviceToolChangedCallback
wrapped' = (a -> DeviceToolChangedCallback) -> C_DeviceToolChangedCallback
forall a.
GObject a =>
(a -> DeviceToolChangedCallback) -> C_DeviceToolChangedCallback
wrap_DeviceToolChangedCallback a -> DeviceToolChangedCallback
wrapped
wrapped'' <- C_DeviceToolChangedCallback
-> IO (FunPtr C_DeviceToolChangedCallback)
mk_DeviceToolChangedCallback C_DeviceToolChangedCallback
wrapped'
connectSignalFunPtr obj "tool-changed" wrapped'' SignalConnectBefore Nothing
afterDeviceToolChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceToolChangedCallback) -> m SignalHandlerId
afterDeviceToolChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a -> ((?self::a) => DeviceToolChangedCallback) -> m SignalHandlerId
afterDeviceToolChanged a
obj (?self::a) => DeviceToolChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 wrapped :: a -> DeviceToolChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DeviceToolChangedCallback
DeviceToolChangedCallback
cb
let wrapped' :: C_DeviceToolChangedCallback
wrapped' = (a -> DeviceToolChangedCallback) -> C_DeviceToolChangedCallback
forall a.
GObject a =>
(a -> DeviceToolChangedCallback) -> C_DeviceToolChangedCallback
wrap_DeviceToolChangedCallback a -> DeviceToolChangedCallback
wrapped
wrapped'' <- C_DeviceToolChangedCallback
-> IO (FunPtr C_DeviceToolChangedCallback)
mk_DeviceToolChangedCallback C_DeviceToolChangedCallback
wrapped'
connectSignalFunPtr obj "tool-changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DeviceToolChangedSignalInfo
instance SignalInfo DeviceToolChangedSignalInfo where
type HaskellCallbackType DeviceToolChangedSignalInfo = DeviceToolChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DeviceToolChangedCallback cb
cb'' <- mk_DeviceToolChangedCallback cb'
connectSignalFunPtr obj "tool-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device::tool-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:signal:toolChanged"})
#endif
getDeviceAssociatedDevice :: (MonadIO m, IsDevice o) => o -> m (Maybe Device)
getDeviceAssociatedDevice :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Device)
getDeviceAssociatedDevice o
obj = IO (Maybe Device) -> m (Maybe Device)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Device) -> m (Maybe Device))
-> IO (Maybe Device) -> m (Maybe Device)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Device -> Device) -> IO (Maybe Device)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"associated-device" ManagedPtr Device -> Device
Device
#if defined(ENABLE_OVERLOADING)
data DeviceAssociatedDevicePropertyInfo
instance AttrInfo DeviceAssociatedDevicePropertyInfo where
type AttrAllowedOps DeviceAssociatedDevicePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceAssociatedDevicePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceAssociatedDevicePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceAssociatedDevicePropertyInfo = (~) ()
type AttrTransferType DeviceAssociatedDevicePropertyInfo = ()
type AttrGetType DeviceAssociatedDevicePropertyInfo = (Maybe Device)
type AttrLabel DeviceAssociatedDevicePropertyInfo = "associated-device"
type AttrOrigin DeviceAssociatedDevicePropertyInfo = Device
attrGet = getDeviceAssociatedDevice
attrSet = undefined
attrPut = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.associatedDevice"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:associatedDevice"
})
#endif
getDeviceAxes :: (MonadIO m, IsDevice o) => o -> m [Gdk.Flags.AxisFlags]
getDeviceAxes :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m [AxisFlags]
getDeviceAxes o
obj = IO [AxisFlags] -> m [AxisFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [AxisFlags] -> m [AxisFlags])
-> IO [AxisFlags] -> m [AxisFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [AxisFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"axes"
#if defined(ENABLE_OVERLOADING)
data DeviceAxesPropertyInfo
instance AttrInfo DeviceAxesPropertyInfo where
type AttrAllowedOps DeviceAxesPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceAxesPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceAxesPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceAxesPropertyInfo = (~) ()
type AttrTransferType DeviceAxesPropertyInfo = ()
type AttrGetType DeviceAxesPropertyInfo = [Gdk.Flags.AxisFlags]
type AttrLabel DeviceAxesPropertyInfo = "axes"
type AttrOrigin DeviceAxesPropertyInfo = Device
attrGet = getDeviceAxes
attrSet = undefined
attrPut = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.axes"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:axes"
})
#endif
getDeviceDeviceManager :: (MonadIO m, IsDevice o) => o -> m (Maybe Gdk.DeviceManager.DeviceManager)
getDeviceDeviceManager :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe DeviceManager)
getDeviceDeviceManager o
obj = IO (Maybe DeviceManager) -> m (Maybe DeviceManager)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe DeviceManager) -> m (Maybe DeviceManager))
-> IO (Maybe DeviceManager) -> m (Maybe DeviceManager)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DeviceManager -> DeviceManager)
-> IO (Maybe DeviceManager)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"device-manager" ManagedPtr DeviceManager -> DeviceManager
Gdk.DeviceManager.DeviceManager
constructDeviceDeviceManager :: (IsDevice o, MIO.MonadIO m, Gdk.DeviceManager.IsDeviceManager a) => a -> m (GValueConstruct o)
constructDeviceDeviceManager :: forall o (m :: * -> *) a.
(IsDevice o, MonadIO m, IsDeviceManager a) =>
a -> m (GValueConstruct o)
constructDeviceDeviceManager a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"device-manager" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data DeviceDeviceManagerPropertyInfo
instance AttrInfo DeviceDeviceManagerPropertyInfo where
type AttrAllowedOps DeviceDeviceManagerPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceDeviceManagerPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDeviceManagerPropertyInfo = Gdk.DeviceManager.IsDeviceManager
type AttrTransferTypeConstraint DeviceDeviceManagerPropertyInfo = Gdk.DeviceManager.IsDeviceManager
type AttrTransferType DeviceDeviceManagerPropertyInfo = Gdk.DeviceManager.DeviceManager
type AttrGetType DeviceDeviceManagerPropertyInfo = (Maybe Gdk.DeviceManager.DeviceManager)
type AttrLabel DeviceDeviceManagerPropertyInfo = "device-manager"
type AttrOrigin DeviceDeviceManagerPropertyInfo = Device
attrGet = getDeviceDeviceManager
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
unsafeCastTo Gdk.DeviceManager.DeviceManager v
attrConstruct = constructDeviceDeviceManager
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceManager"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:deviceManager"
})
#endif
getDeviceDisplay :: (MonadIO m, IsDevice o) => o -> m Gdk.Display.Display
getDeviceDisplay :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Display
getDeviceDisplay o
obj = IO Display -> m Display
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Display -> m Display) -> IO Display -> m Display
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Display) -> IO Display
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDisplay" (IO (Maybe Display) -> IO Display)
-> IO (Maybe Display) -> IO Display
forall a b. (a -> b) -> a -> b
$ o
-> String -> (ManagedPtr Display -> Display) -> IO (Maybe Display)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"display" ManagedPtr Display -> Display
Gdk.Display.Display
constructDeviceDisplay :: (IsDevice o, MIO.MonadIO m, Gdk.Display.IsDisplay a) => a -> m (GValueConstruct o)
constructDeviceDisplay :: forall o (m :: * -> *) a.
(IsDevice o, MonadIO m, IsDisplay a) =>
a -> m (GValueConstruct o)
constructDeviceDisplay a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"display" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data DeviceDisplayPropertyInfo
instance AttrInfo DeviceDisplayPropertyInfo where
type AttrAllowedOps DeviceDisplayPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceDisplayPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDisplayPropertyInfo = Gdk.Display.IsDisplay
type AttrTransferTypeConstraint DeviceDisplayPropertyInfo = Gdk.Display.IsDisplay
type AttrTransferType DeviceDisplayPropertyInfo = Gdk.Display.Display
type AttrGetType DeviceDisplayPropertyInfo = Gdk.Display.Display
type AttrLabel DeviceDisplayPropertyInfo = "display"
type AttrOrigin DeviceDisplayPropertyInfo = Device
attrGet = getDeviceDisplay
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
unsafeCastTo Gdk.Display.Display v
attrConstruct = constructDeviceDisplay
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.display"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:display"
})
#endif
getDeviceHasCursor :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceHasCursor :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceHasCursor o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"has-cursor"
constructDeviceHasCursor :: (IsDevice o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructDeviceHasCursor :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructDeviceHasCursor Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"has-cursor" Bool
val
#if defined(ENABLE_OVERLOADING)
data DeviceHasCursorPropertyInfo
instance AttrInfo DeviceHasCursorPropertyInfo where
type AttrAllowedOps DeviceHasCursorPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DeviceHasCursorPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceHasCursorPropertyInfo = (~) Bool
type AttrTransferTypeConstraint DeviceHasCursorPropertyInfo = (~) Bool
type AttrTransferType DeviceHasCursorPropertyInfo = Bool
type AttrGetType DeviceHasCursorPropertyInfo = Bool
type AttrLabel DeviceHasCursorPropertyInfo = "has-cursor"
type AttrOrigin DeviceHasCursorPropertyInfo = Device
attrGet = getDeviceHasCursor
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceHasCursor
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.hasCursor"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:hasCursor"
})
#endif
getDeviceInputMode :: (MonadIO m, IsDevice o) => o -> m Gdk.Enums.InputMode
getDeviceInputMode :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m InputMode
getDeviceInputMode o
obj = IO InputMode -> m InputMode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO InputMode -> m InputMode) -> IO InputMode -> m InputMode
forall a b. (a -> b) -> a -> b
$ o -> String -> IO InputMode
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"input-mode"
setDeviceInputMode :: (MonadIO m, IsDevice o) => o -> Gdk.Enums.InputMode -> m ()
setDeviceInputMode :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> InputMode -> m ()
setDeviceInputMode o
obj InputMode
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> InputMode -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"input-mode" InputMode
val
constructDeviceInputMode :: (IsDevice o, MIO.MonadIO m) => Gdk.Enums.InputMode -> m (GValueConstruct o)
constructDeviceInputMode :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
InputMode -> m (GValueConstruct o)
constructDeviceInputMode InputMode
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> InputMode -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"input-mode" InputMode
val
#if defined(ENABLE_OVERLOADING)
data DeviceInputModePropertyInfo
instance AttrInfo DeviceInputModePropertyInfo where
type AttrAllowedOps DeviceInputModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
type AttrBaseTypeConstraint DeviceInputModePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceInputModePropertyInfo = (~) Gdk.Enums.InputMode
type AttrTransferTypeConstraint DeviceInputModePropertyInfo = (~) Gdk.Enums.InputMode
type AttrTransferType DeviceInputModePropertyInfo = Gdk.Enums.InputMode
type AttrGetType DeviceInputModePropertyInfo = Gdk.Enums.InputMode
type AttrLabel DeviceInputModePropertyInfo = "input-mode"
type AttrOrigin DeviceInputModePropertyInfo = Device
attrGet = getDeviceInputMode
attrSet = setDeviceInputMode
attrPut = setDeviceInputMode
attrTransfer _ v = do
return v
attrConstruct = constructDeviceInputMode
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.inputMode"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:inputMode"
})
#endif
getDeviceInputSource :: (MonadIO m, IsDevice o) => o -> m Gdk.Enums.InputSource
getDeviceInputSource :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m InputSource
getDeviceInputSource o
obj = IO InputSource -> m InputSource
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO InputSource -> m InputSource)
-> IO InputSource -> m InputSource
forall a b. (a -> b) -> a -> b
$ o -> String -> IO InputSource
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"input-source"
constructDeviceInputSource :: (IsDevice o, MIO.MonadIO m) => Gdk.Enums.InputSource -> m (GValueConstruct o)
constructDeviceInputSource :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
InputSource -> m (GValueConstruct o)
constructDeviceInputSource InputSource
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> InputSource -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"input-source" InputSource
val
#if defined(ENABLE_OVERLOADING)
data DeviceInputSourcePropertyInfo
instance AttrInfo DeviceInputSourcePropertyInfo where
type AttrAllowedOps DeviceInputSourcePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DeviceInputSourcePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceInputSourcePropertyInfo = (~) Gdk.Enums.InputSource
type AttrTransferTypeConstraint DeviceInputSourcePropertyInfo = (~) Gdk.Enums.InputSource
type AttrTransferType DeviceInputSourcePropertyInfo = Gdk.Enums.InputSource
type AttrGetType DeviceInputSourcePropertyInfo = Gdk.Enums.InputSource
type AttrLabel DeviceInputSourcePropertyInfo = "input-source"
type AttrOrigin DeviceInputSourcePropertyInfo = Device
attrGet = getDeviceInputSource
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceInputSource
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.inputSource"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:inputSource"
})
#endif
getDeviceNAxes :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceNAxes :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceNAxes o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"n-axes"
#if defined(ENABLE_OVERLOADING)
data DeviceNAxesPropertyInfo
instance AttrInfo DeviceNAxesPropertyInfo where
type AttrAllowedOps DeviceNAxesPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceNAxesPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceNAxesPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceNAxesPropertyInfo = (~) ()
type AttrTransferType DeviceNAxesPropertyInfo = ()
type AttrGetType DeviceNAxesPropertyInfo = Word32
type AttrLabel DeviceNAxesPropertyInfo = "n-axes"
type AttrOrigin DeviceNAxesPropertyInfo = Device
attrGet = getDeviceNAxes
attrSet = undefined
attrPut = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.nAxes"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:nAxes"
})
#endif
getDeviceName :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceName :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceName o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"name"
constructDeviceName :: (IsDevice o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDeviceName :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDeviceName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DeviceNamePropertyInfo
instance AttrInfo DeviceNamePropertyInfo where
type AttrAllowedOps DeviceNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceNamePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DeviceNamePropertyInfo = (~) T.Text
type AttrTransferType DeviceNamePropertyInfo = T.Text
type AttrGetType DeviceNamePropertyInfo = T.Text
type AttrLabel DeviceNamePropertyInfo = "name"
type AttrOrigin DeviceNamePropertyInfo = Device
attrGet = getDeviceName
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceName
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.name"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:name"
})
#endif
getDeviceNumTouches :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceNumTouches :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceNumTouches o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"num-touches"
constructDeviceNumTouches :: (IsDevice o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructDeviceNumTouches :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructDeviceNumTouches Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"num-touches" Word32
val
#if defined(ENABLE_OVERLOADING)
data DeviceNumTouchesPropertyInfo
instance AttrInfo DeviceNumTouchesPropertyInfo where
type AttrAllowedOps DeviceNumTouchesPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DeviceNumTouchesPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceNumTouchesPropertyInfo = (~) Word32
type AttrTransferTypeConstraint DeviceNumTouchesPropertyInfo = (~) Word32
type AttrTransferType DeviceNumTouchesPropertyInfo = Word32
type AttrGetType DeviceNumTouchesPropertyInfo = Word32
type AttrLabel DeviceNumTouchesPropertyInfo = "num-touches"
type AttrOrigin DeviceNumTouchesPropertyInfo = Device
attrGet = getDeviceNumTouches
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceNumTouches
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.numTouches"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:numTouches"
})
#endif
getDeviceProductId :: (MonadIO m, IsDevice o) => o -> m (Maybe T.Text)
getDeviceProductId :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Text)
getDeviceProductId o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"product-id"
constructDeviceProductId :: (IsDevice o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDeviceProductId :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDeviceProductId Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"product-id" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DeviceProductIdPropertyInfo
instance AttrInfo DeviceProductIdPropertyInfo where
type AttrAllowedOps DeviceProductIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceProductIdPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceProductIdPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DeviceProductIdPropertyInfo = (~) T.Text
type AttrTransferType DeviceProductIdPropertyInfo = T.Text
type AttrGetType DeviceProductIdPropertyInfo = (Maybe T.Text)
type AttrLabel DeviceProductIdPropertyInfo = "product-id"
type AttrOrigin DeviceProductIdPropertyInfo = Device
attrGet = getDeviceProductId
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceProductId
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.productId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:productId"
})
#endif
getDeviceSeat :: (MonadIO m, IsDevice o) => o -> m Gdk.Seat.Seat
getDeviceSeat :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Seat
getDeviceSeat o
obj = IO Seat -> m Seat
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Seat -> m Seat) -> IO Seat -> m Seat
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Seat) -> IO Seat
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceSeat" (IO (Maybe Seat) -> IO Seat) -> IO (Maybe Seat) -> IO Seat
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Seat -> Seat) -> IO (Maybe Seat)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"seat" ManagedPtr Seat -> Seat
Gdk.Seat.Seat
setDeviceSeat :: (MonadIO m, IsDevice o, Gdk.Seat.IsSeat a) => o -> a -> m ()
setDeviceSeat :: forall (m :: * -> *) o a.
(MonadIO m, IsDevice o, IsSeat a) =>
o -> a -> m ()
setDeviceSeat o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"seat" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructDeviceSeat :: (IsDevice o, MIO.MonadIO m, Gdk.Seat.IsSeat a) => a -> m (GValueConstruct o)
constructDeviceSeat :: forall o (m :: * -> *) a.
(IsDevice o, MonadIO m, IsSeat a) =>
a -> m (GValueConstruct o)
constructDeviceSeat a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"seat" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearDeviceSeat :: (MonadIO m, IsDevice o) => o -> m ()
clearDeviceSeat :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m ()
clearDeviceSeat o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Seat -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"seat" (Maybe Seat
forall a. Maybe a
Nothing :: Maybe Gdk.Seat.Seat)
#if defined(ENABLE_OVERLOADING)
data DeviceSeatPropertyInfo
instance AttrInfo DeviceSeatPropertyInfo where
type AttrAllowedOps DeviceSeatPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceSeatPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceSeatPropertyInfo = Gdk.Seat.IsSeat
type AttrTransferTypeConstraint DeviceSeatPropertyInfo = Gdk.Seat.IsSeat
type AttrTransferType DeviceSeatPropertyInfo = Gdk.Seat.Seat
type AttrGetType DeviceSeatPropertyInfo = Gdk.Seat.Seat
type AttrLabel DeviceSeatPropertyInfo = "seat"
type AttrOrigin DeviceSeatPropertyInfo = Device
attrGet = getDeviceSeat
attrSet = setDeviceSeat
attrPut = undefined
attrTransfer _ v = do
unsafeCastTo Gdk.Seat.Seat v
attrConstruct = constructDeviceSeat
attrClear = clearDeviceSeat
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.seat"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:seat"
})
#endif
getDeviceTool :: (MonadIO m, IsDevice o) => o -> m (Maybe Gdk.DeviceTool.DeviceTool)
getDeviceTool :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe DeviceTool)
getDeviceTool o
obj = IO (Maybe DeviceTool) -> m (Maybe DeviceTool)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe DeviceTool) -> m (Maybe DeviceTool))
-> IO (Maybe DeviceTool) -> m (Maybe DeviceTool)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DeviceTool -> DeviceTool)
-> IO (Maybe DeviceTool)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"tool" ManagedPtr DeviceTool -> DeviceTool
Gdk.DeviceTool.DeviceTool
#if defined(ENABLE_OVERLOADING)
data DeviceToolPropertyInfo
instance AttrInfo DeviceToolPropertyInfo where
type AttrAllowedOps DeviceToolPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceToolPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceToolPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceToolPropertyInfo = (~) ()
type AttrTransferType DeviceToolPropertyInfo = ()
type AttrGetType DeviceToolPropertyInfo = (Maybe Gdk.DeviceTool.DeviceTool)
type AttrLabel DeviceToolPropertyInfo = "tool"
type AttrOrigin DeviceToolPropertyInfo = Device
attrGet = getDeviceTool
attrSet = undefined
attrPut = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.tool"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:tool"
})
#endif
getDeviceType :: (MonadIO m, IsDevice o) => o -> m Gdk.Enums.DeviceType
getDeviceType :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DeviceType
getDeviceType o
obj = IO DeviceType -> m DeviceType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceType -> m DeviceType) -> IO DeviceType -> m DeviceType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DeviceType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"type"
constructDeviceType :: (IsDevice o, MIO.MonadIO m) => Gdk.Enums.DeviceType -> m (GValueConstruct o)
constructDeviceType :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
DeviceType -> m (GValueConstruct o)
constructDeviceType DeviceType
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> DeviceType -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"type" DeviceType
val
#if defined(ENABLE_OVERLOADING)
data DeviceTypePropertyInfo
instance AttrInfo DeviceTypePropertyInfo where
type AttrAllowedOps DeviceTypePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DeviceTypePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceTypePropertyInfo = (~) Gdk.Enums.DeviceType
type AttrTransferTypeConstraint DeviceTypePropertyInfo = (~) Gdk.Enums.DeviceType
type AttrTransferType DeviceTypePropertyInfo = Gdk.Enums.DeviceType
type AttrGetType DeviceTypePropertyInfo = Gdk.Enums.DeviceType
type AttrLabel DeviceTypePropertyInfo = "type"
type AttrOrigin DeviceTypePropertyInfo = Device
attrGet = getDeviceType
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceType
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.type"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:type"
})
#endif
getDeviceVendorId :: (MonadIO m, IsDevice o) => o -> m (Maybe T.Text)
getDeviceVendorId :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Text)
getDeviceVendorId o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"vendor-id"
constructDeviceVendorId :: (IsDevice o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDeviceVendorId :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDeviceVendorId Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"vendor-id" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DeviceVendorIdPropertyInfo
instance AttrInfo DeviceVendorIdPropertyInfo where
type AttrAllowedOps DeviceVendorIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceVendorIdPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceVendorIdPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DeviceVendorIdPropertyInfo = (~) T.Text
type AttrTransferType DeviceVendorIdPropertyInfo = T.Text
type AttrGetType DeviceVendorIdPropertyInfo = (Maybe T.Text)
type AttrLabel DeviceVendorIdPropertyInfo = "vendor-id"
type AttrOrigin DeviceVendorIdPropertyInfo = Device
attrGet = getDeviceVendorId
attrSet = undefined
attrPut = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDeviceVendorId
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.vendorId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#g:attr:vendorId"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Device
type instance O.AttributeList Device = DeviceAttributeList
type DeviceAttributeList = ('[ '("associatedDevice", DeviceAssociatedDevicePropertyInfo), '("axes", DeviceAxesPropertyInfo), '("deviceManager", DeviceDeviceManagerPropertyInfo), '("display", DeviceDisplayPropertyInfo), '("hasCursor", DeviceHasCursorPropertyInfo), '("inputMode", DeviceInputModePropertyInfo), '("inputSource", DeviceInputSourcePropertyInfo), '("nAxes", DeviceNAxesPropertyInfo), '("name", DeviceNamePropertyInfo), '("numTouches", DeviceNumTouchesPropertyInfo), '("productId", DeviceProductIdPropertyInfo), '("seat", DeviceSeatPropertyInfo), '("tool", DeviceToolPropertyInfo), '("type", DeviceTypePropertyInfo), '("vendorId", DeviceVendorIdPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceAssociatedDevice :: AttrLabelProxy "associatedDevice"
deviceAssociatedDevice = AttrLabelProxy
deviceAxes :: AttrLabelProxy "axes"
deviceAxes = AttrLabelProxy
deviceDeviceManager :: AttrLabelProxy "deviceManager"
deviceDeviceManager = AttrLabelProxy
deviceDisplay :: AttrLabelProxy "display"
deviceDisplay = AttrLabelProxy
deviceHasCursor :: AttrLabelProxy "hasCursor"
deviceHasCursor = AttrLabelProxy
deviceInputMode :: AttrLabelProxy "inputMode"
deviceInputMode = AttrLabelProxy
deviceInputSource :: AttrLabelProxy "inputSource"
deviceInputSource = AttrLabelProxy
deviceNAxes :: AttrLabelProxy "nAxes"
deviceNAxes = AttrLabelProxy
deviceName :: AttrLabelProxy "name"
deviceName = AttrLabelProxy
deviceNumTouches :: AttrLabelProxy "numTouches"
deviceNumTouches = AttrLabelProxy
deviceProductId :: AttrLabelProxy "productId"
deviceProductId = AttrLabelProxy
deviceSeat :: AttrLabelProxy "seat"
deviceSeat = AttrLabelProxy
deviceTool :: AttrLabelProxy "tool"
deviceTool = AttrLabelProxy
deviceType :: AttrLabelProxy "type"
deviceType = AttrLabelProxy
deviceVendorId :: AttrLabelProxy "vendorId"
deviceVendorId = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Device = DeviceSignalList
type DeviceSignalList = ('[ '("changed", DeviceChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("toolChanged", DeviceToolChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gdk_device_get_associated_device" gdk_device_get_associated_device ::
Ptr Device ->
IO (Ptr Device)
deviceGetAssociatedDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m (Maybe Device)
deviceGetAssociatedDevice :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Maybe Device)
deviceGetAssociatedDevice a
device = IO (Maybe Device) -> m (Maybe Device)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Device) -> m (Maybe Device))
-> IO (Maybe Device) -> m (Maybe Device)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_associated_device device'
maybeResult <- convertIfNonNull result $ \Ptr Device
result' -> do
result'' <- ((ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Device -> Device
Device) Ptr Device
result'
return result''
touchManagedPtr device
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DeviceGetAssociatedDeviceMethodInfo
instance (signature ~ (m (Maybe Device)), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAssociatedDeviceMethodInfo a signature where
overloadedMethod = deviceGetAssociatedDevice
instance O.OverloadedMethodInfo DeviceGetAssociatedDeviceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetAssociatedDevice",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetAssociatedDevice"
})
#endif
foreign import ccall "gdk_device_get_axes" gdk_device_get_axes ::
Ptr Device ->
IO CUInt
deviceGetAxes ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [Gdk.Flags.AxisFlags]
deviceGetAxes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [AxisFlags]
deviceGetAxes a
device = IO [AxisFlags] -> m [AxisFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [AxisFlags] -> m [AxisFlags])
-> IO [AxisFlags] -> m [AxisFlags]
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_axes device'
let result' = CUInt -> [AxisFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetAxesMethodInfo
instance (signature ~ (m [Gdk.Flags.AxisFlags]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAxesMethodInfo a signature where
overloadedMethod = deviceGetAxes
instance O.OverloadedMethodInfo DeviceGetAxesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetAxes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetAxes"
})
#endif
foreign import ccall "gdk_device_get_axis_use" gdk_device_get_axis_use ::
Ptr Device ->
Word32 ->
IO CUInt
deviceGetAxisUse ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Word32
-> m Gdk.Enums.AxisUse
deviceGetAxisUse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Word32 -> m AxisUse
deviceGetAxisUse a
device Word32
index_ = IO AxisUse -> m AxisUse
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AxisUse -> m AxisUse) -> IO AxisUse -> m AxisUse
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_axis_use device' index_
let result' = (Int -> AxisUse
forall a. Enum a => Int -> a
toEnum (Int -> AxisUse) -> (CUInt -> Int) -> CUInt -> AxisUse
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetAxisUseMethodInfo
instance (signature ~ (Word32 -> m Gdk.Enums.AxisUse), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAxisUseMethodInfo a signature where
overloadedMethod = deviceGetAxisUse
instance O.OverloadedMethodInfo DeviceGetAxisUseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetAxisUse",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetAxisUse"
})
#endif
foreign import ccall "gdk_device_get_device_type" gdk_device_get_device_type ::
Ptr Device ->
IO CUInt
deviceGetDeviceType ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Gdk.Enums.DeviceType
deviceGetDeviceType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceType
deviceGetDeviceType a
device = IO DeviceType -> m DeviceType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceType -> m DeviceType) -> IO DeviceType -> m DeviceType
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_device_type device'
let result' = (Int -> DeviceType
forall a. Enum a => Int -> a
toEnum (Int -> DeviceType) -> (CUInt -> Int) -> CUInt -> DeviceType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDeviceTypeMethodInfo
instance (signature ~ (m Gdk.Enums.DeviceType), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDeviceTypeMethodInfo a signature where
overloadedMethod = deviceGetDeviceType
instance O.OverloadedMethodInfo DeviceGetDeviceTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetDeviceType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetDeviceType"
})
#endif
foreign import ccall "gdk_device_get_display" gdk_device_get_display ::
Ptr Device ->
IO (Ptr Gdk.Display.Display)
deviceGetDisplay ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Gdk.Display.Display
deviceGetDisplay :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Display
deviceGetDisplay a
device = IO Display -> m Display
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Display -> m Display) -> IO Display -> m Display
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_display device'
checkUnexpectedReturnNULL "deviceGetDisplay" result
result' <- (newObject Gdk.Display.Display) result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDisplayMethodInfo a signature where
overloadedMethod = deviceGetDisplay
instance O.OverloadedMethodInfo DeviceGetDisplayMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetDisplay",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetDisplay"
})
#endif
foreign import ccall "gdk_device_get_has_cursor" gdk_device_get_has_cursor ::
Ptr Device ->
IO CInt
deviceGetHasCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceGetHasCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetHasCursor a
device = IO Bool -> m Bool
forall a. IO a -> m a
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
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_has_cursor device'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetHasCursorMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetHasCursorMethodInfo a signature where
overloadedMethod = deviceGetHasCursor
instance O.OverloadedMethodInfo DeviceGetHasCursorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetHasCursor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetHasCursor"
})
#endif
foreign import ccall "gdk_device_get_key" gdk_device_get_key ::
Ptr Device ->
Word32 ->
Ptr Word32 ->
Ptr CUInt ->
IO CInt
deviceGetKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Word32
-> m ((Bool, Word32, [Gdk.Flags.ModifierType]))
deviceGetKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Word32 -> m (Bool, Word32, [ModifierType])
deviceGetKey a
device Word32
index_ = IO (Bool, Word32, [ModifierType])
-> m (Bool, Word32, [ModifierType])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32, [ModifierType])
-> m (Bool, Word32, [ModifierType]))
-> IO (Bool, Word32, [ModifierType])
-> m (Bool, Word32, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
keyval <- allocMem :: IO (Ptr Word32)
modifiers <- allocMem :: IO (Ptr CUInt)
result <- gdk_device_get_key device' index_ keyval modifiers
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
keyval' <- peek keyval
modifiers' <- peek modifiers
let modifiers'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
modifiers'
touchManagedPtr device
freeMem keyval
freeMem modifiers
return (result', keyval', modifiers'')
#if defined(ENABLE_OVERLOADING)
data DeviceGetKeyMethodInfo
instance (signature ~ (Word32 -> m ((Bool, Word32, [Gdk.Flags.ModifierType]))), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetKeyMethodInfo a signature where
overloadedMethod = deviceGetKey
instance O.OverloadedMethodInfo DeviceGetKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetKey"
})
#endif
foreign import ccall "gdk_device_get_last_event_window" gdk_device_get_last_event_window ::
Ptr Device ->
IO (Ptr Gdk.Window.Window)
deviceGetLastEventWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m (Maybe Gdk.Window.Window)
deviceGetLastEventWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Maybe Window)
deviceGetLastEventWindow a
device = IO (Maybe Window) -> m (Maybe Window)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_last_event_window device'
maybeResult <- convertIfNonNull result $ \Ptr Window
result' -> do
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gdk.Window.Window) Ptr Window
result'
return result''
touchManagedPtr device
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DeviceGetLastEventWindowMethodInfo
instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetLastEventWindowMethodInfo a signature where
overloadedMethod = deviceGetLastEventWindow
instance O.OverloadedMethodInfo DeviceGetLastEventWindowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetLastEventWindow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetLastEventWindow"
})
#endif
foreign import ccall "gdk_device_get_mode" gdk_device_get_mode ::
Ptr Device ->
IO CUInt
deviceGetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Gdk.Enums.InputMode
deviceGetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m InputMode
deviceGetMode a
device = IO InputMode -> m InputMode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO InputMode -> m InputMode) -> IO InputMode -> m InputMode
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_mode device'
let result' = (Int -> InputMode
forall a. Enum a => Int -> a
toEnum (Int -> InputMode) -> (CUInt -> Int) -> CUInt -> InputMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetModeMethodInfo
instance (signature ~ (m Gdk.Enums.InputMode), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetModeMethodInfo a signature where
overloadedMethod = deviceGetMode
instance O.OverloadedMethodInfo DeviceGetModeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetMode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetMode"
})
#endif
foreign import ccall "gdk_device_get_n_axes" gdk_device_get_n_axes ::
Ptr Device ->
IO Int32
deviceGetNAxes ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Int32
deviceGetNAxes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Int32
deviceGetNAxes a
device = IO Int32 -> m Int32
forall a. IO a -> m a
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
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_n_axes device'
touchManagedPtr device
return result
#if defined(ENABLE_OVERLOADING)
data DeviceGetNAxesMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetNAxesMethodInfo a signature where
overloadedMethod = deviceGetNAxes
instance O.OverloadedMethodInfo DeviceGetNAxesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetNAxes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetNAxes"
})
#endif
foreign import ccall "gdk_device_get_n_keys" gdk_device_get_n_keys ::
Ptr Device ->
IO Int32
deviceGetNKeys ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Int32
deviceGetNKeys :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Int32
deviceGetNKeys a
device = IO Int32 -> m Int32
forall a. IO a -> m a
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
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_n_keys device'
touchManagedPtr device
return result
#if defined(ENABLE_OVERLOADING)
data DeviceGetNKeysMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetNKeysMethodInfo a signature where
overloadedMethod = deviceGetNKeys
instance O.OverloadedMethodInfo DeviceGetNKeysMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetNKeys",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetNKeys"
})
#endif
foreign import ccall "gdk_device_get_name" gdk_device_get_name ::
Ptr Device ->
IO CString
deviceGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetName a
device = IO Text -> m Text
forall a. IO a -> m a
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
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_name device'
checkUnexpectedReturnNULL "deviceGetName" result
result' <- cstringToText result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetNameMethodInfo a signature where
overloadedMethod = deviceGetName
instance O.OverloadedMethodInfo DeviceGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetName"
})
#endif
foreign import ccall "gdk_device_get_position" gdk_device_get_position ::
Ptr Device ->
Ptr (Ptr Gdk.Screen.Screen) ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
deviceGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m ((Gdk.Screen.Screen, Int32, Int32))
deviceGetPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Screen, Int32, Int32)
deviceGetPosition a
device = IO (Screen, Int32, Int32) -> m (Screen, Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Screen, Int32, Int32) -> m (Screen, Int32, Int32))
-> IO (Screen, Int32, Int32) -> m (Screen, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
screen <- callocMem :: IO (Ptr (Ptr Gdk.Screen.Screen))
x <- allocMem :: IO (Ptr Int32)
y <- allocMem :: IO (Ptr Int32)
gdk_device_get_position device' screen x y
screen' <- peek screen
screen'' <- (newObject Gdk.Screen.Screen) screen'
x' <- peek x
y' <- peek y
touchManagedPtr device
freeMem screen
freeMem x
freeMem y
return (screen'', x', y')
#if defined(ENABLE_OVERLOADING)
data DeviceGetPositionMethodInfo
instance (signature ~ (m ((Gdk.Screen.Screen, Int32, Int32))), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPositionMethodInfo a signature where
overloadedMethod = deviceGetPosition
instance O.OverloadedMethodInfo DeviceGetPositionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetPosition",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetPosition"
})
#endif
foreign import ccall "gdk_device_get_position_double" gdk_device_get_position_double ::
Ptr Device ->
Ptr (Ptr Gdk.Screen.Screen) ->
Ptr CDouble ->
Ptr CDouble ->
IO ()
deviceGetPositionDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m ((Gdk.Screen.Screen, Double, Double))
deviceGetPositionDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Screen, Double, Double)
deviceGetPositionDouble a
device = IO (Screen, Double, Double) -> m (Screen, Double, Double)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Screen, Double, Double) -> m (Screen, Double, Double))
-> IO (Screen, Double, Double) -> m (Screen, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
screen <- callocMem :: IO (Ptr (Ptr Gdk.Screen.Screen))
x <- allocMem :: IO (Ptr CDouble)
y <- allocMem :: IO (Ptr CDouble)
gdk_device_get_position_double device' screen x y
screen' <- peek screen
screen'' <- (newObject Gdk.Screen.Screen) screen'
x' <- peek x
let x'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x'
y' <- peek y
let y'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y'
touchManagedPtr device
freeMem screen
freeMem x
freeMem y
return (screen'', x'', y'')
#if defined(ENABLE_OVERLOADING)
data DeviceGetPositionDoubleMethodInfo
instance (signature ~ (m ((Gdk.Screen.Screen, Double, Double))), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPositionDoubleMethodInfo a signature where
overloadedMethod = deviceGetPositionDouble
instance O.OverloadedMethodInfo DeviceGetPositionDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetPositionDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetPositionDouble"
})
#endif
foreign import ccall "gdk_device_get_product_id" gdk_device_get_product_id ::
Ptr Device ->
IO CString
deviceGetProductId ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m (Maybe T.Text)
deviceGetProductId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Maybe Text)
deviceGetProductId a
device = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_product_id device'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr device
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DeviceGetProductIdMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetProductIdMethodInfo a signature where
overloadedMethod = deviceGetProductId
instance O.OverloadedMethodInfo DeviceGetProductIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetProductId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetProductId"
})
#endif
foreign import ccall "gdk_device_get_seat" gdk_device_get_seat ::
Ptr Device ->
IO (Ptr Gdk.Seat.Seat)
deviceGetSeat ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Gdk.Seat.Seat
deviceGetSeat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Seat
deviceGetSeat a
device = IO Seat -> m Seat
forall a. IO a -> m a
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
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_seat device'
checkUnexpectedReturnNULL "deviceGetSeat" result
result' <- (newObject Gdk.Seat.Seat) result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetSeatMethodInfo
instance (signature ~ (m Gdk.Seat.Seat), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetSeatMethodInfo a signature where
overloadedMethod = deviceGetSeat
instance O.OverloadedMethodInfo DeviceGetSeatMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetSeat",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetSeat"
})
#endif
foreign import ccall "gdk_device_get_source" gdk_device_get_source ::
Ptr Device ->
IO CUInt
deviceGetSource ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Gdk.Enums.InputSource
deviceGetSource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m InputSource
deviceGetSource a
device = IO InputSource -> m InputSource
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO InputSource -> m InputSource)
-> IO InputSource -> m InputSource
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_source device'
let result' = (Int -> InputSource
forall a. Enum a => Int -> a
toEnum (Int -> InputSource) -> (CUInt -> Int) -> CUInt -> InputSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetSourceMethodInfo
instance (signature ~ (m Gdk.Enums.InputSource), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetSourceMethodInfo a signature where
overloadedMethod = deviceGetSource
instance O.OverloadedMethodInfo DeviceGetSourceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetSource",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetSource"
})
#endif
foreign import ccall "gdk_device_get_vendor_id" gdk_device_get_vendor_id ::
Ptr Device ->
IO CString
deviceGetVendorId ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m (Maybe T.Text)
deviceGetVendorId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Maybe Text)
deviceGetVendorId a
device = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_get_vendor_id device'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr device
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DeviceGetVendorIdMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetVendorIdMethodInfo a signature where
overloadedMethod = deviceGetVendorId
instance O.OverloadedMethodInfo DeviceGetVendorIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetVendorId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetVendorId"
})
#endif
foreign import ccall "gdk_device_get_window_at_position" gdk_device_get_window_at_position ::
Ptr Device ->
Ptr Int32 ->
Ptr Int32 ->
IO (Ptr Gdk.Window.Window)
deviceGetWindowAtPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m ((Maybe Gdk.Window.Window, Int32, Int32))
deviceGetWindowAtPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Maybe Window, Int32, Int32)
deviceGetWindowAtPosition a
device = IO (Maybe Window, Int32, Int32) -> m (Maybe Window, Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Int32, Int32) -> m (Maybe Window, Int32, Int32))
-> IO (Maybe Window, Int32, Int32)
-> m (Maybe Window, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
winX <- allocMem :: IO (Ptr Int32)
winY <- allocMem :: IO (Ptr Int32)
result <- gdk_device_get_window_at_position device' winX winY
maybeResult <- convertIfNonNull result $ \Ptr Window
result' -> do
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gdk.Window.Window) Ptr Window
result'
return result''
winX' <- peek winX
winY' <- peek winY
touchManagedPtr device
freeMem winX
freeMem winY
return (maybeResult, winX', winY')
#if defined(ENABLE_OVERLOADING)
data DeviceGetWindowAtPositionMethodInfo
instance (signature ~ (m ((Maybe Gdk.Window.Window, Int32, Int32))), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetWindowAtPositionMethodInfo a signature where
overloadedMethod = deviceGetWindowAtPosition
instance O.OverloadedMethodInfo DeviceGetWindowAtPositionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetWindowAtPosition",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetWindowAtPosition"
})
#endif
foreign import ccall "gdk_device_get_window_at_position_double" gdk_device_get_window_at_position_double ::
Ptr Device ->
Ptr CDouble ->
Ptr CDouble ->
IO (Ptr Gdk.Window.Window)
deviceGetWindowAtPositionDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m ((Maybe Gdk.Window.Window, Double, Double))
deviceGetWindowAtPositionDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m (Maybe Window, Double, Double)
deviceGetWindowAtPositionDouble a
device = IO (Maybe Window, Double, Double)
-> m (Maybe Window, Double, Double)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Double, Double)
-> m (Maybe Window, Double, Double))
-> IO (Maybe Window, Double, Double)
-> m (Maybe Window, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
winX <- allocMem :: IO (Ptr CDouble)
winY <- allocMem :: IO (Ptr CDouble)
result <- gdk_device_get_window_at_position_double device' winX winY
maybeResult <- convertIfNonNull result $ \Ptr Window
result' -> do
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gdk.Window.Window) Ptr Window
result'
return result''
winX' <- peek winX
let winX'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
winX'
winY' <- peek winY
let winY'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
winY'
touchManagedPtr device
freeMem winX
freeMem winY
return (maybeResult, winX'', winY'')
#if defined(ENABLE_OVERLOADING)
data DeviceGetWindowAtPositionDoubleMethodInfo
instance (signature ~ (m ((Maybe Gdk.Window.Window, Double, Double))), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetWindowAtPositionDoubleMethodInfo a signature where
overloadedMethod = deviceGetWindowAtPositionDouble
instance O.OverloadedMethodInfo DeviceGetWindowAtPositionDoubleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGetWindowAtPositionDouble",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGetWindowAtPositionDouble"
})
#endif
foreign import ccall "gdk_device_grab" gdk_device_grab ::
Ptr Device ->
Ptr Gdk.Window.Window ->
CUInt ->
CInt ->
CUInt ->
Ptr Gdk.Cursor.Cursor ->
Word32 ->
IO CUInt
{-# DEPRECATED deviceGrab ["(Since version 3.20.)","Use 'GI.Gdk.Objects.Seat.seatGrab' instead."] #-}
deviceGrab ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gdk.Window.IsWindow b, Gdk.Cursor.IsCursor c) =>
a
-> b
-> Gdk.Enums.GrabOwnership
-> Bool
-> [Gdk.Flags.EventMask]
-> Maybe (c)
-> Word32
-> m Gdk.Enums.GrabStatus
deviceGrab :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDevice a, IsWindow b, IsCursor c) =>
a
-> b
-> GrabOwnership
-> Bool
-> [EventMask]
-> Maybe c
-> Word32
-> m GrabStatus
deviceGrab a
device b
window GrabOwnership
grabOwnership Bool
ownerEvents [EventMask]
eventMask Maybe c
cursor Word32
time_ = IO GrabStatus -> m GrabStatus
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GrabStatus -> m GrabStatus) -> IO GrabStatus -> m GrabStatus
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
window' <- unsafeManagedPtrCastPtr window
let grabOwnership' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (GrabOwnership -> Int) -> GrabOwnership -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. GrabOwnership -> Int
forall a. Enum a => a -> Int
fromEnum) GrabOwnership
grabOwnership
let ownerEvents' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
ownerEvents
let eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
maybeCursor <- case cursor of
Maybe c
Nothing -> Ptr Cursor -> IO (Ptr Cursor)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
forall a. Ptr a
FP.nullPtr
Just c
jCursor -> do
jCursor' <- c -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCursor
return jCursor'
result <- gdk_device_grab device' window' grabOwnership' ownerEvents' eventMask' maybeCursor time_
let result' = (Int -> GrabStatus
forall a. Enum a => Int -> a
toEnum (Int -> GrabStatus) -> (CUInt -> Int) -> CUInt -> GrabStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr device
touchManagedPtr window
whenJust cursor touchManagedPtr
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceGrabMethodInfo
instance (signature ~ (b -> Gdk.Enums.GrabOwnership -> Bool -> [Gdk.Flags.EventMask] -> Maybe (c) -> Word32 -> m Gdk.Enums.GrabStatus), MonadIO m, IsDevice a, Gdk.Window.IsWindow b, Gdk.Cursor.IsCursor c) => O.OverloadedMethod DeviceGrabMethodInfo a signature where
overloadedMethod = deviceGrab
instance O.OverloadedMethodInfo DeviceGrabMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceGrab",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceGrab"
})
#endif
foreign import ccall "gdk_device_list_axes" gdk_device_list_axes ::
Ptr Device ->
IO (Ptr (GList (Ptr Gdk.Atom.Atom)))
deviceListAxes ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [Gdk.Atom.Atom]
deviceListAxes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [Atom]
deviceListAxes a
device = IO [Atom] -> m [Atom]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Atom] -> m [Atom]) -> IO [Atom] -> m [Atom]
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_list_axes device'
result' <- unpackGList result
result'' <- mapM (newPtr Gdk.Atom.Atom) result'
g_list_free result
touchManagedPtr device
return result''
#if defined(ENABLE_OVERLOADING)
data DeviceListAxesMethodInfo
instance (signature ~ (m [Gdk.Atom.Atom]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceListAxesMethodInfo a signature where
overloadedMethod = deviceListAxes
instance O.OverloadedMethodInfo DeviceListAxesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceListAxes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceListAxes"
})
#endif
foreign import ccall "gdk_device_list_slave_devices" gdk_device_list_slave_devices ::
Ptr Device ->
IO (Ptr (GList (Ptr Device)))
deviceListSlaveDevices ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [Device]
deviceListSlaveDevices :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [Device]
deviceListSlaveDevices a
device = IO [Device] -> m [Device]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Device] -> m [Device]) -> IO [Device] -> m [Device]
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
result <- gdk_device_list_slave_devices device'
result' <- unpackGList result
result'' <- mapM (newObject Device) result'
g_list_free result
touchManagedPtr device
return result''
#if defined(ENABLE_OVERLOADING)
data DeviceListSlaveDevicesMethodInfo
instance (signature ~ (m [Device]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceListSlaveDevicesMethodInfo a signature where
overloadedMethod = deviceListSlaveDevices
instance O.OverloadedMethodInfo DeviceListSlaveDevicesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceListSlaveDevices",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceListSlaveDevices"
})
#endif
foreign import ccall "gdk_device_set_axis_use" gdk_device_set_axis_use ::
Ptr Device ->
Word32 ->
CUInt ->
IO ()
deviceSetAxisUse ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Word32
-> Gdk.Enums.AxisUse
-> m ()
deviceSetAxisUse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Word32 -> AxisUse -> m ()
deviceSetAxisUse a
device Word32
index_ AxisUse
use = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
let use' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (AxisUse -> Int) -> AxisUse -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AxisUse -> Int
forall a. Enum a => a -> Int
fromEnum) AxisUse
use
gdk_device_set_axis_use device' index_ use'
touchManagedPtr device
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceSetAxisUseMethodInfo
instance (signature ~ (Word32 -> Gdk.Enums.AxisUse -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetAxisUseMethodInfo a signature where
overloadedMethod = deviceSetAxisUse
instance O.OverloadedMethodInfo DeviceSetAxisUseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceSetAxisUse",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceSetAxisUse"
})
#endif
foreign import ccall "gdk_device_set_key" gdk_device_set_key ::
Ptr Device ->
Word32 ->
Word32 ->
CUInt ->
IO ()
deviceSetKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Word32
-> Word32
-> [Gdk.Flags.ModifierType]
-> m ()
deviceSetKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Word32 -> Word32 -> [ModifierType] -> m ()
deviceSetKey a
device Word32
index_ Word32
keyval [ModifierType]
modifiers = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
let modifiers' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
modifiers
gdk_device_set_key device' index_ keyval modifiers'
touchManagedPtr device
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceSetKeyMethodInfo
instance (signature ~ (Word32 -> Word32 -> [Gdk.Flags.ModifierType] -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetKeyMethodInfo a signature where
overloadedMethod = deviceSetKey
instance O.OverloadedMethodInfo DeviceSetKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceSetKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceSetKey"
})
#endif
foreign import ccall "gdk_device_set_mode" gdk_device_set_mode ::
Ptr Device ->
CUInt ->
IO CInt
deviceSetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Gdk.Enums.InputMode
-> m Bool
deviceSetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> InputMode -> m Bool
deviceSetMode a
device InputMode
mode = IO Bool -> m Bool
forall a. IO a -> m a
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
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
let mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (InputMode -> Int) -> InputMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. InputMode -> Int
forall a. Enum a => a -> Int
fromEnum) InputMode
mode
result <- gdk_device_set_mode device' mode'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr device
return result'
#if defined(ENABLE_OVERLOADING)
data DeviceSetModeMethodInfo
instance (signature ~ (Gdk.Enums.InputMode -> m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetModeMethodInfo a signature where
overloadedMethod = deviceSetMode
instance O.OverloadedMethodInfo DeviceSetModeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceSetMode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceSetMode"
})
#endif
foreign import ccall "gdk_device_ungrab" gdk_device_ungrab ::
Ptr Device ->
Word32 ->
IO ()
{-# DEPRECATED deviceUngrab ["(Since version 3.20.)","Use 'GI.Gdk.Objects.Seat.seatUngrab' instead."] #-}
deviceUngrab ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Word32
-> m ()
deviceUngrab :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Word32 -> m ()
deviceUngrab a
device Word32
time_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
gdk_device_ungrab device' time_
touchManagedPtr device
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceUngrabMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceUngrabMethodInfo a signature where
overloadedMethod = deviceUngrab
instance O.OverloadedMethodInfo DeviceUngrabMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceUngrab",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceUngrab"
})
#endif
foreign import ccall "gdk_device_warp" gdk_device_warp ::
Ptr Device ->
Ptr Gdk.Screen.Screen ->
Int32 ->
Int32 ->
IO ()
deviceWarp ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gdk.Screen.IsScreen b) =>
a
-> b
-> Int32
-> Int32
-> m ()
deviceWarp :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsScreen b) =>
a -> b -> Int32 -> Int32 -> m ()
deviceWarp a
device b
screen Int32
x Int32
y = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
screen' <- unsafeManagedPtrCastPtr screen
gdk_device_warp device' screen' x y
touchManagedPtr device
touchManagedPtr screen
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceWarpMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> m ()), MonadIO m, IsDevice a, Gdk.Screen.IsScreen b) => O.OverloadedMethod DeviceWarpMethodInfo a signature where
overloadedMethod = deviceWarp
instance O.OverloadedMethodInfo DeviceWarpMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Objects.Device.deviceWarp",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.29/docs/GI-Gdk-Objects-Device.html#v:deviceWarp"
})
#endif
foreign import ccall "gdk_device_grab_info_libgtk_only" gdk_device_grab_info_libgtk_only ::
Ptr Gdk.Display.Display ->
Ptr Device ->
Ptr (Ptr Gdk.Window.Window) ->
Ptr CInt ->
IO CInt
{-# DEPRECATED deviceGrabInfoLibgtkOnly ["(Since version 3.16)","The symbol was never meant to be used outside"," of GTK+"] #-}
deviceGrabInfoLibgtkOnly ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Display.IsDisplay a, IsDevice b) =>
a
-> b
-> m ((Bool, Gdk.Window.Window, Bool))
deviceGrabInfoLibgtkOnly :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDisplay a, IsDevice b) =>
a -> b -> m (Bool, Window, Bool)
deviceGrabInfoLibgtkOnly a
display b
device = IO (Bool, Window, Bool) -> m (Bool, Window, Bool)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Window, Bool) -> m (Bool, Window, Bool))
-> IO (Bool, Window, Bool) -> m (Bool, Window, Bool)
forall a b. (a -> b) -> a -> b
$ do
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
device' <- unsafeManagedPtrCastPtr device
grabWindow <- callocMem :: IO (Ptr (Ptr Gdk.Window.Window))
ownerEvents <- allocMem :: IO (Ptr CInt)
result <- gdk_device_grab_info_libgtk_only display' device' grabWindow ownerEvents
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
grabWindow' <- peek grabWindow
grabWindow'' <- (newObject Gdk.Window.Window) grabWindow'
ownerEvents' <- peek ownerEvents
let ownerEvents'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
ownerEvents'
touchManagedPtr display
touchManagedPtr device
freeMem grabWindow
freeMem ownerEvents
return (result', grabWindow'', ownerEvents'')
#if defined(ENABLE_OVERLOADING)
#endif