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