chore: clean up windows code smells missed by sonarscan
This commit is contained in:
parent
903401796e
commit
e9ccd513f7
42 changed files with 201 additions and 318 deletions
|
|
@ -6,7 +6,6 @@
|
||||||
# Platform Specific Code
|
# Platform Specific Code
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(PLATFORM_CODE
|
set(PLATFORM_CODE
|
||||||
win32/ArchConsoleWindows.cpp
|
|
||||||
win32/ArchConsoleWindows.h
|
win32/ArchConsoleWindows.h
|
||||||
win32/ArchDaemonWindows.cpp
|
win32/ArchDaemonWindows.cpp
|
||||||
win32/ArchDaemonWindows.h
|
win32/ArchDaemonWindows.h
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
/*
|
|
||||||
* Deskflow -- mouse and keyboard sharing utility
|
|
||||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
|
||||||
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
|
|
||||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "arch/win32/ArchConsoleWindows.h"
|
|
||||||
|
|
||||||
ArchConsoleWindows::ArchConsoleWindows()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArchConsoleWindows::~ArchConsoleWindows()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -14,6 +14,6 @@
|
||||||
class ArchConsoleWindows : public ArchConsoleStd
|
class ArchConsoleWindows : public ArchConsoleStd
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchConsoleWindows();
|
ArchConsoleWindows() = default;
|
||||||
virtual ~ArchConsoleWindows();
|
~ArchConsoleWindows() override = default;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,6 @@ ArchDaemonWindows::ArchDaemonWindows() : m_daemonThreadID(0)
|
||||||
m_quitMessage = RegisterWindowMessage("DeskflowDaemonExit");
|
m_quitMessage = RegisterWindowMessage("DeskflowDaemonExit");
|
||||||
}
|
}
|
||||||
|
|
||||||
ArchDaemonWindows::~ArchDaemonWindows()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
int ArchDaemonWindows::runDaemon(RunFunc runFunc)
|
int ArchDaemonWindows::runDaemon(RunFunc runFunc)
|
||||||
{
|
{
|
||||||
assert(s_daemon != nullptr);
|
assert(s_daemon != nullptr);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public:
|
||||||
using RunFunc = std::function<int()>;
|
using RunFunc = std::function<int()>;
|
||||||
|
|
||||||
ArchDaemonWindows();
|
ArchDaemonWindows();
|
||||||
virtual ~ArchDaemonWindows();
|
~ArchDaemonWindows() override = default;
|
||||||
|
|
||||||
//! Run the daemon
|
//! Run the daemon
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -68,15 +68,15 @@ public:
|
||||||
static UINT getDaemonQuitMessage();
|
static UINT getDaemonQuitMessage();
|
||||||
|
|
||||||
// IArchDaemon overrides
|
// IArchDaemon overrides
|
||||||
virtual void installDaemon(
|
void installDaemon(
|
||||||
const char *name, const char *description, const char *pathname, const char *commandLine, const char *dependencies
|
const char *name, const char *description, const char *pathname, const char *commandLine, const char *dependencies
|
||||||
);
|
) override;
|
||||||
virtual void uninstallDaemon(const char *name);
|
void uninstallDaemon(const char *name) override;
|
||||||
virtual void installDaemon();
|
void installDaemon() override;
|
||||||
virtual void uninstallDaemon();
|
void uninstallDaemon() override;
|
||||||
virtual int daemonize(const char *name, DaemonFunc func);
|
int daemonize(const char *name, DaemonFunc func) override;
|
||||||
virtual bool canInstallDaemon(const char *name);
|
bool canInstallDaemon(const char *name) override;
|
||||||
virtual bool isDaemonInstalled(const char *name);
|
bool isDaemonInstalled(const char *name) override;
|
||||||
std::string commandLine() const
|
std::string commandLine() const
|
||||||
{
|
{
|
||||||
return m_commandLine;
|
return m_commandLine;
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,6 @@ ArchLogWindows::ArchLogWindows() : m_eventLog(nullptr)
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
ArchLogWindows::~ArchLogWindows()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
void ArchLogWindows::openLog(const char *name)
|
void ArchLogWindows::openLog(const char *name)
|
||||||
{
|
{
|
||||||
if (m_eventLog == nullptr) {
|
if (m_eventLog == nullptr) {
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,13 @@ class ArchLogWindows : public IArchLog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchLogWindows();
|
ArchLogWindows();
|
||||||
virtual ~ArchLogWindows();
|
~ArchLogWindows() override = default;
|
||||||
|
|
||||||
// IArchLog overrides
|
// IArchLog overrides
|
||||||
virtual void openLog(const char *name);
|
void openLog(const char *name) override;
|
||||||
virtual void closeLog();
|
void closeLog() override;
|
||||||
virtual void showLog(bool showIfEmpty);
|
void showLog(bool showIfEmpty) override;
|
||||||
virtual void writeLog(ELevel, const char *);
|
void writeLog(ELevel, const char *) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HANDLE m_eventLog;
|
HANDLE m_eventLog;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class ArchMultithreadWindows : public IArchMultithread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchMultithreadWindows();
|
ArchMultithreadWindows();
|
||||||
virtual ~ArchMultithreadWindows();
|
~ArchMultithreadWindows() override;
|
||||||
|
|
||||||
//! @name manipulators
|
//! @name manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -61,29 +61,29 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// IArchMultithread overrides
|
// IArchMultithread overrides
|
||||||
virtual ArchCond newCondVar();
|
ArchCond newCondVar() override;
|
||||||
virtual void closeCondVar(ArchCond);
|
void closeCondVar(ArchCond) override;
|
||||||
virtual void signalCondVar(ArchCond);
|
void signalCondVar(ArchCond) override;
|
||||||
virtual void broadcastCondVar(ArchCond);
|
void broadcastCondVar(ArchCond) override;
|
||||||
virtual bool waitCondVar(ArchCond, ArchMutex, double timeout);
|
bool waitCondVar(ArchCond, ArchMutex, double timeout) override;
|
||||||
virtual ArchMutex newMutex();
|
ArchMutex newMutex() override;
|
||||||
virtual void closeMutex(ArchMutex);
|
void closeMutex(ArchMutex) override;
|
||||||
virtual void lockMutex(ArchMutex);
|
void lockMutex(ArchMutex) override;
|
||||||
virtual void unlockMutex(ArchMutex);
|
void unlockMutex(ArchMutex) override;
|
||||||
virtual ArchThread newThread(ThreadFunc, void *);
|
ArchThread newThread(ThreadFunc, void *) override;
|
||||||
virtual ArchThread newCurrentThread();
|
ArchThread newCurrentThread() override;
|
||||||
virtual ArchThread copyThread(ArchThread);
|
ArchThread copyThread(ArchThread) override;
|
||||||
virtual void closeThread(ArchThread);
|
void closeThread(ArchThread) override;
|
||||||
virtual void cancelThread(ArchThread);
|
void cancelThread(ArchThread) override;
|
||||||
virtual void setPriorityOfThread(ArchThread, int n);
|
void setPriorityOfThread(ArchThread, int n) override;
|
||||||
virtual void testCancelThread();
|
void testCancelThread() override;
|
||||||
virtual bool wait(ArchThread, double timeout);
|
bool wait(ArchThread, double timeout) override;
|
||||||
virtual bool isSameThread(ArchThread, ArchThread);
|
bool isSameThread(ArchThread, ArchThread) override;
|
||||||
virtual bool isExitedThread(ArchThread);
|
bool isExitedThread(ArchThread) override;
|
||||||
virtual void *getResultOfThread(ArchThread);
|
void *getResultOfThread(ArchThread) override;
|
||||||
virtual ThreadID getIDOfThread(ArchThread);
|
ThreadID getIDOfThread(ArchThread) override;
|
||||||
virtual void setSignalHandler(ESignal, SignalFunc, void *);
|
void setSignalHandler(ESignal, SignalFunc, void *) override;
|
||||||
virtual void raiseSignal(ESignal);
|
void raiseSignal(ESignal) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ArchThreadImpl *find(DWORD id);
|
ArchThreadImpl *find(DWORD id);
|
||||||
|
|
|
||||||
|
|
@ -52,39 +52,39 @@ class ArchNetworkWinsock : public IArchNetwork
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchNetworkWinsock();
|
ArchNetworkWinsock();
|
||||||
virtual ~ArchNetworkWinsock();
|
~ArchNetworkWinsock() override;
|
||||||
|
|
||||||
virtual void init();
|
void init() override;
|
||||||
|
|
||||||
// IArchNetwork overrides
|
// IArchNetwork overrides
|
||||||
virtual ArchSocket newSocket(EAddressFamily, ESocketType);
|
ArchSocket newSocket(EAddressFamily, ESocketType) override;
|
||||||
virtual ArchSocket copySocket(ArchSocket s);
|
ArchSocket copySocket(ArchSocket s) override;
|
||||||
virtual void closeSocket(ArchSocket s);
|
void closeSocket(ArchSocket s) override;
|
||||||
virtual void closeSocketForRead(ArchSocket s);
|
void closeSocketForRead(ArchSocket s) override;
|
||||||
virtual void closeSocketForWrite(ArchSocket s);
|
void closeSocketForWrite(ArchSocket s) override;
|
||||||
virtual void bindSocket(ArchSocket s, ArchNetAddress addr);
|
void bindSocket(ArchSocket s, ArchNetAddress addr) override;
|
||||||
virtual void listenOnSocket(ArchSocket s);
|
void listenOnSocket(ArchSocket s) override;
|
||||||
virtual ArchSocket acceptSocket(ArchSocket s, ArchNetAddress *addr);
|
ArchSocket acceptSocket(ArchSocket s, ArchNetAddress *addr) override;
|
||||||
virtual bool connectSocket(ArchSocket s, ArchNetAddress name);
|
bool connectSocket(ArchSocket s, ArchNetAddress name) override;
|
||||||
virtual int pollSocket(PollEntry[], int num, double timeout);
|
int pollSocket(PollEntry[], int num, double timeout) override;
|
||||||
virtual void unblockPollSocket(ArchThread thread);
|
void unblockPollSocket(ArchThread thread) override;
|
||||||
virtual size_t readSocket(ArchSocket s, void *buf, size_t len);
|
size_t readSocket(ArchSocket s, void *buf, size_t len) override;
|
||||||
virtual size_t writeSocket(ArchSocket s, const void *buf, size_t len);
|
size_t writeSocket(ArchSocket s, const void *buf, size_t len) override;
|
||||||
virtual void throwErrorOnSocket(ArchSocket);
|
void throwErrorOnSocket(ArchSocket) override;
|
||||||
virtual bool setNoDelayOnSocket(ArchSocket, bool noDelay);
|
bool setNoDelayOnSocket(ArchSocket, bool noDelay) override;
|
||||||
virtual bool setReuseAddrOnSocket(ArchSocket, bool reuse);
|
bool setReuseAddrOnSocket(ArchSocket, bool reuse) override;
|
||||||
virtual std::string getHostName();
|
std::string getHostName() override;
|
||||||
virtual ArchNetAddress newAnyAddr(EAddressFamily);
|
ArchNetAddress newAnyAddr(EAddressFamily) override;
|
||||||
virtual ArchNetAddress copyAddr(ArchNetAddress);
|
ArchNetAddress copyAddr(ArchNetAddress) override;
|
||||||
virtual std::vector<ArchNetAddress> nameToAddr(const std::string &);
|
std::vector<ArchNetAddress> nameToAddr(const std::string &) override;
|
||||||
virtual void closeAddr(ArchNetAddress);
|
void closeAddr(ArchNetAddress) override;
|
||||||
virtual std::string addrToName(ArchNetAddress);
|
std::string addrToName(ArchNetAddress) override;
|
||||||
virtual std::string addrToString(ArchNetAddress);
|
std::string addrToString(ArchNetAddress) override;
|
||||||
virtual EAddressFamily getAddrFamily(ArchNetAddress);
|
EAddressFamily getAddrFamily(ArchNetAddress) override;
|
||||||
virtual void setAddrPort(ArchNetAddress, int port);
|
void setAddrPort(ArchNetAddress, int port) override;
|
||||||
virtual int getAddrPort(ArchNetAddress);
|
int getAddrPort(ArchNetAddress) override;
|
||||||
virtual bool isAnyAddr(ArchNetAddress);
|
bool isAnyAddr(ArchNetAddress) override;
|
||||||
virtual bool isEqualAddr(ArchNetAddress, ArchNetAddress);
|
bool isEqualAddr(ArchNetAddress, ArchNetAddress) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initModule(HMODULE);
|
void initModule(HMODULE);
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,6 @@
|
||||||
// ArchSleepWindows
|
// ArchSleepWindows
|
||||||
//
|
//
|
||||||
|
|
||||||
ArchSleepWindows::ArchSleepWindows()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
ArchSleepWindows::~ArchSleepWindows()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
void ArchSleepWindows::sleep(double timeout)
|
void ArchSleepWindows::sleep(double timeout)
|
||||||
{
|
{
|
||||||
ARCH->testCancelThread();
|
ARCH->testCancelThread();
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@
|
||||||
class ArchSleepWindows : public IArchSleep
|
class ArchSleepWindows : public IArchSleep
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchSleepWindows();
|
ArchSleepWindows() = default;
|
||||||
virtual ~ArchSleepWindows();
|
~ArchSleepWindows() override = default;
|
||||||
|
|
||||||
// IArchSleep overrides
|
// IArchSleep overrides
|
||||||
virtual void sleep(double timeout);
|
void sleep(double timeout) override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,6 @@
|
||||||
// ArchStringWindows
|
// ArchStringWindows
|
||||||
//
|
//
|
||||||
|
|
||||||
ArchStringWindows::ArchStringWindows()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArchStringWindows::~ArchStringWindows()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
IArchString::EWideCharEncoding ArchStringWindows::getWideCharEncoding()
|
IArchString::EWideCharEncoding ArchStringWindows::getWideCharEncoding()
|
||||||
{
|
{
|
||||||
return kUTF16;
|
return kUTF16;
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@
|
||||||
class ArchStringWindows : public IArchString
|
class ArchStringWindows : public IArchString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchStringWindows();
|
ArchStringWindows() = default;
|
||||||
virtual ~ArchStringWindows();
|
~ArchStringWindows() override = default;
|
||||||
|
|
||||||
// IArchString overrides
|
// IArchString overrides
|
||||||
virtual EWideCharEncoding getWideCharEncoding();
|
EWideCharEncoding getWideCharEncoding() override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ class ArchTimeWindows : public IArchTime
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArchTimeWindows();
|
ArchTimeWindows();
|
||||||
virtual ~ArchTimeWindows();
|
~ArchTimeWindows() override;
|
||||||
|
|
||||||
// IArchTime overrides
|
// IArchTime overrides
|
||||||
virtual double time();
|
double time() override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,7 @@ public:
|
||||||
XArchEvalWindows(DWORD error) : m_error(error)
|
XArchEvalWindows(DWORD error) : m_error(error)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~XArchEvalWindows()
|
~XArchEvalWindows() override = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual std::string eval() const throw();
|
virtual std::string eval() const throw();
|
||||||
|
|
||||||
|
|
@ -39,9 +37,7 @@ public:
|
||||||
XArchEvalWinsock(int error) : m_error(error)
|
XArchEvalWinsock(int error) : m_error(error)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~XArchEvalWinsock()
|
~XArchEvalWinsock() override = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual std::string eval() const throw();
|
virtual std::string eval() const throw();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class AppUtilWindows : public AppUtil
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AppUtilWindows(IEventQueue *events);
|
AppUtilWindows(IEventQueue *events);
|
||||||
virtual ~AppUtilWindows();
|
~AppUtilWindows() override;
|
||||||
|
|
||||||
static AppUtilWindows &instance();
|
static AppUtilWindows &instance();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,5 @@ class IMSWindowsClipboardFacade : public IInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void write(HANDLE win32Data, UINT win32Format) = 0;
|
virtual void write(HANDLE win32Data, UINT win32Format) = 0;
|
||||||
virtual ~IMSWindowsClipboardFacade()
|
virtual ~IMSWindowsClipboardFacade() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class MSWindowsClipboard : public IClipboard
|
||||||
public:
|
public:
|
||||||
MSWindowsClipboard(HWND window);
|
MSWindowsClipboard(HWND window);
|
||||||
MSWindowsClipboard(HWND window, IMSWindowsClipboardFacade &facade);
|
MSWindowsClipboard(HWND window, IMSWindowsClipboardFacade &facade);
|
||||||
virtual ~MSWindowsClipboard();
|
~MSWindowsClipboard() override;
|
||||||
|
|
||||||
//! Empty clipboard without ownership
|
//! Empty clipboard without ownership
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -45,13 +45,13 @@ public:
|
||||||
static bool isOwnedByDeskflow();
|
static bool isOwnedByDeskflow();
|
||||||
|
|
||||||
// IClipboard overrides
|
// IClipboard overrides
|
||||||
virtual bool empty();
|
bool empty() override;
|
||||||
virtual void add(EFormat, const std::string &data);
|
void add(EFormat, const std::string &data) override;
|
||||||
virtual bool open(Time) const;
|
bool open(Time) const override;
|
||||||
virtual void close() const;
|
void close() const override;
|
||||||
virtual Time getTime() const;
|
Time getTime() const override;
|
||||||
virtual bool has(EFormat) const;
|
bool has(EFormat) const override;
|
||||||
virtual std::string get(EFormat) const;
|
std::string get(EFormat) const override;
|
||||||
|
|
||||||
void setFacade(IMSWindowsClipboardFacade &facade);
|
void setFacade(IMSWindowsClipboardFacade &facade);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,6 @@
|
||||||
// MSWindowsClipboardAnyTextConverter
|
// MSWindowsClipboardAnyTextConverter
|
||||||
//
|
//
|
||||||
|
|
||||||
MSWindowsClipboardAnyTextConverter::MSWindowsClipboardAnyTextConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsClipboardAnyTextConverter::~MSWindowsClipboardAnyTextConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
IClipboard::EFormat MSWindowsClipboardAnyTextConverter::getFormat() const
|
IClipboard::EFormat MSWindowsClipboardAnyTextConverter::getFormat() const
|
||||||
{
|
{
|
||||||
return IClipboard::kText;
|
return IClipboard::kText;
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,14 @@
|
||||||
class MSWindowsClipboardAnyTextConverter : public IMSWindowsClipboardConverter
|
class MSWindowsClipboardAnyTextConverter : public IMSWindowsClipboardConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsClipboardAnyTextConverter();
|
MSWindowsClipboardAnyTextConverter() = default;
|
||||||
virtual ~MSWindowsClipboardAnyTextConverter();
|
~MSWindowsClipboardAnyTextConverter() override = default;
|
||||||
|
|
||||||
// IMSWindowsClipboardConverter overrides
|
// IMSWindowsClipboardConverter overrides
|
||||||
virtual IClipboard::EFormat getFormat() const;
|
IClipboard::EFormat getFormat() const override;
|
||||||
virtual UINT getWin32Format() const = 0;
|
UINT getWin32Format() const override = 0;
|
||||||
virtual HANDLE fromIClipboard(const std::string &) const;
|
HANDLE fromIClipboard(const std::string &) const override;
|
||||||
virtual std::string toIClipboard(HANDLE) const;
|
std::string toIClipboard(HANDLE) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Convert from IClipboard format
|
//! Convert from IClipboard format
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,6 @@
|
||||||
// MSWindowsClipboardBitmapConverter
|
// MSWindowsClipboardBitmapConverter
|
||||||
//
|
//
|
||||||
|
|
||||||
MSWindowsClipboardBitmapConverter::MSWindowsClipboardBitmapConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsClipboardBitmapConverter::~MSWindowsClipboardBitmapConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
IClipboard::EFormat MSWindowsClipboardBitmapConverter::getFormat() const
|
IClipboard::EFormat MSWindowsClipboardBitmapConverter::getFormat() const
|
||||||
{
|
{
|
||||||
return IClipboard::kBitmap;
|
return IClipboard::kBitmap;
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,12 @@
|
||||||
class MSWindowsClipboardBitmapConverter : public IMSWindowsClipboardConverter
|
class MSWindowsClipboardBitmapConverter : public IMSWindowsClipboardConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsClipboardBitmapConverter();
|
MSWindowsClipboardBitmapConverter() = default;
|
||||||
virtual ~MSWindowsClipboardBitmapConverter();
|
~MSWindowsClipboardBitmapConverter() override = default;
|
||||||
|
|
||||||
// IMSWindowsClipboardConverter overrides
|
// IMSWindowsClipboardConverter overrides
|
||||||
virtual IClipboard::EFormat getFormat() const;
|
IClipboard::EFormat getFormat() const override;
|
||||||
virtual UINT getWin32Format() const;
|
UINT getWin32Format() const override;
|
||||||
virtual HANDLE fromIClipboard(const std::string &) const;
|
HANDLE fromIClipboard(const std::string &) const override;
|
||||||
virtual std::string toIClipboard(HANDLE) const;
|
std::string toIClipboard(HANDLE) const override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@
|
||||||
class MSWindowsClipboardFacade : public IMSWindowsClipboardFacade
|
class MSWindowsClipboardFacade : public IMSWindowsClipboardFacade
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void write(HANDLE win32Data, UINT win32Format);
|
void write(HANDLE win32Data, UINT win32Format) override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,6 @@ MSWindowsClipboardHTMLConverter::MSWindowsClipboardHTMLConverter()
|
||||||
m_format = RegisterClipboardFormat("HTML Format");
|
m_format = RegisterClipboardFormat("HTML Format");
|
||||||
}
|
}
|
||||||
|
|
||||||
MSWindowsClipboardHTMLConverter::~MSWindowsClipboardHTMLConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
IClipboard::EFormat MSWindowsClipboardHTMLConverter::getFormat() const
|
IClipboard::EFormat MSWindowsClipboardHTMLConverter::getFormat() const
|
||||||
{
|
{
|
||||||
return IClipboard::kHTML;
|
return IClipboard::kHTML;
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,16 @@ class MSWindowsClipboardHTMLConverter : public MSWindowsClipboardAnyTextConverte
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsClipboardHTMLConverter();
|
MSWindowsClipboardHTMLConverter();
|
||||||
virtual ~MSWindowsClipboardHTMLConverter();
|
~MSWindowsClipboardHTMLConverter() override = default;
|
||||||
|
|
||||||
// IMSWindowsClipboardConverter overrides
|
// IMSWindowsClipboardConverter overrides
|
||||||
virtual IClipboard::EFormat getFormat() const;
|
IClipboard::EFormat getFormat() const override;
|
||||||
virtual UINT getWin32Format() const;
|
UINT getWin32Format() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// MSWindowsClipboardAnyTextConverter overrides
|
// MSWindowsClipboardAnyTextConverter overrides
|
||||||
virtual std::string doFromIClipboard(const std::string &) const;
|
std::string doFromIClipboard(const std::string &) const override;
|
||||||
virtual std::string doToIClipboard(const std::string &) const;
|
std::string doToIClipboard(const std::string &) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string findArg(const std::string &data, const std::string &name) const;
|
std::string findArg(const std::string &data, const std::string &name) const;
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,6 @@
|
||||||
// MSWindowsClipboardTextConverter
|
// MSWindowsClipboardTextConverter
|
||||||
//
|
//
|
||||||
|
|
||||||
MSWindowsClipboardTextConverter::MSWindowsClipboardTextConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsClipboardTextConverter::~MSWindowsClipboardTextConverter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT MSWindowsClipboardTextConverter::getWin32Format() const
|
UINT MSWindowsClipboardTextConverter::getWin32Format() const
|
||||||
{
|
{
|
||||||
return CF_TEXT;
|
return CF_TEXT;
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,14 @@
|
||||||
class MSWindowsClipboardTextConverter : public MSWindowsClipboardAnyTextConverter
|
class MSWindowsClipboardTextConverter : public MSWindowsClipboardAnyTextConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsClipboardTextConverter();
|
MSWindowsClipboardTextConverter() = default;
|
||||||
virtual ~MSWindowsClipboardTextConverter();
|
~MSWindowsClipboardTextConverter() override = default;
|
||||||
|
|
||||||
// IMSWindowsClipboardConverter overrides
|
// IMSWindowsClipboardConverter overrides
|
||||||
virtual UINT getWin32Format() const;
|
UINT getWin32Format() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// MSWindowsClipboardAnyTextConverter overrides
|
// MSWindowsClipboardAnyTextConverter overrides
|
||||||
virtual std::string doFromIClipboard(const std::string &) const;
|
std::string doFromIClipboard(const std::string &) const override;
|
||||||
virtual std::string doToIClipboard(const std::string &) const;
|
std::string doToIClipboard(const std::string &) const override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,6 @@
|
||||||
// MSWindowsClipboardUTF16Converter
|
// MSWindowsClipboardUTF16Converter
|
||||||
//
|
//
|
||||||
|
|
||||||
MSWindowsClipboardUTF16Converter::MSWindowsClipboardUTF16Converter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsClipboardUTF16Converter::~MSWindowsClipboardUTF16Converter()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT MSWindowsClipboardUTF16Converter::getWin32Format() const
|
UINT MSWindowsClipboardUTF16Converter::getWin32Format() const
|
||||||
{
|
{
|
||||||
return CF_UNICODETEXT;
|
return CF_UNICODETEXT;
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,14 @@
|
||||||
class MSWindowsClipboardUTF16Converter : public MSWindowsClipboardAnyTextConverter
|
class MSWindowsClipboardUTF16Converter : public MSWindowsClipboardAnyTextConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsClipboardUTF16Converter();
|
MSWindowsClipboardUTF16Converter() = default;
|
||||||
virtual ~MSWindowsClipboardUTF16Converter();
|
~MSWindowsClipboardUTF16Converter() override = default;
|
||||||
|
|
||||||
// IMSWindowsClipboardConverter overrides
|
// IMSWindowsClipboardConverter overrides
|
||||||
virtual UINT getWin32Format() const;
|
UINT getWin32Format() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// MSWindowsClipboardAnyTextConverter overrides
|
// MSWindowsClipboardAnyTextConverter overrides
|
||||||
virtual std::string doFromIClipboard(const std::string &) const;
|
std::string doFromIClipboard(const std::string &) const override;
|
||||||
virtual std::string doToIClipboard(const std::string &) const;
|
std::string doToIClipboard(const std::string &) const override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,24 +11,19 @@
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
MSWindowsDebugOutputter::MSWindowsDebugOutputter()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsDebugOutputter::~MSWindowsDebugOutputter()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void MSWindowsDebugOutputter::open(const char *title)
|
void MSWindowsDebugOutputter::open(const char *title)
|
||||||
{
|
{
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSWindowsDebugOutputter::close()
|
void MSWindowsDebugOutputter::close()
|
||||||
{
|
{
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSWindowsDebugOutputter::show(bool showIfEmpty)
|
void MSWindowsDebugOutputter::show(bool showIfEmpty)
|
||||||
{
|
{
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MSWindowsDebugOutputter::write(ELevel level, const char *msg)
|
bool MSWindowsDebugOutputter::write(ELevel level, const char *msg)
|
||||||
|
|
@ -39,4 +34,5 @@ bool MSWindowsDebugOutputter::write(ELevel level, const char *msg)
|
||||||
|
|
||||||
void MSWindowsDebugOutputter::flush()
|
void MSWindowsDebugOutputter::flush()
|
||||||
{
|
{
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@ can be seen in the Output window.
|
||||||
class MSWindowsDebugOutputter : public ILogOutputter
|
class MSWindowsDebugOutputter : public ILogOutputter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsDebugOutputter();
|
MSWindowsDebugOutputter() = default;
|
||||||
virtual ~MSWindowsDebugOutputter();
|
~MSWindowsDebugOutputter() override = default;
|
||||||
|
|
||||||
// ILogOutputter overrides
|
// ILogOutputter overrides
|
||||||
virtual void open(const char *title);
|
void open(const char *title) override;
|
||||||
virtual void close();
|
void close() override;
|
||||||
virtual void show(bool showIfEmpty);
|
void show(bool showIfEmpty) override;
|
||||||
virtual bool write(ELevel level, const char *message);
|
bool write(ELevel level, const char *message) override;
|
||||||
virtual void flush();
|
void flush();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,6 @@ MSWindowsDropTarget::MSWindowsDropTarget() : m_refCount(1), m_allowDrop(false)
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
MSWindowsDropTarget::~MSWindowsDropTarget()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsDropTarget &MSWindowsDropTarget::instance()
|
MSWindowsDropTarget &MSWindowsDropTarget::instance()
|
||||||
{
|
{
|
||||||
assert(s_instance != nullptr);
|
assert(s_instance != nullptr);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class MSWindowsDropTarget : public IDropTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsDropTarget();
|
MSWindowsDropTarget();
|
||||||
~MSWindowsDropTarget();
|
~MSWindowsDropTarget() = default;
|
||||||
|
|
||||||
// IUnknown implementation
|
// IUnknown implementation
|
||||||
HRESULT __stdcall QueryInterface(REFIID iid, void **object);
|
HRESULT __stdcall QueryInterface(REFIID iid, void **object);
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,6 @@ MSWindowsEventQueueBuffer::MSWindowsEventQueueBuffer(IEventQueue *events) : m_ev
|
||||||
PeekMessage(&dummy, nullptr, WM_USER, WM_USER, PM_NOREMOVE);
|
PeekMessage(&dummy, nullptr, WM_USER, WM_USER, PM_NOREMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
MSWindowsEventQueueBuffer::~MSWindowsEventQueueBuffer()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
void MSWindowsEventQueueBuffer::waitForEvent(double timeout)
|
void MSWindowsEventQueueBuffer::waitForEvent(double timeout)
|
||||||
{
|
{
|
||||||
// check if messages are available first. if we don't do this then
|
// check if messages are available first. if we don't do this then
|
||||||
|
|
|
||||||
|
|
@ -19,18 +19,18 @@ class MSWindowsEventQueueBuffer : public IEventQueueBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsEventQueueBuffer(IEventQueue *events);
|
MSWindowsEventQueueBuffer(IEventQueue *events);
|
||||||
virtual ~MSWindowsEventQueueBuffer();
|
~MSWindowsEventQueueBuffer() override = default;
|
||||||
|
|
||||||
// IEventQueueBuffer overrides
|
// IEventQueueBuffer overrides
|
||||||
virtual void init()
|
void init() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual void waitForEvent(double timeout);
|
void waitForEvent(double timeout) override;
|
||||||
virtual Type getEvent(Event &event, uint32_t &dataID);
|
Type getEvent(Event &event, uint32_t &dataID) override;
|
||||||
virtual bool addEvent(uint32_t dataID);
|
bool addEvent(uint32_t dataID) override;
|
||||||
virtual bool isEmpty() const;
|
bool isEmpty() const override;
|
||||||
virtual EventQueueTimer *newTimer(double duration, bool oneShot) const;
|
EventQueueTimer *newTimer(double duration, bool oneShot) const override;
|
||||||
virtual void deleteTimer(EventQueueTimer *) const;
|
void deleteTimer(EventQueueTimer *) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DWORD m_thread;
|
DWORD m_thread;
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,6 @@ static DWORD g_hookThread = 0;
|
||||||
static bool g_fakeServerInput = false;
|
static bool g_fakeServerInput = false;
|
||||||
static BOOL g_isPrimary = TRUE;
|
static BOOL g_isPrimary = TRUE;
|
||||||
|
|
||||||
MSWindowsHook::MSWindowsHook()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
MSWindowsHook::~MSWindowsHook()
|
MSWindowsHook::~MSWindowsHook()
|
||||||
{
|
{
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ enum EHookMode
|
||||||
class MSWindowsHook
|
class MSWindowsHook
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsHook();
|
MSWindowsHook() = default;
|
||||||
virtual ~MSWindowsHook();
|
~MSWindowsHook();
|
||||||
|
|
||||||
void loadLibrary();
|
void loadLibrary();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,18 +131,18 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// IKeyState overrides
|
// IKeyState overrides
|
||||||
virtual void fakeKeyDown(KeyID id, KeyModifierMask mask, KeyButton button, const std::string &lang);
|
void fakeKeyDown(KeyID id, KeyModifierMask mask, KeyButton button, const std::string &lang) override;
|
||||||
virtual bool fakeKeyRepeat(KeyID id, KeyModifierMask mask, int32_t count, KeyButton button, const std::string &lang);
|
bool fakeKeyRepeat(KeyID id, KeyModifierMask mask, int32_t count, KeyButton button, const std::string &lang) override;
|
||||||
virtual bool fakeCtrlAltDel();
|
bool fakeCtrlAltDel() override;
|
||||||
virtual KeyModifierMask pollActiveModifiers() const;
|
KeyModifierMask pollActiveModifiers() const override;
|
||||||
virtual int32_t pollActiveGroup() const;
|
int32_t pollActiveGroup() const override;
|
||||||
virtual void pollPressedKeys(KeyButtonSet &pressedKeys) const;
|
void pollPressedKeys(KeyButtonSet &pressedKeys) const override;
|
||||||
|
|
||||||
// KeyState overrides
|
// KeyState overrides
|
||||||
virtual void onKey(KeyButton button, bool down, KeyModifierMask newState);
|
void onKey(KeyButton button, bool down, KeyModifierMask newState) override;
|
||||||
virtual void sendKeyEvent(
|
void sendKeyEvent(
|
||||||
void *target, bool press, bool isAutoRepeat, KeyID key, KeyModifierMask mask, int32_t count, KeyButton button
|
void *target, bool press, bool isAutoRepeat, KeyID key, KeyModifierMask mask, int32_t count, KeyButton button
|
||||||
);
|
) override;
|
||||||
|
|
||||||
// Unit test accessors
|
// Unit test accessors
|
||||||
KeyButton getLastDown() const
|
KeyButton getLastDown() const
|
||||||
|
|
@ -164,9 +164,9 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// KeyState overrides
|
// KeyState overrides
|
||||||
virtual void getKeyMap(deskflow::KeyMap &keyMap);
|
void getKeyMap(deskflow::KeyMap &keyMap) override;
|
||||||
virtual void fakeKey(const Keystroke &keystroke);
|
void fakeKey(const Keystroke &keystroke) override;
|
||||||
virtual KeyModifierMask &getActiveModifiersRValue();
|
KeyModifierMask &getActiveModifiersRValue() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using GroupList = std::vector<HKL>;
|
using GroupList = std::vector<HKL>;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public:
|
||||||
bool isPrimary, bool noHooks, IEventQueue *events, bool enableLangSync = false,
|
bool isPrimary, bool noHooks, IEventQueue *events, bool enableLangSync = false,
|
||||||
deskflow::ClientScrollDirection scrollDirection = deskflow::ClientScrollDirection::SERVER
|
deskflow::ClientScrollDirection scrollDirection = deskflow::ClientScrollDirection::SERVER
|
||||||
);
|
);
|
||||||
virtual ~MSWindowsScreen();
|
~MSWindowsScreen() override;
|
||||||
|
|
||||||
//! @name manipulators
|
//! @name manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -61,10 +61,10 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// IScreen overrides
|
// IScreen overrides
|
||||||
virtual void *getEventTarget() const;
|
void *getEventTarget() const override;
|
||||||
virtual bool getClipboard(ClipboardID id, IClipboard *) const;
|
bool getClipboard(ClipboardID id, IClipboard *) const override;
|
||||||
virtual void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const;
|
void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override;
|
||||||
virtual void getCursorPos(int32_t &x, int32_t &y) const;
|
void getCursorPos(int32_t &x, int32_t &y) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the position of the cursor on the current machine
|
* \brief Get the position of the cursor on the current machine
|
||||||
|
|
@ -87,54 +87,54 @@ public:
|
||||||
virtual void updateDesktopThread();
|
virtual void updateDesktopThread();
|
||||||
|
|
||||||
// IPrimaryScreen overrides
|
// IPrimaryScreen overrides
|
||||||
virtual void reconfigure(uint32_t activeSides);
|
void reconfigure(uint32_t activeSides) override;
|
||||||
virtual void warpCursor(int32_t x, int32_t y);
|
void warpCursor(int32_t x, int32_t y) override;
|
||||||
virtual uint32_t registerHotKey(KeyID key, KeyModifierMask mask);
|
uint32_t registerHotKey(KeyID key, KeyModifierMask mask) override;
|
||||||
virtual void unregisterHotKey(uint32_t id);
|
void unregisterHotKey(uint32_t id) override;
|
||||||
virtual void fakeInputBegin();
|
void fakeInputBegin() override;
|
||||||
virtual void fakeInputEnd();
|
void fakeInputEnd() override;
|
||||||
virtual int32_t getJumpZoneSize() const;
|
int32_t getJumpZoneSize() const override;
|
||||||
virtual bool isAnyMouseButtonDown(uint32_t &buttonID) const;
|
bool isAnyMouseButtonDown(uint32_t &buttonID) const override;
|
||||||
virtual void getCursorCenter(int32_t &x, int32_t &y) const;
|
void getCursorCenter(int32_t &x, int32_t &y) const override;
|
||||||
|
|
||||||
// ISecondaryScreen overrides
|
// ISecondaryScreen overrides
|
||||||
virtual void fakeMouseButton(ButtonID id, bool press);
|
void fakeMouseButton(ButtonID id, bool press) override;
|
||||||
virtual void fakeMouseMove(int32_t x, int32_t y);
|
void fakeMouseMove(int32_t x, int32_t y) override;
|
||||||
virtual void fakeMouseRelativeMove(int32_t dx, int32_t dy) const;
|
void fakeMouseRelativeMove(int32_t dx, int32_t dy) const override;
|
||||||
virtual void fakeMouseWheel(int32_t xDelta, int32_t yDelta) const;
|
void fakeMouseWheel(int32_t xDelta, int32_t yDelta) const override;
|
||||||
|
|
||||||
// IKeyState overrides
|
// IKeyState overrides
|
||||||
virtual void updateKeys();
|
virtual void updateKeys();
|
||||||
virtual void fakeKeyDown(KeyID id, KeyModifierMask mask, KeyButton button, const std::string &lang);
|
void fakeKeyDown(KeyID id, KeyModifierMask mask, KeyButton button, const std::string &lang) override;
|
||||||
virtual bool fakeKeyRepeat(KeyID id, KeyModifierMask mask, int32_t count, KeyButton button, const std::string &lang);
|
bool fakeKeyRepeat(KeyID id, KeyModifierMask mask, int32_t count, KeyButton button, const std::string &lang) override;
|
||||||
virtual bool fakeKeyUp(KeyButton button);
|
bool fakeKeyUp(KeyButton button) override;
|
||||||
virtual void fakeAllKeysUp();
|
void fakeAllKeysUp() override;
|
||||||
|
|
||||||
// IPlatformScreen overrides
|
// IPlatformScreen overrides
|
||||||
virtual void enable();
|
void enable() override;
|
||||||
virtual void disable();
|
void disable() override;
|
||||||
virtual void enter();
|
void enter() override;
|
||||||
virtual bool canLeave();
|
bool canLeave() override;
|
||||||
virtual void leave();
|
void leave() override;
|
||||||
virtual bool setClipboard(ClipboardID, const IClipboard *);
|
bool setClipboard(ClipboardID, const IClipboard *) override;
|
||||||
virtual void checkClipboards();
|
void checkClipboards() override;
|
||||||
virtual void openScreensaver(bool notify);
|
void openScreensaver(bool notify) override;
|
||||||
virtual void closeScreensaver();
|
void closeScreensaver() override;
|
||||||
virtual void screensaver(bool activate);
|
void screensaver(bool activate) override;
|
||||||
virtual void resetOptions();
|
void resetOptions() override;
|
||||||
virtual void setOptions(const OptionsList &options);
|
void setOptions(const OptionsList &options) override;
|
||||||
virtual void setSequenceNumber(uint32_t);
|
void setSequenceNumber(uint32_t) override;
|
||||||
virtual bool isPrimary() const;
|
bool isPrimary() const override;
|
||||||
virtual void fakeDraggingFiles(DragFileList fileList);
|
void fakeDraggingFiles(DragFileList fileList) override;
|
||||||
virtual std::string &getDraggingFilename();
|
std::string &getDraggingFilename() override;
|
||||||
virtual const std::string &getDropTarget() const;
|
const std::string &getDropTarget() const override;
|
||||||
std::string getSecureInputApp() const override;
|
std::string getSecureInputApp() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// IPlatformScreen overrides
|
// IPlatformScreen overrides
|
||||||
virtual void handleSystemEvent(const Event &, void *);
|
void handleSystemEvent(const Event &, void *) override;
|
||||||
virtual void updateButtons();
|
void updateButtons() override;
|
||||||
virtual IKeyState *getKeyState() const;
|
IKeyState *getKeyState() const override;
|
||||||
|
|
||||||
// simulate a local key to the system directly
|
// simulate a local key to the system directly
|
||||||
void fakeLocalKey(KeyButton button, bool press) const;
|
void fakeLocalKey(KeyButton button, bool press) const;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class MSWindowsScreenSaver : public IScreenSaver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsScreenSaver();
|
MSWindowsScreenSaver();
|
||||||
virtual ~MSWindowsScreenSaver();
|
~MSWindowsScreenSaver() override;
|
||||||
|
|
||||||
//! @name manipulators
|
//! @name manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -36,11 +36,11 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// IScreenSaver overrides
|
// IScreenSaver overrides
|
||||||
virtual void enable();
|
void enable() override;
|
||||||
virtual void disable();
|
void disable() override;
|
||||||
virtual void activate();
|
void activate() override;
|
||||||
virtual void deactivate();
|
void deactivate() override;
|
||||||
virtual bool isActive() const;
|
bool isActive() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class FindScreenSaverInfo
|
class FindScreenSaverInfo
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,6 @@ MSWindowsSession::MSWindowsSession() : m_activeSessionId(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
MSWindowsSession::~MSWindowsSession()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MSWindowsSession::isProcessInSession(const char *name, PHANDLE process = nullptr)
|
bool MSWindowsSession::isProcessInSession(const char *name, PHANDLE process = nullptr)
|
||||||
{
|
{
|
||||||
// first we need to take a snapshot of the running processes
|
// first we need to take a snapshot of the running processes
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class MSWindowsSession
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsSession();
|
MSWindowsSession();
|
||||||
~MSWindowsSession();
|
~MSWindowsSession() = default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns true if the session ID has changed since updateActiveSession was
|
Returns true if the session ID has changed since updateActiveSession was
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue