OLD | NEW |
(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; |
| 6 |
| 7 import "ui/events/devices/mojo/input_devices.mojom"; |
| 8 |
| 9 // Receives updates about changes to input-devices. See InputDeviceServer for |
| 10 // the expected behaviour. |
| 11 interface InputDeviceObserverMojo { |
| 12 // Is called when the list of keyboards changes. |
| 13 OnKeyboardDeviceConfigurationChanged(array<ui.mojom.InputDevice> devices); |
| 14 |
| 15 // Is called when the list of touchscreens changes. |
| 16 OnTouchscreenDeviceConfigurationChanged( |
| 17 array<ui.mojom.TouchscreenDevice> devices); |
| 18 |
| 19 // Is called when the list of mice changes. |
| 20 OnMouseDeviceConfigurationChanged(array<ui.mojom.InputDevice> devices); |
| 21 |
| 22 // Is called when the list of touchpads changes. |
| 23 OnTouchpadDeviceConfigurationChanged(array<ui.mojom.InputDevice> devices); |
| 24 |
| 25 // Is called once all of the input-device lists are available. This will |
| 26 // always be the first call that an observer receives. |
| 27 OnDeviceListsComplete( |
| 28 array<ui.mojom.InputDevice> keyboard_devices, |
| 29 array<ui.mojom.TouchscreenDevice> touchscreen_devices, |
| 30 array<ui.mojom.InputDevice> mouse_devices, |
| 31 array<ui.mojom.InputDevice> touchpad_devices); |
| 32 }; |
| 33 |
| 34 // Sends updates about input-devices to observers. |
| 35 interface InputDeviceServer { |
| 36 // Adds an InputDeviceObserverMojo in another process as an observer to get |
| 37 // notified of changes to input-devices over Mojo IPC. If all input-device |
| 38 // lists are complete when a new observer connects, the implementation will |
| 39 // immediately call OnDeviceListsComplete() with the input-device lists. If |
| 40 // not, the implementation will wait until all input-device lists are complete |
| 41 // then call OnDeviceListsComplete() for all connected observers. |
| 42 AddObserver(InputDeviceObserverMojo observer); |
| 43 }; |
OLD | NEW |