~oif-team/libgrip/devtype_expose

« back to all changes in this revision

Viewing changes to src/gripgesturemanager.c

  • Committer: Chase Douglas
  • Date: 2011-03-23 17:23:11 UTC
  • mfrom: (36.1.1 libgrip)
  • Revision ID: chase.douglas@ubuntu.com-20110323172311-urpgzlo2en47g7n2
Add position coordinates to pinch and rotate gesture events

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
        {
267
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
    }
270
280
 
271
281
  return touches;
381
391
        {
382
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
    }
385
405
 
386
406
  return touches;