X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fhub.h;h=31eeb94bf5dfb220c793d73d6cff533b345204e5;hb=b45ba2f7ceb60c1a6abc1a951a97b40c03671264;hp=9fe57dd95a3bef2a501c23156b9812716fe0074d;hpb=47df97f4381412236a02f0fcf71a2e9b23f78187;p=libs%2Fgui.git diff --git a/source/input/hub.h b/source/input/hub.h index 9fe57dd..31eeb94 100644 --- a/source/input/hub.h +++ b/source/input/hub.h @@ -1,6 +1,8 @@ -#ifndef MSP_GBASE_INPUTHUB_H_ -#define MSP_GBASE_INPUTHUB_H_ +#ifndef MSP_INPUT_INPUTHUB_H_ +#define MSP_INPUT_INPUTHUB_H_ +#include +#include #include "device.h" namespace Msp { @@ -10,17 +12,16 @@ namespace Input { The Hub device collects events from multiple input devices and presents an aggregate of them. Button and axis numbers are mapped to unique values. */ -class Hub: public Device +class Hub: public Device, public sigc::trackable { protected: - std::vector devices; + std::map devices; public: Hub(); - /** Attaches an input device to the hub. Returns the index of the device - within the hub. */ - unsigned attach(Device &dev); + /// Attaches an input device to the hub. + void attach(Device &dev); virtual std::string get_button_name(unsigned) const; virtual std::string get_axis_name(unsigned) const;