2018-02-21 11:20:09 -08:00
|
|
|
import efl_canvas_gesture_types;
|
2017-09-18 23:03:42 -07:00
|
|
|
import efl_input_types;
|
|
|
|
|
2017-10-18 19:05:28 -07:00
|
|
|
/* FIXME: This class lacks a lot of useful helpers. */
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
class @beta Efl.Canvas.Gesture_Touch extends Efl.Object
|
2017-09-18 23:03:42 -07:00
|
|
|
{
|
2017-12-08 06:05:00 -08:00
|
|
|
[[EFL Gesture Touch class]]
|
2018-02-21 11:20:09 -08:00
|
|
|
eo_prefix: efl_gesture_touch;
|
2017-09-18 23:03:42 -07:00
|
|
|
methods {
|
|
|
|
point_record {
|
2017-12-08 06:05:00 -08:00
|
|
|
[[Touch point record method]]
|
2017-09-18 23:03:42 -07:00
|
|
|
params {
|
|
|
|
@in tool : int; [[The finger id ]]
|
2017-10-18 19:05:28 -07:00
|
|
|
@in pos : Eina.Vector2; [[Position of the event]]
|
2017-09-18 23:03:42 -07:00
|
|
|
@in timestamp : double; [[The timestamp of the event]]
|
|
|
|
@in action : Efl.Pointer.Action; [[action of the event]]
|
|
|
|
}
|
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
/* FIXME: This is most likely not useful (without timestamps). */
|
|
|
|
delta @const {
|
|
|
|
[[Compute the distance between the last two events]]
|
2017-09-18 23:03:42 -07:00
|
|
|
params {
|
|
|
|
@in tool : int; [[The finger id ]]
|
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
return: Eina.Vector2; [[The distance vector.]]
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
distance @const {
|
|
|
|
[[Compute the distance between the first touch and the last event.]]
|
2017-09-18 23:03:42 -07:00
|
|
|
params {
|
|
|
|
@in tool : int; [[The finger id ]]
|
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
return: Eina.Vector2; [[The distance vector.]]
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
@property start_point {
|
|
|
|
[[Returns the first touch point.]]
|
|
|
|
get {}
|
|
|
|
values {
|
|
|
|
pos: Eina.Vector2; [[The start position.]]
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property multi_touch {
|
|
|
|
[[This property tells if the event is multi touch.]]
|
|
|
|
get {
|
2017-12-08 06:05:00 -08:00
|
|
|
return: bool; [[returns $true if its a multi touch]]
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property state {
|
|
|
|
[[This property holds the state of the touch event.]]
|
|
|
|
get {
|
2018-05-22 04:18:52 -07:00
|
|
|
return : Efl.Canvas.Gesture_Touch_State; [[touch event state]]
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
/* FIXME: finger_list was broken by design - TODO */
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
|
|
|
implements {
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.destructor;
|
|
|
|
}
|
2017-10-18 19:05:28 -07:00
|
|
|
}
|