{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.TapAction
(
TapAction(..) ,
IsTapAction ,
toTapAction ,
#if defined(ENABLE_OVERLOADING)
ResolveTapActionMethod ,
#endif
tapActionNew ,
TapActionTapCallback ,
#if defined(ENABLE_OVERLOADING)
TapActionTapSignalInfo ,
#endif
afterTapActionTap ,
onTapActionTap ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.Cairo.Structs.RectangleInt as Cairo.RectangleInt
import qualified GI.Clutter.Callbacks as Clutter.Callbacks
import {-# SOURCE #-} qualified GI.Clutter.Enums as Clutter.Enums
import {-# SOURCE #-} qualified GI.Clutter.Flags as Clutter.Flags
import {-# SOURCE #-} qualified GI.Clutter.Interfaces.Animatable as Clutter.Animatable
import {-# SOURCE #-} qualified GI.Clutter.Interfaces.Container as Clutter.Container
import {-# SOURCE #-} qualified GI.Clutter.Interfaces.Content as Clutter.Content
import {-# SOURCE #-} qualified GI.Clutter.Interfaces.Scriptable as Clutter.Scriptable
import {-# SOURCE #-} qualified GI.Clutter.Objects.Action as Clutter.Action
import {-# SOURCE #-} qualified GI.Clutter.Objects.Actor as Clutter.Actor
import {-# SOURCE #-} qualified GI.Clutter.Objects.ActorMeta as Clutter.ActorMeta
import {-# SOURCE #-} qualified GI.Clutter.Objects.Alpha as Clutter.Alpha
import {-# SOURCE #-} qualified GI.Clutter.Objects.Animation as Clutter.Animation
import {-# SOURCE #-} qualified GI.Clutter.Objects.Animator as Clutter.Animator
import {-# SOURCE #-} qualified GI.Clutter.Objects.Backend as Clutter.Backend
import {-# SOURCE #-} qualified GI.Clutter.Objects.ChildMeta as Clutter.ChildMeta
import {-# SOURCE #-} qualified GI.Clutter.Objects.Constraint as Clutter.Constraint
import {-# SOURCE #-} qualified GI.Clutter.Objects.DeviceManager as Clutter.DeviceManager
import {-# SOURCE #-} qualified GI.Clutter.Objects.Effect as Clutter.Effect
import {-# SOURCE #-} qualified GI.Clutter.Objects.GestureAction as Clutter.GestureAction
import {-# SOURCE #-} qualified GI.Clutter.Objects.Group as Clutter.Group
import {-# SOURCE #-} qualified GI.Clutter.Objects.InputDevice as Clutter.InputDevice
import {-# SOURCE #-} qualified GI.Clutter.Objects.Interval as Clutter.Interval
import {-# SOURCE #-} qualified GI.Clutter.Objects.LayoutManager as Clutter.LayoutManager
import {-# SOURCE #-} qualified GI.Clutter.Objects.LayoutMeta as Clutter.LayoutMeta
import {-# SOURCE #-} qualified GI.Clutter.Objects.Script as Clutter.Script
import {-# SOURCE #-} qualified GI.Clutter.Objects.Shader as Clutter.Shader
import {-# SOURCE #-} qualified GI.Clutter.Objects.Stage as Clutter.Stage
import {-# SOURCE #-} qualified GI.Clutter.Objects.State as Clutter.State
import {-# SOURCE #-} qualified GI.Clutter.Objects.Timeline as Clutter.Timeline
import {-# SOURCE #-} qualified GI.Clutter.Objects.Transition as Clutter.Transition
import {-# SOURCE #-} qualified GI.Clutter.Structs.ActorBox as Clutter.ActorBox
import {-# SOURCE #-} qualified GI.Clutter.Structs.AnimatorKey as Clutter.AnimatorKey
import {-# SOURCE #-} qualified GI.Clutter.Structs.ButtonEvent as Clutter.ButtonEvent
import {-# SOURCE #-} qualified GI.Clutter.Structs.Color as Clutter.Color
import {-# SOURCE #-} qualified GI.Clutter.Structs.CrossingEvent as Clutter.CrossingEvent
import {-# SOURCE #-} qualified GI.Clutter.Structs.EventSequence as Clutter.EventSequence
import {-# SOURCE #-} qualified GI.Clutter.Structs.Fog as Clutter.Fog
import {-# SOURCE #-} qualified GI.Clutter.Structs.Geometry as Clutter.Geometry
import {-# SOURCE #-} qualified GI.Clutter.Structs.KeyEvent as Clutter.KeyEvent
import {-# SOURCE #-} qualified GI.Clutter.Structs.Margin as Clutter.Margin
import {-# SOURCE #-} qualified GI.Clutter.Structs.Matrix as Clutter.Matrix
import {-# SOURCE #-} qualified GI.Clutter.Structs.MotionEvent as Clutter.MotionEvent
import {-# SOURCE #-} qualified GI.Clutter.Structs.PaintVolume as Clutter.PaintVolume
import {-# SOURCE #-} qualified GI.Clutter.Structs.Perspective as Clutter.Perspective
import {-# SOURCE #-} qualified GI.Clutter.Structs.Point as Clutter.Point
import {-# SOURCE #-} qualified GI.Clutter.Structs.Rect as Clutter.Rect
import {-# SOURCE #-} qualified GI.Clutter.Structs.ScrollEvent as Clutter.ScrollEvent
import {-# SOURCE #-} qualified GI.Clutter.Structs.Size as Clutter.Size
import {-# SOURCE #-} qualified GI.Clutter.Structs.StateKey as Clutter.StateKey
import {-# SOURCE #-} qualified GI.Clutter.Structs.Vertex as Clutter.Vertex
import {-# SOURCE #-} qualified GI.Clutter.Unions.Event as Clutter.Event
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.ObjectClass as GObject.ObjectClass
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Json.Structs.Node as Json.Node
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.Layout as Pango.Layout
#else
import {-# SOURCE #-} qualified GI.Clutter.Objects.Action as Clutter.Action
import {-# SOURCE #-} qualified GI.Clutter.Objects.Actor as Clutter.Actor
import {-# SOURCE #-} qualified GI.Clutter.Objects.ActorMeta as Clutter.ActorMeta
import {-# SOURCE #-} qualified GI.Clutter.Objects.GestureAction as Clutter.GestureAction
import qualified GI.GObject.Objects.Object as GObject.Object
#endif
newtype TapAction = TapAction (SP.ManagedPtr TapAction)
deriving (TapAction -> TapAction -> Bool
(TapAction -> TapAction -> Bool)
-> (TapAction -> TapAction -> Bool) -> Eq TapAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TapAction -> TapAction -> Bool
== :: TapAction -> TapAction -> Bool
$c/= :: TapAction -> TapAction -> Bool
/= :: TapAction -> TapAction -> Bool
Eq)
instance SP.ManagedPtrNewtype TapAction where
toManagedPtr :: TapAction -> ManagedPtr TapAction
toManagedPtr (TapAction ManagedPtr TapAction
p) = ManagedPtr TapAction
p
foreign import ccall "clutter_tap_action_get_type"
c_clutter_tap_action_get_type :: IO B.Types.GType
instance B.Types.TypedObject TapAction where
glibType :: IO GType
glibType = IO GType
c_clutter_tap_action_get_type
instance B.Types.GObject TapAction
class (SP.GObject o, O.IsDescendantOf TapAction o) => IsTapAction o
instance (SP.GObject o, O.IsDescendantOf TapAction o) => IsTapAction o
instance O.HasParentTypes TapAction
type instance O.ParentTypes TapAction = '[Clutter.GestureAction.GestureAction, Clutter.Action.Action, Clutter.ActorMeta.ActorMeta, GObject.Object.Object]
toTapAction :: (MIO.MonadIO m, IsTapAction o) => o -> m TapAction
toTapAction :: forall (m :: * -> *) o.
(MonadIO m, IsTapAction o) =>
o -> m TapAction
toTapAction = IO TapAction -> m TapAction
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TapAction -> m TapAction)
-> (o -> IO TapAction) -> o -> m TapAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TapAction -> TapAction) -> o -> IO TapAction
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TapAction -> TapAction
TapAction
instance B.GValue.IsGValue (Maybe TapAction) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_tap_action_get_type
gvalueSet_ :: Ptr GValue -> Maybe TapAction -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TapAction
P.Nothing = Ptr GValue -> Ptr TapAction -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TapAction
forall a. Ptr a
FP.nullPtr :: FP.Ptr TapAction)
gvalueSet_ Ptr GValue
gv (P.Just TapAction
obj) = TapAction -> (Ptr TapAction -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TapAction
obj (Ptr GValue -> Ptr TapAction -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TapAction)
gvalueGet_ Ptr GValue
gv = do
Ptr TapAction
ptr <- Ptr GValue -> IO (Ptr TapAction)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TapAction)
if Ptr TapAction
ptr Ptr TapAction -> Ptr TapAction -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr TapAction
forall a. Ptr a
FP.nullPtr
then TapAction -> Maybe TapAction
forall a. a -> Maybe a
P.Just (TapAction -> Maybe TapAction)
-> IO TapAction -> IO (Maybe TapAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr TapAction -> TapAction)
-> Ptr TapAction -> IO TapAction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr TapAction -> TapAction
TapAction Ptr TapAction
ptr
else Maybe TapAction -> IO (Maybe TapAction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TapAction
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTapActionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveTapActionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTapActionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTapActionMethod "cancel" o = Clutter.GestureAction.GestureActionCancelMethodInfo
ResolveTapActionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTapActionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTapActionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTapActionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTapActionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTapActionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTapActionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTapActionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTapActionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTapActionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTapActionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTapActionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTapActionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTapActionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTapActionMethod "getActor" o = Clutter.ActorMeta.ActorMetaGetActorMethodInfo
ResolveTapActionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTapActionMethod "getDevice" o = Clutter.GestureAction.GestureActionGetDeviceMethodInfo
ResolveTapActionMethod "getEnabled" o = Clutter.ActorMeta.ActorMetaGetEnabledMethodInfo
ResolveTapActionMethod "getLastEvent" o = Clutter.GestureAction.GestureActionGetLastEventMethodInfo
ResolveTapActionMethod "getMotionCoords" o = Clutter.GestureAction.GestureActionGetMotionCoordsMethodInfo
ResolveTapActionMethod "getMotionDelta" o = Clutter.GestureAction.GestureActionGetMotionDeltaMethodInfo
ResolveTapActionMethod "getNCurrentPoints" o = Clutter.GestureAction.GestureActionGetNCurrentPointsMethodInfo
ResolveTapActionMethod "getNTouchPoints" o = Clutter.GestureAction.GestureActionGetNTouchPointsMethodInfo
ResolveTapActionMethod "getName" o = Clutter.ActorMeta.ActorMetaGetNameMethodInfo
ResolveTapActionMethod "getPressCoords" o = Clutter.GestureAction.GestureActionGetPressCoordsMethodInfo
ResolveTapActionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTapActionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTapActionMethod "getReleaseCoords" o = Clutter.GestureAction.GestureActionGetReleaseCoordsMethodInfo
ResolveTapActionMethod "getSequence" o = Clutter.GestureAction.GestureActionGetSequenceMethodInfo
ResolveTapActionMethod "getThresholdTriggerDistance" o = Clutter.GestureAction.GestureActionGetThresholdTriggerDistanceMethodInfo
ResolveTapActionMethod "getThresholdTriggerEdge" o = Clutter.GestureAction.GestureActionGetThresholdTriggerEdgeMethodInfo
ResolveTapActionMethod "getThresholdTriggerEgde" o = Clutter.GestureAction.GestureActionGetThresholdTriggerEgdeMethodInfo
ResolveTapActionMethod "getVelocity" o = Clutter.GestureAction.GestureActionGetVelocityMethodInfo
ResolveTapActionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTapActionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTapActionMethod "setEnabled" o = Clutter.ActorMeta.ActorMetaSetEnabledMethodInfo
ResolveTapActionMethod "setNTouchPoints" o = Clutter.GestureAction.GestureActionSetNTouchPointsMethodInfo
ResolveTapActionMethod "setName" o = Clutter.ActorMeta.ActorMetaSetNameMethodInfo
ResolveTapActionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTapActionMethod "setThresholdTriggerDistance" o = Clutter.GestureAction.GestureActionSetThresholdTriggerDistanceMethodInfo
ResolveTapActionMethod "setThresholdTriggerEdge" o = Clutter.GestureAction.GestureActionSetThresholdTriggerEdgeMethodInfo
ResolveTapActionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTapActionMethod t TapAction, O.OverloadedMethod info TapAction p) => OL.IsLabel t (TapAction -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTapActionMethod t TapAction, O.OverloadedMethod info TapAction p, R.HasField t TapAction p) => R.HasField t TapAction p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTapActionMethod t TapAction, O.OverloadedMethodInfo info TapAction) => OL.IsLabel t (O.MethodProxy info TapAction) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type TapActionTapCallback =
Clutter.Actor.Actor
-> IO ()
type C_TapActionTapCallback =
Ptr TapAction ->
Ptr Clutter.Actor.Actor ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TapActionTapCallback :: C_TapActionTapCallback -> IO (FunPtr C_TapActionTapCallback)
wrap_TapActionTapCallback ::
GObject a => (a -> TapActionTapCallback) ->
C_TapActionTapCallback
wrap_TapActionTapCallback :: forall a.
GObject a =>
(a -> TapActionTapCallback) -> C_TapActionTapCallback
wrap_TapActionTapCallback a -> TapActionTapCallback
gi'cb Ptr TapAction
gi'selfPtr Ptr Actor
actor Ptr ()
_ = do
Actor
actor' <- ((ManagedPtr Actor -> Actor) -> Ptr Actor -> IO Actor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Actor -> Actor
Clutter.Actor.Actor) Ptr Actor
actor
Ptr TapAction -> (TapAction -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr TapAction
gi'selfPtr ((TapAction -> IO ()) -> IO ()) -> (TapAction -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \TapAction
gi'self -> a -> TapActionTapCallback
gi'cb (TapAction -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TapAction
gi'self) Actor
actor'
onTapActionTap :: (IsTapAction a, MonadIO m) => a -> ((?self :: a) => TapActionTapCallback) -> m SignalHandlerId
onTapActionTap :: forall a (m :: * -> *).
(IsTapAction a, MonadIO m) =>
a -> ((?self::a) => TapActionTapCallback) -> m SignalHandlerId
onTapActionTap a
obj (?self::a) => TapActionTapCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TapActionTapCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TapActionTapCallback
TapActionTapCallback
cb
let wrapped' :: C_TapActionTapCallback
wrapped' = (a -> TapActionTapCallback) -> C_TapActionTapCallback
forall a.
GObject a =>
(a -> TapActionTapCallback) -> C_TapActionTapCallback
wrap_TapActionTapCallback a -> TapActionTapCallback
wrapped
FunPtr C_TapActionTapCallback
wrapped'' <- C_TapActionTapCallback -> IO (FunPtr C_TapActionTapCallback)
mk_TapActionTapCallback C_TapActionTapCallback
wrapped'
a
-> Text
-> FunPtr C_TapActionTapCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tap" FunPtr C_TapActionTapCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTapActionTap :: (IsTapAction a, MonadIO m) => a -> ((?self :: a) => TapActionTapCallback) -> m SignalHandlerId
afterTapActionTap :: forall a (m :: * -> *).
(IsTapAction a, MonadIO m) =>
a -> ((?self::a) => TapActionTapCallback) -> m SignalHandlerId
afterTapActionTap a
obj (?self::a) => TapActionTapCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TapActionTapCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TapActionTapCallback
TapActionTapCallback
cb
let wrapped' :: C_TapActionTapCallback
wrapped' = (a -> TapActionTapCallback) -> C_TapActionTapCallback
forall a.
GObject a =>
(a -> TapActionTapCallback) -> C_TapActionTapCallback
wrap_TapActionTapCallback a -> TapActionTapCallback
wrapped
FunPtr C_TapActionTapCallback
wrapped'' <- C_TapActionTapCallback -> IO (FunPtr C_TapActionTapCallback)
mk_TapActionTapCallback C_TapActionTapCallback
wrapped'
a
-> Text
-> FunPtr C_TapActionTapCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tap" FunPtr C_TapActionTapCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TapActionTapSignalInfo
instance SignalInfo TapActionTapSignalInfo where
type HaskellCallbackType TapActionTapSignalInfo = TapActionTapCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TapActionTapCallback cb
cb'' <- mk_TapActionTapCallback cb'
connectSignalFunPtr obj "tap" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.TapAction::tap"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.6/docs/GI-Clutter-Objects-TapAction.html#g:signal:tap"})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TapAction
type instance O.AttributeList TapAction = TapActionAttributeList
type TapActionAttributeList = ('[ '("actor", Clutter.ActorMeta.ActorMetaActorPropertyInfo), '("enabled", Clutter.ActorMeta.ActorMetaEnabledPropertyInfo), '("nTouchPoints", Clutter.GestureAction.GestureActionNTouchPointsPropertyInfo), '("name", Clutter.ActorMeta.ActorMetaNamePropertyInfo), '("thresholdTriggerDistanceX", Clutter.GestureAction.GestureActionThresholdTriggerDistanceXPropertyInfo), '("thresholdTriggerDistanceY", Clutter.GestureAction.GestureActionThresholdTriggerDistanceYPropertyInfo), '("thresholdTriggerEdge", Clutter.GestureAction.GestureActionThresholdTriggerEdgePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TapAction = TapActionSignalList
type TapActionSignalList = ('[ '("gestureBegin", Clutter.GestureAction.GestureActionGestureBeginSignalInfo), '("gestureCancel", Clutter.GestureAction.GestureActionGestureCancelSignalInfo), '("gestureEnd", Clutter.GestureAction.GestureActionGestureEndSignalInfo), '("gestureProgress", Clutter.GestureAction.GestureActionGestureProgressSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("tap", TapActionTapSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "clutter_tap_action_new" clutter_tap_action_new ::
IO (Ptr TapAction)
tapActionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m TapAction
tapActionNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m TapAction
tapActionNew = IO TapAction -> m TapAction
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TapAction -> m TapAction) -> IO TapAction -> m TapAction
forall a b. (a -> b) -> a -> b
$ do
Ptr TapAction
result <- IO (Ptr TapAction)
clutter_tap_action_new
Text -> Ptr TapAction -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"tapActionNew" Ptr TapAction
result
TapAction
result' <- ((ManagedPtr TapAction -> TapAction)
-> Ptr TapAction -> IO TapAction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TapAction -> TapAction
TapAction) Ptr TapAction
result
TapAction -> IO TapAction
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TapAction
result'
#if defined(ENABLE_OVERLOADING)
#endif