Skip to content

Commit

Permalink
Drop C prefix on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinyu Hou committed Nov 12, 2014
1 parent e5e0a3b commit 9fd11da
Show file tree
Hide file tree
Showing 48 changed files with 555 additions and 555 deletions.
50 changes: 25 additions & 25 deletions src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
Expand All @@ -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) {
Expand All @@ -80,7 +80,7 @@ CMSWindowsClientTaskBarReceiver::cleanup()
}

void
CMSWindowsClientTaskBarReceiver::showStatus()
MSWindowsClientTaskBarReceiver::showStatus()
{
// create the window
createWindow();
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand All @@ -248,15 +248,15 @@ CMSWindowsClientTaskBarReceiver::copyLog() const
}

void
CMSWindowsClientTaskBarReceiver::onStatusChanged()
MSWindowsClientTaskBarReceiver::onStatusChanged()
{
if (IsWindowVisible(m_window)) {
showStatus();
}
}

HICON
CMSWindowsClientTaskBarReceiver::loadIcon(UINT id)
MSWindowsClientTaskBarReceiver::loadIcon(UINT id)
{
HANDLE icon = LoadImage(m_appInstance,
MAKEINTRESOURCE(id),
Expand All @@ -267,15 +267,15 @@ CMSWindowsClientTaskBarReceiver::loadIcon(UINT id)
}

void
CMSWindowsClientTaskBarReceiver::deleteIcon(HICON icon)
MSWindowsClientTaskBarReceiver::deleteIcon(HICON icon)
{
if (icon != NULL) {
DestroyIcon(icon);
}
}

void
CMSWindowsClientTaskBarReceiver::createWindow()
MSWindowsClientTaskBarReceiver::createWindow()
{
// ignore if already created
if (m_window != NULL) {
Expand All @@ -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)));

Expand All @@ -301,7 +301,7 @@ CMSWindowsClientTaskBarReceiver::createWindow()
}

void
CMSWindowsClientTaskBarReceiver::destroyWindow()
MSWindowsClientTaskBarReceiver::destroyWindow()
{
if (m_window != NULL) {
ArchTaskBarWindows::removeDialog(m_window);
Expand All @@ -311,7 +311,7 @@ CMSWindowsClientTaskBarReceiver::destroyWindow()
}

BOOL
CMSWindowsClientTaskBarReceiver::dlgProc(HWND hwnd,
MSWindowsClientTaskBarReceiver::dlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM)
{
switch (msg) {
Expand All @@ -330,22 +330,22 @@ 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);
}
else {
// 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;
}
}

Expand All @@ -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);
}
6 changes: 3 additions & 3 deletions src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
50 changes: 25 additions & 25 deletions src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
#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,
IDI_TASKBAR_NOT_CONNECTED,
IDI_TASKBAR_CONNECTED
};

CMSWindowsPortableTaskBarReceiver::CMSWindowsPortableTaskBarReceiver(
MSWindowsPortableTaskBarReceiver::MSWindowsPortableTaskBarReceiver(
HINSTANCE appInstance, const BufferedLogOutputter* logBuffer, IEventQueue* events) :
PortableTaskBarReceiver(events),
m_events(events),
Expand All @@ -64,7 +64,7 @@ CMSWindowsPortableTaskBarReceiver::CMSWindowsPortableTaskBarReceiver(
}

void
CMSWindowsPortableTaskBarReceiver::cleanup()
MSWindowsPortableTaskBarReceiver::cleanup()
{
ARCH->removeReceiver(this);
for (UInt32 i = 0; i < kMaxState; ++i) {
Expand All @@ -74,13 +74,13 @@ CMSWindowsPortableTaskBarReceiver::cleanup()
destroyWindow();
}

CMSWindowsPortableTaskBarReceiver::~CMSWindowsPortableTaskBarReceiver()
MSWindowsPortableTaskBarReceiver::~MSWindowsPortableTaskBarReceiver()
{
cleanup();
}

void
CMSWindowsPortableTaskBarReceiver::showStatus()
MSWindowsPortableTaskBarReceiver::showStatus()
{
// create the window
createWindow();
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand All @@ -265,15 +265,15 @@ CMSWindowsPortableTaskBarReceiver::copyLog() const
}

void
CMSWindowsPortableTaskBarReceiver::onStatusChanged()
MSWindowsPortableTaskBarReceiver::onStatusChanged()
{
if (IsWindowVisible(m_window)) {
showStatus();
}
}

HICON
CMSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
MSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
{
HANDLE icon = LoadImage(m_appInstance,
MAKEINTRESOURCE(id),
Expand All @@ -284,15 +284,15 @@ CMSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
}

void
CMSWindowsPortableTaskBarReceiver::deleteIcon(HICON icon)
MSWindowsPortableTaskBarReceiver::deleteIcon(HICON icon)
{
if (icon != NULL) {
DestroyIcon(icon);
}
}

void
CMSWindowsPortableTaskBarReceiver::createWindow()
MSWindowsPortableTaskBarReceiver::createWindow()
{
// ignore if already created
if (m_window != NULL) {
Expand All @@ -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)));

Expand All @@ -318,7 +318,7 @@ CMSWindowsPortableTaskBarReceiver::createWindow()
}

void
CMSWindowsPortableTaskBarReceiver::destroyWindow()
MSWindowsPortableTaskBarReceiver::destroyWindow()
{
if (m_window != NULL) {
ArchTaskBarWindows::removeDialog(m_window);
Expand All @@ -328,7 +328,7 @@ CMSWindowsPortableTaskBarReceiver::destroyWindow()
}

BOOL
CMSWindowsPortableTaskBarReceiver::dlgProc(HWND hwnd,
MSWindowsPortableTaskBarReceiver::dlgProc(HWND hwnd,
UINT msg, WPARAM wParam, LPARAM)
{
switch (msg) {
Expand All @@ -347,22 +347,22 @@ 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);
}
else {
// 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));
}
}
Expand All @@ -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);
}
Loading

0 comments on commit 9fd11da

Please sign in to comment.