KWin
Loading...
Searching...
No Matches
surfaceitem_internal.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "scene/surfaceitem.h"
10
11namespace KWin
12{
13
14class InternalWindow;
15
19class KWIN_EXPORT SurfaceItemInternal : public SurfaceItem
20{
21 Q_OBJECT
22
23public:
24 explicit SurfaceItemInternal(InternalWindow *window, Scene *scene, Item *parent = nullptr);
25
26 InternalWindow *window() const;
27
28 QList<QRectF> shape() const override;
29
30private Q_SLOTS:
31 void handleBufferGeometryChanged();
32
33protected:
34 std::unique_ptr<SurfacePixmap> createPixmap() override;
35
36private:
37 InternalWindow *m_window;
38};
39
40class KWIN_EXPORT SurfacePixmapInternal final : public SurfacePixmap
41{
42 Q_OBJECT
43
44public:
45 explicit SurfacePixmapInternal(SurfaceItemInternal *item, QObject *parent = nullptr);
46
47 void create() override;
48 void update() override;
49 bool isValid() const override;
50
51private:
52 SurfaceItemInternal *m_item;
53};
54
55} // namespace KWin