chore: rename EiClipboard -> WaylandClipboardCollection
This commit is contained in:
parent
bbabb91d42
commit
9960b657e3
5 changed files with 20 additions and 20 deletions
|
|
@ -131,14 +131,14 @@ elseif(UNIX)
|
|||
|
||||
if(LIBEI_FOUND)
|
||||
list(APPEND PLATFORM_SOURCES
|
||||
EiClipboard.cpp
|
||||
EiClipboard.h
|
||||
EiEventQueueBuffer.cpp
|
||||
EiEventQueueBuffer.h
|
||||
EiKeyState.cpp
|
||||
EiKeyState.h
|
||||
EiScreen.cpp
|
||||
EiScreen.h
|
||||
WlClipboardCollection.cpp
|
||||
WlClipboardCollection.h
|
||||
WlClipboard.cpp
|
||||
WlClipboard.h
|
||||
)
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@
|
|||
#include "common/Settings.h"
|
||||
#include "deskflow/App.h"
|
||||
#include "deskflow/IScreen.h"
|
||||
#include "platform/EiClipboard.h"
|
||||
#include "platform/EiEventQueueBuffer.h"
|
||||
#include "platform/EiKeyState.h"
|
||||
#include "platform/PortalInputCapture.h"
|
||||
#include "platform/PortalRemoteDesktop.h"
|
||||
#include "platform/WlClipboardCollection.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
|
@ -46,7 +46,7 @@ EiScreen::EiScreen(bool isPrimary, IEventQueue *events, bool usePortal, bool inv
|
|||
{
|
||||
initEi();
|
||||
m_keyState = new EiKeyState(this, events);
|
||||
m_clipboard = new EiClipboard();
|
||||
m_clipboard = new WlClipboardCollection();
|
||||
// install event handlers
|
||||
m_events->addHandler(EventTypes::System, m_events->getSystemTarget(), [this](const auto &e) {
|
||||
handleSystemEvent(e);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ struct ei_device;
|
|||
|
||||
namespace deskflow {
|
||||
|
||||
class EiClipboard;
|
||||
class WlClipboardCollection;
|
||||
class EiKeyState;
|
||||
class PortalRemoteDesktop;
|
||||
class PortalInputCapture;
|
||||
|
|
@ -123,7 +123,7 @@ private:
|
|||
EiKeyState *m_keyState = nullptr;
|
||||
|
||||
// clipboard stuff
|
||||
EiClipboard *m_clipboard = nullptr;
|
||||
WlClipboardCollection *m_clipboard = nullptr;
|
||||
|
||||
std::vector<ei_device *> m_eiDevices;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,29 +4,29 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "platform/EiClipboard.h"
|
||||
#include "platform/WlClipboardCollection.h"
|
||||
|
||||
#include "base/Log.h"
|
||||
#include "deskflow/ClipboardTypes.h"
|
||||
|
||||
namespace deskflow {
|
||||
|
||||
EiClipboard::EiClipboard()
|
||||
WlClipboardCollection::WlClipboardCollection()
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
EiClipboard::~EiClipboard()
|
||||
WlClipboardCollection::~WlClipboardCollection()
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
bool EiClipboard::isAvailable() const
|
||||
bool WlClipboardCollection::isAvailable() const
|
||||
{
|
||||
return m_available;
|
||||
}
|
||||
|
||||
IClipboard *EiClipboard::getClipboard(ClipboardID id) const
|
||||
IClipboard *WlClipboardCollection::getClipboard(ClipboardID id) const
|
||||
{
|
||||
if (!m_available || id >= m_clipboards.size()) {
|
||||
return nullptr;
|
||||
|
|
@ -35,7 +35,7 @@ IClipboard *EiClipboard::getClipboard(ClipboardID id) const
|
|||
return m_clipboards[id].get();
|
||||
}
|
||||
|
||||
bool EiClipboard::hasChanged() const
|
||||
bool WlClipboardCollection::hasChanged() const
|
||||
{
|
||||
if (!m_available) {
|
||||
return false;
|
||||
|
|
@ -50,7 +50,7 @@ bool EiClipboard::hasChanged() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void EiClipboard::startMonitoring()
|
||||
void WlClipboardCollection::startMonitoring()
|
||||
{
|
||||
if (!m_available || m_monitoring) {
|
||||
return;
|
||||
|
|
@ -65,7 +65,7 @@ void EiClipboard::startMonitoring()
|
|||
m_monitoring = true;
|
||||
}
|
||||
|
||||
void EiClipboard::stopMonitoring()
|
||||
void WlClipboardCollection::stopMonitoring()
|
||||
{
|
||||
if (!m_available || !m_monitoring) {
|
||||
return;
|
||||
|
|
@ -80,7 +80,7 @@ void EiClipboard::stopMonitoring()
|
|||
m_monitoring = false;
|
||||
}
|
||||
|
||||
void EiClipboard::resetChanged()
|
||||
void WlClipboardCollection::resetChanged()
|
||||
{
|
||||
if (!m_available) {
|
||||
return;
|
||||
|
|
@ -93,7 +93,7 @@ void EiClipboard::resetChanged()
|
|||
}
|
||||
}
|
||||
|
||||
void EiClipboard::initialize()
|
||||
void WlClipboardCollection::initialize()
|
||||
{
|
||||
// Check if Wayland clipboard is available
|
||||
if (!WlClipboard::isAvailable()) {
|
||||
|
|
@ -121,7 +121,7 @@ void EiClipboard::initialize()
|
|||
}
|
||||
}
|
||||
|
||||
void EiClipboard::cleanup()
|
||||
void WlClipboardCollection::cleanup()
|
||||
{
|
||||
if (m_monitoring) {
|
||||
stopMonitoring();
|
||||
|
|
@ -21,11 +21,11 @@ This class manages clipboard operations for the EiScreen implementation.
|
|||
It automatically detects the best available clipboard backend and provides
|
||||
a unified interface for clipboard operations.
|
||||
*/
|
||||
class EiClipboard
|
||||
class WlClipboardCollection
|
||||
{
|
||||
public:
|
||||
EiClipboard();
|
||||
~EiClipboard();
|
||||
WlClipboardCollection();
|
||||
~WlClipboardCollection();
|
||||
|
||||
//! Check if clipboard functionality is available
|
||||
bool isAvailable() const;
|
||||
Loading…
Reference in a new issue