{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Structs.EventTouch
(
EventTouch(..) ,
newZeroEventTouch ,
#if defined(ENABLE_OVERLOADING)
ResolveEventTouchMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
eventTouch_axes ,
#endif
getEventTouchAxes ,
setEventTouchAxes ,
clearEventTouchDevice ,
#if defined(ENABLE_OVERLOADING)
eventTouch_device ,
#endif
getEventTouchDevice ,
setEventTouchDevice ,
#if defined(ENABLE_OVERLOADING)
eventTouch_emulatingPointer ,
#endif
getEventTouchEmulatingPointer ,
setEventTouchEmulatingPointer ,
#if defined(ENABLE_OVERLOADING)
eventTouch_sendEvent ,
#endif
getEventTouchSendEvent ,
setEventTouchSendEvent ,
clearEventTouchSequence ,
#if defined(ENABLE_OVERLOADING)
eventTouch_sequence ,
#endif
getEventTouchSequence ,
setEventTouchSequence ,
#if defined(ENABLE_OVERLOADING)
eventTouch_state ,
#endif
getEventTouchState ,
setEventTouchState ,
#if defined(ENABLE_OVERLOADING)
eventTouch_time ,
#endif
getEventTouchTime ,
setEventTouchTime ,
#if defined(ENABLE_OVERLOADING)
eventTouch_type ,
#endif
getEventTouchType ,
setEventTouchType ,
clearEventTouchWindow ,
#if defined(ENABLE_OVERLOADING)
eventTouch_window ,
#endif
getEventTouchWindow ,
setEventTouchWindow ,
#if defined(ENABLE_OVERLOADING)
eventTouch_x ,
#endif
getEventTouchX ,
setEventTouchX ,
#if defined(ENABLE_OVERLOADING)
eventTouch_xRoot ,
#endif
getEventTouchXRoot ,
setEventTouchXRoot ,
#if defined(ENABLE_OVERLOADING)
eventTouch_y ,
#endif
getEventTouchY ,
setEventTouchY ,
#if defined(ENABLE_OVERLOADING)
eventTouch_yRoot ,
#endif
getEventTouchYRoot ,
setEventTouchYRoot ,
) 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.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Structs.EventSequence as Gdk.EventSequence
newtype EventTouch = EventTouch (SP.ManagedPtr EventTouch)
deriving (EventTouch -> EventTouch -> Bool
(EventTouch -> EventTouch -> Bool)
-> (EventTouch -> EventTouch -> Bool) -> Eq EventTouch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventTouch -> EventTouch -> Bool
$c/= :: EventTouch -> EventTouch -> Bool
== :: EventTouch -> EventTouch -> Bool
$c== :: EventTouch -> EventTouch -> Bool
Eq)
instance SP.ManagedPtrNewtype EventTouch where
toManagedPtr :: EventTouch -> ManagedPtr EventTouch
toManagedPtr (EventTouch ManagedPtr EventTouch
p) = ManagedPtr EventTouch
p
instance BoxedPtr EventTouch where
boxedPtrCopy :: EventTouch -> IO EventTouch
boxedPtrCopy = \EventTouch
p -> EventTouch -> (Ptr EventTouch -> IO EventTouch) -> IO EventTouch
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EventTouch
p (Int -> Ptr EventTouch -> IO (Ptr EventTouch)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
96 (Ptr EventTouch -> IO (Ptr EventTouch))
-> (Ptr EventTouch -> IO EventTouch)
-> Ptr EventTouch
-> IO EventTouch
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr EventTouch -> EventTouch)
-> Ptr EventTouch -> IO EventTouch
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr EventTouch -> EventTouch
EventTouch)
boxedPtrFree :: EventTouch -> IO ()
boxedPtrFree = \EventTouch
x -> EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr EventTouch
x Ptr EventTouch -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr EventTouch where
boxedPtrCalloc :: IO (Ptr EventTouch)
boxedPtrCalloc = Int -> IO (Ptr EventTouch)
forall a. Int -> IO (Ptr a)
callocBytes Int
96
newZeroEventTouch :: MonadIO m => m EventTouch
newZeroEventTouch :: m EventTouch
newZeroEventTouch = IO EventTouch -> m EventTouch
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventTouch -> m EventTouch) -> IO EventTouch -> m EventTouch
forall a b. (a -> b) -> a -> b
$ IO (Ptr EventTouch)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr EventTouch)
-> (Ptr EventTouch -> IO EventTouch) -> IO EventTouch
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr EventTouch -> EventTouch)
-> Ptr EventTouch -> IO EventTouch
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr EventTouch -> EventTouch
EventTouch
instance tag ~ 'AttrSet => Constructible EventTouch tag where
new :: (ManagedPtr EventTouch -> EventTouch)
-> [AttrOp EventTouch tag] -> m EventTouch
new ManagedPtr EventTouch -> EventTouch
_ [AttrOp EventTouch tag]
attrs = do
EventTouch
o <- m EventTouch
forall (m :: * -> *). MonadIO m => m EventTouch
newZeroEventTouch
EventTouch -> [AttrOp EventTouch 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set EventTouch
o [AttrOp EventTouch tag]
[AttrOp EventTouch 'AttrSet]
attrs
EventTouch -> m EventTouch
forall (m :: * -> *) a. Monad m => a -> m a
return EventTouch
o
getEventTouchType :: MonadIO m => EventTouch -> m Gdk.Enums.EventType
getEventTouchType :: EventTouch -> m EventType
getEventTouchType EventTouch
s = IO EventType -> m EventType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventType -> m EventType) -> IO EventType -> m EventType
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO EventType) -> IO EventType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO EventType) -> IO EventType)
-> (Ptr EventTouch -> IO EventType) -> IO EventType
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CInt
let val' :: EventType
val' = (Int -> EventType
forall a. Enum a => Int -> a
toEnum (Int -> EventType) -> (CInt -> Int) -> CInt -> EventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
val
EventType -> IO EventType
forall (m :: * -> *) a. Monad m => a -> m a
return EventType
val'
setEventTouchType :: MonadIO m => EventTouch -> Gdk.Enums.EventType -> m ()
setEventTouchType :: EventTouch -> EventType -> m ()
setEventTouchType EventTouch
s EventType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CInt
val' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (EventType -> Int) -> EventType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EventType -> Int
forall a. Enum a => a -> Int
fromEnum) EventType
val
Ptr CInt -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data EventTouchTypeFieldInfo
instance AttrInfo EventTouchTypeFieldInfo where
type AttrBaseTypeConstraint EventTouchTypeFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchTypeFieldInfo = (~) Gdk.Enums.EventType
type AttrTransferTypeConstraint EventTouchTypeFieldInfo = (~)Gdk.Enums.EventType
type AttrTransferType EventTouchTypeFieldInfo = Gdk.Enums.EventType
type AttrGetType EventTouchTypeFieldInfo = Gdk.Enums.EventType
type AttrLabel EventTouchTypeFieldInfo = "type"
type AttrOrigin EventTouchTypeFieldInfo = EventTouch
attrGet = getEventTouchType
attrSet = setEventTouchType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_type :: AttrLabelProxy "type"
eventTouch_type = AttrLabelProxy
#endif
getEventTouchWindow :: MonadIO m => EventTouch -> m (Maybe Gdk.Window.Window)
getEventTouchWindow :: EventTouch -> m (Maybe Window)
getEventTouchWindow EventTouch
s = IO (Maybe Window) -> m (Maybe Window)
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
$ EventTouch
-> (Ptr EventTouch -> IO (Maybe Window)) -> IO (Maybe Window)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO (Maybe Window)) -> IO (Maybe Window))
-> (Ptr EventTouch -> IO (Maybe Window)) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr Window
val <- Ptr (Ptr Window) -> IO (Ptr Window)
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (Ptr Gdk.Window.Window)
Maybe Window
result <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Window
val ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
val' -> do
Window
val'' <- ((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
val'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
val''
Maybe Window -> IO (Maybe Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
result
setEventTouchWindow :: MonadIO m => EventTouch -> Ptr Gdk.Window.Window -> m ()
setEventTouchWindow :: EventTouch -> Ptr Window -> m ()
setEventTouchWindow EventTouch
s Ptr Window
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr (Ptr Window) -> Ptr Window -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr Window
val :: Ptr Gdk.Window.Window)
clearEventTouchWindow :: MonadIO m => EventTouch -> m ()
clearEventTouchWindow :: EventTouch -> m ()
clearEventTouchWindow EventTouch
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr (Ptr Window) -> Ptr Window -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr Window
forall a. Ptr a
FP.nullPtr :: Ptr Gdk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data EventTouchWindowFieldInfo
instance AttrInfo EventTouchWindowFieldInfo where
type AttrBaseTypeConstraint EventTouchWindowFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchWindowFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventTouchWindowFieldInfo = (~) (Ptr Gdk.Window.Window)
type AttrTransferTypeConstraint EventTouchWindowFieldInfo = (~)(Ptr Gdk.Window.Window)
type AttrTransferType EventTouchWindowFieldInfo = (Ptr Gdk.Window.Window)
type AttrGetType EventTouchWindowFieldInfo = Maybe Gdk.Window.Window
type AttrLabel EventTouchWindowFieldInfo = "window"
type AttrOrigin EventTouchWindowFieldInfo = EventTouch
attrGet = getEventTouchWindow
attrSet = setEventTouchWindow
attrConstruct = undefined
attrClear = clearEventTouchWindow
attrTransfer _ v = do
return v
eventTouch_window :: AttrLabelProxy "window"
eventTouch_window = AttrLabelProxy
#endif
getEventTouchSendEvent :: MonadIO m => EventTouch -> m Int8
getEventTouchSendEvent :: EventTouch -> m Int8
getEventTouchSendEvent EventTouch
s = IO Int8 -> m Int8
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int8 -> m Int8) -> IO Int8 -> m Int8
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Int8) -> IO Int8
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Int8) -> IO Int8)
-> (Ptr EventTouch -> IO Int8) -> IO Int8
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Int8
val <- Ptr Int8 -> IO Int8
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr Int8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO Int8
Int8 -> IO Int8
forall (m :: * -> *) a. Monad m => a -> m a
return Int8
val
setEventTouchSendEvent :: MonadIO m => EventTouch -> Int8 -> m ()
setEventTouchSendEvent :: EventTouch -> Int8 -> m ()
setEventTouchSendEvent EventTouch
s Int8
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr Int8 -> Int8 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr Int8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Int8
val :: Int8)
#if defined(ENABLE_OVERLOADING)
data EventTouchSendEventFieldInfo
instance AttrInfo EventTouchSendEventFieldInfo where
type AttrBaseTypeConstraint EventTouchSendEventFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchSendEventFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchSendEventFieldInfo = (~) Int8
type AttrTransferTypeConstraint EventTouchSendEventFieldInfo = (~)Int8
type AttrTransferType EventTouchSendEventFieldInfo = Int8
type AttrGetType EventTouchSendEventFieldInfo = Int8
type AttrLabel EventTouchSendEventFieldInfo = "send_event"
type AttrOrigin EventTouchSendEventFieldInfo = EventTouch
attrGet = getEventTouchSendEvent
attrSet = setEventTouchSendEvent
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_sendEvent :: AttrLabelProxy "sendEvent"
eventTouch_sendEvent = AttrLabelProxy
#endif
getEventTouchTime :: MonadIO m => EventTouch -> m Word32
getEventTouchTime :: EventTouch -> m Word32
getEventTouchTime EventTouch
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Word32) -> IO Word32)
-> (Ptr EventTouch -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setEventTouchTime :: MonadIO m => EventTouch -> Word32 -> m ()
setEventTouchTime :: EventTouch -> Word32 -> m ()
setEventTouchTime EventTouch
s Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data EventTouchTimeFieldInfo
instance AttrInfo EventTouchTimeFieldInfo where
type AttrBaseTypeConstraint EventTouchTimeFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchTimeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchTimeFieldInfo = (~) Word32
type AttrTransferTypeConstraint EventTouchTimeFieldInfo = (~)Word32
type AttrTransferType EventTouchTimeFieldInfo = Word32
type AttrGetType EventTouchTimeFieldInfo = Word32
type AttrLabel EventTouchTimeFieldInfo = "time"
type AttrOrigin EventTouchTimeFieldInfo = EventTouch
attrGet = getEventTouchTime
attrSet = setEventTouchTime
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_time :: AttrLabelProxy "time"
eventTouch_time = AttrLabelProxy
#endif
getEventTouchX :: MonadIO m => EventTouch -> m Double
getEventTouchX :: EventTouch -> m Double
getEventTouchX EventTouch
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Double) -> IO Double)
-> (Ptr EventTouch -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventTouchX :: MonadIO m => EventTouch -> Double -> m ()
setEventTouchX :: EventTouch -> Double -> m ()
setEventTouchX EventTouch
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventTouchXFieldInfo
instance AttrInfo EventTouchXFieldInfo where
type AttrBaseTypeConstraint EventTouchXFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchXFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchXFieldInfo = (~) Double
type AttrTransferTypeConstraint EventTouchXFieldInfo = (~)Double
type AttrTransferType EventTouchXFieldInfo = Double
type AttrGetType EventTouchXFieldInfo = Double
type AttrLabel EventTouchXFieldInfo = "x"
type AttrOrigin EventTouchXFieldInfo = EventTouch
attrGet = getEventTouchX
attrSet = setEventTouchX
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_x :: AttrLabelProxy "x"
eventTouch_x = AttrLabelProxy
#endif
getEventTouchY :: MonadIO m => EventTouch -> m Double
getEventTouchY :: EventTouch -> m Double
getEventTouchY EventTouch
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Double) -> IO Double)
-> (Ptr EventTouch -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventTouchY :: MonadIO m => EventTouch -> Double -> m ()
setEventTouchY :: EventTouch -> Double -> m ()
setEventTouchY EventTouch
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventTouchYFieldInfo
instance AttrInfo EventTouchYFieldInfo where
type AttrBaseTypeConstraint EventTouchYFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchYFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchYFieldInfo = (~) Double
type AttrTransferTypeConstraint EventTouchYFieldInfo = (~)Double
type AttrTransferType EventTouchYFieldInfo = Double
type AttrGetType EventTouchYFieldInfo = Double
type AttrLabel EventTouchYFieldInfo = "y"
type AttrOrigin EventTouchYFieldInfo = EventTouch
attrGet = getEventTouchY
attrSet = setEventTouchY
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_y :: AttrLabelProxy "y"
eventTouch_y = AttrLabelProxy
#endif
getEventTouchAxes :: MonadIO m => EventTouch -> m Double
getEventTouchAxes :: EventTouch -> m Double
getEventTouchAxes EventTouch
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Double) -> IO Double)
-> (Ptr EventTouch -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventTouchAxes :: MonadIO m => EventTouch -> Double -> m ()
setEventTouchAxes :: EventTouch -> Double -> m ()
setEventTouchAxes EventTouch
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventTouchAxesFieldInfo
instance AttrInfo EventTouchAxesFieldInfo where
type AttrBaseTypeConstraint EventTouchAxesFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchAxesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchAxesFieldInfo = (~) Double
type AttrTransferTypeConstraint EventTouchAxesFieldInfo = (~)Double
type AttrTransferType EventTouchAxesFieldInfo = Double
type AttrGetType EventTouchAxesFieldInfo = Double
type AttrLabel EventTouchAxesFieldInfo = "axes"
type AttrOrigin EventTouchAxesFieldInfo = EventTouch
attrGet = getEventTouchAxes
attrSet = setEventTouchAxes
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_axes :: AttrLabelProxy "axes"
eventTouch_axes = AttrLabelProxy
#endif
getEventTouchState :: MonadIO m => EventTouch -> m [Gdk.Flags.ModifierType]
getEventTouchState :: EventTouch -> m [ModifierType]
getEventTouchState EventTouch
s = IO [ModifierType] -> m [ModifierType]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ModifierType] -> m [ModifierType])
-> IO [ModifierType] -> m [ModifierType]
forall a b. (a -> b) -> a -> b
$ EventTouch
-> (Ptr EventTouch -> IO [ModifierType]) -> IO [ModifierType]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO [ModifierType]) -> IO [ModifierType])
-> (Ptr EventTouch -> IO [ModifierType]) -> IO [ModifierType]
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) :: IO CUInt
let val' :: [ModifierType]
val' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
[ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
val'
setEventTouchState :: MonadIO m => EventTouch -> [Gdk.Flags.ModifierType] -> m ()
setEventTouchState :: EventTouch -> [ModifierType] -> m ()
setEventTouchState EventTouch
s [ModifierType]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CUInt
val' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data EventTouchStateFieldInfo
instance AttrInfo EventTouchStateFieldInfo where
type AttrBaseTypeConstraint EventTouchStateFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchStateFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchStateFieldInfo = (~) [Gdk.Flags.ModifierType]
type AttrTransferTypeConstraint EventTouchStateFieldInfo = (~)[Gdk.Flags.ModifierType]
type AttrTransferType EventTouchStateFieldInfo = [Gdk.Flags.ModifierType]
type AttrGetType EventTouchStateFieldInfo = [Gdk.Flags.ModifierType]
type AttrLabel EventTouchStateFieldInfo = "state"
type AttrOrigin EventTouchStateFieldInfo = EventTouch
attrGet = getEventTouchState
attrSet = setEventTouchState
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_state :: AttrLabelProxy "state"
eventTouch_state = AttrLabelProxy
#endif
getEventTouchSequence :: MonadIO m => EventTouch -> m (Maybe Gdk.EventSequence.EventSequence)
getEventTouchSequence :: EventTouch -> m (Maybe EventSequence)
getEventTouchSequence EventTouch
s = IO (Maybe EventSequence) -> m (Maybe EventSequence)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe EventSequence) -> m (Maybe EventSequence))
-> IO (Maybe EventSequence) -> m (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ EventTouch
-> (Ptr EventTouch -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence))
-> (Ptr EventTouch -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr EventSequence
val <- Ptr (Ptr EventSequence) -> IO (Ptr EventSequence)
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr EventSequence)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) :: IO (Ptr Gdk.EventSequence.EventSequence)
Maybe EventSequence
result <- Ptr EventSequence
-> (Ptr EventSequence -> IO EventSequence)
-> IO (Maybe EventSequence)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr EventSequence
val ((Ptr EventSequence -> IO EventSequence)
-> IO (Maybe EventSequence))
-> (Ptr EventSequence -> IO EventSequence)
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \Ptr EventSequence
val' -> do
EventSequence
val'' <- ((ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> IO EventSequence
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence) Ptr EventSequence
val'
EventSequence -> IO EventSequence
forall (m :: * -> *) a. Monad m => a -> m a
return EventSequence
val''
Maybe EventSequence -> IO (Maybe EventSequence)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
result
setEventTouchSequence :: MonadIO m => EventTouch -> Ptr Gdk.EventSequence.EventSequence -> m ()
setEventTouchSequence :: EventTouch -> Ptr EventSequence -> m ()
setEventTouchSequence EventTouch
s Ptr EventSequence
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr (Ptr EventSequence) -> Ptr EventSequence -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr EventSequence)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) (Ptr EventSequence
val :: Ptr Gdk.EventSequence.EventSequence)
clearEventTouchSequence :: MonadIO m => EventTouch -> m ()
clearEventTouchSequence :: EventTouch -> m ()
clearEventTouchSequence EventTouch
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr (Ptr EventSequence) -> Ptr EventSequence -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr EventSequence)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) (Ptr EventSequence
forall a. Ptr a
FP.nullPtr :: Ptr Gdk.EventSequence.EventSequence)
#if defined(ENABLE_OVERLOADING)
data EventTouchSequenceFieldInfo
instance AttrInfo EventTouchSequenceFieldInfo where
type AttrBaseTypeConstraint EventTouchSequenceFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchSequenceFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventTouchSequenceFieldInfo = (~) (Ptr Gdk.EventSequence.EventSequence)
type AttrTransferTypeConstraint EventTouchSequenceFieldInfo = (~)(Ptr Gdk.EventSequence.EventSequence)
type AttrTransferType EventTouchSequenceFieldInfo = (Ptr Gdk.EventSequence.EventSequence)
type AttrGetType EventTouchSequenceFieldInfo = Maybe Gdk.EventSequence.EventSequence
type AttrLabel EventTouchSequenceFieldInfo = "sequence"
type AttrOrigin EventTouchSequenceFieldInfo = EventTouch
attrGet = getEventTouchSequence
attrSet = setEventTouchSequence
attrConstruct = undefined
attrClear = clearEventTouchSequence
attrTransfer _ v = do
return v
eventTouch_sequence :: AttrLabelProxy "sequence"
eventTouch_sequence = AttrLabelProxy
#endif
getEventTouchEmulatingPointer :: MonadIO m => EventTouch -> m Bool
getEventTouchEmulatingPointer :: EventTouch -> m Bool
getEventTouchEmulatingPointer EventTouch
s = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Bool) -> IO Bool
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Bool) -> IO Bool)
-> (Ptr EventTouch -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) :: IO CInt
let val' :: Bool
val' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
val
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
val'
setEventTouchEmulatingPointer :: MonadIO m => EventTouch -> Bool -> m ()
setEventTouchEmulatingPointer :: EventTouch -> Bool -> m ()
setEventTouchEmulatingPointer EventTouch
s Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CInt
val' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
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
fromEnum) Bool
val
Ptr CInt -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data EventTouchEmulatingPointerFieldInfo
instance AttrInfo EventTouchEmulatingPointerFieldInfo where
type AttrBaseTypeConstraint EventTouchEmulatingPointerFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchEmulatingPointerFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchEmulatingPointerFieldInfo = (~) Bool
type AttrTransferTypeConstraint EventTouchEmulatingPointerFieldInfo = (~)Bool
type AttrTransferType EventTouchEmulatingPointerFieldInfo = Bool
type AttrGetType EventTouchEmulatingPointerFieldInfo = Bool
type AttrLabel EventTouchEmulatingPointerFieldInfo = "emulating_pointer"
type AttrOrigin EventTouchEmulatingPointerFieldInfo = EventTouch
attrGet = getEventTouchEmulatingPointer
attrSet = setEventTouchEmulatingPointer
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_emulatingPointer :: AttrLabelProxy "emulatingPointer"
eventTouch_emulatingPointer = AttrLabelProxy
#endif
getEventTouchDevice :: MonadIO m => EventTouch -> m (Maybe Gdk.Device.Device)
getEventTouchDevice :: EventTouch -> m (Maybe Device)
getEventTouchDevice EventTouch
s = IO (Maybe Device) -> m (Maybe Device)
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
$ EventTouch
-> (Ptr EventTouch -> IO (Maybe Device)) -> IO (Maybe Device)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO (Maybe Device)) -> IO (Maybe Device))
-> (Ptr EventTouch -> IO (Maybe Device)) -> IO (Maybe Device)
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr Device
val <- Ptr (Ptr Device) -> IO (Ptr Device)
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr Device)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72) :: IO (Ptr Gdk.Device.Device)
Maybe Device
result <- Ptr Device -> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Device
val ((Ptr Device -> IO Device) -> IO (Maybe Device))
-> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. (a -> b) -> a -> b
$ \Ptr Device
val' -> do
Device
val'' <- ((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
Gdk.Device.Device) Ptr Device
val'
Device -> IO Device
forall (m :: * -> *) a. Monad m => a -> m a
return Device
val''
Maybe Device -> IO (Maybe Device)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
result
setEventTouchDevice :: MonadIO m => EventTouch -> Ptr Gdk.Device.Device -> m ()
setEventTouchDevice :: EventTouch -> Ptr Device -> m ()
setEventTouchDevice EventTouch
s Ptr Device
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr (Ptr Device) -> Ptr Device -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr Device)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72) (Ptr Device
val :: Ptr Gdk.Device.Device)
clearEventTouchDevice :: MonadIO m => EventTouch -> m ()
clearEventTouchDevice :: EventTouch -> m ()
clearEventTouchDevice EventTouch
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
Ptr (Ptr Device) -> Ptr Device -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr (Ptr Device)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72) (Ptr Device
forall a. Ptr a
FP.nullPtr :: Ptr Gdk.Device.Device)
#if defined(ENABLE_OVERLOADING)
data EventTouchDeviceFieldInfo
instance AttrInfo EventTouchDeviceFieldInfo where
type AttrBaseTypeConstraint EventTouchDeviceFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchDeviceFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventTouchDeviceFieldInfo = (~) (Ptr Gdk.Device.Device)
type AttrTransferTypeConstraint EventTouchDeviceFieldInfo = (~)(Ptr Gdk.Device.Device)
type AttrTransferType EventTouchDeviceFieldInfo = (Ptr Gdk.Device.Device)
type AttrGetType EventTouchDeviceFieldInfo = Maybe Gdk.Device.Device
type AttrLabel EventTouchDeviceFieldInfo = "device"
type AttrOrigin EventTouchDeviceFieldInfo = EventTouch
attrGet = getEventTouchDevice
attrSet = setEventTouchDevice
attrConstruct = undefined
attrClear = clearEventTouchDevice
attrTransfer _ v = do
return v
eventTouch_device :: AttrLabelProxy "device"
eventTouch_device = AttrLabelProxy
#endif
getEventTouchXRoot :: MonadIO m => EventTouch -> m Double
getEventTouchXRoot :: EventTouch -> m Double
getEventTouchXRoot EventTouch
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Double) -> IO Double)
-> (Ptr EventTouch -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventTouchXRoot :: MonadIO m => EventTouch -> Double -> m ()
setEventTouchXRoot :: EventTouch -> Double -> m ()
setEventTouchXRoot EventTouch
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventTouchXRootFieldInfo
instance AttrInfo EventTouchXRootFieldInfo where
type AttrBaseTypeConstraint EventTouchXRootFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchXRootFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchXRootFieldInfo = (~) Double
type AttrTransferTypeConstraint EventTouchXRootFieldInfo = (~)Double
type AttrTransferType EventTouchXRootFieldInfo = Double
type AttrGetType EventTouchXRootFieldInfo = Double
type AttrLabel EventTouchXRootFieldInfo = "x_root"
type AttrOrigin EventTouchXRootFieldInfo = EventTouch
attrGet = getEventTouchXRoot
attrSet = setEventTouchXRoot
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_xRoot :: AttrLabelProxy "xRoot"
eventTouch_xRoot = AttrLabelProxy
#endif
getEventTouchYRoot :: MonadIO m => EventTouch -> m Double
getEventTouchYRoot :: EventTouch -> m Double
getEventTouchYRoot EventTouch
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO Double) -> IO Double)
-> (Ptr EventTouch -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventTouchYRoot :: MonadIO m => EventTouch -> Double -> m ()
setEventTouchYRoot :: EventTouch -> Double -> m ()
setEventTouchYRoot EventTouch
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventTouch -> (Ptr EventTouch -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventTouch
s ((Ptr EventTouch -> IO ()) -> IO ())
-> (Ptr EventTouch -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventTouch
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventTouch
ptr Ptr EventTouch -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventTouchYRootFieldInfo
instance AttrInfo EventTouchYRootFieldInfo where
type AttrBaseTypeConstraint EventTouchYRootFieldInfo = (~) EventTouch
type AttrAllowedOps EventTouchYRootFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTouchYRootFieldInfo = (~) Double
type AttrTransferTypeConstraint EventTouchYRootFieldInfo = (~)Double
type AttrTransferType EventTouchYRootFieldInfo = Double
type AttrGetType EventTouchYRootFieldInfo = Double
type AttrLabel EventTouchYRootFieldInfo = "y_root"
type AttrOrigin EventTouchYRootFieldInfo = EventTouch
attrGet = getEventTouchYRoot
attrSet = setEventTouchYRoot
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventTouch_yRoot :: AttrLabelProxy "yRoot"
eventTouch_yRoot = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EventTouch
type instance O.AttributeList EventTouch = EventTouchAttributeList
type EventTouchAttributeList = ('[ '("type", EventTouchTypeFieldInfo), '("window", EventTouchWindowFieldInfo), '("sendEvent", EventTouchSendEventFieldInfo), '("time", EventTouchTimeFieldInfo), '("x", EventTouchXFieldInfo), '("y", EventTouchYFieldInfo), '("axes", EventTouchAxesFieldInfo), '("state", EventTouchStateFieldInfo), '("sequence", EventTouchSequenceFieldInfo), '("emulatingPointer", EventTouchEmulatingPointerFieldInfo), '("device", EventTouchDeviceFieldInfo), '("xRoot", EventTouchXRootFieldInfo), '("yRoot", EventTouchYRootFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveEventTouchMethod (t :: Symbol) (o :: *) :: * where
ResolveEventTouchMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventTouchMethod t EventTouch, O.MethodInfo info EventTouch p) => OL.IsLabel t (EventTouch -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif