summaryrefslogtreecommitdiff
path: root/src/lib/evas/gesture
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/gesture')
-rw-r--r--src/lib/evas/gesture/efl_gesture.eo35
-rw-r--r--src/lib/evas/gesture/efl_gesture_manager.eo39
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer.eo44
-rw-r--r--src/lib/evas/gesture/efl_gesture_recognizer_tap.eo10
-rw-r--r--src/lib/evas/gesture/efl_gesture_tap.eo25
-rw-r--r--src/lib/evas/gesture/efl_gesture_touch.eo61
-rw-r--r--src/lib/evas/gesture/efl_gesture_types.eot33
7 files changed, 247 insertions, 0 deletions
diff --git a/src/lib/evas/gesture/efl_gesture.eo b/src/lib/evas/gesture/efl_gesture.eo
new file mode 100644
index 0000000..2fb73c6
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture.eo
@@ -0,0 +1,35 @@
1import efl_gesture_types;
2
3abstract Efl.Gesture(Efl.Object)
4{
5 methods {
6 @property type {
7 [[This property holds the type of the gesture.]]
8 get {
9 }
10 values {
11 type: ptr(const(Efl.Event.Description)); [[gesture type]]
12 }
13 }
14 @property state {
15 [[This property holds the current state of the gesture.]]
16 get {
17 }
18 set {
19 }
20 values {
21 state: Efl.Gesture.State; [[gesture state]]
22 }
23 }
24 @property hotspot {
25 [[This property holds the hotspot of the current gesture.]]
26 get {
27 }
28 set {
29 }
30 values {
31 hotspot: Eina.Vector2;[[hotspot co-ordinate]]
32 }
33 }
34 }
35} \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_manager.eo b/src/lib/evas/gesture/efl_gesture_manager.eo
new file mode 100644
index 0000000..2292480
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_manager.eo
@@ -0,0 +1,39 @@
1import efl_gesture_types;
2
3class Efl.Gesture.Manager(Efl.Object)
4{
5 methods {
6 recognizer_register {
7 [[This function is called to register a new Efl.Gesture.Recognizer]]
8
9 params {
10 @in recognizer: Efl.Gesture.Recognizer; [[The gesture recognizer object]]
11 }
12 return: ptr(const(Efl.Event.Description)); [[Returns the Efl.Event.Description type the recognizer supports]]
13 }
14 recognizer_unregister {
15 [[This function is called to unregister a Efl.Gesture.Recognizer ]]
16
17 params {
18 @in recognizer: Efl.Gesture.Recognizer; [[The gesture recognizer object]]
19 }
20 }
21 @property config{
22 [[This property holds the config value for the recognizer]]
23 set {
24 }
25 get {
26 }
27 keys {
28 name: string; [[propery name]]
29 }
30 values {
31 value: ptr(any_value); [[value of the property]]
32 }
33 }
34 }
35 implements {
36 Efl.Object.constructor;
37 Efl.Object.destructor;
38 }
39} \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer.eo b/src/lib/evas/gesture/efl_gesture_recognizer.eo
new file mode 100644
index 0000000..f1e340e
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_recognizer.eo
@@ -0,0 +1,44 @@
1import efl_gesture_types;
2
3abstract Efl.Gesture.Recognizer(Efl.Object)
4{
5 methods {
6 create @pure_virtual{
7 [[This function is called to create a new Efl.Gesture object for the given target]]
8
9 params {
10 @in target: Efl.Object; [[The target widget]]
11 }
12 return: Efl.Gesture; [[Returns the Efl.Gesture event object]]
13 }
14 recognize @pure_virtual{
15 [[Handles the given event for the watched object, updating the state of the gesture object as required, and returns a suitable result for the current recognition step.]]
16
17 params {
18 @in gesture: Efl.Gesture; [[The gesture object]]
19 @in watched: Efl.Object; [[The watched object]]
20 @in event: Efl.Gesture.Touch; [[The pointer event]]
21
22 }
23 return: Efl.Gesture.Recognizer.Result; [[Returns the Efl.Gesture event object]]
24 }
25 reset {
26 [[This function is called by the framework to reset a given gesture.]]
27
28 params {
29 @in gesture: Efl.Gesture; [[The gesture object]]
30 }
31 }
32 @property config{
33 [[This property holds the config value for the recognizer]]
34 get {
35 }
36 keys {
37 name: string; [[propery name]]
38 }
39 values {
40 value: ptr(any_value); [[value of the property]]
41 }
42 }
43 }
44} \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_recognizer_tap.eo b/src/lib/evas/gesture/efl_gesture_recognizer_tap.eo
new file mode 100644
index 0000000..509b91d
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_recognizer_tap.eo
@@ -0,0 +1,10 @@
1class Efl.Gesture.Recognizer.Tap(Efl.Gesture.Recognizer)
2{
3 implements {
4 Efl.Object.constructor;
5 Efl.Object.destructor;
6 Efl.Gesture.Recognizer.create;
7 Efl.Gesture.Recognizer.recognize;
8 Efl.Gesture.Recognizer.reset;
9 }
10} \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_tap.eo b/src/lib/evas/gesture/efl_gesture_tap.eo
new file mode 100644
index 0000000..6cbfd02
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_tap.eo
@@ -0,0 +1,25 @@
1import efl_gesture_types;
2
3class Efl.Gesture.Tap(Efl.Gesture)
4{
5 methods {
6 @property position {
7 [[This property holds the type of the gesture.]]
8 set {
9 }
10 get {
11 }
12 values {
13 pos: Eina.Vector2;[[position of the mouse event]]
14 }
15 }
16 }
17 event_prefix: efl;
18 events {
19 gesture,tap; [[Event for tap gesture]]
20 }
21
22 implements {
23 Efl.Object.constructor;
24 }
25} \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_touch.eo b/src/lib/evas/gesture/efl_gesture_touch.eo
new file mode 100644
index 0000000..9df3ed9
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_touch.eo
@@ -0,0 +1,61 @@
1import efl_gesture_types;
2import efl_input_types;
3
4class Efl.Gesture.Touch(Efl.Object)
5{
6 methods {
7 point_record {
8 params {
9 @in tool : int; [[The finger id ]]
10 @in x : double; [[The x co-ordinate of the event]]
11 @in y : double; [[The y co-ordinate of the event]]
12 @in timestamp : double; [[The timestamp of the event]]
13 @in action : Efl.Pointer.Action; [[action of the event]]
14 }
15 }
16 delta {
17 params {
18 @in tool : int; [[The finger id ]]
19 @out x : double; [[The x co-ordinate of the event]]
20 @out y : double; [[The y co-ordinate of the event]]
21 }
22 }
23 distance {
24 params {
25 @in tool : int; [[The finger id ]]
26 @out x : double; [[The x co-ordinate of the event]]
27 @out y : double; [[The y co-ordinate of the event]]
28 }
29 }
30 start_point {
31 params {
32 @out x : double; [[The x co-ordinate of the event]]
33 @out y : double; [[The y co-ordinate of the event]]
34 }
35 }
36 @property multi_touch {
37 [[This property tells if the event is multi touch.]]
38 get {
39 return: bool; [[returns true if its a multi touch]]
40 }
41 }
42 @property state {
43 [[This property holds the state of the touch event.]]
44 get {
45 return : Efl.Gesture.Touch.State; [[touch event state]]
46 }
47 }
48 @property finger_list {
49 get {
50 [[Get the list of finger id .]]
51 }
52 values {
53 ret: const(list<int>); [[List of finger id]]
54 }
55 }
56 }
57 implements {
58 Efl.Object.constructor;
59 Efl.Object.destructor;
60 }
61} \ No newline at end of file
diff --git a/src/lib/evas/gesture/efl_gesture_types.eot b/src/lib/evas/gesture/efl_gesture_types.eot
new file mode 100644
index 0000000..5a41938
--- /dev/null
+++ b/src/lib/evas/gesture/efl_gesture_types.eot
@@ -0,0 +1,33 @@
1enum Efl.Gesture.Touch.State
2{
3 [[ This enum type describes the state of a touch event. ]]
4 legacy: efl_gesture_touch;
5 unknown = 0, [[Gesture Touch State unknown]]
6 begin , [[First fingure touch down]]
7 update, [[fingure touch update]]
8 end, [[Last fingure touch up]]
9}
10
11enum Efl.Gesture.State
12{
13 [[ This enum type describes the state of a gesture. ]]
14 legacy: efl_gesture;
15 none = 0,
16 started = 1, [[A continuous gesture has started.]]
17 updated, [[A gesture continues.]]
18 finished, [[A gesture has finished.]]
19 canceled, [[A gesture was canceled.]]
20}
21
22enum Efl.Gesture.Recognizer.Result
23{
24 [[ This enum type describes the state of a gesture recognizer. ]]
25 legacy: efl_gesture;
26
27 ignore = 0x0001, [[The event does not change the state of the recognizer.]]
28 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.]]
29 trigger = 0x0004, [[The gesture has been triggered]]
30 finish = 0x0008, [[The gesture has been finished successfully.]]
31 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.]]
32 result_mask = 0x00ff,
33} \ No newline at end of file