Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GestureStylus
is a Gesture
implementation specific to stylus
input. The provided signals just provide the basic information
Synopsis
- newtype GestureStylus = GestureStylus (ManagedPtr GestureStylus)
- class GObject o => IsGestureStylus o
- toGestureStylus :: (MonadIO m, IsGestureStylus o) => o -> m GestureStylus
- noGestureStylus :: Maybe GestureStylus
- gestureStylusGetAxis :: (HasCallStack, MonadIO m, IsGestureStylus a) => a -> AxisUse -> m (Bool, Double)
- gestureStylusGetDeviceTool :: (HasCallStack, MonadIO m, IsGestureStylus a) => a -> m (Maybe DeviceTool)
- gestureStylusNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m GestureStylus
- type C_GestureStylusDownCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureStylusDownCallback = Double -> Double -> IO ()
- afterGestureStylusDown :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusDownCallback -> m SignalHandlerId
- genClosure_GestureStylusDown :: GestureStylusDownCallback -> IO Closure
- mk_GestureStylusDownCallback :: C_GestureStylusDownCallback -> IO (FunPtr C_GestureStylusDownCallback)
- noGestureStylusDownCallback :: Maybe GestureStylusDownCallback
- onGestureStylusDown :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusDownCallback -> m SignalHandlerId
- wrap_GestureStylusDownCallback :: GestureStylusDownCallback -> C_GestureStylusDownCallback
- type C_GestureStylusMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureStylusMotionCallback = Double -> Double -> IO ()
- afterGestureStylusMotion :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusMotionCallback -> m SignalHandlerId
- genClosure_GestureStylusMotion :: GestureStylusMotionCallback -> IO Closure
- mk_GestureStylusMotionCallback :: C_GestureStylusMotionCallback -> IO (FunPtr C_GestureStylusMotionCallback)
- noGestureStylusMotionCallback :: Maybe GestureStylusMotionCallback
- onGestureStylusMotion :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusMotionCallback -> m SignalHandlerId
- wrap_GestureStylusMotionCallback :: GestureStylusMotionCallback -> C_GestureStylusMotionCallback
- type C_GestureStylusProximityCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureStylusProximityCallback = Double -> Double -> IO ()
- afterGestureStylusProximity :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusProximityCallback -> m SignalHandlerId
- genClosure_GestureStylusProximity :: GestureStylusProximityCallback -> IO Closure
- mk_GestureStylusProximityCallback :: C_GestureStylusProximityCallback -> IO (FunPtr C_GestureStylusProximityCallback)
- noGestureStylusProximityCallback :: Maybe GestureStylusProximityCallback
- onGestureStylusProximity :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusProximityCallback -> m SignalHandlerId
- wrap_GestureStylusProximityCallback :: GestureStylusProximityCallback -> C_GestureStylusProximityCallback
- type C_GestureStylusUpCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureStylusUpCallback = Double -> Double -> IO ()
- afterGestureStylusUp :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusUpCallback -> m SignalHandlerId
- genClosure_GestureStylusUp :: GestureStylusUpCallback -> IO Closure
- mk_GestureStylusUpCallback :: C_GestureStylusUpCallback -> IO (FunPtr C_GestureStylusUpCallback)
- noGestureStylusUpCallback :: Maybe GestureStylusUpCallback
- onGestureStylusUp :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusUpCallback -> m SignalHandlerId
- wrap_GestureStylusUpCallback :: GestureStylusUpCallback -> C_GestureStylusUpCallback
Exported types
newtype GestureStylus Source #
Memory-managed wrapper type.
Instances
GObject GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus gobjectType :: GestureStylus -> IO GType # | |
IsObject GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus | |
IsEventController GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus | |
IsGesture GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus | |
IsGestureSingle GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus | |
IsGestureStylus GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus |
class GObject o => IsGestureStylus o Source #
Type class for types which can be safely cast to GestureStylus
, for instance with toGestureStylus
.
Instances
(GObject a, (UnknownAncestorError GestureStylus a :: Constraint)) => IsGestureStylus a Source # | |
Defined in GI.Gtk.Objects.GestureStylus | |
IsGestureStylus GestureStylus Source # | |
Defined in GI.Gtk.Objects.GestureStylus |
toGestureStylus :: (MonadIO m, IsGestureStylus o) => o -> m GestureStylus Source #
Cast to GestureStylus
, for types for which this is known to be safe. For general casts, use castTo
.
noGestureStylus :: Maybe GestureStylus Source #
A convenience alias for Nothing
:: Maybe
GestureStylus
.
Methods
getAxis
:: (HasCallStack, MonadIO m, IsGestureStylus a) | |
=> a |
|
-> AxisUse |
|
-> m (Bool, Double) | Returns: |
Returns the current value for the requested axis
. This function
must be called from either the GestureStylus
:down
,
GestureStylus
:motion
, GestureStylus
:up
or GestureStylus
:proximity
signals.
Since: 3.24
getDeviceTool
gestureStylusGetDeviceTool Source #
:: (HasCallStack, MonadIO m, IsGestureStylus a) | |
=> a |
|
-> m (Maybe DeviceTool) | Returns: The current stylus tool |
Returns the DeviceTool
currently driving input through this gesture.
This function must be called from either the GestureStylus
::down
,
GestureStylus
::motion
, GestureStylus
::up
or GestureStylus
::proximity
signal handlers.
Since: 3.24
new
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m GestureStylus | Returns: a newly created stylus gesture |
Creates a new GestureStylus
.
Since: 3.24
Signals
down
type C_GestureStylusDownCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureStylusDownCallback = Double -> Double -> IO () Source #
No description available in the introspection data.
afterGestureStylusDown :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusDownCallback -> m SignalHandlerId Source #
Connect a signal handler for the “down
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
gestureStylus #down callback
genClosure_GestureStylusDown :: GestureStylusDownCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_GestureStylusDownCallback :: C_GestureStylusDownCallback -> IO (FunPtr C_GestureStylusDownCallback) Source #
Generate a function pointer callable from C code, from a C_GestureStylusDownCallback
.
noGestureStylusDownCallback :: Maybe GestureStylusDownCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureStylusDownCallback
onGestureStylusDown :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusDownCallback -> m SignalHandlerId Source #
Connect a signal handler for the “down
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
gestureStylus #down callback
wrap_GestureStylusDownCallback :: GestureStylusDownCallback -> C_GestureStylusDownCallback Source #
Wrap a GestureStylusDownCallback
into a C_GestureStylusDownCallback
.
motion
type C_GestureStylusMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureStylusMotionCallback = Double -> Double -> IO () Source #
No description available in the introspection data.
afterGestureStylusMotion :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusMotionCallback -> m SignalHandlerId Source #
Connect a signal handler for the “motion
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
gestureStylus #motion callback
genClosure_GestureStylusMotion :: GestureStylusMotionCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_GestureStylusMotionCallback :: C_GestureStylusMotionCallback -> IO (FunPtr C_GestureStylusMotionCallback) Source #
Generate a function pointer callable from C code, from a C_GestureStylusMotionCallback
.
noGestureStylusMotionCallback :: Maybe GestureStylusMotionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureStylusMotionCallback
onGestureStylusMotion :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusMotionCallback -> m SignalHandlerId Source #
Connect a signal handler for the “motion
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
gestureStylus #motion callback
wrap_GestureStylusMotionCallback :: GestureStylusMotionCallback -> C_GestureStylusMotionCallback Source #
Wrap a GestureStylusMotionCallback
into a C_GestureStylusMotionCallback
.
proximity
type C_GestureStylusProximityCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureStylusProximityCallback = Double -> Double -> IO () Source #
No description available in the introspection data.
afterGestureStylusProximity :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusProximityCallback -> m SignalHandlerId Source #
Connect a signal handler for the “proximity
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
gestureStylus #proximity callback
genClosure_GestureStylusProximity :: GestureStylusProximityCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_GestureStylusProximityCallback :: C_GestureStylusProximityCallback -> IO (FunPtr C_GestureStylusProximityCallback) Source #
Generate a function pointer callable from C code, from a C_GestureStylusProximityCallback
.
noGestureStylusProximityCallback :: Maybe GestureStylusProximityCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureStylusProximityCallback
onGestureStylusProximity :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusProximityCallback -> m SignalHandlerId Source #
Connect a signal handler for the “proximity
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
gestureStylus #proximity callback
wrap_GestureStylusProximityCallback :: GestureStylusProximityCallback -> C_GestureStylusProximityCallback Source #
Wrap a GestureStylusProximityCallback
into a C_GestureStylusProximityCallback
.
up
type C_GestureStylusUpCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureStylusUpCallback = Double -> Double -> IO () Source #
No description available in the introspection data.
afterGestureStylusUp :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusUpCallback -> m SignalHandlerId Source #
Connect a signal handler for the “up
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
gestureStylus #up callback
genClosure_GestureStylusUp :: GestureStylusUpCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_GestureStylusUpCallback :: C_GestureStylusUpCallback -> IO (FunPtr C_GestureStylusUpCallback) Source #
Generate a function pointer callable from C code, from a C_GestureStylusUpCallback
.
noGestureStylusUpCallback :: Maybe GestureStylusUpCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureStylusUpCallback
onGestureStylusUp :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusUpCallback -> m SignalHandlerId Source #
Connect a signal handler for the “up
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
gestureStylus #up callback