comparison src/events/SDL_gesture.c @ 4689:f9ab8df6d45a

Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture
author Jim Grandpre <jim.tla@gmail.com>
date Sun, 15 Aug 2010 00:36:28 -0400
parents 494f71f57a80
children fff50e86c891 27c458e4ae31
comparison
equal deleted inserted replaced
4688:494f71f57a80 4689:f9ab8df6d45a
460 event.mgesture.x = touch->centroid.x; 460 event.mgesture.x = touch->centroid.x;
461 event.mgesture.y = touch->centroid.y; 461 event.mgesture.y = touch->centroid.y;
462 */ 462 */
463 event.dgesture.gestureId = gestureId; 463 event.dgesture.gestureId = gestureId;
464 event.dgesture.error = error; 464 event.dgesture.error = error;
465 //A finger came up to trigger this event.
466 event.dgesture.numFingers = touch->numDownFingers + 1;
465 return SDL_PushEvent(&event) > 0; 467 return SDL_PushEvent(&event) > 0;
466 } 468 }
467 469
468 470
469 int SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId) { 471 int SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId) {
470 SDL_Event event; 472 SDL_Event event;
471 event.dgesture.type = SDL_DOLLARRECORD; 473 event.dgesture.type = SDL_DOLLARRECORD;
472 event.dgesture.touchId = touch->id; 474 event.dgesture.touchId = touch->id;
473 event.dgesture.gestureId = gestureId; 475 event.dgesture.gestureId = gestureId;
474
475 return SDL_PushEvent(&event) > 0; 476 return SDL_PushEvent(&event) > 0;
476 } 477 }
477 478
478 479
479 void SDL_GestureProcessEvent(SDL_Event* event) 480 void SDL_GestureProcessEvent(SDL_Event* event)