theshell/shell/nativeeventfilter.h

68 lines
1.9 KiB
C
Raw Normal View History

2017-08-05 15:20:02 +10:00
/****************************************
2018-01-08 18:26:23 +11:00
*
2017-08-05 15:20:02 +10:00
* theShell - Desktop Environment
2019-01-01 21:52:05 +11:00
* Copyright (C) 2019 Victor Tran
2017-08-05 15:20:02 +10:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2018-01-08 18:26:23 +11:00
*
2017-08-05 15:20:02 +10:00
* *************************************/
2016-06-11 17:07:36 +10:00
#ifndef NATIVEEVENTFILTER_H
#define NATIVEEVENTFILTER_H
#include <QObject>
#include <QAbstractNativeEventFilter>
#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>
#include <QX11Info>
2016-06-13 21:40:01 +10:00
#include <QProcess>
#include <QTime>
#include <math.h>
#include <QIcon>
#include "hotkeyhud.h"
#include "endsessionwait.h"
#include "dbusevents.h"
2016-06-30 16:07:29 +10:00
#include "rundialog.h"
2018-01-22 18:20:33 +11:00
#include "screenrecorder.h"
2016-06-13 21:40:01 +10:00
#include <QDBusUnixFileDescriptor>
#include <QDBusMessage>
#include <QDBusConnection>
#include <QDBusReply>
#include <QDebug>
#include <QMessageBox>
#include <QSoundEffect>
2016-12-20 12:18:23 +11:00
#include "screenshotwindow.h"
2016-06-13 21:40:01 +10:00
2019-03-23 00:34:48 +11:00
struct NativeEventFilterPrivate;
2016-06-11 17:07:36 +10:00
class NativeEventFilter : public QObject, public QAbstractNativeEventFilter
{
Q_OBJECT
2019-03-23 00:34:48 +11:00
public:
explicit NativeEventFilter(QObject* parent = 0);
~NativeEventFilter();
2016-06-13 21:40:01 +10:00
2019-03-23 00:34:48 +11:00
signals:
void SysTrayEvent(long opcode, long data2, long data3, long data4);
2019-03-23 00:34:48 +11:00
public slots:
void handlePowerButton();
2019-03-23 00:34:48 +11:00
private:
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);
2018-09-11 21:40:28 +10:00
2019-03-23 00:34:48 +11:00
NativeEventFilterPrivate* d;
2016-06-11 17:07:36 +10:00
};
#endif // NATIVEEVENTFILTER_H