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 From 572b8fc518ee45cdf5403f58b18e0000868696cb Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 19 Jan 2010 21:55:51 -0800 Subject: Changes to llqtwebkit keyboard event api. Reference to new mac build of llqtwebkit (from revision 5e61bf24915f in https://hg.lindenlab.com/monroe/llqtwebkit-4.6). --- indra/llplugin/llpluginclassmedia.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 609e198db2..adc0b3467d 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -682,13 +682,13 @@ LLPluginClassMedia::ETargetType getTargetTypeFromLLQtWebkit(int target_type) // so that we don't expose the llqtwebkit header in viewer code switch (target_type) { - case LinkTargetType::LTT_TARGET_NONE: + case LLQtWebKit::LTT_TARGET_NONE: return LLPluginClassMedia::TARGET_NONE; - case LinkTargetType::LTT_TARGET_BLANK: + case LLQtWebKit::LTT_TARGET_BLANK: return LLPluginClassMedia::TARGET_BLANK; - case LinkTargetType::LTT_TARGET_EXTERNAL: + case LLQtWebKit::LTT_TARGET_EXTERNAL: return LLPluginClassMedia::TARGET_EXTERNAL; default: -- cgit v1.2.3