{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Gesture
(
Gesture(..) ,
IsGesture ,
toGesture ,
#if defined(ENABLE_OVERLOADING)
ResolveGestureMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
GestureGetBoundingBoxMethodInfo ,
#endif
gestureGetBoundingBox ,
#if defined(ENABLE_OVERLOADING)
GestureGetBoundingBoxCenterMethodInfo ,
#endif
gestureGetBoundingBoxCenter ,
#if defined(ENABLE_OVERLOADING)
GestureGetDeviceMethodInfo ,
#endif
gestureGetDevice ,
#if defined(ENABLE_OVERLOADING)
GestureGetGroupMethodInfo ,
#endif
gestureGetGroup ,
#if defined(ENABLE_OVERLOADING)
GestureGetLastEventMethodInfo ,
#endif
gestureGetLastEvent ,
#if defined(ENABLE_OVERLOADING)
GestureGetLastUpdatedSequenceMethodInfo ,
#endif
gestureGetLastUpdatedSequence ,
#if defined(ENABLE_OVERLOADING)
GestureGetPointMethodInfo ,
#endif
gestureGetPoint ,
#if defined(ENABLE_OVERLOADING)
GestureGetSequenceStateMethodInfo ,
#endif
gestureGetSequenceState ,
#if defined(ENABLE_OVERLOADING)
GestureGetSequencesMethodInfo ,
#endif
gestureGetSequences ,
#if defined(ENABLE_OVERLOADING)
GestureGetWindowMethodInfo ,
#endif
gestureGetWindow ,
#if defined(ENABLE_OVERLOADING)
GestureGroupMethodInfo ,
#endif
gestureGroup ,
#if defined(ENABLE_OVERLOADING)
GestureHandlesSequenceMethodInfo ,
#endif
gestureHandlesSequence ,
#if defined(ENABLE_OVERLOADING)
GestureIsActiveMethodInfo ,
#endif
gestureIsActive ,
#if defined(ENABLE_OVERLOADING)
GestureIsGroupedWithMethodInfo ,
#endif
gestureIsGroupedWith ,
#if defined(ENABLE_OVERLOADING)
GestureIsRecognizedMethodInfo ,
#endif
gestureIsRecognized ,
#if defined(ENABLE_OVERLOADING)
GestureSetSequenceStateMethodInfo ,
#endif
gestureSetSequenceState ,
#if defined(ENABLE_OVERLOADING)
GestureSetStateMethodInfo ,
#endif
gestureSetState ,
#if defined(ENABLE_OVERLOADING)
GestureSetWindowMethodInfo ,
#endif
gestureSetWindow ,
#if defined(ENABLE_OVERLOADING)
GestureUngroupMethodInfo ,
#endif
gestureUngroup ,
#if defined(ENABLE_OVERLOADING)
GestureNPointsPropertyInfo ,
#endif
constructGestureNPoints ,
#if defined(ENABLE_OVERLOADING)
gestureNPoints ,
#endif
getGestureNPoints ,
#if defined(ENABLE_OVERLOADING)
GestureWindowPropertyInfo ,
#endif
clearGestureWindow ,
constructGestureWindow ,
#if defined(ENABLE_OVERLOADING)
gestureWindow ,
#endif
getGestureWindow ,
setGestureWindow ,
GestureBeginCallback ,
#if defined(ENABLE_OVERLOADING)
GestureBeginSignalInfo ,
#endif
afterGestureBegin ,
onGestureBegin ,
GestureCancelCallback ,
#if defined(ENABLE_OVERLOADING)
GestureCancelSignalInfo ,
#endif
afterGestureCancel ,
onGestureCancel ,
GestureEndCallback ,
#if defined(ENABLE_OVERLOADING)
GestureEndSignalInfo ,
#endif
afterGestureEnd ,
onGestureEnd ,
GestureSequenceStateChangedCallback ,
#if defined(ENABLE_OVERLOADING)
GestureSequenceStateChangedSignalInfo ,
#endif
afterGestureSequenceStateChanged ,
onGestureSequenceStateChanged ,
GestureUpdateCallback ,
#if defined(ENABLE_OVERLOADING)
GestureUpdateSignalInfo ,
#endif
afterGestureUpdate ,
onGestureUpdate ,
) 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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Window as Gdk.Window
import qualified GI.Gdk.Structs.EventSequence as Gdk.EventSequence
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gdk.Unions.Event as Gdk.Event
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
newtype Gesture = Gesture (SP.ManagedPtr Gesture)
deriving (Gesture -> Gesture -> Bool
(Gesture -> Gesture -> Bool)
-> (Gesture -> Gesture -> Bool) -> Eq Gesture
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Gesture -> Gesture -> Bool
== :: Gesture -> Gesture -> Bool
$c/= :: Gesture -> Gesture -> Bool
/= :: Gesture -> Gesture -> Bool
Eq)
instance SP.ManagedPtrNewtype Gesture where
toManagedPtr :: Gesture -> ManagedPtr Gesture
toManagedPtr (Gesture ManagedPtr Gesture
p) = ManagedPtr Gesture
p
foreign import ccall "gtk_gesture_get_type"
c_gtk_gesture_get_type :: IO B.Types.GType
instance B.Types.TypedObject Gesture where
glibType :: IO GType
glibType = IO GType
c_gtk_gesture_get_type
instance B.Types.GObject Gesture
class (SP.GObject o, O.IsDescendantOf Gesture o) => IsGesture o
instance (SP.GObject o, O.IsDescendantOf Gesture o) => IsGesture o
instance O.HasParentTypes Gesture
type instance O.ParentTypes Gesture = '[Gtk.EventController.EventController, GObject.Object.Object]
toGesture :: (MIO.MonadIO m, IsGesture o) => o -> m Gesture
toGesture :: forall (m :: * -> *) o. (MonadIO m, IsGesture o) => o -> m Gesture
toGesture = IO Gesture -> m Gesture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Gesture -> m Gesture) -> (o -> IO Gesture) -> o -> m Gesture
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Gesture -> Gesture) -> o -> IO Gesture
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Gesture -> Gesture
Gesture
instance B.GValue.IsGValue (Maybe Gesture) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_gesture_get_type
gvalueSet_ :: Ptr GValue -> Maybe Gesture -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Gesture
P.Nothing = Ptr GValue -> Ptr Gesture -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Gesture
forall a. Ptr a
FP.nullPtr :: FP.Ptr Gesture)
gvalueSet_ Ptr GValue
gv (P.Just Gesture
obj) = Gesture -> (Ptr Gesture -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Gesture
obj (Ptr GValue -> Ptr Gesture -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Gesture)
gvalueGet_ Ptr GValue
gv = do
Ptr Gesture
ptr <- Ptr GValue -> IO (Ptr Gesture)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Gesture)
if Ptr Gesture
ptr Ptr Gesture -> Ptr Gesture -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Gesture
forall a. Ptr a
FP.nullPtr
then Gesture -> Maybe Gesture
forall a. a -> Maybe a
P.Just (Gesture -> Maybe Gesture) -> IO Gesture -> IO (Maybe Gesture)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Gesture -> Gesture) -> Ptr Gesture -> IO Gesture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Gesture -> Gesture
Gesture Ptr Gesture
ptr
else Maybe Gesture -> IO (Maybe Gesture)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Gesture
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveGestureMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveGestureMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveGestureMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveGestureMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveGestureMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveGestureMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveGestureMethod "group" o = GestureGroupMethodInfo
ResolveGestureMethod "handleEvent" o = Gtk.EventController.EventControllerHandleEventMethodInfo
ResolveGestureMethod "handlesSequence" o = GestureHandlesSequenceMethodInfo
ResolveGestureMethod "isActive" o = GestureIsActiveMethodInfo
ResolveGestureMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveGestureMethod "isGroupedWith" o = GestureIsGroupedWithMethodInfo
ResolveGestureMethod "isRecognized" o = GestureIsRecognizedMethodInfo
ResolveGestureMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveGestureMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveGestureMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveGestureMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveGestureMethod "reset" o = Gtk.EventController.EventControllerResetMethodInfo
ResolveGestureMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveGestureMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveGestureMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveGestureMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveGestureMethod "ungroup" o = GestureUngroupMethodInfo
ResolveGestureMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveGestureMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveGestureMethod "getBoundingBox" o = GestureGetBoundingBoxMethodInfo
ResolveGestureMethod "getBoundingBoxCenter" o = GestureGetBoundingBoxCenterMethodInfo
ResolveGestureMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveGestureMethod "getDevice" o = GestureGetDeviceMethodInfo
ResolveGestureMethod "getGroup" o = GestureGetGroupMethodInfo
ResolveGestureMethod "getLastEvent" o = GestureGetLastEventMethodInfo
ResolveGestureMethod "getLastUpdatedSequence" o = GestureGetLastUpdatedSequenceMethodInfo
ResolveGestureMethod "getPoint" o = GestureGetPointMethodInfo
ResolveGestureMethod "getPropagationPhase" o = Gtk.EventController.EventControllerGetPropagationPhaseMethodInfo
ResolveGestureMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveGestureMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveGestureMethod "getSequenceState" o = GestureGetSequenceStateMethodInfo
ResolveGestureMethod "getSequences" o = GestureGetSequencesMethodInfo
ResolveGestureMethod "getWidget" o = Gtk.EventController.EventControllerGetWidgetMethodInfo
ResolveGestureMethod "getWindow" o = GestureGetWindowMethodInfo
ResolveGestureMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveGestureMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveGestureMethod "setPropagationPhase" o = Gtk.EventController.EventControllerSetPropagationPhaseMethodInfo
ResolveGestureMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveGestureMethod "setSequenceState" o = GestureSetSequenceStateMethodInfo
ResolveGestureMethod "setState" o = GestureSetStateMethodInfo
ResolveGestureMethod "setWindow" o = GestureSetWindowMethodInfo
ResolveGestureMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveGestureMethod t Gesture, O.OverloadedMethod info Gesture p) => OL.IsLabel t (Gesture -> 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 ~ ResolveGestureMethod t Gesture, O.OverloadedMethod info Gesture p, R.HasField t Gesture p) => R.HasField t Gesture p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveGestureMethod t Gesture, O.OverloadedMethodInfo info Gesture) => OL.IsLabel t (O.MethodProxy info Gesture) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type GestureBeginCallback =
Maybe Gdk.EventSequence.EventSequence
-> IO ()
type C_GestureBeginCallback =
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureBeginCallback :: C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
wrap_GestureBeginCallback ::
GObject a => (a -> GestureBeginCallback) ->
C_GestureBeginCallback
wrap_GestureBeginCallback :: forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureBeginCallback a -> GestureBeginCallback
gi'cb Ptr Gesture
gi'selfPtr Ptr EventSequence
sequence Ptr ()
_ = do
Maybe EventSequence
maybeSequence <-
if Ptr EventSequence
sequence Ptr EventSequence -> Ptr EventSequence -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr EventSequence
forall a. Ptr a
nullPtr
then Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
forall a. Maybe a
Nothing
else do
Ptr EventSequence
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr EventSequence
sequence ((EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence))
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe EventSequence -> IO (Maybe EventSequence))
-> Maybe EventSequence -> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ EventSequence -> Maybe EventSequence
forall a. a -> Maybe a
Just EventSequence
sequence'
Ptr Gesture -> (Gesture -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Gesture
gi'selfPtr ((Gesture -> IO ()) -> IO ()) -> (Gesture -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Gesture
gi'self -> a -> GestureBeginCallback
gi'cb (Gesture -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Gesture
gi'self) Maybe EventSequence
maybeSequence
onGestureBegin :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureBeginCallback) -> m SignalHandlerId
onGestureBegin :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
onGestureBegin a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureBeginCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureBeginCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"begin" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureBegin :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureBeginCallback) -> m SignalHandlerId
afterGestureBegin :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
afterGestureBegin a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureBeginCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureBeginCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"begin" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data GestureBeginSignalInfo
instance SignalInfo GestureBeginSignalInfo where
type HaskellCallbackType GestureBeginSignalInfo = GestureBeginCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_GestureBeginCallback cb
cb'' <- mk_GestureBeginCallback cb'
connectSignalFunPtr obj "begin" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture::begin"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:signal:begin"})
#endif
type GestureCancelCallback =
Maybe Gdk.EventSequence.EventSequence
-> IO ()
type C_GestureCancelCallback =
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureCancelCallback :: C_GestureCancelCallback -> IO (FunPtr C_GestureCancelCallback)
wrap_GestureCancelCallback ::
GObject a => (a -> GestureCancelCallback) ->
C_GestureCancelCallback
wrap_GestureCancelCallback :: forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureCancelCallback a -> GestureBeginCallback
gi'cb Ptr Gesture
gi'selfPtr Ptr EventSequence
sequence Ptr ()
_ = do
Maybe EventSequence
maybeSequence <-
if Ptr EventSequence
sequence Ptr EventSequence -> Ptr EventSequence -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr EventSequence
forall a. Ptr a
nullPtr
then Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
forall a. Maybe a
Nothing
else do
Ptr EventSequence
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr EventSequence
sequence ((EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence))
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe EventSequence -> IO (Maybe EventSequence))
-> Maybe EventSequence -> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ EventSequence -> Maybe EventSequence
forall a. a -> Maybe a
Just EventSequence
sequence'
Ptr Gesture -> (Gesture -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Gesture
gi'selfPtr ((Gesture -> IO ()) -> IO ()) -> (Gesture -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Gesture
gi'self -> a -> GestureBeginCallback
gi'cb (Gesture -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Gesture
gi'self) Maybe EventSequence
maybeSequence
onGestureCancel :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureCancelCallback) -> m SignalHandlerId
onGestureCancel :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
onGestureCancel a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureCancelCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureCancelCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"cancel" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureCancel :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureCancelCallback) -> m SignalHandlerId
afterGestureCancel :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
afterGestureCancel a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureCancelCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureCancelCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"cancel" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data GestureCancelSignalInfo
instance SignalInfo GestureCancelSignalInfo where
type HaskellCallbackType GestureCancelSignalInfo = GestureCancelCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_GestureCancelCallback cb
cb'' <- mk_GestureCancelCallback cb'
connectSignalFunPtr obj "cancel" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture::cancel"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:signal:cancel"})
#endif
type GestureEndCallback =
Maybe Gdk.EventSequence.EventSequence
-> IO ()
type C_GestureEndCallback =
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureEndCallback :: C_GestureEndCallback -> IO (FunPtr C_GestureEndCallback)
wrap_GestureEndCallback ::
GObject a => (a -> GestureEndCallback) ->
C_GestureEndCallback
wrap_GestureEndCallback :: forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureEndCallback a -> GestureBeginCallback
gi'cb Ptr Gesture
gi'selfPtr Ptr EventSequence
sequence Ptr ()
_ = do
Maybe EventSequence
maybeSequence <-
if Ptr EventSequence
sequence Ptr EventSequence -> Ptr EventSequence -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr EventSequence
forall a. Ptr a
nullPtr
then Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
forall a. Maybe a
Nothing
else do
Ptr EventSequence
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr EventSequence
sequence ((EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence))
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe EventSequence -> IO (Maybe EventSequence))
-> Maybe EventSequence -> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ EventSequence -> Maybe EventSequence
forall a. a -> Maybe a
Just EventSequence
sequence'
Ptr Gesture -> (Gesture -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Gesture
gi'selfPtr ((Gesture -> IO ()) -> IO ()) -> (Gesture -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Gesture
gi'self -> a -> GestureBeginCallback
gi'cb (Gesture -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Gesture
gi'self) Maybe EventSequence
maybeSequence
onGestureEnd :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureEndCallback) -> m SignalHandlerId
onGestureEnd :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
onGestureEnd a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureEndCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureEndCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"end" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureEnd :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureEndCallback) -> m SignalHandlerId
afterGestureEnd :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
afterGestureEnd a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureEndCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureEndCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"end" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data GestureEndSignalInfo
instance SignalInfo GestureEndSignalInfo where
type HaskellCallbackType GestureEndSignalInfo = GestureEndCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_GestureEndCallback cb
cb'' <- mk_GestureEndCallback cb'
connectSignalFunPtr obj "end" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture::end"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:signal:end"})
#endif
type GestureSequenceStateChangedCallback =
Maybe Gdk.EventSequence.EventSequence
-> Gtk.Enums.EventSequenceState
-> IO ()
type C_GestureSequenceStateChangedCallback =
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
CUInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureSequenceStateChangedCallback :: C_GestureSequenceStateChangedCallback -> IO (FunPtr C_GestureSequenceStateChangedCallback)
wrap_GestureSequenceStateChangedCallback ::
GObject a => (a -> GestureSequenceStateChangedCallback) ->
C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback :: forall a.
GObject a =>
(a -> GestureSequenceStateChangedCallback)
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback a -> GestureSequenceStateChangedCallback
gi'cb Ptr Gesture
gi'selfPtr Ptr EventSequence
sequence CUInt
state Ptr ()
_ = do
Maybe EventSequence
maybeSequence <-
if Ptr EventSequence
sequence Ptr EventSequence -> Ptr EventSequence -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr EventSequence
forall a. Ptr a
nullPtr
then Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
forall a. Maybe a
Nothing
else do
Ptr EventSequence
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr EventSequence
sequence ((EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence))
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe EventSequence -> IO (Maybe EventSequence))
-> Maybe EventSequence -> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ EventSequence -> Maybe EventSequence
forall a. a -> Maybe a
Just EventSequence
sequence'
let state' :: EventSequenceState
state' = (Int -> EventSequenceState
forall a. Enum a => Int -> a
toEnum (Int -> EventSequenceState)
-> (CUInt -> Int) -> CUInt -> EventSequenceState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
state
Ptr Gesture -> (Gesture -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Gesture
gi'selfPtr ((Gesture -> IO ()) -> IO ()) -> (Gesture -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Gesture
gi'self -> a -> GestureSequenceStateChangedCallback
gi'cb (Gesture -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Gesture
gi'self) Maybe EventSequence
maybeSequence EventSequenceState
state'
onGestureSequenceStateChanged :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureSequenceStateChangedCallback) -> m SignalHandlerId
onGestureSequenceStateChanged :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a
-> ((?self::a) => GestureSequenceStateChangedCallback)
-> m SignalHandlerId
onGestureSequenceStateChanged a
obj (?self::a) => GestureSequenceStateChangedCallback
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 -> GestureSequenceStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureSequenceStateChangedCallback
GestureSequenceStateChangedCallback
cb
let wrapped' :: C_GestureSequenceStateChangedCallback
wrapped' = (a -> GestureSequenceStateChangedCallback)
-> C_GestureSequenceStateChangedCallback
forall a.
GObject a =>
(a -> GestureSequenceStateChangedCallback)
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback a -> GestureSequenceStateChangedCallback
wrapped
FunPtr C_GestureSequenceStateChangedCallback
wrapped'' <- C_GestureSequenceStateChangedCallback
-> IO (FunPtr C_GestureSequenceStateChangedCallback)
mk_GestureSequenceStateChangedCallback C_GestureSequenceStateChangedCallback
wrapped'
a
-> Text
-> FunPtr C_GestureSequenceStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"sequence-state-changed" FunPtr C_GestureSequenceStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureSequenceStateChanged :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureSequenceStateChangedCallback) -> m SignalHandlerId
afterGestureSequenceStateChanged :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a
-> ((?self::a) => GestureSequenceStateChangedCallback)
-> m SignalHandlerId
afterGestureSequenceStateChanged a
obj (?self::a) => GestureSequenceStateChangedCallback
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 -> GestureSequenceStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureSequenceStateChangedCallback
GestureSequenceStateChangedCallback
cb
let wrapped' :: C_GestureSequenceStateChangedCallback
wrapped' = (a -> GestureSequenceStateChangedCallback)
-> C_GestureSequenceStateChangedCallback
forall a.
GObject a =>
(a -> GestureSequenceStateChangedCallback)
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback a -> GestureSequenceStateChangedCallback
wrapped
FunPtr C_GestureSequenceStateChangedCallback
wrapped'' <- C_GestureSequenceStateChangedCallback
-> IO (FunPtr C_GestureSequenceStateChangedCallback)
mk_GestureSequenceStateChangedCallback C_GestureSequenceStateChangedCallback
wrapped'
a
-> Text
-> FunPtr C_GestureSequenceStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"sequence-state-changed" FunPtr C_GestureSequenceStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data GestureSequenceStateChangedSignalInfo
instance SignalInfo GestureSequenceStateChangedSignalInfo where
type HaskellCallbackType GestureSequenceStateChangedSignalInfo = GestureSequenceStateChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_GestureSequenceStateChangedCallback cb
cb'' <- mk_GestureSequenceStateChangedCallback cb'
connectSignalFunPtr obj "sequence-state-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture::sequence-state-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:signal:sequenceStateChanged"})
#endif
type GestureUpdateCallback =
Maybe Gdk.EventSequence.EventSequence
-> IO ()
type C_GestureUpdateCallback =
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureUpdateCallback :: C_GestureUpdateCallback -> IO (FunPtr C_GestureUpdateCallback)
wrap_GestureUpdateCallback ::
GObject a => (a -> GestureUpdateCallback) ->
C_GestureUpdateCallback
wrap_GestureUpdateCallback :: forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureUpdateCallback a -> GestureBeginCallback
gi'cb Ptr Gesture
gi'selfPtr Ptr EventSequence
sequence Ptr ()
_ = do
Maybe EventSequence
maybeSequence <-
if Ptr EventSequence
sequence Ptr EventSequence -> Ptr EventSequence -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr EventSequence
forall a. Ptr a
nullPtr
then Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
forall a. Maybe a
Nothing
else do
Ptr EventSequence
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr EventSequence
sequence ((EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence))
-> (EventSequence -> IO (Maybe EventSequence))
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe EventSequence -> IO (Maybe EventSequence))
-> Maybe EventSequence -> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ EventSequence -> Maybe EventSequence
forall a. a -> Maybe a
Just EventSequence
sequence'
Ptr Gesture -> (Gesture -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Gesture
gi'selfPtr ((Gesture -> IO ()) -> IO ()) -> (Gesture -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Gesture
gi'self -> a -> GestureBeginCallback
gi'cb (Gesture -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Gesture
gi'self) Maybe EventSequence
maybeSequence
onGestureUpdate :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureUpdateCallback) -> m SignalHandlerId
onGestureUpdate :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
onGestureUpdate a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureUpdateCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureUpdateCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"update" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureUpdate :: (IsGesture a, MonadIO m) => a -> ((?self :: a) => GestureUpdateCallback) -> m SignalHandlerId
afterGestureUpdate :: forall a (m :: * -> *).
(IsGesture a, MonadIO m) =>
a -> ((?self::a) => GestureBeginCallback) -> m SignalHandlerId
afterGestureUpdate a
obj (?self::a) => GestureBeginCallback
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 -> GestureBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => GestureBeginCallback
GestureBeginCallback
cb
let wrapped' :: C_GestureBeginCallback
wrapped' = (a -> GestureBeginCallback) -> C_GestureBeginCallback
forall a.
GObject a =>
(a -> GestureBeginCallback) -> C_GestureBeginCallback
wrap_GestureUpdateCallback a -> GestureBeginCallback
wrapped
FunPtr C_GestureBeginCallback
wrapped'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureUpdateCallback C_GestureBeginCallback
wrapped'
a
-> Text
-> FunPtr C_GestureBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"update" FunPtr C_GestureBeginCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data GestureUpdateSignalInfo
instance SignalInfo GestureUpdateSignalInfo where
type HaskellCallbackType GestureUpdateSignalInfo = GestureUpdateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_GestureUpdateCallback cb
cb'' <- mk_GestureUpdateCallback cb'
connectSignalFunPtr obj "update" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture::update"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:signal:update"})
#endif
getGestureNPoints :: (MonadIO m, IsGesture o) => o -> m Word32
getGestureNPoints :: forall (m :: * -> *) o. (MonadIO m, IsGesture o) => o -> m Word32
getGestureNPoints o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"n-points"
constructGestureNPoints :: (IsGesture o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructGestureNPoints :: forall o (m :: * -> *).
(IsGesture o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructGestureNPoints Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"n-points" Word32
val
#if defined(ENABLE_OVERLOADING)
data GestureNPointsPropertyInfo
instance AttrInfo GestureNPointsPropertyInfo where
type AttrAllowedOps GestureNPointsPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint GestureNPointsPropertyInfo = IsGesture
type AttrSetTypeConstraint GestureNPointsPropertyInfo = (~) Word32
type AttrTransferTypeConstraint GestureNPointsPropertyInfo = (~) Word32
type AttrTransferType GestureNPointsPropertyInfo = Word32
type AttrGetType GestureNPointsPropertyInfo = Word32
type AttrLabel GestureNPointsPropertyInfo = "n-points"
type AttrOrigin GestureNPointsPropertyInfo = Gesture
attrGet = getGestureNPoints
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructGestureNPoints
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.nPoints"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:attr:nPoints"
})
#endif
getGestureWindow :: (MonadIO m, IsGesture o) => o -> m (Maybe Gdk.Window.Window)
getGestureWindow :: forall (m :: * -> *) o.
(MonadIO m, IsGesture o) =>
o -> m (Maybe Window)
getGestureWindow o
obj = IO (Maybe Window) -> m (Maybe Window)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Window -> Window) -> IO (Maybe Window)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"window" ManagedPtr Window -> Window
Gdk.Window.Window
setGestureWindow :: (MonadIO m, IsGesture o, Gdk.Window.IsWindow a) => o -> a -> m ()
setGestureWindow :: forall (m :: * -> *) o a.
(MonadIO m, IsGesture o, IsWindow a) =>
o -> a -> m ()
setGestureWindow o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"window" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructGestureWindow :: (IsGesture o, MIO.MonadIO m, Gdk.Window.IsWindow a) => a -> m (GValueConstruct o)
constructGestureWindow :: forall o (m :: * -> *) a.
(IsGesture o, MonadIO m, IsWindow a) =>
a -> m (GValueConstruct o)
constructGestureWindow a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"window" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearGestureWindow :: (MonadIO m, IsGesture o) => o -> m ()
clearGestureWindow :: forall (m :: * -> *) o. (MonadIO m, IsGesture o) => o -> m ()
clearGestureWindow o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Window -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"window" (Maybe Window
forall a. Maybe a
Nothing :: Maybe Gdk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data GestureWindowPropertyInfo
instance AttrInfo GestureWindowPropertyInfo where
type AttrAllowedOps GestureWindowPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint GestureWindowPropertyInfo = IsGesture
type AttrSetTypeConstraint GestureWindowPropertyInfo = Gdk.Window.IsWindow
type AttrTransferTypeConstraint GestureWindowPropertyInfo = Gdk.Window.IsWindow
type AttrTransferType GestureWindowPropertyInfo = Gdk.Window.Window
type AttrGetType GestureWindowPropertyInfo = (Maybe Gdk.Window.Window)
type AttrLabel GestureWindowPropertyInfo = "window"
type AttrOrigin GestureWindowPropertyInfo = Gesture
attrGet = getGestureWindow
attrSet = setGestureWindow
attrTransfer _ v = do
unsafeCastTo Gdk.Window.Window v
attrConstruct = constructGestureWindow
attrClear = clearGestureWindow
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.window"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#g:attr:window"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Gesture
type instance O.AttributeList Gesture = GestureAttributeList
type GestureAttributeList = ('[ '("nPoints", GestureNPointsPropertyInfo), '("propagationPhase", Gtk.EventController.EventControllerPropagationPhasePropertyInfo), '("widget", Gtk.EventController.EventControllerWidgetPropertyInfo), '("window", GestureWindowPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
gestureNPoints :: AttrLabelProxy "nPoints"
gestureNPoints = AttrLabelProxy
gestureWindow :: AttrLabelProxy "window"
gestureWindow = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Gesture = GestureSignalList
type GestureSignalList = ('[ '("begin", GestureBeginSignalInfo), '("cancel", GestureCancelSignalInfo), '("end", GestureEndSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("sequenceStateChanged", GestureSequenceStateChangedSignalInfo), '("update", GestureUpdateSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_gesture_get_bounding_box" gtk_gesture_get_bounding_box ::
Ptr Gesture ->
Ptr Gdk.Rectangle.Rectangle ->
IO CInt
gestureGetBoundingBox ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m ((Bool, Gdk.Rectangle.Rectangle))
gestureGetBoundingBox :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m (Bool, Rectangle)
gestureGetBoundingBox a
gesture = IO (Bool, Rectangle) -> m (Bool, Rectangle)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Rectangle) -> m (Bool, Rectangle))
-> IO (Bool, Rectangle) -> m (Bool, Rectangle)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr Rectangle
rect <- Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Gdk.Rectangle.Rectangle)
CInt
result <- Ptr Gesture -> Ptr Rectangle -> IO CInt
gtk_gesture_get_bounding_box Ptr Gesture
gesture' Ptr Rectangle
rect
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Rectangle
rect' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
rect
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
(Bool, Rectangle) -> IO (Bool, Rectangle)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Rectangle
rect')
#if defined(ENABLE_OVERLOADING)
data GestureGetBoundingBoxMethodInfo
instance (signature ~ (m ((Bool, Gdk.Rectangle.Rectangle))), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetBoundingBoxMethodInfo a signature where
overloadedMethod = gestureGetBoundingBox
instance O.OverloadedMethodInfo GestureGetBoundingBoxMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetBoundingBox",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetBoundingBox"
})
#endif
foreign import ccall "gtk_gesture_get_bounding_box_center" gtk_gesture_get_bounding_box_center ::
Ptr Gesture ->
Ptr CDouble ->
Ptr CDouble ->
IO CInt
gestureGetBoundingBoxCenter ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m ((Bool, Double, Double))
gestureGetBoundingBoxCenter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m (Bool, Double, Double)
gestureGetBoundingBoxCenter a
gesture = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr CDouble
x <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
y <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Gesture -> Ptr CDouble -> Ptr CDouble -> IO CInt
gtk_gesture_get_bounding_box_center Ptr Gesture
gesture' Ptr CDouble
x Ptr CDouble
y
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
x' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
x
let x'' :: Double
x'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x'
CDouble
y' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
y
let y'' :: Double
y'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
x
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
y
(Bool, Double, Double) -> IO (Bool, Double, Double)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
x'', Double
y'')
#if defined(ENABLE_OVERLOADING)
data GestureGetBoundingBoxCenterMethodInfo
instance (signature ~ (m ((Bool, Double, Double))), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetBoundingBoxCenterMethodInfo a signature where
overloadedMethod = gestureGetBoundingBoxCenter
instance O.OverloadedMethodInfo GestureGetBoundingBoxCenterMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetBoundingBoxCenter",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetBoundingBoxCenter"
})
#endif
foreign import ccall "gtk_gesture_get_device" gtk_gesture_get_device ::
Ptr Gesture ->
IO (Ptr Gdk.Device.Device)
gestureGetDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m (Maybe Gdk.Device.Device)
gestureGetDevice :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m (Maybe Device)
gestureGetDevice a
gesture = IO (Maybe Device) -> m (Maybe Device)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Device) -> m (Maybe Device))
-> IO (Maybe Device) -> m (Maybe Device)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr Device
result <- Ptr Gesture -> IO (Ptr Device)
gtk_gesture_get_device Ptr Gesture
gesture'
Maybe Device
maybeResult <- Ptr Device -> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Device
result ((Ptr Device -> IO Device) -> IO (Maybe Device))
-> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. (a -> b) -> a -> b
$ \Ptr Device
result' -> do
Device
result'' <- ((ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Device -> Device
Gdk.Device.Device) Ptr Device
result'
Device -> IO Device
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Device
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe Device -> IO (Maybe Device)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
maybeResult
#if defined(ENABLE_OVERLOADING)
data GestureGetDeviceMethodInfo
instance (signature ~ (m (Maybe Gdk.Device.Device)), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetDeviceMethodInfo a signature where
overloadedMethod = gestureGetDevice
instance O.OverloadedMethodInfo GestureGetDeviceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetDevice",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetDevice"
})
#endif
foreign import ccall "gtk_gesture_get_group" gtk_gesture_get_group ::
Ptr Gesture ->
IO (Ptr (GList (Ptr Gesture)))
gestureGetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m [Gesture]
gestureGetGroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m [Gesture]
gestureGetGroup a
gesture = IO [Gesture] -> m [Gesture]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Gesture] -> m [Gesture]) -> IO [Gesture] -> m [Gesture]
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr (GList (Ptr Gesture))
result <- Ptr Gesture -> IO (Ptr (GList (Ptr Gesture)))
gtk_gesture_get_group Ptr Gesture
gesture'
[Ptr Gesture]
result' <- Ptr (GList (Ptr Gesture)) -> IO [Ptr Gesture]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Gesture))
result
[Gesture]
result'' <- (Ptr Gesture -> IO Gesture) -> [Ptr Gesture] -> IO [Gesture]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Gesture -> Gesture) -> Ptr Gesture -> IO Gesture
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Gesture -> Gesture
Gesture) [Ptr Gesture]
result'
Ptr (GList (Ptr Gesture)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Gesture))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
[Gesture] -> IO [Gesture]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Gesture]
result''
#if defined(ENABLE_OVERLOADING)
data GestureGetGroupMethodInfo
instance (signature ~ (m [Gesture]), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetGroupMethodInfo a signature where
overloadedMethod = gestureGetGroup
instance O.OverloadedMethodInfo GestureGetGroupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetGroup"
})
#endif
foreign import ccall "gtk_gesture_get_last_event" gtk_gesture_get_last_event ::
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
IO (Ptr Gdk.Event.Event)
gestureGetLastEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> Maybe (Gdk.EventSequence.EventSequence)
-> m (Maybe Gdk.Event.Event)
gestureGetLastEvent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> Maybe EventSequence -> m (Maybe Event)
gestureGetLastEvent a
gesture Maybe EventSequence
sequence = IO (Maybe Event) -> m (Maybe Event)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr EventSequence
maybeSequence <- case Maybe EventSequence
sequence of
Maybe EventSequence
Nothing -> Ptr EventSequence -> IO (Ptr EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr EventSequence
forall a. Ptr a
nullPtr
Just EventSequence
jSequence -> do
Ptr EventSequence
jSequence' <- EventSequence -> IO (Ptr EventSequence)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr EventSequence
jSequence
Ptr EventSequence -> IO (Ptr EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr EventSequence
jSequence'
Ptr Event
result <- Ptr Gesture -> Ptr EventSequence -> IO (Ptr Event)
gtk_gesture_get_last_event Ptr Gesture
gesture' Ptr EventSequence
maybeSequence
Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \Ptr Event
result' -> do
Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
result'
Event -> IO Event
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe EventSequence -> (EventSequence -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe EventSequence
sequence EventSequence -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Event -> IO (Maybe Event)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult
#if defined(ENABLE_OVERLOADING)
data GestureGetLastEventMethodInfo
instance (signature ~ (Maybe (Gdk.EventSequence.EventSequence) -> m (Maybe Gdk.Event.Event)), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetLastEventMethodInfo a signature where
overloadedMethod = gestureGetLastEvent
instance O.OverloadedMethodInfo GestureGetLastEventMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetLastEvent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetLastEvent"
})
#endif
foreign import ccall "gtk_gesture_get_last_updated_sequence" gtk_gesture_get_last_updated_sequence ::
Ptr Gesture ->
IO (Ptr Gdk.EventSequence.EventSequence)
gestureGetLastUpdatedSequence ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m (Maybe Gdk.EventSequence.EventSequence)
gestureGetLastUpdatedSequence :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m (Maybe EventSequence)
gestureGetLastUpdatedSequence a
gesture = IO (Maybe EventSequence) -> m (Maybe EventSequence)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe EventSequence) -> m (Maybe EventSequence))
-> IO (Maybe EventSequence) -> m (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr EventSequence
result <- Ptr Gesture -> IO (Ptr EventSequence)
gtk_gesture_get_last_updated_sequence Ptr Gesture
gesture'
Maybe EventSequence
maybeResult <- Ptr EventSequence
-> (Ptr EventSequence -> IO EventSequence)
-> IO (Maybe EventSequence)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr EventSequence
result ((Ptr EventSequence -> IO EventSequence)
-> IO (Maybe EventSequence))
-> (Ptr EventSequence -> IO EventSequence)
-> IO (Maybe EventSequence)
forall a b. (a -> b) -> a -> b
$ \Ptr EventSequence
result' -> do
EventSequence
result'' <- ((ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> IO EventSequence
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence) Ptr EventSequence
result'
EventSequence -> IO EventSequence
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return EventSequence
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe EventSequence -> IO (Maybe EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventSequence
maybeResult
#if defined(ENABLE_OVERLOADING)
data GestureGetLastUpdatedSequenceMethodInfo
instance (signature ~ (m (Maybe Gdk.EventSequence.EventSequence)), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetLastUpdatedSequenceMethodInfo a signature where
overloadedMethod = gestureGetLastUpdatedSequence
instance O.OverloadedMethodInfo GestureGetLastUpdatedSequenceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetLastUpdatedSequence",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetLastUpdatedSequence"
})
#endif
foreign import ccall "gtk_gesture_get_point" gtk_gesture_get_point ::
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr CDouble ->
Ptr CDouble ->
IO CInt
gestureGetPoint ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> Maybe (Gdk.EventSequence.EventSequence)
-> m ((Bool, Double, Double))
gestureGetPoint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> Maybe EventSequence -> m (Bool, Double, Double)
gestureGetPoint a
gesture Maybe EventSequence
sequence = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr EventSequence
maybeSequence <- case Maybe EventSequence
sequence of
Maybe EventSequence
Nothing -> Ptr EventSequence -> IO (Ptr EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr EventSequence
forall a. Ptr a
nullPtr
Just EventSequence
jSequence -> do
Ptr EventSequence
jSequence' <- EventSequence -> IO (Ptr EventSequence)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr EventSequence
jSequence
Ptr EventSequence -> IO (Ptr EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr EventSequence
jSequence'
Ptr CDouble
x <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
y <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Gesture
-> Ptr EventSequence -> Ptr CDouble -> Ptr CDouble -> IO CInt
gtk_gesture_get_point Ptr Gesture
gesture' Ptr EventSequence
maybeSequence Ptr CDouble
x Ptr CDouble
y
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
x' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
x
let x'' :: Double
x'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x'
CDouble
y' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
y
let y'' :: Double
y'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe EventSequence -> (EventSequence -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe EventSequence
sequence EventSequence -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
x
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
y
(Bool, Double, Double) -> IO (Bool, Double, Double)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
x'', Double
y'')
#if defined(ENABLE_OVERLOADING)
data GestureGetPointMethodInfo
instance (signature ~ (Maybe (Gdk.EventSequence.EventSequence) -> m ((Bool, Double, Double))), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetPointMethodInfo a signature where
overloadedMethod = gestureGetPoint
instance O.OverloadedMethodInfo GestureGetPointMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetPoint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetPoint"
})
#endif
foreign import ccall "gtk_gesture_get_sequence_state" gtk_gesture_get_sequence_state ::
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
IO CUInt
gestureGetSequenceState ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> Gdk.EventSequence.EventSequence
-> m Gtk.Enums.EventSequenceState
gestureGetSequenceState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> EventSequence -> m EventSequenceState
gestureGetSequenceState a
gesture EventSequence
sequence = IO EventSequenceState -> m EventSequenceState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventSequenceState -> m EventSequenceState)
-> IO EventSequenceState -> m EventSequenceState
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr EventSequence
sequence' <- EventSequence -> IO (Ptr EventSequence)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr EventSequence
sequence
CUInt
result <- Ptr Gesture -> Ptr EventSequence -> IO CUInt
gtk_gesture_get_sequence_state Ptr Gesture
gesture' Ptr EventSequence
sequence'
let result' :: EventSequenceState
result' = (Int -> EventSequenceState
forall a. Enum a => Int -> a
toEnum (Int -> EventSequenceState)
-> (CUInt -> Int) -> CUInt -> EventSequenceState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
EventSequence -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr EventSequence
sequence
EventSequenceState -> IO EventSequenceState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return EventSequenceState
result'
#if defined(ENABLE_OVERLOADING)
data GestureGetSequenceStateMethodInfo
instance (signature ~ (Gdk.EventSequence.EventSequence -> m Gtk.Enums.EventSequenceState), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetSequenceStateMethodInfo a signature where
overloadedMethod = gestureGetSequenceState
instance O.OverloadedMethodInfo GestureGetSequenceStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetSequenceState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetSequenceState"
})
#endif
foreign import ccall "gtk_gesture_get_sequences" gtk_gesture_get_sequences ::
Ptr Gesture ->
IO (Ptr (GList (Ptr Gdk.EventSequence.EventSequence)))
gestureGetSequences ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m [Gdk.EventSequence.EventSequence]
gestureGetSequences :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m [EventSequence]
gestureGetSequences a
gesture = IO [EventSequence] -> m [EventSequence]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventSequence] -> m [EventSequence])
-> IO [EventSequence] -> m [EventSequence]
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr (GList (Ptr EventSequence))
result <- Ptr Gesture -> IO (Ptr (GList (Ptr EventSequence)))
gtk_gesture_get_sequences Ptr Gesture
gesture'
[Ptr EventSequence]
result' <- Ptr (GList (Ptr EventSequence)) -> IO [Ptr EventSequence]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr EventSequence))
result
[EventSequence]
result'' <- (Ptr EventSequence -> IO EventSequence)
-> [Ptr EventSequence] -> IO [EventSequence]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> IO EventSequence
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence) [Ptr EventSequence]
result'
Ptr (GList (Ptr EventSequence)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr EventSequence))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
[EventSequence] -> IO [EventSequence]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [EventSequence]
result''
#if defined(ENABLE_OVERLOADING)
data GestureGetSequencesMethodInfo
instance (signature ~ (m [Gdk.EventSequence.EventSequence]), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetSequencesMethodInfo a signature where
overloadedMethod = gestureGetSequences
instance O.OverloadedMethodInfo GestureGetSequencesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetSequences",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetSequences"
})
#endif
foreign import ccall "gtk_gesture_get_window" gtk_gesture_get_window ::
Ptr Gesture ->
IO (Ptr Gdk.Window.Window)
gestureGetWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m (Maybe Gdk.Window.Window)
gestureGetWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m (Maybe Window)
gestureGetWindow a
gesture = IO (Maybe Window) -> m (Maybe Window)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr Window
result <- Ptr Gesture -> IO (Ptr Window)
gtk_gesture_get_window Ptr Gesture
gesture'
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gdk.Window.Window) Ptr Window
result'
Window -> IO Window
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe Window -> IO (Maybe Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
maybeResult
#if defined(ENABLE_OVERLOADING)
data GestureGetWindowMethodInfo
instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsGesture a) => O.OverloadedMethod GestureGetWindowMethodInfo a signature where
overloadedMethod = gestureGetWindow
instance O.OverloadedMethodInfo GestureGetWindowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGetWindow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGetWindow"
})
#endif
foreign import ccall "gtk_gesture_group" gtk_gesture_group ::
Ptr Gesture ->
Ptr Gesture ->
IO ()
gestureGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a, IsGesture b) =>
a
-> b
-> m ()
gestureGroup :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsGesture a, IsGesture b) =>
a -> b -> m ()
gestureGroup a
groupGesture b
gesture = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
groupGesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
groupGesture
Ptr Gesture
gesture' <- b -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
gesture
Ptr Gesture -> Ptr Gesture -> IO ()
gtk_gesture_group Ptr Gesture
groupGesture' Ptr Gesture
gesture'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
groupGesture
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
gesture
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GestureGroupMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsGesture a, IsGesture b) => O.OverloadedMethod GestureGroupMethodInfo a signature where
overloadedMethod = gestureGroup
instance O.OverloadedMethodInfo GestureGroupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureGroup"
})
#endif
foreign import ccall "gtk_gesture_handles_sequence" gtk_gesture_handles_sequence ::
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
IO CInt
gestureHandlesSequence ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> Maybe (Gdk.EventSequence.EventSequence)
-> m Bool
gestureHandlesSequence :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> Maybe EventSequence -> m Bool
gestureHandlesSequence a
gesture Maybe EventSequence
sequence = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr EventSequence
maybeSequence <- case Maybe EventSequence
sequence of
Maybe EventSequence
Nothing -> Ptr EventSequence -> IO (Ptr EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr EventSequence
forall a. Ptr a
nullPtr
Just EventSequence
jSequence -> do
Ptr EventSequence
jSequence' <- EventSequence -> IO (Ptr EventSequence)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr EventSequence
jSequence
Ptr EventSequence -> IO (Ptr EventSequence)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr EventSequence
jSequence'
CInt
result <- Ptr Gesture -> Ptr EventSequence -> IO CInt
gtk_gesture_handles_sequence Ptr Gesture
gesture' Ptr EventSequence
maybeSequence
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe EventSequence -> (EventSequence -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe EventSequence
sequence EventSequence -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data GestureHandlesSequenceMethodInfo
instance (signature ~ (Maybe (Gdk.EventSequence.EventSequence) -> m Bool), MonadIO m, IsGesture a) => O.OverloadedMethod GestureHandlesSequenceMethodInfo a signature where
overloadedMethod = gestureHandlesSequence
instance O.OverloadedMethodInfo GestureHandlesSequenceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureHandlesSequence",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureHandlesSequence"
})
#endif
foreign import ccall "gtk_gesture_is_active" gtk_gesture_is_active ::
Ptr Gesture ->
IO CInt
gestureIsActive ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m Bool
gestureIsActive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m Bool
gestureIsActive a
gesture = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
CInt
result <- Ptr Gesture -> IO CInt
gtk_gesture_is_active Ptr Gesture
gesture'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data GestureIsActiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsGesture a) => O.OverloadedMethod GestureIsActiveMethodInfo a signature where
overloadedMethod = gestureIsActive
instance O.OverloadedMethodInfo GestureIsActiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureIsActive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureIsActive"
})
#endif
foreign import ccall "gtk_gesture_is_grouped_with" gtk_gesture_is_grouped_with ::
Ptr Gesture ->
Ptr Gesture ->
IO CInt
gestureIsGroupedWith ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a, IsGesture b) =>
a
-> b
-> m Bool
gestureIsGroupedWith :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsGesture a, IsGesture b) =>
a -> b -> m Bool
gestureIsGroupedWith a
gesture b
other = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr Gesture
other' <- b -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
other
CInt
result <- Ptr Gesture -> Ptr Gesture -> IO CInt
gtk_gesture_is_grouped_with Ptr Gesture
gesture' Ptr Gesture
other'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
other
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data GestureIsGroupedWithMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsGesture a, IsGesture b) => O.OverloadedMethod GestureIsGroupedWithMethodInfo a signature where
overloadedMethod = gestureIsGroupedWith
instance O.OverloadedMethodInfo GestureIsGroupedWithMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureIsGroupedWith",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureIsGroupedWith"
})
#endif
foreign import ccall "gtk_gesture_is_recognized" gtk_gesture_is_recognized ::
Ptr Gesture ->
IO CInt
gestureIsRecognized ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m Bool
gestureIsRecognized :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m Bool
gestureIsRecognized a
gesture = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
CInt
result <- Ptr Gesture -> IO CInt
gtk_gesture_is_recognized Ptr Gesture
gesture'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data GestureIsRecognizedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsGesture a) => O.OverloadedMethod GestureIsRecognizedMethodInfo a signature where
overloadedMethod = gestureIsRecognized
instance O.OverloadedMethodInfo GestureIsRecognizedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureIsRecognized",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureIsRecognized"
})
#endif
foreign import ccall "gtk_gesture_set_sequence_state" gtk_gesture_set_sequence_state ::
Ptr Gesture ->
Ptr Gdk.EventSequence.EventSequence ->
CUInt ->
IO CInt
gestureSetSequenceState ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> Gdk.EventSequence.EventSequence
-> Gtk.Enums.EventSequenceState
-> m Bool
gestureSetSequenceState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> EventSequence -> EventSequenceState -> m Bool
gestureSetSequenceState a
gesture EventSequence
sequence EventSequenceState
state = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr EventSequence
sequence' <- EventSequence -> IO (Ptr EventSequence)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr EventSequence
sequence
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (EventSequenceState -> Int) -> EventSequenceState -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EventSequenceState -> Int
forall a. Enum a => a -> Int
fromEnum) EventSequenceState
state
CInt
result <- Ptr Gesture -> Ptr EventSequence -> CUInt -> IO CInt
gtk_gesture_set_sequence_state Ptr Gesture
gesture' Ptr EventSequence
sequence' CUInt
state'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
EventSequence -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr EventSequence
sequence
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data GestureSetSequenceStateMethodInfo
instance (signature ~ (Gdk.EventSequence.EventSequence -> Gtk.Enums.EventSequenceState -> m Bool), MonadIO m, IsGesture a) => O.OverloadedMethod GestureSetSequenceStateMethodInfo a signature where
overloadedMethod = gestureSetSequenceState
instance O.OverloadedMethodInfo GestureSetSequenceStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureSetSequenceState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureSetSequenceState"
})
#endif
foreign import ccall "gtk_gesture_set_state" gtk_gesture_set_state ::
Ptr Gesture ->
CUInt ->
IO CInt
gestureSetState ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> Gtk.Enums.EventSequenceState
-> m Bool
gestureSetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> EventSequenceState -> m Bool
gestureSetState a
gesture EventSequenceState
state = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (EventSequenceState -> Int) -> EventSequenceState -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EventSequenceState -> Int
forall a. Enum a => a -> Int
fromEnum) EventSequenceState
state
CInt
result <- Ptr Gesture -> CUInt -> IO CInt
gtk_gesture_set_state Ptr Gesture
gesture' CUInt
state'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data GestureSetStateMethodInfo
instance (signature ~ (Gtk.Enums.EventSequenceState -> m Bool), MonadIO m, IsGesture a) => O.OverloadedMethod GestureSetStateMethodInfo a signature where
overloadedMethod = gestureSetState
instance O.OverloadedMethodInfo GestureSetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureSetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureSetState"
})
#endif
foreign import ccall "gtk_gesture_set_window" gtk_gesture_set_window ::
Ptr Gesture ->
Ptr Gdk.Window.Window ->
IO ()
gestureSetWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a, Gdk.Window.IsWindow b) =>
a
-> Maybe (b)
-> m ()
gestureSetWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsGesture a, IsWindow b) =>
a -> Maybe b -> m ()
gestureSetWindow a
gesture Maybe b
window = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr Window
maybeWindow <- case Maybe b
window of
Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just b
jWindow -> do
Ptr Window
jWindow' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jWindow
Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jWindow'
Ptr Gesture -> Ptr Window -> IO ()
gtk_gesture_set_window Ptr Gesture
gesture' Ptr Window
maybeWindow
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
window b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GestureSetWindowMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsGesture a, Gdk.Window.IsWindow b) => O.OverloadedMethod GestureSetWindowMethodInfo a signature where
overloadedMethod = gestureSetWindow
instance O.OverloadedMethodInfo GestureSetWindowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureSetWindow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureSetWindow"
})
#endif
foreign import ccall "gtk_gesture_ungroup" gtk_gesture_ungroup ::
Ptr Gesture ->
IO ()
gestureUngroup ::
(B.CallStack.HasCallStack, MonadIO m, IsGesture a) =>
a
-> m ()
gestureUngroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGesture a) =>
a -> m ()
gestureUngroup a
gesture = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Gesture
gesture' <- a -> IO (Ptr Gesture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
gesture
Ptr Gesture -> IO ()
gtk_gesture_ungroup Ptr Gesture
gesture'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GestureUngroupMethodInfo
instance (signature ~ (m ()), MonadIO m, IsGesture a) => O.OverloadedMethod GestureUngroupMethodInfo a signature where
overloadedMethod = gestureUngroup
instance O.OverloadedMethodInfo GestureUngroupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Gesture.gestureUngroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Objects-Gesture.html#v:gestureUngroup"
})
#endif