Class

PhocGesture

since: 0

Description [src]

abstract class Phoc.Gesture : GObject.Object
{
  /* No available fields */
}

PhocGesture helps to detect and track ongoing gestures.

Available since: 0

Ancestors

Constructors

phoc_gesture_new
No description available.

since: 0

Instance methods

phoc_gesture_get_last_event

Returns the last event that was processed for sequence.

since: 0

phoc_gesture_get_last_update_time
No description available.

since: 0

phoc_gesture_get_point

If sequence is currently being interpreted by gesture, returns TRUE and fills in x and y with the last coordinates stored for that event sequence.

since: 0

phoc_gesture_get_sequence_state

Returns the sequence state, as seen by gesture.

since: 0

phoc_gesture_get_sequences

Returns the list of PhocEventSequences currently being interpreted by PhocGesture.

since: 0

phoc_gesture_group
No description available.

since: 0

phoc_gesture_handle_event

Handle the given event.

since: 0

phoc_gesture_handles_sequence

Returns TRUE if gesture is currently handling events corresponding to sequence.

unstable since: 3.14

phoc_gesture_is_active

Returns TRUE if the gesture is currently active. A gesture is active meanwhile there are touch sequences interacting with it.

unstable since: 3.14

phoc_gesture_is_recognized

Returns TRUE if the gesture is currently recognized. A gesture is recognized if there are as many interacting touch sequences as required by self, and PhocGesture::check returned TRUE for the sequences being currently interpreted.

since: 0

phoc_gesture_reset

Resets the gesture to a clean state.

since: 0

phoc_gesture_set_sequence_state

Sets the state of sequence in self. Sequences start in state #PHOC_EVENT_SEQUENCE_NONE, and whenever they change state, they can never go back to that state. Likewise, sequences in state #PHOC_EVENT_SEQUENCE_DENIED cannot turn back to a not denied state. With these rules, the lifetime of an event sequence is constrained to the next four:

since: 0

phoc_gesture_set_state
No description available.

since: 0

phoc_gesture_ungroup

Separates self into an isolated group.

since: 0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Phoc.Gesture:n-points

The number of touch points that trigger recognition on this gesture.

since: 0

Signals

Phoc.Gesture::begin

Emitted when the gesture is recognized.

since: 0

Phoc.Gesture::cancel

Emitted whenever a sequence is cancelled.

since: 0

Phoc.Gesture::end

Emitted when gesture stopped recognizing the event sequences as something to be handled.

since: 0

Phoc.Gesture::sequence-state-changed

This signal is emitted whenever a sequence state changes. See phoc_gesture_set_sequence_state() to know more about the expectable sequence lifetimes.

since: 0

Phoc.Gesture::update

Emitted whenever an event is handled while the gesture is recognized.

since: 0

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

unstable since: 2.0

Class structure

struct PhocGestureClass {
  GObjectClass parent_class;
  gboolean (* check) (
    PhocGesture* self
  );
  gboolean (* handle_event) (
    PhocGesture* self,
    const PhocEvent* event,
    double lx,
    double ly
  );
  void (* reset) (
    PhocGesture* self
  );
  gboolean (* filter_event) (
    PhocGesture* self,
    const PhocEvent* event
  );
  void (* begin) (
    PhocGesture* self,
    PhocEventSequence* seq
  );
  void (* update) (
    PhocGesture* self,
    PhocEventSequence* seq
  );
  void (* end) (
    PhocGesture* self,
    PhocEventSequence* seq
  );
  void (* cancel) (
    PhocGesture* self,
    PhocEventSequence* seq
  );
  void (* sequence_state_changed) (
    PhocGesture* gesture,
    PhocEventSequence* sequence,
    PhocEventSequenceState state
  );
  
}
No description available.
Class members
parent_class: GObjectClass

The parent class.

check: gboolean (* check) ( PhocGesture* self )
No description available.
handle_event: gboolean (* handle_event) ( PhocGesture* self, const PhocEvent* event, double lx, double ly )
No description available.
reset: void (* reset) ( PhocGesture* self )
No description available.
filter_event: gboolean (* filter_event) ( PhocGesture* self, const PhocEvent* event )
No description available.
begin: void (* begin) ( PhocGesture* self, PhocEventSequence* seq )
No description available.
update: void (* update) ( PhocGesture* self, PhocEventSequence* seq )
No description available.
end: void (* end) ( PhocGesture* self, PhocEventSequence* seq )
No description available.
cancel: void (* cancel) ( PhocGesture* self, PhocEventSequence* seq )
No description available.
sequence_state_changed: void (* sequence_state_changed) ( PhocGesture* gesture, PhocEventSequence* sequence, PhocEventSequenceState state )
No description available.

Virtual methods

Phoc.GestureClass.begin
No description available.

since: 0

Phoc.GestureClass.cancel
No description available.

since: 0

Phoc.GestureClass.check
No description available.

since: 0

Phoc.GestureClass.end
No description available.

since: 0

Phoc.GestureClass.filter_event
No description available.

since: 0

Phoc.GestureClass.handle_event

Handle the given event.

since: 0

Phoc.GestureClass.reset

Resets the gesture to a clean state.

since: 0

Phoc.GestureClass.sequence_state_changed
No description available.

since: 0

Phoc.GestureClass.update
No description available.

since: 0