diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-01-18 17:58:12 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-01-18 17:58:12 -0800 |
commit | fae9c8fe864278b20dfdb7caae3fbc50c779947b (patch) | |
tree | b85532991ef5ec3d87769aeab053c52918e36089 /indra/llplugin | |
parent | 7590704e0e93b48f897c47dba07916efebd95274 (diff) |
Added getNativeKeyData() function to LLWindow and LLWindowMacOSX.
Added an LLSD argument to LLPluginClassMedia::keyEvent() and LLPluginClassMedia::textInput() which contains the native key data.
Made LLViewerMediaImpl retrieve the native key data and pass it to keyEvent and textInput.
Added a native_key_data parameter to the text_event and key_event messages.
Made the webkit plugin extract the native_key_data parameter and pass it to the internal keyEvent() and unicodeInput() functions.
Fixed LLMediaPluginTest to match function signature change to LLPluginClassMedia::keyEvent().
Diffstat (limited to 'indra/llplugin')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 6 | ||||
-rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 3d2eaed5c5..609e198db2 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -469,7 +469,7 @@ void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int sendMessage(message); } -bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifiers) +bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data) { bool result = true; @@ -526,6 +526,7 @@ bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifie message.setValueS32("key", key_code); message.setValue("modifiers", translateModifiers(modifiers)); + message.setValueLLSD("native_key_data", native_key_data); sendMessage(message); } @@ -544,12 +545,13 @@ void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers) sendMessage(message); } -bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers) +bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD native_key_data) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "text_event"); message.setValue("text", text); message.setValue("modifiers", translateModifiers(modifiers)); + message.setValueLLSD("native_key_data", native_key_data); sendMessage(message); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index ebb9099576..58e91fa0b4 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -114,12 +114,12 @@ public: KEY_EVENT_REPEAT }EKeyEventType; - bool keyEvent(EKeyEventType type, int key_code, MASK modifiers); + bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data); void scrollEvent(int x, int y, MASK modifiers); // Text may be unicode (utf8 encoded) - bool textInput(const std::string &text, MASK modifiers); + bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data); void loadURI(const std::string &uri); |