#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/base/x/x11_global_shortcut_listener.h"
#include <stddef.h>
#include "base/containers/contains.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/gfx/x/connection.h"
namespace {
const x11::ModMask kModifiersMasks[] = …;
x11::ModMask GetNativeModifiers(bool is_alt_down,
bool is_ctrl_down,
bool is_shift_down) { … }
}
namespace ui {
XGlobalShortcutListener::XGlobalShortcutListener()
: … { … }
XGlobalShortcutListener::~XGlobalShortcutListener() { … }
void XGlobalShortcutListener::StartListening() { … }
void XGlobalShortcutListener::StopListening() { … }
bool XGlobalShortcutListener::CanDispatchEvent(const PlatformEvent& event) { … }
uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) { … }
bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
bool is_alt_down,
bool is_ctrl_down,
bool is_shift_down) { … }
void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
bool is_alt_down,
bool is_ctrl_down,
bool is_shift_down) { … }
void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) { … }
}