chore: replace simple cases of typedef with using
This commit is contained in:
parent
1d43e7c626
commit
2349ce7f52
56 changed files with 181 additions and 164 deletions
|
|
@ -165,6 +165,6 @@ private:
|
||||||
static const char *m_LockCursorModeNames[];
|
static const char *m_LockCursorModeNames[];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QList<Action> ActionList;
|
using ActionList = QList<Action>;
|
||||||
|
|
||||||
QTextStream &operator<<(QTextStream &outStream, const Action &action);
|
QTextStream &operator<<(QTextStream &outStream, const Action &action);
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,6 @@ private:
|
||||||
ActionList m_Actions;
|
ActionList m_Actions;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QList<Hotkey> HotkeyList;
|
using HotkeyList = QList<Hotkey>;
|
||||||
|
|
||||||
QTextStream &operator<<(QTextStream &outStream, const Hotkey &hotkey);
|
QTextStream &operator<<(QTextStream &outStream, const Hotkey &hotkey);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class ArchCondImpl;
|
||||||
\brief Opaque condition variable type.
|
\brief Opaque condition variable type.
|
||||||
An opaque type representing a condition variable.
|
An opaque type representing a condition variable.
|
||||||
*/
|
*/
|
||||||
typedef ArchCondImpl *ArchCond;
|
using ArchCond = ArchCondImpl *;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ArchMutexImpl
|
\class ArchMutexImpl
|
||||||
|
|
@ -47,7 +47,7 @@ class ArchMutexImpl;
|
||||||
\brief Opaque mutex type.
|
\brief Opaque mutex type.
|
||||||
An opaque type representing a mutex.
|
An opaque type representing a mutex.
|
||||||
*/
|
*/
|
||||||
typedef ArchMutexImpl *ArchMutex;
|
using ArchMutex = ArchMutexImpl *;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ArchThreadImpl
|
\class ArchThreadImpl
|
||||||
|
|
@ -61,7 +61,7 @@ class ArchThreadImpl;
|
||||||
\brief Opaque thread type.
|
\brief Opaque thread type.
|
||||||
An opaque type representing a thread.
|
An opaque type representing a thread.
|
||||||
*/
|
*/
|
||||||
typedef ArchThreadImpl *ArchThread;
|
using ArchThread = ArchThreadImpl *;
|
||||||
|
|
||||||
//! Interface for architecture dependent multithreading
|
//! Interface for architecture dependent multithreading
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -74,7 +74,7 @@ public:
|
||||||
//! Type of thread entry point
|
//! Type of thread entry point
|
||||||
typedef void *(*ThreadFunc)(void *);
|
typedef void *(*ThreadFunc)(void *);
|
||||||
//! Type of thread identifier
|
//! Type of thread identifier
|
||||||
typedef unsigned int ThreadID;
|
using ThreadID = unsigned int;
|
||||||
//! Types of signals
|
//! Types of signals
|
||||||
/*!
|
/*!
|
||||||
Not all platforms support all signals. Unsupported signals are
|
Not all platforms support all signals. Unsupported signals are
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class ArchThreadImpl;
|
class ArchThreadImpl;
|
||||||
typedef ArchThreadImpl *ArchThread;
|
using ArchThread = ArchThreadImpl *;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ArchSocketImpl
|
\class ArchSocketImpl
|
||||||
|
|
@ -38,7 +38,7 @@ class ArchSocketImpl;
|
||||||
\brief Opaque socket type.
|
\brief Opaque socket type.
|
||||||
An opaque type representing a socket.
|
An opaque type representing a socket.
|
||||||
*/
|
*/
|
||||||
typedef ArchSocketImpl *ArchSocket;
|
using ArchSocket = ArchSocketImpl *;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ArchNetAddressImpl
|
\class ArchNetAddressImpl
|
||||||
|
|
@ -53,7 +53,7 @@ class ArchNetAddressImpl;
|
||||||
\brief Opaque network address type.
|
\brief Opaque network address type.
|
||||||
An opaque type representing a network address.
|
An opaque type representing a network address.
|
||||||
*/
|
*/
|
||||||
typedef ArchNetAddressImpl *ArchNetAddress;
|
using ArchNetAddress = ArchNetAddressImpl *;
|
||||||
|
|
||||||
//! Interface for architecture dependent networking
|
//! Interface for architecture dependent networking
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class IArchTaskBarReceiver : public IInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Icon data is architecture dependent
|
// Icon data is architecture dependent
|
||||||
typedef void *Icon;
|
using Icon = void *;
|
||||||
|
|
||||||
//! @name manipulators
|
//! @name manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ private:
|
||||||
static void *threadSignalHandler(void *vrep);
|
static void *threadSignalHandler(void *vrep);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::list<ArchThread> ThreadList;
|
using ThreadList = std::list<ArchThread>;
|
||||||
|
|
||||||
static ArchMultithreadPosix *s_instance;
|
static ArchMultithreadPosix *s_instance;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ struct sockaddr_storage
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !HAVE_SOCKLEN_T
|
#if !HAVE_SOCKLEN_T
|
||||||
typedef int socklen_t;
|
using socklen_t = int;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
@ -52,7 +52,7 @@ typedef int socklen_t;
|
||||||
// old systems may use char* for [gs]etsockopt()'s optval argument.
|
// old systems may use char* for [gs]etsockopt()'s optval argument.
|
||||||
// this should be void on modern systems but char is forwards
|
// this should be void on modern systems but char is forwards
|
||||||
// compatible so we always use it.
|
// compatible so we always use it.
|
||||||
typedef char optval_t;
|
using optval_t = char;
|
||||||
|
|
||||||
class ArchSocketImpl
|
class ArchSocketImpl
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -385,8 +385,8 @@ void ArchDaemonWindows::setStatusError(DWORD error)
|
||||||
|
|
||||||
void ArchDaemonWindows::serviceMain(DWORD argc, LPTSTR *argvIn)
|
void ArchDaemonWindows::serviceMain(DWORD argc, LPTSTR *argvIn)
|
||||||
{
|
{
|
||||||
typedef std::vector<LPCTSTR> ArgList;
|
using ArgList = std::vector<LPCTSTR>;
|
||||||
typedef std::vector<std::string> Arguments;
|
using Arguments = std::vector<std::string>;
|
||||||
const char **argv = const_cast<const char **>(argvIn);
|
const char **argv = const_cast<const char **>(argvIn);
|
||||||
|
|
||||||
// create synchronization objects
|
// create synchronization objects
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
#ifndef ES_CONTINUOUS
|
#ifndef ES_CONTINUOUS
|
||||||
#define ES_CONTINUOUS ((DWORD)0x80000000)
|
#define ES_CONTINUOUS ((DWORD)0x80000000)
|
||||||
#endif
|
#endif
|
||||||
typedef DWORD EXECUTION_STATE;
|
using EXECUTION_STATE = DWORD;
|
||||||
|
|
||||||
//
|
//
|
||||||
// ArchMiscWindows
|
// ArchMiscWindows
|
||||||
|
|
@ -467,4 +467,4 @@ void ArchMiscWindows::setInstanceWin32(HINSTANCE instance)
|
||||||
{
|
{
|
||||||
assert(instance != NULL);
|
assert(instance != NULL);
|
||||||
s_instanceWin32 = instance;
|
s_instanceWin32 = instance;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ private:
|
||||||
static DWORD WINAPI dummySetThreadExecutionState(DWORD);
|
static DWORD WINAPI dummySetThreadExecutionState(DWORD);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::set<HWND> Dialogs;
|
using Dialogs = std::set<HWND>;
|
||||||
typedef DWORD(WINAPI *STES_t)(DWORD);
|
typedef DWORD(WINAPI *STES_t)(DWORD);
|
||||||
|
|
||||||
static Dialogs *s_dialogs;
|
static Dialogs *s_dialogs;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ private:
|
||||||
static unsigned int __stdcall threadFunc(void *vrep);
|
static unsigned int __stdcall threadFunc(void *vrep);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::list<ArchThread> ThreadList;
|
using ThreadList = std::list<ArchThread>;
|
||||||
|
|
||||||
static ArchMultithreadWindows *s_instance;
|
static ArchMultithreadWindows *s_instance;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ private:
|
||||||
void throwNameError(int);
|
void throwNameError(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::list<WSAEVENT> EventList;
|
using EventList = std::list<WSAEVENT>;
|
||||||
|
|
||||||
ArchMutex m_mutex;
|
ArchMutex m_mutex;
|
||||||
EventList m_unblockEvents;
|
EventList m_unblockEvents;
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,10 @@ private:
|
||||||
UINT m_id;
|
UINT m_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<IArchTaskBarReceiver *, ReceiverInfo> ReceiverToInfoMap;
|
using ReceiverToInfoMap = std::map<IArchTaskBarReceiver *, ReceiverInfo>;
|
||||||
typedef std::map<UINT, ReceiverToInfoMap::iterator> CIDToReceiverMap;
|
using CIDToReceiverMap = std::map<UINT, ReceiverToInfoMap::iterator>;
|
||||||
typedef std::vector<UINT> CIDStack;
|
using CIDStack = std::vector<UINT>;
|
||||||
typedef std::map<HWND, bool> Dialogs;
|
using Dialogs = std::map<HWND, bool>;
|
||||||
|
|
||||||
UINT getNextID();
|
UINT getNextID();
|
||||||
void recycleID(UINT);
|
void recycleID(UINT);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ A \c Event holds an event type and a pointer to event data.
|
||||||
class Event
|
class Event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef UInt32 Type;
|
using Type = UInt32;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
kUnknown, //!< The event type is unknown
|
kUnknown, //!< The event type is unknown
|
||||||
|
|
@ -49,7 +49,7 @@ public:
|
||||||
kLast //!< Must be last
|
kLast //!< Must be last
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef UInt32 Flags;
|
using Flags = UInt32;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
kNone = 0x00, //!< No flags
|
kNone = 0x00, //!< No flags
|
||||||
|
|
|
||||||
|
|
@ -102,14 +102,14 @@ private:
|
||||||
double m_time;
|
double m_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::set<EventQueueTimer *> Timers;
|
using Timers = std::set<EventQueueTimer *>;
|
||||||
typedef PriorityQueue<Timer> TimerQueue;
|
using TimerQueue = PriorityQueue<Timer>;
|
||||||
typedef std::map<UInt32, Event> EventTable;
|
using EventTable = std::map<UInt32, Event>;
|
||||||
typedef std::vector<UInt32> EventIDList;
|
using EventIDList = std::vector<UInt32>;
|
||||||
typedef std::map<Event::Type, const char *> TypeMap;
|
using TypeMap = std::map<Event::Type, const char *>;
|
||||||
typedef std::map<String, Event::Type> NameMap;
|
using NameMap = std::map<String, Event::Type>;
|
||||||
typedef std::map<Event::Type, IEventJob *> TypeHandlerTable;
|
using TypeHandlerTable = std::map<Event::Type, IEventJob *>;
|
||||||
typedef std::map<void *, TypeHandlerTable> HandlerTable;
|
using HandlerTable = std::map<void *, TypeHandlerTable>;
|
||||||
|
|
||||||
int m_systemTarget;
|
int m_systemTarget;
|
||||||
ArchMutex m_mutex;
|
ArchMutex m_mutex;
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ private:
|
||||||
void output(ELevel priority, char *msg);
|
void output(ELevel priority, char *msg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::list<ILogOutputter *> OutputterList;
|
using OutputterList = std::list<ILogOutputter *>;
|
||||||
|
|
||||||
static Log *s_log;
|
static Log *s_log;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,11 @@ template <
|
||||||
class PriorityQueue
|
class PriorityQueue
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename Container::value_type value_type;
|
using value_type = Container::value_type;
|
||||||
typedef typename Container::size_type size_type;
|
using size_type = Container::size_type;
|
||||||
typedef typename Container::iterator iterator;
|
using iterator = Container::iterator;
|
||||||
typedef typename Container::const_iterator const_iterator;
|
using const_iterator = Container::const_iterator;
|
||||||
typedef Container container_type;
|
using container_type = Container;
|
||||||
|
|
||||||
PriorityQueue()
|
PriorityQueue()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual void deleteTimer(EventQueueTimer *) const;
|
virtual void deleteTimer(EventQueueTimer *) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::deque<UInt32> EventDeque;
|
using EventDeque = std::deque<UInt32>;
|
||||||
|
|
||||||
ArchMutex m_queueMutex;
|
ArchMutex m_queueMutex;
|
||||||
ArchCond m_queueReadyCond;
|
ArchCond m_queueReadyCond;
|
||||||
|
|
|
||||||
|
|
@ -137,10 +137,10 @@ This outputter records the last N log messages.
|
||||||
class BufferedLogOutputter : public ILogOutputter
|
class BufferedLogOutputter : public ILogOutputter
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef std::deque<String> Buffer;
|
using Buffer = std::deque<String>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Buffer::const_iterator const_iterator;
|
using const_iterator = Buffer::const_iterator;
|
||||||
|
|
||||||
BufferedLogOutputter(UInt32 maxBufferSize);
|
BufferedLogOutputter(UInt32 maxBufferSize);
|
||||||
virtual ~BufferedLogOutputter();
|
virtual ~BufferedLogOutputter();
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,12 @@
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#else
|
#else
|
||||||
typedef signed TYPE_OF_SIZE_1 SInt8;
|
using SInt8 = signed TYPE_OF_SIZE_1;
|
||||||
typedef signed TYPE_OF_SIZE_2 SInt16;
|
using SInt16 = signed TYPE_OF_SIZE_2;
|
||||||
typedef signed TYPE_OF_SIZE_4 SInt32;
|
using SInt32 = signed TYPE_OF_SIZE_4;
|
||||||
typedef unsigned TYPE_OF_SIZE_1 UInt8;
|
using UInt8 = unsigned TYPE_OF_SIZE_1;
|
||||||
typedef unsigned TYPE_OF_SIZE_2 UInt16;
|
using UInt16 = unsigned TYPE_OF_SIZE_2;
|
||||||
typedef unsigned TYPE_OF_SIZE_4 UInt32;
|
using UInt32 = unsigned TYPE_OF_SIZE_4;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,10 @@ namespace std {
|
||||||
class stringbuf : public streambuf
|
class stringbuf : public streambuf
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char char_type;
|
using char_type = char;
|
||||||
typedef int int_type;
|
using int_type = int;
|
||||||
typedef streampos pos_type;
|
using pos_type = streampos;
|
||||||
typedef streamoff off_type;
|
using off_type = streamoff;
|
||||||
|
|
||||||
explicit stringbuf(int which = ios::in | ios::out)
|
explicit stringbuf(int which = ios::in | ios::out)
|
||||||
: streambuf(),
|
: streambuf(),
|
||||||
|
|
@ -231,10 +231,10 @@ private:
|
||||||
class istringstream : public istream
|
class istringstream : public istream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char char_type;
|
using char_type = char;
|
||||||
typedef int int_type;
|
using int_type = int;
|
||||||
typedef streampos pos_type;
|
using pos_type = streampos;
|
||||||
typedef streamoff off_type;
|
using off_type = streamoff;
|
||||||
|
|
||||||
explicit istringstream(int which = ios::in) : istream(&sb), sb(which | ios::in)
|
explicit istringstream(int which = ios::in) : istream(&sb), sb(which | ios::in)
|
||||||
{
|
{
|
||||||
|
|
@ -265,10 +265,10 @@ private:
|
||||||
class ostringstream : public ostream
|
class ostringstream : public ostream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char char_type;
|
using char_type = char;
|
||||||
typedef int int_type;
|
using int_type = int;
|
||||||
typedef streampos pos_type;
|
using pos_type = streampos;
|
||||||
typedef streamoff off_type;
|
using off_type = streamoff;
|
||||||
|
|
||||||
explicit ostringstream(int which = ios::out) : ostream(&sb), sb(which | ios::out)
|
explicit ostringstream(int which = ios::out) : ostream(&sb), sb(which | ios::out)
|
||||||
{
|
{
|
||||||
|
|
@ -300,10 +300,10 @@ private:
|
||||||
class stringstream : public iostream
|
class stringstream : public iostream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char char_type;
|
using char_type = char;
|
||||||
typedef int int_type;
|
using int_type = int;
|
||||||
typedef streampos pos_type;
|
using pos_type = streampos;
|
||||||
typedef streamoff off_type;
|
using off_type = streamoff;
|
||||||
|
|
||||||
explicit stringstream(int which = ios::out | ios::in) : iostream(&sb), sb(which)
|
explicit stringstream(int which = ios::out | ios::in) : iostream(&sb), sb(which)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include "common/stdvector.h"
|
#include "common/stdvector.h"
|
||||||
|
|
||||||
class DragInformation;
|
class DragInformation;
|
||||||
typedef std::vector<DragInformation> DragFileList;
|
using DragFileList = std::vector<DragInformation>;
|
||||||
|
|
||||||
class DragInformation
|
class DragInformation
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public:
|
||||||
arbitrary starting time. Timestamps will wrap around to 0
|
arbitrary starting time. Timestamps will wrap around to 0
|
||||||
after about 49 3/4 days.
|
after about 49 3/4 days.
|
||||||
*/
|
*/
|
||||||
typedef UInt32 Time;
|
using Time = UInt32;
|
||||||
|
|
||||||
//! Clipboard formats
|
//! Clipboard formats
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
char m_screensBuffer[1];
|
char m_screensBuffer[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::set<KeyButton> KeyButtonSet;
|
using KeyButtonSet = std::set<KeyButton>;
|
||||||
|
|
||||||
//! @name manipulators
|
//! @name manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public:
|
||||||
any modifier keys unless the KeyID is a modifier, in which case
|
any modifier keys unless the KeyID is a modifier, in which case
|
||||||
it has exactly one KeyItem for the modifier itself.
|
it has exactly one KeyItem for the modifier itself.
|
||||||
*/
|
*/
|
||||||
typedef std::vector<KeyItem> KeyItemList;
|
using KeyItemList = std::vector<KeyItem>;
|
||||||
|
|
||||||
//! A keystroke
|
//! A keystroke
|
||||||
class Keystroke
|
class Keystroke
|
||||||
|
|
@ -119,13 +119,13 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//! A sequence of keystrokes
|
//! A sequence of keystrokes
|
||||||
typedef std::vector<Keystroke> Keystrokes;
|
using Keystrokes = std::vector<Keystroke>;
|
||||||
|
|
||||||
//! A mapping of a modifier to keys for that modifier
|
//! A mapping of a modifier to keys for that modifier
|
||||||
typedef std::multimap<KeyModifierMask, KeyItem> ModifierToKeys;
|
using ModifierToKeys = std::multimap<KeyModifierMask, KeyItem>;
|
||||||
|
|
||||||
//! A set of buttons
|
//! A set of buttons
|
||||||
typedef std::map<KeyButton, const KeyItem *> ButtonToKeyMap;
|
using ButtonToKeyMap = std::map<KeyButton, const KeyItem *>;
|
||||||
|
|
||||||
//! Callback type for \c foreachKey
|
//! Callback type for \c foreachKey
|
||||||
typedef void (*ForeachKeyCallback)(KeyID, SInt32 group, KeyItem &, void *userData);
|
typedef void (*ForeachKeyCallback)(KeyID, SInt32 group, KeyItem &, void *userData);
|
||||||
|
|
@ -353,7 +353,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// A list of ways to synthesize a KeyID
|
// A list of ways to synthesize a KeyID
|
||||||
typedef std::vector<KeyItemList> KeyEntryList;
|
using KeyEntryList = std::vector<KeyItemList>;
|
||||||
|
|
||||||
// computes the number of groups
|
// computes the number of groups
|
||||||
SInt32 findNumGroups() const;
|
SInt32 findNumGroups() const;
|
||||||
|
|
@ -440,7 +440,7 @@ private:
|
||||||
static void initKeyNameMaps();
|
static void initKeyNameMaps();
|
||||||
|
|
||||||
// Ways to synthesize a KeyID over multiple keyboard groups
|
// Ways to synthesize a KeyID over multiple keyboard groups
|
||||||
typedef std::vector<KeyEntryList> KeyGroupTable;
|
using KeyGroupTable = std::vector<KeyEntryList>;
|
||||||
|
|
||||||
void addGroupToKeystroke(Keystrokes &keys, SInt32 &group, const String &lang) const;
|
void addGroupToKeystroke(Keystrokes &keys, SInt32 &group, const String &lang) const;
|
||||||
|
|
||||||
|
|
@ -454,25 +454,25 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Table of KeyID to ways to synthesize that KeyID
|
// Table of KeyID to ways to synthesize that KeyID
|
||||||
typedef std::map<KeyID, KeyGroupTable> KeyIDMap;
|
using KeyIDMap = std::map<KeyID, KeyGroupTable>;
|
||||||
|
|
||||||
// List of KeyItems that generate a particular modifier
|
// List of KeyItems that generate a particular modifier
|
||||||
typedef std::vector<const KeyItem *> ModifierKeyItemList;
|
using ModifierKeyItemList = std::vector<const KeyItem *>;
|
||||||
|
|
||||||
// Map a modifier to the KeyItems that synthesize that modifier
|
// Map a modifier to the KeyItems that synthesize that modifier
|
||||||
typedef std::vector<ModifierKeyItemList> ModifierToKeyTable;
|
using ModifierToKeyTable = std::vector<ModifierKeyItemList>;
|
||||||
|
|
||||||
// A set of keys
|
// A set of keys
|
||||||
typedef std::set<KeyID> KeySet;
|
using KeySet = std::set<KeyID>;
|
||||||
|
|
||||||
// A set of buttons
|
// A set of buttons
|
||||||
typedef std::set<KeyButton> KeyButtonSet;
|
using KeyButtonSet = std::set<KeyButton>;
|
||||||
|
|
||||||
// Key maps for parsing/formatting
|
// Key maps for parsing/formatting
|
||||||
typedef std::map<String, KeyID, deskflow::string::CaselessCmp> NameToKeyMap;
|
using NameToKeyMap = std::map<String, KeyID, deskflow::string::CaselessCmp>;
|
||||||
typedef std::map<String, KeyModifierMask, deskflow::string::CaselessCmp> NameToModifierMap;
|
using NameToModifierMap = std::map<String, KeyModifierMask, deskflow::string::CaselessCmp>;
|
||||||
typedef std::map<KeyID, String> KeyToNameMap;
|
using KeyToNameMap = std::map<KeyID, String>;
|
||||||
typedef std::map<KeyModifierMask, String> ModifierToNameMap;
|
using ModifierToNameMap = std::map<KeyModifierMask, String>;
|
||||||
|
|
||||||
// KeyID info
|
// KeyID info
|
||||||
KeyIDMap m_keyIDMap;
|
KeyIDMap m_keyIDMap;
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef deskflow::KeyMap::Keystroke Keystroke;
|
using Keystroke = deskflow::KeyMap::Keystroke;
|
||||||
|
|
||||||
//! @name protected manipulators
|
//! @name protected manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -140,8 +140,8 @@ protected:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef deskflow::KeyMap::Keystrokes Keystrokes;
|
using Keystrokes = deskflow::KeyMap::Keystrokes;
|
||||||
typedef deskflow::KeyMap::ModifierToKeys ModifierToKeys;
|
using ModifierToKeys = deskflow::KeyMap::ModifierToKeys;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct AddActiveModifierContext
|
struct AddActiveModifierContext
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public:
|
||||||
virtual std::string getToolTip() const;
|
virtual std::string getToolTip() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef std::vector<String> Clients;
|
using Clients = std::vector<String>;
|
||||||
enum EState
|
enum EState
|
||||||
{
|
{
|
||||||
kNotRunning,
|
kNotRunning,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
/*!
|
/*!
|
||||||
Type to hold a clipboard identifier.
|
Type to hold a clipboard identifier.
|
||||||
*/
|
*/
|
||||||
typedef UInt8 ClipboardID;
|
using ClipboardID = UInt8;
|
||||||
|
|
||||||
//! @name Clipboard identifiers
|
//! @name Clipboard identifiers
|
||||||
//@{
|
//@{
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,12 @@ Type to hold a key symbol identifier. The encoding is UTF-32, using
|
||||||
U+E000 through U+EFFF for the various control keys (e.g. arrow
|
U+E000 through U+EFFF for the various control keys (e.g. arrow
|
||||||
keys, function keys, modifier keys, etc).
|
keys, function keys, modifier keys, etc).
|
||||||
*/
|
*/
|
||||||
|
// Typedef has to be used on mac os as this is used in objective-C
|
||||||
|
#if __APPLE__
|
||||||
typedef UInt32 KeyID;
|
typedef UInt32 KeyID;
|
||||||
|
#else
|
||||||
|
using KeyID = UInt32;
|
||||||
|
#endif
|
||||||
|
|
||||||
//! Key Code
|
//! Key Code
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -35,19 +40,31 @@ physical key on the keyboard. KeyButton 0 is reserved to be an
|
||||||
invalid key; platforms that use 0 as a physical key identifier
|
invalid key; platforms that use 0 as a physical key identifier
|
||||||
will have to remap that value to some arbitrary unused id.
|
will have to remap that value to some arbitrary unused id.
|
||||||
*/
|
*/
|
||||||
|
#if __APPLE__
|
||||||
typedef UInt16 KeyButton;
|
typedef UInt16 KeyButton;
|
||||||
|
#else
|
||||||
|
using KeyButton = UInt16;
|
||||||
|
#endif
|
||||||
|
|
||||||
//! Modifier key mask
|
//! Modifier key mask
|
||||||
/*!
|
/*!
|
||||||
Type to hold a bitmask of key modifiers (e.g. shift keys).
|
Type to hold a bitmask of key modifiers (e.g. shift keys).
|
||||||
*/
|
*/
|
||||||
|
#if __APPLE__
|
||||||
typedef UInt32 KeyModifierMask;
|
typedef UInt32 KeyModifierMask;
|
||||||
|
#else
|
||||||
|
using KeyModifierMask = UInt32;
|
||||||
|
#endif
|
||||||
|
|
||||||
//! Modifier key ID
|
//! Modifier key ID
|
||||||
/*!
|
/*!
|
||||||
Type to hold the id of a key modifier (e.g. a shift key).
|
Type to hold the id of a key modifier (e.g. a shift key).
|
||||||
*/
|
*/
|
||||||
|
#if __APPLE__
|
||||||
typedef UInt32 KeyModifierID;
|
typedef UInt32 KeyModifierID;
|
||||||
|
#else
|
||||||
|
using KeyModifierID = UInt32;
|
||||||
|
#endif
|
||||||
|
|
||||||
//! @name Modifier key masks
|
//! @name Modifier key masks
|
||||||
//@{
|
//@{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
/*!
|
/*!
|
||||||
Type to hold a mouse button identifier.
|
Type to hold a mouse button identifier.
|
||||||
*/
|
*/
|
||||||
typedef UInt8 ButtonID;
|
using ButtonID = UInt8;
|
||||||
|
|
||||||
//! @name Mouse button identifiers
|
//! @name Mouse button identifiers
|
||||||
//@{
|
//@{
|
||||||
|
|
|
||||||
|
|
@ -25,16 +25,16 @@
|
||||||
/*!
|
/*!
|
||||||
Type to hold an option identifier.
|
Type to hold an option identifier.
|
||||||
*/
|
*/
|
||||||
typedef UInt32 OptionID;
|
using OptionID = UInt32;
|
||||||
|
|
||||||
//! Option Value
|
//! Option Value
|
||||||
/*!
|
/*!
|
||||||
Type to hold an option value.
|
Type to hold an option value.
|
||||||
*/
|
*/
|
||||||
typedef SInt32 OptionValue;
|
using OptionValue = SInt32;
|
||||||
|
|
||||||
// for now, options are just pairs of integers
|
// for now, options are just pairs of integers
|
||||||
typedef std::vector<UInt32> OptionsList;
|
using OptionsList = std::vector<UInt32>;
|
||||||
|
|
||||||
// macro for packing 4 character strings into 4 byte integers
|
// macro for packing 4 character strings into 4 byte integers
|
||||||
#define OPTION_CODE(_s) \
|
#define OPTION_CODE(_s) \
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ public:
|
||||||
private:
|
private:
|
||||||
static const UInt32 kChunkSize;
|
static const UInt32 kChunkSize;
|
||||||
|
|
||||||
typedef std::vector<UInt8> Chunk;
|
using Chunk = std::vector<UInt8>;
|
||||||
typedef std::list<Chunk> ChunkList;
|
using ChunkList = std::list<Chunk>;
|
||||||
|
|
||||||
ChunkList m_chunks;
|
ChunkList m_chunks;
|
||||||
UInt32 m_size;
|
UInt32 m_size;
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ private:
|
||||||
bool isRunning();
|
bool isRunning();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::deque<String> Buffer;
|
using Buffer = std::deque<String>;
|
||||||
|
|
||||||
IpcServer &m_ipcServer;
|
IpcServer &m_ipcServer;
|
||||||
Buffer m_buffer;
|
Buffer m_buffer;
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ private:
|
||||||
void deleteClient(IpcClientProxy *proxy);
|
void deleteClient(IpcClientProxy *proxy);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::list<IpcClientProxy *> ClientList;
|
using ClientList = std::list<IpcClientProxy *>;
|
||||||
|
|
||||||
bool m_mock;
|
bool m_mock;
|
||||||
IEventQueue *m_events;
|
IEventQueue *m_events;
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@ public:
|
||||||
private:
|
private:
|
||||||
// list of jobs. we use a list so we can safely iterate over it
|
// list of jobs. we use a list so we can safely iterate over it
|
||||||
// while other threads modify it.
|
// while other threads modify it.
|
||||||
typedef std::list<ISocketMultiplexerJob *> SocketJobs;
|
using SocketJobs = std::list<ISocketMultiplexerJob *>;
|
||||||
typedef SocketJobs::iterator JobCursor;
|
using JobCursor = SocketJobs::iterator;
|
||||||
typedef std::map<ISocket *, JobCursor> SocketJobMap;
|
using SocketJobMap = std::map<ISocket *, JobCursor>;
|
||||||
|
|
||||||
// service sockets. the service thread will only access m_sockets
|
// service sockets. the service thread will only access m_sockets
|
||||||
// and m_update while m_pollable and m_polling are true. all other
|
// and m_update while m_pollable and m_polling are true. all other
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ private:
|
||||||
static UINT getOwnershipFormat();
|
static UINT getOwnershipFormat();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<IMSWindowsClipboardConverter *> ConverterList;
|
using ConverterList = std::vector<IMSWindowsClipboardConverter *>;
|
||||||
|
|
||||||
HWND m_window;
|
HWND m_window;
|
||||||
mutable Time m_time;
|
mutable Time m_time;
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ private:
|
||||||
HWND m_foregroundWindow;
|
HWND m_foregroundWindow;
|
||||||
bool m_lowLevel;
|
bool m_lowLevel;
|
||||||
};
|
};
|
||||||
typedef std::map<String, Desk *> Desks;
|
using Desks = std::map<String, Desk *>;
|
||||||
|
|
||||||
// initialization and shutdown operations
|
// initialization and shutdown operations
|
||||||
HCURSOR createBlankCursor() const;
|
HCURSOR createBlankCursor() const;
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ protected:
|
||||||
virtual KeyModifierMask &getActiveModifiersRValue();
|
virtual KeyModifierMask &getActiveModifiersRValue();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<HKL> GroupList;
|
using GroupList = std::vector<HKL>;
|
||||||
|
|
||||||
// send ctrl+alt+del hotkey event on NT family
|
// send ctrl+alt+del hotkey event on NT family
|
||||||
static void ctrlAltDelThread(void *);
|
static void ctrlAltDelThread(void *);
|
||||||
|
|
@ -198,8 +198,8 @@ private:
|
||||||
MSWindowsKeyState &operator=(const MSWindowsKeyState &);
|
MSWindowsKeyState &operator=(const MSWindowsKeyState &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<HKL, SInt32> GroupMap;
|
using GroupMap = std::map<HKL, SInt32>;
|
||||||
typedef std::map<KeyID, UINT> KeyToVKMap;
|
using KeyToVKMap = std::map<KeyID, UINT>;
|
||||||
|
|
||||||
void *m_eventTarget;
|
void *m_eventTarget;
|
||||||
MSWindowsDesks *m_desks;
|
MSWindowsDesks *m_desks;
|
||||||
|
|
|
||||||
|
|
@ -260,10 +260,10 @@ private:
|
||||||
UINT m_keycode;
|
UINT m_keycode;
|
||||||
UINT m_mask;
|
UINT m_mask;
|
||||||
};
|
};
|
||||||
typedef std::map<UInt32, HotKeyItem> HotKeyMap;
|
using HotKeyMap = std::map<UInt32, HotKeyItem>;
|
||||||
typedef std::vector<UInt32> HotKeyIDList;
|
using HotKeyIDList = std::vector<UInt32>;
|
||||||
typedef std::map<HotKeyItem, UInt32> HotKeyToIDMap;
|
using HotKeyToIDMap = std::map<HotKeyItem, UInt32>;
|
||||||
typedef std::vector<KeyButton> PrimaryKeyDownList;
|
using PrimaryKeyDownList = std::vector<KeyButton>;
|
||||||
|
|
||||||
static HINSTANCE s_windowInstance;
|
static HINSTANCE s_windowInstance;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ private:
|
||||||
void clearConverters();
|
void clearConverters();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<IOSXClipboardConverter *> ConverterList;
|
using ConverterList = std::vector<IOSXClipboardConverter *>;
|
||||||
|
|
||||||
mutable Time m_time;
|
mutable Time m_time;
|
||||||
ConverterList m_converters;
|
ConverterList m_converters;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ A key state for OS X.
|
||||||
class OSXKeyState : public KeyState
|
class OSXKeyState : public KeyState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector<KeyID> KeyIDs;
|
using KeyIDs = std::vector<KeyID>;
|
||||||
|
|
||||||
OSXKeyState(IEventQueue *events, std::vector<String> layouts, bool isLangSyncEnabled);
|
OSXKeyState(IEventQueue *events, std::vector<String> layouts, bool isLangSyncEnabled);
|
||||||
OSXKeyState(IEventQueue *events, deskflow::KeyMap &keyMap, std::vector<String> layouts, bool isLangSyncEnabled);
|
OSXKeyState(IEventQueue *events, deskflow::KeyMap &keyMap, std::vector<String> layouts, bool isLangSyncEnabled);
|
||||||
|
|
@ -160,8 +160,8 @@ private:
|
||||||
KeyButtonOffset = 1
|
KeyButtonOffset = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<CFDataRef, SInt32> GroupMap;
|
using GroupMap = std::map<CFDataRef, SInt32>;
|
||||||
typedef std::map<UInt32, KeyID> VirtualKeyMap;
|
using VirtualKeyMap = std::map<UInt32, KeyID>;
|
||||||
|
|
||||||
VirtualKeyMap m_virtualKeyMap;
|
VirtualKeyMap m_virtualKeyMap;
|
||||||
mutable UInt32 m_deadKeyState;
|
mutable UInt32 m_deadKeyState;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
typedef int CGSConnectionID;
|
using CGSConnectionID = int;
|
||||||
CGError CGSSetConnectionProperty(CGSConnectionID cid, CGSConnectionID targetCID, CFStringRef key, CFTypeRef value);
|
CGError CGSSetConnectionProperty(CGSConnectionID cid, CGSConnectionID targetCID, CFStringRef key, CFTypeRef value);
|
||||||
int _CGSDefaultConnection();
|
int _CGSDefaultConnection();
|
||||||
}
|
}
|
||||||
|
|
@ -242,10 +242,10 @@ private:
|
||||||
std::bitset<NumButtonIDs> m_buttons;
|
std::bitset<NumButtonIDs> m_buttons;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<UInt32, HotKeyItem> HotKeyMap;
|
using HotKeyMap = std::map<UInt32, HotKeyItem>;
|
||||||
typedef std::vector<UInt32> HotKeyIDList;
|
using HotKeyIDList = std::vector<UInt32>;
|
||||||
typedef std::map<KeyModifierMask, UInt32> ModifierHotKeyMap;
|
using ModifierHotKeyMap = std::map<KeyModifierMask, UInt32>;
|
||||||
typedef std::map<HotKeyItem, UInt32> HotKeyToIDMap;
|
using HotKeyToIDMap = std::map<HotKeyItem, UInt32>;
|
||||||
|
|
||||||
// true if screen is being used as a primary screen, false otherwise
|
// true if screen is being used as a primary screen, false otherwise
|
||||||
bool m_isPrimary;
|
bool m_isPrimary;
|
||||||
|
|
@ -272,7 +272,7 @@ private:
|
||||||
Evil, and this should be moved to a place where it need not
|
Evil, and this should be moved to a place where it need not
|
||||||
be mutable as soon as possible. */
|
be mutable as soon as possible. */
|
||||||
mutable MouseButtonState m_buttonState;
|
mutable MouseButtonState m_buttonState;
|
||||||
typedef std::map<UInt16, CGEventType> MouseButtonEventMapType;
|
using MouseButtonEventMapType = std::map<UInt16, CGEventType>;
|
||||||
std::vector<MouseButtonEventMapType> MouseButtonEventMap;
|
std::vector<MouseButtonEventMapType> MouseButtonEventMap;
|
||||||
|
|
||||||
bool m_cursorHidden;
|
bool m_cursorHidden;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
|
|
||||||
typedef TISInputSourceRef KeyLayout;
|
using KeyLayout = TISInputSourceRef;
|
||||||
|
|
||||||
class OSXUchrKeyResource : public IOSXKeyResource
|
class OSXUchrKeyResource : public IOSXKeyResource
|
||||||
{
|
{
|
||||||
|
|
@ -38,7 +38,7 @@ public:
|
||||||
virtual KeyID getKey(UInt32 table, UInt32 button) const;
|
virtual KeyID getKey(UInt32 table, UInt32 button) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<KeyID> KeySequence;
|
using KeySequence = std::vector<KeyID>;
|
||||||
|
|
||||||
bool getDeadKey(KeySequence &keys, UInt16 index) const;
|
bool getDeadKey(KeySequence &keys, UInt16 index) const;
|
||||||
bool getKeyRecord(KeySequence &keys, UInt16 index, UInt16 &state) const;
|
bool getKeyRecord(KeySequence &keys, UInt16 index, UInt16 &state) const;
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,7 @@ void XWindowsClipboard::motifFillCache()
|
||||||
auto formats = static_cast<const SInt32 *>(static_cast<const void *>(item.m_size + data.data()));
|
auto formats = static_cast<const SInt32 *>(static_cast<const void *>(item.m_size + data.data()));
|
||||||
|
|
||||||
// get the available formats
|
// get the available formats
|
||||||
typedef std::map<Atom, String> MotifFormatMap;
|
using MotifFormatMap = std::map<Atom, String>;
|
||||||
MotifFormatMap motifFormats;
|
MotifFormatMap motifFormats;
|
||||||
for (SInt32 i = 0; i < numFormats; ++i) {
|
for (SInt32 i = 0; i < numFormats; ++i) {
|
||||||
// get Motif format property from the root window
|
// get Motif format property from the root window
|
||||||
|
|
|
||||||
|
|
@ -258,9 +258,9 @@ protected:
|
||||||
// index of next byte in m_data to send
|
// index of next byte in m_data to send
|
||||||
UInt32 m_ptr;
|
UInt32 m_ptr;
|
||||||
};
|
};
|
||||||
typedef std::list<Reply *> ReplyList;
|
using ReplyList = std::list<Reply *>;
|
||||||
typedef std::map<Window, ReplyList> ReplyMap;
|
using ReplyMap = std::map<Window, ReplyList>;
|
||||||
typedef std::map<Window, long> ReplyEventMask;
|
using ReplyEventMask = std::map<Window, long>;
|
||||||
|
|
||||||
// ICCCM interoperability methods
|
// ICCCM interoperability methods
|
||||||
void icccmFillCache();
|
void icccmFillCache();
|
||||||
|
|
@ -291,7 +291,7 @@ protected:
|
||||||
Atom getTimestampData(String &, int *format) const;
|
Atom getTimestampData(String &, int *format) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<IXWindowsClipboardConverter *> ConverterList;
|
using ConverterList = std::vector<IXWindowsClipboardConverter *>;
|
||||||
|
|
||||||
Display *m_display;
|
Display *m_display;
|
||||||
Window m_window;
|
Window m_window;
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ private:
|
||||||
int getPendingCountLocked();
|
int getPendingCountLocked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<XEvent> EventList;
|
using EventList = std::vector<XEvent>;
|
||||||
|
|
||||||
Mutex m_mutex;
|
Mutex m_mutex;
|
||||||
Display *m_display;
|
Display *m_display;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ A key state for X Windows.
|
||||||
class XWindowsKeyState : public KeyState
|
class XWindowsKeyState : public KeyState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector<int> KeycodeList;
|
using KeycodeList = std::vector<int>;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
kGroupPoll = -1,
|
kGroupPoll = -1,
|
||||||
|
|
@ -142,13 +142,13 @@ private:
|
||||||
#ifdef TEST_ENV
|
#ifdef TEST_ENV
|
||||||
public: // yuck
|
public: // yuck
|
||||||
#endif
|
#endif
|
||||||
typedef std::vector<KeyModifierMask> KeyModifierMaskList;
|
using KeyModifierMaskList = std::vector<KeyModifierMask>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<KeyModifierMask, unsigned int> KeyModifierToXMask;
|
using KeyModifierToXMask = std::map<KeyModifierMask, unsigned int>;
|
||||||
typedef std::multimap<KeyID, KeyCode> KeyToKeyCodeMap;
|
using KeyToKeyCodeMap = std::multimap<KeyID, KeyCode>;
|
||||||
typedef std::map<KeyCode, unsigned int> NonXKBModifierMap;
|
using NonXKBModifierMap = std::map<KeyCode, unsigned int>;
|
||||||
typedef std::map<UInt32, XKBModifierInfo> XKBModifierMap;
|
using XKBModifierMap = std::map<UInt32, XKBModifierInfo>;
|
||||||
|
|
||||||
Display *m_display;
|
Display *m_display;
|
||||||
#if HAVE_XKB_EXTENSION
|
#if HAVE_XKB_EXTENSION
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,11 @@ private:
|
||||||
int m_keycode;
|
int m_keycode;
|
||||||
unsigned int m_mask;
|
unsigned int m_mask;
|
||||||
};
|
};
|
||||||
typedef std::set<bool> FilteredKeycodes;
|
using FilteredKeycodes = std::set<bool>;
|
||||||
typedef std::vector<std::pair<int, unsigned int>> HotKeyList;
|
using HotKeyList = std::vector<std::pair<int, unsigned int>>;
|
||||||
typedef std::map<UInt32, HotKeyList> HotKeyMap;
|
using HotKeyMap = std::map<UInt32, HotKeyList>;
|
||||||
typedef std::vector<UInt32> HotKeyIDList;
|
using HotKeyIDList = std::vector<UInt32>;
|
||||||
typedef std::map<HotKeyItem, UInt32> HotKeyToIDMap;
|
using HotKeyToIDMap = std::map<HotKeyItem, UInt32>;
|
||||||
|
|
||||||
// true if screen is being used as a primary screen, false otherwise
|
// true if screen is being used as a primary screen, false otherwise
|
||||||
bool m_isPrimary;
|
bool m_isPrimary;
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ private:
|
||||||
bool isDPMSActivated() const;
|
bool isDPMSActivated() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<Window, long> WatchList;
|
using WatchList = std::map<Window, long>;
|
||||||
|
|
||||||
// the X display
|
// the X display
|
||||||
Display *m_display;
|
Display *m_display;
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ private:
|
||||||
void removeUnknownClient(ClientProxyUnknown *unknownClient);
|
void removeUnknownClient(ClientProxyUnknown *unknownClient);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::set<ClientProxyUnknown *> NewClients;
|
using NewClients = std::set<ClientProxyUnknown *>;
|
||||||
typedef std::deque<ClientProxy *> WaitingClients;
|
using WaitingClients = std::deque<ClientProxy *>;
|
||||||
typedef std::set<IDataSocket *> ClientSockets;
|
using ClientSockets = std::set<IDataSocket *>;
|
||||||
|
|
||||||
IListenSocket *m_listen;
|
IListenSocket *m_listen;
|
||||||
ISocketFactory *m_socketFactory;
|
ISocketFactory *m_socketFactory;
|
||||||
|
|
|
||||||
|
|
@ -1655,7 +1655,7 @@ std::ostream &operator<<(std::ostream &s, const Config &config)
|
||||||
// aliases section (if there are any)
|
// aliases section (if there are any)
|
||||||
if (config.m_map.size() != config.m_nameToCanonicalName.size()) {
|
if (config.m_map.size() != config.m_nameToCanonicalName.size()) {
|
||||||
// map canonical to alias
|
// map canonical to alias
|
||||||
typedef std::multimap<String, String, CaselessCmp> CMNameMap;
|
using CMNameMap = std::multimap<String, String, CaselessCmp>;
|
||||||
CMNameMap aliases;
|
CMNameMap aliases;
|
||||||
for (Config::NameMap::const_iterator index = config.m_nameToCanonicalName.begin();
|
for (Config::NameMap::const_iterator index = config.m_nameToCanonicalName.begin();
|
||||||
index != config.m_nameToCanonicalName.end(); ++index) {
|
index != config.m_nameToCanonicalName.end(); ++index) {
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,11 @@ class IEventQueue;
|
||||||
namespace std {
|
namespace std {
|
||||||
template <> struct iterator_traits<deskflow::server::Config>
|
template <> struct iterator_traits<deskflow::server::Config>
|
||||||
{
|
{
|
||||||
typedef String value_type;
|
using value_type = String;
|
||||||
typedef ptrdiff_t difference_type;
|
using difference_type = ptrdiff_t;
|
||||||
typedef bidirectional_iterator_tag iterator_category;
|
using iterator_category = bidirectional_iterator_tag;
|
||||||
typedef String *pointer;
|
using pointer = String *;
|
||||||
typedef String &reference;
|
using reference = String &;
|
||||||
};
|
};
|
||||||
}; // namespace std
|
}; // namespace std
|
||||||
|
|
||||||
|
|
@ -63,8 +63,8 @@ namespace and must be unique.
|
||||||
class Config
|
class Config
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::map<OptionID, OptionValue> ScreenOptions;
|
using ScreenOptions = std::map<OptionID, OptionValue>;
|
||||||
typedef std::pair<float, float> Interval;
|
using Interval = std::pair<float, float>;
|
||||||
|
|
||||||
class CellEdge
|
class CellEdge
|
||||||
{
|
{
|
||||||
|
|
@ -119,10 +119,10 @@ private:
|
||||||
class Cell
|
class Cell
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef std::map<CellEdge, CellEdge> EdgeLinks;
|
using EdgeLinks = std::map<CellEdge, CellEdge>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef EdgeLinks::const_iterator const_iterator;
|
using const_iterator = EdgeLinks::const_iterator;
|
||||||
|
|
||||||
bool add(const CellEdge &src, const CellEdge &dst);
|
bool add(const CellEdge &src, const CellEdge &dst);
|
||||||
void remove(EDirection side);
|
void remove(EDirection side);
|
||||||
|
|
@ -147,13 +147,13 @@ private:
|
||||||
public:
|
public:
|
||||||
ScreenOptions m_options;
|
ScreenOptions m_options;
|
||||||
};
|
};
|
||||||
typedef std::map<String, Cell, deskflow::string::CaselessCmp> CellMap;
|
using CellMap = std::map<String, Cell, deskflow::string::CaselessCmp>;
|
||||||
typedef std::map<String, String, deskflow::string::CaselessCmp> NameMap;
|
using NameMap = std::map<String, String, deskflow::string::CaselessCmp>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Cell::const_iterator link_const_iterator;
|
using link_const_iterator = Cell::const_iterator;
|
||||||
typedef CellMap::const_iterator internal_const_iterator;
|
using internal_const_iterator = CellMap::const_iterator;
|
||||||
typedef NameMap::const_iterator all_const_iterator;
|
using all_const_iterator = NameMap::const_iterator;
|
||||||
class const_iterator : std::iterator_traits<Config>
|
class const_iterator : std::iterator_traits<Config>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -522,7 +522,7 @@ Maintains a context when reading a configuration from a stream.
|
||||||
class ConfigReadContext
|
class ConfigReadContext
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector<String> ArgList;
|
using ArgList = std::vector<String>;
|
||||||
|
|
||||||
ConfigReadContext(std::istream &, SInt32 firstLine = 1);
|
ConfigReadContext(std::istream &, SInt32 firstLine = 1);
|
||||||
~ConfigReadContext();
|
~ConfigReadContext();
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ public:
|
||||||
void copy(const Rule &);
|
void copy(const Rule &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<Action *> ActionList;
|
using ActionList = std::vector<Action *>;
|
||||||
|
|
||||||
Condition *m_condition;
|
Condition *m_condition;
|
||||||
ActionList m_activateActions;
|
ActionList m_activateActions;
|
||||||
|
|
@ -364,7 +364,7 @@ public:
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Input Filter Class
|
// Input Filter Class
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
typedef std::vector<Rule> RuleList;
|
using RuleList = std::vector<Rule>;
|
||||||
|
|
||||||
InputFilter(IEventQueue *events);
|
InputFilter(IEventQueue *events);
|
||||||
InputFilter(const InputFilter &);
|
InputFilter(const InputFilter &);
|
||||||
|
|
|
||||||
|
|
@ -2112,7 +2112,7 @@ void Server::closeClients(const ServerConfig &config)
|
||||||
{
|
{
|
||||||
// collect the clients that are connected but are being dropped
|
// collect the clients that are connected but are being dropped
|
||||||
// from the configuration (or who's canonical name is changing).
|
// from the configuration (or who's canonical name is changing).
|
||||||
typedef std::set<BaseClientProxy *> RemovedClients;
|
using RemovedClients = std::set<BaseClientProxy *>;
|
||||||
RemovedClients removed;
|
RemovedClients removed;
|
||||||
for (ClientList::iterator index = m_clients.begin(); index != m_clients.end(); ++index) {
|
for (ClientList::iterator index = m_clients.begin(); index != m_clients.end(); ++index) {
|
||||||
if (!config.isCanonicalName(index->first)) {
|
if (!config.isCanonicalName(index->first)) {
|
||||||
|
|
|
||||||
|
|
@ -436,13 +436,13 @@ private:
|
||||||
PrimaryClient *m_primaryClient;
|
PrimaryClient *m_primaryClient;
|
||||||
|
|
||||||
// all clients (including the primary client) indexed by name
|
// all clients (including the primary client) indexed by name
|
||||||
typedef std::map<String, BaseClientProxy *> ClientList;
|
using ClientList = std::map<String, BaseClientProxy *>;
|
||||||
typedef std::set<BaseClientProxy *> ClientSet;
|
using ClientSet = std::set<BaseClientProxy *>;
|
||||||
ClientList m_clients;
|
ClientList m_clients;
|
||||||
ClientSet m_clientSet;
|
ClientSet m_clientSet;
|
||||||
|
|
||||||
// all old connections that we're waiting to hangup
|
// all old connections that we're waiting to hangup
|
||||||
typedef std::map<BaseClientProxy *, EventQueueTimer *> OldClients;
|
using OldClients = std::map<BaseClientProxy *, EventQueueTimer *>;
|
||||||
OldClients m_oldClients;
|
OldClients m_oldClients;
|
||||||
|
|
||||||
// the client with focus
|
// the client with focus
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,6 @@ public:
|
||||||
|
|
||||||
typedef ::testing::NiceMock<MockKeyState> KeyStateImpl;
|
typedef ::testing::NiceMock<MockKeyState> KeyStateImpl;
|
||||||
|
|
||||||
typedef UInt32 KeyID;
|
using KeyID = UInt32;
|
||||||
|
|
||||||
typedef void (*ForeachKeyCallback)(KeyID, SInt32 group, deskflow::KeyMap::KeyItem &, void *userData);
|
typedef void (*ForeachKeyCallback)(KeyID, SInt32 group, deskflow::KeyMap::KeyItem &, void *userData);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue