]> git.tdb.fi Git - libs/gui.git/blob - source/input/linux/gamecontroller_platform.h
61bcdb5d67e90eda4e6d1bfe4bb2c7a9040ea815
[libs/gui.git] / source / input / linux / gamecontroller_platform.h
1 #ifndef GAMECONTROLLER_PRIVATE_H_
2 #define GAMECONTROLLER_PRIVATE_H_
3
4 #include <msp/io/eventobject.h>
5 #include <msp/io/handle.h>
6
7 namespace Msp {
8 namespace Input {
9
10 class JsDevice: public IO::EventObject
11 {
12 private:
13         IO::Handle handle;
14
15 public:
16         JsDevice(const std::string &);
17
18         std::string get_name() const;
19
20 protected:
21         virtual unsigned do_read(char *, unsigned);
22         virtual unsigned do_write(const char *, unsigned);
23
24 public:
25         virtual const IO::Handle &get_event_handle() { return handle; }
26 };
27
28
29 struct GameController::Private
30 {
31         JsDevice *dev;
32 };
33
34 } // namespace Input
35 } // namespace Msp
36
37 #endif