{-# LANGUAGE 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 ,
C_GestureBeginCallback ,
GestureBeginCallback ,
#if defined(ENABLE_OVERLOADING)
GestureBeginSignalInfo ,
#endif
afterGestureBegin ,
genClosure_GestureBegin ,
mk_GestureBeginCallback ,
noGestureBeginCallback ,
onGestureBegin ,
wrap_GestureBeginCallback ,
C_GestureCancelCallback ,
GestureCancelCallback ,
#if defined(ENABLE_OVERLOADING)
GestureCancelSignalInfo ,
#endif
afterGestureCancel ,
genClosure_GestureCancel ,
mk_GestureCancelCallback ,
noGestureCancelCallback ,
onGestureCancel ,
wrap_GestureCancelCallback ,
C_GestureEndCallback ,
GestureEndCallback ,
#if defined(ENABLE_OVERLOADING)
GestureEndSignalInfo ,
#endif
afterGestureEnd ,
genClosure_GestureEnd ,
mk_GestureEndCallback ,
noGestureEndCallback ,
onGestureEnd ,
wrap_GestureEndCallback ,
C_GestureSequenceStateChangedCallback ,
GestureSequenceStateChangedCallback ,
#if defined(ENABLE_OVERLOADING)
GestureSequenceStateChangedSignalInfo ,
#endif
afterGestureSequenceStateChanged ,
genClosure_GestureSequenceStateChanged ,
mk_GestureSequenceStateChangedCallback ,
noGestureSequenceStateChangedCallback ,
onGestureSequenceStateChanged ,
wrap_GestureSequenceStateChangedCallback,
C_GestureUpdateCallback ,
GestureUpdateCallback ,
#if defined(ENABLE_OVERLOADING)
GestureUpdateSignalInfo ,
#endif
afterGestureUpdate ,
genClosure_GestureUpdate ,
mk_GestureUpdateCallback ,
noGestureUpdateCallback ,
onGestureUpdate ,
wrap_GestureUpdateCallback ,
) 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.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.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
/= :: Gesture -> Gesture -> Bool
$c/= :: Gesture -> Gesture -> Bool
== :: Gesture -> Gesture -> Bool
$c== :: 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
instance B.GValue.IsGValue Gesture where
toGValue :: Gesture -> IO GValue
toGValue Gesture
o = do
GType
gtype <- IO GType
c_gtk_gesture_get_type
Gesture -> (Ptr Gesture -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Gesture
o (GType
-> (GValue -> Ptr Gesture -> IO ()) -> Ptr Gesture -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Gesture -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Gesture
fromGValue GValue
gv = do
Ptr Gesture
ptr <- GValue -> IO (Ptr Gesture)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Gesture)
(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
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 :: (MonadIO m, IsGesture o) => o -> m Gesture
toGesture :: o -> m Gesture
toGesture = IO Gesture -> m Gesture
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr Gesture -> Gesture
Gesture
#if defined(ENABLE_OVERLOADING)
type family ResolveGestureMethod (t :: Symbol) (o :: *) :: * 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.MethodInfo 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
#endif
type GestureBeginCallback =
Gdk.EventSequence.EventSequence
-> IO ()
noGestureBeginCallback :: Maybe GestureBeginCallback
noGestureBeginCallback :: Maybe GestureBeginCallback
noGestureBeginCallback = Maybe GestureBeginCallback
forall a. Maybe a
Nothing
type C_GestureBeginCallback =
Ptr () ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureBeginCallback :: C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
genClosure_GestureBegin :: MonadIO m => GestureBeginCallback -> m (GClosure C_GestureBeginCallback)
genClosure_GestureBegin :: GestureBeginCallback -> m (GClosure C_GestureBeginCallback)
genClosure_GestureBegin GestureBeginCallback
cb = IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureBeginCallback GestureBeginCallback
cb
C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureBeginCallback C_GestureBeginCallback
cb' IO (FunPtr C_GestureBeginCallback)
-> (FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_GestureBeginCallback ::
GestureBeginCallback ->
C_GestureBeginCallback
wrap_GestureBeginCallback :: GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureBeginCallback GestureBeginCallback
_cb Ptr ()
_ Ptr EventSequence
sequence Ptr ()
_ = do
(ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> GestureBeginCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence Ptr EventSequence
sequence (GestureBeginCallback -> IO ()) -> GestureBeginCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
GestureBeginCallback
_cb EventSequence
sequence'
onGestureBegin :: (IsGesture a, MonadIO m) => a -> GestureBeginCallback -> m SignalHandlerId
onGestureBegin :: a -> GestureBeginCallback -> m SignalHandlerId
onGestureBegin a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureBeginCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureBeginCallback C_GestureBeginCallback
cb'
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
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureBegin :: (IsGesture a, MonadIO m) => a -> GestureBeginCallback -> m SignalHandlerId
afterGestureBegin :: a -> GestureBeginCallback -> m SignalHandlerId
afterGestureBegin a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureBeginCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureBeginCallback C_GestureBeginCallback
cb'
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
cb'' 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
#endif
type GestureCancelCallback =
Gdk.EventSequence.EventSequence
-> IO ()
noGestureCancelCallback :: Maybe GestureCancelCallback
noGestureCancelCallback :: Maybe GestureBeginCallback
noGestureCancelCallback = Maybe GestureBeginCallback
forall a. Maybe a
Nothing
type C_GestureCancelCallback =
Ptr () ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureCancelCallback :: C_GestureCancelCallback -> IO (FunPtr C_GestureCancelCallback)
genClosure_GestureCancel :: MonadIO m => GestureCancelCallback -> m (GClosure C_GestureCancelCallback)
genClosure_GestureCancel :: GestureBeginCallback -> m (GClosure C_GestureBeginCallback)
genClosure_GestureCancel GestureBeginCallback
cb = IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureCancelCallback GestureBeginCallback
cb
C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureCancelCallback C_GestureBeginCallback
cb' IO (FunPtr C_GestureBeginCallback)
-> (FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_GestureCancelCallback ::
GestureCancelCallback ->
C_GestureCancelCallback
wrap_GestureCancelCallback :: GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureCancelCallback GestureBeginCallback
_cb Ptr ()
_ Ptr EventSequence
sequence Ptr ()
_ = do
(ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> GestureBeginCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence Ptr EventSequence
sequence (GestureBeginCallback -> IO ()) -> GestureBeginCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
GestureBeginCallback
_cb EventSequence
sequence'
onGestureCancel :: (IsGesture a, MonadIO m) => a -> GestureCancelCallback -> m SignalHandlerId
onGestureCancel :: a -> GestureBeginCallback -> m SignalHandlerId
onGestureCancel a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureCancelCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureCancelCallback C_GestureBeginCallback
cb'
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
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureCancel :: (IsGesture a, MonadIO m) => a -> GestureCancelCallback -> m SignalHandlerId
afterGestureCancel :: a -> GestureBeginCallback -> m SignalHandlerId
afterGestureCancel a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureCancelCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureCancelCallback C_GestureBeginCallback
cb'
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
cb'' 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
#endif
type GestureEndCallback =
Gdk.EventSequence.EventSequence
-> IO ()
noGestureEndCallback :: Maybe GestureEndCallback
noGestureEndCallback :: Maybe GestureBeginCallback
noGestureEndCallback = Maybe GestureBeginCallback
forall a. Maybe a
Nothing
type C_GestureEndCallback =
Ptr () ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureEndCallback :: C_GestureEndCallback -> IO (FunPtr C_GestureEndCallback)
genClosure_GestureEnd :: MonadIO m => GestureEndCallback -> m (GClosure C_GestureEndCallback)
genClosure_GestureEnd :: GestureBeginCallback -> m (GClosure C_GestureBeginCallback)
genClosure_GestureEnd GestureBeginCallback
cb = IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureEndCallback GestureBeginCallback
cb
C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureEndCallback C_GestureBeginCallback
cb' IO (FunPtr C_GestureBeginCallback)
-> (FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_GestureEndCallback ::
GestureEndCallback ->
C_GestureEndCallback
wrap_GestureEndCallback :: GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureEndCallback GestureBeginCallback
_cb Ptr ()
_ Ptr EventSequence
sequence Ptr ()
_ = do
(ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> GestureBeginCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence Ptr EventSequence
sequence (GestureBeginCallback -> IO ()) -> GestureBeginCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
GestureBeginCallback
_cb EventSequence
sequence'
onGestureEnd :: (IsGesture a, MonadIO m) => a -> GestureEndCallback -> m SignalHandlerId
onGestureEnd :: a -> GestureBeginCallback -> m SignalHandlerId
onGestureEnd a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureEndCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureEndCallback C_GestureBeginCallback
cb'
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
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureEnd :: (IsGesture a, MonadIO m) => a -> GestureEndCallback -> m SignalHandlerId
afterGestureEnd :: a -> GestureBeginCallback -> m SignalHandlerId
afterGestureEnd a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureEndCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureEndCallback C_GestureBeginCallback
cb'
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
cb'' 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
#endif
type GestureSequenceStateChangedCallback =
Gdk.EventSequence.EventSequence
-> Gtk.Enums.EventSequenceState
-> IO ()
noGestureSequenceStateChangedCallback :: Maybe GestureSequenceStateChangedCallback
noGestureSequenceStateChangedCallback :: Maybe GestureSequenceStateChangedCallback
noGestureSequenceStateChangedCallback = Maybe GestureSequenceStateChangedCallback
forall a. Maybe a
Nothing
type C_GestureSequenceStateChangedCallback =
Ptr () ->
Ptr Gdk.EventSequence.EventSequence ->
CUInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureSequenceStateChangedCallback :: C_GestureSequenceStateChangedCallback -> IO (FunPtr C_GestureSequenceStateChangedCallback)
genClosure_GestureSequenceStateChanged :: MonadIO m => GestureSequenceStateChangedCallback -> m (GClosure C_GestureSequenceStateChangedCallback)
genClosure_GestureSequenceStateChanged :: GestureSequenceStateChangedCallback
-> m (GClosure C_GestureSequenceStateChangedCallback)
genClosure_GestureSequenceStateChanged GestureSequenceStateChangedCallback
cb = IO (GClosure C_GestureSequenceStateChangedCallback)
-> m (GClosure C_GestureSequenceStateChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_GestureSequenceStateChangedCallback)
-> m (GClosure C_GestureSequenceStateChangedCallback))
-> IO (GClosure C_GestureSequenceStateChangedCallback)
-> m (GClosure C_GestureSequenceStateChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_GestureSequenceStateChangedCallback
cb' = GestureSequenceStateChangedCallback
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback GestureSequenceStateChangedCallback
cb
C_GestureSequenceStateChangedCallback
-> IO (FunPtr C_GestureSequenceStateChangedCallback)
mk_GestureSequenceStateChangedCallback C_GestureSequenceStateChangedCallback
cb' IO (FunPtr C_GestureSequenceStateChangedCallback)
-> (FunPtr C_GestureSequenceStateChangedCallback
-> IO (GClosure C_GestureSequenceStateChangedCallback))
-> IO (GClosure C_GestureSequenceStateChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_GestureSequenceStateChangedCallback
-> IO (GClosure C_GestureSequenceStateChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_GestureSequenceStateChangedCallback ::
GestureSequenceStateChangedCallback ->
C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback :: GestureSequenceStateChangedCallback
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback GestureSequenceStateChangedCallback
_cb Ptr ()
_ Ptr EventSequence
sequence CUInt
state Ptr ()
_ = do
(ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> GestureBeginCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence Ptr EventSequence
sequence (GestureBeginCallback -> IO ()) -> GestureBeginCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
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
GestureSequenceStateChangedCallback
_cb EventSequence
sequence' EventSequenceState
state'
onGestureSequenceStateChanged :: (IsGesture a, MonadIO m) => a -> GestureSequenceStateChangedCallback -> m SignalHandlerId
onGestureSequenceStateChanged :: a -> GestureSequenceStateChangedCallback -> m SignalHandlerId
onGestureSequenceStateChanged a
obj GestureSequenceStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureSequenceStateChangedCallback
cb' = GestureSequenceStateChangedCallback
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback GestureSequenceStateChangedCallback
cb
FunPtr C_GestureSequenceStateChangedCallback
cb'' <- C_GestureSequenceStateChangedCallback
-> IO (FunPtr C_GestureSequenceStateChangedCallback)
mk_GestureSequenceStateChangedCallback C_GestureSequenceStateChangedCallback
cb'
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
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureSequenceStateChanged :: (IsGesture a, MonadIO m) => a -> GestureSequenceStateChangedCallback -> m SignalHandlerId
afterGestureSequenceStateChanged :: a -> GestureSequenceStateChangedCallback -> m SignalHandlerId
afterGestureSequenceStateChanged a
obj GestureSequenceStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureSequenceStateChangedCallback
cb' = GestureSequenceStateChangedCallback
-> C_GestureSequenceStateChangedCallback
wrap_GestureSequenceStateChangedCallback GestureSequenceStateChangedCallback
cb
FunPtr C_GestureSequenceStateChangedCallback
cb'' <- C_GestureSequenceStateChangedCallback
-> IO (FunPtr C_GestureSequenceStateChangedCallback)
mk_GestureSequenceStateChangedCallback C_GestureSequenceStateChangedCallback
cb'
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
cb'' 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
#endif
type GestureUpdateCallback =
Gdk.EventSequence.EventSequence
-> IO ()
noGestureUpdateCallback :: Maybe GestureUpdateCallback
noGestureUpdateCallback :: Maybe GestureBeginCallback
noGestureUpdateCallback = Maybe GestureBeginCallback
forall a. Maybe a
Nothing
type C_GestureUpdateCallback =
Ptr () ->
Ptr Gdk.EventSequence.EventSequence ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_GestureUpdateCallback :: C_GestureUpdateCallback -> IO (FunPtr C_GestureUpdateCallback)
genClosure_GestureUpdate :: MonadIO m => GestureUpdateCallback -> m (GClosure C_GestureUpdateCallback)
genClosure_GestureUpdate :: GestureBeginCallback -> m (GClosure C_GestureBeginCallback)
genClosure_GestureUpdate GestureBeginCallback
cb = IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
-> m (GClosure C_GestureBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureUpdateCallback GestureBeginCallback
cb
C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureUpdateCallback C_GestureBeginCallback
cb' IO (FunPtr C_GestureBeginCallback)
-> (FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback))
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_GestureBeginCallback
-> IO (GClosure C_GestureBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_GestureUpdateCallback ::
GestureUpdateCallback ->
C_GestureUpdateCallback
wrap_GestureUpdateCallback :: GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureUpdateCallback GestureBeginCallback
_cb Ptr ()
_ Ptr EventSequence
sequence Ptr ()
_ = do
(ManagedPtr EventSequence -> EventSequence)
-> Ptr EventSequence -> GestureBeginCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr EventSequence -> EventSequence
Gdk.EventSequence.EventSequence Ptr EventSequence
sequence (GestureBeginCallback -> IO ()) -> GestureBeginCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \EventSequence
sequence' -> do
GestureBeginCallback
_cb EventSequence
sequence'
onGestureUpdate :: (IsGesture a, MonadIO m) => a -> GestureUpdateCallback -> m SignalHandlerId
onGestureUpdate :: a -> GestureBeginCallback -> m SignalHandlerId
onGestureUpdate a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureUpdateCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureUpdateCallback C_GestureBeginCallback
cb'
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
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterGestureUpdate :: (IsGesture a, MonadIO m) => a -> GestureUpdateCallback -> m SignalHandlerId
afterGestureUpdate :: a -> GestureBeginCallback -> m SignalHandlerId
afterGestureUpdate a
obj GestureBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_GestureBeginCallback
cb' = GestureBeginCallback -> C_GestureBeginCallback
wrap_GestureUpdateCallback GestureBeginCallback
cb
FunPtr C_GestureBeginCallback
cb'' <- C_GestureBeginCallback -> IO (FunPtr C_GestureBeginCallback)
mk_GestureUpdateCallback C_GestureBeginCallback
cb'
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
cb'' 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
#endif
getGestureNPoints :: (MonadIO m, IsGesture o) => o -> m Word32
getGestureNPoints :: o -> m Word32
getGestureNPoints o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ 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 :: Word32 -> m (GValueConstruct o)
constructGestureNPoints Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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
$ 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
#endif
getGestureWindow :: (MonadIO m, IsGesture o) => o -> m (Maybe Gdk.Window.Window)
getGestureWindow :: o -> m (Maybe Window)
getGestureWindow o
obj = IO (Maybe Window) -> m (Maybe Window)
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
$ 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 :: o -> a -> m ()
setGestureWindow o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ 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 :: a -> m (GValueConstruct o)
constructGestureWindow a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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
$ 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 :: o -> m ()
clearGestureWindow o
obj = IO () -> m ()
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
#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, *)])
#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, *)])
#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 :: a -> m (Bool, Rectangle)
gestureGetBoundingBox a
gesture = IO (Bool, Rectangle) -> m (Bool, Rectangle)
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 (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.MethodInfo GestureGetBoundingBoxMethodInfo a signature where
overloadedMethod = 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 :: a -> m (Bool, Double, Double)
gestureGetBoundingBoxCenter a
gesture = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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.MethodInfo GestureGetBoundingBoxCenterMethodInfo a signature where
overloadedMethod = 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 :: a -> m (Maybe Device)
gestureGetDevice a
gesture = IO (Maybe Device) -> m (Maybe Device)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Device) -> m (Maybe Device))
-> IO (Maybe Device) -> m (Maybe Device)
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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 (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.MethodInfo GestureGetDeviceMethodInfo a signature where
overloadedMethod = 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 :: a -> m [Gesture]
gestureGetGroup a
gesture = IO [Gesture] -> m [Gesture]
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)
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 (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.MethodInfo GestureGetGroupMethodInfo a signature where
overloadedMethod = 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 :: a -> Maybe EventSequence -> m (Maybe Event)
gestureGetLastEvent a
gesture Maybe EventSequence
sequence = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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 (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 (m :: * -> *) a. Monad m => a -> m a
return Event
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
gesture
Maybe EventSequence -> GestureBeginCallback -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe EventSequence
sequence GestureBeginCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Event -> IO (Maybe Event)
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.MethodInfo GestureGetLastEventMethodInfo a signature where
overloadedMethod = 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 :: a -> m (Maybe EventSequence)
gestureGetLastUpdatedSequence a
gesture = IO (Maybe EventSequence) -> m (Maybe EventSequence)
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 (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 (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.MethodInfo GestureGetLastUpdatedSequenceMethodInfo a signature where
overloadedMethod = 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 :: a -> Maybe EventSequence -> m (Bool, Double, Double)
gestureGetPoint a
gesture Maybe EventSequence
sequence = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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 (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 -> GestureBeginCallback -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe EventSequence
sequence GestureBeginCallback
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 (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.MethodInfo GestureGetPointMethodInfo a signature where
overloadedMethod = 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 :: a -> EventSequence -> m EventSequenceState
gestureGetSequenceState a
gesture EventSequence
sequence = IO EventSequenceState -> m EventSequenceState
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
GestureBeginCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr EventSequence
sequence
EventSequenceState -> IO EventSequenceState
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.MethodInfo GestureGetSequenceStateMethodInfo a signature where
overloadedMethod = 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 :: a -> m [EventSequence]
gestureGetSequences a
gesture = IO [EventSequence] -> m [EventSequence]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventSequence] -> m [EventSequence])
-> IO [EventSequence] -> m [EventSequence]
forall a b. (a -> b) -> a -> b
$ do
Ptr 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)
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 (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.MethodInfo GestureGetSequencesMethodInfo a signature where
overloadedMethod = 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 :: a -> m (Maybe Window)
gestureGetWindow a
gesture = IO (Maybe Window) -> m (Maybe Window)
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 (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 (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.MethodInfo GestureGetWindowMethodInfo a signature where
overloadedMethod = 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 :: a -> b -> m ()
gestureGroup a
groupGesture b
gesture = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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.MethodInfo GestureGroupMethodInfo a signature where
overloadedMethod = 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 :: a -> Maybe EventSequence -> m Bool
gestureHandlesSequence a
gesture Maybe EventSequence
sequence = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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 (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 -> GestureBeginCallback -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe EventSequence
sequence GestureBeginCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
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.MethodInfo GestureHandlesSequenceMethodInfo a signature where
overloadedMethod = 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 :: a -> m Bool
gestureIsActive a
gesture = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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.MethodInfo GestureIsActiveMethodInfo a signature where
overloadedMethod = 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 :: a -> b -> m Bool
gestureIsGroupedWith a
gesture b
other = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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.MethodInfo GestureIsGroupedWithMethodInfo a signature where
overloadedMethod = 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 :: a -> m Bool
gestureIsRecognized a
gesture = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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.MethodInfo GestureIsRecognizedMethodInfo a signature where
overloadedMethod = 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 :: a -> EventSequence -> EventSequenceState -> m Bool
gestureSetSequenceState a
gesture EventSequence
sequence EventSequenceState
state = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr 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
GestureBeginCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr EventSequence
sequence
Bool -> IO Bool
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.MethodInfo GestureSetSequenceStateMethodInfo a signature where
overloadedMethod = 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 :: a -> EventSequenceState -> m Bool
gestureSetState a
gesture EventSequenceState
state = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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.MethodInfo GestureSetStateMethodInfo a signature where
overloadedMethod = 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 :: a -> Maybe b -> m ()
gestureSetWindow a
gesture Maybe b
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (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 (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 (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.MethodInfo GestureSetWindowMethodInfo a signature where
overloadedMethod = 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 :: a -> m ()
gestureUngroup a
gesture = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr 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 (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GestureUngroupMethodInfo
instance (signature ~ (m ()), MonadIO m, IsGesture a) => O.MethodInfo GestureUngroupMethodInfo a signature where
overloadedMethod = gestureUngroup
#endif