Class: Clutter::GestureAction

Inherits:
Action show all
Defined in:
(unknown)

Overview

The Clutter::GestureClass structure contains only private data.

Direct Known Subclasses

PanAction, RotateAction, SwipeAction, TapAction, ZoomAction

Instance Method Summary collapse

Methods inherited from ActorMeta

#actor, #actor=, #enabled, #enabled=, #enabled?, #name, #name=

Constructor Details

#initializeClutter::Action

Creates a new Clutter::GestureAction instance.

Instance Method Details

#cancelnil

Cancel a Clutter::GestureAction before it begins

Returns:

  • (nil)

#get_device(point) ⇒ Clutter::InputDevice

Retrieves the Clutter::InputDevice of a touch point.

Parameters:

  • point (Integer)

    the touch point index, with 0 being the first touch point received by the action

Returns:

#get_last_event(point) ⇒ Clutter::Event

Retrieves a reference to the last Clutter::Event for a touch point. Call clutter_event_copy() if you need to store the reference somewhere.

Parameters:

  • point (Integer)

    index of a point currently active

Returns:

#get_motion_coords(point, motion_x, motion_y) ⇒ nil

Retrieves the coordinates, in stage space, of the latest motion event during the dragging.

Parameters:

  • point (Integer)

    the touch point index, with 0 being the first touch point received by the action

  • motion_x (Clutter::gfloat)

    return location for the latest motion event's X coordinate

  • motion_y (Clutter::gfloat)

    return location for the latest motion event's Y coordinate

Returns:

  • (nil)

#get_motion_delta(point, delta_x, delta_y) ⇒ Clutter::gfloat

Retrieves the incremental delta since the last motion event during the dragging.

Parameters:

  • point (Integer)

    the touch point index, with 0 being the first touch point received by the action

  • delta_x (Clutter::gfloat)

    return location for the X axis component of the incremental motion delta

  • delta_y (Clutter::gfloat)

    return location for the Y axis component of the incremental motion delta

Returns:

  • (Clutter::gfloat)

    the distance since last motion event

#get_press_coords(point, press_x, press_y) ⇒ nil

Retrieves the coordinates, in stage space, of the press event that started the dragging for a specific touch point.

Parameters:

  • point (Integer)

    the touch point index, with 0 being the first touch point received by the action

  • press_x (Clutter::gfloat)

    return location for the press event's X coordinate

  • press_y (Clutter::gfloat)

    return location for the press event's Y coordinate

Returns:

  • (nil)

#get_release_coords(point, release_x, release_y) ⇒ nil

Retrieves the coordinates, in stage space, where the touch point was last released.

Parameters:

  • point (Integer)

    the touch point index, with 0 being the first touch point received by the action

  • release_x (Clutter::gfloat)

    return location for the X coordinate of the last release

  • release_y (Clutter::gfloat)

    return location for the Y coordinate of the last release

Returns:

  • (nil)

#get_sequence(point) ⇒ Clutter::EventSequence

Retrieves the Clutter::EventSequence of a touch point.

Parameters:

  • point (Integer)

    index of a point currently active

Returns:

  • (Clutter::EventSequence)

    the Clutter::EventSequence of a touch point.

#get_threshold_trigger_distance(x, y) ⇒ nil

Retrieves the threshold trigger distance of the gesture action, as set using clutter_gesture_action_set_threshold_trigger_distance().

Parameters:

  • x (Clutter::gfloat)

    The return location for the horizontal distance, or nil

  • y (Clutter::gfloat)

    The return location for the vertical distance, or nil

Returns:

  • (nil)

#get_velocity(point, velocity_x, velocity_y) ⇒ Clutter::gfloat

Retrieves the velocity, in stage pixels per millisecond, of the latest motion event during the dragging.

Parameters:

  • point (Integer)

    the touch point index, with 0 being the first touch point received by the action

  • velocity_x (Clutter::gfloat)

    return location for the latest motion event's X velocity

  • velocity_y (Clutter::gfloat)

    return location for the latest motion event's Y velocity

Returns:

  • (Clutter::gfloat)

#n_current_pointsInteger

Retrieves the number of points currently active.

Returns:

  • (Integer)

    the number of points currently active.

#n_touch_pointsInteger

Number of touch points to trigger a gesture action.

Returns:

  • (Integer)

    n-touch-points

#n_touch_points=(n_touch_points) ⇒ Integer

Number of touch points to trigger a gesture action.

Parameters:

  • n_touch_points (Integer)

Returns:

  • (Integer)

    n-touch-points

  • (Integer)

    n-touch-points

#set_threshold_trigger_distance(x, y) ⇒ nil

Sets the threshold trigger distance for the gesture drag threshold, if any.

This function should only be called by sub-classes of Clutter::GestureAction during their construction phase.

Parameters:

  • x (Clutter::gfloat)

    the distance on the horizontal axis

  • y (Clutter::gfloat)

    the distance on the vertical axis

Returns:

  • (nil)

#threshold_trigger_distance_xClutter::gfloat

The horizontal trigger distance to be used by the action to either emit the Clutter::GestureAction::gesture-begin signal or to emit the Clutter::GestureAction::gesture-cancel signal.

A negative value will be interpreted as the default drag threshold.

Returns:

  • (Clutter::gfloat)

    threshold-trigger-distance-x

#threshold_trigger_distance_x=(threshold_trigger_distance_x) ⇒ Clutter::gfloat

The horizontal trigger distance to be used by the action to either emit the Clutter::GestureAction::gesture-begin signal or to emit the Clutter::GestureAction::gesture-cancel signal.

A negative value will be interpreted as the default drag threshold.

Parameters:

  • threshold_trigger_distance_x (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    threshold-trigger-distance-x

  • (Clutter::gfloat)

    threshold-trigger-distance-x

#threshold_trigger_distance_yClutter::gfloat

The vertical trigger distance to be used by the action to either emit the Clutter::GestureAction::gesture-begin signal or to emit the Clutter::GestureAction::gesture-cancel signal.

A negative value will be interpreted as the default drag threshold.

Returns:

  • (Clutter::gfloat)

    threshold-trigger-distance-y

#threshold_trigger_distance_y=(threshold_trigger_distance_y) ⇒ Clutter::gfloat

The vertical trigger distance to be used by the action to either emit the Clutter::GestureAction::gesture-begin signal or to emit the Clutter::GestureAction::gesture-cancel signal.

A negative value will be interpreted as the default drag threshold.

Parameters:

  • threshold_trigger_distance_y (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    threshold-trigger-distance-y

  • (Clutter::gfloat)

    threshold-trigger-distance-y

#threshold_trigger_edgeClutter::GestureTriggerEdge

The trigger edge to be used by the action to either emit the Clutter::GestureAction::gesture-begin signal or to emit the Clutter::GestureAction::gesture-cancel signal.

Returns:

#threshold_trigger_edge=(threshold_trigger_edge) ⇒ Clutter::GestureTriggerEdge

The trigger edge to be used by the action to either emit the Clutter::GestureAction::gesture-begin signal or to emit the Clutter::GestureAction::gesture-cancel signal.

Parameters:

Returns:

#threshold_trigger_egdeClutter::GestureTriggerEdge

Retrieves the edge trigger of the gesture action, as set using clutter_gesture_action_set_threshold_trigger_edge().

Returns: