chromium/remoting/host/input_injector_x11.cc

// Copyright 2012 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/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif
#include "remoting/host/input_injector_x11.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <optional>
#include <set>
#include <utility>

#include "base/compiler_specific.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "remoting/base/logging.h"
#include "remoting/host/clipboard.h"
#include "remoting/host/input_injector_constants_linux.h"
#include "remoting/host/linux/unicode_to_keysym.h"
#include "remoting/host/linux/x11_character_injector.h"
#include "remoting/host/linux/x11_keyboard_impl.h"
#include "remoting/host/linux/x11_util.h"
#include "remoting/proto/internal.pb.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/gfx/x/future.h"
#include "ui/gfx/x/keysyms/keysyms.h"
#include "ui/gfx/x/xinput.h"
#include "ui/gfx/x/xkb.h"
#include "ui/gfx/x/xproto.h"
#include "ui/gfx/x/xtest.h"

namespace remoting {
namespace {

ClipboardEvent;
KeyEvent;
MouseEvent;
TextEvent;
TouchEvent;

ScrollDirection WheelDeltaToScrollDirection(float num) {}

bool IsDomModifierKey(ui::DomCode dom_code) {}

// Pixel-to-wheel-ticks conversion ratio used by GTK.
// From third_party/WebKit/Source/web/gtk/WebInputEventFactory.cpp .
const float kWheelTicksPerPixel =;

// When the user is scrolling, generate at least one tick per time period.
const base::TimeDelta kContinuousScrollTimeout =;

}  // namespace

InputInjectorX11::InputInjectorX11(
    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {}

InputInjectorX11::~InputInjectorX11() {}

void InputInjectorX11::Init() {}

void InputInjectorX11::InjectClipboardEvent(const ClipboardEvent& event) {}

void InputInjectorX11::InjectKeyEvent(const KeyEvent& event) {}

void InputInjectorX11::InjectTextEvent(const TextEvent& event) {}

void InputInjectorX11::InjectMouseEvent(const MouseEvent& event) {}

void InputInjectorX11::InjectTouchEvent(const TouchEvent& event) {}

void InputInjectorX11::Start(
    std::unique_ptr<protocol::ClipboardStub> client_clipboard) {}

InputInjectorX11::Core::Core(
    scoped_refptr<base::SingleThreadTaskRunner> task_runner)
    :{}

void InputInjectorX11::Core::Init() {}

void InputInjectorX11::Core::InjectClipboardEvent(const ClipboardEvent& event) {}

void InputInjectorX11::Core::InjectKeyEvent(const KeyEvent& event) {}

void InputInjectorX11::Core::InjectTextEvent(const TextEvent& event) {}

InputInjectorX11::Core::~Core() {}

void InputInjectorX11::Core::InitClipboard() {}

bool InputInjectorX11::Core::IsAutoRepeatEnabled() {}

void InputInjectorX11::Core::SetAutoRepeatEnabled(bool mode) {}

bool InputInjectorX11::Core::IsLockKey(x11::KeyCode keycode) {}

void InputInjectorX11::Core::SetLockStates(std::optional<bool> caps_lock,
                                           std::optional<bool> num_lock) {}

void InputInjectorX11::Core::InjectScrollWheelClicks(int button, int count) {}

void InputInjectorX11::Core::InjectMouseEvent(const MouseEvent& event) {}

void InputInjectorX11::Core::InitMouseButtonMap() {}

int InputInjectorX11::Core::MouseButtonToX11ButtonNumber(
    MouseEvent::MouseButton button) {}

int InputInjectorX11::Core::HorizontalScrollWheelToX11ButtonNumber(int dx) {}

int InputInjectorX11::Core::VerticalScrollWheelToX11ButtonNumber(int dy) {}

void InputInjectorX11::Core::Start(
    std::unique_ptr<protocol::ClipboardStub> client_clipboard) {}

void InputInjectorX11::Core::Stop() {}

}  // namespace remoting