Applied name convention to KeyResource #2765

This commit is contained in:
Jerry (Xinyu Hou) 2016-05-05 15:24:16 +01:00
parent 47d6d1c5bc
commit 17c35f53f4
6 changed files with 12 additions and 16 deletions

View File

@ -18,8 +18,8 @@ if (WIN32)
file(GLOB headers "MSWindows*.h")
file(GLOB sources "MSWindows*.cpp")
elseif (APPLE)
file(GLOB headers "OSX*.h")
file(GLOB sources "OSX*.cpp" "OSX*.m")
file(GLOB headers "OSX*.h" "IOSX*.h")
file(GLOB sources "OSX*.cpp" "IOSX*.cpp" "OSX*.m")
elseif (UNIX)
file(GLOB headers "XWindows*.h")
file(GLOB sources "XWindows*.cpp")

View File

@ -15,16 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "platform/OSXIKeyResource.h"
#include "platform/IOSXKeyResource.h"
#include <Carbon/Carbon.h>
//
// OSXKeyState::KeyResource
//
KeyID
IKeyResource::getKeyID(UInt8 c)
IOSXKeyResource::getKeyID(UInt8 c)
{
if (c == 0) {
return kKeyNone;
@ -163,7 +159,7 @@ IKeyResource::getKeyID(UInt8 c)
}
KeyID
IKeyResource::unicharToKeyID(UniChar c)
IOSXKeyResource::unicharToKeyID(UniChar c)
{
switch (c) {
case 3:

View File

@ -19,7 +19,7 @@
#include "synergy/KeyState.h"
class IKeyResource : public IInterface {
class IOSXKeyResource : public IInterface {
public:
virtual bool isValid() const = 0;
virtual UInt32 getNumModifierCombinations() const = 0;

View File

@ -297,7 +297,7 @@ OSXKeyState::mapKeyFromEvent(KeyIDs& ids,
if (count != 0 || m_deadKeyState == 0) {
m_deadKeyState = 0;
for (UniCharCount i = 0; i < count; ++i) {
ids.push_back(IKeyResource::unicharToKeyID(chars[i]));
ids.push_back(IOSXKeyResource::unicharToKeyID(chars[i]));
}
adjustAltGrModifier(ids, maskOut, isCommand);
return mapVirtualKeyToKeyButton(vkCode);
@ -581,7 +581,7 @@ OSXKeyState::getKeyMapForSpecialKeys(synergy::KeyMap& keyMap, SInt32 group) cons
bool
OSXKeyState::getKeyMap(synergy::KeyMap& keyMap,
SInt32 group, const IKeyResource& r) const
SInt32 group, const IOSXKeyResource& r) const
{
if (!r.isValid()) {
return false;

View File

@ -26,7 +26,7 @@
#include <Carbon/Carbon.h>
typedef TISInputSourceRef KeyLayout;
class IKeyResource;
class IOSXKeyResource;
//! OS X key state
/*!
@ -113,7 +113,7 @@ private:
// Convert keyboard resource to a key map
bool getKeyMap(synergy::KeyMap& keyMap,
SInt32 group, const IKeyResource& r) const;
SInt32 group, const IOSXKeyResource& r) const;
// Get the available keyboard groups
bool getGroups(GroupList&) const;

View File

@ -18,13 +18,13 @@
#pragma once
#include "synergy/KeyState.h"
#include "platform/OSXIKeyResource.h"
#include "platform/IOSXKeyResource.h"
#include <Carbon/Carbon.h>
typedef TISInputSourceRef KeyLayout;
class OSXUchrKeyResource : public IKeyResource {
class OSXUchrKeyResource : public IOSXKeyResource {
public:
OSXUchrKeyResource(const void*, UInt32 keyboardType);