Skip to content

Commit

Permalink
[droid] send ACTION_GESTURE_BEGIN and ACTION_GESTURE_END on multi-tou…
Browse files Browse the repository at this point in the history
…ch start and end
  • Loading branch information
Montellese committed Aug 10, 2012
1 parent 224e20e commit d377358
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions xbmc/android/activity/AndroidTouch.cpp
Expand Up @@ -99,6 +99,18 @@ bool CAndroidTouch::OnSingleTouchStart(float x, float y)
return true;
}

bool CAndroidTouch::OnMultiTouchStart(float x, float y, int32_t pointers /* = 2 */)
{
XBMC_TouchGesture(ACTION_GESTURE_BEGIN, x, y, 0.0f, 0.0f);

return true;
}

bool CAndroidTouch::OnMultiTouchEnd(float x, float y, int32_t pointers /* = 2 */)
{
XBMC_TouchGesture(ACTION_GESTURE_END, 0.0f, 0.0f, 0.0f, 0.0f);
}

bool CAndroidTouch::OnTouchGesturePanStart(float x, float y)
{
XBMC_TouchGesture(ACTION_GESTURE_BEGIN, x, y, 0.0f, 0.0f);
Expand Down
3 changes: 3 additions & 0 deletions xbmc/android/activity/AndroidTouch.h
Expand Up @@ -34,6 +34,9 @@ class CAndroidTouch : protected ITouchHandler
protected:
virtual bool OnSingleTouchStart(float x, float y);

virtual bool OnMultiTouchStart(float x, float y, int32_t pointers = 2);
virtual bool OnMultiTouchEnd(float x, float y, int32_t pointers = 2);

virtual bool OnTouchGesturePanStart(float x, float y);
virtual bool OnTouchGesturePan(float x, float y, float offsetX, float offsetY, float velocityX, float velocityY);
virtual bool OnTouchGesturePanEnd(float x, float y, float offsetX, float offsetY, float velocityX, float velocityY);
Expand Down

0 comments on commit d377358

Please sign in to comment.