kwin/src/platformsupport/vsyncconvenience/vsyncmonitor.h
Vlad Zahorodnii 1b2c7b248b Run clazy with qt-keywords fixit
In C++20, there will be emit() class member, which can conflict with the
emit keyword. Given that, there are plans to enable QT_NO_KEYWORDS by
default in the future.

See also
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
2021-06-08 10:49:42 +03:00

36 lines
606 B
C++

/*
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "kwinglobals.h"
#include <QObject>
#include <chrono>
namespace KWin
{
/**
* The VsyncMonitor class provides a convenient way to monitor vblank events.
*/
class KWIN_EXPORT VsyncMonitor : public QObject
{
Q_OBJECT
public:
explicit VsyncMonitor(QObject *parent = nullptr);
public Q_SLOTS:
virtual void arm() = 0;
Q_SIGNALS:
void errorOccurred();
void vblankOccurred(std::chrono::nanoseconds timestamp);
};
} // namespace KWin