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/QSize>
20#include "qfbcursor_p.h"
21
23
24class QFbWindow;
25class QFbCursor;
26class QPainter;
27class QFbBackingStore;
28
29class QFbScreen : public QObject, public QPlatformScreen
30{
32
33public:
38
39 QFbScreen();
40 ~QFbScreen();
41
42 virtual bool initialize();
43
44 QRect geometry() const override { return mGeometry; }
45 int depth() const override { return mDepth; }
46 QImage::Format format() const override { return mFormat; }
47 QSizeF physicalSize() const override { return mPhysicalSize; }
48 QPlatformCursor *cursor() const override { return mCursor; }
49
50 QWindow *topWindow() const;
51 QWindow *topLevelAt(const QPoint & p) const override;
52
53 // compositor api
54 virtual void addWindow(QFbWindow *window);
55 virtual void removeWindow(QFbWindow *window);
56 virtual void raise(QFbWindow *window);
57 virtual void lower(QFbWindow *window);
58 virtual void topWindowChanged(QWindow *) {}
59 virtual int windowCount() const;
60 virtual Flags flags() const;
61
62 void addPendingBackingStore(QFbBackingStore *bs) { mPendingBackingStores << bs; }
63
64 void scheduleUpdate();
65
66public slots:
67 virtual void setDirty(const QRect &rect);
68 void setPhysicalSize(const QSize &size);
69 void setGeometry(const QRect &rect);
70
71protected:
72 virtual QRegion doRedraw();
73
75 bool event(QEvent *event) override;
76
77 QFbWindow *windowForId(WId wid) const;
78
79 QList<QFbWindow *> mWindowStack;
82
85 int mDepth;
89
90private:
91 QPainter *mPainter;
92 QList<QFbBackingStore*> mPendingBackingStores;
93
94 friend class QFbWindow;
95};
96
97Q_DECLARE_OPERATORS_FOR_FLAGS(QFbScreen::Flags)
98
100
101#endif // QFBSCREEN_P_H
\inmodule QtCore
Definition qcoreevent.h:45
QImage mScreenImage
Definition qfbscreen_p.h:88
QSizeF physicalSize() const override
Reimplement this function in subclass to return the physical size of the screen, in millimeters.
Definition qfbscreen_p.h:47
QPlatformCursor * cursor() const override
Reimplement this function in subclass to return the cursor of the screen.
Definition qfbscreen_p.h:48
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:44
QList< QFbWindow * > mWindowStack
Definition qfbscreen_p.h:79
virtual void topWindowChanged(QWindow *)
Definition qfbscreen_p.h:58
int depth() const override
Reimplement in subclass to return current depth of the screen.
Definition qfbscreen_p.h:45
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:46
virtual bool initialize()
virtual void lower(QFbWindow *window)
Definition qfbscreen.cpp:91
QRegion mRepaintRegion
Definition qfbscreen_p.h:80
@ DontForceFirstWindowToFullScreen
Definition qfbscreen_p.h:35
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:83
void addPendingBackingStore(QFbBackingStore *bs)
Definition qfbscreen_p.h:62
virtual void setDirty(const QRect &rect)
QRect mGeometry
Definition qfbscreen_p.h:84
QImage::Format mFormat
Definition qfbscreen_p.h:86
bool mUpdatePending
Definition qfbscreen_p.h:81
virtual void removeWindow(QFbWindow *window)
Definition qfbscreen.cpp:70
QSizeF mPhysicalSize
Definition qfbscreen_p.h:87
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]