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
qdirectfbscreen.cpp
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#include "qdirectfbscreen.h"
5#include "qdirectfbcursor.h"
6
8
11 , m_layer(QDirectFbConvenience::dfbDisplayLayer(display))
12{
13 m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_SHARED);
14
15 DFBDisplayLayerConfig config;
16 m_layer->GetConfiguration(m_layer.data(), &config);
17
19 m_geometry = QRect(0, 0, config.width, config.height);
20 const int dpi = 72;
21 const qreal inch = 25.4;
23 m_physicalSize = QSizeF(config.width, config.height) * inch / dpi;
24
25 m_cursor.reset(new QDirectFBCursor(this));
26}
27
28IDirectFBDisplayLayer *QDirectFbScreen::dfbLayer() const
29{
30 return m_layer.data();
31}
32
33
static QImage::Format imageFormatFromSurfaceFormat(const DFBSurfacePixelFormat format, const DFBSurfaceCapabilities caps)
static int colorDepthForSurface(const DFBSurfacePixelFormat format)
IDirectFBDisplayLayer * dfbLayer() const
QImage::Format m_format
QDirectFbScreen(int display)
QDirectFBPointer< IDirectFBDisplayLayer > m_layer
The QPlatformScreen class provides an abstraction for visual displays.
\inmodule QtCore\reentrant
Definition qrect.h:30
T * data() const noexcept
Returns the value of the pointer referenced by this object.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
\inmodule QtCore
Definition qsize.h:208
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
EGLConfig config
double qreal
Definition qtypes.h:187