summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-08-27 23:07:22 -0400
committerRye <rye@alchemyviewer.org>2025-08-27 23:07:22 -0400
commit34ae3db498e0683b453c923fbff80b441810e96e (patch)
tree27ce1dd3fd93c506f5503e89fb64f9d51a39601a /indra/llplugin
parent3f65a4bfec71a9950a541f9e6195a572a0622b48 (diff)
parentdae43ad532579e849aa191fba4fdb3478a455840 (diff)
Merge branch 'callum/viewer-cef-2025-08' into rye/infinitemac
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/CMakeLists.txt2
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp50
-rw-r--r--indra/llplugin/llpluginclassmedia.h25
3 files changed, 72 insertions, 5 deletions
diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt
index 005426acde..e008a4093e 100644
--- a/indra/llplugin/CMakeLists.txt
+++ b/indra/llplugin/CMakeLists.txt
@@ -35,6 +35,6 @@ list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES})
target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
-target_link_libraries( llplugin llcommon llmath llrender llmessage )
+target_link_libraries( llplugin llcommon llmath llmessage llxml )
add_subdirectory(slplugin)
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 8a356da93a..77a4b08af5 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -132,9 +132,13 @@ void LLPluginClassMedia::reset()
mLastMouseY = 0;
mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
mSleepTime = 1.0f / 100.0f;
+ mCanUndo = false;
+ mCanRedo = false;
mCanCut = false;
mCanCopy = false;
mCanPaste = false;
+ mCanDoDelete = false;
+ mCanSelectAll = false;
mMediaName.clear();
mMediaDescription.clear();
mBackgroundColor = LLColor4(1.0f, 1.0f, 1.0f, 1.0f);
@@ -907,6 +911,18 @@ void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username,
sendMessage(message);
}
+void LLPluginClassMedia::undo()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_undo");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::redo()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_redo");
+ sendMessage(message);
+}
+
void LLPluginClassMedia::cut()
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_cut");
@@ -925,6 +941,24 @@ void LLPluginClassMedia::paste()
sendMessage(message);
}
+void LLPluginClassMedia::doDelete()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_delete");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::selectAll()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_select_all");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::showPageSource()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_show_source");
+ sendMessage(message);
+}
+
void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache,
const std::string &username,
const std::string &user_data_path_cef_log)
@@ -1178,6 +1212,14 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
}
else if(message_name == "edit_state")
{
+ if(message.hasValue("undo"))
+ {
+ mCanUndo = message.getValueBoolean("undo");
+ }
+ if(message.hasValue("redo"))
+ {
+ mCanRedo = message.getValueBoolean("redo");
+ }
if(message.hasValue("cut"))
{
mCanCut = message.getValueBoolean("cut");
@@ -1190,6 +1232,14 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
{
mCanPaste = message.getValueBoolean("paste");
}
+ if (message.hasValue("delete"))
+ {
+ mCanDoDelete = message.getValueBoolean("delete");
+ }
+ if (message.hasValue("select_all"))
+ {
+ mCanSelectAll = message.getValueBoolean("select_all");
+ }
}
else if(message_name == "name_text")
{
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index d74b790d8f..71522bcd7d 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -29,7 +29,6 @@
#ifndef LL_LLPLUGINCLASSMEDIA_H
#define LL_LLPLUGINCLASSMEDIA_H
-#include "llgltypes.h"
#include "llpluginprocessparent.h"
#include "llrect.h"
#include "llpluginclassmediaowner.h"
@@ -201,6 +200,12 @@ public:
LLPluginClassMediaOwner::EMediaStatus getStatus() const { return mStatus; }
+ void undo();
+ bool canUndo() const { return mCanUndo; };
+
+ void redo();
+ bool canRedo() const { return mCanRedo; };
+
void cut();
bool canCut() const { return mCanCut; };
@@ -210,6 +215,14 @@ public:
void paste();
bool canPaste() const { return mCanPaste; };
+ void doDelete();
+ bool canDoDelete() const { return mCanDoDelete; };
+
+ void selectAll();
+ bool canSelectAll() const { return mCanSelectAll; };
+
+ void showPageSource();
+
// These can be called before init(), and they will be queued and sent before the media init message.
void setUserDataPath(const std::string &user_data_path_cache, const std::string &username, const std::string &user_data_path_cef_log);
void setLanguageCode(const std::string &language_code);
@@ -351,9 +364,9 @@ protected:
bool mTextureParamsReceived; // the mRequestedTexture* fields are only valid when this is true
S32 mRequestedTextureDepth;
- LLGLenum mRequestedTextureInternalFormat;
- LLGLenum mRequestedTextureFormat;
- LLGLenum mRequestedTextureType;
+ U32 mRequestedTextureInternalFormat;
+ U32 mRequestedTextureFormat;
+ U32 mRequestedTextureType;
bool mRequestedTextureSwapBytes;
bool mRequestedTextureCoordsOpenGL;
@@ -419,9 +432,13 @@ protected:
F64 mSleepTime;
+ bool mCanUndo;
+ bool mCanRedo;
bool mCanCut;
bool mCanCopy;
bool mCanPaste;
+ bool mCanDoDelete;
+ bool mCanSelectAll;
std::string mMediaName;
std::string mMediaDescription;