chromium/ui/events/x/x11_event_translation.cc

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

#include "ui/events/x/x11_event_translation.h"

#include <vector>

#include "base/check.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/ozone/events_ozone.h"
#include "ui/events/pointer_details.h"
#include "ui/events/types/event_type.h"
#include "ui/events/x/events_x_utils.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/x/xproto.h"

namespace ui {

namespace {

int XkbGroupForCoreState(int state) {}

// In X11 touch events, a new tracking_id/slot mapping is set up for each new
// event (see |ui::GetTouchIdFromXEvent| function), which needs to be cleared
// at destruction time for corresponding release/cancel events. In this
// particular case, ui::TouchEvent class is extended so that dtor can be
// overridden in order to implement this platform-specific behavior.
class TouchEventX11 : public ui::TouchEvent {};

Event::Properties GetEventPropertiesFromXEvent(EventType type,
                                               const x11::Event& x11_event) {}

std::unique_ptr<KeyEvent> CreateKeyEvent(EventType event_type,
                                         const x11::Event& x11_event) {}

void SetEventSourceDeviceId(MouseEvent* event, const x11::Event& xev) {}

std::unique_ptr<MouseEvent> CreateMouseEvent(EventType type,
                                             const x11::Event& x11_event) {}

std::unique_ptr<MouseWheelEvent> CreateMouseWheelEvent(
    const x11::Event& x11_event) {}

std::unique_ptr<TouchEvent> CreateTouchEvent(EventType type,
                                             const x11::Event& xev) {}

std::unique_ptr<ScrollEvent> CreateScrollEvent(EventType type,
                                               const x11::Event& xev) {}

// Translates XI2 XEvent into a ui::Event.
std::unique_ptr<ui::Event> TranslateFromXI2Event(const x11::Event& xev,
                                                 EventType event_type) {}

std::unique_ptr<Event> TranslateFromXEvent(const x11::Event& xev) {}

}  // namespace

// Translates a XEvent into a ui::Event.
std::unique_ptr<Event> BuildEventFromXEvent(const x11::Event& xev) {}

// Convenience function that translates XEvent into ui::KeyEvent
std::unique_ptr<KeyEvent> BuildKeyEventFromXEvent(const x11::Event& xev) {}

// Convenience function that translates XEvent into ui::MouseEvent
std::unique_ptr<MouseEvent> BuildMouseEventFromXEvent(const x11::Event& xev) {}

// Convenience function that translates XEvent into ui::TouchEvent
std::unique_ptr<TouchEvent> BuildTouchEventFromXEvent(const x11::Event& xev) {}

// Convenience function that translates XEvent into ui::MouseWheelEvent
std::unique_ptr<MouseWheelEvent> BuildMouseWheelEventFromXEvent(
    const x11::Event& xev) {}

}  // namespace ui