mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 1238761 - Autogenerate constants for MotionEvent; r=snorp
This patch autogenerates constants for MotionEvent to replace the manual definitions in AndroidJavaWrappers.
This commit is contained in:
parent
06c79783a7
commit
11fce4fc7d
@ -28,6 +28,7 @@ bindings_exports_FILES := \
|
||||
Bundle.h \
|
||||
KeyEvent.h \
|
||||
MediaCodec.h \
|
||||
MotionEvent.h \
|
||||
SurfaceTexture.h \
|
||||
$(NULL)
|
||||
bindings_exports_DEST = $(DIST)/include
|
||||
|
1
widget/android/bindings/MotionEvent-classes.txt
Normal file
1
widget/android/bindings/MotionEvent-classes.txt
Normal file
@ -0,0 +1 @@
|
||||
android.view.MotionEvent
|
@ -11,6 +11,7 @@ generated = [
|
||||
'Bundle',
|
||||
'KeyEvent',
|
||||
'MediaCodec',
|
||||
'MotionEvent',
|
||||
'SurfaceTexture'
|
||||
]
|
||||
|
||||
|
@ -73,6 +73,7 @@ using mozilla::Unused;
|
||||
#include "android_npapi.h"
|
||||
#include "GeneratedJNINatives.h"
|
||||
#include "KeyEvent.h"
|
||||
#include "MotionEvent.h"
|
||||
|
||||
#include "imgIEncoder.h"
|
||||
|
||||
@ -526,23 +527,23 @@ public:
|
||||
size_t endIndex = pointerId.Length();
|
||||
|
||||
switch (aAction) {
|
||||
case AndroidMotionEvent::ACTION_DOWN:
|
||||
case AndroidMotionEvent::ACTION_POINTER_DOWN:
|
||||
case sdk::MotionEvent::ACTION_DOWN:
|
||||
case sdk::MotionEvent::ACTION_POINTER_DOWN:
|
||||
type = MultiTouchInput::MULTITOUCH_START;
|
||||
break;
|
||||
case AndroidMotionEvent::ACTION_MOVE:
|
||||
case sdk::MotionEvent::ACTION_MOVE:
|
||||
type = MultiTouchInput::MULTITOUCH_MOVE;
|
||||
break;
|
||||
case AndroidMotionEvent::ACTION_UP:
|
||||
case AndroidMotionEvent::ACTION_POINTER_UP:
|
||||
case sdk::MotionEvent::ACTION_UP:
|
||||
case sdk::MotionEvent::ACTION_POINTER_UP:
|
||||
// for pointer-up events we only want the data from
|
||||
// the one pointer that went up
|
||||
type = MultiTouchInput::MULTITOUCH_END;
|
||||
startIndex = aActionIndex;
|
||||
endIndex = aActionIndex + 1;
|
||||
break;
|
||||
case AndroidMotionEvent::ACTION_OUTSIDE:
|
||||
case AndroidMotionEvent::ACTION_CANCEL:
|
||||
case sdk::MotionEvent::ACTION_OUTSIDE:
|
||||
case sdk::MotionEvent::ACTION_CANCEL:
|
||||
type = MultiTouchInput::MULTITOUCH_CANCEL;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user