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
|
|
|
{
|
2019-09-18 23:23:07 -07:00
|
|
|
[[EFL Gesture Touch class
|
|
|
|
|
|
|
|
This gesture class defines a method that records touch points and supports
|
|
|
|
properties - first touch point, current touch point, timestamp, multi-touch
|
|
|
|
and state information.]]
|
2019-05-09 07:16:42 -07:00
|
|
|
c_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 {
|
2019-11-26 21:24:01 -08:00
|
|
|
@in event : void_ptr; [[The EFL_INPUT_POINTER_CLASS pointer ]]
|
2017-09-18 23:03:42 -07:00
|
|
|
}
|
|
|
|
}
|
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 {
|
2019-05-14 00:37:20 -07:00
|
|
|
pos: Eina.Position2D; [[The start position.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property cur_point {
|
|
|
|
[[Returns the current touch point.]]
|
|
|
|
get {}
|
|
|
|
values {
|
|
|
|
pos: Eina.Position2D; [[The current position.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property cur_timestamp {
|
|
|
|
[[Returns the timestamp.]]
|
|
|
|
get {}
|
|
|
|
values {
|
|
|
|
time: uint; [[The timestamp.]]
|
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
|
|
|
}
|