summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermedia.h')
-rw-r--r--indra/newview/llviewermedia.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 4f0d39dd80..517a76ce3d 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -66,10 +66,15 @@ private:
observerListType mObservers;
};
+class LLViewerMediaImpl;
+
class LLViewerMedia
{
LOG_CLASS(LLViewerMedia);
public:
+
+ typedef std::vector<LLViewerMediaImpl*> impl_list;
+
// Special case early init for just web browser component
// so we can show login screen. See .cpp file for details. JC
@@ -97,6 +102,14 @@ class LLViewerMedia
static void mediaStop(void*);
static F32 getVolume();
static void muteListChanged();
+ static void setInWorldMediaDisabled(bool disabled);
+ static bool getInWorldMediaDisabled();
+
+ // Returns the priority-sorted list of all media impls.
+ static impl_list &getPriorityList();
+
+ // This is the comparitor used to sort the list.
+ static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2);
};
// Implementation functions not exported into header file
@@ -145,6 +158,7 @@ public:
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 navigateBack();
@@ -158,7 +172,8 @@ public:
bool handleUnicodeCharHere(llwchar uni_char);
bool canNavigateForward();
bool canNavigateBack();
- std::string getMediaURL() { return mMediaURL; }
+ std::string getMediaURL() const { return mMediaURL; }
+ std::string getCurrentMediaURL();
std::string getHomeURL() { return mHomeURL; }
void setHomeURL(const std::string& home_url) { mHomeURL = home_url; };
std::string getMimeType() { return mMimeType; }
@@ -166,7 +181,7 @@ public:
void update();
void updateImagesMediaStreams();
- LLUUID getMediaTextureID();
+ LLUUID getMediaTextureID() const;
void suspendUpdates(bool suspend) { mSuspendUpdates = suspend; };
void setVisible(bool visible);
@@ -177,6 +192,12 @@ public:
bool hasMedia();
bool isMediaFailed() { return mMediaSourceFailed; };
void resetPreviousMediaState();
+
+ void setDisabled(bool disabled) { mIsDisabled = disabled; };
+ bool isMediaDisabled() { return mIsDisabled; };
+
+ // returns true if this instance should not be loaded (disabled, muted object, crashed, etc.)
+ bool isForcedUnloaded() const;
ECursorType getLastSetCursor() { return mLastSetCursor; };
@@ -207,7 +228,7 @@ public:
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask) { 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*/ std::string getName() const { return LLStringUtil::null; };
+ /*virtual*/ std::string getName() const;
/*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 {};
@@ -229,6 +250,7 @@ public:
void addObject(LLVOVolume* obj) ;
void removeObject(LLVOVolume* obj) ;
const std::list< LLVOVolume* >* getObjectList() const ;
+ LLVOVolume *getSomeObject();
void setUpdated(BOOL updated) ;
BOOL isUpdated() ;
@@ -236,6 +258,7 @@ public:
void calculateInterest();
F64 getInterest() const { return mInterest; };
F64 getApproximateTextureInterest();
+ S32 getProximity() { return mProximity; };
// Mark this object as being used in a UI panel instead of on a prim
// This will be used as part of the interest sorting algorithm.
@@ -272,9 +295,10 @@ public:
LLPluginClassMedia* mMediaSource;
LLUUID mTextureId;
bool mMovieImageHasMips;
- std::string mMediaURL;
+ std::string mMediaURL; // The last media url set with NavigateTo
std::string mHomeURL;
std::string mMimeType;
+ std::string mCurrentMediaURL; // The most current media url from the plugin (via the "location changed" or "navigate complete" events).
S32 mLastMouseX; // save the last mouse coord we get, so when we lose capture we can simulate a mouseup at that point.
S32 mLastMouseY;
S32 mMediaWidth;
@@ -298,6 +322,8 @@ public:
bool mNeedsMuteCheck;
int mPreviousMediaState;
F64 mPreviousMediaTime;
+ bool mIsDisabled;
+ S32 mProximity;
private:
BOOL mIsUpdated ;