Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: components/mus/input_devices/public/interfaces/input_devices.mojom

Issue 1992443002: Add Mojo IPC based input-device service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_ddm
Patch Set: Updated. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module input_device.mojom;
Ben Goodger (Google) 2016/06/02 18:06:44 this dir should be in: components/mus/public/inte
6
7 import "ui/gfx/geometry/mojo/geometry.mojom";
8
9 enum InputDeviceType {
10 INPUT_DEVICE_INTERNAL, // Internally connected input device.
11 INPUT_DEVICE_EXTERNAL, // Known externally connected input device.
12 INPUT_DEVICE_UNKNOWN, // Device that may or may not be an external device.
13 };
14
15 struct InputDevice {
16 // ID of the device. This ID is unique between all input devices.
17 int32 id;
18
19 // The type of the input device.
20 InputDeviceType type;
21
22 // Name of the device.
23 string name;
24
25 // The path to the input device in the sysfs filesystem.
26 string sys_path;
27
28 // USB-style device identifiers, where available, or 0 if unavailable.
29 uint16 vendor_id;
30 uint16 product_id;
31 };
32
33 // TODO(kylechar): Don't repeat all the fields here, maybe just use composition.
34 struct TouchscreenDevice {
35 // ID of the device. This ID is unique between all input devices.
36 int32 id;
37
38 // The type of the input device.
39 InputDeviceType type;
40
41 // Name of the device.
42 string name;
43
44 // The path to the input device in the sysfs filesystem.
45 string sys_path;
46
47 // USB-style device identifiers, where available, or 0 if unavailable.
48 uint16 vendor_id;
49 uint16 product_id;
50
51 // Size of the touch screen area.
52 mojo.Size size;
53
54 // The number of touch points this device supports, or 0 if unknown.
55 int32 touch_points;
56 };
57
58 interface InputDeviceObserverMojo {
59 OnKeyboardDeviceConfigurationChanged(array<InputDevice> devices);
60 OnTouchscreenDeviceConfigurationChanged(array<TouchscreenDevice> devices);
61 OnMouseDeviceConfigurationChanged(array<InputDevice> devices);
62 OnTouchpadDeviceConfigurationChanged(array<InputDevice> devices);
63 OnDeviceListsComplete();
64 };
65
66 interface InputDeviceServer {
67 // Adds an InputDeviceObserverMojo in another process as an observer to get
68 // notified of changes to input-devices over Mojo IPC.
69 AddObserver(InputDeviceObserverMojo observer);
70 };
OLDNEW
« no previous file with comments | « components/mus/input_devices/public/interfaces/OWNERS ('k') | components/mus/input_devices/touchscreen_device.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698