summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-02-11 10:10:57 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-14 09:21:12 +0100
commitf917f75c56167ab87654d4209a48174da64ea721 (patch)
tree66b764f17cbbc2c7b06ebc1bcb6c2d7e4ce36f4d /src/lib/evas
parentf5273decbb769f5e53d10bda925b86ea0c02f770 (diff)
efl/gesture: improve docs
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D11321
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture.eo5
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_custom.eo3
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.eo4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo5
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_types.eot47
6 files changed, 40 insertions, 28 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo
index 26aef89af8..9166f71ca2 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture.eo
@@ -27,7 +27,8 @@ abstract @beta Efl.Canvas.Gesture extends Efl.Object
27 } 27 }
28 @property hotspot { 28 @property hotspot {
29 [[Hotspot of the gesture currently being analyzed. 29 [[Hotspot of the gesture currently being analyzed.
30 The exact meaning depends on the gesture type.]] 30 The exact meaning depends on the gesture type, but by default it
31 reflects the current position of the last touch event.]]
31 get { 32 get {
32 } 33 }
33 set { 34 set {
@@ -43,7 +44,7 @@ abstract @beta Efl.Canvas.Gesture extends Efl.Object
43 set { 44 set {
44 } 45 }
45 values { 46 values {
46 timestamp: uint;[[The time-stamp.]] 47 timestamp: uint;[[The time-stamp, valued in milliseconds.]]
47 } 48 }
48 } 49 }
49 @property touch_count { 50 @property touch_count {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_custom.eo b/src/lib/evas/gesture/efl_canvas_gesture_custom.eo
index 6792d1ba8f..4e4f3ae3d0 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_custom.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_custom.eo
@@ -7,6 +7,9 @@ class @beta Efl.Canvas.Gesture_Custom extends Efl.Canvas.Gesture
7 @[Efl.Canvas.Gesture_Events.gesture,custom] for a description of the Custom gesture. 7 @[Efl.Canvas.Gesture_Events.gesture,custom] for a description of the Custom gesture.
8 8
9 Application developers receive these objects inside a gesture event and do not typically need to create their own. 9 Application developers receive these objects inside a gesture event and do not typically need to create their own.
10
11 Custom gesture recognizers which implement their own gesture properties (e.g., gesture momentum or angle) must
12 inherit this class.
10 ]] 13 ]]
11 c_prefix: efl_gesture_custom; 14 c_prefix: efl_gesture_custom;
12 methods { 15 methods {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
index 2dad839a3d..dc5ad82862 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo
@@ -5,8 +5,8 @@ class @beta Efl.Canvas.Gesture_Manager extends Efl.Object
5 [[This class keeps track of active @Efl.Canvas.Gesture_Recognizer objects. 5 [[This class keeps track of active @Efl.Canvas.Gesture_Recognizer objects.
6 For internal use only. 6 For internal use only.
7 7
8 This gesture class defines methods that register and unregister a recognizer and 8 This class defines methods to manage gesture recognizers and handles passing input events
9 get a recognizer according to gesture event type. 9 to the recognizers that it manages.
10 ]] 10 ]]
11 c_prefix: efl_gesture_manager; 11 c_prefix: efl_gesture_manager;
12 methods { 12 methods {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
index 86fd424aa7..c9801629ff 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo
@@ -14,7 +14,8 @@ abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object
14 c_prefix: efl_gesture_recognizer; 14 c_prefix: efl_gesture_recognizer;
15 methods { 15 methods {
16 @property type @pure_virtual { 16 @property type @pure_virtual {
17 [[This property returns the type of gesture recognized by this recognizer.]] 17 [[This property returns the type of gesture recognized by this recognizer.
18 It must be implemented for the recognizer to function.]]
18 get {} 19 get {}
19 values { 20 values {
20 type: Efl.Canvas.Gesture_Recognizer_Type; [[The gesture type to recognize.]] 21 type: Efl.Canvas.Gesture_Recognizer_Type; [[The gesture type to recognize.]]
@@ -26,6 +27,8 @@ abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object
26 27
27 Updates the state of the gesture object as required, and returns a 28 Updates the state of the gesture object as required, and returns a
28 suitable result for the current recognition step. 29 suitable result for the current recognition step.
30
31 This method must be implemented for the recognizer to function.
29 ]] 32 ]]
30 params { 33 params {
31 @in gesture: Efl.Canvas.Gesture; [[The gesture object.]] 34 @in gesture: Efl.Canvas.Gesture; [[The gesture object.]]
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo
index 1254d29b03..92f9786e75 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo
@@ -2,6 +2,10 @@ abstract @beta Efl.Canvas.Gesture_Recognizer_Custom extends Efl.Canvas.Gesture_R
2{ 2{
3 [[This is the recognizer for Custom gestures. 3 [[This is the recognizer for Custom gestures.
4 See @Efl.Canvas.Gesture_Recognizer. 4 See @Efl.Canvas.Gesture_Recognizer.
5
6 Custom-written recognizers must inherit this class.
7 They are responsible for managing and updating the state of the recognized @Efl.Canvas.Gesture object inside
8 their implementation of the @Efl.Canvas.Gesture_Recognizer.recognize method, which is required.
5 ]] 9 ]]
6 c_prefix: efl_gesture_recognizer_custom; 10 c_prefix: efl_gesture_recognizer_custom;
7 methods { 11 methods {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_types.eot b/src/lib/evas/gesture/efl_canvas_gesture_types.eot
index a5a876dc5b..eb5fc841ff 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_types.eot
+++ b/src/lib/evas/gesture/efl_canvas_gesture_types.eot
@@ -1,25 +1,26 @@
1import eina_types; 1import eina_types;
2import efl_input_types; 2import efl_input_types;
3import efl_canvas_gesture_events;
3 4
4enum @beta Efl.Canvas.Gesture_Touch_State 5enum @beta Efl.Canvas.Gesture_Touch_State
5{ 6{
6 [[ This enum type describes the state of a touch event. ]] 7 [[ This enum type describes the state of a touch event. ]]
7 legacy: efl_gesture_touch_state; 8 legacy: efl_gesture_touch_state;
8 unknown = 0, [[Gesture Touch State unknown]] 9 unknown = 0, [[Touch state is unset.]]
9 begin , [[First fingure touch down]] 10 begin, [[First touch point has just been added.]]
10 update, [[fingure touch update]] 11 update, [[A touch point position has updated or other touch points were added.]]
11 end, [[Last fingure touch up]] 12 end, [[A touch point has been released.]]
12} 13}
13 14
14enum @beta Efl.Canvas.Gesture_State 15enum @beta Efl.Canvas.Gesture_State
15{ 16{
16 [[ This enum type describes the state of a gesture. ]] 17 [[ This enum type describes the state of a gesture. ]]
17 legacy: efl_gesture_state; 18 legacy: efl_gesture_state;
18 none = 0, [[No gesture state]] 19 none = 0, [[No gesture state.]]
19 started = 1, [[A continuous gesture has started.]] 20 started = 1, [[A gesture has started.]]
20 updated, [[A gesture continues.]] 21 updated, [[A gesture has triggered.]]
21 finished, [[A gesture has finished.]] 22 finished, [[A gesture has ended and has triggered.]]
22 canceled, [[A gesture was canceled.]] 23 canceled, [[A gesture has ended without triggering.]]
23} 24}
24 25
25enum @beta Efl.Canvas.Gesture_Recognizer_Result 26enum @beta Efl.Canvas.Gesture_Recognizer_Result
@@ -28,37 +29,37 @@ enum @beta Efl.Canvas.Gesture_Recognizer_Result
28 legacy: efl_gesture_recognizer_result; 29 legacy: efl_gesture_recognizer_result;
29 30
30 ignore = 0x0001, [[The event does not change the state of the recognizer.]] 31 ignore = 0x0001, [[The event does not change the state of the recognizer.]]
31 maybe = 0x0002, [[The event changed the internal state of the recognizer, but it isn't clear yet if it is a gesture or not. The recognizer needs to filter more events to decide.]] 32 maybe = 0x0002, [[The event changed the internal state of the recognizer, but it isn't clear yet if it is a gesture or not. The recognizer needs to filter more events to decide.]]
32 trigger = 0x0004, [[The gesture has been triggered]] 33 trigger = 0x0004, [[The gesture has been triggered]]
33 finish = 0x0008, [[The gesture has been finished successfully.]] 34 finish = 0x0008, [[The gesture has been finished successfully and the gesture triggered.]]
34 cancel = 0x0010, [[The event made it clear that it is not a gesture. If the gesture recognizer was in Triggered state before, then the gesture is canceled.]] 35 cancel = 0x0010, [[The event made it clear that it is not a gesture. If the gesture recognizer was in Triggered state before, then the gesture is canceled.]]
35 result_mask = 0x00ff, [[The gesture result mask]] 36 result_mask = 0x00ff, [[The gesture result mask]]
36} 37}
37 38
38enum @beta Efl.Canvas.Gesture_Recognizer_Type 39enum @beta Efl.Canvas.Gesture_Recognizer_Type
39{ 40{
40 [[ This enum type describes the state of a touch event. ]] 41 [[ This enum type describes the type of gesture recognized by a given recognizer. ]]
41 legacy: efl_gesture_recognizer_type; 42 legacy: efl_gesture_recognizer_type;
42 tap = 0, 43 tap = 0, [[See @[Efl.Canvas.Gesture_Events.gesture,tap] ]]
43 double_tap, 44 double_tap, [[See @[Efl.Canvas.Gesture_Events.gesture,double_tap] ]]
44 triple_tap, 45 triple_tap, [[See @[Efl.Canvas.Gesture_Events.gesture,triple_tap] ]]
45 long_tap, 46 long_tap, [[See @[Efl.Canvas.Gesture_Events.gesture,long_tap] ]]
46 momentum, 47 momentum, [[See @[Efl.Canvas.Gesture_Events.gesture,momentum] ]]
47 flick, 48 flick, [[See @[Efl.Canvas.Gesture_Events.gesture,flick] ]]
48 zoom, 49 zoom, [[See @[Efl.Canvas.Gesture_Events.gesture,zoom] ]]
49 custom, 50 custom, [[See @[Efl.Canvas.Gesture_Events.gesture,custom] ]]
50} 51}
51 52
52struct @beta @c_name(Efl_Gesture_Touch_Point_Info) Efl.Canvas.Gesture_Touch_Point_Info { 53struct @beta @c_name(Efl_Gesture_Touch_Point_Info) Efl.Canvas.Gesture_Touch_Point_Info {
53 [[This struct represents the underlying data of a touch point.]] 54 [[This struct represents the underlying data of a touch point.]]
54 pos: Eina.Position2D; [[The canvas position of the touch point data.]] 55 pos: Eina.Position2D; [[The canvas position of the touch point data.]]
55 pressed: bool; [[Whether this touch point is being pressed down.]] 56 pressed: bool; [[Whether this touch point is currently being pressed down.]]
56 timestamp: uint; [[The timestamp of the touch point data.]] 57 timestamp: uint; [[The timestamp of the touch point data in milliseconds.]]
57} 58}
58 59
59struct @beta @c_name(Efl_Gesture_Touch_Point_Data) Efl.Canvas.Gesture_Touch_Point_Data { 60struct @beta @c_name(Efl_Gesture_Touch_Point_Data) Efl.Canvas.Gesture_Touch_Point_Data {
60 [[This struct represents the state of a touch point.]] 61 [[This struct represents the state of a touch point.]]
61 id: int; [[Touch id of the point.]] 62 id: int; [[Touch id of the point, where the first point is $0.]]
62 action: Efl.Pointer.Action; [[The last event with this point.]] 63 action: Efl.Pointer.Action; [[The last event with this point.]]
63 start: Efl.Canvas.Gesture_Touch_Point_Info; [[The start data for the touch point.]] 64 start: Efl.Canvas.Gesture_Touch_Point_Info; [[The start data for the touch point.]]
64 prev: Efl.Canvas.Gesture_Touch_Point_Info; [[The previous data for the touch point.]] 65 prev: Efl.Canvas.Gesture_Touch_Point_Info; [[The previous data for the touch point.]]