aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-cpp/NativeEventFilter.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-10-13 16:25:18 -0400
committerKen Moore <ken@ixsystems.com>2017-10-13 16:25:18 -0400
commitd04f35ab9b827085d1cbee0bc2f7cae7787557ef (patch)
tree36a40cc20324aee82f4d2944cb2b54161522491c /src-qt5/src-cpp/NativeEventFilter.h
parentAnother checkpoint commit - almost ready to start running tests with QML for ... (diff)
downloadlumina-d04f35ab9b827085d1cbee0bc2f7cae7787557ef.tar.gz
lumina-d04f35ab9b827085d1cbee0bc2f7cae7787557ef.tar.bz2
lumina-d04f35ab9b827085d1cbee0bc2f7cae7787557ef.zip
Another checkpoint commit for Lumina 2
Almost have the QML-based desktop canvas working - still tracking down some QML syntax issues.
Diffstat (limited to 'src-qt5/src-cpp/NativeEventFilter.h')
-rw-r--r--src-qt5/src-cpp/NativeEventFilter.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src-qt5/src-cpp/NativeEventFilter.h b/src-qt5/src-cpp/NativeEventFilter.h
new file mode 100644
index 00000000..a3be3ef1
--- /dev/null
+++ b/src-qt5/src-cpp/NativeEventFilter.h
@@ -0,0 +1,71 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2012-2017, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This class provides the XCB event handling/registrations that are needed
+//===========================================
+#ifndef _LUMINA_DESKTOP_NATIVE_EVENT_FILTER_H
+#define _LUMINA_DESKTOP_NATIVE_EVENT_FILTER_H
+
+#include <QAbstractNativeEventFilter>
+#include <QObject>
+#include <QByteArray>
+
+#include "NativeWindow.h"
+
+
+class NativeEventFilter : public QObject{
+ Q_OBJECT
+private:
+ QAbstractNativeEventFilter* EF;
+ WId WMFlag; //used to flag a running WM process
+
+public:
+ NativeEventFilter();
+ ~NativeEventFilter(){}
+
+ void start();
+ void stop();
+
+signals:
+ //Window Signals
+ void WindowCreated(WId);
+ void WindowDestroyed(WId);
+ void WindowPropertyChanged(WId, NativeWindow::Property);
+ void WindowPropertiesChanged(WId, QList<NativeWindow::Property>);
+ void WindowPropertyChanged(WId, NativeWindow::Property, QVariant);
+ void WindowPropertiesChanged(WId, QList<NativeWindow::Property>, QList<QVariant>);
+ void RequestWindowPropertyChange(WId, NativeWindow::Property, QVariant);
+ void RequestWindowPropertiesChange(WId, QList<NativeWindow::Property>, QList<QVariant>);
+
+ //System Tray Signals
+ void TrayWindowCreated(WId);
+ void TrayWindowDestroyed(WId);
+
+ //Miscellaneos Signals
+ void PossibleDamageEvent(WId);
+
+ //Input Event Signals
+ void KeyPressed(int, WId);
+ void KeyReleased(int, WId);
+ void MousePressed(int, WId);
+ void MouseReleased(int, WId);
+ void MouseMovement();
+ void MouseEnterWindow(WId);
+ void MouseLeaveWindow(WId);
+};
+
+class EventFilter : public QAbstractNativeEventFilter{
+public:
+ EventFilter(NativeEventFilter *parent);
+ ~EventFilter(){}
+
+ virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *);
+
+private:
+ NativeEventFilter *obj;
+};
+
+#endif
bgstack15