README.md 870 Bytes
Newer Older
1 2 3
stmm-input-fake                                                    {#mainpage}
===============

sm's avatar
sm committed
4
Library for developers that need to simulate a device manager
5 6 7
to feed their test code with fake events defined by the library
libstmm-input-ev.

sm's avatar
sm committed
8
It provides a fake device manager to which test code can add and remove
9
listeners. To generate events that will be sent to the listeners it
sm's avatar
sm committed
10
exposes methods that simulate
11 12 13 14 15 16
- the addition and removal of fake devices (keyboards, joysticks, etc.)
- keystrokes, mouse button clicks, joystick axis changes, etc.

Usage
-----

sm's avatar
sm committed
17
In your test cases instead of instantiating a device manager with
sm's avatar
sm committed
18
(for example) stmi::GtkDeviceManager::create() use
sm's avatar
sm committed
19
std::make_shared<stmi::testing::FakeDeviceManager>()
20 21 22 23 24 25 26
and pass it to the to be tested classes instead.

See the 'examples/' subfolder.

Warning
-------
The API of this library isn't stable yet.