From fae9c8fe864278b20dfdb7caae3fbc50c779947b Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 18 Jan 2010 17:58:12 -0800 Subject: 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(). --- indra/llplugin/llpluginclassmedia.cpp | 6 ++++-- indra/llplugin/llpluginclassmedia.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/llplugin') 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); -- cgit v1.2.3