diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-04-19 14:02:25 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-04-19 14:02:25 +0200 |
| commit | a9cf916966ce0359dd5a896c8ab71774cd85f1d4 (patch) | |
| tree | 42595565855ac825b25a82e8aedc57437bfe0db2 /src/utouch.h | |
| parent | 2e8c59b2a9d065531cf3ff2807fce013cd2dc078 (diff) | |
Test utouch-frame through utouch-compiz
This patch implements a simple test of the touch frame mechanism,
via XI2.1 and the compiz plugin. Run compiz in the foreground to
see the printouts for touches.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/utouch.h')
| -rw-r--r-- | src/utouch.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/utouch.h b/src/utouch.h index c9f3a6d..3db32a7 100644 --- a/src/utouch.h +++ b/src/utouch.h | |||
| @@ -20,25 +20,34 @@ | |||
| 20 | */ | 20 | */ |
| 21 | #include <core/core.h> | 21 | #include <core/core.h> |
| 22 | #include <core/pluginclasshandler.h> | 22 | #include <core/pluginclasshandler.h> |
| 23 | 23 | #include <utouch/frame-xi2.h> | |
| 24 | 24 | ||
| 25 | class UtouchScreen | 25 | class UtouchScreen |
| 26 | : public ScreenInterface | 26 | : public ScreenInterface |
| 27 | , public PluginClassHandler<UtouchScreen, CompScreen> | 27 | , public PluginClassHandler<UtouchScreen, CompScreen> |
| 28 | { | 28 | { |
| 29 | public: | 29 | public: |
| 30 | UtouchScreen(CompScreen* s); | 30 | UtouchScreen(CompScreen* s); |
| 31 | |||
| 32 | virtual ~UtouchScreen(); | ||
| 33 | |||
| 34 | void handleEvent(XEvent *ev); | ||
| 31 | 35 | ||
| 32 | virtual ~UtouchScreen(); | 36 | protected: |
| 37 | utouch_frame_handle createDevice(int devid) const; | ||
| 38 | void handleDeviceEvent(const XIDeviceEvent *ev); | ||
| 33 | 39 | ||
| 34 | private: | 40 | private: |
| 35 | CompScreen* screen; | 41 | typedef std::map<int, utouch_frame_handle> dev_map; |
| 42 | CompScreen* screen; | ||
| 43 | dev_map devices; | ||
| 44 | int opcode; | ||
| 36 | }; | 45 | }; |
| 37 | 46 | ||
| 38 | 47 | ||
| 39 | class UtouchVTable | 48 | class UtouchVTable |
| 40 | : public CompPlugin::VTableForScreen<UtouchScreen> | 49 | : public CompPlugin::VTableForScreen<UtouchScreen> |
| 41 | { | 50 | { |
| 42 | bool init(); | 51 | bool init(); |
| 43 | }; | 52 | }; |
| 44 | 53 | ||
