| Index: components/mus/public/interfaces/input_devices/input_devices.mojom
|
| diff --git a/components/mus/public/interfaces/input_devices/input_devices.mojom b/components/mus/public/interfaces/input_devices/input_devices.mojom
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d314b407a64e376cc93ea42eb2141c32845bde0b
|
| --- /dev/null
|
| +++ b/components/mus/public/interfaces/input_devices/input_devices.mojom
|
| @@ -0,0 +1,70 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +module input_device.mojom;
|
| +
|
| +import "ui/gfx/geometry/mojo/geometry.mojom";
|
| +
|
| +enum InputDeviceType {
|
| + INPUT_DEVICE_INTERNAL, // Internally connected input device.
|
| + INPUT_DEVICE_EXTERNAL, // Known externally connected input device.
|
| + INPUT_DEVICE_UNKNOWN, // Device that may or may not be an external device.
|
| +};
|
| +
|
| +struct InputDevice {
|
| + // ID of the device. This ID is unique between all input devices.
|
| + int32 id;
|
| +
|
| + // The type of the input device.
|
| + InputDeviceType type;
|
| +
|
| + // Name of the device.
|
| + string name;
|
| +
|
| + // The path to the input device in the sysfs filesystem.
|
| + string sys_path;
|
| +
|
| + // USB-style device identifiers, where available, or 0 if unavailable.
|
| + uint16 vendor_id;
|
| + uint16 product_id;
|
| +};
|
| +
|
| +// TODO(kylechar): Don't repeat all the fields here, maybe just use composition.
|
| +struct TouchscreenDevice {
|
| + // ID of the device. This ID is unique between all input devices.
|
| + int32 id;
|
| +
|
| + // The type of the input device.
|
| + InputDeviceType type;
|
| +
|
| + // Name of the device.
|
| + string name;
|
| +
|
| + // The path to the input device in the sysfs filesystem.
|
| + string sys_path;
|
| +
|
| + // USB-style device identifiers, where available, or 0 if unavailable.
|
| + uint16 vendor_id;
|
| + uint16 product_id;
|
| +
|
| + // Size of the touch screen area.
|
| + gfx.mojom.Size size;
|
| +
|
| + // The number of touch points this device supports, or 0 if unknown.
|
| + int32 touch_points;
|
| +};
|
| +
|
| +interface InputDeviceObserverMojo {
|
| + OnKeyboardDeviceConfigurationChanged(array<InputDevice> devices);
|
| + OnTouchscreenDeviceConfigurationChanged(array<TouchscreenDevice> devices);
|
| + OnMouseDeviceConfigurationChanged(array<InputDevice> devices);
|
| + OnTouchpadDeviceConfigurationChanged(array<InputDevice> devices);
|
| + OnDeviceListsComplete();
|
| +};
|
| +
|
| +interface InputDeviceServer {
|
| + // Adds an InputDeviceObserverMojo in another process as an observer to get
|
| + // notified of changes to input-devices over Mojo IPC.
|
| + AddObserver(InputDeviceObserverMojo observer);
|
| +};
|
|
|