Merge lp:~oif-team/libgrip/add-position-coords into lp:libgrip

Proposed by Chase Douglas
Status: Merged
Merged at revision: 37
Proposed branch: lp:~oif-team/libgrip/add-position-coords
Merge into: lp:libgrip
Diff against target: 59 lines (+24/-0)
2 files modified
src/gripgesturemanager.c (+20/-0)
src/gripgesturemanager.h (+4/-0)
To merge this branch: bzr merge lp:~oif-team/libgrip/add-position-coords
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Review via email: mp+54542@code.launchpad.net

Description of the change

Add transform position coordinates to the pinch and rotate gesture events.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

One small step in the right direction.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gripgesturemanager.c'
2--- src/gripgesturemanager.c 2011-01-24 20:04:47 +0000
3+++ src/gripgesturemanager.c 2011-03-23 15:22:48 +0000
4@@ -266,6 +266,16 @@
5 {
6 event->radius = attrs[i].float_val;
7 }
8+ else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_X) == 0 &&
9+ attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
10+ {
11+ event->position_x = attrs[i].float_val;
12+ }
13+ else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_Y) == 0 &&
14+ attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
15+ {
16+ event->position_y = attrs[i].float_val;
17+ }
18 }
19
20 return touches;
21@@ -381,6 +391,16 @@
22 {
23 event->angle = attrs[i].float_val;
24 }
25+ else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_X) == 0 &&
26+ attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
27+ {
28+ event->position_x = attrs[i].float_val;
29+ }
30+ else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_Y) == 0 &&
31+ attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
32+ {
33+ event->position_y = attrs[i].float_val;
34+ }
35 }
36
37 return touches;
38
39=== modified file 'src/gripgesturemanager.h'
40--- src/gripgesturemanager.h 2011-01-21 17:19:26 +0000
41+++ src/gripgesturemanager.h 2011-03-23 15:22:48 +0000
42@@ -100,6 +100,8 @@
43 gdouble radius_delta;
44 gdouble radial_velocity;
45 gdouble radius;
46+ gfloat position_x;
47+ gfloat position_y;
48 };
49
50 struct _GripEventGestureRotate
51@@ -116,6 +118,8 @@
52 gdouble angle_delta;
53 gdouble angular_velocity;
54 gdouble angle;
55+ gfloat position_x;
56+ gfloat position_y;
57 };
58
59 struct _GripEventGestureTap

Subscribers

People subscribed via source and target branches

to all changes: