File indexing completed on 2024-04-28 05:30:23

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 #include "input_event_spy.h"
0011 
0012 #include <QObject>
0013 
0014 namespace KWin
0015 {
0016 
0017 class LidSwitchTracker : public QObject, InputEventSpy
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit LidSwitchTracker();
0022 
0023     bool isLidClosed() const;
0024 
0025 Q_SIGNALS:
0026     void lidStateChanged();
0027 
0028 private:
0029     void switchEvent(KWin::SwitchEvent *event) override;
0030 
0031     bool m_isLidClosed = false;
0032 };
0033 
0034 }