summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-07-08 17:29:48 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-07-08 17:29:48 -0400
commit29bea5a6b94458e23559bdbeaae5a593100533b6 (patch)
tree5bd356450afd8da159542bfd444b653442004a45 /indra/llwindow
parent053f436413c01e237accabace4dc5ff1eccca837 (diff)
parent226929f8f5b8bc1080d0082b2595d689238df2b8 (diff)
Merge. Refresh from viewer-release after 3.7.11 release.
Diffstat (limited to 'indra/llwindow')
-rwxr-xr-xindra/llwindow/llwindow.cpp4
-rwxr-xr-xindra/llwindow/llwindowmacosx.cpp27
-rwxr-xr-xindra/llwindow/llwindowsdl.cpp4
3 files changed, 27 insertions, 8 deletions
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 466c3baccf..5720660034 100755
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -71,7 +71,7 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
}
S32 result = 0;
-#if LL_MESA_HEADLESS // !!! *FIX: (???)
+#if LL_MESA_HEADLESS // !!! *FIX: (?)
LL_WARNS() << "OSMessageBox: " << text << LL_ENDL;
return OSBTN_OK;
#elif LL_WINDOWS
@@ -323,7 +323,7 @@ bool LLSplashScreen::isVisible()
// static
LLSplashScreen *LLSplashScreen::create()
{
-#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (???)
+#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (?)
return 0;
#elif LL_WINDOWS
return new LLSplashScreenWin32;
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index b771e125f9..18d5152015 100755
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -39,6 +39,7 @@
#include "indra_constants.h"
#include <OpenGL/OpenGL.h>
+#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
extern BOOL gDebugWindowProc;
@@ -1743,16 +1744,34 @@ LLSD LLWindowMacOSX::getNativeKeyData()
return result;
}
-
BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b)
{
- // Is this even used anywhere? Do we really need an OS color picker?
BOOL retval = FALSE;
- //S32 error = 0;
+ OSErr error = noErr;
+ NColorPickerInfo info;
+
+ memset(&info, 0, sizeof(info));
+ info.theColor.color.rgb.red = (UInt16)(*r * 65535.f);
+ info.theColor.color.rgb.green = (UInt16)(*g * 65535.f);
+ info.theColor.color.rgb.blue = (UInt16)(*b * 65535.f);
+ info.placeWhere = kCenterOnMainScreen;
+
+ error = NPickColor(&info);
+
+ if (error == noErr)
+ {
+ retval = info.newColorChosen;
+ if (info.newColorChosen)
+ {
+ *r = ((float) info.theColor.color.rgb.red) / 65535.0;
+ *g = ((float) info.theColor.color.rgb.green) / 65535.0;
+ *b = ((float) info.theColor.color.rgb.blue) / 65535.0;
+ }
+ }
+
return (retval);
}
-
void *LLWindowMacOSX::getPlatformWindow()
{
// NOTE: this will be NULL in fullscreen mode. Plan accordingly.
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index bb77a24590..c20e639fc7 100755
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -223,7 +223,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
mOriginalAspectRatio = 1024.0 / 768.0;
if (title.empty())
- mWindowTitle = "SDL Window"; // *FIX: (???)
+ mWindowTitle = "SDL Window"; // *FIX: (?)
else
mWindowTitle = title;
@@ -956,7 +956,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
{
if(mWindow)
{
- // *FIX: (???)
+ // *FIX: (?)
//MacMoveWindow(mWindow, position.mX, position.mY, false);
}