Drop C prefix on Windows

This commit is contained in:
Xinyu Hou 2014-11-12 11:44:29 +00:00
parent e5e0a3b653
commit 9fd11da578
48 changed files with 555 additions and 555 deletions

View File

@ -30,10 +30,10 @@
#include "base/EventTypes.h"
//
// CMSWindowsClientTaskBarReceiver
// MSWindowsClientTaskBarReceiver
//
const UINT CMSWindowsClientTaskBarReceiver::s_stateToIconID[kMaxState] =
const UINT MSWindowsClientTaskBarReceiver::s_stateToIconID[kMaxState] =
{
IDI_TASKBAR_NOT_RUNNING,
IDI_TASKBAR_NOT_WORKING,
@ -42,7 +42,7 @@ const UINT CMSWindowsClientTaskBarReceiver::s_stateToIconID[kMaxState] =
IDI_TASKBAR_CONNECTED
};
CMSWindowsClientTaskBarReceiver::CMSWindowsClientTaskBarReceiver(
MSWindowsClientTaskBarReceiver::MSWindowsClientTaskBarReceiver(
HINSTANCE appInstance, const BufferedLogOutputter* logBuffer, IEventQueue* events) :
ClientTaskBarReceiver(events),
m_appInstance(appInstance),
@ -63,13 +63,13 @@ CMSWindowsClientTaskBarReceiver::CMSWindowsClientTaskBarReceiver(
ARCH->addReceiver(this);
}
CMSWindowsClientTaskBarReceiver::~CMSWindowsClientTaskBarReceiver()
MSWindowsClientTaskBarReceiver::~MSWindowsClientTaskBarReceiver()
{
cleanup();
}
void
CMSWindowsClientTaskBarReceiver::cleanup()
MSWindowsClientTaskBarReceiver::cleanup()
{
ARCH->removeReceiver(this);
for (UInt32 i = 0; i < kMaxState; ++i) {
@ -80,7 +80,7 @@ CMSWindowsClientTaskBarReceiver::cleanup()
}
void
CMSWindowsClientTaskBarReceiver::showStatus()
MSWindowsClientTaskBarReceiver::showStatus()
{
// create the window
createWindow();
@ -142,7 +142,7 @@ CMSWindowsClientTaskBarReceiver::showStatus()
}
void
CMSWindowsClientTaskBarReceiver::runMenu(int x, int y)
MSWindowsClientTaskBarReceiver::runMenu(int x, int y)
{
// do popup menu. we need a window to pass to TrackPopupMenu().
// the SetForegroundWindow() and SendMessage() calls around
@ -213,19 +213,19 @@ CMSWindowsClientTaskBarReceiver::runMenu(int x, int y)
}
void
CMSWindowsClientTaskBarReceiver::primaryAction()
MSWindowsClientTaskBarReceiver::primaryAction()
{
showStatus();
}
const IArchTaskBarReceiver::Icon
CMSWindowsClientTaskBarReceiver::getIcon() const
MSWindowsClientTaskBarReceiver::getIcon() const
{
return reinterpret_cast<Icon>(m_icon[getStatus()]);
}
void
CMSWindowsClientTaskBarReceiver::copyLog() const
MSWindowsClientTaskBarReceiver::copyLog() const
{
if (m_logBuffer != NULL) {
// collect log buffer
@ -238,7 +238,7 @@ CMSWindowsClientTaskBarReceiver::copyLog() const
// copy log to clipboard
if (!data.empty()) {
CMSWindowsClipboard clipboard(m_window);
MSWindowsClipboard clipboard(m_window);
clipboard.open(0);
clipboard.emptyUnowned();
clipboard.add(IClipboard::kText, data);
@ -248,7 +248,7 @@ CMSWindowsClientTaskBarReceiver::copyLog() const
}
void
CMSWindowsClientTaskBarReceiver::onStatusChanged()
MSWindowsClientTaskBarReceiver::onStatusChanged()
{
if (IsWindowVisible(m_window)) {
showStatus();
@ -256,7 +256,7 @@ CMSWindowsClientTaskBarReceiver::onStatusChanged()
}
HICON
CMSWindowsClientTaskBarReceiver::loadIcon(UINT id)
MSWindowsClientTaskBarReceiver::loadIcon(UINT id)
{
HANDLE icon = LoadImage(m_appInstance,
MAKEINTRESOURCE(id),
@ -267,7 +267,7 @@ CMSWindowsClientTaskBarReceiver::loadIcon(UINT id)
}
void
CMSWindowsClientTaskBarReceiver::deleteIcon(HICON icon)
MSWindowsClientTaskBarReceiver::deleteIcon(HICON icon)
{
if (icon != NULL) {
DestroyIcon(icon);
@ -275,7 +275,7 @@ CMSWindowsClientTaskBarReceiver::deleteIcon(HICON icon)
}
void
CMSWindowsClientTaskBarReceiver::createWindow()
MSWindowsClientTaskBarReceiver::createWindow()
{
// ignore if already created
if (m_window != NULL) {
@ -286,7 +286,7 @@ CMSWindowsClientTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&CMSWindowsClientTaskBarReceiver::staticDlgProc,
(DLGPROC)&MSWindowsClientTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this)));
@ -301,7 +301,7 @@ CMSWindowsClientTaskBarReceiver::createWindow()
}
void
CMSWindowsClientTaskBarReceiver::destroyWindow()
MSWindowsClientTaskBarReceiver::destroyWindow()
{
if (m_window != NULL) {
ArchTaskBarWindows::removeDialog(m_window);
@ -311,7 +311,7 @@ CMSWindowsClientTaskBarReceiver::destroyWindow()
}
BOOL
CMSWindowsClientTaskBarReceiver::dlgProc(HWND hwnd,
MSWindowsClientTaskBarReceiver::dlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM)
{
switch (msg) {
@ -330,14 +330,14 @@ CMSWindowsClientTaskBarReceiver::dlgProc(HWND hwnd,
}
BOOL CALLBACK
CMSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
MSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM lParam)
{
// if msg is WM_INITDIALOG, extract the CMSWindowsClientTaskBarReceiver*
// if msg is WM_INITDIALOG, extract the MSWindowsClientTaskBarReceiver*
// and put it in the extra window data then forward the call.
CMSWindowsClientTaskBarReceiver* self = NULL;
MSWindowsClientTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<CMSWindowsClientTaskBarReceiver*>(
self = reinterpret_cast<MSWindowsClientTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) lParam);
}
@ -345,7 +345,7 @@ CMSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
// get the extra window data and forward the call
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) {
self = (CMSWindowsClientTaskBarReceiver*) data;
self = (MSWindowsClientTaskBarReceiver*) data;
}
}
@ -371,6 +371,6 @@ createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events
IMAGE_ICON,
16, 16, LR_SHARED));
return new CMSWindowsClientTaskBarReceiver(
CMSWindowsScreen::getWindowInstance(), logBuffer, events);
return new MSWindowsClientTaskBarReceiver(
MSWindowsScreen::getWindowInstance(), logBuffer, events);
}

View File

@ -27,10 +27,10 @@ class BufferedLogOutputter;
class IEventQueue;
//! Implementation of ClientTaskBarReceiver for Microsoft Windows
class CMSWindowsClientTaskBarReceiver : public ClientTaskBarReceiver {
class MSWindowsClientTaskBarReceiver : public ClientTaskBarReceiver {
public:
CMSWindowsClientTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
virtual ~CMSWindowsClientTaskBarReceiver();
MSWindowsClientTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
virtual ~MSWindowsClientTaskBarReceiver();
// IArchTaskBarReceiver overrides
virtual void showStatus();

View File

@ -30,10 +30,10 @@
#include "base/EventTypes.h"
//
// CMSWindowsPortableTaskBarReceiver
// MSWindowsPortableTaskBarReceiver
//
const UINT CMSWindowsPortableTaskBarReceiver::s_stateToIconID[kMaxState] =
const UINT MSWindowsPortableTaskBarReceiver::s_stateToIconID[kMaxState] =
{
IDI_TASKBAR_NOT_RUNNING,
IDI_TASKBAR_NOT_WORKING,
@ -41,7 +41,7 @@ const UINT CMSWindowsPortableTaskBarReceiver::s_stateToIconID[kMaxState] =
IDI_TASKBAR_CONNECTED
};
CMSWindowsPortableTaskBarReceiver::CMSWindowsPortableTaskBarReceiver(
MSWindowsPortableTaskBarReceiver::MSWindowsPortableTaskBarReceiver(
HINSTANCE appInstance, const BufferedLogOutputter* logBuffer, IEventQueue* events) :
PortableTaskBarReceiver(events),
m_events(events),
@ -64,7 +64,7 @@ CMSWindowsPortableTaskBarReceiver::CMSWindowsPortableTaskBarReceiver(
}
void
CMSWindowsPortableTaskBarReceiver::cleanup()
MSWindowsPortableTaskBarReceiver::cleanup()
{
ARCH->removeReceiver(this);
for (UInt32 i = 0; i < kMaxState; ++i) {
@ -74,13 +74,13 @@ CMSWindowsPortableTaskBarReceiver::cleanup()
destroyWindow();
}
CMSWindowsPortableTaskBarReceiver::~CMSWindowsPortableTaskBarReceiver()
MSWindowsPortableTaskBarReceiver::~MSWindowsPortableTaskBarReceiver()
{
cleanup();
}
void
CMSWindowsPortableTaskBarReceiver::showStatus()
MSWindowsPortableTaskBarReceiver::showStatus()
{
// create the window
createWindow();
@ -144,7 +144,7 @@ CMSWindowsPortableTaskBarReceiver::showStatus()
}
void
CMSWindowsPortableTaskBarReceiver::runMenu(int x, int y)
MSWindowsPortableTaskBarReceiver::runMenu(int x, int y)
{
// do popup menu. we need a window to pass to TrackPopupMenu().
// the SetForegroundWindow() and SendMessage() calls around
@ -230,19 +230,19 @@ CMSWindowsPortableTaskBarReceiver::runMenu(int x, int y)
}
void
CMSWindowsPortableTaskBarReceiver::primaryAction()
MSWindowsPortableTaskBarReceiver::primaryAction()
{
showStatus();
}
const IArchTaskBarReceiver::Icon
CMSWindowsPortableTaskBarReceiver::getIcon() const
MSWindowsPortableTaskBarReceiver::getIcon() const
{
return reinterpret_cast<Icon>(m_icon[getStatus()]);
}
void
CMSWindowsPortableTaskBarReceiver::copyLog() const
MSWindowsPortableTaskBarReceiver::copyLog() const
{
if (m_logBuffer != NULL) {
// collect log buffer
@ -255,7 +255,7 @@ CMSWindowsPortableTaskBarReceiver::copyLog() const
// copy log to clipboard
if (!data.empty()) {
CMSWindowsClipboard clipboard(m_window);
MSWindowsClipboard clipboard(m_window);
clipboard.open(0);
clipboard.emptyUnowned();
clipboard.add(IClipboard::kText, data);
@ -265,7 +265,7 @@ CMSWindowsPortableTaskBarReceiver::copyLog() const
}
void
CMSWindowsPortableTaskBarReceiver::onStatusChanged()
MSWindowsPortableTaskBarReceiver::onStatusChanged()
{
if (IsWindowVisible(m_window)) {
showStatus();
@ -273,7 +273,7 @@ CMSWindowsPortableTaskBarReceiver::onStatusChanged()
}
HICON
CMSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
MSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
{
HANDLE icon = LoadImage(m_appInstance,
MAKEINTRESOURCE(id),
@ -284,7 +284,7 @@ CMSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
}
void
CMSWindowsPortableTaskBarReceiver::deleteIcon(HICON icon)
MSWindowsPortableTaskBarReceiver::deleteIcon(HICON icon)
{
if (icon != NULL) {
DestroyIcon(icon);
@ -292,7 +292,7 @@ CMSWindowsPortableTaskBarReceiver::deleteIcon(HICON icon)
}
void
CMSWindowsPortableTaskBarReceiver::createWindow()
MSWindowsPortableTaskBarReceiver::createWindow()
{
// ignore if already created
if (m_window != NULL) {
@ -303,7 +303,7 @@ CMSWindowsPortableTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&CMSWindowsPortableTaskBarReceiver::staticDlgProc,
(DLGPROC)&MSWindowsPortableTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this)));
@ -318,7 +318,7 @@ CMSWindowsPortableTaskBarReceiver::createWindow()
}
void
CMSWindowsPortableTaskBarReceiver::destroyWindow()
MSWindowsPortableTaskBarReceiver::destroyWindow()
{
if (m_window != NULL) {
ArchTaskBarWindows::removeDialog(m_window);
@ -328,7 +328,7 @@ CMSWindowsPortableTaskBarReceiver::destroyWindow()
}
BOOL
CMSWindowsPortableTaskBarReceiver::dlgProc(HWND hwnd,
MSWindowsPortableTaskBarReceiver::dlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM)
{
switch (msg) {
@ -347,14 +347,14 @@ CMSWindowsPortableTaskBarReceiver::dlgProc(HWND hwnd,
}
BOOL CALLBACK
CMSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM lParam)
{
// if msg is WM_INITDIALOG, extract the CMSWindowsPortableTaskBarReceiver*
// if msg is WM_INITDIALOG, extract the MSWindowsPortableTaskBarReceiver*
// and put it in the extra window data then forward the call.
CMSWindowsPortableTaskBarReceiver* self = NULL;
MSWindowsPortableTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<CMSWindowsPortableTaskBarReceiver*>(
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
}
@ -362,7 +362,7 @@ CMSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
// get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) {
self = reinterpret_cast<CMSWindowsPortableTaskBarReceiver*>(
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(
reinterpret_cast<void*>(data));
}
}
@ -389,6 +389,6 @@ createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events
IMAGE_ICON,
16, 16, LR_SHARED));
return new CMSWindowsPortableTaskBarReceiver(
CMSWindowsScreen::getWindowInstance(), logBuffer, events);
return new MSWindowsPortableTaskBarReceiver(
MSWindowsScreen::getWindowInstance(), logBuffer, events);
}

View File

@ -27,10 +27,10 @@ class BufferedLogOutputter;
class IEventQueue;
//! Implementation of PortableTaskBarReceiver for Microsoft Windows
class CMSWindowsPortableTaskBarReceiver : public PortableTaskBarReceiver {
class MSWindowsPortableTaskBarReceiver : public PortableTaskBarReceiver {
public:
CMSWindowsPortableTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
virtual ~CMSWindowsPortableTaskBarReceiver();
MSWindowsPortableTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
virtual ~MSWindowsPortableTaskBarReceiver();
// IArchTaskBarReceiver overrides
virtual void showStatus();

View File

@ -31,10 +31,10 @@
#include "base/EventTypes.h"
//
// CMSWindowsServerTaskBarReceiver
// MSWindowsServerTaskBarReceiver
//
const UINT CMSWindowsServerTaskBarReceiver::s_stateToIconID[kMaxState] =
const UINT MSWindowsServerTaskBarReceiver::s_stateToIconID[kMaxState] =
{
IDI_TASKBAR_NOT_RUNNING,
IDI_TASKBAR_NOT_WORKING,
@ -42,7 +42,7 @@ const UINT CMSWindowsServerTaskBarReceiver::s_stateToIconID[kMaxState] =
IDI_TASKBAR_CONNECTED
};
CMSWindowsServerTaskBarReceiver::CMSWindowsServerTaskBarReceiver(
MSWindowsServerTaskBarReceiver::MSWindowsServerTaskBarReceiver(
HINSTANCE appInstance, const BufferedLogOutputter* logBuffer, IEventQueue* events) :
ServerTaskBarReceiver(events),
m_events(events),
@ -65,7 +65,7 @@ CMSWindowsServerTaskBarReceiver::CMSWindowsServerTaskBarReceiver(
}
void
CMSWindowsServerTaskBarReceiver::cleanup()
MSWindowsServerTaskBarReceiver::cleanup()
{
ARCH->removeReceiver(this);
for (UInt32 i = 0; i < kMaxState; ++i) {
@ -75,13 +75,13 @@ CMSWindowsServerTaskBarReceiver::cleanup()
destroyWindow();
}
CMSWindowsServerTaskBarReceiver::~CMSWindowsServerTaskBarReceiver()
MSWindowsServerTaskBarReceiver::~MSWindowsServerTaskBarReceiver()
{
cleanup();
}
void
CMSWindowsServerTaskBarReceiver::showStatus()
MSWindowsServerTaskBarReceiver::showStatus()
{
// create the window
createWindow();
@ -158,7 +158,7 @@ CMSWindowsServerTaskBarReceiver::showStatus()
}
void
CMSWindowsServerTaskBarReceiver::runMenu(int x, int y)
MSWindowsServerTaskBarReceiver::runMenu(int x, int y)
{
// do popup menu. we need a window to pass to TrackPopupMenu().
// the SetForegroundWindow() and SendMessage() calls around
@ -244,19 +244,19 @@ CMSWindowsServerTaskBarReceiver::runMenu(int x, int y)
}
void
CMSWindowsServerTaskBarReceiver::primaryAction()
MSWindowsServerTaskBarReceiver::primaryAction()
{
showStatus();
}
const IArchTaskBarReceiver::Icon
CMSWindowsServerTaskBarReceiver::getIcon() const
MSWindowsServerTaskBarReceiver::getIcon() const
{
return reinterpret_cast<Icon>(m_icon[getStatus()]);
}
void
CMSWindowsServerTaskBarReceiver::copyLog() const
MSWindowsServerTaskBarReceiver::copyLog() const
{
if (m_logBuffer != NULL) {
// collect log buffer
@ -269,7 +269,7 @@ CMSWindowsServerTaskBarReceiver::copyLog() const
// copy log to clipboard
if (!data.empty()) {
CMSWindowsClipboard clipboard(m_window);
MSWindowsClipboard clipboard(m_window);
clipboard.open(0);
clipboard.emptyUnowned();
clipboard.add(IClipboard::kText, data);
@ -279,7 +279,7 @@ CMSWindowsServerTaskBarReceiver::copyLog() const
}
void
CMSWindowsServerTaskBarReceiver::onStatusChanged()
MSWindowsServerTaskBarReceiver::onStatusChanged()
{
if (IsWindowVisible(m_window)) {
showStatus();
@ -287,7 +287,7 @@ CMSWindowsServerTaskBarReceiver::onStatusChanged()
}
HICON
CMSWindowsServerTaskBarReceiver::loadIcon(UINT id)
MSWindowsServerTaskBarReceiver::loadIcon(UINT id)
{
HANDLE icon = LoadImage(m_appInstance,
MAKEINTRESOURCE(id),
@ -298,7 +298,7 @@ CMSWindowsServerTaskBarReceiver::loadIcon(UINT id)
}
void
CMSWindowsServerTaskBarReceiver::deleteIcon(HICON icon)
MSWindowsServerTaskBarReceiver::deleteIcon(HICON icon)
{
if (icon != NULL) {
DestroyIcon(icon);
@ -306,7 +306,7 @@ CMSWindowsServerTaskBarReceiver::deleteIcon(HICON icon)
}
void
CMSWindowsServerTaskBarReceiver::createWindow()
MSWindowsServerTaskBarReceiver::createWindow()
{
// ignore if already created
if (m_window != NULL) {
@ -317,7 +317,7 @@ CMSWindowsServerTaskBarReceiver::createWindow()
m_window = CreateDialogParam(m_appInstance,
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&CMSWindowsServerTaskBarReceiver::staticDlgProc,
(DLGPROC)&MSWindowsServerTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this)));
@ -332,7 +332,7 @@ CMSWindowsServerTaskBarReceiver::createWindow()
}
void
CMSWindowsServerTaskBarReceiver::destroyWindow()
MSWindowsServerTaskBarReceiver::destroyWindow()
{
if (m_window != NULL) {
ArchTaskBarWindows::removeDialog(m_window);
@ -342,7 +342,7 @@ CMSWindowsServerTaskBarReceiver::destroyWindow()
}
BOOL
CMSWindowsServerTaskBarReceiver::dlgProc(HWND hwnd,
MSWindowsServerTaskBarReceiver::dlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM)
{
switch (msg) {
@ -361,14 +361,14 @@ CMSWindowsServerTaskBarReceiver::dlgProc(HWND hwnd,
}
BOOL CALLBACK
CMSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM lParam)
{
// if msg is WM_INITDIALOG, extract the CMSWindowsServerTaskBarReceiver*
// if msg is WM_INITDIALOG, extract the MSWindowsServerTaskBarReceiver*
// and put it in the extra window data then forward the call.
CMSWindowsServerTaskBarReceiver* self = NULL;
MSWindowsServerTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<CMSWindowsServerTaskBarReceiver*>(
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
}
@ -376,7 +376,7 @@ CMSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
// get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) {
self = reinterpret_cast<CMSWindowsServerTaskBarReceiver*>(
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(data));
}
}
@ -403,6 +403,6 @@ createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events
IMAGE_ICON,
16, 16, LR_SHARED));
return new CMSWindowsServerTaskBarReceiver(
CMSWindowsScreen::getWindowInstance(), logBuffer, events);
return new MSWindowsServerTaskBarReceiver(
MSWindowsScreen::getWindowInstance(), logBuffer, events);
}

View File

@ -27,10 +27,10 @@ class BufferedLogOutputter;
class IEventQueue;
//! Implementation of ServerTaskBarReceiver for Microsoft Windows
class CMSWindowsServerTaskBarReceiver : public ServerTaskBarReceiver {
class MSWindowsServerTaskBarReceiver : public ServerTaskBarReceiver {
public:
CMSWindowsServerTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
virtual ~CMSWindowsServerTaskBarReceiver();
MSWindowsServerTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
virtual ~MSWindowsServerTaskBarReceiver();
// IArchTaskBarReceiver overrides
virtual void showStatus();

View File

@ -27,24 +27,24 @@
#include "base/Log.h"
//
// CMSWindowsClipboard
// MSWindowsClipboard
//
UINT CMSWindowsClipboard::s_ownershipFormat = 0;
UINT MSWindowsClipboard::s_ownershipFormat = 0;
CMSWindowsClipboard::CMSWindowsClipboard(HWND window) :
MSWindowsClipboard::MSWindowsClipboard(HWND window) :
m_window(window),
m_time(0),
m_facade(new CMSWindowsClipboardFacade()),
m_facade(new MSWindowsClipboardFacade()),
m_deleteFacade(true)
{
// add converters, most desired first
m_converters.push_back(new CMSWindowsClipboardUTF16Converter);
m_converters.push_back(new CMSWindowsClipboardBitmapConverter);
m_converters.push_back(new CMSWindowsClipboardHTMLConverter);
m_converters.push_back(new MSWindowsClipboardUTF16Converter);
m_converters.push_back(new MSWindowsClipboardBitmapConverter);
m_converters.push_back(new MSWindowsClipboardHTMLConverter);
}
CMSWindowsClipboard::~CMSWindowsClipboard()
MSWindowsClipboard::~MSWindowsClipboard()
{
clearConverters();
@ -56,7 +56,7 @@ CMSWindowsClipboard::~CMSWindowsClipboard()
}
void
CMSWindowsClipboard::setFacade(IMSWindowsClipboardFacade& facade)
MSWindowsClipboard::setFacade(IMSWindowsClipboardFacade& facade)
{
delete m_facade;
m_facade = &facade;
@ -64,7 +64,7 @@ CMSWindowsClipboard::setFacade(IMSWindowsClipboardFacade& facade)
}
bool
CMSWindowsClipboard::emptyUnowned()
MSWindowsClipboard::emptyUnowned()
{
LOG((CLOG_DEBUG "empty clipboard"));
@ -80,7 +80,7 @@ CMSWindowsClipboard::emptyUnowned()
}
bool
CMSWindowsClipboard::empty()
MSWindowsClipboard::empty()
{
if (!emptyUnowned()) {
return false;
@ -94,7 +94,7 @@ CMSWindowsClipboard::empty()
}
void
CMSWindowsClipboard::add(EFormat format, const String& data)
MSWindowsClipboard::add(EFormat format, const String& data)
{
LOG((CLOG_DEBUG "add %d bytes to clipboard format: %d", data.size(), format));
@ -115,7 +115,7 @@ CMSWindowsClipboard::add(EFormat format, const String& data)
}
bool
CMSWindowsClipboard::open(Time time) const
MSWindowsClipboard::open(Time time) const
{
LOG((CLOG_DEBUG "open clipboard"));
@ -134,20 +134,20 @@ CMSWindowsClipboard::open(Time time) const
}
void
CMSWindowsClipboard::close() const
MSWindowsClipboard::close() const
{
LOG((CLOG_DEBUG "close clipboard"));
CloseClipboard();
}
IClipboard::Time
CMSWindowsClipboard::getTime() const
MSWindowsClipboard::getTime() const
{
return m_time;
}
bool
CMSWindowsClipboard::has(EFormat format) const
MSWindowsClipboard::has(EFormat format) const
{
for (ConverterList::const_iterator index = m_converters.begin();
index != m_converters.end(); ++index) {
@ -162,7 +162,7 @@ CMSWindowsClipboard::has(EFormat format) const
}
String
CMSWindowsClipboard::get(EFormat format) const
MSWindowsClipboard::get(EFormat format) const
{
// find the converter for the first clipboard format we can handle
IMSWindowsClipboardConverter* converter = NULL;
@ -199,7 +199,7 @@ CMSWindowsClipboard::get(EFormat format) const
}
void
CMSWindowsClipboard::clearConverters()
MSWindowsClipboard::clearConverters()
{
for (ConverterList::iterator index = m_converters.begin();
index != m_converters.end(); ++index) {
@ -209,7 +209,7 @@ CMSWindowsClipboard::clearConverters()
}
bool
CMSWindowsClipboard::isOwnedBySynergy()
MSWindowsClipboard::isOwnedBySynergy()
{
// create ownership format if we haven't yet
if (s_ownershipFormat == 0) {
@ -219,7 +219,7 @@ CMSWindowsClipboard::isOwnedBySynergy()
}
UINT
CMSWindowsClipboard::getOwnershipFormat()
MSWindowsClipboard::getOwnershipFormat()
{
// create ownership format if we haven't yet
if (s_ownershipFormat == 0) {

View File

@ -29,11 +29,11 @@ class IMSWindowsClipboardConverter;
class IMSWindowsClipboardFacade;
//! Microsoft windows clipboard implementation
class CMSWindowsClipboard : public IClipboard {
class MSWindowsClipboard : public IClipboard {
public:
CMSWindowsClipboard(HWND window);
CMSWindowsClipboard(HWND window, IMSWindowsClipboardFacade &facade);
virtual ~CMSWindowsClipboard();
MSWindowsClipboard(HWND window);
MSWindowsClipboard(HWND window, IMSWindowsClipboardFacade &facade);
virtual ~MSWindowsClipboard();
//! Empty clipboard without ownership
/*!

View File

@ -19,27 +19,27 @@
#include "platform/MSWindowsClipboardAnyTextConverter.h"
//
// CMSWindowsClipboardAnyTextConverter
// MSWindowsClipboardAnyTextConverter
//
CMSWindowsClipboardAnyTextConverter::CMSWindowsClipboardAnyTextConverter()
MSWindowsClipboardAnyTextConverter::MSWindowsClipboardAnyTextConverter()
{
// do nothing
}
CMSWindowsClipboardAnyTextConverter::~CMSWindowsClipboardAnyTextConverter()
MSWindowsClipboardAnyTextConverter::~MSWindowsClipboardAnyTextConverter()
{
// do nothing
}
IClipboard::EFormat
CMSWindowsClipboardAnyTextConverter::getFormat() const
MSWindowsClipboardAnyTextConverter::getFormat() const
{
return IClipboard::kText;
}
HANDLE
CMSWindowsClipboardAnyTextConverter::fromIClipboard(const String& data) const
MSWindowsClipboardAnyTextConverter::fromIClipboard(const String& data) const
{
// convert linefeeds and then convert to desired encoding
String text = doFromIClipboard(convertLinefeedToWin32(data));
@ -64,7 +64,7 @@ CMSWindowsClipboardAnyTextConverter::fromIClipboard(const String& data) const
}
String
CMSWindowsClipboardAnyTextConverter::toIClipboard(HANDLE data) const
MSWindowsClipboardAnyTextConverter::toIClipboard(HANDLE data) const
{
// get datator
const char* src = (const char*)GlobalLock(data);
@ -84,7 +84,7 @@ CMSWindowsClipboardAnyTextConverter::toIClipboard(HANDLE data) const
}
String
CMSWindowsClipboardAnyTextConverter::convertLinefeedToWin32(
MSWindowsClipboardAnyTextConverter::convertLinefeedToWin32(
const String& src) const
{
// note -- we assume src is a valid UTF-8 string
@ -118,7 +118,7 @@ CMSWindowsClipboardAnyTextConverter::convertLinefeedToWin32(
}
String
CMSWindowsClipboardAnyTextConverter::convertLinefeedToUnix(
MSWindowsClipboardAnyTextConverter::convertLinefeedToUnix(
const String& src) const
{
// count newlines in string

View File

@ -21,11 +21,11 @@
#include "platform/MSWindowsClipboard.h"
//! Convert to/from some text encoding
class CMSWindowsClipboardAnyTextConverter :
class MSWindowsClipboardAnyTextConverter :
public IMSWindowsClipboardConverter {
public:
CMSWindowsClipboardAnyTextConverter();
virtual ~CMSWindowsClipboardAnyTextConverter();
MSWindowsClipboardAnyTextConverter();
virtual ~MSWindowsClipboardAnyTextConverter();
// IMSWindowsClipboardConverter overrides
virtual IClipboard::EFormat

View File

@ -21,33 +21,33 @@
#include "base/Log.h"
//
// CMSWindowsClipboardBitmapConverter
// MSWindowsClipboardBitmapConverter
//
CMSWindowsClipboardBitmapConverter::CMSWindowsClipboardBitmapConverter()
MSWindowsClipboardBitmapConverter::MSWindowsClipboardBitmapConverter()
{
// do nothing
}
CMSWindowsClipboardBitmapConverter::~CMSWindowsClipboardBitmapConverter()
MSWindowsClipboardBitmapConverter::~MSWindowsClipboardBitmapConverter()
{
// do nothing
}
IClipboard::EFormat
CMSWindowsClipboardBitmapConverter::getFormat() const
MSWindowsClipboardBitmapConverter::getFormat() const
{
return IClipboard::kBitmap;
}
UINT
CMSWindowsClipboardBitmapConverter::getWin32Format() const
MSWindowsClipboardBitmapConverter::getWin32Format() const
{
return CF_DIB;
}
HANDLE
CMSWindowsClipboardBitmapConverter::fromIClipboard(const String& data) const
MSWindowsClipboardBitmapConverter::fromIClipboard(const String& data) const
{
// copy to memory handle
HGLOBAL gData = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, data.size());
@ -68,7 +68,7 @@ CMSWindowsClipboardBitmapConverter::fromIClipboard(const String& data) const
}
String
CMSWindowsClipboardBitmapConverter::toIClipboard(HANDLE data) const
MSWindowsClipboardBitmapConverter::toIClipboard(HANDLE data) const
{
// get datator
const char* src = (const char*)GlobalLock(data);

View File

@ -21,11 +21,11 @@
#include "platform/MSWindowsClipboard.h"
//! Convert to/from some text encoding
class CMSWindowsClipboardBitmapConverter :
class MSWindowsClipboardBitmapConverter :
public IMSWindowsClipboardConverter {
public:
CMSWindowsClipboardBitmapConverter();
virtual ~CMSWindowsClipboardBitmapConverter();
MSWindowsClipboardBitmapConverter();
virtual ~MSWindowsClipboardBitmapConverter();
// IMSWindowsClipboardConverter overrides
virtual IClipboard::EFormat

View File

@ -20,7 +20,7 @@
#include "platform/MSWindowsClipboard.h"
void CMSWindowsClipboardFacade::write(HANDLE win32Data, UINT win32Format)
void MSWindowsClipboardFacade::write(HANDLE win32Data, UINT win32Format)
{
if (SetClipboardData(win32Format, win32Data) == NULL) {
// free converted data if we couldn't put it on

View File

@ -22,7 +22,7 @@
#include "synergy/IClipboard.h"
class CMSWindowsClipboardFacade : public IMSWindowsClipboardFacade
class MSWindowsClipboardFacade : public IMSWindowsClipboardFacade
{
public:
virtual void write(HANDLE win32Data, UINT win32Format);

View File

@ -21,33 +21,33 @@
#include "base/String.h"
//
// CMSWindowsClipboardHTMLConverter
// MSWindowsClipboardHTMLConverter
//
CMSWindowsClipboardHTMLConverter::CMSWindowsClipboardHTMLConverter()
MSWindowsClipboardHTMLConverter::MSWindowsClipboardHTMLConverter()
{
m_format = RegisterClipboardFormat("HTML Format");
}
CMSWindowsClipboardHTMLConverter::~CMSWindowsClipboardHTMLConverter()
MSWindowsClipboardHTMLConverter::~MSWindowsClipboardHTMLConverter()
{
// do nothing
}
IClipboard::EFormat
CMSWindowsClipboardHTMLConverter::getFormat() const
MSWindowsClipboardHTMLConverter::getFormat() const
{
return IClipboard::kHTML;
}
UINT
CMSWindowsClipboardHTMLConverter::getWin32Format() const
MSWindowsClipboardHTMLConverter::getWin32Format() const
{
return m_format;
}
String
CMSWindowsClipboardHTMLConverter::doFromIClipboard(const String& data) const
MSWindowsClipboardHTMLConverter::doFromIClipboard(const String& data) const
{
// prepare to CF_HTML format prefix and suffix
String prefix("Version:0.9\r\nStartHTML:0000000105\r\n"
@ -76,7 +76,7 @@ CMSWindowsClipboardHTMLConverter::doFromIClipboard(const String& data) const
}
String
CMSWindowsClipboardHTMLConverter::doToIClipboard(const String& data) const
MSWindowsClipboardHTMLConverter::doToIClipboard(const String& data) const
{
// get fragment start/end args
String startArg = findArg(data, "StartFragment");
@ -97,7 +97,7 @@ CMSWindowsClipboardHTMLConverter::doToIClipboard(const String& data) const
}
String
CMSWindowsClipboardHTMLConverter::findArg(
MSWindowsClipboardHTMLConverter::findArg(
const String& data, const String& name) const
{
String::size_type i = data.find(name);

View File

@ -21,11 +21,11 @@
#include "platform/MSWindowsClipboardAnyTextConverter.h"
//! Convert to/from HTML encoding
class CMSWindowsClipboardHTMLConverter :
public CMSWindowsClipboardAnyTextConverter {
class MSWindowsClipboardHTMLConverter :
public MSWindowsClipboardAnyTextConverter {
public:
CMSWindowsClipboardHTMLConverter();
virtual ~CMSWindowsClipboardHTMLConverter();
MSWindowsClipboardHTMLConverter();
virtual ~MSWindowsClipboardHTMLConverter();
// IMSWindowsClipboardConverter overrides
virtual IClipboard::EFormat
@ -33,7 +33,7 @@ public:
virtual UINT getWin32Format() const;
protected:
// CMSWindowsClipboardAnyTextConverter overrides
// MSWindowsClipboardAnyTextConverter overrides
virtual String doFromIClipboard(const String&) const;
virtual String doToIClipboard(const String&) const;

View File

@ -21,34 +21,34 @@
#include "base/Unicode.h"
//
// CMSWindowsClipboardTextConverter
// MSWindowsClipboardTextConverter
//
CMSWindowsClipboardTextConverter::CMSWindowsClipboardTextConverter()
MSWindowsClipboardTextConverter::MSWindowsClipboardTextConverter()
{
// do nothing
}
CMSWindowsClipboardTextConverter::~CMSWindowsClipboardTextConverter()
MSWindowsClipboardTextConverter::~MSWindowsClipboardTextConverter()
{
// do nothing
}
UINT
CMSWindowsClipboardTextConverter::getWin32Format() const
MSWindowsClipboardTextConverter::getWin32Format() const
{
return CF_TEXT;
}
String
CMSWindowsClipboardTextConverter::doFromIClipboard(const String& data) const
MSWindowsClipboardTextConverter::doFromIClipboard(const String& data) const
{
// convert and add nul terminator
return Unicode::UTF8ToText(data) += '\0';
}
String
CMSWindowsClipboardTextConverter::doToIClipboard(const String& data) const
MSWindowsClipboardTextConverter::doToIClipboard(const String& data) const
{
// convert and truncate at first nul terminator
String dst = Unicode::textToUTF8(data);

View File

@ -21,17 +21,17 @@
#include "platform/MSWindowsClipboardAnyTextConverter.h"
//! Convert to/from locale text encoding
class CMSWindowsClipboardTextConverter :
public CMSWindowsClipboardAnyTextConverter {
class MSWindowsClipboardTextConverter :
public MSWindowsClipboardAnyTextConverter {
public:
CMSWindowsClipboardTextConverter();
virtual ~CMSWindowsClipboardTextConverter();
MSWindowsClipboardTextConverter();
virtual ~MSWindowsClipboardTextConverter();
// IMSWindowsClipboardConverter overrides
virtual UINT getWin32Format() const;
protected:
// CMSWindowsClipboardAnyTextConverter overrides
// MSWindowsClipboardAnyTextConverter overrides
virtual String doFromIClipboard(const String&) const;
virtual String doToIClipboard(const String&) const;
};

View File

@ -21,34 +21,34 @@
#include "base/Unicode.h"
//
// CMSWindowsClipboardUTF16Converter
// MSWindowsClipboardUTF16Converter
//
CMSWindowsClipboardUTF16Converter::CMSWindowsClipboardUTF16Converter()
MSWindowsClipboardUTF16Converter::MSWindowsClipboardUTF16Converter()
{
// do nothing
}
CMSWindowsClipboardUTF16Converter::~CMSWindowsClipboardUTF16Converter()
MSWindowsClipboardUTF16Converter::~MSWindowsClipboardUTF16Converter()
{
// do nothing
}
UINT
CMSWindowsClipboardUTF16Converter::getWin32Format() const
MSWindowsClipboardUTF16Converter::getWin32Format() const
{
return CF_UNICODETEXT;
}
String
CMSWindowsClipboardUTF16Converter::doFromIClipboard(const String& data) const
MSWindowsClipboardUTF16Converter::doFromIClipboard(const String& data) const
{
// convert and add nul terminator
return Unicode::UTF8ToUTF16(data).append(sizeof(wchar_t), 0);
}
String
CMSWindowsClipboardUTF16Converter::doToIClipboard(const String& data) const
MSWindowsClipboardUTF16Converter::doToIClipboard(const String& data) const
{
// convert and strip nul terminator
String dst = Unicode::UTF16ToUTF8(data);

View File

@ -21,17 +21,17 @@
#include "platform/MSWindowsClipboardAnyTextConverter.h"
//! Convert to/from UTF-16 encoding
class CMSWindowsClipboardUTF16Converter :
public CMSWindowsClipboardAnyTextConverter {
class MSWindowsClipboardUTF16Converter :
public MSWindowsClipboardAnyTextConverter {
public:
CMSWindowsClipboardUTF16Converter();
virtual ~CMSWindowsClipboardUTF16Converter();
MSWindowsClipboardUTF16Converter();
virtual ~MSWindowsClipboardUTF16Converter();
// IMSWindowsClipboardConverter overrides
virtual UINT getWin32Format() const;
protected:
// CMSWindowsClipboardAnyTextConverter overrides
// MSWindowsClipboardAnyTextConverter overrides
virtual String doFromIClipboard(const String&) const;
virtual String doToIClipboard(const String&) const;
};

View File

@ -22,37 +22,37 @@
#include <Windows.h>
#include <string>
CMSWindowsDebugOutputter::CMSWindowsDebugOutputter()
MSWindowsDebugOutputter::MSWindowsDebugOutputter()
{
}
CMSWindowsDebugOutputter::~CMSWindowsDebugOutputter()
MSWindowsDebugOutputter::~MSWindowsDebugOutputter()
{
}
void
CMSWindowsDebugOutputter::open(const char* title)
MSWindowsDebugOutputter::open(const char* title)
{
}
void
CMSWindowsDebugOutputter::close()
MSWindowsDebugOutputter::close()
{
}
void
CMSWindowsDebugOutputter::show(bool showIfEmpty)
MSWindowsDebugOutputter::show(bool showIfEmpty)
{
}
bool
CMSWindowsDebugOutputter::write(ELevel level, const char* msg)
MSWindowsDebugOutputter::write(ELevel level, const char* msg)
{
OutputDebugString((std::string(msg) + "\n").c_str());
return true;
}
void
CMSWindowsDebugOutputter::flush()
MSWindowsDebugOutputter::flush()
{
}

View File

@ -25,10 +25,10 @@
This outputter writes output to the debugger. In Visual Studio, this
can be seen in the Output window.
*/
class CMSWindowsDebugOutputter : public ILogOutputter {
class MSWindowsDebugOutputter : public ILogOutputter {
public:
CMSWindowsDebugOutputter();
virtual ~CMSWindowsDebugOutputter();
MSWindowsDebugOutputter();
virtual ~MSWindowsDebugOutputter();
// ILogOutputter overrides
virtual void open(const char* title);

View File

@ -89,10 +89,10 @@
#define SYNERGY_MSG_FAKE_INPUT SYNERGY_HOOK_LAST_MSG + 12
//
// CMSWindowsDesks
// MSWindowsDesks
//
CMSWindowsDesks::CMSWindowsDesks(
MSWindowsDesks::MSWindowsDesks(
bool isPrimary, bool noHooks, HINSTANCE hookLibrary,
const IScreenSaver* screensaver, IEventQueue* events,
IJob* updateKeys, bool stopOnDeskSwitch) :
@ -123,7 +123,7 @@ CMSWindowsDesks::CMSWindowsDesks(
resetOptions();
}
CMSWindowsDesks::~CMSWindowsDesks()
MSWindowsDesks::~MSWindowsDesks()
{
disable();
destroyClass(m_deskClass);
@ -132,7 +132,7 @@ CMSWindowsDesks::~CMSWindowsDesks()
}
void
CMSWindowsDesks::enable()
MSWindowsDesks::enable()
{
m_threadID = GetCurrentThreadId();
@ -145,14 +145,14 @@ CMSWindowsDesks::enable()
// change but as far as i can tell it doesn't.
m_timer = m_events->newTimer(0.2, NULL);
m_events->adoptHandler(Event::kTimer, m_timer,
new TMethodEventJob<CMSWindowsDesks>(
this, &CMSWindowsDesks::handleCheckDesk));
new TMethodEventJob<MSWindowsDesks>(
this, &MSWindowsDesks::handleCheckDesk));
updateKeys();
}
void
CMSWindowsDesks::disable()
MSWindowsDesks::disable()
{
// remove timer
if (m_timer != NULL) {
@ -168,25 +168,25 @@ CMSWindowsDesks::disable()
}
void
CMSWindowsDesks::enter()
MSWindowsDesks::enter()
{
sendMessage(SYNERGY_MSG_ENTER, 0, 0);
}
void
CMSWindowsDesks::leave(HKL keyLayout)
MSWindowsDesks::leave(HKL keyLayout)
{
sendMessage(SYNERGY_MSG_LEAVE, (WPARAM)keyLayout, 0);
}
void
CMSWindowsDesks::resetOptions()
MSWindowsDesks::resetOptions()
{
m_leaveForegroundOption = false;
}
void
CMSWindowsDesks::setOptions(const OptionsList& options)
MSWindowsDesks::setOptions(const OptionsList& options)
{
for (UInt32 i = 0, n = (UInt32)options.size(); i < n; i += 2) {
if (options[i] == kOptionWin32KeepForeground) {
@ -197,13 +197,13 @@ CMSWindowsDesks::setOptions(const OptionsList& options)
}
void
CMSWindowsDesks::updateKeys()
MSWindowsDesks::updateKeys()
{
sendMessage(SYNERGY_MSG_SYNC_KEYS, 0, 0);
}
void
CMSWindowsDesks::setShape(SInt32 x, SInt32 y,
MSWindowsDesks::setShape(SInt32 x, SInt32 y,
SInt32 width, SInt32 height,
SInt32 xCenter, SInt32 yCenter, bool isMultimon)
{
@ -217,7 +217,7 @@ CMSWindowsDesks::setShape(SInt32 x, SInt32 y,
}
void
CMSWindowsDesks::installScreensaverHooks(bool install)
MSWindowsDesks::installScreensaverHooks(bool install)
{
if (m_isPrimary && m_screensaverNotify != install) {
m_screensaverNotify = install;
@ -226,19 +226,19 @@ CMSWindowsDesks::installScreensaverHooks(bool install)
}
void
CMSWindowsDesks::fakeInputBegin()
MSWindowsDesks::fakeInputBegin()
{
sendMessage(SYNERGY_MSG_FAKE_INPUT, 1, 0);
}
void
CMSWindowsDesks::fakeInputEnd()
MSWindowsDesks::fakeInputEnd()
{
sendMessage(SYNERGY_MSG_FAKE_INPUT, 0, 0);
}
void
CMSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
MSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
{
POINT pos;
sendMessage(SYNERGY_MSG_CURSOR_POS, reinterpret_cast<WPARAM>(&pos), 0);
@ -247,7 +247,7 @@ CMSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
}
void
CMSWindowsDesks::fakeKeyEvent(
MSWindowsDesks::fakeKeyEvent(
KeyButton button, UINT virtualKey,
bool press, bool /*isAutoRepeat*/) const
{
@ -265,7 +265,7 @@ CMSWindowsDesks::fakeKeyEvent(
}
void
CMSWindowsDesks::fakeMouseButton(ButtonID button, bool press)
MSWindowsDesks::fakeMouseButton(ButtonID button, bool press)
{
// the system will swap the meaning of left/right for us if
// the user has configured a left-handed mouse but we don't
@ -318,7 +318,7 @@ CMSWindowsDesks::fakeMouseButton(ButtonID button, bool press)
}
void
CMSWindowsDesks::fakeMouseMove(SInt32 x, SInt32 y) const
MSWindowsDesks::fakeMouseMove(SInt32 x, SInt32 y) const
{
sendMessage(SYNERGY_MSG_FAKE_MOVE,
static_cast<WPARAM>(x),
@ -326,7 +326,7 @@ CMSWindowsDesks::fakeMouseMove(SInt32 x, SInt32 y) const
}
void
CMSWindowsDesks::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
MSWindowsDesks::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
{
sendMessage(SYNERGY_MSG_FAKE_REL_MOVE,
static_cast<WPARAM>(dx),
@ -334,13 +334,13 @@ CMSWindowsDesks::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
}
void
CMSWindowsDesks::fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const
MSWindowsDesks::fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const
{
sendMessage(SYNERGY_MSG_FAKE_WHEEL, xDelta, yDelta);
}
void
CMSWindowsDesks::sendMessage(UINT msg, WPARAM wParam, LPARAM lParam) const
MSWindowsDesks::sendMessage(UINT msg, WPARAM wParam, LPARAM lParam) const
{
if (m_activeDesk != NULL && m_activeDesk->m_window != NULL) {
PostThreadMessage(m_activeDesk->m_threadID, msg, wParam, lParam);
@ -349,7 +349,7 @@ CMSWindowsDesks::sendMessage(UINT msg, WPARAM wParam, LPARAM lParam) const
}
void
CMSWindowsDesks::queryHookLibrary(HINSTANCE hookLibrary)
MSWindowsDesks::queryHookLibrary(HINSTANCE hookLibrary)
{
// look up functions
if (m_isPrimary && !m_noHooks) {
@ -378,7 +378,7 @@ CMSWindowsDesks::queryHookLibrary(HINSTANCE hookLibrary)
}
HCURSOR
CMSWindowsDesks::createBlankCursor() const
MSWindowsDesks::createBlankCursor() const
{
// create a transparent cursor
int cw = GetSystemMetrics(SM_CXCURSOR);
@ -387,7 +387,7 @@ CMSWindowsDesks::createBlankCursor() const
UInt8* cursorXOR = new UInt8[ch * ((cw + 31) >> 2)];
memset(cursorAND, 0xff, ch * ((cw + 31) >> 2));
memset(cursorXOR, 0x00, ch * ((cw + 31) >> 2));
HCURSOR c = CreateCursor(CMSWindowsScreen::getWindowInstance(),
HCURSOR c = CreateCursor(MSWindowsScreen::getWindowInstance(),
0, 0, cw, ch, cursorAND, cursorXOR);
delete[] cursorXOR;
delete[] cursorAND;
@ -395,7 +395,7 @@ CMSWindowsDesks::createBlankCursor() const
}
void
CMSWindowsDesks::destroyCursor(HCURSOR cursor) const
MSWindowsDesks::destroyCursor(HCURSOR cursor) const
{
if (cursor != NULL) {
DestroyCursor(cursor);
@ -403,17 +403,17 @@ CMSWindowsDesks::destroyCursor(HCURSOR cursor) const
}
ATOM
CMSWindowsDesks::createDeskWindowClass(bool isPrimary) const
MSWindowsDesks::createDeskWindowClass(bool isPrimary) const
{
WNDCLASSEX classInfo;
classInfo.cbSize = sizeof(classInfo);
classInfo.style = CS_DBLCLKS | CS_NOCLOSE;
classInfo.lpfnWndProc = isPrimary ?
&CMSWindowsDesks::primaryDeskProc :
&CMSWindowsDesks::secondaryDeskProc;
&MSWindowsDesks::primaryDeskProc :
&MSWindowsDesks::secondaryDeskProc;
classInfo.cbClsExtra = 0;
classInfo.cbWndExtra = 0;
classInfo.hInstance = CMSWindowsScreen::getWindowInstance();
classInfo.hInstance = MSWindowsScreen::getWindowInstance();
classInfo.hIcon = NULL;
classInfo.hCursor = m_cursor;
classInfo.hbrBackground = NULL;
@ -424,16 +424,16 @@ CMSWindowsDesks::createDeskWindowClass(bool isPrimary) const
}
void
CMSWindowsDesks::destroyClass(ATOM windowClass) const
MSWindowsDesks::destroyClass(ATOM windowClass) const
{
if (windowClass != 0) {
UnregisterClass(reinterpret_cast<LPCTSTR>(windowClass),
CMSWindowsScreen::getWindowInstance());
MSWindowsScreen::getWindowInstance());
}
}
HWND
CMSWindowsDesks::createWindow(ATOM windowClass, const char* name) const
MSWindowsDesks::createWindow(ATOM windowClass, const char* name) const
{
HWND window = CreateWindowEx(WS_EX_TOPMOST |
WS_EX_TRANSPARENT |
@ -443,7 +443,7 @@ CMSWindowsDesks::createWindow(ATOM windowClass, const char* name) const
WS_POPUP,
0, 0, 1, 1,
NULL, NULL,
CMSWindowsScreen::getWindowInstance(),
MSWindowsScreen::getWindowInstance(),
NULL);
if (window == NULL) {
LOG((CLOG_ERR "failed to create window: %d", GetLastError()));
@ -453,7 +453,7 @@ CMSWindowsDesks::createWindow(ATOM windowClass, const char* name) const
}
void
CMSWindowsDesks::destroyWindow(HWND hwnd) const
MSWindowsDesks::destroyWindow(HWND hwnd) const
{
if (hwnd != NULL) {
DestroyWindow(hwnd);
@ -461,14 +461,14 @@ CMSWindowsDesks::destroyWindow(HWND hwnd) const
}
LRESULT CALLBACK
CMSWindowsDesks::primaryDeskProc(
MSWindowsDesks::primaryDeskProc(
HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
return DefWindowProc(hwnd, msg, wParam, lParam);
}
LRESULT CALLBACK
CMSWindowsDesks::secondaryDeskProc(
MSWindowsDesks::secondaryDeskProc(
HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// would like to detect any local user input and hide the hider
@ -493,7 +493,7 @@ CMSWindowsDesks::secondaryDeskProc(
}
void
CMSWindowsDesks::deskMouseMove(SInt32 x, SInt32 y) const
MSWindowsDesks::deskMouseMove(SInt32 x, SInt32 y) const
{
// when using absolute positioning with mouse_event(),
// the normalized device coordinates range over only
@ -507,7 +507,7 @@ CMSWindowsDesks::deskMouseMove(SInt32 x, SInt32 y) const
}
void
CMSWindowsDesks::deskMouseRelativeMove(SInt32 dx, SInt32 dy) const
MSWindowsDesks::deskMouseRelativeMove(SInt32 dx, SInt32 dy) const
{
// relative moves are subject to cursor acceleration which we don't
// want.so we disable acceleration, do the relative move, then
@ -543,7 +543,7 @@ CMSWindowsDesks::deskMouseRelativeMove(SInt32 dx, SInt32 dy) const
}
void
CMSWindowsDesks::deskEnter(Desk* desk)
MSWindowsDesks::deskEnter(Desk* desk)
{
if (!m_isPrimary) {
ReleaseCapture();
@ -571,7 +571,7 @@ CMSWindowsDesks::deskEnter(Desk* desk)
}
void
CMSWindowsDesks::deskLeave(Desk* desk, HKL keyLayout)
MSWindowsDesks::deskLeave(Desk* desk, HKL keyLayout)
{
ShowCursor(FALSE);
if (m_isPrimary) {
@ -652,7 +652,7 @@ CMSWindowsDesks::deskLeave(Desk* desk, HKL keyLayout)
}
void
CMSWindowsDesks::deskThread(void* vdesk)
MSWindowsDesks::deskThread(void* vdesk)
{
MSG msg;
@ -804,22 +804,22 @@ CMSWindowsDesks::deskThread(void* vdesk)
}
}
CMSWindowsDesks::Desk*
CMSWindowsDesks::addDesk(const String& name, HDESK hdesk)
MSWindowsDesks::Desk*
MSWindowsDesks::addDesk(const String& name, HDESK hdesk)
{
Desk* desk = new Desk;
desk->m_name = name;
desk->m_desk = hdesk;
desk->m_targetID = GetCurrentThreadId();
desk->m_thread = new Thread(new TMethodJob<CMSWindowsDesks>(
this, &CMSWindowsDesks::deskThread, desk));
desk->m_thread = new Thread(new TMethodJob<MSWindowsDesks>(
this, &MSWindowsDesks::deskThread, desk));
waitForDesk();
m_desks.insert(std::make_pair(name, desk));
return desk;
}
void
CMSWindowsDesks::removeDesks()
MSWindowsDesks::removeDesks()
{
for (Desks::iterator index = m_desks.begin();
index != m_desks.end(); ++index) {
@ -835,7 +835,7 @@ CMSWindowsDesks::removeDesks()
}
void
CMSWindowsDesks::checkDesk()
MSWindowsDesks::checkDesk()
{
// get current desktop. if we already know about it then return.
Desk* desk;
@ -911,15 +911,15 @@ CMSWindowsDesks::checkDesk()
}
bool
CMSWindowsDesks::isDeskAccessible(const Desk* desk) const
MSWindowsDesks::isDeskAccessible(const Desk* desk) const
{
return (desk != NULL && desk->m_desk != NULL);
}
void
CMSWindowsDesks::waitForDesk() const
MSWindowsDesks::waitForDesk() const
{
CMSWindowsDesks* self = const_cast<CMSWindowsDesks*>(this);
MSWindowsDesks* self = const_cast<MSWindowsDesks*>(this);
Lock lock(&m_mutex);
while (!(bool)m_deskReady) {
@ -929,7 +929,7 @@ CMSWindowsDesks::waitForDesk() const
}
void
CMSWindowsDesks::handleCheckDesk(const Event&, void*)
MSWindowsDesks::handleCheckDesk(const Event&, void*)
{
checkDesk();
@ -943,7 +943,7 @@ CMSWindowsDesks::handleCheckDesk(const Event&, void*)
}
HDESK
CMSWindowsDesks::openInputDesktop()
MSWindowsDesks::openInputDesktop()
{
return OpenInputDesktop(
DF_ALLOWOTHERACCOUNTHOOK, TRUE,
@ -951,7 +951,7 @@ CMSWindowsDesks::openInputDesktop()
}
void
CMSWindowsDesks::closeDesktop(HDESK desk)
MSWindowsDesks::closeDesktop(HDESK desk)
{
if (desk != NULL) {
CloseDesktop(desk);
@ -959,7 +959,7 @@ CMSWindowsDesks::closeDesktop(HDESK desk)
}
String
CMSWindowsDesks::getDesktopName(HDESK desk)
MSWindowsDesks::getDesktopName(HDESK desk)
{
if (desk == NULL) {
return String();
@ -975,7 +975,7 @@ CMSWindowsDesks::getDesktopName(HDESK desk)
}
HWND
CMSWindowsDesks::getForegroundWindow() const
MSWindowsDesks::getForegroundWindow() const
{
// Ideally we'd return NULL as much as possible, only returning
// the actual foreground window when we know it's going to mess

View File

@ -53,7 +53,7 @@ synergy should work on those too.
This class encapsulates all the desk nastiness. Clients of this
object don't have to know anything about desks.
*/
class CMSWindowsDesks {
class MSWindowsDesks {
public:
//! Constructor
/*!
@ -64,11 +64,11 @@ public:
updated in a thread attached to the current desk.
\p hookLibrary must be a handle to the hook library.
*/
CMSWindowsDesks(
MSWindowsDesks(
bool isPrimary, bool noHooks, HINSTANCE hookLibrary,
const IScreenSaver* screensaver, IEventQueue* events,
IJob* updateKeys, bool stopOnDeskSwitch);
~CMSWindowsDesks();
~MSWindowsDesks();
//! @name manipulators
//@{

View File

@ -25,28 +25,28 @@
void getDropData(IDataObject *pDataObject);
CMSWindowsDropTarget* CMSWindowsDropTarget::s_instance = NULL;
MSWindowsDropTarget* MSWindowsDropTarget::s_instance = NULL;
CMSWindowsDropTarget::CMSWindowsDropTarget() :
MSWindowsDropTarget::MSWindowsDropTarget() :
m_refCount(1),
m_allowDrop(false)
{
s_instance = this;
}
CMSWindowsDropTarget::~CMSWindowsDropTarget()
MSWindowsDropTarget::~MSWindowsDropTarget()
{
}
CMSWindowsDropTarget&
CMSWindowsDropTarget::instance()
MSWindowsDropTarget&
MSWindowsDropTarget::instance()
{
assert(s_instance != NULL);
return *s_instance;
}
HRESULT
CMSWindowsDropTarget::DragEnter(IDataObject* dataObject, DWORD keyState, POINTL point, DWORD* effect)
MSWindowsDropTarget::DragEnter(IDataObject* dataObject, DWORD keyState, POINTL point, DWORD* effect)
{
// check if data object contain drop
m_allowDrop = queryDataObject(dataObject);
@ -60,7 +60,7 @@ CMSWindowsDropTarget::DragEnter(IDataObject* dataObject, DWORD keyState, POINTL
}
HRESULT
CMSWindowsDropTarget::DragOver(DWORD keyState, POINTL point, DWORD* effect)
MSWindowsDropTarget::DragOver(DWORD keyState, POINTL point, DWORD* effect)
{
*effect = DROPEFFECT_NONE;
@ -68,13 +68,13 @@ CMSWindowsDropTarget::DragOver(DWORD keyState, POINTL point, DWORD* effect)
}
HRESULT
CMSWindowsDropTarget::DragLeave(void)
MSWindowsDropTarget::DragLeave(void)
{
return S_OK;
}
HRESULT
CMSWindowsDropTarget::Drop(IDataObject* dataObject, DWORD keyState, POINTL point, DWORD* effect)
MSWindowsDropTarget::Drop(IDataObject* dataObject, DWORD keyState, POINTL point, DWORD* effect)
{
*effect = DROPEFFECT_NONE;
@ -82,7 +82,7 @@ CMSWindowsDropTarget::Drop(IDataObject* dataObject, DWORD keyState, POINTL point
}
bool
CMSWindowsDropTarget::queryDataObject(IDataObject* dataObject)
MSWindowsDropTarget::queryDataObject(IDataObject* dataObject)
{
// check if it supports CF_HDROP using a HGLOBAL
FORMATETC fmtetc = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
@ -91,19 +91,19 @@ CMSWindowsDropTarget::queryDataObject(IDataObject* dataObject)
}
void
CMSWindowsDropTarget::setDraggingFilename(char* const filename)
MSWindowsDropTarget::setDraggingFilename(char* const filename)
{
m_dragFilename = filename;
}
std::string
CMSWindowsDropTarget::getDraggingFilename()
MSWindowsDropTarget::getDraggingFilename()
{
return m_dragFilename;
}
void
CMSWindowsDropTarget::clearDraggingFilename()
MSWindowsDropTarget::clearDraggingFilename()
{
m_dragFilename.clear();
}
@ -131,7 +131,7 @@ getDropData(IDataObject* dataObject)
filename[wcslen(wcData)] = '\0';
wcstombs(filename, wcData, wcslen(wcData));
CMSWindowsDropTarget::instance().setDraggingFilename(filename);
MSWindowsDropTarget::instance().setDraggingFilename(filename);
GlobalUnlock(stgMed.hGlobal);
@ -144,7 +144,7 @@ getDropData(IDataObject* dataObject)
}
HRESULT __stdcall
CMSWindowsDropTarget::QueryInterface (REFIID iid, void ** object)
MSWindowsDropTarget::QueryInterface (REFIID iid, void ** object)
{
if (iid == IID_IDropTarget || iid == IID_IUnknown) {
AddRef();
@ -158,13 +158,13 @@ CMSWindowsDropTarget::QueryInterface (REFIID iid, void ** object)
}
ULONG __stdcall
CMSWindowsDropTarget::AddRef(void)
MSWindowsDropTarget::AddRef(void)
{
return InterlockedIncrement(&m_refCount);
}
ULONG __stdcall
CMSWindowsDropTarget::Release(void)
MSWindowsDropTarget::Release(void)
{
LONG count = InterlockedDecrement(&m_refCount);

View File

@ -22,12 +22,12 @@
#include <Windows.h>
#include <oleidl.h>
class CMSWindowsScreen;
class MSWindowsScreen;
class CMSWindowsDropTarget : public IDropTarget {
class MSWindowsDropTarget : public IDropTarget {
public:
CMSWindowsDropTarget();
~CMSWindowsDropTarget();
MSWindowsDropTarget();
~MSWindowsDropTarget();
// IUnknown implementation
HRESULT __stdcall QueryInterface(REFIID iid, void** object);
@ -44,7 +44,7 @@ public:
std::string getDraggingFilename();
void clearDraggingFilename();
static CMSWindowsDropTarget&
static MSWindowsDropTarget&
instance();
private:
@ -54,6 +54,6 @@ private:
bool m_allowDrop;
std::string m_dragFilename;
static CMSWindowsDropTarget*
static MSWindowsDropTarget*
s_instance;
};

View File

@ -30,10 +30,10 @@ class EventQueueTimer { };
//
// CMSWindowsEventQueueBuffer
// MSWindowsEventQueueBuffer
//
CMSWindowsEventQueueBuffer::CMSWindowsEventQueueBuffer(IEventQueue* events) :
MSWindowsEventQueueBuffer::MSWindowsEventQueueBuffer(IEventQueue* events) :
m_events(events)
{
// remember thread. we'll be posting messages to it.
@ -50,13 +50,13 @@ CMSWindowsEventQueueBuffer::CMSWindowsEventQueueBuffer(IEventQueue* events) :
PeekMessage(&dummy, NULL, WM_USER, WM_USER, PM_NOREMOVE);
}
CMSWindowsEventQueueBuffer::~CMSWindowsEventQueueBuffer()
MSWindowsEventQueueBuffer::~MSWindowsEventQueueBuffer()
{
// do nothing
}
void
CMSWindowsEventQueueBuffer::waitForEvent(double timeout)
MSWindowsEventQueueBuffer::waitForEvent(double timeout)
{
// check if messages are available first. if we don't do this then
// MsgWaitForMultipleObjects() will block even if the queue isn't
@ -83,7 +83,7 @@ CMSWindowsEventQueueBuffer::waitForEvent(double timeout)
}
IEventQueueBuffer::Type
CMSWindowsEventQueueBuffer::getEvent(Event& event, UInt32& dataID)
MSWindowsEventQueueBuffer::getEvent(Event& event, UInt32& dataID)
{
// peek at messages first. waiting for QS_ALLINPUT will return
// if a message has been sent to our window but GetMessage will
@ -119,26 +119,26 @@ CMSWindowsEventQueueBuffer::getEvent(Event& event, UInt32& dataID)
}
bool
CMSWindowsEventQueueBuffer::addEvent(UInt32 dataID)
MSWindowsEventQueueBuffer::addEvent(UInt32 dataID)
{
return (PostThreadMessage(m_thread, m_userEvent,
static_cast<WPARAM>(dataID), 0) != 0);
}
bool
CMSWindowsEventQueueBuffer::isEmpty() const
MSWindowsEventQueueBuffer::isEmpty() const
{
return (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0);
}
EventQueueTimer*
CMSWindowsEventQueueBuffer::newTimer(double, bool) const
MSWindowsEventQueueBuffer::newTimer(double, bool) const
{
return new EventQueueTimer;
}
void
CMSWindowsEventQueueBuffer::deleteTimer(EventQueueTimer* timer) const
MSWindowsEventQueueBuffer::deleteTimer(EventQueueTimer* timer) const
{
delete timer;
}

View File

@ -26,10 +26,10 @@
class IEventQueue;
//! Event queue buffer for Win32
class CMSWindowsEventQueueBuffer : public IEventQueueBuffer {
class MSWindowsEventQueueBuffer : public IEventQueueBuffer {
public:
CMSWindowsEventQueueBuffer(IEventQueue* events);
virtual ~CMSWindowsEventQueueBuffer();
MSWindowsEventQueueBuffer(IEventQueue* events);
virtual ~MSWindowsEventQueueBuffer();
// IEventQueueBuffer overrides
virtual void init() { }

View File

@ -23,7 +23,7 @@
static const char* g_name = "synwinhk";
CMSWindowsHook::CMSWindowsHook() :
MSWindowsHook::MSWindowsHook() :
m_initFunc(NULL),
m_cleanupFunc(NULL),
m_setSidesFunc(NULL),
@ -33,7 +33,7 @@ CMSWindowsHook::CMSWindowsHook() :
{
}
CMSWindowsHook::~CMSWindowsHook()
MSWindowsHook::~MSWindowsHook()
{
cleanup();
@ -43,7 +43,7 @@ CMSWindowsHook::~CMSWindowsHook()
}
void
CMSWindowsHook::loadLibrary()
MSWindowsHook::loadLibrary()
{
// load library
m_instance = LoadLibrary(g_name);
@ -77,13 +77,13 @@ CMSWindowsHook::loadLibrary()
}
HINSTANCE
CMSWindowsHook::getInstance() const
MSWindowsHook::getInstance() const
{
return m_instance;
}
int
CMSWindowsHook::init(DWORD threadID)
MSWindowsHook::init(DWORD threadID)
{
if (m_initFunc == NULL) {
return NULL;
@ -92,7 +92,7 @@ CMSWindowsHook::init(DWORD threadID)
}
int
CMSWindowsHook::cleanup()
MSWindowsHook::cleanup()
{
if (m_cleanupFunc == NULL) {
return NULL;
@ -101,7 +101,7 @@ CMSWindowsHook::cleanup()
}
void
CMSWindowsHook::setSides(UInt32 sides)
MSWindowsHook::setSides(UInt32 sides)
{
if (m_setSidesFunc == NULL) {
return;
@ -110,7 +110,7 @@ CMSWindowsHook::setSides(UInt32 sides)
}
void
CMSWindowsHook::setZone(SInt32 x, SInt32 y, SInt32 w, SInt32 h, SInt32 jumpZoneSize)
MSWindowsHook::setZone(SInt32 x, SInt32 y, SInt32 w, SInt32 h, SInt32 jumpZoneSize)
{
if (m_setZoneFunc == NULL) {
return;
@ -119,7 +119,7 @@ CMSWindowsHook::setZone(SInt32 x, SInt32 y, SInt32 w, SInt32 h, SInt32 jumpZoneS
}
void
CMSWindowsHook::setMode(EHookMode mode)
MSWindowsHook::setMode(EHookMode mode)
{
if (m_setModeFunc == NULL) {
return;

View File

@ -24,11 +24,11 @@
#include <Windows.h>
//! Loads and provides functions for the Windows hook
class CMSWindowsHook
class MSWindowsHook
{
public:
CMSWindowsHook();
virtual ~CMSWindowsHook();
MSWindowsHook();
virtual ~MSWindowsHook();
void loadLibrary();
HINSTANCE getInstance() const;

View File

@ -34,11 +34,11 @@
#endif
//
// CMSWindowsKeyState
// MSWindowsKeyState
//
// map virtual keys to synergy key enumeration
const KeyID CMSWindowsKeyState::s_virtualKey[] =
const KeyID MSWindowsKeyState::s_virtualKey[] =
{
/* 0x000 */ { kKeyNone }, // reserved
/* 0x001 */ { kKeyNone }, // VK_LBUTTON
@ -576,8 +576,8 @@ static const Win32Modifiers s_modifiers[] =
{ VK_RWIN, KeyModifierSuper }
};
CMSWindowsKeyState::CMSWindowsKeyState(
CMSWindowsDesks* desks, void* eventTarget, IEventQueue* events) :
MSWindowsKeyState::MSWindowsKeyState(
MSWindowsDesks* desks, void* eventTarget, IEventQueue* events) :
KeyState(events),
m_eventTarget(eventTarget),
m_desks(desks),
@ -592,8 +592,8 @@ CMSWindowsKeyState::CMSWindowsKeyState(
init();
}
CMSWindowsKeyState::CMSWindowsKeyState(
CMSWindowsDesks* desks, void* eventTarget, IEventQueue* events, synergy::KeyMap& keyMap) :
MSWindowsKeyState::MSWindowsKeyState(
MSWindowsDesks* desks, void* eventTarget, IEventQueue* events, synergy::KeyMap& keyMap) :
KeyState(events, keyMap),
m_eventTarget(eventTarget),
m_desks(desks),
@ -608,13 +608,13 @@ CMSWindowsKeyState::CMSWindowsKeyState(
init();
}
CMSWindowsKeyState::~CMSWindowsKeyState()
MSWindowsKeyState::~MSWindowsKeyState()
{
disable();
}
void
CMSWindowsKeyState::init()
MSWindowsKeyState::init()
{
// look up symbol that's available on winNT family but not win95
HMODULE userModule = GetModuleHandle("user32.dll");
@ -622,7 +622,7 @@ CMSWindowsKeyState::init()
}
void
CMSWindowsKeyState::disable()
MSWindowsKeyState::disable()
{
if (m_fixTimer != NULL) {
m_events->removeHandler(Event::kTimer, m_fixTimer);
@ -633,19 +633,19 @@ CMSWindowsKeyState::disable()
}
KeyButton
CMSWindowsKeyState::virtualKeyToButton(UINT virtualKey) const
MSWindowsKeyState::virtualKeyToButton(UINT virtualKey) const
{
return m_virtualKeyToButton[virtualKey & 0xffu];
}
void
CMSWindowsKeyState::setKeyLayout(HKL keyLayout)
MSWindowsKeyState::setKeyLayout(HKL keyLayout)
{
m_keyLayout = keyLayout;
}
bool
CMSWindowsKeyState::testAutoRepeat(bool press, bool isRepeat, KeyButton button)
MSWindowsKeyState::testAutoRepeat(bool press, bool isRepeat, KeyButton button)
{
if (!isRepeat) {
isRepeat = (press && m_lastDown != 0 && button == m_lastDown);
@ -660,14 +660,14 @@ CMSWindowsKeyState::testAutoRepeat(bool press, bool isRepeat, KeyButton button)
}
void
CMSWindowsKeyState::saveModifiers()
MSWindowsKeyState::saveModifiers()
{
m_savedModifiers = getActiveModifiers();
m_originalSavedModifiers = m_savedModifiers;
}
void
CMSWindowsKeyState::useSavedModifiers(bool enable)
MSWindowsKeyState::useSavedModifiers(bool enable)
{
if (enable != m_useSavedModifiers) {
m_useSavedModifiers = enable;
@ -681,7 +681,7 @@ CMSWindowsKeyState::useSavedModifiers(bool enable)
}
KeyID
CMSWindowsKeyState::mapKeyFromEvent(WPARAM charAndVirtKey,
MSWindowsKeyState::mapKeyFromEvent(WPARAM charAndVirtKey,
LPARAM info, KeyModifierMask* maskOut) const
{
static const KeyModifierMask s_controlAlt =
@ -735,14 +735,14 @@ CMSWindowsKeyState::mapKeyFromEvent(WPARAM charAndVirtKey,
}
bool
CMSWindowsKeyState::didGroupsChange() const
MSWindowsKeyState::didGroupsChange() const
{
GroupList groups;
return (getGroups(groups) && groups != m_groups);
}
UINT
CMSWindowsKeyState::mapKeyToVirtualKey(KeyID key) const
MSWindowsKeyState::mapKeyToVirtualKey(KeyID key) const
{
if (key == kKeyNone) {
return 0;
@ -757,13 +757,13 @@ CMSWindowsKeyState::mapKeyToVirtualKey(KeyID key) const
}
void
CMSWindowsKeyState::onKey(KeyButton button, bool down, KeyModifierMask newState)
MSWindowsKeyState::onKey(KeyButton button, bool down, KeyModifierMask newState)
{
KeyState::onKey(button, down, newState);
}
void
CMSWindowsKeyState::sendKeyEvent(void* target,
MSWindowsKeyState::sendKeyEvent(void* target,
bool press, bool isAutoRepeat,
KeyID key, KeyModifierMask mask,
SInt32 count, KeyButton button)
@ -789,21 +789,21 @@ CMSWindowsKeyState::sendKeyEvent(void* target,
}
void
CMSWindowsKeyState::fakeKeyDown(KeyID id, KeyModifierMask mask,
MSWindowsKeyState::fakeKeyDown(KeyID id, KeyModifierMask mask,
KeyButton button)
{
KeyState::fakeKeyDown(id, mask, button);
}
bool
CMSWindowsKeyState::fakeKeyRepeat(KeyID id, KeyModifierMask mask,
MSWindowsKeyState::fakeKeyRepeat(KeyID id, KeyModifierMask mask,
SInt32 count, KeyButton button)
{
return KeyState::fakeKeyRepeat(id, mask, count, button);
}
bool
CMSWindowsKeyState::fakeCtrlAltDel()
MSWindowsKeyState::fakeCtrlAltDel()
{
// to fake ctrl+alt+del on the NT family we broadcast a suitable
// hotkey to all windows on the winlogon desktop. however, the
@ -817,7 +817,7 @@ CMSWindowsKeyState::fakeCtrlAltDel()
CloseHandle( hEvtSendSas );
}
else {
Thread cad(new FunctionJob(&CMSWindowsKeyState::ctrlAltDelThread));
Thread cad(new FunctionJob(&MSWindowsKeyState::ctrlAltDelThread));
cad.wait();
}
@ -825,7 +825,7 @@ CMSWindowsKeyState::fakeCtrlAltDel()
}
void
CMSWindowsKeyState::ctrlAltDelThread(void*)
MSWindowsKeyState::ctrlAltDelThread(void*)
{
// get the Winlogon desktop at whatever privilege we can
HDESK desk = OpenDesktop("Winlogon", 0, FALSE, MAXIMUM_ALLOWED);
@ -845,7 +845,7 @@ CMSWindowsKeyState::ctrlAltDelThread(void*)
}
KeyModifierMask
CMSWindowsKeyState::pollActiveModifiers() const
MSWindowsKeyState::pollActiveModifiers() const
{
KeyModifierMask state = 0;
@ -872,7 +872,7 @@ CMSWindowsKeyState::pollActiveModifiers() const
}
SInt32
CMSWindowsKeyState::pollActiveGroup() const
MSWindowsKeyState::pollActiveGroup() const
{
// determine the thread that'll receive this event
HWND targetWindow = GetForegroundWindow();
@ -900,7 +900,7 @@ CMSWindowsKeyState::pollActiveGroup() const
}
void
CMSWindowsKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const
MSWindowsKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const
{
BYTE keyState[256];
if (!GetKeyboardState(keyState)) {
@ -918,7 +918,7 @@ CMSWindowsKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const
}
void
CMSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
MSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
{
// update keyboard groups
if (getGroups(m_groups)) {
@ -1230,7 +1230,7 @@ CMSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
}
void
CMSWindowsKeyState::fakeKey(const Keystroke& keystroke)
MSWindowsKeyState::fakeKey(const Keystroke& keystroke)
{
switch (keystroke.m_type) {
case Keystroke::kButton: {
@ -1286,7 +1286,7 @@ CMSWindowsKeyState::fakeKey(const Keystroke& keystroke)
}
KeyModifierMask&
CMSWindowsKeyState::getActiveModifiersRValue()
MSWindowsKeyState::getActiveModifiersRValue()
{
if (m_useSavedModifiers) {
return m_savedModifiers;
@ -1297,7 +1297,7 @@ CMSWindowsKeyState::getActiveModifiersRValue()
}
bool
CMSWindowsKeyState::getGroups(GroupList& groups) const
MSWindowsKeyState::getGroups(GroupList& groups) const
{
// get keyboard layouts
UInt32 newNumLayouts = GetKeyboardLayoutList(0, NULL);
@ -1320,7 +1320,7 @@ CMSWindowsKeyState::getGroups(GroupList& groups) const
}
void
CMSWindowsKeyState::setWindowGroup(SInt32 group)
MSWindowsKeyState::setWindowGroup(SInt32 group)
{
HWND targetWindow = GetForegroundWindow();
@ -1339,7 +1339,7 @@ CMSWindowsKeyState::setWindowGroup(SInt32 group)
}
KeyID
CMSWindowsKeyState::getKeyID(UINT virtualKey, KeyButton button)
MSWindowsKeyState::getKeyID(UINT virtualKey, KeyButton button)
{
if ((button & 0x100u) != 0) {
virtualKey += 0x100u;
@ -1348,13 +1348,13 @@ CMSWindowsKeyState::getKeyID(UINT virtualKey, KeyButton button)
}
UINT
CMSWindowsKeyState::mapButtonToVirtualKey(KeyButton button) const
MSWindowsKeyState::mapButtonToVirtualKey(KeyButton button) const
{
return m_buttonToVK[button];
}
KeyID
CMSWindowsKeyState::getIDForKey(synergy::KeyMap::KeyItem& item,
MSWindowsKeyState::getIDForKey(synergy::KeyMap::KeyItem& item,
KeyButton button, UINT virtualKey,
PBYTE keyState, HKL hkl) const
{
@ -1385,7 +1385,7 @@ CMSWindowsKeyState::getIDForKey(synergy::KeyMap::KeyItem& item,
}
void
CMSWindowsKeyState::addKeyEntry(synergy::KeyMap& keyMap, synergy::KeyMap::KeyItem& item)
MSWindowsKeyState::addKeyEntry(synergy::KeyMap& keyMap, synergy::KeyMap::KeyItem& item)
{
keyMap.addKeyEntry(item);
if (item.m_group == 0) {

View File

@ -27,18 +27,18 @@
class Event;
class EventQueueTimer;
class CMSWindowsDesks;
class MSWindowsDesks;
class IEventQueue;
//! Microsoft Windows key mapper
/*!
This class maps KeyIDs to keystrokes.
*/
class CMSWindowsKeyState : public KeyState {
class MSWindowsKeyState : public KeyState {
public:
CMSWindowsKeyState(CMSWindowsDesks* desks, void* eventTarget, IEventQueue* events);
CMSWindowsKeyState(CMSWindowsDesks* desks, void* eventTarget, IEventQueue* events, synergy::KeyMap& keyMap);
virtual ~CMSWindowsKeyState();
MSWindowsKeyState(MSWindowsDesks* desks, void* eventTarget, IEventQueue* events);
MSWindowsKeyState(MSWindowsDesks* desks, void* eventTarget, IEventQueue* events, synergy::KeyMap& keyMap);
virtual ~MSWindowsKeyState();
//! @name manipulators
//@{
@ -185,15 +185,15 @@ private:
private:
// not implemented
CMSWindowsKeyState(const CMSWindowsKeyState&);
CMSWindowsKeyState& operator=(const CMSWindowsKeyState&);
MSWindowsKeyState(const MSWindowsKeyState&);
MSWindowsKeyState& operator=(const MSWindowsKeyState&);
private:
typedef std::map<HKL, SInt32> GroupMap;
typedef std::map<KeyID, UINT> KeyToVKMap;
void* m_eventTarget;
CMSWindowsDesks* m_desks;
MSWindowsDesks* m_desks;
HKL m_keyLayout;
UINT m_buttonToVK[512];
UINT m_buttonToNumpadVK[512];

View File

@ -84,13 +84,13 @@
#endif
//
// CMSWindowsScreen
// MSWindowsScreen
//
HINSTANCE CMSWindowsScreen::s_windowInstance = NULL;
CMSWindowsScreen* CMSWindowsScreen::s_screen = NULL;
HINSTANCE MSWindowsScreen::s_windowInstance = NULL;
MSWindowsScreen* MSWindowsScreen::s_screen = NULL;
CMSWindowsScreen::CMSWindowsScreen(
MSWindowsScreen::MSWindowsScreen(
bool isPrimary,
bool noHooks,
bool stopOnDeskSwitch,
@ -133,17 +133,17 @@ CMSWindowsScreen::CMSWindowsScreen(
m_hook.loadLibrary();
}
m_screensaver = new CMSWindowsScreenSaver();
m_desks = new CMSWindowsDesks(
m_screensaver = new MSWindowsScreenSaver();
m_desks = new MSWindowsDesks(
m_isPrimary,
m_noHooks,
m_hook.getInstance(),
m_screensaver,
m_events,
new TMethodJob<CMSWindowsScreen>(
this, &CMSWindowsScreen::updateKeysCB),
new TMethodJob<MSWindowsScreen>(
this, &MSWindowsScreen::updateKeysCB),
stopOnDeskSwitch);
m_keyState = new CMSWindowsKeyState(m_desks, getEventTarget(), m_events);
m_keyState = new MSWindowsKeyState(m_desks, getEventTarget(), m_events);
updateScreenShape();
m_class = createWindowClass();
m_window = createWindow(m_class, "Synergy");
@ -163,7 +163,7 @@ CMSWindowsScreen::CMSWindowsScreen(
OleInitialize(0);
m_dropWindow = createDropWindow(m_class, "DropWindow");
m_dropTarget = new CMSWindowsDropTarget();
m_dropTarget = new MSWindowsDropTarget();
RegisterDragDrop(m_dropWindow, m_dropTarget);
}
catch (...) {
@ -178,14 +178,14 @@ CMSWindowsScreen::CMSWindowsScreen(
// install event handlers
m_events->adoptHandler(Event::kSystem, m_events->getSystemTarget(),
new TMethodEventJob<CMSWindowsScreen>(this,
&CMSWindowsScreen::handleSystemEvent));
new TMethodEventJob<MSWindowsScreen>(this,
&MSWindowsScreen::handleSystemEvent));
// install the platform event queue
m_events->adoptBuffer(new CMSWindowsEventQueueBuffer(m_events));
m_events->adoptBuffer(new MSWindowsEventQueueBuffer(m_events));
}
CMSWindowsScreen::~CMSWindowsScreen()
MSWindowsScreen::~MSWindowsScreen()
{
assert(s_screen != NULL);
@ -207,7 +207,7 @@ CMSWindowsScreen::~CMSWindowsScreen()
}
void
CMSWindowsScreen::init(HINSTANCE windowInstance)
MSWindowsScreen::init(HINSTANCE windowInstance)
{
assert(s_windowInstance == NULL);
assert(windowInstance != NULL);
@ -216,21 +216,21 @@ CMSWindowsScreen::init(HINSTANCE windowInstance)
}
HINSTANCE
CMSWindowsScreen::getWindowInstance()
MSWindowsScreen::getWindowInstance()
{
return s_windowInstance;
}
void
CMSWindowsScreen::enable()
MSWindowsScreen::enable()
{
assert(m_isOnScreen == m_isPrimary);
// we need to poll some things to fix them
m_fixTimer = m_events->newTimer(1.0, NULL);
m_events->adoptHandler(Event::kTimer, m_fixTimer,
new TMethodEventJob<CMSWindowsScreen>(this,
&CMSWindowsScreen::handleFixes));
new TMethodEventJob<MSWindowsScreen>(this,
&MSWindowsScreen::handleFixes));
// install our clipboard snooper
m_nextClipboardWindow = SetClipboardViewer(m_window);
@ -254,7 +254,7 @@ CMSWindowsScreen::enable()
}
void
CMSWindowsScreen::disable()
MSWindowsScreen::disable()
{
// stop tracking the active desk
m_desks->disable();
@ -291,7 +291,7 @@ CMSWindowsScreen::disable()
}
void
CMSWindowsScreen::enter()
MSWindowsScreen::enter()
{
m_desks->enter();
if (m_isPrimary) {
@ -324,7 +324,7 @@ CMSWindowsScreen::enter()
}
bool
CMSWindowsScreen::leave()
MSWindowsScreen::leave()
{
// get keyboard layout of foreground window. we'll use this
// keyboard layout for translating keys sent to clients.
@ -371,16 +371,16 @@ CMSWindowsScreen::leave()
if (isDraggingStarted() && !m_isPrimary) {
m_sendDragThread = new Thread(
new TMethodJob<CMSWindowsScreen>(
new TMethodJob<MSWindowsScreen>(
this,
&CMSWindowsScreen::sendDragThread));
&MSWindowsScreen::sendDragThread));
}
return true;
}
void
CMSWindowsScreen::sendDragThread(void*)
MSWindowsScreen::sendDragThread(void*)
{
String& draggingFilename = getDraggingFilename();
size_t size = draggingFilename.size();
@ -399,9 +399,9 @@ CMSWindowsScreen::sendDragThread(void*)
}
bool
CMSWindowsScreen::setClipboard(ClipboardID, const IClipboard* src)
MSWindowsScreen::setClipboard(ClipboardID, const IClipboard* src)
{
CMSWindowsClipboard dst(m_window);
MSWindowsClipboard dst(m_window);
if (src != NULL) {
// save clipboard data
return Clipboard::copy(&dst, src);
@ -418,7 +418,7 @@ CMSWindowsScreen::setClipboard(ClipboardID, const IClipboard* src)
}
void
CMSWindowsScreen::checkClipboards()
MSWindowsScreen::checkClipboards()
{
// if we think we own the clipboard but we don't then somebody
// grabbed the clipboard on this screen without us knowing.
@ -431,7 +431,7 @@ CMSWindowsScreen::checkClipboards()
// next reboot we do this double check. clipboard ownership
// won't be reflected on other screens until we leave but at
// least the clipboard itself will work.
if (m_ownClipboard && !CMSWindowsClipboard::isOwnedBySynergy()) {
if (m_ownClipboard && !MSWindowsClipboard::isOwnedBySynergy()) {
LOG((CLOG_DEBUG "clipboard changed: lost ownership and no notification received"));
m_ownClipboard = false;
sendClipboardEvent(m_events->forIScreen().clipboardGrabbed(), kClipboardClipboard);
@ -440,7 +440,7 @@ CMSWindowsScreen::checkClipboards()
}
void
CMSWindowsScreen::openScreensaver(bool notify)
MSWindowsScreen::openScreensaver(bool notify)
{
assert(m_screensaver != NULL);
@ -454,7 +454,7 @@ CMSWindowsScreen::openScreensaver(bool notify)
}
void
CMSWindowsScreen::closeScreensaver()
MSWindowsScreen::closeScreensaver()
{
if (m_screensaver != NULL) {
if (m_screensaverNotify) {
@ -468,7 +468,7 @@ CMSWindowsScreen::closeScreensaver()
}
void
CMSWindowsScreen::screensaver(bool activate)
MSWindowsScreen::screensaver(bool activate)
{
assert(m_screensaver != NULL);
if (m_screensaver==NULL) return;
@ -482,45 +482,45 @@ CMSWindowsScreen::screensaver(bool activate)
}
void
CMSWindowsScreen::resetOptions()
MSWindowsScreen::resetOptions()
{
m_desks->resetOptions();
}
void
CMSWindowsScreen::setOptions(const OptionsList& options)
MSWindowsScreen::setOptions(const OptionsList& options)
{
m_desks->setOptions(options);
}
void
CMSWindowsScreen::setSequenceNumber(UInt32 seqNum)
MSWindowsScreen::setSequenceNumber(UInt32 seqNum)
{
m_sequenceNumber = seqNum;
}
bool
CMSWindowsScreen::isPrimary() const
MSWindowsScreen::isPrimary() const
{
return m_isPrimary;
}
void*
CMSWindowsScreen::getEventTarget() const
MSWindowsScreen::getEventTarget() const
{
return const_cast<CMSWindowsScreen*>(this);
return const_cast<MSWindowsScreen*>(this);
}
bool
CMSWindowsScreen::getClipboard(ClipboardID, IClipboard* dst) const
MSWindowsScreen::getClipboard(ClipboardID, IClipboard* dst) const
{
CMSWindowsClipboard src(m_window);
MSWindowsClipboard src(m_window);
Clipboard::copy(dst, &src);
return true;
}
void
CMSWindowsScreen::getShape(SInt32& x, SInt32& y, SInt32& w, SInt32& h) const
MSWindowsScreen::getShape(SInt32& x, SInt32& y, SInt32& w, SInt32& h) const
{
assert(m_class != 0);
@ -531,13 +531,13 @@ CMSWindowsScreen::getShape(SInt32& x, SInt32& y, SInt32& w, SInt32& h) const
}
void
CMSWindowsScreen::getCursorPos(SInt32& x, SInt32& y) const
MSWindowsScreen::getCursorPos(SInt32& x, SInt32& y) const
{
m_desks->getCursorPos(x, y);
}
void
CMSWindowsScreen::reconfigure(UInt32 activeSides)
MSWindowsScreen::reconfigure(UInt32 activeSides)
{
assert(m_isPrimary);
@ -546,7 +546,7 @@ CMSWindowsScreen::reconfigure(UInt32 activeSides)
}
void
CMSWindowsScreen::warpCursor(SInt32 x, SInt32 y)
MSWindowsScreen::warpCursor(SInt32 x, SInt32 y)
{
// warp mouse
warpCursorNoFlush(x, y);
@ -562,7 +562,7 @@ CMSWindowsScreen::warpCursor(SInt32 x, SInt32 y)
saveMousePosition(x, y);
}
void CMSWindowsScreen::saveMousePosition(SInt32 x, SInt32 y) {
void MSWindowsScreen::saveMousePosition(SInt32 x, SInt32 y) {
m_xCursor = x;
m_yCursor = y;
@ -571,7 +571,7 @@ void CMSWindowsScreen::saveMousePosition(SInt32 x, SInt32 y) {
}
UInt32
CMSWindowsScreen::registerHotKey(KeyID key, KeyModifierMask mask)
MSWindowsScreen::registerHotKey(KeyID key, KeyModifierMask mask)
{
// only allow certain modifiers
if ((mask & ~(KeyModifierShift | KeyModifierControl |
@ -648,7 +648,7 @@ CMSWindowsScreen::registerHotKey(KeyID key, KeyModifierMask mask)
}
void
CMSWindowsScreen::unregisterHotKey(UInt32 id)
MSWindowsScreen::unregisterHotKey(UInt32 id)
{
// look up hotkey
HotKeyMap::iterator i = m_hotKeys.find(id);
@ -678,7 +678,7 @@ CMSWindowsScreen::unregisterHotKey(UInt32 id)
}
void
CMSWindowsScreen::fakeInputBegin()
MSWindowsScreen::fakeInputBegin()
{
assert(m_isPrimary);
@ -689,7 +689,7 @@ CMSWindowsScreen::fakeInputBegin()
}
void
CMSWindowsScreen::fakeInputEnd()
MSWindowsScreen::fakeInputEnd()
{
assert(m_isPrimary);
@ -700,13 +700,13 @@ CMSWindowsScreen::fakeInputEnd()
}
SInt32
CMSWindowsScreen::getJumpZoneSize() const
MSWindowsScreen::getJumpZoneSize() const
{
return 1;
}
bool
CMSWindowsScreen::isAnyMouseButtonDown(UInt32& buttonID) const
MSWindowsScreen::isAnyMouseButtonDown(UInt32& buttonID) const
{
static const char* buttonToName[] = {
"<invalid>",
@ -729,14 +729,14 @@ CMSWindowsScreen::isAnyMouseButtonDown(UInt32& buttonID) const
}
void
CMSWindowsScreen::getCursorCenter(SInt32& x, SInt32& y) const
MSWindowsScreen::getCursorCenter(SInt32& x, SInt32& y) const
{
x = m_xCenter;
y = m_yCenter;
}
void
CMSWindowsScreen::fakeMouseButton(ButtonID id, bool press)
MSWindowsScreen::fakeMouseButton(ButtonID id, bool press)
{
m_desks->fakeMouseButton(id, press);
@ -753,7 +753,7 @@ CMSWindowsScreen::fakeMouseButton(ButtonID id, bool press)
}
void
CMSWindowsScreen::fakeMouseMove(SInt32 x, SInt32 y)
MSWindowsScreen::fakeMouseMove(SInt32 x, SInt32 y)
{
m_desks->fakeMouseMove(x, y);
if (m_buttons[kButtonLeft]) {
@ -762,25 +762,25 @@ CMSWindowsScreen::fakeMouseMove(SInt32 x, SInt32 y)
}
void
CMSWindowsScreen::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
MSWindowsScreen::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
{
m_desks->fakeMouseRelativeMove(dx, dy);
}
void
CMSWindowsScreen::fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const
MSWindowsScreen::fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const
{
m_desks->fakeMouseWheel(xDelta, yDelta);
}
void
CMSWindowsScreen::updateKeys()
MSWindowsScreen::updateKeys()
{
m_desks->updateKeys();
}
void
CMSWindowsScreen::fakeKeyDown(KeyID id, KeyModifierMask mask,
MSWindowsScreen::fakeKeyDown(KeyID id, KeyModifierMask mask,
KeyButton button)
{
PlatformScreen::fakeKeyDown(id, mask, button);
@ -788,7 +788,7 @@ CMSWindowsScreen::fakeKeyDown(KeyID id, KeyModifierMask mask,
}
bool
CMSWindowsScreen::fakeKeyRepeat(KeyID id, KeyModifierMask mask,
MSWindowsScreen::fakeKeyRepeat(KeyID id, KeyModifierMask mask,
SInt32 count, KeyButton button)
{
bool result = PlatformScreen::fakeKeyRepeat(id, mask, count, button);
@ -797,7 +797,7 @@ CMSWindowsScreen::fakeKeyRepeat(KeyID id, KeyModifierMask mask,
}
bool
CMSWindowsScreen::fakeKeyUp(KeyButton button)
MSWindowsScreen::fakeKeyUp(KeyButton button)
{
bool result = PlatformScreen::fakeKeyUp(button);
updateForceShowCursor();
@ -805,14 +805,14 @@ CMSWindowsScreen::fakeKeyUp(KeyButton button)
}
void
CMSWindowsScreen::fakeAllKeysUp()
MSWindowsScreen::fakeAllKeysUp()
{
PlatformScreen::fakeAllKeysUp();
updateForceShowCursor();
}
HCURSOR
CMSWindowsScreen::createBlankCursor() const
MSWindowsScreen::createBlankCursor() const
{
// create a transparent cursor
int cw = GetSystemMetrics(SM_CXCURSOR);
@ -829,7 +829,7 @@ CMSWindowsScreen::createBlankCursor() const
}
void
CMSWindowsScreen::destroyCursor(HCURSOR cursor) const
MSWindowsScreen::destroyCursor(HCURSOR cursor) const
{
if (cursor != NULL) {
DestroyCursor(cursor);
@ -837,12 +837,12 @@ CMSWindowsScreen::destroyCursor(HCURSOR cursor) const
}
ATOM
CMSWindowsScreen::createWindowClass() const
MSWindowsScreen::createWindowClass() const
{
WNDCLASSEX classInfo;
classInfo.cbSize = sizeof(classInfo);
classInfo.style = CS_DBLCLKS | CS_NOCLOSE;
classInfo.lpfnWndProc = &CMSWindowsScreen::wndProc;
classInfo.lpfnWndProc = &MSWindowsScreen::wndProc;
classInfo.cbClsExtra = 0;
classInfo.cbWndExtra = 0;
classInfo.hInstance = s_windowInstance;
@ -856,7 +856,7 @@ CMSWindowsScreen::createWindowClass() const
}
void
CMSWindowsScreen::destroyClass(ATOM windowClass) const
MSWindowsScreen::destroyClass(ATOM windowClass) const
{
if (windowClass != 0) {
UnregisterClass(reinterpret_cast<LPCTSTR>(windowClass), s_windowInstance);
@ -864,7 +864,7 @@ CMSWindowsScreen::destroyClass(ATOM windowClass) const
}
HWND
CMSWindowsScreen::createWindow(ATOM windowClass, const char* name) const
MSWindowsScreen::createWindow(ATOM windowClass, const char* name) const
{
HWND window = CreateWindowEx(WS_EX_TOPMOST |
WS_EX_TRANSPARENT |
@ -884,7 +884,7 @@ CMSWindowsScreen::createWindow(ATOM windowClass, const char* name) const
}
HWND
CMSWindowsScreen::createDropWindow(ATOM windowClass, const char* name) const
MSWindowsScreen::createDropWindow(ATOM windowClass, const char* name) const
{
HWND window = CreateWindowEx(
WS_EX_TOPMOST |
@ -907,7 +907,7 @@ CMSWindowsScreen::createDropWindow(ATOM windowClass, const char* name) const
}
void
CMSWindowsScreen::destroyWindow(HWND hwnd) const
MSWindowsScreen::destroyWindow(HWND hwnd) const
{
if (hwnd != NULL) {
DestroyWindow(hwnd);
@ -915,13 +915,13 @@ CMSWindowsScreen::destroyWindow(HWND hwnd) const
}
void
CMSWindowsScreen::sendEvent(Event::Type type, void* data)
MSWindowsScreen::sendEvent(Event::Type type, void* data)
{
m_events->addEvent(Event(type, getEventTarget(), data));
}
void
CMSWindowsScreen::sendClipboardEvent(Event::Type type, ClipboardID id)
MSWindowsScreen::sendClipboardEvent(Event::Type type, ClipboardID id)
{
ClipboardInfo* info = (ClipboardInfo*)malloc(sizeof(ClipboardInfo));
if(info == NULL) {
@ -934,7 +934,7 @@ CMSWindowsScreen::sendClipboardEvent(Event::Type type, ClipboardID id)
}
void
CMSWindowsScreen::handleSystemEvent(const Event& event, void*)
MSWindowsScreen::handleSystemEvent(const Event& event, void*)
{
MSG* msg = reinterpret_cast<MSG*>(event.getData());
assert(msg != NULL);
@ -950,7 +950,7 @@ CMSWindowsScreen::handleSystemEvent(const Event& event, void*)
}
void
CMSWindowsScreen::updateButtons()
MSWindowsScreen::updateButtons()
{
int numButtons = GetSystemMetrics(SM_CMOUSEBUTTONS);
m_buttons[kButtonNone] = false;
@ -964,13 +964,13 @@ CMSWindowsScreen::updateButtons()
}
IKeyState*
CMSWindowsScreen::getKeyState() const
MSWindowsScreen::getKeyState() const
{
return m_keyState;
}
bool
CMSWindowsScreen::onPreDispatch(HWND hwnd,
MSWindowsScreen::onPreDispatch(HWND hwnd,
UINT message, WPARAM wParam, LPARAM lParam)
{
// handle event
@ -991,7 +991,7 @@ CMSWindowsScreen::onPreDispatch(HWND hwnd,
}
bool
CMSWindowsScreen::onPreDispatchPrimary(HWND,
MSWindowsScreen::onPreDispatchPrimary(HWND,
UINT message, WPARAM wParam, LPARAM lParam)
{
LOG((CLOG_DEBUG5 "handling pre-dispatch primary"));
@ -1049,7 +1049,7 @@ CMSWindowsScreen::onPreDispatchPrimary(HWND,
}
bool
CMSWindowsScreen::onEvent(HWND, UINT msg,
MSWindowsScreen::onEvent(HWND, UINT msg,
WPARAM wParam, LPARAM lParam, LRESULT* result)
{
switch (msg) {
@ -1109,14 +1109,14 @@ CMSWindowsScreen::onEvent(HWND, UINT msg,
}
bool
CMSWindowsScreen::onMark(UInt32 mark)
MSWindowsScreen::onMark(UInt32 mark)
{
m_markReceived = mark;
return true;
}
bool
CMSWindowsScreen::onKey(WPARAM wParam, LPARAM lParam)
MSWindowsScreen::onKey(WPARAM wParam, LPARAM lParam)
{
static const KeyModifierMask s_ctrlAlt =
KeyModifierControl | KeyModifierAlt;
@ -1245,7 +1245,7 @@ CMSWindowsScreen::onKey(WPARAM wParam, LPARAM lParam)
}
bool
CMSWindowsScreen::onHotKey(WPARAM wParam, LPARAM lParam)
MSWindowsScreen::onHotKey(WPARAM wParam, LPARAM lParam)
{
// get the key info
KeyModifierMask state = getActiveModifiers();
@ -1292,7 +1292,7 @@ CMSWindowsScreen::onHotKey(WPARAM wParam, LPARAM lParam)
}
bool
CMSWindowsScreen::onMouseButton(WPARAM wParam, LPARAM lParam)
MSWindowsScreen::onMouseButton(WPARAM wParam, LPARAM lParam)
{
// get which button
bool pressed = mapPressFromEvent(wParam, lParam);
@ -1346,7 +1346,7 @@ CMSWindowsScreen::onMouseButton(WPARAM wParam, LPARAM lParam)
// - this actually records the current x,y as "last" a second time (it seems)
// 5. sends the delta movement to the client (could be +1,+1 or -1,+4 for example)
bool
CMSWindowsScreen::onMouseMove(SInt32 mx, SInt32 my)
MSWindowsScreen::onMouseMove(SInt32 mx, SInt32 my)
{
// compute motion delta (relative to the last known
// mouse position)
@ -1409,7 +1409,7 @@ CMSWindowsScreen::onMouseMove(SInt32 mx, SInt32 my)
}
bool
CMSWindowsScreen::onMouseWheel(SInt32 xDelta, SInt32 yDelta)
MSWindowsScreen::onMouseWheel(SInt32 xDelta, SInt32 yDelta)
{
// ignore message if posted prior to last mark change
if (!ignore()) {
@ -1420,7 +1420,7 @@ CMSWindowsScreen::onMouseWheel(SInt32 xDelta, SInt32 yDelta)
}
bool
CMSWindowsScreen::onScreensaver(bool activated)
MSWindowsScreen::onScreensaver(bool activated)
{
// ignore this message if there are any other screen saver
// messages already in the queue. this is important because
@ -1460,7 +1460,7 @@ CMSWindowsScreen::onScreensaver(bool activated)
}
bool
CMSWindowsScreen::onDisplayChange()
MSWindowsScreen::onDisplayChange()
{
// screen resolution may have changed. save old shape.
SInt32 xOld = m_x, yOld = m_y, wOld = m_w, hOld = m_h;
@ -1494,11 +1494,11 @@ CMSWindowsScreen::onDisplayChange()
}
bool
CMSWindowsScreen::onClipboardChange()
MSWindowsScreen::onClipboardChange()
{
// now notify client that somebody changed the clipboard (unless
// we're the owner).
if (!CMSWindowsClipboard::isOwnedBySynergy()) {
if (!MSWindowsClipboard::isOwnedBySynergy()) {
if (m_ownClipboard) {
LOG((CLOG_DEBUG "clipboard changed: lost ownership"));
m_ownClipboard = false;
@ -1515,7 +1515,7 @@ CMSWindowsScreen::onClipboardChange()
}
void
CMSWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y)
MSWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y)
{
// send an event that we can recognize before the mouse warp
PostThreadMessage(GetCurrentThreadId(), SYNERGY_MSG_PRE_WARP, x, y);
@ -1565,7 +1565,7 @@ CMSWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y)
}
void
CMSWindowsScreen::nextMark()
MSWindowsScreen::nextMark()
{
// next mark
++m_mark;
@ -1575,13 +1575,13 @@ CMSWindowsScreen::nextMark()
}
bool
CMSWindowsScreen::ignore() const
MSWindowsScreen::ignore() const
{
return (m_mark != m_markReceived);
}
void
CMSWindowsScreen::updateScreenShape()
MSWindowsScreen::updateScreenShape()
{
// get shape
m_x = GetSystemMetrics(SM_XVIRTUALSCREEN);
@ -1602,7 +1602,7 @@ CMSWindowsScreen::updateScreenShape()
}
void
CMSWindowsScreen::handleFixes(const Event&, void*)
MSWindowsScreen::handleFixes(const Event&, void*)
{
// fix clipboard chain
fixClipboardViewer();
@ -1614,7 +1614,7 @@ CMSWindowsScreen::handleFixes(const Event&, void*)
}
void
CMSWindowsScreen::fixClipboardViewer()
MSWindowsScreen::fixClipboardViewer()
{
// XXX -- disable this code for now. somehow it can cause an infinite
// recursion in the WM_DRAWCLIPBOARD handler. either we're sending
@ -1631,12 +1631,12 @@ CMSWindowsScreen::fixClipboardViewer()
}
void
CMSWindowsScreen::enableSpecialKeys(bool enable) const
MSWindowsScreen::enableSpecialKeys(bool enable) const
{
}
ButtonID
CMSWindowsScreen::mapButtonFromEvent(WPARAM msg, LPARAM button) const
MSWindowsScreen::mapButtonFromEvent(WPARAM msg, LPARAM button) const
{
switch (msg) {
case WM_LBUTTONDOWN:
@ -1690,7 +1690,7 @@ CMSWindowsScreen::mapButtonFromEvent(WPARAM msg, LPARAM button) const
}
bool
CMSWindowsScreen::mapPressFromEvent(WPARAM msg, LPARAM) const
MSWindowsScreen::mapPressFromEvent(WPARAM msg, LPARAM) const
{
switch (msg) {
case WM_LBUTTONDOWN:
@ -1727,7 +1727,7 @@ CMSWindowsScreen::mapPressFromEvent(WPARAM msg, LPARAM) const
}
void
CMSWindowsScreen::updateKeysCB(void*)
MSWindowsScreen::updateKeysCB(void*)
{
// record which keys we think are down
bool down[IKeyState::kNumButtons];
@ -1760,7 +1760,7 @@ CMSWindowsScreen::updateKeysCB(void*)
}
void
CMSWindowsScreen::forceShowCursor()
MSWindowsScreen::forceShowCursor()
{
// check for mouse
m_hasMouse = (GetSystemMetrics(SM_MOUSEPRESENT) != 0);
@ -1793,7 +1793,7 @@ CMSWindowsScreen::forceShowCursor()
}
void
CMSWindowsScreen::updateForceShowCursor()
MSWindowsScreen::updateForceShowCursor()
{
DWORD oldFlags = m_mouseKeys.dwFlags;
@ -1814,7 +1814,7 @@ CMSWindowsScreen::updateForceShowCursor()
}
LRESULT CALLBACK
CMSWindowsScreen::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
MSWindowsScreen::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
assert(s_screen != NULL);
@ -1827,7 +1827,7 @@ CMSWindowsScreen::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
void
CMSWindowsScreen::fakeLocalKey(KeyButton button, bool press) const
MSWindowsScreen::fakeLocalKey(KeyButton button, bool press) const
{
INPUT input;
input.type = INPUT_KEYBOARD;
@ -1840,10 +1840,10 @@ CMSWindowsScreen::fakeLocalKey(KeyButton button, bool press) const
}
//
// CMSWindowsScreen::HotKeyItem
// MSWindowsScreen::HotKeyItem
//
CMSWindowsScreen::HotKeyItem::HotKeyItem(UINT keycode, UINT mask) :
MSWindowsScreen::HotKeyItem::HotKeyItem(UINT keycode, UINT mask) :
m_keycode(keycode),
m_mask(mask)
{
@ -1851,27 +1851,27 @@ CMSWindowsScreen::HotKeyItem::HotKeyItem(UINT keycode, UINT mask) :
}
UINT
CMSWindowsScreen::HotKeyItem::getVirtualKey() const
MSWindowsScreen::HotKeyItem::getVirtualKey() const
{
return m_keycode;
}
bool
CMSWindowsScreen::HotKeyItem::operator<(const HotKeyItem& x) const
MSWindowsScreen::HotKeyItem::operator<(const HotKeyItem& x) const
{
return (m_keycode < x.m_keycode ||
(m_keycode == x.m_keycode && m_mask < x.m_mask));
}
void
CMSWindowsScreen::fakeDraggingFiles(DragFileList fileList)
MSWindowsScreen::fakeDraggingFiles(DragFileList fileList)
{
// possible design flaw: this function stops a "not implemented"
// exception from being thrown.
}
String&
CMSWindowsScreen::getDraggingFilename()
MSWindowsScreen::getDraggingFilename()
{
if (m_draggingStarted) {
m_dropTarget->clearDraggingFilename();
@ -1927,13 +1927,13 @@ CMSWindowsScreen::getDraggingFilename()
}
const String&
CMSWindowsScreen::getDropTarget() const
MSWindowsScreen::getDropTarget() const
{
return m_desktopPath;
}
bool
CMSWindowsScreen::isModifierRepeat(KeyModifierMask oldState, KeyModifierMask state, WPARAM wParam) const
MSWindowsScreen::isModifierRepeat(KeyModifierMask oldState, KeyModifierMask state, WPARAM wParam) const
{
bool result = false;

View File

@ -30,21 +30,21 @@
#include <Windows.h>
class EventQueueTimer;
class CMSWindowsDesks;
class CMSWindowsKeyState;
class CMSWindowsScreenSaver;
class MSWindowsDesks;
class MSWindowsKeyState;
class MSWindowsScreenSaver;
class Thread;
class CMSWindowsDropTarget;
class MSWindowsDropTarget;
//! Implementation of IPlatformScreen for Microsoft Windows
class CMSWindowsScreen : public PlatformScreen {
class MSWindowsScreen : public PlatformScreen {
public:
CMSWindowsScreen(
MSWindowsScreen(
bool isPrimary,
bool noHooks,
bool stopOnDeskSwitch,
IEventQueue* events);
virtual ~CMSWindowsScreen();
virtual ~MSWindowsScreen();
//! @name manipulators
//@{
@ -283,7 +283,7 @@ private:
HKL m_keyLayout;
// screen saver stuff
CMSWindowsScreenSaver* m_screensaver;
MSWindowsScreenSaver* m_screensaver;
bool m_screensaverNotify;
bool m_screensaverActive;
@ -294,10 +294,10 @@ private:
bool m_ownClipboard;
// one desk per desktop and a cond var to communicate with it
CMSWindowsDesks* m_desks;
MSWindowsDesks* m_desks;
// keyboard stuff
CMSWindowsKeyState* m_keyState;
MSWindowsKeyState* m_keyState;
// hot key stuff
HotKeyMap m_hotKeys;
@ -324,16 +324,16 @@ private:
MOUSEKEYS m_mouseKeys;
MOUSEKEYS m_oldMouseKeys;
CMSWindowsHook m_hook;
MSWindowsHook m_hook;
static CMSWindowsScreen*
static MSWindowsScreen*
s_screen;
IEventQueue* m_events;
String m_desktopPath;
CMSWindowsDropTarget*
MSWindowsDropTarget*
m_dropTarget;
HWND m_dropWindow;
const int m_dropWindowSize;

View File

@ -41,10 +41,10 @@ static const TCHAR* const g_pathScreenSaverIsSecure[] = {
};
//
// CMSWindowsScreenSaver
// MSWindowsScreenSaver
//
CMSWindowsScreenSaver::CMSWindowsScreenSaver() :
MSWindowsScreenSaver::MSWindowsScreenSaver() :
m_wasSecure(false),
m_wasSecureAnInt(false),
m_process(NULL),
@ -56,13 +56,13 @@ CMSWindowsScreenSaver::CMSWindowsScreenSaver() :
SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &m_wasEnabled, 0);
}
CMSWindowsScreenSaver::~CMSWindowsScreenSaver()
MSWindowsScreenSaver::~MSWindowsScreenSaver()
{
unwatchProcess();
}
bool
CMSWindowsScreenSaver::checkStarted(UINT msg, WPARAM wParam, LPARAM lParam)
MSWindowsScreenSaver::checkStarted(UINT msg, WPARAM wParam, LPARAM lParam)
{
// if already started then say it didn't just start
if (m_active) {
@ -102,7 +102,7 @@ CMSWindowsScreenSaver::checkStarted(UINT msg, WPARAM wParam, LPARAM lParam)
}
void
CMSWindowsScreenSaver::enable()
MSWindowsScreenSaver::enable()
{
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, m_wasEnabled, 0, 0);
@ -116,7 +116,7 @@ CMSWindowsScreenSaver::enable()
}
void
CMSWindowsScreenSaver::disable()
MSWindowsScreenSaver::disable()
{
SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &m_wasEnabled, 0);
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, 0, 0);
@ -132,7 +132,7 @@ CMSWindowsScreenSaver::disable()
}
void
CMSWindowsScreenSaver::activate()
MSWindowsScreenSaver::activate()
{
// don't activate if already active
if (!isActive()) {
@ -152,7 +152,7 @@ CMSWindowsScreenSaver::activate()
}
void
CMSWindowsScreenSaver::deactivate()
MSWindowsScreenSaver::deactivate()
{
bool killed = false;
@ -161,7 +161,7 @@ CMSWindowsScreenSaver::deactivate()
DESKTOP_READOBJECTS | DESKTOP_WRITEOBJECTS);
if (desktop != NULL) {
EnumDesktopWindows(desktop,
&CMSWindowsScreenSaver::killScreenSaverFunc,
&MSWindowsScreenSaver::killScreenSaverFunc,
reinterpret_cast<LPARAM>(&killed));
CloseDesktop(desktop);
}
@ -191,7 +191,7 @@ CMSWindowsScreenSaver::deactivate()
}
bool
CMSWindowsScreenSaver::isActive() const
MSWindowsScreenSaver::isActive() const
{
BOOL running;
SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &running, 0);
@ -199,11 +199,11 @@ CMSWindowsScreenSaver::isActive() const
}
BOOL CALLBACK
CMSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg)
MSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg)
{
if (IsWindowVisible(hwnd)) {
HINSTANCE instance = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
if (instance != CMSWindowsScreen::getWindowInstance()) {
if (instance != MSWindowsScreen::getWindowInstance()) {
PostMessage(hwnd, WM_CLOSE, 0, 0);
*reinterpret_cast<bool*>(arg) = true;
}
@ -212,7 +212,7 @@ CMSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg)
}
void
CMSWindowsScreenSaver::watchDesktop()
MSWindowsScreenSaver::watchDesktop()
{
// stop watching previous process/desktop
unwatchProcess();
@ -220,12 +220,12 @@ CMSWindowsScreenSaver::watchDesktop()
// watch desktop in another thread
LOG((CLOG_DEBUG "watching screen saver desktop"));
m_active = true;
m_watch = new Thread(new TMethodJob<CMSWindowsScreenSaver>(this,
&CMSWindowsScreenSaver::watchDesktopThread));
m_watch = new Thread(new TMethodJob<MSWindowsScreenSaver>(this,
&MSWindowsScreenSaver::watchDesktopThread));
}
void
CMSWindowsScreenSaver::watchProcess(HANDLE process)
MSWindowsScreenSaver::watchProcess(HANDLE process)
{
// stop watching previous process/desktop
unwatchProcess();
@ -235,13 +235,13 @@ CMSWindowsScreenSaver::watchProcess(HANDLE process)
LOG((CLOG_DEBUG "watching screen saver process"));
m_process = process;
m_active = true;
m_watch = new Thread(new TMethodJob<CMSWindowsScreenSaver>(this,
&CMSWindowsScreenSaver::watchProcessThread));
m_watch = new Thread(new TMethodJob<MSWindowsScreenSaver>(this,
&MSWindowsScreenSaver::watchProcessThread));
}
}
void
CMSWindowsScreenSaver::unwatchProcess()
MSWindowsScreenSaver::unwatchProcess()
{
if (m_watch != NULL) {
LOG((CLOG_DEBUG "stopped watching screen saver process/desktop"));
@ -258,7 +258,7 @@ CMSWindowsScreenSaver::unwatchProcess()
}
void
CMSWindowsScreenSaver::watchDesktopThread(void*)
MSWindowsScreenSaver::watchDesktopThread(void*)
{
DWORD reserved = 0;
TCHAR* name = NULL;
@ -281,7 +281,7 @@ CMSWindowsScreenSaver::watchDesktopThread(void*)
}
void
CMSWindowsScreenSaver::watchProcessThread(void*)
MSWindowsScreenSaver::watchProcessThread(void*)
{
for (;;) {
Thread::testCancel();
@ -298,7 +298,7 @@ CMSWindowsScreenSaver::watchProcessThread(void*)
}
void
CMSWindowsScreenSaver::setSecure(bool secure, bool saveSecureAsInt)
MSWindowsScreenSaver::setSecure(bool secure, bool saveSecureAsInt)
{
HKEY hkey =
ArchMiscWindows::addKey(HKEY_CURRENT_USER, g_pathScreenSaverIsSecure);
@ -317,7 +317,7 @@ CMSWindowsScreenSaver::setSecure(bool secure, bool saveSecureAsInt)
}
bool
CMSWindowsScreenSaver::isSecure(bool* wasSecureFlagAnInt) const
MSWindowsScreenSaver::isSecure(bool* wasSecureFlagAnInt) const
{
// get the password protection setting key
HKEY hkey =

View File

@ -27,10 +27,10 @@
class Thread;
//! Microsoft windows screen saver implementation
class CMSWindowsScreenSaver : public IScreenSaver {
class MSWindowsScreenSaver : public IScreenSaver {
public:
CMSWindowsScreenSaver();
virtual ~CMSWindowsScreenSaver();
MSWindowsScreenSaver();
virtual ~MSWindowsScreenSaver();
//! @name manipulators
//@{

View File

@ -23,17 +23,17 @@
#include <Wtsapi32.h>
CMSWindowsSession::CMSWindowsSession() :
MSWindowsSession::MSWindowsSession() :
m_activeSessionId(-1)
{
}
CMSWindowsSession::~CMSWindowsSession()
MSWindowsSession::~MSWindowsSession()
{
}
bool
CMSWindowsSession::isProcessInSession(const char* name, PHANDLE process = NULL)
MSWindowsSession::isProcessInSession(const char* name, PHANDLE process = NULL)
{
// first we need to take a snapshot of the running processes
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
@ -120,7 +120,7 @@ CMSWindowsSession::isProcessInSession(const char* name, PHANDLE process = NULL)
}
HANDLE
CMSWindowsSession::getUserToken(LPSECURITY_ATTRIBUTES security)
MSWindowsSession::getUserToken(LPSECURITY_ATTRIBUTES security)
{
HANDLE sourceToken;
if (!WTSQueryUserToken(m_activeSessionId, &sourceToken)) {
@ -142,20 +142,20 @@ CMSWindowsSession::getUserToken(LPSECURITY_ATTRIBUTES security)
}
BOOL
CMSWindowsSession::hasChanged()
MSWindowsSession::hasChanged()
{
return (m_activeSessionId != WTSGetActiveConsoleSessionId());
}
void
CMSWindowsSession::updateActiveSession()
MSWindowsSession::updateActiveSession()
{
m_activeSessionId = WTSGetActiveConsoleSessionId();
}
BOOL
CMSWindowsSession::nextProcessEntry(HANDLE snapshot, LPPROCESSENTRY32 entry)
MSWindowsSession::nextProcessEntry(HANDLE snapshot, LPPROCESSENTRY32 entry)
{
BOOL gotEntry = Process32Next(snapshot, entry);
if (!gotEntry) {
@ -173,7 +173,7 @@ CMSWindowsSession::nextProcessEntry(HANDLE snapshot, LPPROCESSENTRY32 entry)
}
String
CMSWindowsSession::getActiveDesktopName()
MSWindowsSession::getActiveDesktopName()
{
String result;

View File

@ -23,10 +23,10 @@
#include <Windows.h>
#include <Tlhelp32.h>
class CMSWindowsSession {
class MSWindowsSession {
public:
CMSWindowsSession();
~CMSWindowsSession();
MSWindowsSession();
~MSWindowsSession();
//!
/*!

View File

@ -23,11 +23,11 @@
#include <stdio.h>
//
// CMSWindowsUtil
// MSWindowsUtil
//
String
CMSWindowsUtil::getString(HINSTANCE instance, DWORD id)
MSWindowsUtil::getString(HINSTANCE instance, DWORD id)
{
char buffer[1024];
int size = static_cast<int>(sizeof(buffer) / sizeof(buffer[0]));
@ -57,7 +57,7 @@ CMSWindowsUtil::getString(HINSTANCE instance, DWORD id)
}
String
CMSWindowsUtil::getErrorString(HINSTANCE hinstance, DWORD error, DWORD id)
MSWindowsUtil::getErrorString(HINSTANCE hinstance, DWORD error, DWORD id)
{
char* buffer;
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |

View File

@ -23,7 +23,7 @@
#define WINDOWS_LEAN_AND_MEAN
#include <Windows.h>
class CMSWindowsUtil {
class MSWindowsUtil {
public:
//! Get message string
/*!

View File

@ -72,7 +72,7 @@ private:
IpcServer& m_ipcServer;
IpcLogOutputter& m_ipcLogOutputter;
bool m_elevateProcess;
CMSWindowsSession m_session;
MSWindowsSession m_session;
PROCESS_INFORMATION m_processInfo;
int m_processFailures;
bool m_processRunning;

View File

@ -173,7 +173,7 @@ synergy::Screen*
ClientApp::createScreen()
{
#if WINAPI_MSWINDOWS
return new synergy::Screen(new CMSWindowsScreen(
return new synergy::Screen(new MSWindowsScreen(
false, args().m_noHooks, args().m_stopOnDeskSwitch, m_events), m_events);
#elif WINAPI_XWINDOWS
return new synergy::Screen(new XWindowsScreen(

View File

@ -117,7 +117,7 @@ DaemonApp::run(int argc, char** argv)
{
#if SYSAPI_WIN32
// sends debug messages to visual studio console window.
log.insert(new CMSWindowsDebugOutputter());
log.insert(new MSWindowsDebugOutputter());
#endif
// default log level to system setting.
@ -228,7 +228,7 @@ DaemonApp::mainLoop(bool logToFile)
#if SYSAPI_WIN32
// install the platform event queue to handle service stop events.
m_events->adoptBuffer(new CMSWindowsEventQueueBuffer(m_events));
m_events->adoptBuffer(new MSWindowsEventQueueBuffer(m_events));
String command = ARCH->setting("Command");
bool elevate = ARCH->setting("Elevate") == "1";

View File

@ -581,7 +581,7 @@ synergy::Screen*
ServerApp::createScreen()
{
#if WINAPI_MSWINDOWS
return new synergy::Screen(new CMSWindowsScreen(
return new synergy::Screen(new MSWindowsScreen(
true, args().m_noHooks, args().m_stopOnDeskSwitch, m_events), m_events);
#elif WINAPI_XWINDOWS
return new synergy::Screen(new XWindowsScreen(

View File

@ -54,7 +54,7 @@ ToolApp::run(int argc, char** argv)
if (m_args.m_printActiveDesktopName) {
#if SYSAPI_WIN32
CMSWindowsSession session;
MSWindowsSession session;
String name = session.getActiveDesktopName();
if (name.empty()) {
LOG((CLOG_CRIT "failed to get active desktop name"));

View File

@ -145,7 +145,7 @@ AppUtilWindows::run(int argc, char** argv)
// record window instance for tray icon, etc
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
CMSWindowsScreen::init(ArchMiscWindows::instanceWin32());
MSWindowsScreen::init(ArchMiscWindows::instanceWin32());
Thread::getCurrentThread().setPriority(-14);
StartupFunc startup;

View File

@ -22,7 +22,7 @@
#include "test/global/gmock.h"
#include "test/global/gtest.h"
class CMSWindowsClipboardTests : public ::testing::Test
class MSWindowsClipboardTests : public ::testing::Test
{
protected:
virtual void SetUp()
@ -38,7 +38,7 @@ protected:
private:
void emptyClipboard()
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.empty();
}
@ -50,9 +50,9 @@ public:
MOCK_METHOD2(write, void(HANDLE, UINT));
};
TEST_F(CMSWindowsClipboardTests, emptyUnowned_openCalled_returnsTrue)
TEST_F(MSWindowsClipboardTests, emptyUnowned_openCalled_returnsTrue)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
bool actual = clipboard.emptyUnowned();
@ -60,9 +60,9 @@ TEST_F(CMSWindowsClipboardTests, emptyUnowned_openCalled_returnsTrue)
EXPECT_EQ(true, actual);
}
TEST_F(CMSWindowsClipboardTests, empty_openCalled_returnsTrue)
TEST_F(MSWindowsClipboardTests, empty_openCalled_returnsTrue)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
bool actual = clipboard.empty();
@ -70,21 +70,21 @@ TEST_F(CMSWindowsClipboardTests, empty_openCalled_returnsTrue)
EXPECT_EQ(true, actual);
}
TEST_F(CMSWindowsClipboardTests, empty_singleFormat_hasReturnsFalse)
TEST_F(MSWindowsClipboardTests, empty_singleFormat_hasReturnsFalse)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.add(CMSWindowsClipboard::kText, "synergy rocks!");
clipboard.add(MSWindowsClipboard::kText, "synergy rocks!");
clipboard.empty();
bool actual = clipboard.has(CMSWindowsClipboard::kText);
bool actual = clipboard.has(MSWindowsClipboard::kText);
EXPECT_EQ(false, actual);
}
TEST_F(CMSWindowsClipboardTests, add_newValue_valueWasStored)
TEST_F(MSWindowsClipboardTests, add_newValue_valueWasStored)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.add(IClipboard::kText, "synergy rocks!");
@ -93,21 +93,21 @@ TEST_F(CMSWindowsClipboardTests, add_newValue_valueWasStored)
EXPECT_EQ("synergy rocks!", actual);
}
TEST_F(CMSWindowsClipboardTests, add_newValue_writeWasCalled)
TEST_F(MSWindowsClipboardTests, add_newValue_writeWasCalled)
{
MockFacade facade;
EXPECT_CALL(facade, write(testing::_, testing::_));
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.setFacade(facade);
clipboard.open(0);
clipboard.add(IClipboard::kText, "synergy rocks!");
}
TEST_F(CMSWindowsClipboardTests, add_replaceValue_valueWasReplaced)
TEST_F(MSWindowsClipboardTests, add_replaceValue_valueWasReplaced)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.add(IClipboard::kText, "synergy rocks!");
@ -117,27 +117,27 @@ TEST_F(CMSWindowsClipboardTests, add_replaceValue_valueWasReplaced)
EXPECT_EQ("maxivista sucks", actual);
}
TEST_F(CMSWindowsClipboardTests, open_timeIsZero_returnsTrue)
TEST_F(MSWindowsClipboardTests, open_timeIsZero_returnsTrue)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
bool actual = clipboard.open(0);
EXPECT_EQ(true, actual);
}
TEST_F(CMSWindowsClipboardTests, open_timeIsOne_returnsTrue)
TEST_F(MSWindowsClipboardTests, open_timeIsOne_returnsTrue)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
bool actual = clipboard.open(1);
EXPECT_EQ(true, actual);
}
TEST_F(CMSWindowsClipboardTests, close_isOpen_noErrors)
TEST_F(MSWindowsClipboardTests, close_isOpen_noErrors)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.close();
@ -147,12 +147,12 @@ TEST_F(CMSWindowsClipboardTests, close_isOpen_noErrors)
// looks like this test may fail intermittently:
// * http://buildbot.synergy-project.org:8000/builders/trunk-win32/builds/246/steps/shell_3/logs/stdio
/*TEST_F(CMSWindowsClipboardTests, getTime_openWithNoEmpty_returnsOne)
/*TEST_F(MSWindowsClipboardTests, getTime_openWithNoEmpty_returnsOne)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(1);
CMSWindowsClipboard::Time actual = clipboard.getTime();
MSWindowsClipboard::Time actual = clipboard.getTime();
// this behavior is different to that of Clipboard which only
// returns the value passed into open(t) after empty() is called.
@ -161,20 +161,20 @@ TEST_F(CMSWindowsClipboardTests, close_isOpen_noErrors)
// this also fails intermittently:
// http://buildbot.synergy-project.org:8000/builders/trunk-win32/builds/266/steps/shell_3/logs/stdio
/*TEST_F(CMSWindowsClipboardTests, getTime_openAndEmpty_returnsOne)
/*TEST_F(MSWindowsClipboardTests, getTime_openAndEmpty_returnsOne)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(1);
clipboard.empty();
CMSWindowsClipboard::Time actual = clipboard.getTime();
MSWindowsClipboard::Time actual = clipboard.getTime();
EXPECT_EQ(1, actual);
}*/
TEST_F(CMSWindowsClipboardTests, has_withFormatAdded_returnsTrue)
TEST_F(MSWindowsClipboardTests, has_withFormatAdded_returnsTrue)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.empty();
clipboard.add(IClipboard::kText, "synergy rocks!");
@ -184,9 +184,9 @@ TEST_F(CMSWindowsClipboardTests, has_withFormatAdded_returnsTrue)
EXPECT_EQ(true, actual);
}
TEST_F(CMSWindowsClipboardTests, has_withNoFormats_returnsFalse)
TEST_F(MSWindowsClipboardTests, has_withNoFormats_returnsFalse)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.empty();
@ -195,9 +195,9 @@ TEST_F(CMSWindowsClipboardTests, has_withNoFormats_returnsFalse)
EXPECT_EQ(false, actual);
}
TEST_F(CMSWindowsClipboardTests, get_withNoFormats_returnsEmpty)
TEST_F(MSWindowsClipboardTests, get_withNoFormats_returnsEmpty)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.empty();
@ -206,9 +206,9 @@ TEST_F(CMSWindowsClipboardTests, get_withNoFormats_returnsEmpty)
EXPECT_EQ("", actual);
}
TEST_F(CMSWindowsClipboardTests, get_withFormatAdded_returnsExpected)
TEST_F(MSWindowsClipboardTests, get_withFormatAdded_returnsExpected)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
clipboard.empty();
clipboard.add(IClipboard::kText, "synergy rocks!");
@ -218,9 +218,9 @@ TEST_F(CMSWindowsClipboardTests, get_withFormatAdded_returnsExpected)
EXPECT_EQ("synergy rocks!", actual);
}
TEST_F(CMSWindowsClipboardTests, isOwnedBySynergy_defaultState_noError)
TEST_F(MSWindowsClipboardTests, isOwnedBySynergy_defaultState_noError)
{
CMSWindowsClipboard clipboard(NULL);
MSWindowsClipboard clipboard(NULL);
clipboard.open(0);
bool actual = clipboard.isOwnedBySynergy();

View File

@ -35,13 +35,13 @@
using ::testing::_;
using ::testing::NiceMock;
class CMSWindowsKeyStateTests : public ::testing::Test
class MSWindowsKeyStateTests : public ::testing::Test
{
protected:
virtual void SetUp()
{
m_hook.loadLibrary();
m_screensaver = new CMSWindowsScreenSaver();
m_screensaver = new MSWindowsScreenSaver();
}
virtual void TearDown()
@ -49,31 +49,31 @@ protected:
delete m_screensaver;
}
CMSWindowsDesks* newDesks(IEventQueue* eventQueue)
MSWindowsDesks* newDesks(IEventQueue* eventQueue)
{
return new CMSWindowsDesks(
return new MSWindowsDesks(
true, false, m_hook.getInstance(), m_screensaver, eventQueue,
new TMethodJob<CMSWindowsKeyStateTests>(
this, &CMSWindowsKeyStateTests::updateKeysCB), false);
new TMethodJob<MSWindowsKeyStateTests>(
this, &MSWindowsKeyStateTests::updateKeysCB), false);
}
void* getEventTarget() const
{
return const_cast<CMSWindowsKeyStateTests*>(this);
return const_cast<MSWindowsKeyStateTests*>(this);
}
private:
void updateKeysCB(void*) { }
IScreenSaver* m_screensaver;
CMSWindowsHook m_hook;
MSWindowsHook m_hook;
};
TEST_F(CMSWindowsKeyStateTests, disable_eventQueueNotUsed)
TEST_F(MSWindowsKeyStateTests, disable_eventQueueNotUsed)
{
NiceMock<MockEventQueue> eventQueue;
CMSWindowsDesks* desks = newDesks(&eventQueue);
MSWindowsDesks* desks = newDesks(&eventQueue);
MockKeyMap keyMap;
CMSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
MSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
EXPECT_CALL(eventQueue, removeHandler(_, _)).Times(0);
@ -81,12 +81,12 @@ TEST_F(CMSWindowsKeyStateTests, disable_eventQueueNotUsed)
delete desks;
}
TEST_F(CMSWindowsKeyStateTests, testAutoRepeat_noRepeatAndButtonIsZero_resultIsTrue)
TEST_F(MSWindowsKeyStateTests, testAutoRepeat_noRepeatAndButtonIsZero_resultIsTrue)
{
NiceMock<MockEventQueue> eventQueue;
CMSWindowsDesks* desks = newDesks(&eventQueue);
MSWindowsDesks* desks = newDesks(&eventQueue);
MockKeyMap keyMap;
CMSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
MSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
keyState.setLastDown(1);
bool actual = keyState.testAutoRepeat(true, false, 1);
@ -95,12 +95,12 @@ TEST_F(CMSWindowsKeyStateTests, testAutoRepeat_noRepeatAndButtonIsZero_resultIsT
delete desks;
}
TEST_F(CMSWindowsKeyStateTests, testAutoRepeat_pressFalse_lastDownIsZero)
TEST_F(MSWindowsKeyStateTests, testAutoRepeat_pressFalse_lastDownIsZero)
{
NiceMock<MockEventQueue> eventQueue;
CMSWindowsDesks* desks = newDesks(&eventQueue);
MSWindowsDesks* desks = newDesks(&eventQueue);
MockKeyMap keyMap;
CMSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
MSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
keyState.setLastDown(1);
keyState.testAutoRepeat(false, false, 1);
@ -109,12 +109,12 @@ TEST_F(CMSWindowsKeyStateTests, testAutoRepeat_pressFalse_lastDownIsZero)
delete desks;
}
TEST_F(CMSWindowsKeyStateTests, saveModifiers_noModifiers_savedModifiers0)
TEST_F(MSWindowsKeyStateTests, saveModifiers_noModifiers_savedModifiers0)
{
NiceMock<MockEventQueue> eventQueue;
CMSWindowsDesks* desks = newDesks(&eventQueue);
MSWindowsDesks* desks = newDesks(&eventQueue);
MockKeyMap keyMap;
CMSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
MSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
keyState.saveModifiers();