#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gdk.Unions.Event
(
Event(..) ,
newZeroEvent ,
noEvent ,
#if ENABLE_OVERLOADING
EventCopyMethodInfo ,
#endif
eventCopy ,
#if ENABLE_OVERLOADING
EventFreeMethodInfo ,
#endif
eventFree ,
eventGet ,
#if ENABLE_OVERLOADING
EventGetAxisMethodInfo ,
#endif
eventGetAxis ,
#if ENABLE_OVERLOADING
EventGetButtonMethodInfo ,
#endif
eventGetButton ,
#if ENABLE_OVERLOADING
EventGetClickCountMethodInfo ,
#endif
eventGetClickCount ,
#if ENABLE_OVERLOADING
EventGetCoordsMethodInfo ,
#endif
eventGetCoords ,
#if ENABLE_OVERLOADING
EventGetDeviceMethodInfo ,
#endif
eventGetDevice ,
#if ENABLE_OVERLOADING
EventGetDeviceToolMethodInfo ,
#endif
eventGetDeviceTool ,
#if ENABLE_OVERLOADING
EventGetEventSequenceMethodInfo ,
#endif
eventGetEventSequence ,
#if ENABLE_OVERLOADING
EventGetEventTypeMethodInfo ,
#endif
eventGetEventType ,
#if ENABLE_OVERLOADING
EventGetKeycodeMethodInfo ,
#endif
eventGetKeycode ,
#if ENABLE_OVERLOADING
EventGetKeyvalMethodInfo ,
#endif
eventGetKeyval ,
#if ENABLE_OVERLOADING
EventGetPointerEmulatedMethodInfo ,
#endif
eventGetPointerEmulated ,
#if ENABLE_OVERLOADING
EventGetRootCoordsMethodInfo ,
#endif
eventGetRootCoords ,
#if ENABLE_OVERLOADING
EventGetScancodeMethodInfo ,
#endif
eventGetScancode ,
#if ENABLE_OVERLOADING
EventGetScreenMethodInfo ,
#endif
eventGetScreen ,
#if ENABLE_OVERLOADING
EventGetScrollDeltasMethodInfo ,
#endif
eventGetScrollDeltas ,
#if ENABLE_OVERLOADING
EventGetScrollDirectionMethodInfo ,
#endif
eventGetScrollDirection ,
#if ENABLE_OVERLOADING
EventGetSeatMethodInfo ,
#endif
eventGetSeat ,
#if ENABLE_OVERLOADING
EventGetSourceDeviceMethodInfo ,
#endif
eventGetSourceDevice ,
#if ENABLE_OVERLOADING
EventGetStateMethodInfo ,
#endif
eventGetState ,
#if ENABLE_OVERLOADING
EventGetTimeMethodInfo ,
#endif
eventGetTime ,
#if ENABLE_OVERLOADING
EventGetWindowMethodInfo ,
#endif
eventGetWindow ,
eventHandlerSet ,
#if ENABLE_OVERLOADING
EventIsScrollStopEventMethodInfo ,
#endif
eventIsScrollStopEvent ,
eventNew ,
eventPeek ,
#if ENABLE_OVERLOADING
EventPutMethodInfo ,
#endif
eventPut ,
eventRequestMotions ,
#if ENABLE_OVERLOADING
EventSetDeviceMethodInfo ,
#endif
eventSetDevice ,
#if ENABLE_OVERLOADING
EventSetDeviceToolMethodInfo ,
#endif
eventSetDeviceTool ,
#if ENABLE_OVERLOADING
EventSetScreenMethodInfo ,
#endif
eventSetScreen ,
#if ENABLE_OVERLOADING
EventSetSourceDeviceMethodInfo ,
#endif
eventSetSourceDevice ,
#if ENABLE_OVERLOADING
EventTriggersContextMenuMethodInfo ,
#endif
eventTriggersContextMenu ,
#if ENABLE_OVERLOADING
event_any ,
#endif
getEventAny ,
#if ENABLE_OVERLOADING
event_button ,
#endif
getEventButton ,
#if ENABLE_OVERLOADING
event_configure ,
#endif
getEventConfigure ,
#if ENABLE_OVERLOADING
event_crossing ,
#endif
getEventCrossing ,
#if ENABLE_OVERLOADING
event_dnd ,
#endif
getEventDnd ,
#if ENABLE_OVERLOADING
event_expose ,
#endif
getEventExpose ,
#if ENABLE_OVERLOADING
event_focusChange ,
#endif
getEventFocusChange ,
#if ENABLE_OVERLOADING
event_grabBroken ,
#endif
getEventGrabBroken ,
#if ENABLE_OVERLOADING
event_key ,
#endif
getEventKey ,
#if ENABLE_OVERLOADING
event_motion ,
#endif
getEventMotion ,
#if ENABLE_OVERLOADING
event_ownerChange ,
#endif
getEventOwnerChange ,
#if ENABLE_OVERLOADING
event_padAxis ,
#endif
getEventPadAxis ,
#if ENABLE_OVERLOADING
event_padButton ,
#endif
getEventPadButton ,
#if ENABLE_OVERLOADING
event_padGroupMode ,
#endif
getEventPadGroupMode ,
#if ENABLE_OVERLOADING
event_property ,
#endif
getEventProperty ,
#if ENABLE_OVERLOADING
event_proximity ,
#endif
getEventProximity ,
#if ENABLE_OVERLOADING
event_scroll ,
#endif
getEventScroll ,
#if ENABLE_OVERLOADING
event_selection ,
#endif
getEventSelection ,
#if ENABLE_OVERLOADING
event_setting ,
#endif
getEventSetting ,
#if ENABLE_OVERLOADING
event_touch ,
#endif
getEventTouch ,
#if ENABLE_OVERLOADING
event_touchpadPinch ,
#endif
getEventTouchpadPinch ,
#if ENABLE_OVERLOADING
event_touchpadSwipe ,
#endif
getEventTouchpadSwipe ,
#if ENABLE_OVERLOADING
event_type ,
#endif
getEventType ,
setEventType ,
#if ENABLE_OVERLOADING
event_visibility ,
#endif
getEventVisibility ,
#if 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.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 (ManagedPtr Event)
foreign import ccall "gdk_event_get_type" c_gdk_event_get_type ::
IO GType
instance BoxedObject Event where
boxedType _ = c_gdk_event_get_type
newZeroEvent :: MonadIO m => m Event
newZeroEvent = liftIO $ callocBoxedBytes 96 >>= wrapBoxed Event
instance tag ~ 'AttrSet => Constructible Event tag where
new _ attrs = do
o <- newZeroEvent
GI.Attributes.set o attrs
return o
noEvent :: Maybe Event
noEvent = Nothing
getEventType :: MonadIO m => Event -> m Gdk.Enums.EventType
getEventType s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CInt
let val' = (toEnum . fromIntegral) val
return val'
setEventType :: MonadIO m => Event -> Gdk.Enums.EventType -> m ()
setEventType s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 0) (val' :: CInt)
#if ENABLE_OVERLOADING
data EventTypeFieldInfo
instance AttrInfo EventTypeFieldInfo where
type AttrAllowedOps EventTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventTypeFieldInfo = (~) Gdk.Enums.EventType
type AttrBaseTypeConstraint EventTypeFieldInfo = (~) Event
type AttrGetType EventTypeFieldInfo = Gdk.Enums.EventType
type AttrLabel EventTypeFieldInfo = "type"
type AttrOrigin EventTypeFieldInfo = Event
attrGet _ = getEventType
attrSet _ = setEventType
attrConstruct = undefined
attrClear _ = undefined
event_type :: AttrLabelProxy "type"
event_type = AttrLabelProxy
#endif
getEventAny :: MonadIO m => Event -> m Gdk.EventAny.EventAny
getEventAny s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventAny.EventAny)
val' <- (newPtr Gdk.EventAny.EventAny) val
return val'
#if ENABLE_OVERLOADING
data EventAnyFieldInfo
instance AttrInfo EventAnyFieldInfo where
type AttrAllowedOps EventAnyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventAnyFieldInfo = (~) (Ptr Gdk.EventAny.EventAny)
type AttrBaseTypeConstraint EventAnyFieldInfo = (~) Event
type AttrGetType EventAnyFieldInfo = Gdk.EventAny.EventAny
type AttrLabel EventAnyFieldInfo = "any"
type AttrOrigin EventAnyFieldInfo = Event
attrGet _ = getEventAny
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_any :: AttrLabelProxy "any"
event_any = AttrLabelProxy
#endif
getEventExpose :: MonadIO m => Event -> m Gdk.EventExpose.EventExpose
getEventExpose s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventExpose.EventExpose)
val' <- (newPtr Gdk.EventExpose.EventExpose) val
return val'
#if ENABLE_OVERLOADING
data EventExposeFieldInfo
instance AttrInfo EventExposeFieldInfo where
type AttrAllowedOps EventExposeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventExposeFieldInfo = (~) (Ptr Gdk.EventExpose.EventExpose)
type AttrBaseTypeConstraint EventExposeFieldInfo = (~) Event
type AttrGetType EventExposeFieldInfo = Gdk.EventExpose.EventExpose
type AttrLabel EventExposeFieldInfo = "expose"
type AttrOrigin EventExposeFieldInfo = Event
attrGet _ = getEventExpose
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_expose :: AttrLabelProxy "expose"
event_expose = AttrLabelProxy
#endif
getEventVisibility :: MonadIO m => Event -> m Gdk.EventVisibility.EventVisibility
getEventVisibility s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventVisibility.EventVisibility)
val' <- (newPtr Gdk.EventVisibility.EventVisibility) val
return val'
#if ENABLE_OVERLOADING
data EventVisibilityFieldInfo
instance AttrInfo EventVisibilityFieldInfo where
type AttrAllowedOps EventVisibilityFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventVisibilityFieldInfo = (~) (Ptr Gdk.EventVisibility.EventVisibility)
type AttrBaseTypeConstraint EventVisibilityFieldInfo = (~) Event
type AttrGetType EventVisibilityFieldInfo = Gdk.EventVisibility.EventVisibility
type AttrLabel EventVisibilityFieldInfo = "visibility"
type AttrOrigin EventVisibilityFieldInfo = Event
attrGet _ = getEventVisibility
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_visibility :: AttrLabelProxy "visibility"
event_visibility = AttrLabelProxy
#endif
getEventMotion :: MonadIO m => Event -> m Gdk.EventMotion.EventMotion
getEventMotion s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventMotion.EventMotion)
val' <- (newPtr Gdk.EventMotion.EventMotion) val
return val'
#if ENABLE_OVERLOADING
data EventMotionFieldInfo
instance AttrInfo EventMotionFieldInfo where
type AttrAllowedOps EventMotionFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventMotionFieldInfo = (~) (Ptr Gdk.EventMotion.EventMotion)
type AttrBaseTypeConstraint EventMotionFieldInfo = (~) Event
type AttrGetType EventMotionFieldInfo = Gdk.EventMotion.EventMotion
type AttrLabel EventMotionFieldInfo = "motion"
type AttrOrigin EventMotionFieldInfo = Event
attrGet _ = getEventMotion
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_motion :: AttrLabelProxy "motion"
event_motion = AttrLabelProxy
#endif
getEventButton :: MonadIO m => Event -> m Gdk.EventButton.EventButton
getEventButton s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventButton.EventButton)
val' <- (newPtr Gdk.EventButton.EventButton) val
return val'
#if ENABLE_OVERLOADING
data EventButtonFieldInfo
instance AttrInfo EventButtonFieldInfo where
type AttrAllowedOps EventButtonFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventButtonFieldInfo = (~) (Ptr Gdk.EventButton.EventButton)
type AttrBaseTypeConstraint EventButtonFieldInfo = (~) Event
type AttrGetType EventButtonFieldInfo = Gdk.EventButton.EventButton
type AttrLabel EventButtonFieldInfo = "button"
type AttrOrigin EventButtonFieldInfo = Event
attrGet _ = getEventButton
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_button :: AttrLabelProxy "button"
event_button = AttrLabelProxy
#endif
getEventTouch :: MonadIO m => Event -> m Gdk.EventTouch.EventTouch
getEventTouch s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventTouch.EventTouch)
val' <- (newPtr Gdk.EventTouch.EventTouch) val
return val'
#if ENABLE_OVERLOADING
data EventTouchFieldInfo
instance AttrInfo EventTouchFieldInfo where
type AttrAllowedOps EventTouchFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventTouchFieldInfo = (~) (Ptr Gdk.EventTouch.EventTouch)
type AttrBaseTypeConstraint EventTouchFieldInfo = (~) Event
type AttrGetType EventTouchFieldInfo = Gdk.EventTouch.EventTouch
type AttrLabel EventTouchFieldInfo = "touch"
type AttrOrigin EventTouchFieldInfo = Event
attrGet _ = getEventTouch
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_touch :: AttrLabelProxy "touch"
event_touch = AttrLabelProxy
#endif
getEventScroll :: MonadIO m => Event -> m Gdk.EventScroll.EventScroll
getEventScroll s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventScroll.EventScroll)
val' <- (newPtr Gdk.EventScroll.EventScroll) val
return val'
#if ENABLE_OVERLOADING
data EventScrollFieldInfo
instance AttrInfo EventScrollFieldInfo where
type AttrAllowedOps EventScrollFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventScrollFieldInfo = (~) (Ptr Gdk.EventScroll.EventScroll)
type AttrBaseTypeConstraint EventScrollFieldInfo = (~) Event
type AttrGetType EventScrollFieldInfo = Gdk.EventScroll.EventScroll
type AttrLabel EventScrollFieldInfo = "scroll"
type AttrOrigin EventScrollFieldInfo = Event
attrGet _ = getEventScroll
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_scroll :: AttrLabelProxy "scroll"
event_scroll = AttrLabelProxy
#endif
getEventKey :: MonadIO m => Event -> m Gdk.EventKey.EventKey
getEventKey s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventKey.EventKey)
val' <- (newPtr Gdk.EventKey.EventKey) val
return val'
#if ENABLE_OVERLOADING
data EventKeyFieldInfo
instance AttrInfo EventKeyFieldInfo where
type AttrAllowedOps EventKeyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventKeyFieldInfo = (~) (Ptr Gdk.EventKey.EventKey)
type AttrBaseTypeConstraint EventKeyFieldInfo = (~) Event
type AttrGetType EventKeyFieldInfo = Gdk.EventKey.EventKey
type AttrLabel EventKeyFieldInfo = "key"
type AttrOrigin EventKeyFieldInfo = Event
attrGet _ = getEventKey
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_key :: AttrLabelProxy "key"
event_key = AttrLabelProxy
#endif
getEventCrossing :: MonadIO m => Event -> m Gdk.EventCrossing.EventCrossing
getEventCrossing s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventCrossing.EventCrossing)
val' <- (newPtr Gdk.EventCrossing.EventCrossing) val
return val'
#if ENABLE_OVERLOADING
data EventCrossingFieldInfo
instance AttrInfo EventCrossingFieldInfo where
type AttrAllowedOps EventCrossingFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventCrossingFieldInfo = (~) (Ptr Gdk.EventCrossing.EventCrossing)
type AttrBaseTypeConstraint EventCrossingFieldInfo = (~) Event
type AttrGetType EventCrossingFieldInfo = Gdk.EventCrossing.EventCrossing
type AttrLabel EventCrossingFieldInfo = "crossing"
type AttrOrigin EventCrossingFieldInfo = Event
attrGet _ = getEventCrossing
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_crossing :: AttrLabelProxy "crossing"
event_crossing = AttrLabelProxy
#endif
getEventFocusChange :: MonadIO m => Event -> m Gdk.EventFocus.EventFocus
getEventFocusChange s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventFocus.EventFocus)
val' <- (newPtr Gdk.EventFocus.EventFocus) val
return val'
#if ENABLE_OVERLOADING
data EventFocusChangeFieldInfo
instance AttrInfo EventFocusChangeFieldInfo where
type AttrAllowedOps EventFocusChangeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventFocusChangeFieldInfo = (~) (Ptr Gdk.EventFocus.EventFocus)
type AttrBaseTypeConstraint EventFocusChangeFieldInfo = (~) Event
type AttrGetType EventFocusChangeFieldInfo = Gdk.EventFocus.EventFocus
type AttrLabel EventFocusChangeFieldInfo = "focus_change"
type AttrOrigin EventFocusChangeFieldInfo = Event
attrGet _ = getEventFocusChange
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_focusChange :: AttrLabelProxy "focusChange"
event_focusChange = AttrLabelProxy
#endif
getEventConfigure :: MonadIO m => Event -> m Gdk.EventConfigure.EventConfigure
getEventConfigure s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventConfigure.EventConfigure)
val' <- (newPtr Gdk.EventConfigure.EventConfigure) val
return val'
#if ENABLE_OVERLOADING
data EventConfigureFieldInfo
instance AttrInfo EventConfigureFieldInfo where
type AttrAllowedOps EventConfigureFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventConfigureFieldInfo = (~) (Ptr Gdk.EventConfigure.EventConfigure)
type AttrBaseTypeConstraint EventConfigureFieldInfo = (~) Event
type AttrGetType EventConfigureFieldInfo = Gdk.EventConfigure.EventConfigure
type AttrLabel EventConfigureFieldInfo = "configure"
type AttrOrigin EventConfigureFieldInfo = Event
attrGet _ = getEventConfigure
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_configure :: AttrLabelProxy "configure"
event_configure = AttrLabelProxy
#endif
getEventProperty :: MonadIO m => Event -> m Gdk.EventProperty.EventProperty
getEventProperty s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventProperty.EventProperty)
val' <- (newPtr Gdk.EventProperty.EventProperty) val
return val'
#if ENABLE_OVERLOADING
data EventPropertyFieldInfo
instance AttrInfo EventPropertyFieldInfo where
type AttrAllowedOps EventPropertyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPropertyFieldInfo = (~) (Ptr Gdk.EventProperty.EventProperty)
type AttrBaseTypeConstraint EventPropertyFieldInfo = (~) Event
type AttrGetType EventPropertyFieldInfo = Gdk.EventProperty.EventProperty
type AttrLabel EventPropertyFieldInfo = "property"
type AttrOrigin EventPropertyFieldInfo = Event
attrGet _ = getEventProperty
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_property :: AttrLabelProxy "property"
event_property = AttrLabelProxy
#endif
getEventSelection :: MonadIO m => Event -> m Gdk.EventSelection.EventSelection
getEventSelection s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventSelection.EventSelection)
val' <- (newPtr Gdk.EventSelection.EventSelection) val
return val'
#if ENABLE_OVERLOADING
data EventSelectionFieldInfo
instance AttrInfo EventSelectionFieldInfo where
type AttrAllowedOps EventSelectionFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSelectionFieldInfo = (~) (Ptr Gdk.EventSelection.EventSelection)
type AttrBaseTypeConstraint EventSelectionFieldInfo = (~) Event
type AttrGetType EventSelectionFieldInfo = Gdk.EventSelection.EventSelection
type AttrLabel EventSelectionFieldInfo = "selection"
type AttrOrigin EventSelectionFieldInfo = Event
attrGet _ = getEventSelection
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_selection :: AttrLabelProxy "selection"
event_selection = AttrLabelProxy
#endif
getEventOwnerChange :: MonadIO m => Event -> m Gdk.EventOwnerChange.EventOwnerChange
getEventOwnerChange s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventOwnerChange.EventOwnerChange)
val' <- (newPtr Gdk.EventOwnerChange.EventOwnerChange) val
return val'
#if ENABLE_OVERLOADING
data EventOwnerChangeFieldInfo
instance AttrInfo EventOwnerChangeFieldInfo where
type AttrAllowedOps EventOwnerChangeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventOwnerChangeFieldInfo = (~) (Ptr Gdk.EventOwnerChange.EventOwnerChange)
type AttrBaseTypeConstraint EventOwnerChangeFieldInfo = (~) Event
type AttrGetType EventOwnerChangeFieldInfo = Gdk.EventOwnerChange.EventOwnerChange
type AttrLabel EventOwnerChangeFieldInfo = "owner_change"
type AttrOrigin EventOwnerChangeFieldInfo = Event
attrGet _ = getEventOwnerChange
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_ownerChange :: AttrLabelProxy "ownerChange"
event_ownerChange = AttrLabelProxy
#endif
getEventProximity :: MonadIO m => Event -> m Gdk.EventProximity.EventProximity
getEventProximity s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventProximity.EventProximity)
val' <- (newPtr Gdk.EventProximity.EventProximity) val
return val'
#if ENABLE_OVERLOADING
data EventProximityFieldInfo
instance AttrInfo EventProximityFieldInfo where
type AttrAllowedOps EventProximityFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventProximityFieldInfo = (~) (Ptr Gdk.EventProximity.EventProximity)
type AttrBaseTypeConstraint EventProximityFieldInfo = (~) Event
type AttrGetType EventProximityFieldInfo = Gdk.EventProximity.EventProximity
type AttrLabel EventProximityFieldInfo = "proximity"
type AttrOrigin EventProximityFieldInfo = Event
attrGet _ = getEventProximity
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_proximity :: AttrLabelProxy "proximity"
event_proximity = AttrLabelProxy
#endif
getEventDnd :: MonadIO m => Event -> m Gdk.EventDND.EventDND
getEventDnd s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventDND.EventDND)
val' <- (newPtr Gdk.EventDND.EventDND) val
return val'
#if ENABLE_OVERLOADING
data EventDndFieldInfo
instance AttrInfo EventDndFieldInfo where
type AttrAllowedOps EventDndFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventDndFieldInfo = (~) (Ptr Gdk.EventDND.EventDND)
type AttrBaseTypeConstraint EventDndFieldInfo = (~) Event
type AttrGetType EventDndFieldInfo = Gdk.EventDND.EventDND
type AttrLabel EventDndFieldInfo = "dnd"
type AttrOrigin EventDndFieldInfo = Event
attrGet _ = getEventDnd
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_dnd :: AttrLabelProxy "dnd"
event_dnd = AttrLabelProxy
#endif
getEventWindowState :: MonadIO m => Event -> m Gdk.EventWindowState.EventWindowState
getEventWindowState s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventWindowState.EventWindowState)
val' <- (newPtr Gdk.EventWindowState.EventWindowState) val
return val'
#if ENABLE_OVERLOADING
data EventWindowStateFieldInfo
instance AttrInfo EventWindowStateFieldInfo where
type AttrAllowedOps EventWindowStateFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventWindowStateFieldInfo = (~) (Ptr Gdk.EventWindowState.EventWindowState)
type AttrBaseTypeConstraint EventWindowStateFieldInfo = (~) Event
type AttrGetType EventWindowStateFieldInfo = Gdk.EventWindowState.EventWindowState
type AttrLabel EventWindowStateFieldInfo = "window_state"
type AttrOrigin EventWindowStateFieldInfo = Event
attrGet _ = getEventWindowState
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_windowState :: AttrLabelProxy "windowState"
event_windowState = AttrLabelProxy
#endif
getEventSetting :: MonadIO m => Event -> m Gdk.EventSetting.EventSetting
getEventSetting s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventSetting.EventSetting)
val' <- (newPtr Gdk.EventSetting.EventSetting) val
return val'
#if ENABLE_OVERLOADING
data EventSettingFieldInfo
instance AttrInfo EventSettingFieldInfo where
type AttrAllowedOps EventSettingFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSettingFieldInfo = (~) (Ptr Gdk.EventSetting.EventSetting)
type AttrBaseTypeConstraint EventSettingFieldInfo = (~) Event
type AttrGetType EventSettingFieldInfo = Gdk.EventSetting.EventSetting
type AttrLabel EventSettingFieldInfo = "setting"
type AttrOrigin EventSettingFieldInfo = Event
attrGet _ = getEventSetting
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_setting :: AttrLabelProxy "setting"
event_setting = AttrLabelProxy
#endif
getEventGrabBroken :: MonadIO m => Event -> m Gdk.EventGrabBroken.EventGrabBroken
getEventGrabBroken s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventGrabBroken.EventGrabBroken)
val' <- (newPtr Gdk.EventGrabBroken.EventGrabBroken) val
return val'
#if ENABLE_OVERLOADING
data EventGrabBrokenFieldInfo
instance AttrInfo EventGrabBrokenFieldInfo where
type AttrAllowedOps EventGrabBrokenFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventGrabBrokenFieldInfo = (~) (Ptr Gdk.EventGrabBroken.EventGrabBroken)
type AttrBaseTypeConstraint EventGrabBrokenFieldInfo = (~) Event
type AttrGetType EventGrabBrokenFieldInfo = Gdk.EventGrabBroken.EventGrabBroken
type AttrLabel EventGrabBrokenFieldInfo = "grab_broken"
type AttrOrigin EventGrabBrokenFieldInfo = Event
attrGet _ = getEventGrabBroken
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_grabBroken :: AttrLabelProxy "grabBroken"
event_grabBroken = AttrLabelProxy
#endif
getEventTouchpadSwipe :: MonadIO m => Event -> m Gdk.EventTouchpadSwipe.EventTouchpadSwipe
getEventTouchpadSwipe s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventTouchpadSwipe.EventTouchpadSwipe)
val' <- (newPtr Gdk.EventTouchpadSwipe.EventTouchpadSwipe) val
return val'
#if ENABLE_OVERLOADING
data EventTouchpadSwipeFieldInfo
instance AttrInfo EventTouchpadSwipeFieldInfo where
type AttrAllowedOps EventTouchpadSwipeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventTouchpadSwipeFieldInfo = (~) (Ptr Gdk.EventTouchpadSwipe.EventTouchpadSwipe)
type AttrBaseTypeConstraint EventTouchpadSwipeFieldInfo = (~) Event
type AttrGetType EventTouchpadSwipeFieldInfo = Gdk.EventTouchpadSwipe.EventTouchpadSwipe
type AttrLabel EventTouchpadSwipeFieldInfo = "touchpad_swipe"
type AttrOrigin EventTouchpadSwipeFieldInfo = Event
attrGet _ = getEventTouchpadSwipe
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_touchpadSwipe :: AttrLabelProxy "touchpadSwipe"
event_touchpadSwipe = AttrLabelProxy
#endif
getEventTouchpadPinch :: MonadIO m => Event -> m Gdk.EventTouchpadPinch.EventTouchpadPinch
getEventTouchpadPinch s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventTouchpadPinch.EventTouchpadPinch)
val' <- (newPtr Gdk.EventTouchpadPinch.EventTouchpadPinch) val
return val'
#if ENABLE_OVERLOADING
data EventTouchpadPinchFieldInfo
instance AttrInfo EventTouchpadPinchFieldInfo where
type AttrAllowedOps EventTouchpadPinchFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventTouchpadPinchFieldInfo = (~) (Ptr Gdk.EventTouchpadPinch.EventTouchpadPinch)
type AttrBaseTypeConstraint EventTouchpadPinchFieldInfo = (~) Event
type AttrGetType EventTouchpadPinchFieldInfo = Gdk.EventTouchpadPinch.EventTouchpadPinch
type AttrLabel EventTouchpadPinchFieldInfo = "touchpad_pinch"
type AttrOrigin EventTouchpadPinchFieldInfo = Event
attrGet _ = getEventTouchpadPinch
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_touchpadPinch :: AttrLabelProxy "touchpadPinch"
event_touchpadPinch = AttrLabelProxy
#endif
getEventPadButton :: MonadIO m => Event -> m Gdk.EventPadButton.EventPadButton
getEventPadButton s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventPadButton.EventPadButton)
val' <- (newPtr Gdk.EventPadButton.EventPadButton) val
return val'
#if ENABLE_OVERLOADING
data EventPadButtonFieldInfo
instance AttrInfo EventPadButtonFieldInfo where
type AttrAllowedOps EventPadButtonFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPadButtonFieldInfo = (~) (Ptr Gdk.EventPadButton.EventPadButton)
type AttrBaseTypeConstraint EventPadButtonFieldInfo = (~) Event
type AttrGetType EventPadButtonFieldInfo = Gdk.EventPadButton.EventPadButton
type AttrLabel EventPadButtonFieldInfo = "pad_button"
type AttrOrigin EventPadButtonFieldInfo = Event
attrGet _ = getEventPadButton
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_padButton :: AttrLabelProxy "padButton"
event_padButton = AttrLabelProxy
#endif
getEventPadAxis :: MonadIO m => Event -> m Gdk.EventPadAxis.EventPadAxis
getEventPadAxis s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventPadAxis.EventPadAxis)
val' <- (newPtr Gdk.EventPadAxis.EventPadAxis) val
return val'
#if ENABLE_OVERLOADING
data EventPadAxisFieldInfo
instance AttrInfo EventPadAxisFieldInfo where
type AttrAllowedOps EventPadAxisFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPadAxisFieldInfo = (~) (Ptr Gdk.EventPadAxis.EventPadAxis)
type AttrBaseTypeConstraint EventPadAxisFieldInfo = (~) Event
type AttrGetType EventPadAxisFieldInfo = Gdk.EventPadAxis.EventPadAxis
type AttrLabel EventPadAxisFieldInfo = "pad_axis"
type AttrOrigin EventPadAxisFieldInfo = Event
attrGet _ = getEventPadAxis
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_padAxis :: AttrLabelProxy "padAxis"
event_padAxis = AttrLabelProxy
#endif
getEventPadGroupMode :: MonadIO m => Event -> m Gdk.EventPadGroupMode.EventPadGroupMode
getEventPadGroupMode s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gdk.EventPadGroupMode.EventPadGroupMode)
val' <- (newPtr Gdk.EventPadGroupMode.EventPadGroupMode) val
return val'
#if ENABLE_OVERLOADING
data EventPadGroupModeFieldInfo
instance AttrInfo EventPadGroupModeFieldInfo where
type AttrAllowedOps EventPadGroupModeFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeFieldInfo = (~) (Ptr Gdk.EventPadGroupMode.EventPadGroupMode)
type AttrBaseTypeConstraint EventPadGroupModeFieldInfo = (~) Event
type AttrGetType EventPadGroupModeFieldInfo = Gdk.EventPadGroupMode.EventPadGroupMode
type AttrLabel EventPadGroupModeFieldInfo = "pad_group_mode"
type AttrOrigin EventPadGroupModeFieldInfo = Event
attrGet _ = getEventPadGroupMode
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
event_padGroupMode :: AttrLabelProxy "padGroupMode"
event_padGroupMode = AttrLabelProxy
#endif
#if 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 type_ = liftIO $ do
let type_' = (fromIntegral . fromEnum) type_
result <- gdk_event_new type_'
checkUnexpectedReturnNULL "eventNew" result
result' <- (wrapBoxed Event) result
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_copy event'
checkUnexpectedReturnNULL "eventCopy" result
result' <- (wrapBoxed Event) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
gdk_event_free event'
touchManagedPtr event
return ()
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
let axisUse' = (fromIntegral . fromEnum) axisUse
value <- allocMem :: IO (Ptr CDouble)
result <- gdk_event_get_axis event' axisUse' value
let result' = (/= 0) result
value' <- peek value
let value'' = realToFrac value'
touchManagedPtr event
freeMem value
return (result', value'')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
button <- allocMem :: IO (Ptr Word32)
result <- gdk_event_get_button event' button
let result' = (/= 0) result
button' <- peek button
touchManagedPtr event
freeMem button
return (result', button')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
clickCount <- allocMem :: IO (Ptr Word32)
result <- gdk_event_get_click_count event' clickCount
let result' = (/= 0) result
clickCount' <- peek clickCount
touchManagedPtr event
freeMem clickCount
return (result', clickCount')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
xWin <- allocMem :: IO (Ptr CDouble)
yWin <- allocMem :: IO (Ptr CDouble)
result <- gdk_event_get_coords event' xWin yWin
let result' = (/= 0) result
xWin' <- peek xWin
let xWin'' = realToFrac xWin'
yWin' <- peek yWin
let yWin'' = realToFrac yWin'
touchManagedPtr event
freeMem xWin
freeMem yWin
return (result', xWin'', yWin'')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_device event'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gdk.Device.Device) result'
return result''
touchManagedPtr event
return maybeResult
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_device_tool event'
checkUnexpectedReturnNULL "eventGetDeviceTool" result
result' <- (newObject Gdk.DeviceTool.DeviceTool) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_event_sequence event'
checkUnexpectedReturnNULL "eventGetEventSequence" result
result' <- (newBoxed Gdk.EventSequence.EventSequence) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_event_type event'
let result' = (toEnum . fromIntegral) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
keycode <- allocMem :: IO (Ptr Word16)
result <- gdk_event_get_keycode event' keycode
let result' = (/= 0) result
keycode' <- peek keycode
touchManagedPtr event
freeMem keycode
return (result', keycode')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
keyval <- allocMem :: IO (Ptr Word32)
result <- gdk_event_get_keyval event' keyval
let result' = (/= 0) result
keyval' <- peek keyval
touchManagedPtr event
freeMem keyval
return (result', keyval')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_pointer_emulated event'
let result' = (/= 0) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
xRoot <- allocMem :: IO (Ptr CDouble)
yRoot <- allocMem :: IO (Ptr CDouble)
result <- gdk_event_get_root_coords event' xRoot yRoot
let result' = (/= 0) result
xRoot' <- peek xRoot
let xRoot'' = realToFrac xRoot'
yRoot' <- peek yRoot
let yRoot'' = realToFrac yRoot'
touchManagedPtr event
freeMem xRoot
freeMem yRoot
return (result', xRoot'', yRoot'')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_scancode event'
touchManagedPtr event
return result
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_screen event'
checkUnexpectedReturnNULL "eventGetScreen" result
result' <- (newObject Gdk.Screen.Screen) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
deltaX <- allocMem :: IO (Ptr CDouble)
deltaY <- allocMem :: IO (Ptr CDouble)
result <- gdk_event_get_scroll_deltas event' deltaX deltaY
let result' = (/= 0) result
deltaX' <- peek deltaX
let deltaX'' = realToFrac deltaX'
deltaY' <- peek deltaY
let deltaY'' = realToFrac deltaY'
touchManagedPtr event
freeMem deltaX
freeMem deltaY
return (result', deltaX'', deltaY'')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
direction <- allocMem :: IO (Ptr CUInt)
result <- gdk_event_get_scroll_direction event' direction
let result' = (/= 0) result
direction' <- peek direction
let direction'' = (toEnum . fromIntegral) direction'
touchManagedPtr event
freeMem direction
return (result', direction'')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_seat event'
checkUnexpectedReturnNULL "eventGetSeat" result
result' <- (newObject Gdk.Seat.Seat) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_source_device event'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gdk.Device.Device) result'
return result''
touchManagedPtr event
return maybeResult
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
state <- allocMem :: IO (Ptr CUInt)
result <- gdk_event_get_state event' state
let result' = (/= 0) result
state' <- peek state
let state'' = wordToGFlags state'
touchManagedPtr event
freeMem state
return (result', state'')
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_time event'
touchManagedPtr event
return result
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_get_window event'
checkUnexpectedReturnNULL "eventGetWindow" result
result' <- (newObject Gdk.Window.Window) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_is_scroll_stop_event event'
let result' = (/= 0) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
gdk_event_put event'
touchManagedPtr event
return ()
#if 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 device = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
device' <- unsafeManagedPtrCastPtr device
gdk_event_set_device event' device'
touchManagedPtr event
touchManagedPtr device
return ()
#if 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 tool = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
maybeTool <- case tool of
Nothing -> return nullPtr
Just jTool -> do
jTool' <- unsafeManagedPtrCastPtr jTool
return jTool'
gdk_event_set_device_tool event' maybeTool
touchManagedPtr event
whenJust tool touchManagedPtr
return ()
#if 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 screen = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
screen' <- unsafeManagedPtrCastPtr screen
gdk_event_set_screen event' screen'
touchManagedPtr event
touchManagedPtr screen
return ()
#if 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 device = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
device' <- unsafeManagedPtrCastPtr device
gdk_event_set_source_device event' device'
touchManagedPtr event
touchManagedPtr device
return ()
#if 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" gdk_event_triggers_context_menu ::
Ptr Event ->
IO CInt
eventTriggersContextMenu ::
(B.CallStack.HasCallStack, MonadIO m) =>
Event
-> m Bool
eventTriggersContextMenu event = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
result <- gdk_event_triggers_context_menu event'
let result' = (/= 0) result
touchManagedPtr event
return result'
#if 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 = liftIO $ do
result <- gdk_event_get
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed Event) result'
return result''
return maybeResult
#if 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 func = liftIO $ do
func' <- Gdk.Callbacks.mk_EventFunc (Gdk.Callbacks.wrap_EventFunc Nothing (Gdk.Callbacks.drop_closures_EventFunc func))
let data_ = castFunPtrToPtr func'
let notify = safeFreeFunPtrPtr
gdk_event_handler_set func' data_ notify
return ()
#if 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 = liftIO $ do
result <- gdk_event_peek
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed Event) result'
return result''
return maybeResult
#if 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 event = liftIO $ do
event' <- unsafeManagedPtrGetPtr event
gdk_event_request_motions event'
touchManagedPtr event
return ()
#if ENABLE_OVERLOADING
#endif
#if 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 (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif