chromium/ui/events/test/events_test_utils_x11.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/events/test/events_test_utils_x11.h"

#include <stddef.h>

#include "base/check_op.h"
#include "base/notreached.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
#include "ui/events/devices/x11/xinput_util.h"
#include "ui/events/event_constants.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/types/event_type.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/xinput.h"
#include "ui/gfx/x/xproto.h"

namespace {

// Converts ui::EventType to state for X*Events.
x11::KeyButMask XEventState(int flags) {}

// Converts EventType to XKeyEvent type.
x11::KeyEvent::Opcode XKeyEventType(ui::EventType type) {}

// Converts EventType to XI2 event type.
int XIKeyEventType(ui::EventType type) {}

int XIButtonEventType(ui::EventType type) {}

// Converts Aura event type and flag to X button event.
unsigned int XButtonEventButton(ui::EventType type, int flags) {}

void InitValuatorsForXIDeviceEvent(x11::Input::DeviceEvent* devev) {}

template <typename T>
x11::Input::Fp1616 ToFp1616(T x) {}

x11::Event CreateXInput2Event(int deviceid,
                              int evtype,
                              int tracking_id,
                              const gfx::Point& location) {}

}  // namespace

namespace ui {

ScopedXI2Event::ScopedXI2Event() = default;
ScopedXI2Event::~ScopedXI2Event() = default;

void ScopedXI2Event::InitKeyEvent(EventType type,
                                  KeyboardCode key_code,
                                  int flags) {}

void ScopedXI2Event::InitMotionEvent(const gfx::Point& location,
                                     const gfx::Point& root_location,
                                     int flags) {}

void ScopedXI2Event::InitButtonEvent(EventType type,
                                     const gfx::Point& location,
                                     int flags) {}

void ScopedXI2Event::InitGenericKeyEvent(int deviceid,
                                         int sourceid,
                                         EventType type,
                                         KeyboardCode key_code,
                                         int flags) {}

void ScopedXI2Event::InitGenericButtonEvent(int deviceid,
                                            EventType type,
                                            const gfx::Point& location,
                                            int flags) {}

void ScopedXI2Event::InitGenericMouseWheelEvent(int deviceid,
                                                int wheel_delta,
                                                int flags) {}

void ScopedXI2Event::InitScrollEvent(int deviceid,
                                     int x_offset,
                                     int y_offset,
                                     int x_offset_ordinal,
                                     int y_offset_ordinal,
                                     int finger_count) {}

void ScopedXI2Event::InitFlingScrollEvent(int deviceid,
                                          int x_velocity,
                                          int y_velocity,
                                          int x_velocity_ordinal,
                                          int y_velocity_ordinal,
                                          bool is_cancel) {}

void ScopedXI2Event::InitTouchEvent(int deviceid,
                                    int evtype,
                                    int tracking_id,
                                    const gfx::Point& location,
                                    const std::vector<Valuator>& valuators) {}

void ScopedXI2Event::SetUpValuators(const std::vector<Valuator>& valuators) {}

void SetUpTouchPadForTest(int deviceid) {}

void SetUpTouchDevicesForTest(const std::vector<int>& devices) {}

void SetUpPointerDevicesForTest(const std::vector<int>& devices) {}

}  // namespace ui