aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/canvas/evas_touch_point.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:29:19 +1000
committerDavid Walter Seikel2013-01-13 17:29:19 +1000
commit07274513e984f0b5544586c74508ccd16e7dcafa (patch)
treeb32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/lib/canvas/evas_touch_point.c
parentAdded Irrlicht 1.8, but without all the Windows binaries. (diff)
downloadSledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz
Remove EFL, since it's been released now.
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/lib/canvas/evas_touch_point.c110
1 files changed, 0 insertions, 110 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_touch_point.c b/libraries/evas/src/lib/canvas/evas_touch_point.c
deleted file mode 100644
index bdea73f..0000000
--- a/libraries/evas/src/lib/canvas/evas_touch_point.c
+++ /dev/null
@@ -1,110 +0,0 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4void
5_evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y)
6{
7 Evas_Coord_Touch_Point *point;
8
9 /* create new Evas_Coord_Touch_Point */
10 point = (Evas_Coord_Touch_Point *)calloc(1, sizeof(Evas_Coord_Touch_Point));
11 point->x = x;
12 point->y = y;
13 point->id = id;
14 point->state = EVAS_TOUCH_POINT_DOWN;
15 e->touch_points = eina_list_append(e->touch_points, point);
16}
17
18void
19_evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state)
20{
21 Eina_List *l;
22 Evas_Coord_Touch_Point *point = NULL;
23
24 EINA_LIST_FOREACH(e->touch_points, l, point)
25 {
26 if (point->id == id)
27 {
28 point->x = x;
29 point->y = y;
30 point->state = state;
31 break;
32 }
33 }
34}
35
36void
37_evas_touch_point_remove(Evas *e, int id)
38{
39 Eina_List *l;
40 Evas_Coord_Touch_Point *point = NULL;
41
42 EINA_LIST_FOREACH(e->touch_points, l, point)
43 {
44 if (point->id == id)
45 {
46 e->touch_points = eina_list_remove(e->touch_points, point);
47 free(point);
48 break;
49 }
50 }
51}
52
53EAPI unsigned int
54evas_touch_point_list_count(Evas *e)
55{
56 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
57 return 0;
58 MAGIC_CHECK_END();
59 return eina_list_count(e->touch_points);
60}
61
62EAPI void
63evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y)
64{
65 Evas_Coord_Touch_Point *point = NULL;
66
67 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
68 if (x) *x = 0;
69 if (y) *y = 0;
70 return;
71 MAGIC_CHECK_END();
72
73 point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
74 if (!point)
75 {
76 if (x) *x = 0;
77 if (y) *y = 0;
78 return;
79 }
80 if (x) *x = point->x;
81 if (y) *y = point->y;
82}
83
84EAPI int
85evas_touch_point_list_nth_id_get(Evas *e, unsigned int n)
86{
87 Evas_Coord_Touch_Point *point = NULL;
88
89 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
90 return -1;
91 MAGIC_CHECK_END();
92
93 point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
94 if (!point) return -1;
95 return point->id;
96}
97
98EAPI Evas_Touch_Point_State
99evas_touch_point_list_nth_state_get(Evas *e, unsigned int n)
100{
101 Evas_Coord_Touch_Point *point = NULL;
102
103 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
104 return EVAS_TOUCH_POINT_CANCEL;
105 MAGIC_CHECK_END();
106
107 point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
108 if (!point) return EVAS_TOUCH_POINT_CANCEL;
109 return point->state;
110}