diff options
author | Robin Cornelius | 2010-10-10 21:53:54 +0100 |
---|---|---|
committer | Robin Cornelius | 2010-10-10 21:53:54 +0100 |
commit | c0034c520c6e61b64822e276316651ec6912bd98 (patch) | |
tree | 910442027b6a2c1406d80ca93949755b54badf5c /linden/indra/llwindow/llwindowsdl.cpp | |
parent | Use all those cores for compile (diff) | |
parent | Thickbrick Sleaford, Soft Linden: STORM-164 make gcc-4.4 happy about llvosky.h (diff) | |
download | meta-impy-c0034c520c6e61b64822e276316651ec6912bd98.zip meta-impy-c0034c520c6e61b64822e276316651ec6912bd98.tar.gz meta-impy-c0034c520c6e61b64822e276316651ec6912bd98.tar.bz2 meta-impy-c0034c520c6e61b64822e276316651ec6912bd98.tar.xz |
Merge branch 'mccabe-plugins' into plugins_merge
Conflicts:
linden/doc/contributions.txt
linden/indra/cmake/GStreamer.cmake
linden/indra/cmake/LLMedia.cmake
linden/indra/cmake/OPENAL.cmake
linden/indra/llmedia/CMakeLists.txt
linden/indra/llprimitive/material_codes.h
linden/indra/newview/chatbar_as_cmdline.cpp
linden/indra/newview/llappviewer.cpp
linden/indra/newview/llfloatertos.cpp
linden/indra/newview/llstartup.cpp
linden/indra/newview/llviewerwindow.cpp
linden/indra/newview/llvoavatar.cpp
linden/indra/newview/pipeline.cpp
linden/indra/newview/pipeline.h
linden/indra/newview/viewer_manifest.py
linden/install.xml
Diffstat (limited to 'linden/indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index 16a583a..fa53c84 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp | |||
@@ -250,6 +250,10 @@ LLWindowSDL::LLWindowSDL(const std::string& title, S32 x, S32 y, S32 width, | |||
250 | #if LL_X11 | 250 | #if LL_X11 |
251 | mFlashing = FALSE; | 251 | mFlashing = FALSE; |
252 | #endif // LL_X11 | 252 | #endif // LL_X11 |
253 | |||
254 | mKeyScanCode = 0; | ||
255 | mKeyVirtualKey = 0; | ||
256 | mKeyModifiers = KMOD_NONE; | ||
253 | } | 257 | } |
254 | 258 | ||
255 | static SDL_Surface *Load_BMP_Resource(const char *basename) | 259 | static SDL_Surface *Load_BMP_Resource(const char *basename) |
@@ -2227,7 +2231,40 @@ static void color_changed_callback(GtkWidget *widget, | |||
2227 | gtk_color_selection_get_current_color(colorsel, colorp); | 2231 | gtk_color_selection_get_current_color(colorsel, colorp); |
2228 | } | 2232 | } |
2229 | 2233 | ||
2230 | BOOL LLWindowSDL::dialog_color_picker ( F32 *r, F32 *g, F32 *b) | 2234 | |
2235 | /* | ||
2236 | Make the raw keyboard data available - used to poke through to LLQtWebKit so | ||
2237 | that Qt/Webkit has access to the virtual keycodes etc. that it needs | ||
2238 | */ | ||
2239 | LLSD LLWindowSDL::getNativeKeyData() | ||
2240 | { | ||
2241 | LLSD result = LLSD::emptyMap(); | ||
2242 | |||
2243 | U32 modifiers = 0; // pretend-native modifiers... oh what a tangled web we weave! | ||
2244 | |||
2245 | // we go through so many levels of device abstraction that I can't really guess | ||
2246 | // what a plugin under GDK under Qt under SL under SDL under X11 considers | ||
2247 | // a 'native' modifier mask. this has been sort of reverse-engineered... they *appear* | ||
2248 | // to match GDK consts, but that may be co-incidence. | ||
2249 | modifiers |= (mKeyModifiers & KMOD_LSHIFT) ? 0x0001 : 0; | ||
2250 | modifiers |= (mKeyModifiers & KMOD_RSHIFT) ? 0x0001 : 0;// munge these into the same shift | ||
2251 | modifiers |= (mKeyModifiers & KMOD_CAPS) ? 0x0002 : 0; | ||
2252 | modifiers |= (mKeyModifiers & KMOD_LCTRL) ? 0x0004 : 0; | ||
2253 | modifiers |= (mKeyModifiers & KMOD_RCTRL) ? 0x0004 : 0;// munge these into the same ctrl | ||
2254 | modifiers |= (mKeyModifiers & KMOD_LALT) ? 0x0008 : 0;// untested | ||
2255 | modifiers |= (mKeyModifiers & KMOD_RALT) ? 0x0008 : 0;// untested | ||
2256 | // *todo: test ALTs - I don't have a case for testing these. Do you? | ||
2257 | // *todo: NUM? - I don't care enough right now (and it's not a GDK modifier). | ||
2258 | |||
2259 | result["scan_code"] = (S32)mKeyScanCode; | ||
2260 | result["virtual_key"] = (S32)mKeyVirtualKey; | ||
2261 | result["modifiers"] = (S32)modifiers; | ||
2262 | |||
2263 | return result; | ||
2264 | } | ||
2265 | |||
2266 | |||
2267 | BOOL LLWindowSDL::dialog_color_picker( F32 *r, F32 *g, F32 *b) | ||
2231 | { | 2268 | { |
2232 | BOOL rtn = FALSE; | 2269 | BOOL rtn = FALSE; |
2233 | 2270 | ||