Rabbit Remote Control 0.1.0-bate5
Loading...
Searching...
No Matches
NativeEventFilterUnix.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CNATIVEEVENTFILTER_H
4#define CNATIVEEVENTFILTER_H
5
6#pragma once
7
8#include <QAbstractNativeEventFilter>
9#include <QEvent>
10#include <xcb/xcb_keysyms.h>
11
12#include "ParameterPlugin.h"
13#include "DesktopShortcuts.h"
14
15class CNativeEventFilterUnix : public QAbstractNativeEventFilter
16{
17public:
20
21 // QAbstractNativeEventFilter interface
22public:
23#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
24 virtual bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
25#else
26 virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
27#endif
28
29 xcb_key_symbols_t * m_pKeySymbols;
30 int GetKeySym(xcb_key_press_event_t* event, xcb_keysym_t& keysym);
31 bool HandleEvent(xcb_generic_event_t* event);
32 bool HandleKey(xcb_keysym_t keysym, QEvent::Type type, Qt::KeyboardModifiers modifiers);
33
34 static void RestoreSuperKeyShortcuts();
35 static void DisableSuperKeyShortcuts();
36private:
37 CParameterPlugin *m_pParameterPlugin;
38};
39
40#endif // CNATIVEEVENTFILTER_H
Global parameters of plugins.