Reformat all code parts
This commit is contained in:
parent
1820c9cd10
commit
6307ee4b65
15 changed files with 392 additions and 382 deletions
|
|
@ -19,8 +19,8 @@
|
||||||
#define ANBOX_APPLICATION_MANAGER_H_
|
#define ANBOX_APPLICATION_MANAGER_H_
|
||||||
|
|
||||||
#include "anbox/android/intent.h"
|
#include "anbox/android/intent.h"
|
||||||
#include "anbox/graphics/rect.h"
|
|
||||||
#include "anbox/do_not_copy_or_move.h"
|
#include "anbox/do_not_copy_or_move.h"
|
||||||
|
#include "anbox/graphics/rect.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,14 +105,16 @@ void cli::CommandWithSubcommands::help(std::ostream& out) {
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
if (flags_.size() > 0) {
|
if (flags_.size() > 0) {
|
||||||
out << std::endl << pattern::options << std::endl;
|
out << std::endl
|
||||||
|
<< pattern::options << std::endl;
|
||||||
for (const auto& flag : flags_)
|
for (const auto& flag : flags_)
|
||||||
out << boost::format(pattern::option) % flag->name() % flag->description()
|
out << boost::format(pattern::option) % flag->name() % flag->description()
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands_.size() > 0) {
|
if (commands_.size() > 0) {
|
||||||
out << std::endl << pattern::commands << std::endl;
|
out << std::endl
|
||||||
|
<< pattern::commands << std::endl;
|
||||||
for (const auto& cmd : commands_) {
|
for (const auto& cmd : commands_) {
|
||||||
if (cmd.second)
|
if (cmd.second)
|
||||||
out << boost::format(pattern::command) % cmd.second->name() %
|
out << boost::format(pattern::command) % cmd.second->name() %
|
||||||
|
|
@ -222,7 +224,8 @@ void cli::CommandWithFlagsAndAction::help(std::ostream& out) {
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
if (flags_.size() > 0) {
|
if (flags_.size() > 0) {
|
||||||
out << std::endl << boost::format(pattern::options) << std::endl;
|
out << std::endl
|
||||||
|
<< boost::format(pattern::options) << std::endl;
|
||||||
for (const auto& flag : flags_)
|
for (const auto& flag : flags_)
|
||||||
out << boost::format(pattern::option) % flag->name() % flag->description()
|
out << boost::format(pattern::option) % flag->name() % flag->description()
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
|
||||||
|
|
@ -198,8 +198,8 @@ class Command : public DoNotCopyOrMove {
|
||||||
|
|
||||||
/// @brief Context bundles information passed to Command::run invocations.
|
/// @brief Context bundles information passed to Command::run invocations.
|
||||||
struct Context {
|
struct Context {
|
||||||
std::istream& cin; ///< The std::istream that should be used for reading.
|
std::istream& cin; ///< The std::istream that should be used for reading.
|
||||||
std::ostream& cout; ///< The std::ostream that should be used for writing.
|
std::ostream& cout; ///< The std::ostream that should be used for writing.
|
||||||
std::vector<std::string> args; ///< The command line args.
|
std::vector<std::string> args; ///< The command line args.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,50 +16,49 @@
|
||||||
|
|
||||||
namespace anbox {
|
namespace anbox {
|
||||||
namespace common {
|
namespace common {
|
||||||
MessageChannelBase::MessageChannelBase(size_t capacity) :
|
MessageChannelBase::MessageChannelBase(size_t capacity) : pos_(0U),
|
||||||
pos_(0U),
|
count_(0U),
|
||||||
count_(0U),
|
capacity_(capacity),
|
||||||
capacity_(capacity),
|
lock_(),
|
||||||
lock_(),
|
can_read_(),
|
||||||
can_read_(),
|
can_write_() {}
|
||||||
can_write_() {}
|
|
||||||
|
|
||||||
MessageChannelBase::~MessageChannelBase() {}
|
MessageChannelBase::~MessageChannelBase() {}
|
||||||
|
|
||||||
size_t MessageChannelBase::before_write() {
|
size_t MessageChannelBase::before_write() {
|
||||||
std::unique_lock<std::mutex> l(lock_, std::defer_lock);
|
std::unique_lock<std::mutex> l(lock_, std::defer_lock);
|
||||||
lock_.lock();
|
lock_.lock();
|
||||||
|
|
||||||
while (count_ >= capacity_)
|
while (count_ >= capacity_)
|
||||||
can_write_.wait(l);
|
can_write_.wait(l);
|
||||||
|
|
||||||
size_t result = pos_ + count_;
|
size_t result = pos_ + count_;
|
||||||
if (result >= capacity_)
|
if (result >= capacity_)
|
||||||
result -= capacity_;
|
result -= capacity_;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageChannelBase::after_write() {
|
void MessageChannelBase::after_write() {
|
||||||
count_++;
|
count_++;
|
||||||
can_read_.notify_one();
|
can_read_.notify_one();
|
||||||
lock_.unlock();
|
lock_.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t MessageChannelBase::before_read() {
|
size_t MessageChannelBase::before_read() {
|
||||||
std::unique_lock<std::mutex> l(lock_, std::defer_lock);
|
std::unique_lock<std::mutex> l(lock_, std::defer_lock);
|
||||||
lock_.lock();
|
lock_.lock();
|
||||||
while (count_ == 0)
|
while (count_ == 0)
|
||||||
can_read_.wait(l);
|
can_read_.wait(l);
|
||||||
return pos_;
|
return pos_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageChannelBase::after_read() {
|
void MessageChannelBase::after_read() {
|
||||||
if (++pos_ == capacity_)
|
if (++pos_ == capacity_)
|
||||||
pos_ = 0U;
|
pos_ = 0U;
|
||||||
count_--;
|
count_--;
|
||||||
can_write_.notify_one();
|
can_write_.notify_one();
|
||||||
lock_.unlock();
|
lock_.unlock();
|
||||||
}
|
}
|
||||||
} // namespace common
|
} // namespace common
|
||||||
} // namespace anbox
|
} // namespace anbox
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include <mutex>
|
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
namespace anbox {
|
namespace anbox {
|
||||||
namespace common {
|
namespace common {
|
||||||
|
|
@ -26,41 +26,41 @@ namespace common {
|
||||||
// Base non-templated class used to reduce the amount of template
|
// Base non-templated class used to reduce the amount of template
|
||||||
// specialization.
|
// specialization.
|
||||||
class MessageChannelBase {
|
class MessageChannelBase {
|
||||||
public:
|
public:
|
||||||
// Constructor. |capacity| is the buffer capacity in messages.
|
// Constructor. |capacity| is the buffer capacity in messages.
|
||||||
MessageChannelBase(size_t capacity);
|
MessageChannelBase(size_t capacity);
|
||||||
|
|
||||||
// Destructor.
|
// Destructor.
|
||||||
~MessageChannelBase();
|
~MessageChannelBase();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Call this method in the sender thread before writing a new message.
|
// Call this method in the sender thread before writing a new message.
|
||||||
// This returns the position of the available slot in the message array
|
// This returns the position of the available slot in the message array
|
||||||
// where to copy the new fixed-size message. After the copy, call
|
// where to copy the new fixed-size message. After the copy, call
|
||||||
// afterWrite().
|
// afterWrite().
|
||||||
size_t before_write();
|
size_t before_write();
|
||||||
|
|
||||||
// To be called after beforeWrite() and copying a new fixed-size message
|
// To be called after beforeWrite() and copying a new fixed-size message
|
||||||
// into the array. This signal the receiver thread that there is a new
|
// into the array. This signal the receiver thread that there is a new
|
||||||
// incoming message.
|
// incoming message.
|
||||||
void after_write();
|
void after_write();
|
||||||
|
|
||||||
// Call this method in the receiver thread before reading a new message.
|
// Call this method in the receiver thread before reading a new message.
|
||||||
// This returns the position in the message array where the new message
|
// This returns the position in the message array where the new message
|
||||||
// can be read. Caller must process the message, then call afterRead().
|
// can be read. Caller must process the message, then call afterRead().
|
||||||
size_t before_read();
|
size_t before_read();
|
||||||
|
|
||||||
// To be called in the receiver thread after beforeRead() and processing
|
// To be called in the receiver thread after beforeRead() and processing
|
||||||
// the corresponding message.
|
// the corresponding message.
|
||||||
void after_read();
|
void after_read();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t pos_;
|
size_t pos_;
|
||||||
size_t count_;
|
size_t count_;
|
||||||
size_t capacity_;
|
size_t capacity_;
|
||||||
std::mutex lock_;
|
std::mutex lock_;
|
||||||
std::condition_variable can_read_;
|
std::condition_variable can_read_;
|
||||||
std::condition_variable can_write_;
|
std::condition_variable can_write_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Helper class used to implement an uni-directional IPC channel between
|
// Helper class used to implement an uni-directional IPC channel between
|
||||||
|
|
@ -75,25 +75,25 @@ private:
|
||||||
//
|
//
|
||||||
template <typename T, size_t CAPACITY>
|
template <typename T, size_t CAPACITY>
|
||||||
class MessageChannel : public MessageChannelBase {
|
class MessageChannel : public MessageChannelBase {
|
||||||
public:
|
public:
|
||||||
MessageChannel() : MessageChannelBase(CAPACITY) {}
|
MessageChannel() : MessageChannelBase(CAPACITY) {}
|
||||||
|
|
||||||
void send(const T& msg) {
|
void send(const T& msg) {
|
||||||
size_t pos = before_write();
|
size_t pos = before_write();
|
||||||
mItems[pos] = msg;
|
mItems[pos] = msg;
|
||||||
after_write();
|
after_write();
|
||||||
}
|
}
|
||||||
|
|
||||||
void receive(T* msg) {
|
void receive(T* msg) {
|
||||||
size_t pos = before_read();
|
size_t pos = before_read();
|
||||||
*msg = mItems[pos];
|
*msg = mItems[pos];
|
||||||
after_read();
|
after_read();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T mItems[CAPACITY];
|
T mItems[CAPACITY];
|
||||||
};
|
};
|
||||||
} // namespace common
|
} // namespace common
|
||||||
} // namespace anbox
|
} // namespace anbox
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -23,48 +23,49 @@ namespace anbox {
|
||||||
namespace common {
|
namespace common {
|
||||||
|
|
||||||
struct FreeDelete {
|
struct FreeDelete {
|
||||||
template <class T>
|
template <class T>
|
||||||
void operator()(T ptr) const {
|
void operator()(T ptr) const {
|
||||||
free((void*)ptr);
|
free((void*)ptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Func>
|
template <class Func>
|
||||||
struct FuncDelete {
|
struct FuncDelete {
|
||||||
explicit FuncDelete(Func f = {}) : mF(f) {}
|
explicit FuncDelete(Func f = {}) : mF(f) {}
|
||||||
|
|
||||||
FuncDelete(const FuncDelete& other) = default;
|
FuncDelete(const FuncDelete& other) = default;
|
||||||
FuncDelete(FuncDelete&& other) = default;
|
FuncDelete(FuncDelete&& other) = default;
|
||||||
FuncDelete& operator=(const FuncDelete& other) = default;
|
FuncDelete& operator=(const FuncDelete& other) = default;
|
||||||
FuncDelete& operator=(FuncDelete&& other) = default;
|
FuncDelete& operator=(FuncDelete&& other) = default;
|
||||||
|
|
||||||
// To be able to copy/move from all compatible template instantiations.
|
// To be able to copy/move from all compatible template instantiations.
|
||||||
template <class U> friend struct FuncDelete;
|
template <class U>
|
||||||
|
friend struct FuncDelete;
|
||||||
|
|
||||||
// Template constructors and move assignment from compatible instantiations.
|
// Template constructors and move assignment from compatible instantiations.
|
||||||
template <class U>
|
template <class U>
|
||||||
FuncDelete(const FuncDelete<U>& other) : mF(other.mF) {}
|
FuncDelete(const FuncDelete<U>& other) : mF(other.mF) {}
|
||||||
template <class U>
|
template <class U>
|
||||||
FuncDelete(FuncDelete<U>&& other) : mF(std::move(other.mF)) {}
|
FuncDelete(FuncDelete<U>&& other) : mF(std::move(other.mF)) {}
|
||||||
template <class U>
|
template <class U>
|
||||||
FuncDelete& operator=(const FuncDelete<U>& other) {
|
FuncDelete& operator=(const FuncDelete<U>& other) {
|
||||||
mF = other.mF;
|
mF = other.mF;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template <class U>
|
template <class U>
|
||||||
FuncDelete& operator=(FuncDelete<U>&& other) {
|
FuncDelete& operator=(FuncDelete<U>&& other) {
|
||||||
mF = std::move(other.mF);
|
mF = std::move(other.mF);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the actual deleter call.
|
// This is the actual deleter call.
|
||||||
template <class T>
|
template <class T>
|
||||||
void operator()(T t) const {
|
void operator()(T t) const {
|
||||||
mF(t);
|
mF(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Func mF;
|
Func mF;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, class Deleter = std::default_delete<T>>
|
template <class T, class Deleter = std::default_delete<T>>
|
||||||
|
|
@ -85,13 +86,13 @@ template <class T,
|
||||||
class = enable_if_c<std::is_same<T, std::nullptr_t>::value ||
|
class = enable_if_c<std::is_same<T, std::nullptr_t>::value ||
|
||||||
std::is_pointer<T>::value>>
|
std::is_pointer<T>::value>>
|
||||||
ScopedCustomPtr<
|
ScopedCustomPtr<
|
||||||
typename std::decay<typename std::remove_pointer<T>::type>::type,
|
typename std::decay<typename std::remove_pointer<T>::type>::type,
|
||||||
typename std::decay<Func>::type>
|
typename std::decay<Func>::type>
|
||||||
makeCustomScopedPtr(T data, Func deleter) {
|
makeCustomScopedPtr(T data, Func deleter) {
|
||||||
return ScopedCustomPtr<
|
return ScopedCustomPtr<
|
||||||
typename std::decay<typename std::remove_pointer<T>::type>::type,
|
typename std::decay<typename std::remove_pointer<T>::type>::type,
|
||||||
typename std::decay<Func>::type>(
|
typename std::decay<Func>::type>(
|
||||||
data, FuncDelete<typename std::decay<Func>::type>(deleter));
|
data, FuncDelete<typename std::decay<Func>::type>(deleter));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace common
|
} // namespace common
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,11 @@
|
||||||
#include "anbox/container/client.h"
|
#include "anbox/container/client.h"
|
||||||
#include "anbox/config.h"
|
#include "anbox/config.h"
|
||||||
#include "anbox/container/management_api_stub.h"
|
#include "anbox/container/management_api_stub.h"
|
||||||
|
#include "anbox/logger.h"
|
||||||
#include "anbox/network/local_socket_messenger.h"
|
#include "anbox/network/local_socket_messenger.h"
|
||||||
#include "anbox/rpc/channel.h"
|
#include "anbox/rpc/channel.h"
|
||||||
#include "anbox/rpc/message_processor.h"
|
#include "anbox/rpc/message_processor.h"
|
||||||
#include "anbox/rpc/pending_call_cache.h"
|
#include "anbox/rpc/pending_call_cache.h"
|
||||||
#include "anbox/logger.h"
|
|
||||||
|
|
||||||
namespace ba = boost::asio;
|
namespace ba = boost::asio;
|
||||||
namespace bs = boost::system;
|
namespace bs = boost::system;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ ApplicationManager::ApplicationManager(
|
||||||
reader >> top;
|
reader >> top;
|
||||||
reader >> right;
|
reader >> right;
|
||||||
reader >> bottom;
|
reader >> bottom;
|
||||||
graphics::Rect launch_bounds{left,top,right,bottom};
|
graphics::Rect launch_bounds{left, top, right, bottom};
|
||||||
|
|
||||||
core::dbus::Message::Ptr reply;
|
core::dbus::Message::Ptr reply;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ static EGLint rcChooseConfig(EGLint *attribs, uint32_t attribs_size,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return renderer->getConfigs()->chooseConfig(attribs, (EGLint *)configs,
|
return renderer->getConfigs()->chooseConfig(attribs, (EGLint *)configs,
|
||||||
(EGLint)configs_size);
|
(EGLint)configs_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static EGLint rcGetFBParam(EGLint param) {
|
static EGLint rcGetFBParam(EGLint param) {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class RenderThread : public emugl::Thread {
|
||||||
// decoding operations between all threads.
|
// decoding operations between all threads.
|
||||||
// TODO(digit): Why is this needed here? Shouldn't this be handled
|
// TODO(digit): Why is this needed here? Shouldn't this be handled
|
||||||
// by the decoders themselves or at a lower-level?
|
// by the decoders themselves or at a lower-level?
|
||||||
static RenderThread* create(const std::shared_ptr<Renderer> &renderer, IOStream* stream, emugl::Mutex* mutex);
|
static RenderThread* create(const std::shared_ptr<Renderer>& renderer, IOStream* stream, emugl::Mutex* mutex);
|
||||||
|
|
||||||
// Destructor.
|
// Destructor.
|
||||||
virtual ~RenderThread();
|
virtual ~RenderThread();
|
||||||
|
|
@ -51,7 +51,7 @@ class RenderThread : public emugl::Thread {
|
||||||
private:
|
private:
|
||||||
RenderThread(); // No default constructor
|
RenderThread(); // No default constructor
|
||||||
|
|
||||||
RenderThread(const std::shared_ptr<Renderer> &renderer, IOStream* stream, emugl::Mutex* mutex);
|
RenderThread(const std::shared_ptr<Renderer>& renderer, IOStream* stream, emugl::Mutex* mutex);
|
||||||
|
|
||||||
virtual intptr_t main();
|
virtual intptr_t main();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ bool Renderer::initialize(EGLNativeDisplayType nativeDisplay) {
|
||||||
|
|
||||||
GL_LOG("attempting to create egl context");
|
GL_LOG("attempting to create egl context");
|
||||||
m_eglContext = s_egl.eglCreateContext(m_eglDisplay, m_eglConfig,
|
m_eglContext = s_egl.eglCreateContext(m_eglDisplay, m_eglConfig,
|
||||||
EGL_NO_CONTEXT, glContextAttribs);
|
EGL_NO_CONTEXT, glContextAttribs);
|
||||||
if (m_eglContext == EGL_NO_CONTEXT) {
|
if (m_eglContext == EGL_NO_CONTEXT) {
|
||||||
ERR("Failed to create context 0x%x\n", s_egl.eglGetError());
|
ERR("Failed to create context 0x%x\n", s_egl.eglGetError());
|
||||||
free(gles1Extensions);
|
free(gles1Extensions);
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,9 @@ class WindowSurface {
|
||||||
bool flushColorBuffer();
|
bool flushColorBuffer();
|
||||||
|
|
||||||
// Used by bind() below.
|
// Used by bind() below.
|
||||||
enum BindType { BIND_READ, BIND_DRAW, BIND_READDRAW };
|
enum BindType { BIND_READ,
|
||||||
|
BIND_DRAW,
|
||||||
|
BIND_READDRAW };
|
||||||
|
|
||||||
// TODO(digit): What is this used for exactly? For example, the
|
// TODO(digit): What is this used for exactly? For example, the
|
||||||
// mReadContext is never used by this class. The mDrawContext is only
|
// mReadContext is never used by this class. The mDrawContext is only
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,16 @@ class Logger : public DoNotCopyOrMove {
|
||||||
public:
|
public:
|
||||||
// Severity enumerates all known severity levels
|
// Severity enumerates all known severity levels
|
||||||
// applicable to log messages.
|
// applicable to log messages.
|
||||||
enum class Severity { kTrace, kDebug, kInfo, kWarning, kError, kFatal };
|
enum class Severity { kTrace,
|
||||||
|
kDebug,
|
||||||
|
kInfo,
|
||||||
|
kWarning,
|
||||||
|
kError,
|
||||||
|
kFatal };
|
||||||
|
|
||||||
// A Location describes the origin of a log message.
|
// A Location describes the origin of a log message.
|
||||||
struct Location {
|
struct Location {
|
||||||
std::string file; // The name of the file that contains the log message.
|
std::string file; // The name of the file that contains the log message.
|
||||||
std::string function; // The function that contains the log message.
|
std::string function; // The function that contains the log message.
|
||||||
std::uint32_t line; // The line in file that resulted in the log message.
|
std::uint32_t line; // The line in file that resulted in the log message.
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -36,27 +36,27 @@ template <typename Range1,
|
||||||
common::is_range<Range2>::value>>
|
common::is_range<Range2>::value>>
|
||||||
inline ::testing::AssertionResult RangesMatch(const Range1& expected,
|
inline ::testing::AssertionResult RangesMatch(const Range1& expected,
|
||||||
const Range2& actual) {
|
const Range2& actual) {
|
||||||
const auto expectedSize =
|
const auto expectedSize =
|
||||||
std::distance(std::begin(expected), std::end(expected));
|
std::distance(std::begin(expected), std::end(expected));
|
||||||
const auto actualSize = std::distance(std::begin(actual), std::end(actual));
|
const auto actualSize = std::distance(std::begin(actual), std::end(actual));
|
||||||
if (actualSize != expectedSize) {
|
if (actualSize != expectedSize) {
|
||||||
return ::testing::AssertionFailure()
|
return ::testing::AssertionFailure()
|
||||||
<< "actual range size " << actualSize << " != expected size "
|
<< "actual range size " << actualSize << " != expected size "
|
||||||
<< expectedSize;
|
<< expectedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto itExp = std::begin(expected);
|
auto itExp = std::begin(expected);
|
||||||
for (const auto& act : actual) {
|
for (const auto& act : actual) {
|
||||||
if (*itExp != act) {
|
if (*itExp != act) {
|
||||||
const auto index = std::distance(std::begin(expected), itExp);
|
const auto index = std::distance(std::begin(expected), itExp);
|
||||||
return ::testing::AssertionFailure()
|
return ::testing::AssertionFailure()
|
||||||
<< "range[" << index << "] (" << act << ") != expected["
|
<< "range[" << index << "] (" << act << ") != expected["
|
||||||
<< index << "] (" << *itExp << ")";
|
<< index << "] (" << *itExp << ")";
|
||||||
}
|
|
||||||
++itExp;
|
|
||||||
}
|
}
|
||||||
|
++itExp;
|
||||||
|
}
|
||||||
|
|
||||||
return ::testing::AssertionSuccess();
|
return ::testing::AssertionSuccess();
|
||||||
}
|
}
|
||||||
} // namespace testing
|
} // namespace testing
|
||||||
} // namespace anbox
|
} // namespace anbox
|
||||||
|
|
|
||||||
|
|
@ -29,130 +29,130 @@ std::uint16_t KeycodeConverter::convert(const SDL_Scancode &scan_code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::array<SDL_Scancode, 249> KeycodeConverter::code_map = {{
|
const std::array<SDL_Scancode, 249> KeycodeConverter::code_map = {{
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_RESERVED 0 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_RESERVED 0 */
|
||||||
SDL_SCANCODE_ESCAPE, /* KEY_ESC 1 */
|
SDL_SCANCODE_ESCAPE, /* KEY_ESC 1 */
|
||||||
SDL_SCANCODE_1, /* KEY_1 2 */
|
SDL_SCANCODE_1, /* KEY_1 2 */
|
||||||
SDL_SCANCODE_2, /* KEY_2 3 */
|
SDL_SCANCODE_2, /* KEY_2 3 */
|
||||||
SDL_SCANCODE_3, /* KEY_3 4 */
|
SDL_SCANCODE_3, /* KEY_3 4 */
|
||||||
SDL_SCANCODE_4, /* KEY_4 5 */
|
SDL_SCANCODE_4, /* KEY_4 5 */
|
||||||
SDL_SCANCODE_5, /* KEY_5 6 */
|
SDL_SCANCODE_5, /* KEY_5 6 */
|
||||||
SDL_SCANCODE_6, /* KEY_6 7 */
|
SDL_SCANCODE_6, /* KEY_6 7 */
|
||||||
SDL_SCANCODE_7, /* KEY_7 8 */
|
SDL_SCANCODE_7, /* KEY_7 8 */
|
||||||
SDL_SCANCODE_8, /* KEY_8 9 */
|
SDL_SCANCODE_8, /* KEY_8 9 */
|
||||||
SDL_SCANCODE_9, /* KEY_9 10 */
|
SDL_SCANCODE_9, /* KEY_9 10 */
|
||||||
SDL_SCANCODE_0, /* KEY_0 11 */
|
SDL_SCANCODE_0, /* KEY_0 11 */
|
||||||
SDL_SCANCODE_MINUS, /* KEY_MINUS 12 */
|
SDL_SCANCODE_MINUS, /* KEY_MINUS 12 */
|
||||||
SDL_SCANCODE_EQUALS, /* KEY_EQUAL 13 */
|
SDL_SCANCODE_EQUALS, /* KEY_EQUAL 13 */
|
||||||
SDL_SCANCODE_BACKSPACE, /* KEY_BACKSPACE 14 */
|
SDL_SCANCODE_BACKSPACE, /* KEY_BACKSPACE 14 */
|
||||||
SDL_SCANCODE_TAB, /* KEY_TAB 15 */
|
SDL_SCANCODE_TAB, /* KEY_TAB 15 */
|
||||||
SDL_SCANCODE_Q, /* KEY_Q 16 */
|
SDL_SCANCODE_Q, /* KEY_Q 16 */
|
||||||
SDL_SCANCODE_W, /* KEY_W 17 */
|
SDL_SCANCODE_W, /* KEY_W 17 */
|
||||||
SDL_SCANCODE_E, /* KEY_E 18 */
|
SDL_SCANCODE_E, /* KEY_E 18 */
|
||||||
SDL_SCANCODE_R, /* KEY_R 19 */
|
SDL_SCANCODE_R, /* KEY_R 19 */
|
||||||
SDL_SCANCODE_T, /* KEY_T 20 */
|
SDL_SCANCODE_T, /* KEY_T 20 */
|
||||||
SDL_SCANCODE_Y, /* KEY_Y 21 */
|
SDL_SCANCODE_Y, /* KEY_Y 21 */
|
||||||
SDL_SCANCODE_U, /* KEY_U 22 */
|
SDL_SCANCODE_U, /* KEY_U 22 */
|
||||||
SDL_SCANCODE_I, /* KEY_I 23 */
|
SDL_SCANCODE_I, /* KEY_I 23 */
|
||||||
SDL_SCANCODE_O, /* KEY_O 24 */
|
SDL_SCANCODE_O, /* KEY_O 24 */
|
||||||
SDL_SCANCODE_P, /* KEY_P 25 */
|
SDL_SCANCODE_P, /* KEY_P 25 */
|
||||||
SDL_SCANCODE_LEFTBRACKET, /* KEY_LEFTBRACE 26 */
|
SDL_SCANCODE_LEFTBRACKET, /* KEY_LEFTBRACE 26 */
|
||||||
SDL_SCANCODE_RIGHTBRACKET, /* KEY_RIGHTBRACE 27 */
|
SDL_SCANCODE_RIGHTBRACKET, /* KEY_RIGHTBRACE 27 */
|
||||||
SDL_SCANCODE_RETURN, /* KEY_ENTER 28 */
|
SDL_SCANCODE_RETURN, /* KEY_ENTER 28 */
|
||||||
SDL_SCANCODE_LCTRL, /* KEY_LEFTCTRL 29 */
|
SDL_SCANCODE_LCTRL, /* KEY_LEFTCTRL 29 */
|
||||||
SDL_SCANCODE_A, /* KEY_A 30 */
|
SDL_SCANCODE_A, /* KEY_A 30 */
|
||||||
SDL_SCANCODE_S, /* KEY_S 31 */
|
SDL_SCANCODE_S, /* KEY_S 31 */
|
||||||
SDL_SCANCODE_D, /* KEY_D 32 */
|
SDL_SCANCODE_D, /* KEY_D 32 */
|
||||||
SDL_SCANCODE_F, /* KEY_F 33 */
|
SDL_SCANCODE_F, /* KEY_F 33 */
|
||||||
SDL_SCANCODE_G, /* KEY_G 34 */
|
SDL_SCANCODE_G, /* KEY_G 34 */
|
||||||
SDL_SCANCODE_H, /* KEY_H 35 */
|
SDL_SCANCODE_H, /* KEY_H 35 */
|
||||||
SDL_SCANCODE_J, /* KEY_J 36 */
|
SDL_SCANCODE_J, /* KEY_J 36 */
|
||||||
SDL_SCANCODE_K, /* KEY_K 37 */
|
SDL_SCANCODE_K, /* KEY_K 37 */
|
||||||
SDL_SCANCODE_L, /* KEY_L 38 */
|
SDL_SCANCODE_L, /* KEY_L 38 */
|
||||||
SDL_SCANCODE_SEMICOLON, /* KEY_SEMICOLON 39 */
|
SDL_SCANCODE_SEMICOLON, /* KEY_SEMICOLON 39 */
|
||||||
SDL_SCANCODE_APOSTROPHE, /* KEY_APOSTROPHE 40 */
|
SDL_SCANCODE_APOSTROPHE, /* KEY_APOSTROPHE 40 */
|
||||||
SDL_SCANCODE_GRAVE, /* KEY_GRAVE 41 */
|
SDL_SCANCODE_GRAVE, /* KEY_GRAVE 41 */
|
||||||
SDL_SCANCODE_LSHIFT, /* KEY_LEFTSHIFT 42 */
|
SDL_SCANCODE_LSHIFT, /* KEY_LEFTSHIFT 42 */
|
||||||
SDL_SCANCODE_BACKSLASH, /* KEY_BACKSLASH 43 */
|
SDL_SCANCODE_BACKSLASH, /* KEY_BACKSLASH 43 */
|
||||||
SDL_SCANCODE_Z, /* KEY_Z 44 */
|
SDL_SCANCODE_Z, /* KEY_Z 44 */
|
||||||
SDL_SCANCODE_X, /* KEY_X 45 */
|
SDL_SCANCODE_X, /* KEY_X 45 */
|
||||||
SDL_SCANCODE_C, /* KEY_C 46 */
|
SDL_SCANCODE_C, /* KEY_C 46 */
|
||||||
SDL_SCANCODE_V, /* KEY_V 47 */
|
SDL_SCANCODE_V, /* KEY_V 47 */
|
||||||
SDL_SCANCODE_B, /* KEY_B 48 */
|
SDL_SCANCODE_B, /* KEY_B 48 */
|
||||||
SDL_SCANCODE_N, /* KEY_N 49 */
|
SDL_SCANCODE_N, /* KEY_N 49 */
|
||||||
SDL_SCANCODE_M, /* KEY_M 50 */
|
SDL_SCANCODE_M, /* KEY_M 50 */
|
||||||
SDL_SCANCODE_COMMA, /* KEY_COMMA 51 */
|
SDL_SCANCODE_COMMA, /* KEY_COMMA 51 */
|
||||||
SDL_SCANCODE_PERIOD, /* KEY_DOT 52 */
|
SDL_SCANCODE_PERIOD, /* KEY_DOT 52 */
|
||||||
SDL_SCANCODE_SLASH, /* KEY_SLASH 53 */
|
SDL_SCANCODE_SLASH, /* KEY_SLASH 53 */
|
||||||
SDL_SCANCODE_RSHIFT, /* KEY_RIGHTSHIFT 54 */
|
SDL_SCANCODE_RSHIFT, /* KEY_RIGHTSHIFT 54 */
|
||||||
SDL_SCANCODE_KP_MULTIPLY, /* KEY_KPASTERISK 55 */
|
SDL_SCANCODE_KP_MULTIPLY, /* KEY_KPASTERISK 55 */
|
||||||
SDL_SCANCODE_LALT, /* KEY_LEFTALT 56 */
|
SDL_SCANCODE_LALT, /* KEY_LEFTALT 56 */
|
||||||
SDL_SCANCODE_SPACE, /* KEY_SPACE 57 */
|
SDL_SCANCODE_SPACE, /* KEY_SPACE 57 */
|
||||||
SDL_SCANCODE_CAPSLOCK, /* KEY_CAPSLOCK 58 */
|
SDL_SCANCODE_CAPSLOCK, /* KEY_CAPSLOCK 58 */
|
||||||
SDL_SCANCODE_F1, /* KEY_F1 59 */
|
SDL_SCANCODE_F1, /* KEY_F1 59 */
|
||||||
SDL_SCANCODE_F2, /* KEY_F2 60 */
|
SDL_SCANCODE_F2, /* KEY_F2 60 */
|
||||||
SDL_SCANCODE_F3, /* KEY_F3 61 */
|
SDL_SCANCODE_F3, /* KEY_F3 61 */
|
||||||
SDL_SCANCODE_F4, /* KEY_F4 62 */
|
SDL_SCANCODE_F4, /* KEY_F4 62 */
|
||||||
SDL_SCANCODE_F5, /* KEY_F5 63 */
|
SDL_SCANCODE_F5, /* KEY_F5 63 */
|
||||||
SDL_SCANCODE_F6, /* KEY_F6 64 */
|
SDL_SCANCODE_F6, /* KEY_F6 64 */
|
||||||
SDL_SCANCODE_F7, /* KEY_F7 65 */
|
SDL_SCANCODE_F7, /* KEY_F7 65 */
|
||||||
SDL_SCANCODE_F8, /* KEY_F8 66 */
|
SDL_SCANCODE_F8, /* KEY_F8 66 */
|
||||||
SDL_SCANCODE_F9, /* KEY_F9 67 */
|
SDL_SCANCODE_F9, /* KEY_F9 67 */
|
||||||
SDL_SCANCODE_F10, /* KEY_F10 68 */
|
SDL_SCANCODE_F10, /* KEY_F10 68 */
|
||||||
SDL_SCANCODE_NUMLOCKCLEAR, /* KEY_NUMLOCK 69 */
|
SDL_SCANCODE_NUMLOCKCLEAR, /* KEY_NUMLOCK 69 */
|
||||||
SDL_SCANCODE_SCROLLLOCK, /* KEY_SCROLLLOCK 70 */
|
SDL_SCANCODE_SCROLLLOCK, /* KEY_SCROLLLOCK 70 */
|
||||||
SDL_SCANCODE_KP_7, /* KEY_KP7 71 */
|
SDL_SCANCODE_KP_7, /* KEY_KP7 71 */
|
||||||
SDL_SCANCODE_KP_8, /* KEY_KP8 72 */
|
SDL_SCANCODE_KP_8, /* KEY_KP8 72 */
|
||||||
SDL_SCANCODE_KP_9, /* KEY_KP9 73 */
|
SDL_SCANCODE_KP_9, /* KEY_KP9 73 */
|
||||||
SDL_SCANCODE_KP_MINUS, /* KEY_KPMINUS 74 */
|
SDL_SCANCODE_KP_MINUS, /* KEY_KPMINUS 74 */
|
||||||
SDL_SCANCODE_KP_4, /* KEY_KP4 75 */
|
SDL_SCANCODE_KP_4, /* KEY_KP4 75 */
|
||||||
SDL_SCANCODE_KP_5, /* KEY_KP5 76 */
|
SDL_SCANCODE_KP_5, /* KEY_KP5 76 */
|
||||||
SDL_SCANCODE_KP_6, /* KEY_KP6 77 */
|
SDL_SCANCODE_KP_6, /* KEY_KP6 77 */
|
||||||
SDL_SCANCODE_KP_PLUS, /* KEY_KPPLUS 78 */
|
SDL_SCANCODE_KP_PLUS, /* KEY_KPPLUS 78 */
|
||||||
SDL_SCANCODE_KP_1, /* KEY_KP1 79 */
|
SDL_SCANCODE_KP_1, /* KEY_KP1 79 */
|
||||||
SDL_SCANCODE_KP_2, /* KEY_KP2 80 */
|
SDL_SCANCODE_KP_2, /* KEY_KP2 80 */
|
||||||
SDL_SCANCODE_KP_3, /* KEY_KP3 81 */
|
SDL_SCANCODE_KP_3, /* KEY_KP3 81 */
|
||||||
SDL_SCANCODE_KP_0, /* KEY_KP0 82 */
|
SDL_SCANCODE_KP_0, /* KEY_KP0 82 */
|
||||||
SDL_SCANCODE_KP_PERIOD, /* KEY_KPDOT 83 */
|
SDL_SCANCODE_KP_PERIOD, /* KEY_KPDOT 83 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* 84 */
|
SDL_SCANCODE_UNKNOWN, /* 84 */
|
||||||
SDL_SCANCODE_LANG5, /* KEY_ZENKAKUHANKAKU 85 */
|
SDL_SCANCODE_LANG5, /* KEY_ZENKAKUHANKAKU 85 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_102ND 86 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_102ND 86 */
|
||||||
SDL_SCANCODE_F11, /* KEY_F11 87 */
|
SDL_SCANCODE_F11, /* KEY_F11 87 */
|
||||||
SDL_SCANCODE_F12, /* KEY_F12 88 */
|
SDL_SCANCODE_F12, /* KEY_F12 88 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_RO 89 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_RO 89 */
|
||||||
SDL_SCANCODE_LANG3, /* KEY_KATAKANA 90 */
|
SDL_SCANCODE_LANG3, /* KEY_KATAKANA 90 */
|
||||||
SDL_SCANCODE_LANG4, /* KEY_HIRAGANA 91 */
|
SDL_SCANCODE_LANG4, /* KEY_HIRAGANA 91 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_HENKAN 92 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_HENKAN 92 */
|
||||||
SDL_SCANCODE_LANG3, /* KEY_KATAKANAHIRAGANA 93 */
|
SDL_SCANCODE_LANG3, /* KEY_KATAKANAHIRAGANA 93 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_MUHENKAN 94 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_MUHENKAN 94 */
|
||||||
SDL_SCANCODE_KP_COMMA, /* KEY_KPJPCOMMA 95 */
|
SDL_SCANCODE_KP_COMMA, /* KEY_KPJPCOMMA 95 */
|
||||||
SDL_SCANCODE_KP_ENTER, /* KEY_KPENTER 96 */
|
SDL_SCANCODE_KP_ENTER, /* KEY_KPENTER 96 */
|
||||||
SDL_SCANCODE_RCTRL, /* KEY_RIGHTCTRL 97 */
|
SDL_SCANCODE_RCTRL, /* KEY_RIGHTCTRL 97 */
|
||||||
SDL_SCANCODE_KP_DIVIDE, /* KEY_KPSLASH 98 */
|
SDL_SCANCODE_KP_DIVIDE, /* KEY_KPSLASH 98 */
|
||||||
SDL_SCANCODE_SYSREQ, /* KEY_SYSRQ 99 */
|
SDL_SCANCODE_SYSREQ, /* KEY_SYSRQ 99 */
|
||||||
SDL_SCANCODE_RALT, /* KEY_RIGHTALT 100 */
|
SDL_SCANCODE_RALT, /* KEY_RIGHTALT 100 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_LINEFEED 101 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_LINEFEED 101 */
|
||||||
SDL_SCANCODE_HOME, /* KEY_HOME 102 */
|
SDL_SCANCODE_HOME, /* KEY_HOME 102 */
|
||||||
SDL_SCANCODE_UP, /* KEY_UP 103 */
|
SDL_SCANCODE_UP, /* KEY_UP 103 */
|
||||||
SDL_SCANCODE_PAGEUP, /* KEY_PAGEUP 104 */
|
SDL_SCANCODE_PAGEUP, /* KEY_PAGEUP 104 */
|
||||||
SDL_SCANCODE_LEFT, /* KEY_LEFT 105 */
|
SDL_SCANCODE_LEFT, /* KEY_LEFT 105 */
|
||||||
SDL_SCANCODE_RIGHT, /* KEY_RIGHT 106 */
|
SDL_SCANCODE_RIGHT, /* KEY_RIGHT 106 */
|
||||||
SDL_SCANCODE_END, /* KEY_END 107 */
|
SDL_SCANCODE_END, /* KEY_END 107 */
|
||||||
SDL_SCANCODE_DOWN, /* KEY_DOWN 108 */
|
SDL_SCANCODE_DOWN, /* KEY_DOWN 108 */
|
||||||
SDL_SCANCODE_PAGEDOWN, /* KEY_PAGEDOWN 109 */
|
SDL_SCANCODE_PAGEDOWN, /* KEY_PAGEDOWN 109 */
|
||||||
SDL_SCANCODE_INSERT, /* KEY_INSERT 110 */
|
SDL_SCANCODE_INSERT, /* KEY_INSERT 110 */
|
||||||
SDL_SCANCODE_DELETE, /* KEY_DELETE 111 */
|
SDL_SCANCODE_DELETE, /* KEY_DELETE 111 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_MACRO 112 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_MACRO 112 */
|
||||||
SDL_SCANCODE_MUTE, /* KEY_MUTE 113 */
|
SDL_SCANCODE_MUTE, /* KEY_MUTE 113 */
|
||||||
SDL_SCANCODE_VOLUMEDOWN, /* KEY_VOLUMEDOWN 114 */
|
SDL_SCANCODE_VOLUMEDOWN, /* KEY_VOLUMEDOWN 114 */
|
||||||
SDL_SCANCODE_VOLUMEUP, /* KEY_VOLUMEUP 115 */
|
SDL_SCANCODE_VOLUMEUP, /* KEY_VOLUMEUP 115 */
|
||||||
SDL_SCANCODE_POWER, /* KEY_POWER 116 SC System Power Down */
|
SDL_SCANCODE_POWER, /* KEY_POWER 116 SC System Power Down */
|
||||||
SDL_SCANCODE_KP_EQUALS, /* KEY_KPEQUAL 117 */
|
SDL_SCANCODE_KP_EQUALS, /* KEY_KPEQUAL 117 */
|
||||||
SDL_SCANCODE_KP_MINUS, /* KEY_KPPLUSMINUS 118 */
|
SDL_SCANCODE_KP_MINUS, /* KEY_KPPLUSMINUS 118 */
|
||||||
SDL_SCANCODE_PAUSE, /* KEY_PAUSE 119 */
|
SDL_SCANCODE_PAUSE, /* KEY_PAUSE 119 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SCALE 120 AL Compiz Scale (Expose) */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SCALE 120 AL Compiz Scale (Expose) */
|
||||||
SDL_SCANCODE_KP_COMMA, /* KEY_KPCOMMA 121 */
|
SDL_SCANCODE_KP_COMMA, /* KEY_KPCOMMA 121 */
|
||||||
SDL_SCANCODE_LANG1, /* KEY_HANGEUL,KEY_HANGUEL 122 */
|
SDL_SCANCODE_LANG1, /* KEY_HANGEUL,KEY_HANGUEL 122 */
|
||||||
SDL_SCANCODE_LANG2, /* KEY_HANJA 123 */
|
SDL_SCANCODE_LANG2, /* KEY_HANJA 123 */
|
||||||
SDL_SCANCODE_INTERNATIONAL3, /* KEY_YEN 124 */
|
SDL_SCANCODE_INTERNATIONAL3, /* KEY_YEN 124 */
|
||||||
SDL_SCANCODE_LGUI, /* KEY_LEFTMETA 125 */
|
SDL_SCANCODE_LGUI, /* KEY_LEFTMETA 125 */
|
||||||
SDL_SCANCODE_RGUI, /* KEY_RIGHTMETA 126 */
|
SDL_SCANCODE_RGUI, /* KEY_RIGHTMETA 126 */
|
||||||
|
|
@ -167,125 +167,125 @@ const std::array<SDL_Scancode, 249> KeycodeConverter::code_map = {{
|
||||||
SDL_SCANCODE_PASTE, /* KEY_PASTE 135 AC Paste */
|
SDL_SCANCODE_PASTE, /* KEY_PASTE 135 AC Paste */
|
||||||
SDL_SCANCODE_FIND, /* KEY_FIND 136 AC Search */
|
SDL_SCANCODE_FIND, /* KEY_FIND 136 AC Search */
|
||||||
SDL_SCANCODE_CUT, /* KEY_CUT 137 AC Cut */
|
SDL_SCANCODE_CUT, /* KEY_CUT 137 AC Cut */
|
||||||
SDL_SCANCODE_HELP, /* KEY_HELP 138 AL Integrated Help Center */
|
SDL_SCANCODE_HELP, /* KEY_HELP 138 AL Integrated Help Center */
|
||||||
SDL_SCANCODE_MENU, /* KEY_MENU 139 Menu (show menu) */
|
SDL_SCANCODE_MENU, /* KEY_MENU 139 Menu (show menu) */
|
||||||
SDL_SCANCODE_CALCULATOR, /* KEY_CALC 140 AL Calculator */
|
SDL_SCANCODE_CALCULATOR, /* KEY_CALC 140 AL Calculator */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SETUP 141 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SETUP 141 */
|
||||||
SDL_SCANCODE_SLEEP, /* KEY_SLEEP 142 SC System Sleep */
|
SDL_SCANCODE_SLEEP, /* KEY_SLEEP 142 SC System Sleep */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_WAKEUP 143 System Wake Up */
|
SDL_SCANCODE_UNKNOWN, /* KEY_WAKEUP 143 System Wake Up */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_FILE 144 AL Local Machine Browser */
|
SDL_SCANCODE_UNKNOWN, /* KEY_FILE 144 AL Local Machine Browser */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SENDFILE 145 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SENDFILE 145 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_DELETEFILE 146 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_DELETEFILE 146 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_XFER 147 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_XFER 147 */
|
||||||
SDL_SCANCODE_APP1, /* KEY_PROG1 148 */
|
SDL_SCANCODE_APP1, /* KEY_PROG1 148 */
|
||||||
SDL_SCANCODE_APP1, /* KEY_PROG2 149 */
|
SDL_SCANCODE_APP1, /* KEY_PROG2 149 */
|
||||||
SDL_SCANCODE_WWW, /* KEY_WWW 150 AL Internet Browser */
|
SDL_SCANCODE_WWW, /* KEY_WWW 150 AL Internet Browser */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_MSDOS 151 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_MSDOS 151 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_COFFEE,KEY_SCREENLOCK 152 AL Terminal
|
SDL_SCANCODE_UNKNOWN, /* KEY_COFFEE,KEY_SCREENLOCK 152 AL Terminal
|
||||||
Lock/Screensaver */
|
Lock/Screensaver */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_DIRECTION 153 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_DIRECTION 153 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CYCLEWINDOWS 154 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CYCLEWINDOWS 154 */
|
||||||
SDL_SCANCODE_MAIL, /* KEY_MAIL 155 */
|
SDL_SCANCODE_MAIL, /* KEY_MAIL 155 */
|
||||||
SDL_SCANCODE_AC_BOOKMARKS, /* KEY_BOOKMARKS 156 AC Bookmarks */
|
SDL_SCANCODE_AC_BOOKMARKS, /* KEY_BOOKMARKS 156 AC Bookmarks */
|
||||||
SDL_SCANCODE_COMPUTER, /* KEY_COMPUTER 157 */
|
SDL_SCANCODE_COMPUTER, /* KEY_COMPUTER 157 */
|
||||||
SDL_SCANCODE_AC_BACK, /* KEY_BACK 158 AC Back */
|
SDL_SCANCODE_AC_BACK, /* KEY_BACK 158 AC Back */
|
||||||
SDL_SCANCODE_AC_FORWARD, /* KEY_FORWARD 159 AC Forward */
|
SDL_SCANCODE_AC_FORWARD, /* KEY_FORWARD 159 AC Forward */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CLOSECD 160 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CLOSECD 160 */
|
||||||
SDL_SCANCODE_EJECT, /* KEY_EJECTCD 161 */
|
SDL_SCANCODE_EJECT, /* KEY_EJECTCD 161 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_EJECTCLOSECD 162 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_EJECTCLOSECD 162 */
|
||||||
SDL_SCANCODE_AUDIONEXT, /* KEY_NEXTSONG 163 */
|
SDL_SCANCODE_AUDIONEXT, /* KEY_NEXTSONG 163 */
|
||||||
SDL_SCANCODE_AUDIOPLAY, /* KEY_PLAYPAUSE 164 */
|
SDL_SCANCODE_AUDIOPLAY, /* KEY_PLAYPAUSE 164 */
|
||||||
SDL_SCANCODE_AUDIOPREV, /* KEY_PREVIOUSSONG 165 */
|
SDL_SCANCODE_AUDIOPREV, /* KEY_PREVIOUSSONG 165 */
|
||||||
SDL_SCANCODE_AUDIOSTOP, /* KEY_STOPCD 166 */
|
SDL_SCANCODE_AUDIOSTOP, /* KEY_STOPCD 166 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_RECORD 167 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_RECORD 167 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_REWIND 168 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_REWIND 168 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PHONE 169 Media Select Telephone */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PHONE 169 Media Select Telephone */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_ISO 170 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_ISO 170 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CONFIG 171 AL Consumer Control
|
SDL_SCANCODE_UNKNOWN, /* KEY_CONFIG 171 AL Consumer Control
|
||||||
Configuration */
|
Configuration */
|
||||||
SDL_SCANCODE_AC_HOME, /* KEY_HOMEPAGE 172 AC Home */
|
SDL_SCANCODE_AC_HOME, /* KEY_HOMEPAGE 172 AC Home */
|
||||||
SDL_SCANCODE_AC_REFRESH, /* KEY_REFRESH 173 AC Refresh */
|
SDL_SCANCODE_AC_REFRESH, /* KEY_REFRESH 173 AC Refresh */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_EXIT 174 AC Exit */
|
SDL_SCANCODE_UNKNOWN, /* KEY_EXIT 174 AC Exit */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_MOVE 175 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_MOVE 175 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_EDIT 176 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_EDIT 176 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SCROLLUP 177 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SCROLLUP 177 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SCROLLDOWN 178 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SCROLLDOWN 178 */
|
||||||
SDL_SCANCODE_KP_LEFTPAREN, /* KEY_KPLEFTPAREN 179 */
|
SDL_SCANCODE_KP_LEFTPAREN, /* KEY_KPLEFTPAREN 179 */
|
||||||
SDL_SCANCODE_KP_RIGHTPAREN, /* KEY_KPRIGHTPAREN 180 */
|
SDL_SCANCODE_KP_RIGHTPAREN, /* KEY_KPRIGHTPAREN 180 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_NEW 181 AC New */
|
SDL_SCANCODE_UNKNOWN, /* KEY_NEW 181 AC New */
|
||||||
SDL_SCANCODE_AGAIN, /* KEY_REDO 182 AC Redo/Repeat */
|
SDL_SCANCODE_AGAIN, /* KEY_REDO 182 AC Redo/Repeat */
|
||||||
SDL_SCANCODE_F13, /* KEY_F13 183 */
|
SDL_SCANCODE_F13, /* KEY_F13 183 */
|
||||||
SDL_SCANCODE_F14, /* KEY_F14 184 */
|
SDL_SCANCODE_F14, /* KEY_F14 184 */
|
||||||
SDL_SCANCODE_F15, /* KEY_F15 185 */
|
SDL_SCANCODE_F15, /* KEY_F15 185 */
|
||||||
SDL_SCANCODE_F16, /* KEY_F16 186 */
|
SDL_SCANCODE_F16, /* KEY_F16 186 */
|
||||||
SDL_SCANCODE_F17, /* KEY_F17 187 */
|
SDL_SCANCODE_F17, /* KEY_F17 187 */
|
||||||
SDL_SCANCODE_F18, /* KEY_F18 188 */
|
SDL_SCANCODE_F18, /* KEY_F18 188 */
|
||||||
SDL_SCANCODE_F19, /* KEY_F19 189 */
|
SDL_SCANCODE_F19, /* KEY_F19 189 */
|
||||||
SDL_SCANCODE_F20, /* KEY_F20 190 */
|
SDL_SCANCODE_F20, /* KEY_F20 190 */
|
||||||
SDL_SCANCODE_F21, /* KEY_F21 191 */
|
SDL_SCANCODE_F21, /* KEY_F21 191 */
|
||||||
SDL_SCANCODE_F22, /* KEY_F22 192 */
|
SDL_SCANCODE_F22, /* KEY_F22 192 */
|
||||||
SDL_SCANCODE_F23, /* KEY_F23 193 */
|
SDL_SCANCODE_F23, /* KEY_F23 193 */
|
||||||
SDL_SCANCODE_F24, /* KEY_F24 194 */
|
SDL_SCANCODE_F24, /* KEY_F24 194 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* 195 */
|
SDL_SCANCODE_UNKNOWN, /* 195 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* 196 */
|
SDL_SCANCODE_UNKNOWN, /* 196 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* 197 */
|
SDL_SCANCODE_UNKNOWN, /* 197 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* 198 */
|
SDL_SCANCODE_UNKNOWN, /* 198 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* 199 */
|
SDL_SCANCODE_UNKNOWN, /* 199 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PLAYCD 200 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PLAYCD 200 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PAUSECD 201 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PAUSECD 201 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PROG3 202 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PROG3 202 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PROG4 203 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PROG4 203 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_DASHBOARD 204 AL Dashboard */
|
SDL_SCANCODE_UNKNOWN, /* KEY_DASHBOARD 204 AL Dashboard */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SUSPEND 205 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SUSPEND 205 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CLOSE 206 AC Close */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CLOSE 206 AC Close */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PLAY 207 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PLAY 207 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_FASTFORWARD 208 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_FASTFORWARD 208 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BASSBOOST 209 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_BASSBOOST 209 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_PRINT 210 AC Print */
|
SDL_SCANCODE_UNKNOWN, /* KEY_PRINT 210 AC Print */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_HP 211 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_HP 211 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CAMERA 212 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CAMERA 212 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SOUND 213 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SOUND 213 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_QUESTION 214 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_QUESTION 214 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_EMAIL 215 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_EMAIL 215 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CHAT 216 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CHAT 216 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SEARCH 217 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SEARCH 217 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CONNECT 218 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CONNECT 218 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_FINANCE 219 AL Checkbook/Finance */
|
SDL_SCANCODE_UNKNOWN, /* KEY_FINANCE 219 AL Checkbook/Finance */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SPORT 220 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SPORT 220 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SHOP 221 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SHOP 221 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_ALTERASE 222 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_ALTERASE 222 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_CANCEL 223 AC Cancel */
|
SDL_SCANCODE_UNKNOWN, /* KEY_CANCEL 223 AC Cancel */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESSDOWN 224 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESSDOWN 224 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESSUP 225 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESSUP 225 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_MEDIA 226 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_MEDIA 226 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SWITCHVIDEOMODE 227 Cycle between available
|
SDL_SCANCODE_UNKNOWN, /* KEY_SWITCHVIDEOMODE 227 Cycle between available
|
||||||
video outputs (Monitor/LCD/TV-out/etc) */
|
video outputs (Monitor/LCD/TV-out/etc) */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMTOGGLE 228 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMTOGGLE 228 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMDOWN 229 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMDOWN 229 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMUP 230 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMUP 230 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SEND 231 AC Send */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SEND 231 AC Send */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_REPLY 232 AC Reply */
|
SDL_SCANCODE_UNKNOWN, /* KEY_REPLY 232 AC Reply */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_FORWARDMAIL 233 AC Forward Msg */
|
SDL_SCANCODE_UNKNOWN, /* KEY_FORWARDMAIL 233 AC Forward Msg */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_SAVE 234 AC Save */
|
SDL_SCANCODE_UNKNOWN, /* KEY_SAVE 234 AC Save */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_DOCUMENTS 235 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_DOCUMENTS 235 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BATTERY 236 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_BATTERY 236 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BLUETOOTH 237 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_BLUETOOTH 237 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_WLAN 238 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_WLAN 238 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_UWB 239 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_UWB 239 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_UNKNOWN 240 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_UNKNOWN 240 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_VIDEO_NEXT 241 drive next video source */
|
SDL_SCANCODE_UNKNOWN, /* KEY_VIDEO_NEXT 241 drive next video source */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_VIDEO_PREV 242 drive previous video
|
SDL_SCANCODE_UNKNOWN, /* KEY_VIDEO_PREV 242 drive previous video
|
||||||
source */
|
source */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESS_CYCLE 243 brightness up, after
|
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESS_CYCLE 243 brightness up, after
|
||||||
max is min */
|
max is min */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESS_ZERO 244 brightness off, use
|
SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESS_ZERO 244 brightness off, use
|
||||||
ambient */
|
ambient */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_DISPLAY_OFF 245 display device to off
|
SDL_SCANCODE_UNKNOWN, /* KEY_DISPLAY_OFF 245 display device to off
|
||||||
state */
|
state */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_WIMAX 246 */
|
SDL_SCANCODE_UNKNOWN, /* KEY_WIMAX 246 */
|
||||||
SDL_SCANCODE_UNKNOWN, /* KEY_RFKILL 247 Key that controls all radios
|
SDL_SCANCODE_UNKNOWN, /* KEY_RFKILL 247 Key that controls all radios
|
||||||
*/
|
*/
|
||||||
SDL_SCANCODE_UNKNOWN /* KEY_MICMUTE 248 Mute / unmute the microphone */
|
SDL_SCANCODE_UNKNOWN /* KEY_MICMUTE 248 Mute / unmute the microphone */
|
||||||
}};
|
}};
|
||||||
} // namespace ubuntu
|
} // namespace ubuntu
|
||||||
} // namespace anbox
|
} // namespace anbox
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue