3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GBASE_INPUTHUB_H_
9 #define MSP_GBASE_INPUTHUB_H_
11 #include "inputdevice.h"
17 The Hub device collects events from multiple input devices and presents an
18 aggregate of them. Button and axis numbers are mapped to unique values.
20 class Hub: public Device
23 std::vector<Device *> devices;
27 Attaches an input device to the hub.
29 @param dev Device to attach
31 @return Index of the device within the hub
33 unsigned attach(Device &dev);
35 void button_press(unsigned, unsigned);
36 void button_release(unsigned, unsigned);
37 void axis_motion(unsigned, float, float, unsigned);