diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index b58d0c95f..4ad2a3fef 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -239,7 +239,7 @@ public: std::string getHoverText() const { return mHoverText; }; std::string getHoverLink() const { return mHoverLink; }; - std::string getMediaName() const { return mMediaName; }; + const std::string& getMediaName() const { return mMediaName; }; std::string getMediaDescription() const { return mMediaDescription; }; // Crash the plugin. If you use this outside of a testbed, you will be punished. diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 721c82fbb..150c47e2c 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -467,7 +467,7 @@ public: /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect); // Display mToolTipMsg if no child handles it. - /*virtual*/ const std::string& getName() const; + /*virtual*/ const std::string& getName() const; /*virtual*/ void onMouseCaptureLost(); /*virtual*/ BOOL hasMouseCapture(); /*virtual*/ BOOL isView(); // Hack to support LLFocusMgr diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index ebb0cb1aa..8563b98a4 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -118,20 +118,20 @@ public: virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse); virtual BOOL addFolder( LLFolderViewFolder* folder); - // Finds width and height of this object and it's children. Also - // makes sure that this view and it's children are the right size. + // Find width and height of this object and its children. Also + // makes sure that this view and its children are the right size. virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); void arrangeAll() { mArrangeGeneration++; } S32 getArrangeGeneration() { return mArrangeGeneration; } - // applies filters to control visibility of inventory items + // Apply filters to control visibility of inventory items virtual void filter( LLInventoryFilter& filter); - // get the last selected item + // Get the last selected item virtual LLFolderViewItem* getCurSelectedItem( void ); - // Record the selected item and pass it down the hierachy. + // Record the selected item and pass it down the hierarchy. virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); @@ -141,13 +141,13 @@ public: // Called once a frame to update the selection if mSelectThisID has been set void updateSelection(); - // This method is used to toggle the selection of an item. Walks - // children, and keeps track of selected objects. + // This method is used to toggle the selection of an item. + // Walks children and keeps track of selected objects. virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); virtual std::set getSelectionList() const; - // make sure if ancestor is selected, descendents are not + // Make sure if ancestor is selected, descendents are not void sanitizeSelection(); void clearSelection(); void addToSelectionList(LLFolderViewItem* item); @@ -158,21 +158,21 @@ public: void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; } LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; } - // deletion functionality + // Deletion functionality void removeSelectedItems(); - // open the selected item. + // Open the selected item void openSelectedItems( void ); void propertiesSelectedItems( void ); - // change the folder type + // Change the folder type void changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type); void autoOpenItem(LLFolderViewFolder* item); void closeAutoOpenedFolders(); BOOL autoOpenTest(LLFolderViewFolder* item); - // copy & paste + // Copy & paste virtual void copy(); virtual BOOL canCopy() const; @@ -185,7 +185,7 @@ public: virtual void doDelete(); virtual BOOL canDoDelete() const; - // public rename functionality - can only start the process + // Public rename functionality - can only start the process void startRenamingSelectedItem( void ); // These functions were used when there was only one folderview, diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 43fa98fbd..a203559c1 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -170,7 +170,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask ) if (mMediaSource) { - mMediaSource->mouseMove(x, y); + mMediaSource->mouseMove(x, y, mask); gViewerWindow->setCursor(mLastSetCursor); } @@ -198,7 +198,7 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask ) if (mMediaSource) { - mMediaSource->mouseUp(x, y); + mMediaSource->mouseUp(x, y, mask); /*// *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup, // in addition to the onFocusReceived() call below. Undo this. JC @@ -222,7 +222,7 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask ) convertInputCoords(x, y); if (mMediaSource) - mMediaSource->mouseDown(x, y); + mMediaSource->mouseDown(x, y, mask); gFocusMgr.setMouseCapture( this ); @@ -265,11 +265,11 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { if (LLUICtrl::handleRightMouseDown(x, y, mask)) return TRUE; - /*S32 media_x = x, media_y = y; + S32 media_x = x, media_y = y; convertInputCoords(media_x, media_y); if (mMediaSource) - mMediaSource->mouseDown(media_x, media_y); + mMediaSource->mouseDown(media_x, media_y, mask, 1); gFocusMgr.setMouseCapture( this ); @@ -277,7 +277,7 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { setFocus( TRUE ); } - */ + return TRUE; } @@ -289,7 +289,7 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask ) convertInputCoords(x, y); if (mMediaSource) - mMediaSource->mouseLeftDoubleClick( x, y); + mMediaSource->mouseDoubleClick( x, y, mask); gFocusMgr.setMouseCapture( this ); @@ -916,20 +916,16 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_NAVIGATE_BEGIN: { - LL_INFOS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL; - if(mMediaSource && mHideLoading) - { - mMediaSource->suspendUpdates(true); - } + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL; }; break; case MEDIA_EVENT_NAVIGATE_COMPLETE: { - LL_INFOS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; - if(mMediaSource && mHideLoading) + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; + if(mHidingInitialLoad) { - mMediaSource->suspendUpdates(false); + mHidingInitialLoad = false; } }; break; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 602a1f153..ef25ae0e3 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -177,6 +177,7 @@ class LLMediaCtrl : bool mStretchToFill; bool mMaintainAspectRatio; bool mHideLoading; + bool mHidingInitialLoad; bool mDecoupleTextureSize; S32 mTextureWidth; S32 mTextureHeight; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 7d9f0a136..c97113e19 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -927,7 +927,7 @@ static bool handle_media_click(const LLPickInfo& pick) } else { - media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY); + media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY, gKeyboard->currentMask(TRUE)); media_impl->mouseCapture(); // the mouse-up will happen when capture is lost } @@ -973,7 +973,7 @@ static bool handle_media_hover(const LLPickInfo& pick) { if(LLViewerMediaFocus::getInstance()->getFocus()) { - media_impl->mouseMove(pick.mXYCoords.mX, pick.mXYCoords.mY); + media_impl->mouseMove(pick.mXYCoords.mX, pick.mXYCoords.mY, gKeyboard->currentMask(TRUE)); } // Set mouse over flag if unset diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 508dc1f5a..2feb641ba 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -52,6 +52,7 @@ #include "llviewertexture.h" #include "llviewertexturelist.h" #include "llviewerwindow.h" +#include "llwindow.h" #include "llvieweraudio.h" #include "llweb.h" @@ -477,6 +478,8 @@ void LLViewerMedia::setCookiesEnabled(bool enabled) ///////////////////////////////////////////////////////////////////////////////////////// // static +///////////////////////////////////////////////////////////////////////////////////////// +// static LLPluginCookieStore *LLViewerMedia::getCookieStore() { if(sCookieStore == NULL) @@ -640,7 +643,7 @@ void LLViewerMedia::setOpenIDCookie() } getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start)); - + // Do a web profile get so we can store the cookie LLSD headers = LLSD::emptyMap(); headers["Accept"] = "*/*"; @@ -740,7 +743,9 @@ LLViewerMediaImpl::LLViewerMediaImpl(const std::string& media_url, mTextureUsedHeight(0), mSuspendUpdates(false), mVisible(true), - mClearCache(false) + mHasFocus(false), + mClearCache(false), + mBackgroundColor(LLColor4::white) { createMediaSource(); } @@ -813,7 +818,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ if(plugin_basename.empty()) { - LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; + LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; } else { @@ -839,12 +844,12 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ llstat s; if(LLFile::stat(launcher_name, &s)) { - LL_WARNS("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL; + LL_WARNS_ONCE("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL; llassert(false); // Fail in debugging mode. } else if(LLFile::stat(plugin_name, &s)) { - LL_WARNS("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL; + LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL; llassert(false); // Fail in debugging mode. } else @@ -915,6 +920,8 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->setLoop(mMediaLoop); media_source->setAutoScale(mMediaAutoScale); media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent()); + media_source->focus(mHasFocus); + media_source->setBackgroundColor(mBackgroundColor); if(gSavedSettings.getBOOL("BrowserIgnoreSSLCertErrors")) { @@ -1046,6 +1053,8 @@ void LLViewerMediaImpl::setVolume(F32 volume) ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::focus(bool focus) { + mHasFocus = focus; + LLPluginClassMedia* plugin = getMediaPlugin(); if (plugin) { @@ -1062,6 +1071,12 @@ void LLViewerMediaImpl::focus(bool focus) } ////////////////////////////////////////////////////////////////////////////////////////// +bool LLViewerMediaImpl::hasFocus() const +{ + // FIXME: This might be able to be a bit smarter by hooking into LLViewerMediaFocus, etc. + return mHasFocus; +} + void LLViewerMediaImpl::clearCache() { LLPluginClassMedia* plugin = getMediaPlugin(); @@ -1074,8 +1089,9 @@ void LLViewerMediaImpl::clearCache() mClearCache = true; } } + ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseDown(S32 x, S32 y) +void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -1083,12 +1099,12 @@ void LLViewerMediaImpl::mouseDown(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseUp(S32 x, S32 y) +void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -1096,12 +1112,12 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseMove(S32 x, S32 y) +void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -1109,12 +1125,75 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask); + } +} + + +////////////////////////////////////////////////////////////////////////////////////////// +//static +void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + F32 texture_x = texture_coords.mV[VX]; + F32 texture_y = texture_coords.mV[VY]; + + // Deal with repeating textures by wrapping the coordinates into the range [0, 1.0) + texture_x = fmodf(texture_x, 1.0f); + if(texture_x < 0.0f) + texture_x = 1.0 + texture_x; + + texture_y = fmodf(texture_y, 1.0f); + if(texture_y < 0.0f) + texture_y = 1.0 + texture_y; + + // scale x and y to texel units. + *x = llround(texture_x * plugin->getTextureWidth()); + *y = llround((1.0f - texture_y) * plugin->getTextureHeight()); + + // Adjust for the difference between the actual texture height and the amount of the texture in use. + *y -= (plugin->getTextureHeight() - plugin->getHeight()); +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords, MASK mask, S32 button) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseDown(x, y, mask, button); + } +} + +void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32 button) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseUp(x, y, mask, button); + } +} + +void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseMove(x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y) +void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button) { LLPluginClassMedia* plugin = getMediaPlugin(); scaleMouse(&x, &y); @@ -1122,7 +1201,20 @@ void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y) mLastMouseY = y; if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, LEFT_BUTTON, x, y, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, button, x, y, mask); + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, MASK mask) +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + scaleMouse(&x, &y); + mLastMouseX = x; + mLastMouseY = y; + if (plugin) + { + plugin->scrollEvent(x, y, mask); } } @@ -1132,7 +1224,7 @@ void LLViewerMediaImpl::onMouseCaptureLost() LLPluginClassMedia* plugin = getMediaPlugin(); if (plugin) { - plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, LEFT_BUTTON, mLastMouseX, mLastMouseY, 0); + plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, 0, mLastMouseX, mLastMouseY, 0); } } @@ -1150,6 +1242,18 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask) return TRUE; } + +////////////////////////////////////////////////////////////////////////////////////////// +const std::string& LLViewerMediaImpl::getName() const +{ + LLPluginClassMedia* plugin = getMediaPlugin(); + if (plugin) + { + return plugin->getMediaName(); + } + + return LLStringUtil::null; +}; ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::navigateHome() { @@ -1261,7 +1365,7 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) if(!result) { - LLSD native_key_data = LLSD::emptyMap(); + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); result = plugin->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask, native_key_data); // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. @@ -1284,7 +1388,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char) if (uni_char >= 32 // discard 'control' characters && uni_char != 127) // SDL thinks this is 'delete' - yuck. { - LLSD native_key_data = LLSD::emptyMap(); + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); plugin->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE), native_key_data); } @@ -1367,6 +1471,7 @@ void LLViewerMediaImpl::update() plugin->set_cookies(sUpdatedCookies); } } + if (!plugin) { return; @@ -1446,21 +1551,21 @@ void LLViewerMediaImpl::updateImagesMediaStreams() } LLViewerMediaTexture* placeholder_image = (LLViewerMediaTexture*)LLViewerTextureManager::getFetchedTexture( mTextureId ); - LLPluginClassMedia* plugin = getMediaPlugin(); - placeholder_image->getLastReferencedTimer()->reset(); + LLPluginClassMedia* plugin = getMediaPlugin(); + if (mNeedsNewTexture || placeholder_image->getUseMipMaps() - || ! placeholder_image->mIsMediaTexture + || !placeholder_image->mIsMediaTexture || (placeholder_image->getWidth() != plugin->getTextureWidth()) || (placeholder_image->getHeight() != plugin->getTextureHeight()) || (mTextureUsedWidth != plugin->getWidth()) || (mTextureUsedHeight != plugin->getHeight()) ) { - llinfos << "initializing media placeholder" << llendl; - llinfos << "movie image id " << mTextureId << llendl; + LL_DEBUGS("Media") << "initializing media placeholder" << LL_ENDL; + LL_DEBUGS("Media") << "movie image id " << mTextureId << LL_ENDL; int texture_width = plugin->getTextureWidth(); int texture_height = plugin->getTextureHeight(); @@ -1474,7 +1579,9 @@ void LLViewerMediaImpl::updateImagesMediaStreams() // MEDIAOPT: seems insane that we actually have to make an imageraw then // immediately discard it LLPointer raw = new LLImageRaw(texture_width, texture_height, texture_depth); - raw->clear(0x0f, 0x0f, 0x0f, 0xff); + // Clear the texture to the background color, ignoring alpha. + // convert background color channels from [0.0, 1.0] to [0, 255]; + raw->clear(int(mBackgroundColor.mV[VX] * 255.0f), int(mBackgroundColor.mV[VY] * 255.0f), int(mBackgroundColor.mV[VZ] * 255.0f), 0xff); int discard_level = 0; // ask media source for correct GL image format constants @@ -1711,3 +1818,13 @@ LLViewerMediaImpl::canPaste() const return FALSE; } +void LLViewerMediaImpl::setBackgroundColor(LLColor4 color) +{ + mBackgroundColor = color; + + LLPluginClassMedia* plugin = getMediaPlugin(); + if(plugin) + { + plugin->setBackgroundColor(mBackgroundColor); + } +}; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index ada13304c..f33b3f13a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -138,10 +138,16 @@ public: void seek(F32 time); void setVolume(F32 volume); void focus(bool focus); - void mouseDown(S32 x, S32 y); - void mouseUp(S32 x, S32 y); - void mouseMove(S32 x, S32 y); - void mouseLeftDoubleClick(S32 x,S32 y ); + // True if the impl has user focus. + bool hasFocus() const; + void mouseDown(S32 x, S32 y, MASK mask, S32 button = 0); + void mouseUp(S32 x, S32 y, MASK mask, S32 button = 0); + void mouseMove(S32 x, S32 y, MASK mask); + void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0); + void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0); + void mouseMove(const LLVector2& texture_coords, MASK mask); + void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0); + void scrollWheel(S32 x, S32 y, MASK mask); void mouseCapture(); void navigateHome(); @@ -158,6 +164,7 @@ public: std::string getMimeType() { return mMimeType; } void getTextureSize(S32 *texture_width, S32 *texture_height); void scaleMouse(S32 *mouse_x, S32 *mouse_y); + void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y); void updateMovieImage(const LLUUID& image_id, BOOL active); void update(); @@ -198,7 +205,7 @@ public: /*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) { return FALSE; }; /*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; }; /*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return FALSE; }; - /*virtual*/ const std::string& getName() const { return LLStringUtil::null; }; + /*virtual*/ const std::string& getName() const; /*virtual*/ BOOL isView() const { return FALSE; }; /*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {}; /*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {}; @@ -219,6 +226,7 @@ public: /*virtual*/ BOOL canPaste() const; bool mNeedsNewTexture; + void setBackgroundColor(LLColor4 color); private: // a single media url with some data and an impl. LLUUID mTextureId; @@ -236,7 +244,9 @@ private: S32 mTextureUsedHeight; bool mSuspendUpdates; bool mVisible; + bool mHasFocus; bool mClearCache; + LLColor4 mBackgroundColor; private: /*LLViewerMediaTexture*/LLViewerTexture *updatePlaceholderImage();