File indexing completed on 2024-07-14 05:21:36

0001 /*
0002     SPDX-FileCopyrightText: 2019 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef WINDOWSYSTEMTRACKEDVIEWINFO_H
0007 #define WINDOWSYSTEMTRACKEDVIEWINFO_H
0008 
0009 // local
0010 #include "trackedgeneralinfo.h"
0011 #include "../windowinfowrap.h"
0012 
0013 // Qt
0014 #include <QObject>
0015 #include <QRect>
0016 
0017 namespace Latte {
0018 class View;
0019 namespace WindowSystem {
0020 class SchemeColors;
0021 namespace Tracker {
0022 class Windows;
0023 }
0024 }
0025 }
0026 
0027 
0028 namespace Latte {
0029 namespace WindowSystem {
0030 namespace Tracker {
0031 
0032 class TrackedViewInfo : public TrackedGeneralInfo {
0033     Q_OBJECT
0034 
0035 public:
0036     TrackedViewInfo(Tracker::Windows *tracker, Latte::View *view);
0037     ~TrackedViewInfo() override;
0038 
0039     bool activeWindowTouching() const;
0040     void setActiveWindowTouching(bool touching);
0041 
0042     bool existsWindowTouching() const;
0043     void setExistsWindowTouching(bool touching);
0044 
0045     bool activeWindowTouchingEdge() const;
0046     void setActiveWindowTouchingEdge(bool touching);
0047 
0048     bool existsWindowTouchingEdge() const;
0049     void setExistsWindowTouchingEdge(bool touching);
0050 
0051     bool isTouchingBusyVerticalView() const;
0052     void setIsTouchingBusyVerticalView(bool touching);
0053 
0054     QRect screenGeometry() const;
0055     void setScreenGeometry(QRect geometry);
0056 
0057     SchemeColors *touchingWindowScheme() const;
0058     void setTouchingWindowScheme(SchemeColors *scheme);
0059 
0060     Latte::View *view() const;
0061 
0062     bool isTracking(const WindowInfoWrap &winfo) const override;
0063 
0064 private:
0065     bool m_activeWindowTouching{false};
0066     bool m_existsWindowTouching{false};
0067     bool m_activeWindowTouchingEdge{false};
0068     bool m_existsWindowTouchingEdge{false};
0069     bool m_isTouchingBusyVerticalView{false};
0070 
0071     QRect m_screenGeometry;
0072 
0073     SchemeColors *m_touchingWindowScheme{nullptr};
0074 
0075     Latte::View *m_view{nullptr};
0076 };
0077 
0078 }
0079 }
0080 }
0081 
0082 #endif