#include "ui/base/x/test/x11_ui_controls_test_helper.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/test/x11_event_waiter.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/x/keysyms/keysyms.h"
#include "ui/gfx/x/xproto.h"
namespace ui {
namespace {
DOWN;
LEFT;
MIDDLE;
MouseButton;
RIGHT;
UP;
unsigned button_down_mask = …;
template <typename T>
void PostEventToWindowTreeHost(gfx::AcceleratedWidget widget, T* xevent) { … }
}
X11UIControlsTestHelper::X11UIControlsTestHelper()
: … { … }
X11UIControlsTestHelper::~X11UIControlsTestHelper() { … }
unsigned X11UIControlsTestHelper::ButtonDownMask() const { … }
void X11UIControlsTestHelper::SendKeyEvents(gfx::AcceleratedWidget widget,
ui::KeyboardCode key,
int key_event_types,
int accelerator_state,
base::OnceClosure closure) { … }
void X11UIControlsTestHelper::SendMouseMotionNotifyEvent(
gfx::AcceleratedWidget widget,
const gfx::Point& mouse_loc,
const gfx::Point& mouse_loc_in_connection_px,
base::OnceClosure closure) { … }
void X11UIControlsTestHelper::SendMouseEvent(
gfx::AcceleratedWidget widget,
MouseButton type,
int button_state,
int accelerator_state,
const gfx::Point& mouse_loc,
const gfx::Point& mouse_loc_in_connection_px,
base::OnceClosure closure) { … }
void X11UIControlsTestHelper::RunClosureAfterAllPendingUIEvents(
base::OnceClosure closure) { … }
void X11UIControlsTestHelper::SetKeycodeAndSendThenMask(
gfx::AcceleratedWidget widget,
x11::KeyEvent* xevent,
uint32_t keysym,
x11::KeyButMask mask) { … }
void X11UIControlsTestHelper::UnmaskAndSetKeycodeThenSend(
gfx::AcceleratedWidget widget,
x11::KeyEvent* xevent,
x11::KeyButMask mask,
uint32_t keysym) { … }
}