diff options
Diffstat (limited to 'indra/llplugin')
| -rw-r--r-- | indra/llplugin/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 50 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 25 | ||||
| -rw-r--r-- | indra/llplugin/slplugin/CMakeLists.txt | 29 | 
4 files changed, 87 insertions, 27 deletions
diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 14a69afe6e..e008a4093e 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -31,18 +31,10 @@ set(llplugin_HEADER_FILES      llpluginsharedmemory.h      ) -if(NOT ADDRESS_SIZE EQUAL 32) -  if(WINDOWS) -    ##add_definitions(/FIXED:NO) -  else(WINDOWS) # not windows therefore gcc LINUX and DARWIN -    add_definitions(-fPIC) -  endif(WINDOWS) -endif(NOT ADDRESS_SIZE EQUAL 32) -  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; diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 0ea6495eac..4df3e306cb 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -30,18 +30,6 @@ add_executable(SLPlugin      ${SLPlugin_SOURCE_FILES}      ) -if (WINDOWS) -set_target_properties(SLPlugin -  PROPERTIES -  LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMTD\"" -  ) -else () -set_target_properties(SLPlugin -  PROPERTIES -  MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist -  ) -endif () -  target_link_libraries(SLPlugin          llplugin          llmessage @@ -49,7 +37,20 @@ target_link_libraries(SLPlugin          ll::pluginlibraries          ) -if (DARWIN) +if (WINDOWS) +  set_target_properties(SLPlugin +    PROPERTIES +    LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMTD\"" +    ) +elseif (DARWIN) +  set_target_properties(SLPlugin +    PROPERTIES +    BUILD_WITH_INSTALL_RPATH 1 +    INSTALL_RPATH "@executable_path/../../../../Frameworks;@executable_path/../Frameworks;@executable_path/../Frameworks/plugins" +    MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist +    XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" +  ) +    # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)    add_custom_command(      TARGET SLPlugin POST_BUILD @@ -58,7 +59,7 @@ if (DARWIN)        -p        ${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Resources    ) -endif (DARWIN) +endif ()  if (LL_TESTS)    ll_deploy_sharedlibs_command(SLPlugin)  | 
