зеркало из https://github.com/mozilla/gecko-dev.git
Bug 742036 - Part 2: Add AndroidGeckoEvent::RepeatCount() for KeyEvents. r=masayuki,blassey a=blocking-fennec
--HG-- extra : rebase_source : 8ff6cd6d3e4688570b41fe9e5233ea26fdf417ed
This commit is contained in:
Родитель
7523f8d2e9
Коммит
2a5fed50e9
|
@ -132,6 +132,7 @@ public class GeckoEvent {
|
|||
|
||||
public int mMetaState, mFlags;
|
||||
public int mKeyCode, mUnicodeChar;
|
||||
public int mRepeatCount;
|
||||
public int mOffset, mCount;
|
||||
public String mCharacters, mCharactersExtra;
|
||||
public int mRangeType, mRangeStyles;
|
||||
|
@ -203,6 +204,7 @@ public class GeckoEvent {
|
|||
mFlags = k.getFlags();
|
||||
mKeyCode = k.getKeyCode();
|
||||
mUnicodeChar = k.getUnicodeChar();
|
||||
mRepeatCount = k.getRepeatCount();
|
||||
mCharacters = k.getCharacters();
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ jfieldID AndroidGeckoEvent::jKeyCodeField = 0;
|
|||
jfieldID AndroidGeckoEvent::jMetaStateField = 0;
|
||||
jfieldID AndroidGeckoEvent::jFlagsField = 0;
|
||||
jfieldID AndroidGeckoEvent::jUnicodeCharField = 0;
|
||||
jfieldID AndroidGeckoEvent::jRepeatCountField = 0;
|
||||
jfieldID AndroidGeckoEvent::jOffsetField = 0;
|
||||
jfieldID AndroidGeckoEvent::jCountField = 0;
|
||||
jfieldID AndroidGeckoEvent::jPointerIndexField = 0;
|
||||
|
@ -173,6 +174,7 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
|
|||
jMetaStateField = getField("mMetaState", "I");
|
||||
jFlagsField = getField("mFlags", "I");
|
||||
jUnicodeCharField = getField("mUnicodeChar", "I");
|
||||
jRepeatCountField = getField("mRepeatCount", "I");
|
||||
jOffsetField = getField("mOffset", "I");
|
||||
jCountField = getField("mCount", "I");
|
||||
jPointerIndexField = getField("mPointerIndex", "I");
|
||||
|
@ -430,6 +432,7 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
|
|||
mFlags = jenv->GetIntField(jobj, jFlagsField);
|
||||
mKeyCode = jenv->GetIntField(jobj, jKeyCodeField);
|
||||
mUnicodeChar = jenv->GetIntField(jobj, jUnicodeCharField);
|
||||
mRepeatCount = jenv->GetIntField(jobj, jRepeatCountField);
|
||||
ReadCharactersField(jenv);
|
||||
break;
|
||||
|
||||
|
|
|
@ -597,6 +597,7 @@ public:
|
|||
bool IsShiftPressed() const { return (mMetaState & AndroidKeyEvent::META_SHIFT_MASK) != 0; }
|
||||
int Flags() { return mFlags; }
|
||||
int UnicodeChar() { return mUnicodeChar; }
|
||||
int RepeatCount() const { return mRepeatCount; }
|
||||
int Offset() { return mOffset; }
|
||||
int Count() { return mCount; }
|
||||
int PointerIndex() { return mPointerIndex; }
|
||||
|
@ -621,6 +622,7 @@ protected:
|
|||
nsIntRect mRect;
|
||||
int mFlags, mMetaState;
|
||||
int mKeyCode, mUnicodeChar;
|
||||
int mRepeatCount;
|
||||
int mOffset, mCount;
|
||||
int mRangeType, mRangeStyles;
|
||||
int mRangeForeColor, mRangeBackColor;
|
||||
|
@ -673,6 +675,7 @@ protected:
|
|||
static jfieldID jCountField;
|
||||
static jfieldID jPointerIndexField;
|
||||
static jfieldID jUnicodeCharField;
|
||||
static jfieldID jRepeatCountField;
|
||||
static jfieldID jRangeTypeField;
|
||||
static jfieldID jRangeStylesField;
|
||||
static jfieldID jRangeForeColorField;
|
||||
|
|
Загрузка…
Ссылка в новой задаче