From a9cf916966ce0359dd5a896c8ab71774cd85f1d4 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 19 Apr 2011 14:02:25 +0200 Subject: 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 --- src/utouch.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src/utouch.h') 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 @@ */ #include #include - +#include class UtouchScreen -: public ScreenInterface -, public PluginClassHandler + : public ScreenInterface + , public PluginClassHandler { public: - UtouchScreen(CompScreen* s); + UtouchScreen(CompScreen* s); + + virtual ~UtouchScreen(); + + void handleEvent(XEvent *ev); - virtual ~UtouchScreen(); +protected: + utouch_frame_handle createDevice(int devid) const; + void handleDeviceEvent(const XIDeviceEvent *ev); private: - CompScreen* screen; + typedef std::map dev_map; + CompScreen* screen; + dev_map devices; + int opcode; }; class UtouchVTable -: public CompPlugin::VTableForScreen + : public CompPlugin::VTableForScreen { - bool init(); + bool init(); }; -- cgit v1.2.3