#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.EventControllerMotion
(
EventControllerMotion(..) ,
IsEventControllerMotion ,
toEventControllerMotion ,
noEventControllerMotion ,
eventControllerMotionNew ,
C_EventControllerMotionEnterCallback ,
EventControllerMotionEnterCallback ,
#if ENABLE_OVERLOADING
EventControllerMotionEnterSignalInfo ,
#endif
afterEventControllerMotionEnter ,
genClosure_EventControllerMotionEnter ,
mk_EventControllerMotionEnterCallback ,
noEventControllerMotionEnterCallback ,
onEventControllerMotionEnter ,
wrap_EventControllerMotionEnterCallback ,
C_EventControllerMotionLeaveCallback ,
EventControllerMotionLeaveCallback ,
#if ENABLE_OVERLOADING
EventControllerMotionLeaveSignalInfo ,
#endif
afterEventControllerMotionLeave ,
genClosure_EventControllerMotionLeave ,
mk_EventControllerMotionLeaveCallback ,
noEventControllerMotionLeaveCallback ,
onEventControllerMotionLeave ,
wrap_EventControllerMotionLeaveCallback ,
C_EventControllerMotionMotionCallback ,
EventControllerMotionMotionCallback ,
#if ENABLE_OVERLOADING
EventControllerMotionMotionSignalInfo ,
#endif
afterEventControllerMotionMotion ,
genClosure_EventControllerMotionMotion ,
mk_EventControllerMotionMotionCallback ,
noEventControllerMotionMotionCallback ,
onEventControllerMotionMotion ,
wrap_EventControllerMotionMotionCallback,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype EventControllerMotion = EventControllerMotion (ManagedPtr EventControllerMotion)
foreign import ccall "gtk_event_controller_motion_get_type"
c_gtk_event_controller_motion_get_type :: IO GType
instance GObject EventControllerMotion where
gobjectType = c_gtk_event_controller_motion_get_type
class (GObject o, O.IsDescendantOf EventControllerMotion o) => IsEventControllerMotion o
instance (GObject o, O.IsDescendantOf EventControllerMotion o) => IsEventControllerMotion o
instance O.HasParentTypes EventControllerMotion
type instance O.ParentTypes EventControllerMotion = '[Gtk.EventController.EventController, GObject.Object.Object]
toEventControllerMotion :: (MonadIO m, IsEventControllerMotion o) => o -> m EventControllerMotion
toEventControllerMotion = liftIO . unsafeCastTo EventControllerMotion
noEventControllerMotion :: Maybe EventControllerMotion
noEventControllerMotion = Nothing
#if ENABLE_OVERLOADING
type family ResolveEventControllerMotionMethod (t :: Symbol) (o :: *) :: * where
ResolveEventControllerMotionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEventControllerMotionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEventControllerMotionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEventControllerMotionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEventControllerMotionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEventControllerMotionMethod "handleEvent" o = Gtk.EventController.EventControllerHandleEventMethodInfo
ResolveEventControllerMotionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEventControllerMotionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEventControllerMotionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEventControllerMotionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEventControllerMotionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEventControllerMotionMethod "reset" o = Gtk.EventController.EventControllerResetMethodInfo
ResolveEventControllerMotionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEventControllerMotionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEventControllerMotionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEventControllerMotionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEventControllerMotionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEventControllerMotionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEventControllerMotionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEventControllerMotionMethod "getPropagationPhase" o = Gtk.EventController.EventControllerGetPropagationPhaseMethodInfo
ResolveEventControllerMotionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEventControllerMotionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEventControllerMotionMethod "getWidget" o = Gtk.EventController.EventControllerGetWidgetMethodInfo
ResolveEventControllerMotionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEventControllerMotionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveEventControllerMotionMethod "setPropagationPhase" o = Gtk.EventController.EventControllerSetPropagationPhaseMethodInfo
ResolveEventControllerMotionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEventControllerMotionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventControllerMotionMethod t EventControllerMotion, O.MethodInfo info EventControllerMotion p) => OL.IsLabel t (EventControllerMotion -> 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
type EventControllerMotionEnterCallback =
Double
-> Double
-> IO ()
noEventControllerMotionEnterCallback :: Maybe EventControllerMotionEnterCallback
noEventControllerMotionEnterCallback = Nothing
type C_EventControllerMotionEnterCallback =
Ptr () ->
CDouble ->
CDouble ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EventControllerMotionEnterCallback :: C_EventControllerMotionEnterCallback -> IO (FunPtr C_EventControllerMotionEnterCallback)
genClosure_EventControllerMotionEnter :: MonadIO m => EventControllerMotionEnterCallback -> m (GClosure C_EventControllerMotionEnterCallback)
genClosure_EventControllerMotionEnter cb = liftIO $ do
let cb' = wrap_EventControllerMotionEnterCallback cb
mk_EventControllerMotionEnterCallback cb' >>= B.GClosure.newGClosure
wrap_EventControllerMotionEnterCallback ::
EventControllerMotionEnterCallback ->
C_EventControllerMotionEnterCallback
wrap_EventControllerMotionEnterCallback _cb _ x y _ = do
let x' = realToFrac x
let y' = realToFrac y
_cb x' y'
onEventControllerMotionEnter :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionEnterCallback -> m SignalHandlerId
onEventControllerMotionEnter obj cb = liftIO $ do
let cb' = wrap_EventControllerMotionEnterCallback cb
cb'' <- mk_EventControllerMotionEnterCallback cb'
connectSignalFunPtr obj "enter" cb'' SignalConnectBefore
afterEventControllerMotionEnter :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionEnterCallback -> m SignalHandlerId
afterEventControllerMotionEnter obj cb = liftIO $ do
let cb' = wrap_EventControllerMotionEnterCallback cb
cb'' <- mk_EventControllerMotionEnterCallback cb'
connectSignalFunPtr obj "enter" cb'' SignalConnectAfter
type EventControllerMotionLeaveCallback =
IO ()
noEventControllerMotionLeaveCallback :: Maybe EventControllerMotionLeaveCallback
noEventControllerMotionLeaveCallback = Nothing
type C_EventControllerMotionLeaveCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EventControllerMotionLeaveCallback :: C_EventControllerMotionLeaveCallback -> IO (FunPtr C_EventControllerMotionLeaveCallback)
genClosure_EventControllerMotionLeave :: MonadIO m => EventControllerMotionLeaveCallback -> m (GClosure C_EventControllerMotionLeaveCallback)
genClosure_EventControllerMotionLeave cb = liftIO $ do
let cb' = wrap_EventControllerMotionLeaveCallback cb
mk_EventControllerMotionLeaveCallback cb' >>= B.GClosure.newGClosure
wrap_EventControllerMotionLeaveCallback ::
EventControllerMotionLeaveCallback ->
C_EventControllerMotionLeaveCallback
wrap_EventControllerMotionLeaveCallback _cb _ _ = do
_cb
onEventControllerMotionLeave :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionLeaveCallback -> m SignalHandlerId
onEventControllerMotionLeave obj cb = liftIO $ do
let cb' = wrap_EventControllerMotionLeaveCallback cb
cb'' <- mk_EventControllerMotionLeaveCallback cb'
connectSignalFunPtr obj "leave" cb'' SignalConnectBefore
afterEventControllerMotionLeave :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionLeaveCallback -> m SignalHandlerId
afterEventControllerMotionLeave obj cb = liftIO $ do
let cb' = wrap_EventControllerMotionLeaveCallback cb
cb'' <- mk_EventControllerMotionLeaveCallback cb'
connectSignalFunPtr obj "leave" cb'' SignalConnectAfter
type EventControllerMotionMotionCallback =
Double
-> Double
-> IO ()
noEventControllerMotionMotionCallback :: Maybe EventControllerMotionMotionCallback
noEventControllerMotionMotionCallback = Nothing
type C_EventControllerMotionMotionCallback =
Ptr () ->
CDouble ->
CDouble ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EventControllerMotionMotionCallback :: C_EventControllerMotionMotionCallback -> IO (FunPtr C_EventControllerMotionMotionCallback)
genClosure_EventControllerMotionMotion :: MonadIO m => EventControllerMotionMotionCallback -> m (GClosure C_EventControllerMotionMotionCallback)
genClosure_EventControllerMotionMotion cb = liftIO $ do
let cb' = wrap_EventControllerMotionMotionCallback cb
mk_EventControllerMotionMotionCallback cb' >>= B.GClosure.newGClosure
wrap_EventControllerMotionMotionCallback ::
EventControllerMotionMotionCallback ->
C_EventControllerMotionMotionCallback
wrap_EventControllerMotionMotionCallback _cb _ x y _ = do
let x' = realToFrac x
let y' = realToFrac y
_cb x' y'
onEventControllerMotionMotion :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionMotionCallback -> m SignalHandlerId
onEventControllerMotionMotion obj cb = liftIO $ do
let cb' = wrap_EventControllerMotionMotionCallback cb
cb'' <- mk_EventControllerMotionMotionCallback cb'
connectSignalFunPtr obj "motion" cb'' SignalConnectBefore
afterEventControllerMotionMotion :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionMotionCallback -> m SignalHandlerId
afterEventControllerMotionMotion obj cb = liftIO $ do
let cb' = wrap_EventControllerMotionMotionCallback cb
cb'' <- mk_EventControllerMotionMotionCallback cb'
connectSignalFunPtr obj "motion" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList EventControllerMotion
type instance O.AttributeList EventControllerMotion = EventControllerMotionAttributeList
type EventControllerMotionAttributeList = ('[ '("propagationPhase", Gtk.EventController.EventControllerPropagationPhasePropertyInfo), '("widget", Gtk.EventController.EventControllerWidgetPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data EventControllerMotionEnterSignalInfo
instance SignalInfo EventControllerMotionEnterSignalInfo where
type HaskellCallbackType EventControllerMotionEnterSignalInfo = EventControllerMotionEnterCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_EventControllerMotionEnterCallback cb
cb'' <- mk_EventControllerMotionEnterCallback cb'
connectSignalFunPtr obj "enter" cb'' connectMode
data EventControllerMotionLeaveSignalInfo
instance SignalInfo EventControllerMotionLeaveSignalInfo where
type HaskellCallbackType EventControllerMotionLeaveSignalInfo = EventControllerMotionLeaveCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_EventControllerMotionLeaveCallback cb
cb'' <- mk_EventControllerMotionLeaveCallback cb'
connectSignalFunPtr obj "leave" cb'' connectMode
data EventControllerMotionMotionSignalInfo
instance SignalInfo EventControllerMotionMotionSignalInfo where
type HaskellCallbackType EventControllerMotionMotionSignalInfo = EventControllerMotionMotionCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_EventControllerMotionMotionCallback cb
cb'' <- mk_EventControllerMotionMotionCallback cb'
connectSignalFunPtr obj "motion" cb'' connectMode
type instance O.SignalList EventControllerMotion = EventControllerMotionSignalList
type EventControllerMotionSignalList = ('[ '("enter", EventControllerMotionEnterSignalInfo), '("leave", EventControllerMotionLeaveSignalInfo), '("motion", EventControllerMotionMotionSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_event_controller_motion_new" gtk_event_controller_motion_new ::
Ptr Gtk.Widget.Widget ->
IO (Ptr EventControllerMotion)
eventControllerMotionNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
a
-> m EventControllerMotion
eventControllerMotionNew widget = liftIO $ do
widget' <- unsafeManagedPtrCastPtr widget
result <- gtk_event_controller_motion_new widget'
checkUnexpectedReturnNULL "eventControllerMotionNew" result
result' <- (wrapObject EventControllerMotion) result
touchManagedPtr widget
return result'
#if ENABLE_OVERLOADING
#endif