summaryrefslogtreecommitdiffstats
path: root/src/input/killX11Handler.h
diff options
context:
space:
mode:
authorSebastien Braun2010-10-07 22:54:10 +0200
committerSebastien Braun2010-10-07 22:54:10 +0200
commite61097b8881bc7e72a5499816cb1199ea274a3ca (patch)
treebcfa9f3fe3f43af02845bc21367de395b248600c /src/input/killX11Handler.h
parentMake behaviour on lookup failures configurable (diff)
downloadpvs-e61097b8881bc7e72a5499816cb1199ea274a3ca.tar.gz
pvs-e61097b8881bc7e72a5499816cb1199ea274a3ca.tar.xz
pvs-e61097b8881bc7e72a5499816cb1199ea274a3ca.zip
Rework template meta-magic
- No more implicit dependency on Boost.MPL - Better documentation for template magic - Move input handler policies to handler definitions where they belong - Separate out event descriptions from handlers
Diffstat (limited to 'src/input/killX11Handler.h')
-rw-r--r--src/input/killX11Handler.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/input/killX11Handler.h b/src/input/killX11Handler.h
index 2f3ef44..8c0d655 100644
--- a/src/input/killX11Handler.h
+++ b/src/input/killX11Handler.h
@@ -20,15 +20,15 @@
#include <QCoreApplication>
#include "inputEventHandler.h"
-class KillX11Handler : public DefaultInputEventHandler<InputEvent::ET_SPECIAL, InputEvent::EC_KILL_X>
+class KillX11Handler : public InputEventHandler<
+ input_policy::Match<InputEvent::ET_SPECIAL, InputEvent::EC_KILL_X>,
+ input_policy::Require<input_policy::AllOf<
+ input_policy::UnixLike,
+ input_policy::X11GUI,
+ input_policy::ConsoleKitSupported> > >
{
public:
- void handle(InputEvent const&, InputEventContext const*);
-
- static void describeInto(QList<SpecialInputEventDescription>& list)
- {
- list << SpecialInputEventDescription(tr(QT_TRANSLATE_NOOP("InputEventHandler", "Kill X Server")), InputEvent::ET_SPECIAL, InputEvent::EC_KILL_X);
- }
+ void doHandle(InputEvent const&, InputEventContext const*);
};
#endif /* KILLX11HANDLER_H_ */