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
=== modified file 'src/gripgesturemanager.c'
--- src/gripgesturemanager.c 2011-01-24 20:04:47 +0000
+++ src/gripgesturemanager.c 2011-03-23 15:22:48 +0000
@@ -266,6 +266,16 @@
266 {266 {
267 event->radius = attrs[i].float_val;267 event->radius = attrs[i].float_val;
268 }268 }
269 else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_X) == 0 &&
270 attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
271 {
272 event->position_x = attrs[i].float_val;
273 }
274 else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_Y) == 0 &&
275 attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
276 {
277 event->position_y = attrs[i].float_val;
278 }
269 }279 }
270280
271 return touches;281 return touches;
@@ -381,6 +391,16 @@
381 {391 {
382 event->angle = attrs[i].float_val;392 event->angle = attrs[i].float_val;
383 }393 }
394 else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_X) == 0 &&
395 attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
396 {
397 event->position_x = attrs[i].float_val;
398 }
399 else if (g_strcmp0 (attrs[i].name, GEIS_GESTURE_ATTRIBUTE_POSITION_Y) == 0 &&
400 attrs[i].type == GEIS_ATTR_TYPE_FLOAT)
401 {
402 event->position_y = attrs[i].float_val;
403 }
384 }404 }
385405
386 return touches;406 return touches;
387407
=== modified file 'src/gripgesturemanager.h'
--- src/gripgesturemanager.h 2011-01-21 17:19:26 +0000
+++ src/gripgesturemanager.h 2011-03-23 15:22:48 +0000
@@ -100,6 +100,8 @@
100 gdouble radius_delta;100 gdouble radius_delta;
101 gdouble radial_velocity;101 gdouble radial_velocity;
102 gdouble radius;102 gdouble radius;
103 gfloat position_x;
104 gfloat position_y;
103};105};
104106
105struct _GripEventGestureRotate107struct _GripEventGestureRotate
@@ -116,6 +118,8 @@
116 gdouble angle_delta;118 gdouble angle_delta;
117 gdouble angular_velocity;119 gdouble angular_velocity;
118 gdouble angle;120 gdouble angle;
121 gfloat position_x;
122 gfloat position_y;
119};123};
120124
121struct _GripEventGestureTap125struct _GripEventGestureTap

Subscribers

People subscribed via source and target branches

to all changes: