05fc3aef53
Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
// Copyright (C) 2018 QNX Software Systems. All rights reserved.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
#ifndef COLLECTOR_H_
|
|
#define COLLECTOR_H_
|
|
|
|
#include <QAbstractNativeEventFilter>
|
|
#include <QList>
|
|
#include <QWidget>
|
|
|
|
#include <screen/screen.h>
|
|
|
|
class Collector : public QWidget, public QAbstractNativeEventFilter
|
|
{
|
|
public:
|
|
explicit Collector(QWidget *parent = nullptr);
|
|
~Collector() override;
|
|
|
|
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
|
|
|
|
private:
|
|
struct Collectible
|
|
{
|
|
QWindow *window;
|
|
QWidget *widget;
|
|
};
|
|
QList<Collectible> m_collectibles;
|
|
|
|
bool filterQnxScreenEvent(screen_event_t event);
|
|
bool filterQnxScreenWindowEvent(screen_event_t event);
|
|
bool filterQnxScreenWindowCreateEvent(screen_window_t window, screen_event_t event);
|
|
bool filterQnxScreenWindowCloseEvent(screen_window_t window, screen_event_t event);
|
|
bool filterQnxScreenWindowManagerEvent(screen_window_t window, screen_event_t event);
|
|
bool filterQnxScreenWindowManagerNameEvent(screen_window_t window,
|
|
screen_event_t event);
|
|
};
|
|
|
|
|
|
#endif /* COLLECTOR_H_ */
|