{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Unions.Event
(
Event(..) ,
newZeroEvent ,
#if defined(ENABLE_OVERLOADING)
ResolveEventMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
EventCopyMethodInfo ,
#endif
eventCopy ,
#if defined(ENABLE_OVERLOADING)
EventFreeMethodInfo ,
#endif
eventFree ,
eventGet ,
#if defined(ENABLE_OVERLOADING)
EventGetAxisMethodInfo ,
#endif
eventGetAxis ,
#if defined(ENABLE_OVERLOADING)
EventGetButtonMethodInfo ,
#endif
eventGetButton ,
#if defined(ENABLE_OVERLOADING)
EventGetClickCountMethodInfo ,
#endif
eventGetClickCount ,
#if defined(ENABLE_OVERLOADING)
EventGetCoordsMethodInfo ,
#endif
eventGetCoords ,
#if defined(ENABLE_OVERLOADING)
EventGetDeviceMethodInfo ,
#endif
eventGetDevice ,
#if defined(ENABLE_OVERLOADING)
EventGetDeviceToolMethodInfo ,
#endif
eventGetDeviceTool ,
#if defined(ENABLE_OVERLOADING)
EventGetEventSequenceMethodInfo ,
#endif
eventGetEventSequence ,
#if defined(ENABLE_OVERLOADING)
EventGetEventTypeMethodInfo ,
#endif
eventGetEventType ,
#if defined(ENABLE_OVERLOADING)
EventGetKeycodeMethodInfo ,
#endif
eventGetKeycode ,
#if defined(ENABLE_OVERLOADING)
EventGetKeyvalMethodInfo ,
#endif
eventGetKeyval ,
#if defined(ENABLE_OVERLOADING)
EventGetPointerEmulatedMethodInfo ,
#endif
eventGetPointerEmulated ,
#if defined(ENABLE_OVERLOADING)
EventGetRootCoordsMethodInfo ,
#endif
eventGetRootCoords ,
#if defined(ENABLE_OVERLOADING)
EventGetScancodeMethodInfo ,
#endif
eventGetScancode ,
#if defined(ENABLE_OVERLOADING)
EventGetScreenMethodInfo ,
#endif
eventGetScreen ,
#if defined(ENABLE_OVERLOADING)
EventGetScrollDeltasMethodInfo ,
#endif
eventGetScrollDeltas ,
#if defined(ENABLE_OVERLOADING)
EventGetScrollDirectionMethodInfo ,
#endif
eventGetScrollDirection ,
#if defined(ENABLE_OVERLOADING)
EventGetSeatMethodInfo ,
#endif
eventGetSeat ,
#if defined(ENABLE_OVERLOADING)
EventGetSourceDeviceMethodInfo ,
#endif
eventGetSourceDevice ,
#if defined(ENABLE_OVERLOADING)
EventGetStateMethodInfo ,
#endif
eventGetState ,
#if defined(ENABLE_OVERLOADING)
EventGetTimeMethodInfo ,
#endif
eventGetTime ,
#if defined(ENABLE_OVERLOADING)
EventGetWindowMethodInfo ,
#endif
eventGetWindow ,
eventHandlerSet ,
#if defined(ENABLE_OVERLOADING)
EventIsScrollStopEventMethodInfo ,
#endif
eventIsScrollStopEvent ,
eventNew ,
eventPeek ,
#if defined(ENABLE_OVERLOADING)
EventPutMethodInfo ,
#endif
eventPut ,
eventRequestMotions ,
#if defined(ENABLE_OVERLOADING)
EventSetDeviceMethodInfo ,
#endif
eventSetDevice ,
#if defined(ENABLE_OVERLOADING)
EventSetDeviceToolMethodInfo ,
#endif
eventSetDeviceTool ,
#if defined(ENABLE_OVERLOADING)
EventSetScreenMethodInfo ,
#endif
eventSetScreen ,
#if defined(ENABLE_OVERLOADING)
EventSetSourceDeviceMethodInfo ,
#endif
eventSetSourceDevice ,
#if defined(ENABLE_OVERLOADING)
EventTriggersContextMenuMethodInfo ,
#endif
eventTriggersContextMenu ,
#if defined(ENABLE_OVERLOADING)
event_any ,
#endif
getEventAny ,
#if defined(ENABLE_OVERLOADING)
event_button ,
#endif
getEventButton ,
#if defined(ENABLE_OVERLOADING)
event_configure ,
#endif
getEventConfigure ,
#if defined(ENABLE_OVERLOADING)
event_crossing ,
#endif
getEventCrossing ,
#if defined(ENABLE_OVERLOADING)
event_dnd ,
#endif
getEventDnd ,
#if defined(ENABLE_OVERLOADING)
event_expose ,
#endif
getEventExpose ,
#if defined(ENABLE_OVERLOADING)
event_focusChange ,
#endif
getEventFocusChange ,
#if defined(ENABLE_OVERLOADING)
event_grabBroken ,
#endif
getEventGrabBroken ,
#if defined(ENABLE_OVERLOADING)
event_key ,
#endif
getEventKey ,
#if defined(ENABLE_OVERLOADING)
event_motion ,
#endif
getEventMotion ,
#if defined(ENABLE_OVERLOADING)
event_ownerChange ,
#endif
getEventOwnerChange ,
#if defined(ENABLE_OVERLOADING)
event_padAxis ,
#endif
getEventPadAxis ,
#if defined(ENABLE_OVERLOADING)
event_padButton ,
#endif
getEventPadButton ,
#if defined(ENABLE_OVERLOADING)
event_padGroupMode ,
#endif
getEventPadGroupMode ,
#if defined(ENABLE_OVERLOADING)
event_property ,
#endif
getEventProperty ,
#if defined(ENABLE_OVERLOADING)
event_proximity ,
#endif
getEventProximity ,
#if defined(ENABLE_OVERLOADING)
event_scroll ,
#endif
getEventScroll ,
#if defined(ENABLE_OVERLOADING)
event_selection ,
#endif
getEventSelection ,
#if defined(ENABLE_OVERLOADING)
event_setting ,
#endif
getEventSetting ,
#if defined(ENABLE_OVERLOADING)
event_touch ,
#endif
getEventTouch ,
#if defined(ENABLE_OVERLOADING)
event_touchpadPinch ,
#endif
getEventTouchpadPinch ,
#if defined(ENABLE_OVERLOADING)
event_touchpadSwipe ,
#endif
getEventTouchpadSwipe ,
#if defined(ENABLE_OVERLOADING)
event_type ,
#endif
getEventType ,
setEventType ,
#if defined(ENABLE_OVERLOADING)
event_visibility ,
#endif
getEventVisibility ,
#if defined(ENABLE_OVERLOADING)
event_windowState ,
#endif
getEventWindowState ,
) 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 qualified GI.GLib.Callbacks as GLib.Callbacks
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.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.DeviceTool as Gdk.DeviceTool
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.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
newtype Event = Event (SP.ManagedPtr Event)
deriving (Event -> Event -> Bool
(Event -> Event -> Bool) -> (Event -> Event -> Bool) -> Eq Event
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Event -> Event -> Bool
$c/= :: Event -> Event -> Bool
== :: Event -> Event -> Bool
$c== :: Event -> Event -> Bool
Eq)
instance SP.ManagedPtrNewtype Event where
toManagedPtr :: Event -> ManagedPtr Event
toManagedPtr (Event ManagedPtr Event
p) = ManagedPtr Event
p
foreign import ccall "gdk_event_get_type" c_gdk_event_get_type ::
IO GType
type instance O.ParentTypes Event = '[]
instance O.HasParentTypes Event
instance B.Types.TypedObject Event where
glibType :: IO GType
glibType = IO GType
c_gdk_event_get_type
instance B.Types.GBoxed Event
instance B.GValue.IsGValue Event where
toGValue :: Event -> IO GValue
toGValue Event
o = do
GType
gtype <- IO GType
c_gdk_event_get_type
Event -> (Ptr Event -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Event
o (GType -> (GValue -> Ptr Event -> IO ()) -> Ptr Event -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Event -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO Event
fromGValue GValue
gv = do
Ptr Event
ptr <- GValue -> IO (Ptr Event)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr Event)
(ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Event -> Event
Event Ptr Event
ptr
newZeroEvent :: MonadIO m => m Event
newZeroEvent :: m Event
newZeroEvent = IO Event -> m Event
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Event -> m Event) -> IO Event -> m Event
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Event)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
96 IO (Ptr Event) -> (Ptr Event -> IO Event) -> IO Event
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Event
instance tag ~ 'AttrSet => Constructible Event tag where
new :: (ManagedPtr Event -> Event) -> [AttrOp Event tag] -> m Event
new ManagedPtr Event -> Event
_ [AttrOp Event tag]
attrs = do
Event
o <- m Event
forall (m :: * -> *). MonadIO m => m Event
newZeroEvent
Event -> [AttrOp Event 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Event
o [AttrOp Event tag]
[AttrOp Event 'AttrSet]
attrs
Event -> m Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
o
getEventType :: MonadIO m => Event -> m Gdk.Enums.EventType
getEventType :: Event -> m EventType
getEventType Event
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
$ Event -> (Ptr Event -> IO EventType) -> IO EventType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventType) -> IO EventType)
-> (Ptr Event -> IO EventType) -> IO EventType
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr Event
ptr Ptr Event -> 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'
setEventType :: MonadIO m => Event -> Gdk.Enums.EventType -> m ()
setEventType :: Event -> EventType -> m ()
setEventType Event
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
$ Event -> (Ptr Event -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO ()) -> IO ()) -> (Ptr Event -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Event
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 Event
ptr Ptr Event -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data EventTypeFieldInfo
instance AttrInfo EventTypeFieldInfo where
type AttrBaseTypeConstraint EventTypeFieldInfo = (~) Event
type AttrAllowedOps EventTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTypeFieldInfo = (~) Gdk.Enums.EventType
type AttrTransferTypeConstraint EventTypeFieldInfo = (~)Gdk.Enums.EventType
type AttrTransferType EventTypeFieldInfo = Gdk.Enums.EventType
type AttrGetType EventTypeFieldInfo = Gdk.Enums.EventType
type AttrLabel EventTypeFieldInfo = "type"
type AttrOrigin EventTypeFieldInfo = Event
attrGet = getEventType
attrSet = setEventType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
event_type :: AttrLabelProxy "type"
event_type = AttrLabelProxy
#endif
getEventAny :: MonadIO m => Event -> m Gdk.EventAny.EventAny
getEventAny :: Event -> m EventAny
getEventAny Event
s = IO EventAny -> m EventAny
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventAny -> m EventAny) -> IO EventAny -> m EventAny
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventAny) -> IO EventAny
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventAny) -> IO EventAny)
-> (Ptr Event -> IO EventAny) -> IO EventAny
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventAny
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventAny
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventAny.EventAny)
EventAny
val' <- ((ManagedPtr EventAny -> EventAny) -> Ptr EventAny -> IO EventAny
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventAny -> EventAny
Gdk.EventAny.EventAny) Ptr EventAny
val
EventAny -> IO EventAny
forall (m :: * -> *) a. Monad m => a -> m a
return EventAny
val'
#if defined(ENABLE_OVERLOADING)
data EventAnyFieldInfo
instance AttrInfo EventAnyFieldInfo where
type AttrBaseTypeConstraint EventAnyFieldInfo = (~) Event
type AttrAllowedOps EventAnyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventAnyFieldInfo = (~) (Ptr Gdk.EventAny.EventAny)
type AttrTransferTypeConstraint EventAnyFieldInfo = (~)(Ptr Gdk.EventAny.EventAny)
type AttrTransferType EventAnyFieldInfo = (Ptr Gdk.EventAny.EventAny)
type AttrGetType EventAnyFieldInfo = Gdk.EventAny.EventAny
type AttrLabel EventAnyFieldInfo = "any"
type AttrOrigin EventAnyFieldInfo = Event
attrGet = getEventAny
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_any :: AttrLabelProxy "any"
event_any = AttrLabelProxy
#endif
getEventExpose :: MonadIO m => Event -> m Gdk.EventExpose.EventExpose
getEventExpose :: Event -> m EventExpose
getEventExpose Event
s = IO EventExpose -> m EventExpose
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventExpose -> m EventExpose)
-> IO EventExpose -> m EventExpose
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventExpose) -> IO EventExpose
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventExpose) -> IO EventExpose)
-> (Ptr Event -> IO EventExpose) -> IO EventExpose
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventExpose
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventExpose
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventExpose.EventExpose)
EventExpose
val' <- ((ManagedPtr EventExpose -> EventExpose)
-> Ptr EventExpose -> IO EventExpose
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventExpose -> EventExpose
Gdk.EventExpose.EventExpose) Ptr EventExpose
val
EventExpose -> IO EventExpose
forall (m :: * -> *) a. Monad m => a -> m a
return EventExpose
val'
#if defined(ENABLE_OVERLOADING)
data EventExposeFieldInfo
instance AttrInfo EventExposeFieldInfo where
type AttrBaseTypeConstraint EventExposeFieldInfo = (~) Event
type AttrAllowedOps EventExposeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventExposeFieldInfo = (~) (Ptr Gdk.EventExpose.EventExpose)
type AttrTransferTypeConstraint EventExposeFieldInfo = (~)(Ptr Gdk.EventExpose.EventExpose)
type AttrTransferType EventExposeFieldInfo = (Ptr Gdk.EventExpose.EventExpose)
type AttrGetType EventExposeFieldInfo = Gdk.EventExpose.EventExpose
type AttrLabel EventExposeFieldInfo = "expose"
type AttrOrigin EventExposeFieldInfo = Event
attrGet = getEventExpose
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_expose :: AttrLabelProxy "expose"
event_expose = AttrLabelProxy
#endif
getEventVisibility :: MonadIO m => Event -> m Gdk.EventVisibility.EventVisibility
getEventVisibility :: Event -> m EventVisibility
getEventVisibility Event
s = IO EventVisibility -> m EventVisibility
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventVisibility -> m EventVisibility)
-> IO EventVisibility -> m EventVisibility
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventVisibility) -> IO EventVisibility
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventVisibility) -> IO EventVisibility)
-> (Ptr Event -> IO EventVisibility) -> IO EventVisibility
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventVisibility
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventVisibility
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventVisibility.EventVisibility)
EventVisibility
val' <- ((ManagedPtr EventVisibility -> EventVisibility)
-> Ptr EventVisibility -> IO EventVisibility
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventVisibility -> EventVisibility
Gdk.EventVisibility.EventVisibility) Ptr EventVisibility
val
EventVisibility -> IO EventVisibility
forall (m :: * -> *) a. Monad m => a -> m a
return EventVisibility
val'
#if defined(ENABLE_OVERLOADING)
data EventVisibilityFieldInfo
instance AttrInfo EventVisibilityFieldInfo where
type AttrBaseTypeConstraint EventVisibilityFieldInfo = (~) Event
type AttrAllowedOps EventVisibilityFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventVisibilityFieldInfo = (~) (Ptr Gdk.EventVisibility.EventVisibility)
type AttrTransferTypeConstraint EventVisibilityFieldInfo = (~)(Ptr Gdk.EventVisibility.EventVisibility)
type AttrTransferType EventVisibilityFieldInfo = (Ptr Gdk.EventVisibility.EventVisibility)
type AttrGetType EventVisibilityFieldInfo = Gdk.EventVisibility.EventVisibility
type AttrLabel EventVisibilityFieldInfo = "visibility"
type AttrOrigin EventVisibilityFieldInfo = Event
attrGet = getEventVisibility
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_visibility :: AttrLabelProxy "visibility"
event_visibility = AttrLabelProxy
#endif
getEventMotion :: MonadIO m => Event -> m Gdk.EventMotion.EventMotion
getEventMotion :: Event -> m EventMotion
getEventMotion Event
s = IO EventMotion -> m EventMotion
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventMotion -> m EventMotion)
-> IO EventMotion -> m EventMotion
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventMotion) -> IO EventMotion
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventMotion) -> IO EventMotion)
-> (Ptr Event -> IO EventMotion) -> IO EventMotion
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventMotion
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventMotion
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventMotion.EventMotion)
EventMotion
val' <- ((ManagedPtr EventMotion -> EventMotion)
-> Ptr EventMotion -> IO EventMotion
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventMotion -> EventMotion
Gdk.EventMotion.EventMotion) Ptr EventMotion
val
EventMotion -> IO EventMotion
forall (m :: * -> *) a. Monad m => a -> m a
return EventMotion
val'
#if defined(ENABLE_OVERLOADING)
data EventMotionFieldInfo
instance AttrInfo EventMotionFieldInfo where
type AttrBaseTypeConstraint EventMotionFieldInfo = (~) Event
type AttrAllowedOps EventMotionFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventMotionFieldInfo = (~) (Ptr Gdk.EventMotion.EventMotion)
type AttrTransferTypeConstraint EventMotionFieldInfo = (~)(Ptr Gdk.EventMotion.EventMotion)
type AttrTransferType EventMotionFieldInfo = (Ptr Gdk.EventMotion.EventMotion)
type AttrGetType EventMotionFieldInfo = Gdk.EventMotion.EventMotion
type AttrLabel EventMotionFieldInfo = "motion"
type AttrOrigin EventMotionFieldInfo = Event
attrGet = getEventMotion
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_motion :: AttrLabelProxy "motion"
event_motion = AttrLabelProxy
#endif
getEventButton :: MonadIO m => Event -> m Gdk.EventButton.EventButton
getEventButton :: Event -> m EventButton
getEventButton Event
s = IO EventButton -> m EventButton
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventButton -> m EventButton)
-> IO EventButton -> m EventButton
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventButton) -> IO EventButton
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventButton) -> IO EventButton)
-> (Ptr Event -> IO EventButton) -> IO EventButton
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventButton
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventButton
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventButton.EventButton)
EventButton
val' <- ((ManagedPtr EventButton -> EventButton)
-> Ptr EventButton -> IO EventButton
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventButton -> EventButton
Gdk.EventButton.EventButton) Ptr EventButton
val
EventButton -> IO EventButton
forall (m :: * -> *) a. Monad m => a -> m a
return EventButton
val'
#if defined(ENABLE_OVERLOADING)
data EventButtonFieldInfo
instance AttrInfo EventButtonFieldInfo where
type AttrBaseTypeConstraint EventButtonFieldInfo = (~) Event
type AttrAllowedOps EventButtonFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventButtonFieldInfo = (~) (Ptr Gdk.EventButton.EventButton)
type AttrTransferTypeConstraint EventButtonFieldInfo = (~)(Ptr Gdk.EventButton.EventButton)
type AttrTransferType EventButtonFieldInfo = (Ptr Gdk.EventButton.EventButton)
type AttrGetType EventButtonFieldInfo = Gdk.EventButton.EventButton
type AttrLabel EventButtonFieldInfo = "button"
type AttrOrigin EventButtonFieldInfo = Event
attrGet = getEventButton
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_button :: AttrLabelProxy "button"
event_button = AttrLabelProxy
#endif
getEventTouch :: MonadIO m => Event -> m Gdk.EventTouch.EventTouch
getEventTouch :: Event -> m EventTouch
getEventTouch Event
s = 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
$ Event -> (Ptr Event -> IO EventTouch) -> IO EventTouch
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventTouch) -> IO EventTouch)
-> (Ptr Event -> IO EventTouch) -> IO EventTouch
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventTouch
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventTouch
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventTouch.EventTouch)
EventTouch
val' <- ((ManagedPtr EventTouch -> EventTouch)
-> Ptr EventTouch -> IO EventTouch
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventTouch -> EventTouch
Gdk.EventTouch.EventTouch) Ptr EventTouch
val
EventTouch -> IO EventTouch
forall (m :: * -> *) a. Monad m => a -> m a
return EventTouch
val'
#if defined(ENABLE_OVERLOADING)
data EventTouchFieldInfo
instance AttrInfo EventTouchFieldInfo where
type AttrBaseTypeConstraint EventTouchFieldInfo = (~) Event
type AttrAllowedOps EventTouchFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventTouchFieldInfo = (~) (Ptr Gdk.EventTouch.EventTouch)
type AttrTransferTypeConstraint EventTouchFieldInfo = (~)(Ptr Gdk.EventTouch.EventTouch)
type AttrTransferType EventTouchFieldInfo = (Ptr Gdk.EventTouch.EventTouch)
type AttrGetType EventTouchFieldInfo = Gdk.EventTouch.EventTouch
type AttrLabel EventTouchFieldInfo = "touch"
type AttrOrigin EventTouchFieldInfo = Event
attrGet = getEventTouch
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_touch :: AttrLabelProxy "touch"
event_touch = AttrLabelProxy
#endif
getEventScroll :: MonadIO m => Event -> m Gdk.EventScroll.EventScroll
getEventScroll :: Event -> m EventScroll
getEventScroll Event
s = IO EventScroll -> m EventScroll
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventScroll -> m EventScroll)
-> IO EventScroll -> m EventScroll
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventScroll) -> IO EventScroll
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventScroll) -> IO EventScroll)
-> (Ptr Event -> IO EventScroll) -> IO EventScroll
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventScroll
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventScroll
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventScroll.EventScroll)
EventScroll
val' <- ((ManagedPtr EventScroll -> EventScroll)
-> Ptr EventScroll -> IO EventScroll
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventScroll -> EventScroll
Gdk.EventScroll.EventScroll) Ptr EventScroll
val
EventScroll -> IO EventScroll
forall (m :: * -> *) a. Monad m => a -> m a
return EventScroll
val'
#if defined(ENABLE_OVERLOADING)
data EventScrollFieldInfo
instance AttrInfo EventScrollFieldInfo where
type AttrBaseTypeConstraint EventScrollFieldInfo = (~) Event
type AttrAllowedOps EventScrollFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventScrollFieldInfo = (~) (Ptr Gdk.EventScroll.EventScroll)
type AttrTransferTypeConstraint EventScrollFieldInfo = (~)(Ptr Gdk.EventScroll.EventScroll)
type AttrTransferType EventScrollFieldInfo = (Ptr Gdk.EventScroll.EventScroll)
type AttrGetType EventScrollFieldInfo = Gdk.EventScroll.EventScroll
type AttrLabel EventScrollFieldInfo = "scroll"
type AttrOrigin EventScrollFieldInfo = Event
attrGet = getEventScroll
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_scroll :: AttrLabelProxy "scroll"
event_scroll = AttrLabelProxy
#endif
getEventKey :: MonadIO m => Event -> m Gdk.EventKey.EventKey
getEventKey :: Event -> m EventKey
getEventKey Event
s = IO EventKey -> m EventKey
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventKey -> m EventKey) -> IO EventKey -> m EventKey
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventKey) -> IO EventKey
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventKey) -> IO EventKey)
-> (Ptr Event -> IO EventKey) -> IO EventKey
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventKey
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventKey
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventKey.EventKey)
EventKey
val' <- ((ManagedPtr EventKey -> EventKey) -> Ptr EventKey -> IO EventKey
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventKey -> EventKey
Gdk.EventKey.EventKey) Ptr EventKey
val
EventKey -> IO EventKey
forall (m :: * -> *) a. Monad m => a -> m a
return EventKey
val'
#if defined(ENABLE_OVERLOADING)
data EventKeyFieldInfo
instance AttrInfo EventKeyFieldInfo where
type AttrBaseTypeConstraint EventKeyFieldInfo = (~) Event
type AttrAllowedOps EventKeyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventKeyFieldInfo = (~) (Ptr Gdk.EventKey.EventKey)
type AttrTransferTypeConstraint EventKeyFieldInfo = (~)(Ptr Gdk.EventKey.EventKey)
type AttrTransferType EventKeyFieldInfo = (Ptr Gdk.EventKey.EventKey)
type AttrGetType EventKeyFieldInfo = Gdk.EventKey.EventKey
type AttrLabel EventKeyFieldInfo = "key"
type AttrOrigin EventKeyFieldInfo = Event
attrGet = getEventKey
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_key :: AttrLabelProxy "key"
event_key = AttrLabelProxy
#endif
getEventCrossing :: MonadIO m => Event -> m Gdk.EventCrossing.EventCrossing
getEventCrossing :: Event -> m EventCrossing
getEventCrossing Event
s = IO EventCrossing -> m EventCrossing
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventCrossing -> m EventCrossing)
-> IO EventCrossing -> m EventCrossing
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventCrossing) -> IO EventCrossing
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventCrossing) -> IO EventCrossing)
-> (Ptr Event -> IO EventCrossing) -> IO EventCrossing
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventCrossing
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventCrossing
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventCrossing.EventCrossing)
EventCrossing
val' <- ((ManagedPtr EventCrossing -> EventCrossing)
-> Ptr EventCrossing -> IO EventCrossing
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventCrossing -> EventCrossing
Gdk.EventCrossing.EventCrossing) Ptr EventCrossing
val
EventCrossing -> IO EventCrossing
forall (m :: * -> *) a. Monad m => a -> m a
return EventCrossing
val'
#if defined(ENABLE_OVERLOADING)
data EventCrossingFieldInfo
instance AttrInfo EventCrossingFieldInfo where
type AttrBaseTypeConstraint EventCrossingFieldInfo = (~) Event
type AttrAllowedOps EventCrossingFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventCrossingFieldInfo = (~) (Ptr Gdk.EventCrossing.EventCrossing)
type AttrTransferTypeConstraint EventCrossingFieldInfo = (~)(Ptr Gdk.EventCrossing.EventCrossing)
type AttrTransferType EventCrossingFieldInfo = (Ptr Gdk.EventCrossing.EventCrossing)
type AttrGetType EventCrossingFieldInfo = Gdk.EventCrossing.EventCrossing
type AttrLabel EventCrossingFieldInfo = "crossing"
type AttrOrigin EventCrossingFieldInfo = Event
attrGet = getEventCrossing
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_crossing :: AttrLabelProxy "crossing"
event_crossing = AttrLabelProxy
#endif
getEventFocusChange :: MonadIO m => Event -> m Gdk.EventFocus.EventFocus
getEventFocusChange :: Event -> m EventFocus
getEventFocusChange Event
s = IO EventFocus -> m EventFocus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventFocus -> m EventFocus) -> IO EventFocus -> m EventFocus
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventFocus) -> IO EventFocus
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventFocus) -> IO EventFocus)
-> (Ptr Event -> IO EventFocus) -> IO EventFocus
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventFocus
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventFocus
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventFocus.EventFocus)
EventFocus
val' <- ((ManagedPtr EventFocus -> EventFocus)
-> Ptr EventFocus -> IO EventFocus
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventFocus -> EventFocus
Gdk.EventFocus.EventFocus) Ptr EventFocus
val
EventFocus -> IO EventFocus
forall (m :: * -> *) a. Monad m => a -> m a
return EventFocus
val'
#if defined(ENABLE_OVERLOADING)
data EventFocusChangeFieldInfo
instance AttrInfo EventFocusChangeFieldInfo where
type AttrBaseTypeConstraint EventFocusChangeFieldInfo = (~) Event
type AttrAllowedOps EventFocusChangeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventFocusChangeFieldInfo = (~) (Ptr Gdk.EventFocus.EventFocus)
type AttrTransferTypeConstraint EventFocusChangeFieldInfo = (~)(Ptr Gdk.EventFocus.EventFocus)
type AttrTransferType EventFocusChangeFieldInfo = (Ptr Gdk.EventFocus.EventFocus)
type AttrGetType EventFocusChangeFieldInfo = Gdk.EventFocus.EventFocus
type AttrLabel EventFocusChangeFieldInfo = "focus_change"
type AttrOrigin EventFocusChangeFieldInfo = Event
attrGet = getEventFocusChange
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_focusChange :: AttrLabelProxy "focusChange"
event_focusChange = AttrLabelProxy
#endif
getEventConfigure :: MonadIO m => Event -> m Gdk.EventConfigure.EventConfigure
getEventConfigure :: Event -> m EventConfigure
getEventConfigure Event
s = IO EventConfigure -> m EventConfigure
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventConfigure -> m EventConfigure)
-> IO EventConfigure -> m EventConfigure
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventConfigure) -> IO EventConfigure
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventConfigure) -> IO EventConfigure)
-> (Ptr Event -> IO EventConfigure) -> IO EventConfigure
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventConfigure
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventConfigure
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventConfigure.EventConfigure)
EventConfigure
val' <- ((ManagedPtr EventConfigure -> EventConfigure)
-> Ptr EventConfigure -> IO EventConfigure
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventConfigure -> EventConfigure
Gdk.EventConfigure.EventConfigure) Ptr EventConfigure
val
EventConfigure -> IO EventConfigure
forall (m :: * -> *) a. Monad m => a -> m a
return EventConfigure
val'
#if defined(ENABLE_OVERLOADING)
data EventConfigureFieldInfo
instance AttrInfo EventConfigureFieldInfo where
type AttrBaseTypeConstraint EventConfigureFieldInfo = (~) Event
type AttrAllowedOps EventConfigureFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventConfigureFieldInfo = (~) (Ptr Gdk.EventConfigure.EventConfigure)
type AttrTransferTypeConstraint EventConfigureFieldInfo = (~)(Ptr Gdk.EventConfigure.EventConfigure)
type AttrTransferType EventConfigureFieldInfo = (Ptr Gdk.EventConfigure.EventConfigure)
type AttrGetType EventConfigureFieldInfo = Gdk.EventConfigure.EventConfigure
type AttrLabel EventConfigureFieldInfo = "configure"
type AttrOrigin EventConfigureFieldInfo = Event
attrGet = getEventConfigure
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_configure :: AttrLabelProxy "configure"
event_configure = AttrLabelProxy
#endif
getEventProperty :: MonadIO m => Event -> m Gdk.EventProperty.EventProperty
getEventProperty :: Event -> m EventProperty
getEventProperty Event
s = IO EventProperty -> m EventProperty
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventProperty -> m EventProperty)
-> IO EventProperty -> m EventProperty
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventProperty) -> IO EventProperty
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventProperty) -> IO EventProperty)
-> (Ptr Event -> IO EventProperty) -> IO EventProperty
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventProperty
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventProperty
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventProperty.EventProperty)
EventProperty
val' <- ((ManagedPtr EventProperty -> EventProperty)
-> Ptr EventProperty -> IO EventProperty
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventProperty -> EventProperty
Gdk.EventProperty.EventProperty) Ptr EventProperty
val
EventProperty -> IO EventProperty
forall (m :: * -> *) a. Monad m => a -> m a
return EventProperty
val'
#if defined(ENABLE_OVERLOADING)
data EventPropertyFieldInfo
instance AttrInfo EventPropertyFieldInfo where
type AttrBaseTypeConstraint EventPropertyFieldInfo = (~) Event
type AttrAllowedOps EventPropertyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPropertyFieldInfo = (~) (Ptr Gdk.EventProperty.EventProperty)
type AttrTransferTypeConstraint EventPropertyFieldInfo = (~)(Ptr Gdk.EventProperty.EventProperty)
type AttrTransferType EventPropertyFieldInfo = (Ptr Gdk.EventProperty.EventProperty)
type AttrGetType EventPropertyFieldInfo = Gdk.EventProperty.EventProperty
type AttrLabel EventPropertyFieldInfo = "property"
type AttrOrigin EventPropertyFieldInfo = Event
attrGet = getEventProperty
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_property :: AttrLabelProxy "property"
event_property = AttrLabelProxy
#endif
getEventSelection :: MonadIO m => Event -> m Gdk.EventSelection.EventSelection
getEventSelection :: Event -> m EventSelection
getEventSelection Event
s = IO EventSelection -> m EventSelection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventSelection -> m EventSelection)
-> IO EventSelection -> m EventSelection
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventSelection) -> IO EventSelection
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventSelection) -> IO EventSelection)
-> (Ptr Event -> IO EventSelection) -> IO EventSelection
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventSelection
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventSelection
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventSelection.EventSelection)
EventSelection
val' <- ((ManagedPtr EventSelection -> EventSelection)
-> Ptr EventSelection -> IO EventSelection
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventSelection -> EventSelection
Gdk.EventSelection.EventSelection) Ptr EventSelection
val
EventSelection -> IO EventSelection
forall (m :: * -> *) a. Monad m => a -> m a
return EventSelection
val'
#if defined(ENABLE_OVERLOADING)
data EventSelectionFieldInfo
instance AttrInfo EventSelectionFieldInfo where
type AttrBaseTypeConstraint EventSelectionFieldInfo = (~) Event
type AttrAllowedOps EventSelectionFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSelectionFieldInfo = (~) (Ptr Gdk.EventSelection.EventSelection)
type AttrTransferTypeConstraint EventSelectionFieldInfo = (~)(Ptr Gdk.EventSelection.EventSelection)
type AttrTransferType EventSelectionFieldInfo = (Ptr Gdk.EventSelection.EventSelection)
type AttrGetType EventSelectionFieldInfo = Gdk.EventSelection.EventSelection
type AttrLabel EventSelectionFieldInfo = "selection"
type AttrOrigin EventSelectionFieldInfo = Event
attrGet = getEventSelection
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_selection :: AttrLabelProxy "selection"
event_selection = AttrLabelProxy
#endif
getEventOwnerChange :: MonadIO m => Event -> m Gdk.EventOwnerChange.EventOwnerChange
getEventOwnerChange :: Event -> m EventOwnerChange
getEventOwnerChange Event
s = IO EventOwnerChange -> m EventOwnerChange
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventOwnerChange -> m EventOwnerChange)
-> IO EventOwnerChange -> m EventOwnerChange
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventOwnerChange) -> IO EventOwnerChange
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventOwnerChange) -> IO EventOwnerChange)
-> (Ptr Event -> IO EventOwnerChange) -> IO EventOwnerChange
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventOwnerChange
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventOwnerChange
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventOwnerChange.EventOwnerChange)
EventOwnerChange
val' <- ((ManagedPtr EventOwnerChange -> EventOwnerChange)
-> Ptr EventOwnerChange -> IO EventOwnerChange
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventOwnerChange -> EventOwnerChange
Gdk.EventOwnerChange.EventOwnerChange) Ptr EventOwnerChange
val
EventOwnerChange -> IO EventOwnerChange
forall (m :: * -> *) a. Monad m => a -> m a
return EventOwnerChange
val'
#if defined(ENABLE_OVERLOADING)
data EventOwnerChangeFieldInfo
instance AttrInfo EventOwnerChangeFieldInfo where
type AttrBaseTypeConstraint EventOwnerChangeFieldInfo = (~) Event
type AttrAllowedOps EventOwnerChangeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventOwnerChangeFieldInfo = (~) (Ptr Gdk.EventOwnerChange.EventOwnerChange)
type AttrTransferTypeConstraint EventOwnerChangeFieldInfo = (~)(Ptr Gdk.EventOwnerChange.EventOwnerChange)
type AttrTransferType EventOwnerChangeFieldInfo = (Ptr Gdk.EventOwnerChange.EventOwnerChange)
type AttrGetType EventOwnerChangeFieldInfo = Gdk.EventOwnerChange.EventOwnerChange
type AttrLabel EventOwnerChangeFieldInfo = "owner_change"
type AttrOrigin EventOwnerChangeFieldInfo = Event
attrGet = getEventOwnerChange
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_ownerChange :: AttrLabelProxy "ownerChange"
event_ownerChange = AttrLabelProxy
#endif
getEventProximity :: MonadIO m => Event -> m Gdk.EventProximity.EventProximity
getEventProximity :: Event -> m EventProximity
getEventProximity Event
s = IO EventProximity -> m EventProximity
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventProximity -> m EventProximity)
-> IO EventProximity -> m EventProximity
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventProximity) -> IO EventProximity
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventProximity) -> IO EventProximity)
-> (Ptr Event -> IO EventProximity) -> IO EventProximity
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventProximity
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventProximity
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventProximity.EventProximity)
EventProximity
val' <- ((ManagedPtr EventProximity -> EventProximity)
-> Ptr EventProximity -> IO EventProximity
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventProximity -> EventProximity
Gdk.EventProximity.EventProximity) Ptr EventProximity
val
EventProximity -> IO EventProximity
forall (m :: * -> *) a. Monad m => a -> m a
return EventProximity
val'
#if defined(ENABLE_OVERLOADING)
data EventProximityFieldInfo
instance AttrInfo EventProximityFieldInfo where
type AttrBaseTypeConstraint EventProximityFieldInfo = (~) Event
type AttrAllowedOps EventProximityFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventProximityFieldInfo = (~) (Ptr Gdk.EventProximity.EventProximity)
type AttrTransferTypeConstraint EventProximityFieldInfo = (~)(Ptr Gdk.EventProximity.EventProximity)
type AttrTransferType EventProximityFieldInfo = (Ptr Gdk.EventProximity.EventProximity)
type AttrGetType EventProximityFieldInfo = Gdk.EventProximity.EventProximity
type AttrLabel EventProximityFieldInfo = "proximity"
type AttrOrigin EventProximityFieldInfo = Event
attrGet = getEventProximity
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_proximity :: AttrLabelProxy "proximity"
event_proximity = AttrLabelProxy
#endif
getEventDnd :: MonadIO m => Event -> m Gdk.EventDND.EventDND
getEventDnd :: Event -> m EventDND
getEventDnd Event
s = IO EventDND -> m EventDND
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventDND -> m EventDND) -> IO EventDND -> m EventDND
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventDND) -> IO EventDND
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventDND) -> IO EventDND)
-> (Ptr Event -> IO EventDND) -> IO EventDND
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventDND
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventDND
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventDND.EventDND)
EventDND
val' <- ((ManagedPtr EventDND -> EventDND) -> Ptr EventDND -> IO EventDND
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventDND -> EventDND
Gdk.EventDND.EventDND) Ptr EventDND
val
EventDND -> IO EventDND
forall (m :: * -> *) a. Monad m => a -> m a
return EventDND
val'
#if defined(ENABLE_OVERLOADING)
data EventDndFieldInfo
instance AttrInfo EventDndFieldInfo where
type AttrBaseTypeConstraint EventDndFieldInfo = (~) Event
type AttrAllowedOps EventDndFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventDndFieldInfo = (~) (Ptr Gdk.EventDND.EventDND)
type AttrTransferTypeConstraint EventDndFieldInfo = (~)(Ptr Gdk.EventDND.EventDND)
type AttrTransferType EventDndFieldInfo = (Ptr Gdk.EventDND.EventDND)
type AttrGetType EventDndFieldInfo = Gdk.EventDND.EventDND
type AttrLabel EventDndFieldInfo = "dnd"
type AttrOrigin EventDndFieldInfo = Event
attrGet = getEventDnd
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_dnd :: AttrLabelProxy "dnd"
event_dnd = AttrLabelProxy
#endif
getEventWindowState :: MonadIO m => Event -> m Gdk.EventWindowState.EventWindowState
getEventWindowState :: Event -> m EventWindowState
getEventWindowState Event
s = IO EventWindowState -> m EventWindowState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventWindowState -> m EventWindowState)
-> IO EventWindowState -> m EventWindowState
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventWindowState) -> IO EventWindowState
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventWindowState) -> IO EventWindowState)
-> (Ptr Event -> IO EventWindowState) -> IO EventWindowState
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventWindowState
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventWindowState
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventWindowState.EventWindowState)
EventWindowState
val' <- ((ManagedPtr EventWindowState -> EventWindowState)
-> Ptr EventWindowState -> IO EventWindowState
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventWindowState -> EventWindowState
Gdk.EventWindowState.EventWindowState) Ptr EventWindowState
val
EventWindowState -> IO EventWindowState
forall (m :: * -> *) a. Monad m => a -> m a
return EventWindowState
val'
#if defined(ENABLE_OVERLOADING)
data EventWindowStateFieldInfo
instance AttrInfo EventWindowStateFieldInfo where
type AttrBaseTypeConstraint EventWindowStateFieldInfo = (~) Event
type AttrAllowedOps EventWindowStateFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventWindowStateFieldInfo = (~) (Ptr Gdk.EventWindowState.EventWindowState)
type AttrTransferTypeConstraint EventWindowStateFieldInfo = (~)(Ptr Gdk.EventWindowState.EventWindowState)
type AttrTransferType EventWindowStateFieldInfo = (Ptr Gdk.EventWindowState.EventWindowState)
type AttrGetType EventWindowStateFieldInfo = Gdk.EventWindowState.EventWindowState
type AttrLabel EventWindowStateFieldInfo = "window_state"
type AttrOrigin EventWindowStateFieldInfo = Event
attrGet = getEventWindowState
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_windowState :: AttrLabelProxy "windowState"
event_windowState = AttrLabelProxy
#endif
getEventSetting :: MonadIO m => Event -> m Gdk.EventSetting.EventSetting
getEventSetting :: Event -> m EventSetting
getEventSetting Event
s = IO EventSetting -> m EventSetting
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventSetting -> m EventSetting)
-> IO EventSetting -> m EventSetting
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventSetting) -> IO EventSetting
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventSetting) -> IO EventSetting)
-> (Ptr Event -> IO EventSetting) -> IO EventSetting
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventSetting
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventSetting
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventSetting.EventSetting)
EventSetting
val' <- ((ManagedPtr EventSetting -> EventSetting)
-> Ptr EventSetting -> IO EventSetting
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventSetting -> EventSetting
Gdk.EventSetting.EventSetting) Ptr EventSetting
val
EventSetting -> IO EventSetting
forall (m :: * -> *) a. Monad m => a -> m a
return EventSetting
val'
#if defined(ENABLE_OVERLOADING)
data EventSettingFieldInfo
instance AttrInfo EventSettingFieldInfo where
type AttrBaseTypeConstraint EventSettingFieldInfo = (~) Event
type AttrAllowedOps EventSettingFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSettingFieldInfo = (~) (Ptr Gdk.EventSetting.EventSetting)
type AttrTransferTypeConstraint EventSettingFieldInfo = (~)(Ptr Gdk.EventSetting.EventSetting)
type AttrTransferType EventSettingFieldInfo = (Ptr Gdk.EventSetting.EventSetting)
type AttrGetType EventSettingFieldInfo = Gdk.EventSetting.EventSetting
type AttrLabel EventSettingFieldInfo = "setting"
type AttrOrigin EventSettingFieldInfo = Event
attrGet = getEventSetting
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_setting :: AttrLabelProxy "setting"
event_setting = AttrLabelProxy
#endif
getEventGrabBroken :: MonadIO m => Event -> m Gdk.EventGrabBroken.EventGrabBroken
getEventGrabBroken :: Event -> m EventGrabBroken
getEventGrabBroken Event
s = IO EventGrabBroken -> m EventGrabBroken
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventGrabBroken -> m EventGrabBroken)
-> IO EventGrabBroken -> m EventGrabBroken
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventGrabBroken) -> IO EventGrabBroken
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventGrabBroken) -> IO EventGrabBroken)
-> (Ptr Event -> IO EventGrabBroken) -> IO EventGrabBroken
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventGrabBroken
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventGrabBroken
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventGrabBroken.EventGrabBroken)
EventGrabBroken
val' <- ((ManagedPtr EventGrabBroken -> EventGrabBroken)
-> Ptr EventGrabBroken -> IO EventGrabBroken
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventGrabBroken -> EventGrabBroken
Gdk.EventGrabBroken.EventGrabBroken) Ptr EventGrabBroken
val
EventGrabBroken -> IO EventGrabBroken
forall (m :: * -> *) a. Monad m => a -> m a
return EventGrabBroken
val'
#if defined(ENABLE_OVERLOADING)
data EventGrabBrokenFieldInfo
instance AttrInfo EventGrabBrokenFieldInfo where
type AttrBaseTypeConstraint EventGrabBrokenFieldInfo = (~) Event
type AttrAllowedOps EventGrabBrokenFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventGrabBrokenFieldInfo = (~) (Ptr Gdk.EventGrabBroken.EventGrabBroken)
type AttrTransferTypeConstraint EventGrabBrokenFieldInfo = (~)(Ptr Gdk.EventGrabBroken.EventGrabBroken)
type AttrTransferType EventGrabBrokenFieldInfo = (Ptr Gdk.EventGrabBroken.EventGrabBroken)
type AttrGetType EventGrabBrokenFieldInfo = Gdk.EventGrabBroken.EventGrabBroken
type AttrLabel EventGrabBrokenFieldInfo = "grab_broken"
type AttrOrigin EventGrabBrokenFieldInfo = Event
attrGet = getEventGrabBroken
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_grabBroken :: AttrLabelProxy "grabBroken"
event_grabBroken = AttrLabelProxy
#endif
getEventTouchpadSwipe :: MonadIO m => Event -> m Gdk.EventTouchpadSwipe.EventTouchpadSwipe
getEventTouchpadSwipe :: Event -> m EventTouchpadSwipe
getEventTouchpadSwipe Event
s = IO EventTouchpadSwipe -> m EventTouchpadSwipe
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventTouchpadSwipe -> m EventTouchpadSwipe)
-> IO EventTouchpadSwipe -> m EventTouchpadSwipe
forall a b. (a -> b) -> a -> b
$ Event
-> (Ptr Event -> IO EventTouchpadSwipe) -> IO EventTouchpadSwipe
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventTouchpadSwipe) -> IO EventTouchpadSwipe)
-> (Ptr Event -> IO EventTouchpadSwipe) -> IO EventTouchpadSwipe
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventTouchpadSwipe
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventTouchpadSwipe
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventTouchpadSwipe.EventTouchpadSwipe)
EventTouchpadSwipe
val' <- ((ManagedPtr EventTouchpadSwipe -> EventTouchpadSwipe)
-> Ptr EventTouchpadSwipe -> IO EventTouchpadSwipe
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventTouchpadSwipe -> EventTouchpadSwipe
Gdk.EventTouchpadSwipe.EventTouchpadSwipe) Ptr EventTouchpadSwipe
val
EventTouchpadSwipe -> IO EventTouchpadSwipe
forall (m :: * -> *) a. Monad m => a -> m a
return EventTouchpadSwipe
val'
#if defined(ENABLE_OVERLOADING)
data EventTouchpadSwipeFieldInfo
instance AttrInfo EventTouchpadSwipeFieldInfo where
type AttrBaseTypeConstraint EventTouchpadSwipeFieldInfo = (~) Event
type AttrAllowedOps EventTouchpadSwipeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventTouchpadSwipeFieldInfo = (~) (Ptr Gdk.EventTouchpadSwipe.EventTouchpadSwipe)
type AttrTransferTypeConstraint EventTouchpadSwipeFieldInfo = (~)(Ptr Gdk.EventTouchpadSwipe.EventTouchpadSwipe)
type AttrTransferType EventTouchpadSwipeFieldInfo = (Ptr Gdk.EventTouchpadSwipe.EventTouchpadSwipe)
type AttrGetType EventTouchpadSwipeFieldInfo = Gdk.EventTouchpadSwipe.EventTouchpadSwipe
type AttrLabel EventTouchpadSwipeFieldInfo = "touchpad_swipe"
type AttrOrigin EventTouchpadSwipeFieldInfo = Event
attrGet = getEventTouchpadSwipe
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_touchpadSwipe :: AttrLabelProxy "touchpadSwipe"
event_touchpadSwipe = AttrLabelProxy
#endif
getEventTouchpadPinch :: MonadIO m => Event -> m Gdk.EventTouchpadPinch.EventTouchpadPinch
getEventTouchpadPinch :: Event -> m EventTouchpadPinch
getEventTouchpadPinch Event
s = IO EventTouchpadPinch -> m EventTouchpadPinch
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventTouchpadPinch -> m EventTouchpadPinch)
-> IO EventTouchpadPinch -> m EventTouchpadPinch
forall a b. (a -> b) -> a -> b
$ Event
-> (Ptr Event -> IO EventTouchpadPinch) -> IO EventTouchpadPinch
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventTouchpadPinch) -> IO EventTouchpadPinch)
-> (Ptr Event -> IO EventTouchpadPinch) -> IO EventTouchpadPinch
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventTouchpadPinch
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventTouchpadPinch
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventTouchpadPinch.EventTouchpadPinch)
EventTouchpadPinch
val' <- ((ManagedPtr EventTouchpadPinch -> EventTouchpadPinch)
-> Ptr EventTouchpadPinch -> IO EventTouchpadPinch
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventTouchpadPinch -> EventTouchpadPinch
Gdk.EventTouchpadPinch.EventTouchpadPinch) Ptr EventTouchpadPinch
val
EventTouchpadPinch -> IO EventTouchpadPinch
forall (m :: * -> *) a. Monad m => a -> m a
return EventTouchpadPinch
val'
#if defined(ENABLE_OVERLOADING)
data EventTouchpadPinchFieldInfo
instance AttrInfo EventTouchpadPinchFieldInfo where
type AttrBaseTypeConstraint EventTouchpadPinchFieldInfo = (~) Event
type AttrAllowedOps EventTouchpadPinchFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventTouchpadPinchFieldInfo = (~) (Ptr Gdk.EventTouchpadPinch.EventTouchpadPinch)
type AttrTransferTypeConstraint EventTouchpadPinchFieldInfo = (~)(Ptr Gdk.EventTouchpadPinch.EventTouchpadPinch)
type AttrTransferType EventTouchpadPinchFieldInfo = (Ptr Gdk.EventTouchpadPinch.EventTouchpadPinch)
type AttrGetType EventTouchpadPinchFieldInfo = Gdk.EventTouchpadPinch.EventTouchpadPinch
type AttrLabel EventTouchpadPinchFieldInfo = "touchpad_pinch"
type AttrOrigin EventTouchpadPinchFieldInfo = Event
attrGet = getEventTouchpadPinch
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_touchpadPinch :: AttrLabelProxy "touchpadPinch"
event_touchpadPinch = AttrLabelProxy
#endif
getEventPadButton :: MonadIO m => Event -> m Gdk.EventPadButton.EventPadButton
getEventPadButton :: Event -> m EventPadButton
getEventPadButton Event
s = IO EventPadButton -> m EventPadButton
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventPadButton -> m EventPadButton)
-> IO EventPadButton -> m EventPadButton
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventPadButton) -> IO EventPadButton
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventPadButton) -> IO EventPadButton)
-> (Ptr Event -> IO EventPadButton) -> IO EventPadButton
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventPadButton
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventPadButton
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventPadButton.EventPadButton)
EventPadButton
val' <- ((ManagedPtr EventPadButton -> EventPadButton)
-> Ptr EventPadButton -> IO EventPadButton
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventPadButton -> EventPadButton
Gdk.EventPadButton.EventPadButton) Ptr EventPadButton
val
EventPadButton -> IO EventPadButton
forall (m :: * -> *) a. Monad m => a -> m a
return EventPadButton
val'
#if defined(ENABLE_OVERLOADING)
data EventPadButtonFieldInfo
instance AttrInfo EventPadButtonFieldInfo where
type AttrBaseTypeConstraint EventPadButtonFieldInfo = (~) Event
type AttrAllowedOps EventPadButtonFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPadButtonFieldInfo = (~) (Ptr Gdk.EventPadButton.EventPadButton)
type AttrTransferTypeConstraint EventPadButtonFieldInfo = (~)(Ptr Gdk.EventPadButton.EventPadButton)
type AttrTransferType EventPadButtonFieldInfo = (Ptr Gdk.EventPadButton.EventPadButton)
type AttrGetType EventPadButtonFieldInfo = Gdk.EventPadButton.EventPadButton
type AttrLabel EventPadButtonFieldInfo = "pad_button"
type AttrOrigin EventPadButtonFieldInfo = Event
attrGet = getEventPadButton
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_padButton :: AttrLabelProxy "padButton"
event_padButton = AttrLabelProxy
#endif
getEventPadAxis :: MonadIO m => Event -> m Gdk.EventPadAxis.EventPadAxis
getEventPadAxis :: Event -> m EventPadAxis
getEventPadAxis Event
s = IO EventPadAxis -> m EventPadAxis
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventPadAxis -> m EventPadAxis)
-> IO EventPadAxis -> m EventPadAxis
forall a b. (a -> b) -> a -> b
$ Event -> (Ptr Event -> IO EventPadAxis) -> IO EventPadAxis
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventPadAxis) -> IO EventPadAxis)
-> (Ptr Event -> IO EventPadAxis) -> IO EventPadAxis
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventPadAxis
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventPadAxis
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventPadAxis.EventPadAxis)
EventPadAxis
val' <- ((ManagedPtr EventPadAxis -> EventPadAxis)
-> Ptr EventPadAxis -> IO EventPadAxis
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventPadAxis -> EventPadAxis
Gdk.EventPadAxis.EventPadAxis) Ptr EventPadAxis
val
EventPadAxis -> IO EventPadAxis
forall (m :: * -> *) a. Monad m => a -> m a
return EventPadAxis
val'
#if defined(ENABLE_OVERLOADING)
data EventPadAxisFieldInfo
instance AttrInfo EventPadAxisFieldInfo where
type AttrBaseTypeConstraint EventPadAxisFieldInfo = (~) Event
type AttrAllowedOps EventPadAxisFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPadAxisFieldInfo = (~) (Ptr Gdk.EventPadAxis.EventPadAxis)
type AttrTransferTypeConstraint EventPadAxisFieldInfo = (~)(Ptr Gdk.EventPadAxis.EventPadAxis)
type AttrTransferType EventPadAxisFieldInfo = (Ptr Gdk.EventPadAxis.EventPadAxis)
type AttrGetType EventPadAxisFieldInfo = Gdk.EventPadAxis.EventPadAxis
type AttrLabel EventPadAxisFieldInfo = "pad_axis"
type AttrOrigin EventPadAxisFieldInfo = Event
attrGet = getEventPadAxis
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_padAxis :: AttrLabelProxy "padAxis"
event_padAxis = AttrLabelProxy
#endif
getEventPadGroupMode :: MonadIO m => Event -> m Gdk.EventPadGroupMode.EventPadGroupMode
getEventPadGroupMode :: Event -> m EventPadGroupMode
getEventPadGroupMode Event
s = IO EventPadGroupMode -> m EventPadGroupMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventPadGroupMode -> m EventPadGroupMode)
-> IO EventPadGroupMode -> m EventPadGroupMode
forall a b. (a -> b) -> a -> b
$ Event
-> (Ptr Event -> IO EventPadGroupMode) -> IO EventPadGroupMode
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Event
s ((Ptr Event -> IO EventPadGroupMode) -> IO EventPadGroupMode)
-> (Ptr Event -> IO EventPadGroupMode) -> IO EventPadGroupMode
forall a b. (a -> b) -> a -> b
$ \Ptr Event
ptr -> do
let val :: Ptr EventPadGroupMode
val = Ptr Event
ptr Ptr Event -> Int -> Ptr EventPadGroupMode
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gdk.EventPadGroupMode.EventPadGroupMode)
EventPadGroupMode
val' <- ((ManagedPtr EventPadGroupMode -> EventPadGroupMode)
-> Ptr EventPadGroupMode -> IO EventPadGroupMode
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventPadGroupMode -> EventPadGroupMode
Gdk.EventPadGroupMode.EventPadGroupMode) Ptr EventPadGroupMode
val
EventPadGroupMode -> IO EventPadGroupMode
forall (m :: * -> *) a. Monad m => a -> m a
return EventPadGroupMode
val'
#if defined(ENABLE_OVERLOADING)
data EventPadGroupModeFieldInfo
instance AttrInfo EventPadGroupModeFieldInfo where
type AttrBaseTypeConstraint EventPadGroupModeFieldInfo = (~) Event
type AttrAllowedOps EventPadGroupModeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeFieldInfo = (~) (Ptr Gdk.EventPadGroupMode.EventPadGroupMode)
type AttrTransferTypeConstraint EventPadGroupModeFieldInfo = (~)(Ptr Gdk.EventPadGroupMode.EventPadGroupMode)
type AttrTransferType EventPadGroupModeFieldInfo = (Ptr Gdk.EventPadGroupMode.EventPadGroupMode)
type AttrGetType EventPadGroupModeFieldInfo = Gdk.EventPadGroupMode.EventPadGroupMode
type AttrLabel EventPadGroupModeFieldInfo = "pad_group_mode"
type AttrOrigin EventPadGroupModeFieldInfo = Event
attrGet = getEventPadGroupMode
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
event_padGroupMode :: AttrLabelProxy "padGroupMode"
event_padGroupMode = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Event
type instance O.AttributeList Event = EventAttributeList
type EventAttributeList = ('[ '("type", EventTypeFieldInfo), '("any", EventAnyFieldInfo), '("expose", EventExposeFieldInfo), '("visibility", EventVisibilityFieldInfo), '("motion", EventMotionFieldInfo), '("button", EventButtonFieldInfo), '("touch", EventTouchFieldInfo), '("scroll", EventScrollFieldInfo), '("key", EventKeyFieldInfo), '("crossing", EventCrossingFieldInfo), '("focusChange", EventFocusChangeFieldInfo), '("configure", EventConfigureFieldInfo), '("property", EventPropertyFieldInfo), '("selection", EventSelectionFieldInfo), '("ownerChange", EventOwnerChangeFieldInfo), '("proximity", EventProximityFieldInfo), '("dnd", EventDndFieldInfo), '("windowState", EventWindowStateFieldInfo), '("setting", EventSettingFieldInfo), '("grabBroken", EventGrabBrokenFieldInfo), '("touchpadSwipe", EventTouchpadSwipeFieldInfo), '("touchpadPinch", EventTouchpadPinchFieldInfo), '("padButton", EventPadButtonFieldInfo), '("padAxis", EventPadAxisFieldInfo), '("padGroupMode", EventPadGroupModeFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_event_new" gdk_event_new ::
CInt ->
IO (Ptr Event)
eventNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gdk.Enums.EventType
-> m Event
eventNew :: EventType -> m Event
eventNew EventType
type_ = IO Event -> m Event
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Event -> m Event) -> IO Event -> m Event
forall a b. (a -> b) -> a -> b
$ do
let type_' :: CInt
type_' = (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
type_
Ptr Event
result <- CInt -> IO (Ptr Event)
gdk_event_new CInt
type_'
Text -> Ptr Event -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventNew" Ptr Event
result
Event
result' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Event) Ptr Event
result
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_event_copy" gdk_event_copy ::
Ptr Event ->
IO (Ptr Event)
eventCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Event
eventCopy :: Event -> m Event
eventCopy Event
event = IO Event -> m Event
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Event -> m Event) -> IO Event -> m Event
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Event
result <- Ptr Event -> IO (Ptr Event)
gdk_event_copy Ptr Event
event'
Text -> Ptr Event -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventCopy" Ptr Event
result
Event
result' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Event) Ptr Event
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result'
#if defined(ENABLE_OVERLOADING)
data EventCopyMethodInfo
instance (signature ~ (m Event), MonadIO m) => O.MethodInfo EventCopyMethodInfo Event signature where
overloadedMethod = eventCopy
#endif
foreign import ccall "gdk_event_free" gdk_event_free ::
Ptr Event ->
IO ()
eventFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ()
eventFree :: Event -> m ()
eventFree Event
event = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Event -> IO ()
gdk_event_free Ptr Event
event'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo EventFreeMethodInfo Event signature where
overloadedMethod = eventFree
#endif
foreign import ccall "gdk_event_get_axis" gdk_event_get_axis ::
Ptr Event ->
CUInt ->
Ptr CDouble ->
IO CInt
eventGetAxis ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> Gdk.Enums.AxisUse
-> m ((Bool, Double))
eventGetAxis :: Event -> AxisUse -> m (Bool, Double)
eventGetAxis Event
event AxisUse
axisUse = IO (Bool, Double) -> m (Bool, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double) -> m (Bool, Double))
-> IO (Bool, Double) -> m (Bool, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
let axisUse' :: CUInt
axisUse' = (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
axisUse
Ptr CDouble
value <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Event -> CUInt -> Ptr CDouble -> IO CInt
gdk_event_get_axis Ptr Event
event' CUInt
axisUse' Ptr CDouble
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
value' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
value
let value'' :: Double
value'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
value'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
value
(Bool, Double) -> IO (Bool, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
value'')
#if defined(ENABLE_OVERLOADING)
data EventGetAxisMethodInfo
instance (signature ~ (Gdk.Enums.AxisUse -> m ((Bool, Double))), MonadIO m) => O.MethodInfo EventGetAxisMethodInfo Event signature where
overloadedMethod = eventGetAxis
#endif
foreign import ccall "gdk_event_get_button" gdk_event_get_button ::
Ptr Event ->
Ptr Word32 ->
IO CInt
eventGetButton ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Word32))
eventGetButton :: Event -> m (Bool, Word32)
eventGetButton Event
event = IO (Bool, Word32) -> m (Bool, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32) -> m (Bool, Word32))
-> IO (Bool, Word32) -> m (Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Word32
button <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Event -> Ptr Word32 -> IO CInt
gdk_event_get_button Ptr Event
event' Ptr Word32
button
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
button' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
button
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
button
(Bool, Word32) -> IO (Bool, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
button')
#if defined(ENABLE_OVERLOADING)
data EventGetButtonMethodInfo
instance (signature ~ (m ((Bool, Word32))), MonadIO m) => O.MethodInfo EventGetButtonMethodInfo Event signature where
overloadedMethod = eventGetButton
#endif
foreign import ccall "gdk_event_get_click_count" gdk_event_get_click_count ::
Ptr Event ->
Ptr Word32 ->
IO CInt
eventGetClickCount ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Word32))
eventGetClickCount :: Event -> m (Bool, Word32)
eventGetClickCount Event
event = IO (Bool, Word32) -> m (Bool, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32) -> m (Bool, Word32))
-> IO (Bool, Word32) -> m (Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Word32
clickCount <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Event -> Ptr Word32 -> IO CInt
gdk_event_get_click_count Ptr Event
event' Ptr Word32
clickCount
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
clickCount' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
clickCount
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
clickCount
(Bool, Word32) -> IO (Bool, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
clickCount')
#if defined(ENABLE_OVERLOADING)
data EventGetClickCountMethodInfo
instance (signature ~ (m ((Bool, Word32))), MonadIO m) => O.MethodInfo EventGetClickCountMethodInfo Event signature where
overloadedMethod = eventGetClickCount
#endif
foreign import ccall "gdk_event_get_coords" gdk_event_get_coords ::
Ptr Event ->
Ptr CDouble ->
Ptr CDouble ->
IO CInt
eventGetCoords ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Double, Double))
eventGetCoords :: Event -> m (Bool, Double, Double)
eventGetCoords Event
event = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CDouble
xWin <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
yWin <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Event -> Ptr CDouble -> Ptr CDouble -> IO CInt
gdk_event_get_coords Ptr Event
event' Ptr CDouble
xWin Ptr CDouble
yWin
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
xWin' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
xWin
let xWin'' :: Double
xWin'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
xWin'
CDouble
yWin' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
yWin
let yWin'' :: Double
yWin'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
yWin'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
xWin
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
yWin
(Bool, Double, Double) -> IO (Bool, Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
xWin'', Double
yWin'')
#if defined(ENABLE_OVERLOADING)
data EventGetCoordsMethodInfo
instance (signature ~ (m ((Bool, Double, Double))), MonadIO m) => O.MethodInfo EventGetCoordsMethodInfo Event signature where
overloadedMethod = eventGetCoords
#endif
foreign import ccall "gdk_event_get_device" gdk_event_get_device ::
Ptr Event ->
IO (Ptr Gdk.Device.Device)
eventGetDevice ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m (Maybe Gdk.Device.Device)
eventGetDevice :: Event -> m (Maybe Device)
eventGetDevice Event
event = 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
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Device
result <- Ptr Event -> IO (Ptr Device)
gdk_event_get_device Ptr Event
event'
Maybe Device
maybeResult <- Ptr Device -> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Device
result ((Ptr Device -> IO Device) -> IO (Maybe Device))
-> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. (a -> b) -> a -> b
$ \Ptr Device
result' -> do
Device
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
Gdk.Device.Device) Ptr Device
result'
Device -> IO Device
forall (m :: * -> *) a. Monad m => a -> m a
return Device
result''
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Maybe Device -> IO (Maybe Device)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
maybeResult
#if defined(ENABLE_OVERLOADING)
data EventGetDeviceMethodInfo
instance (signature ~ (m (Maybe Gdk.Device.Device)), MonadIO m) => O.MethodInfo EventGetDeviceMethodInfo Event signature where
overloadedMethod = eventGetDevice
#endif
foreign import ccall "gdk_event_get_device_tool" gdk_event_get_device_tool ::
Ptr Event ->
IO (Ptr Gdk.DeviceTool.DeviceTool)
eventGetDeviceTool ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Gdk.DeviceTool.DeviceTool
eventGetDeviceTool :: Event -> m DeviceTool
eventGetDeviceTool Event
event = IO DeviceTool -> m DeviceTool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceTool -> m DeviceTool) -> IO DeviceTool -> m DeviceTool
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr DeviceTool
result <- Ptr Event -> IO (Ptr DeviceTool)
gdk_event_get_device_tool Ptr Event
event'
Text -> Ptr DeviceTool -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventGetDeviceTool" Ptr DeviceTool
result
DeviceTool
result' <- ((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
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
DeviceTool -> IO DeviceTool
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceTool
result'
#if defined(ENABLE_OVERLOADING)
data EventGetDeviceToolMethodInfo
instance (signature ~ (m Gdk.DeviceTool.DeviceTool), MonadIO m) => O.MethodInfo EventGetDeviceToolMethodInfo Event signature where
overloadedMethod = eventGetDeviceTool
#endif
foreign import ccall "gdk_event_get_event_sequence" gdk_event_get_event_sequence ::
Ptr Event ->
IO (Ptr Gdk.EventSequence.EventSequence)
eventGetEventSequence ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Gdk.EventSequence.EventSequence
eventGetEventSequence :: Event -> m EventSequence
eventGetEventSequence Event
event = IO EventSequence -> m EventSequence
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventSequence -> m EventSequence)
-> IO EventSequence -> m EventSequence
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr EventSequence
result <- Ptr Event -> IO (Ptr EventSequence)
gdk_event_get_event_sequence Ptr Event
event'
Text -> Ptr EventSequence -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventGetEventSequence" Ptr EventSequence
result
EventSequence
result' <- ((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
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
EventSequence -> IO EventSequence
forall (m :: * -> *) a. Monad m => a -> m a
return EventSequence
result'
#if defined(ENABLE_OVERLOADING)
data EventGetEventSequenceMethodInfo
instance (signature ~ (m Gdk.EventSequence.EventSequence), MonadIO m) => O.MethodInfo EventGetEventSequenceMethodInfo Event signature where
overloadedMethod = eventGetEventSequence
#endif
foreign import ccall "gdk_event_get_event_type" gdk_event_get_event_type ::
Ptr Event ->
IO CInt
eventGetEventType ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Gdk.Enums.EventType
eventGetEventType :: Event -> m EventType
eventGetEventType Event
event = 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
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr Event -> IO CInt
gdk_event_get_event_type Ptr Event
event'
let result' :: EventType
result' = (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
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
EventType -> IO EventType
forall (m :: * -> *) a. Monad m => a -> m a
return EventType
result'
#if defined(ENABLE_OVERLOADING)
data EventGetEventTypeMethodInfo
instance (signature ~ (m Gdk.Enums.EventType), MonadIO m) => O.MethodInfo EventGetEventTypeMethodInfo Event signature where
overloadedMethod = eventGetEventType
#endif
foreign import ccall "gdk_event_get_keycode" gdk_event_get_keycode ::
Ptr Event ->
Ptr Word16 ->
IO CInt
eventGetKeycode ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Word16))
eventGetKeycode :: Event -> m (Bool, Word16)
eventGetKeycode Event
event = IO (Bool, Word16) -> m (Bool, Word16)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word16) -> m (Bool, Word16))
-> IO (Bool, Word16) -> m (Bool, Word16)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Word16
keycode <- IO (Ptr Word16)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word16)
CInt
result <- Ptr Event -> Ptr Word16 -> IO CInt
gdk_event_get_keycode Ptr Event
event' Ptr Word16
keycode
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word16
keycode' <- Ptr Word16 -> IO Word16
forall a. Storable a => Ptr a -> IO a
peek Ptr Word16
keycode
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr Word16 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word16
keycode
(Bool, Word16) -> IO (Bool, Word16)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word16
keycode')
#if defined(ENABLE_OVERLOADING)
data EventGetKeycodeMethodInfo
instance (signature ~ (m ((Bool, Word16))), MonadIO m) => O.MethodInfo EventGetKeycodeMethodInfo Event signature where
overloadedMethod = eventGetKeycode
#endif
foreign import ccall "gdk_event_get_keyval" gdk_event_get_keyval ::
Ptr Event ->
Ptr Word32 ->
IO CInt
eventGetKeyval ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Word32))
eventGetKeyval :: Event -> m (Bool, Word32)
eventGetKeyval Event
event = IO (Bool, Word32) -> m (Bool, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32) -> m (Bool, Word32))
-> IO (Bool, Word32) -> m (Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Word32
keyval <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Event -> Ptr Word32 -> IO CInt
gdk_event_get_keyval Ptr Event
event' Ptr Word32
keyval
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
keyval' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
keyval
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
keyval
(Bool, Word32) -> IO (Bool, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
keyval')
#if defined(ENABLE_OVERLOADING)
data EventGetKeyvalMethodInfo
instance (signature ~ (m ((Bool, Word32))), MonadIO m) => O.MethodInfo EventGetKeyvalMethodInfo Event signature where
overloadedMethod = eventGetKeyval
#endif
foreign import ccall "gdk_event_get_pointer_emulated" gdk_event_get_pointer_emulated ::
Ptr Event ->
IO CInt
eventGetPointerEmulated ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Bool
eventGetPointerEmulated :: Event -> m Bool
eventGetPointerEmulated Event
event = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr Event -> IO CInt
gdk_event_get_pointer_emulated Ptr Event
event'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EventGetPointerEmulatedMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo EventGetPointerEmulatedMethodInfo Event signature where
overloadedMethod = eventGetPointerEmulated
#endif
foreign import ccall "gdk_event_get_root_coords" gdk_event_get_root_coords ::
Ptr Event ->
Ptr CDouble ->
Ptr CDouble ->
IO CInt
eventGetRootCoords ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Double, Double))
eventGetRootCoords :: Event -> m (Bool, Double, Double)
eventGetRootCoords Event
event = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CDouble
xRoot <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
yRoot <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Event -> Ptr CDouble -> Ptr CDouble -> IO CInt
gdk_event_get_root_coords Ptr Event
event' Ptr CDouble
xRoot Ptr CDouble
yRoot
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
xRoot' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
xRoot
let xRoot'' :: Double
xRoot'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
xRoot'
CDouble
yRoot' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
yRoot
let yRoot'' :: Double
yRoot'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
yRoot'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
xRoot
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
yRoot
(Bool, Double, Double) -> IO (Bool, Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
xRoot'', Double
yRoot'')
#if defined(ENABLE_OVERLOADING)
data EventGetRootCoordsMethodInfo
instance (signature ~ (m ((Bool, Double, Double))), MonadIO m) => O.MethodInfo EventGetRootCoordsMethodInfo Event signature where
overloadedMethod = eventGetRootCoords
#endif
foreign import ccall "gdk_event_get_scancode" gdk_event_get_scancode ::
Ptr Event ->
IO Int32
eventGetScancode ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Int32
eventGetScancode :: Event -> m Int32
eventGetScancode Event
event = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Int32
result <- Ptr Event -> IO Int32
gdk_event_get_scancode Ptr Event
event'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data EventGetScancodeMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo EventGetScancodeMethodInfo Event signature where
overloadedMethod = eventGetScancode
#endif
foreign import ccall "gdk_event_get_screen" gdk_event_get_screen ::
Ptr Event ->
IO (Ptr Gdk.Screen.Screen)
eventGetScreen ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Gdk.Screen.Screen
eventGetScreen :: Event -> m Screen
eventGetScreen Event
event = IO Screen -> m Screen
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Screen -> m Screen) -> IO Screen -> m Screen
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Screen
result <- Ptr Event -> IO (Ptr Screen)
gdk_event_get_screen Ptr Event
event'
Text -> Ptr Screen -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventGetScreen" Ptr Screen
result
Screen
result' <- ((ManagedPtr Screen -> Screen) -> Ptr Screen -> IO Screen
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Screen -> IO Screen
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result'
#if defined(ENABLE_OVERLOADING)
data EventGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m) => O.MethodInfo EventGetScreenMethodInfo Event signature where
overloadedMethod = eventGetScreen
#endif
foreign import ccall "gdk_event_get_scroll_deltas" gdk_event_get_scroll_deltas ::
Ptr Event ->
Ptr CDouble ->
Ptr CDouble ->
IO CInt
eventGetScrollDeltas ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Double, Double))
eventGetScrollDeltas :: Event -> m (Bool, Double, Double)
eventGetScrollDeltas Event
event = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CDouble
deltaX <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
deltaY <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Event -> Ptr CDouble -> Ptr CDouble -> IO CInt
gdk_event_get_scroll_deltas Ptr Event
event' Ptr CDouble
deltaX Ptr CDouble
deltaY
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
deltaX' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
deltaX
let deltaX'' :: Double
deltaX'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
deltaX'
CDouble
deltaY' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
deltaY
let deltaY'' :: Double
deltaY'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
deltaY'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
deltaX
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
deltaY
(Bool, Double, Double) -> IO (Bool, Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
deltaX'', Double
deltaY'')
#if defined(ENABLE_OVERLOADING)
data EventGetScrollDeltasMethodInfo
instance (signature ~ (m ((Bool, Double, Double))), MonadIO m) => O.MethodInfo EventGetScrollDeltasMethodInfo Event signature where
overloadedMethod = eventGetScrollDeltas
#endif
foreign import ccall "gdk_event_get_scroll_direction" gdk_event_get_scroll_direction ::
Ptr Event ->
Ptr CUInt ->
IO CInt
eventGetScrollDirection ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, Gdk.Enums.ScrollDirection))
eventGetScrollDirection :: Event -> m (Bool, ScrollDirection)
eventGetScrollDirection Event
event = IO (Bool, ScrollDirection) -> m (Bool, ScrollDirection)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, ScrollDirection) -> m (Bool, ScrollDirection))
-> IO (Bool, ScrollDirection) -> m (Bool, ScrollDirection)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CUInt
direction <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr Event -> Ptr CUInt -> IO CInt
gdk_event_get_scroll_direction Ptr Event
event' Ptr CUInt
direction
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CUInt
direction' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
direction
let direction'' :: ScrollDirection
direction'' = (Int -> ScrollDirection
forall a. Enum a => Int -> a
toEnum (Int -> ScrollDirection)
-> (CUInt -> Int) -> CUInt -> ScrollDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
direction
(Bool, ScrollDirection) -> IO (Bool, ScrollDirection)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', ScrollDirection
direction'')
#if defined(ENABLE_OVERLOADING)
data EventGetScrollDirectionMethodInfo
instance (signature ~ (m ((Bool, Gdk.Enums.ScrollDirection))), MonadIO m) => O.MethodInfo EventGetScrollDirectionMethodInfo Event signature where
overloadedMethod = eventGetScrollDirection
#endif
foreign import ccall "gdk_event_get_seat" gdk_event_get_seat ::
Ptr Event ->
IO (Ptr Gdk.Seat.Seat)
eventGetSeat ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Gdk.Seat.Seat
eventGetSeat :: Event -> m Seat
eventGetSeat Event
event = IO Seat -> m Seat
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Seat -> m Seat) -> IO Seat -> m Seat
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Seat
result <- Ptr Event -> IO (Ptr Seat)
gdk_event_get_seat Ptr Event
event'
Text -> Ptr Seat -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventGetSeat" Ptr Seat
result
Seat
result' <- ((ManagedPtr Seat -> Seat) -> Ptr Seat -> IO Seat
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Seat -> Seat
Gdk.Seat.Seat) Ptr Seat
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Seat -> IO Seat
forall (m :: * -> *) a. Monad m => a -> m a
return Seat
result'
#if defined(ENABLE_OVERLOADING)
data EventGetSeatMethodInfo
instance (signature ~ (m Gdk.Seat.Seat), MonadIO m) => O.MethodInfo EventGetSeatMethodInfo Event signature where
overloadedMethod = eventGetSeat
#endif
foreign import ccall "gdk_event_get_source_device" gdk_event_get_source_device ::
Ptr Event ->
IO (Ptr Gdk.Device.Device)
eventGetSourceDevice ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m (Maybe Gdk.Device.Device)
eventGetSourceDevice :: Event -> m (Maybe Device)
eventGetSourceDevice Event
event = 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
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Device
result <- Ptr Event -> IO (Ptr Device)
gdk_event_get_source_device Ptr Event
event'
Maybe Device
maybeResult <- Ptr Device -> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Device
result ((Ptr Device -> IO Device) -> IO (Maybe Device))
-> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. (a -> b) -> a -> b
$ \Ptr Device
result' -> do
Device
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
Gdk.Device.Device) Ptr Device
result'
Device -> IO Device
forall (m :: * -> *) a. Monad m => a -> m a
return Device
result''
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Maybe Device -> IO (Maybe Device)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
maybeResult
#if defined(ENABLE_OVERLOADING)
data EventGetSourceDeviceMethodInfo
instance (signature ~ (m (Maybe Gdk.Device.Device)), MonadIO m) => O.MethodInfo EventGetSourceDeviceMethodInfo Event signature where
overloadedMethod = eventGetSourceDevice
#endif
foreign import ccall "gdk_event_get_state" gdk_event_get_state ::
Ptr Event ->
Ptr CUInt ->
IO CInt
eventGetState ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ((Bool, [Gdk.Flags.ModifierType]))
eventGetState :: Event -> m (Bool, [ModifierType])
eventGetState Event
event = IO (Bool, [ModifierType]) -> m (Bool, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [ModifierType]) -> m (Bool, [ModifierType]))
-> IO (Bool, [ModifierType]) -> m (Bool, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr CUInt
state <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr Event -> Ptr CUInt -> IO CInt
gdk_event_get_state Ptr Event
event' Ptr CUInt
state
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CUInt
state' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
state
let state'' :: [ModifierType]
state'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
state'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
state
(Bool, [ModifierType]) -> IO (Bool, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [ModifierType]
state'')
#if defined(ENABLE_OVERLOADING)
data EventGetStateMethodInfo
instance (signature ~ (m ((Bool, [Gdk.Flags.ModifierType]))), MonadIO m) => O.MethodInfo EventGetStateMethodInfo Event signature where
overloadedMethod = eventGetState
#endif
foreign import ccall "gdk_event_get_time" gdk_event_get_time ::
Ptr Event ->
IO Word32
eventGetTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Word32
eventGetTime :: Event -> m Word32
eventGetTime Event
event = 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
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Word32
result <- Ptr Event -> IO Word32
gdk_event_get_time Ptr Event
event'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EventGetTimeMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo EventGetTimeMethodInfo Event signature where
overloadedMethod = eventGetTime
#endif
foreign import ccall "gdk_event_get_window" gdk_event_get_window ::
Ptr Event ->
IO (Ptr Gdk.Window.Window)
eventGetWindow ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Gdk.Window.Window
eventGetWindow :: Event -> m Window
eventGetWindow Event
event = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Window
result <- Ptr Event -> IO (Ptr Window)
gdk_event_get_window Ptr Event
event'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventGetWindow" Ptr Window
result
Window
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
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data EventGetWindowMethodInfo
instance (signature ~ (m Gdk.Window.Window), MonadIO m) => O.MethodInfo EventGetWindowMethodInfo Event signature where
overloadedMethod = eventGetWindow
#endif
foreign import ccall "gdk_event_is_scroll_stop_event" gdk_event_is_scroll_stop_event ::
Ptr Event ->
IO CInt
eventIsScrollStopEvent ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Bool
eventIsScrollStopEvent :: Event -> m Bool
eventIsScrollStopEvent Event
event = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr Event -> IO CInt
gdk_event_is_scroll_stop_event Ptr Event
event'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EventIsScrollStopEventMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo EventIsScrollStopEventMethodInfo Event signature where
overloadedMethod = eventIsScrollStopEvent
#endif
foreign import ccall "gdk_event_put" gdk_event_put ::
Ptr Event ->
IO ()
eventPut ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m ()
eventPut :: Event -> m ()
eventPut Event
event = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Event -> IO ()
gdk_event_put Ptr Event
event'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventPutMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo EventPutMethodInfo Event signature where
overloadedMethod = eventPut
#endif
foreign import ccall "gdk_event_set_device" gdk_event_set_device ::
Ptr Event ->
Ptr Gdk.Device.Device ->
IO ()
eventSetDevice ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Device.IsDevice a) =>
Event
-> a
-> m ()
eventSetDevice :: Event -> a -> m ()
eventSetDevice Event
event a
device = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Event -> Ptr Device -> IO ()
gdk_event_set_device Ptr Event
event' Ptr Device
device'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventSetDeviceMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Gdk.Device.IsDevice a) => O.MethodInfo EventSetDeviceMethodInfo Event signature where
overloadedMethod = eventSetDevice
#endif
foreign import ccall "gdk_event_set_device_tool" gdk_event_set_device_tool ::
Ptr Event ->
Ptr Gdk.DeviceTool.DeviceTool ->
IO ()
eventSetDeviceTool ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.DeviceTool.IsDeviceTool a) =>
Event
-> Maybe (a)
-> m ()
eventSetDeviceTool :: Event -> Maybe a -> m ()
eventSetDeviceTool Event
event Maybe a
tool = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr DeviceTool
maybeTool <- case Maybe a
tool of
Maybe a
Nothing -> Ptr DeviceTool -> IO (Ptr DeviceTool)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DeviceTool
forall a. Ptr a
nullPtr
Just a
jTool -> do
Ptr DeviceTool
jTool' <- a -> IO (Ptr DeviceTool)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTool
Ptr DeviceTool -> IO (Ptr DeviceTool)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DeviceTool
jTool'
Ptr Event -> Ptr DeviceTool -> IO ()
gdk_event_set_device_tool Ptr Event
event' Ptr DeviceTool
maybeTool
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tool a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventSetDeviceToolMethodInfo
instance (signature ~ (Maybe (a) -> m ()), MonadIO m, Gdk.DeviceTool.IsDeviceTool a) => O.MethodInfo EventSetDeviceToolMethodInfo Event signature where
overloadedMethod = eventSetDeviceTool
#endif
foreign import ccall "gdk_event_set_screen" gdk_event_set_screen ::
Ptr Event ->
Ptr Gdk.Screen.Screen ->
IO ()
eventSetScreen ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Screen.IsScreen a) =>
Event
-> a
-> m ()
eventSetScreen :: Event -> a -> m ()
eventSetScreen Event
event a
screen = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Screen
screen' <- a -> IO (Ptr Screen)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
screen
Ptr Event -> Ptr Screen -> IO ()
gdk_event_set_screen Ptr Event
event' Ptr Screen
screen'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
screen
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventSetScreenMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Gdk.Screen.IsScreen a) => O.MethodInfo EventSetScreenMethodInfo Event signature where
overloadedMethod = eventSetScreen
#endif
foreign import ccall "gdk_event_set_source_device" gdk_event_set_source_device ::
Ptr Event ->
Ptr Gdk.Device.Device ->
IO ()
eventSetSourceDevice ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Device.IsDevice a) =>
Event
-> a
-> m ()
eventSetSourceDevice :: Event -> a -> m ()
eventSetSourceDevice Event
event a
device = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Event -> Ptr Device -> IO ()
gdk_event_set_source_device Ptr Event
event' Ptr Device
device'
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventSetSourceDeviceMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Gdk.Device.IsDevice a) => O.MethodInfo EventSetSourceDeviceMethodInfo Event signature where
overloadedMethod = eventSetSourceDevice
#endif
foreign import ccall "gdk_event_triggers_context_menu" ::
Ptr Event ->
IO CInt
eventTriggersContextMenu ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Bool
Event
event = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr Event -> IO CInt
gdk_event_triggers_context_menu Ptr Event
event'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EventTriggersContextMenuMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo EventTriggersContextMenuMethodInfo Event signature where
overloadedMethod = eventTriggersContextMenu
#endif
foreign import ccall "gdk_event_get" gdk_event_get ::
IO (Ptr Event)
eventGet ::
(B.CallStack.HasCallStack, MonadIO m) =>
m (Maybe Event)
eventGet :: m (Maybe Event)
eventGet = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
result <- IO (Ptr Event)
gdk_event_get
Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \Ptr Event
result' -> do
Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Event) Ptr Event
result'
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_event_handler_set" gdk_event_handler_set ::
FunPtr Gdk.Callbacks.C_EventFunc ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
eventHandlerSet ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gdk.Callbacks.EventFunc
-> m ()
eventHandlerSet :: (Event -> IO ()) -> m ()
eventHandlerSet Event -> IO ()
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
FunPtr C_EventFunc
func' <- C_EventFunc -> IO (FunPtr C_EventFunc)
Gdk.Callbacks.mk_EventFunc (Maybe (Ptr (FunPtr C_EventFunc))
-> EventFunc_WithClosures -> C_EventFunc
Gdk.Callbacks.wrap_EventFunc Maybe (Ptr (FunPtr C_EventFunc))
forall a. Maybe a
Nothing ((Event -> IO ()) -> EventFunc_WithClosures
Gdk.Callbacks.drop_closures_EventFunc Event -> IO ()
func))
let data_ :: Ptr ()
data_ = FunPtr C_EventFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_EventFunc
func'
let notify :: FunPtr (Ptr a -> IO ())
notify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
FunPtr C_EventFunc -> Ptr () -> FunPtr C_DestroyNotify -> IO ()
gdk_event_handler_set FunPtr C_EventFunc
func' Ptr ()
data_ FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
notify
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_event_peek" gdk_event_peek ::
IO (Ptr Event)
eventPeek ::
(B.CallStack.HasCallStack, MonadIO m) =>
m (Maybe Event)
eventPeek :: m (Maybe Event)
eventPeek = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr Event
result <- IO (Ptr Event)
gdk_event_peek
Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \Ptr Event
result' -> do
Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Event -> Event
Event) Ptr Event
result'
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_event_request_motions" gdk_event_request_motions ::
Ptr Gdk.EventMotion.EventMotion ->
IO ()
eventRequestMotions ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gdk.EventMotion.EventMotion
-> m ()
eventRequestMotions :: EventMotion -> m ()
eventRequestMotions EventMotion
event = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EventMotion
event' <- EventMotion -> IO (Ptr EventMotion)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr EventMotion
event
Ptr EventMotion -> IO ()
gdk_event_request_motions Ptr EventMotion
event'
EventMotion -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr EventMotion
event
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveEventMethod (t :: Symbol) (o :: *) :: * where
ResolveEventMethod "copy" o = EventCopyMethodInfo
ResolveEventMethod "free" o = EventFreeMethodInfo
ResolveEventMethod "isScrollStopEvent" o = EventIsScrollStopEventMethodInfo
ResolveEventMethod "put" o = EventPutMethodInfo
ResolveEventMethod "triggersContextMenu" o = EventTriggersContextMenuMethodInfo
ResolveEventMethod "getAxis" o = EventGetAxisMethodInfo
ResolveEventMethod "getButton" o = EventGetButtonMethodInfo
ResolveEventMethod "getClickCount" o = EventGetClickCountMethodInfo
ResolveEventMethod "getCoords" o = EventGetCoordsMethodInfo
ResolveEventMethod "getDevice" o = EventGetDeviceMethodInfo
ResolveEventMethod "getDeviceTool" o = EventGetDeviceToolMethodInfo
ResolveEventMethod "getEventSequence" o = EventGetEventSequenceMethodInfo
ResolveEventMethod "getEventType" o = EventGetEventTypeMethodInfo
ResolveEventMethod "getKeycode" o = EventGetKeycodeMethodInfo
ResolveEventMethod "getKeyval" o = EventGetKeyvalMethodInfo
ResolveEventMethod "getPointerEmulated" o = EventGetPointerEmulatedMethodInfo
ResolveEventMethod "getRootCoords" o = EventGetRootCoordsMethodInfo
ResolveEventMethod "getScancode" o = EventGetScancodeMethodInfo
ResolveEventMethod "getScreen" o = EventGetScreenMethodInfo
ResolveEventMethod "getScrollDeltas" o = EventGetScrollDeltasMethodInfo
ResolveEventMethod "getScrollDirection" o = EventGetScrollDirectionMethodInfo
ResolveEventMethod "getSeat" o = EventGetSeatMethodInfo
ResolveEventMethod "getSourceDevice" o = EventGetSourceDeviceMethodInfo
ResolveEventMethod "getState" o = EventGetStateMethodInfo
ResolveEventMethod "getTime" o = EventGetTimeMethodInfo
ResolveEventMethod "getWindow" o = EventGetWindowMethodInfo
ResolveEventMethod "setDevice" o = EventSetDeviceMethodInfo
ResolveEventMethod "setDeviceTool" o = EventSetDeviceToolMethodInfo
ResolveEventMethod "setScreen" o = EventSetScreenMethodInfo
ResolveEventMethod "setSourceDevice" o = EventSetSourceDeviceMethodInfo
ResolveEventMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventMethod t Event, O.MethodInfo info Event p) => OL.IsLabel t (Event -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif