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 | |
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')
-rw-r--r-- | linden/indra/llwindow/CMakeLists.txt | 14 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindow.h | 4 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx.h | 4 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 39 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.h | 9 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowwin32.cpp | 13 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowwin32.h | 8 |
8 files changed, 88 insertions, 5 deletions
diff --git a/linden/indra/llwindow/CMakeLists.txt b/linden/indra/llwindow/CMakeLists.txt index afce0c0..5224163 100644 --- a/linden/indra/llwindow/CMakeLists.txt +++ b/linden/indra/llwindow/CMakeLists.txt | |||
@@ -19,7 +19,6 @@ include(LLRender) | |||
19 | include(LLVFS) | 19 | include(LLVFS) |
20 | include(LLWindow) | 20 | include(LLWindow) |
21 | include(LLXML) | 21 | include(LLXML) |
22 | include(Mozlib) | ||
23 | include(UI) | 22 | include(UI) |
24 | 23 | ||
25 | include_directories( | 24 | include_directories( |
@@ -55,6 +54,13 @@ set(viewer_HEADER_FILES | |||
55 | llmousehandler.h | 54 | llmousehandler.h |
56 | ) | 55 | ) |
57 | 56 | ||
57 | # Libraries on which this library depends, needed for Linux builds | ||
58 | # Sort by high-level to low-level | ||
59 | set(llwindow_LINK_LIBRARIES | ||
60 | ${UI_LIBRARIES} # for GTK | ||
61 | ${SDL_LIBRARY} | ||
62 | ) | ||
63 | |||
58 | if (DARWIN) | 64 | if (DARWIN) |
59 | list(APPEND llwindow_SOURCE_FILES | 65 | list(APPEND llwindow_SOURCE_FILES |
60 | llkeyboardmacosx.cpp | 66 | llkeyboardmacosx.cpp |
@@ -98,6 +104,9 @@ if (WINDOWS) | |||
98 | lldxhardware.h | 104 | lldxhardware.h |
99 | llkeyboardwin32.h | 105 | llkeyboardwin32.h |
100 | ) | 106 | ) |
107 | list(APPEND llwindow_LINK_LIBRARIES | ||
108 | comdlg32 # Common Dialogs for ChooseColor | ||
109 | ) | ||
101 | endif (WINDOWS) | 110 | endif (WINDOWS) |
102 | 111 | ||
103 | if (SOLARIS) | 112 | if (SOLARIS) |
@@ -134,6 +143,7 @@ if (SERVER AND NOT WINDOWS AND NOT DARWIN) | |||
134 | ${server_SOURCE_FILES} | 143 | ${server_SOURCE_FILES} |
135 | ) | 144 | ) |
136 | endif (SERVER AND NOT WINDOWS AND NOT DARWIN) | 145 | endif (SERVER AND NOT WINDOWS AND NOT DARWIN) |
146 | # *TODO: This should probably have target_link_libraries | ||
137 | 147 | ||
138 | if (llwindow_HEADER_FILES) | 148 | if (llwindow_HEADER_FILES) |
139 | list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES}) | 149 | list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES}) |
@@ -145,4 +155,6 @@ if (VIEWER) | |||
145 | ${llwindow_SOURCE_FILES} | 155 | ${llwindow_SOURCE_FILES} |
146 | ${viewer_SOURCE_FILES} | 156 | ${viewer_SOURCE_FILES} |
147 | ) | 157 | ) |
158 | target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) | ||
148 | endif (VIEWER) | 159 | endif (VIEWER) |
160 | |||
diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h index 14759cc..2e96294 100644 --- a/linden/indra/llwindow/llwindow.h +++ b/linden/indra/llwindow/llwindow.h | |||
@@ -37,6 +37,7 @@ | |||
37 | #include "llcoord.h" | 37 | #include "llcoord.h" |
38 | #include "llstring.h" | 38 | #include "llstring.h" |
39 | #include "llcursortypes.h" | 39 | #include "llcursortypes.h" |
40 | #include "llsd.h" | ||
40 | 41 | ||
41 | class LLSplashScreen; | 42 | class LLSplashScreen; |
42 | 43 | ||
@@ -208,6 +209,9 @@ public: | |||
208 | 209 | ||
209 | static std::vector<std::string> getDynamicFallbackFontList(); | 210 | static std::vector<std::string> getDynamicFallbackFontList(); |
210 | 211 | ||
212 | // Provide native key event data | ||
213 | virtual LLSD getNativeKeyData() { return LLSD::emptyMap(); } | ||
214 | |||
211 | protected: | 215 | protected: |
212 | LLWindow(BOOL fullscreen, U32 flags); | 216 | LLWindow(BOOL fullscreen, U32 flags); |
213 | virtual ~LLWindow() {} | 217 | virtual ~LLWindow() {} |
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp index 4dedc03..d68d4df 100644 --- a/linden/indra/llwindow/llwindowmacosx.cpp +++ b/linden/indra/llwindow/llwindowmacosx.cpp | |||
@@ -3217,7 +3217,7 @@ void LLWindowMacOSX::ShellEx(const std::string& command) | |||
3217 | } | 3217 | } |
3218 | } | 3218 | } |
3219 | 3219 | ||
3220 | BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b) | 3220 | BOOL LLWindowMacOSX::dialog_color_picker( F32 *r, F32 *g, F32 *b) |
3221 | { | 3221 | { |
3222 | BOOL retval = FALSE; | 3222 | BOOL retval = FALSE; |
3223 | OSErr error = noErr; | 3223 | OSErr error = noErr; |
diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h index 9e87e9f..92c73e8 100644 --- a/linden/indra/llwindow/llwindowmacosx.h +++ b/linden/indra/llwindow/llwindowmacosx.h | |||
@@ -117,6 +117,10 @@ public: | |||
117 | 117 | ||
118 | static std::vector<std::string> getDynamicFallbackFontList(); | 118 | static std::vector<std::string> getDynamicFallbackFontList(); |
119 | 119 | ||
120 | // Provide native key event data | ||
121 | /*virtual*/ LLSD getNativeKeyData(); | ||
122 | |||
123 | |||
120 | protected: | 124 | protected: |
121 | LLWindowMacOSX( | 125 | LLWindowMacOSX( |
122 | const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, | 126 | const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, |
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 | ||
diff --git a/linden/indra/llwindow/llwindowsdl.h b/linden/indra/llwindow/llwindowsdl.h index 39a6007..37b0835 100644 --- a/linden/indra/llwindow/llwindowsdl.h +++ b/linden/indra/llwindow/llwindowsdl.h | |||
@@ -154,6 +154,8 @@ protected: | |||
154 | BOOL ignore_pixel_depth, U32 fsaa_samples); | 154 | BOOL ignore_pixel_depth, U32 fsaa_samples); |
155 | ~LLWindowSDL(); | 155 | ~LLWindowSDL(); |
156 | 156 | ||
157 | /*virtual*/ LLSD getNativeKeyData(); | ||
158 | |||
157 | void initCursors(); | 159 | void initCursors(); |
158 | void quitCursors(); | 160 | void quitCursors(); |
159 | BOOL isValid(); | 161 | BOOL isValid(); |
@@ -206,12 +208,17 @@ protected: | |||
206 | 208 | ||
207 | friend class LLWindowManager; | 209 | friend class LLWindowManager; |
208 | 210 | ||
209 | #if LL_X11 | 211 | |
210 | private: | 212 | private: |
213 | #if LL_X11 | ||
211 | void x11_set_urgent(BOOL urgent); | 214 | void x11_set_urgent(BOOL urgent); |
212 | BOOL mFlashing; | 215 | BOOL mFlashing; |
213 | LLTimer mFlashTimer; | 216 | LLTimer mFlashTimer; |
214 | #endif //LL_X11 | 217 | #endif //LL_X11 |
218 | U32 mKeyScanCode; | ||
219 | U32 mKeyVirtualKey; | ||
220 | SDLMod mKeyModifiers; | ||
221 | |||
215 | }; | 222 | }; |
216 | 223 | ||
217 | 224 | ||
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index e47cab4..12a488a 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp | |||
@@ -3052,6 +3052,19 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) | |||
3052 | */ | 3052 | */ |
3053 | } | 3053 | } |
3054 | 3054 | ||
3055 | /* | ||
3056 | Make the raw keyboard data available - used to poke through to LLQtWebKit so | ||
3057 | that Qt/Webkit has access to the virtual keycodes etc. that it needs | ||
3058 | */ | ||
3059 | LLSD LLWindowWin32::getNativeKeyData() | ||
3060 | { | ||
3061 | LLSD result = LLSD::emptyMap(); | ||
3062 | |||
3063 | result["scan_code"] = (S32)mKeyScanCode; | ||
3064 | result["virtual_key"] = (S32)mKeyVirtualKey; | ||
3065 | |||
3066 | return result; | ||
3067 | } | ||
3055 | 3068 | ||
3056 | BOOL LLWindowWin32::dialog_color_picker ( F32 *r, F32 *g, F32 *b ) | 3069 | BOOL LLWindowWin32::dialog_color_picker ( F32 *r, F32 *g, F32 *b ) |
3057 | { | 3070 | { |
diff --git a/linden/indra/llwindow/llwindowwin32.h b/linden/indra/llwindow/llwindowwin32.h index cc95993..0e40115 100644 --- a/linden/indra/llwindow/llwindowwin32.h +++ b/linden/indra/llwindow/llwindowwin32.h | |||
@@ -128,7 +128,7 @@ protected: | |||
128 | HCURSOR loadColorCursor(LPCTSTR name); | 128 | HCURSOR loadColorCursor(LPCTSTR name); |
129 | BOOL isValid(); | 129 | BOOL isValid(); |
130 | void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size); | 130 | void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size); |
131 | 131 | LLSD getNativeKeyData(); | |
132 | 132 | ||
133 | // Changes display resolution. Returns true if successful | 133 | // Changes display resolution. Returns true if successful |
134 | BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh); | 134 | BOOL setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh); |
@@ -208,6 +208,12 @@ protected: | |||
208 | 208 | ||
209 | LLPreeditor *mPreeditor; | 209 | LLPreeditor *mPreeditor; |
210 | 210 | ||
211 | |||
212 | |||
213 | U32 mKeyCharCode; | ||
214 | U32 mKeyScanCode; | ||
215 | U32 mKeyVirtualKey; | ||
216 | |||
211 | friend class LLWindowManager; | 217 | friend class LLWindowManager; |
212 | }; | 218 | }; |
213 | 219 | ||