1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! one API for the most popular passthrough boxes. you connect, and anybox figures out which box it is, the
//! firmware, and what it can do, then you call the same methods without having to worry about which box is plugged in
//!
//! ```no_run
//! use anybox::{Button, Event, Key};
//!
//! fn main() -> anybox::Result<()> {
//! let device = anybox::connect()?;
//! device.move_by(100, 0)?;
//! device.click(Button::Left)?;
//! device.tap_key(Key::A)?;
//!
//! for event in device.events() {
//! if let Event::Button { button, pressed: true, .. } = event {
//! println!("{button:?} down");
//! }
//! }
//! Ok(())
//! }
//! ```
//!
//! if a box can't do something, the call fails with [`Error::Unsupported`] and says why, nothing is faked or
//! changed behind your back. [`Device::snapshot`] tells you up front what the box in front of you can do right
//! now, which also depends on what's plugged into it. things only one box has stay reachable through that box's
//! own API, like `device.medius()` on a Medius
//!
//! the README has the full picture, which box does what, the differences between them, and how to add your own
//! fallback for something a box can't do: <https://github.com/etherealrl/anybox>
// with a box family left out, the shared code only the others use has nothing calling it
pub use ;
pub use ;
pub use ;
pub use Device;
pub use ;
pub use ;
pub use MockPoller;
pub use ;
pub use medius;
// the readme's examples get compiled with the tests, so they can't drift from the API
;