diff options
author | Armin Weatherwax | 2010-02-26 17:06:16 +0100 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:40:22 +0200 |
commit | dcdfa1ebab37dd78282bc95093a5f347f5846b1c (patch) | |
tree | 22d6ea3f35b749e51ae4ac882bd56f42d35f9590 /linden/indra/llwindow/llwindowsdl.cpp | |
parent | remove deprecated files (diff) | |
download | meta-impy-dcdfa1ebab37dd78282bc95093a5f347f5846b1c.zip meta-impy-dcdfa1ebab37dd78282bc95093a5f347f5846b1c.tar.gz meta-impy-dcdfa1ebab37dd78282bc95093a5f347f5846b1c.tar.bz2 meta-impy-dcdfa1ebab37dd78282bc95093a5f347f5846b1c.tar.xz |
port SG2.0 Mediaplugs (webkit supports flash now)
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 bf339f2..9310ff5 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 | ||