| Copyright | Will Thompson and Iñaki García Etxebarria | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.Clutter.Objects.ClickAction
Description
The ClickAction structure contains
 only private data and should be accessed using the provided API
Since: 1.4
Synopsis
- newtype ClickAction = ClickAction (ManagedPtr ClickAction)
 - class (GObject o, IsDescendantOf ClickAction o) => IsClickAction o
 - toClickAction :: (MonadIO m, IsClickAction o) => o -> m ClickAction
 - clickActionGetButton :: (HasCallStack, MonadIO m, IsClickAction a) => a -> m Word32
 - clickActionGetCoords :: (HasCallStack, MonadIO m, IsClickAction a) => a -> m (Float, Float)
 - clickActionGetState :: (HasCallStack, MonadIO m, IsClickAction a) => a -> m [ModifierType]
 - clickActionNew :: (HasCallStack, MonadIO m) => m ClickAction
 - clickActionRelease :: (HasCallStack, MonadIO m, IsClickAction a) => a -> m ()
 - getClickActionHeld :: (MonadIO m, IsClickAction o) => o -> m Bool
 - constructClickActionLongPressDuration :: (IsClickAction o, MonadIO m) => Int32 -> m (GValueConstruct o)
 - getClickActionLongPressDuration :: (MonadIO m, IsClickAction o) => o -> m Int32
 - setClickActionLongPressDuration :: (MonadIO m, IsClickAction o) => o -> Int32 -> m ()
 - constructClickActionLongPressThreshold :: (IsClickAction o, MonadIO m) => Int32 -> m (GValueConstruct o)
 - getClickActionLongPressThreshold :: (MonadIO m, IsClickAction o) => o -> m Int32
 - setClickActionLongPressThreshold :: (MonadIO m, IsClickAction o) => o -> Int32 -> m ()
 - getClickActionPressed :: (MonadIO m, IsClickAction o) => o -> m Bool
 - type ClickActionClickedCallback = Actor -> IO ()
 - afterClickActionClicked :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionClickedCallback) -> m SignalHandlerId
 - onClickActionClicked :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionClickedCallback) -> m SignalHandlerId
 - type ClickActionLongPressCallback = Actor -> LongPressState -> IO Bool
 - afterClickActionLongPress :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionLongPressCallback) -> m SignalHandlerId
 - onClickActionLongPress :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionLongPressCallback) -> m SignalHandlerId
 
Exported types
newtype ClickAction Source #
Memory-managed wrapper type.
Constructors
| ClickAction (ManagedPtr ClickAction) | 
Instances
| Eq ClickAction Source # | |
Defined in GI.Clutter.Objects.ClickAction  | |
| GObject ClickAction Source # | |
Defined in GI.Clutter.Objects.ClickAction  | |
| ManagedPtrNewtype ClickAction Source # | |
Defined in GI.Clutter.Objects.ClickAction Methods toManagedPtr :: ClickAction -> ManagedPtr ClickAction  | |
| TypedObject ClickAction Source # | |
Defined in GI.Clutter.Objects.ClickAction  | |
| HasParentTypes ClickAction Source # | |
Defined in GI.Clutter.Objects.ClickAction  | |
| IsGValue (Maybe ClickAction) Source # | Convert   | 
Defined in GI.Clutter.Objects.ClickAction Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ClickAction -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ClickAction)  | |
| type ParentTypes ClickAction Source # | |
Defined in GI.Clutter.Objects.ClickAction  | |
class (GObject o, IsDescendantOf ClickAction o) => IsClickAction o Source #
Type class for types which can be safely cast to ClickAction, for instance with toClickAction.
Instances
| (GObject o, IsDescendantOf ClickAction o) => IsClickAction o Source # | |
Defined in GI.Clutter.Objects.ClickAction  | |
toClickAction :: (MonadIO m, IsClickAction o) => o -> m ClickAction Source #
Cast to ClickAction, for types for which this is known to be safe. For general casts, use castTo.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, release, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getActor, getButton, getCoords, getData, getEnabled, getName, getProperty, getQdata, getState.
Setters
getButton
Arguments
| :: (HasCallStack, MonadIO m, IsClickAction a) | |
| => a | 
  | 
| -> m Word32 | Returns: the button value  | 
Retrieves the button that was pressed.
Since: 1.4
getCoords
Arguments
| :: (HasCallStack, MonadIO m, IsClickAction a) | |
| => a | 
  | 
| -> m (Float, Float) | 
Retrieves the screen coordinates of the button press.
Since: 1.8
getState
Arguments
| :: (HasCallStack, MonadIO m, IsClickAction a) | |
| => a | 
  | 
| -> m [ModifierType] | Returns: the modifier state parameter, or 0  | 
Retrieves the modifier state of the click action.
Since: 1.6
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m ClickAction | Returns: the newly created   | 
Creates a new ClickAction instance
Since: 1.4
release
Arguments
| :: (HasCallStack, MonadIO m, IsClickAction a) | |
| => a | 
  | 
| -> m () | 
Emulates a release of the pointer button, which ungrabs the pointer and unsets the ClickAction:pressed state.
This function will also cancel the long press gesture if one was initiated.
This function is useful to break a grab, for instance after a certain amount of time has passed.
Since: 1.4
Properties
held
Whether the clickable actor has the pointer grabbed
Since: 1.4
getClickActionHeld :: (MonadIO m, IsClickAction o) => o -> m Bool Source #
Get the value of the “held” property.
 When overloading is enabled, this is equivalent to
get clickAction #held
longPressDuration
The minimum duration of a press for it to be recognized as a long press gesture, in milliseconds.
A value of -1 will make the ClickAction use the value of
 the Settings:longPressDuration property.
Since: 1.8
constructClickActionLongPressDuration :: (IsClickAction o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “long-press-duration” property. This is rarely needed directly, but it is used by new.
getClickActionLongPressDuration :: (MonadIO m, IsClickAction o) => o -> m Int32 Source #
Get the value of the “long-press-duration” property.
 When overloading is enabled, this is equivalent to
get clickAction #longPressDuration
setClickActionLongPressDuration :: (MonadIO m, IsClickAction o) => o -> Int32 -> m () Source #
Set the value of the “long-press-duration” property.
 When overloading is enabled, this is equivalent to
setclickAction [ #longPressDuration:=value ]
longPressThreshold
The maximum allowed distance that can be covered (on both axes) before a long press gesture is cancelled, in pixels.
A value of -1 will make the ClickAction use the value of
 the Settings:dndDragThreshold property.
Since: 1.8
constructClickActionLongPressThreshold :: (IsClickAction o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “long-press-threshold” property. This is rarely needed directly, but it is used by new.
getClickActionLongPressThreshold :: (MonadIO m, IsClickAction o) => o -> m Int32 Source #
Get the value of the “long-press-threshold” property.
 When overloading is enabled, this is equivalent to
get clickAction #longPressThreshold
setClickActionLongPressThreshold :: (MonadIO m, IsClickAction o) => o -> Int32 -> m () Source #
Set the value of the “long-press-threshold” property.
 When overloading is enabled, this is equivalent to
setclickAction [ #longPressThreshold:=value ]
pressed
Whether the clickable actor should be in "pressed" state
Since: 1.4
getClickActionPressed :: (MonadIO m, IsClickAction o) => o -> m Bool Source #
Get the value of the “pressed” property.
 When overloading is enabled, this is equivalent to
get clickAction #pressed
Signals
clicked
type ClickActionClickedCallback Source #
The clicked signal is emitted when the Actor to which
 a ClickAction has been applied should respond to a
 pointer button press and release events
Since: 1.4
afterClickActionClicked :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionClickedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clicked signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after clickAction #clicked callback
By default the object invoking the signal is not passed to the callback.
 If you need to access it, you can use the implit ?self parameter.
 Note that this requires activating the ImplicitParams GHC extension.
onClickActionClicked :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionClickedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clicked signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on clickAction #clicked callback
longPress
type ClickActionLongPressCallback Source #
Arguments
| = Actor | 
  | 
| -> LongPressState | 
  | 
| -> IO Bool | Returns: Only the   | 
The longPress signal is emitted during the long press gesture handling.
This signal can be emitted multiple times with different states.
The LongPressStateQuery state will be emitted on button presses,
 and its return value will determine whether the long press handling
 should be initiated. If the signal handlers will return True, the
 LongPressStateQuery state will be followed either by a signal
 emission with the LongPressStateActivate state if the long press
 constraints were respected, or by a signal emission with the
 LongPressStateCancel state if the long press was cancelled.
It is possible to forcibly cancel a long press detection using
 clickActionRelease.
Since: 1.8
afterClickActionLongPress :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionLongPressCallback) -> m SignalHandlerId Source #
Connect a signal handler for the longPress signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after clickAction #longPress callback
By default the object invoking the signal is not passed to the callback.
 If you need to access it, you can use the implit ?self parameter.
 Note that this requires activating the ImplicitParams GHC extension.
onClickActionLongPress :: (IsClickAction a, MonadIO m) => a -> ((?self :: a) => ClickActionLongPressCallback) -> m SignalHandlerId Source #
Connect a signal handler for the longPress signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on clickAction #longPress callback