Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qfbscreen_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFBSCREEN_P_H
5#define QFBSCREEN_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatformscreen.h>
19#include <QtCore/QTimer>
20#include <QtCore/QSize>
21#include "qfbcursor_p.h"
22
24
25class QFbWindow;
26class QFbCursor;
27class QPainter;
28class QFbBackingStore;
29
30class QFbScreen : public QObject, public QPlatformScreen
31{
33
34public:
39
40 QFbScreen();
41 ~QFbScreen();
42
43 virtual bool initialize();
44
45 QRect geometry() const override { return mGeometry; }
46 int depth() const override { return mDepth; }
47 QImage::Format format() const override { return mFormat; }
48 QSizeF physicalSize() const override { return mPhysicalSize; }
49 QPlatformCursor *cursor() const override { return mCursor; }
50
51 QWindow *topWindow() const;
52 QWindow *topLevelAt(const QPoint & p) const override;
53
54 // compositor api
55 virtual void addWindow(QFbWindow *window);
56 virtual void removeWindow(QFbWindow *window);
57 virtual void raise(QFbWindow *window);
58 virtual void lower(QFbWindow *window);
59 virtual void topWindowChanged(QWindow *) {}
60 virtual int windowCount() const;
61 virtual Flags flags() const;
62
63 void addPendingBackingStore(QFbBackingStore *bs) { mPendingBackingStores << bs; }
64
65 void scheduleUpdate();
66
67public slots:
68 virtual void setDirty(const QRect &rect);
69 void setPhysicalSize(const QSize &size);
70 void setGeometry(const QRect &rect);
71
72protected:
73 virtual QRegion doRedraw();
74
76 bool event(QEvent *event) override;
77
78 QFbWindow *windowForId(WId wid) const;
79
80 QList<QFbWindow *> mWindowStack;
83
86 int mDepth;
90
91private:
92 QPainter *mPainter;
93 QList<QFbBackingStore*> mPendingBackingStores;
94
95 friend class QFbWindow;
96};
97
98Q_DECLARE_OPERATORS_FOR_FLAGS(QFbScreen::Flags)
99
101
102#endif // QFBSCREEN_P_H
\inmodule QtCore
Definition qcoreevent.h:45
QImage mScreenImage
Definition qfbscreen_p.h:89
QSizeF physicalSize() const override
Reimplement this function in subclass to return the physical size of the screen, in millimeters.
Definition qfbscreen_p.h:48
QPlatformCursor * cursor() const override
Reimplement this function in subclass to return the cursor of the screen.
Definition qfbscreen_p.h:49
QFbWindow * windowForId(WId wid) const
virtual int windowCount() const
virtual Flags flags() const
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
Definition qfbscreen_p.h:45
QList< QFbWindow * > mWindowStack
Definition qfbscreen_p.h:80
virtual void topWindowChanged(QWindow *)
Definition qfbscreen_p.h:59
int depth() const override
Reimplement in subclass to return current depth of the screen.
Definition qfbscreen_p.h:46
QWindow * topLevelAt(const QPoint &p) const override
Return the given top level window for a given position.
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.
Definition qfbscreen_p.h:47
virtual bool initialize()
virtual void lower(QFbWindow *window)
Definition qfbscreen.cpp:91
QRegion mRepaintRegion
Definition qfbscreen_p.h:81
@ DontForceFirstWindowToFullScreen
Definition qfbscreen_p.h:36
QWindow * topWindow() const
void initializeCompositor()
Definition qfbscreen.cpp:32
void setGeometry(const QRect &rect)
virtual void raise(QFbWindow *window)
Definition qfbscreen.cpp:79
virtual QRegion doRedraw()
void setPhysicalSize(const QSize &size)
QFbCursor * mCursor
Definition qfbscreen_p.h:84
void addPendingBackingStore(QFbBackingStore *bs)
Definition qfbscreen_p.h:63
virtual void setDirty(const QRect &rect)
QRect mGeometry
Definition qfbscreen_p.h:85
QImage::Format mFormat
Definition qfbscreen_p.h:87
bool mUpdatePending
Definition qfbscreen_p.h:82
virtual void removeWindow(QFbWindow *window)
Definition qfbscreen.cpp:70
QSizeF mPhysicalSize
Definition qfbscreen_p.h:88
virtual void addWindow(QFbWindow *window)
Definition qfbscreen.cpp:48
void scheduleUpdate()
\inmodule QtGui
Definition qimage.h:37
Format
The following image formats are available in Qt.
Definition qimage.h:41
\inmodule QtCore
Definition qobject.h:103
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
The QPlatformCursor class provides information about pointer device events (movement,...
The QPlatformScreen class provides an abstraction for visual displays.
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtCore
Definition qsize.h:208
\inmodule QtCore
Definition qsize.h:25
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
Flags
GLenum GLuint GLintptr GLsizeiptr size
[1]
struct _cl_event * event
GLfloat GLfloat p
[1]
#define Q_OBJECT
#define slots
aWidget window() -> setWindowTitle("New Window Title")
[2]