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
qdirectfbintegration.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
6#include "qdirectfbblitter.h"
8#include "qdirectfbcursor.h"
9#include "qdirectfbwindow.h"
10
11#include <QtGui/private/qgenericunixfontdatabase_p.h>
12#include <QtGui/private/qgenericunixeventdispatcher_p.h>
13#include <QtGui/private/qgenericunixservices_p.h>
14
15#include <QtGui/private/qpixmap_blitter_p.h>
16#include <QtGui/private/qpixmap_raster_p.h>
17#include <QtGui/private/qguiapplication_p.h>
18#include <qpa/qplatformpixmap.h>
19#include <QtCore/QCoreApplication>
20#include <QtCore/QThread>
21#include <QtCore/QAbstractEventDispatcher>
22#include <qpa/qplatforminputcontextfactory_p.h>
23#include <qpa/qwindowsysteminterface.h>
24
26
32
41
43{
44 switch (cap) {
45 case ThreadedPixmaps: return true;
46 case MultipleWindows: return true;
47#ifdef DIRECTFB_GL_EGL
48 case OpenGL: return true;
49 case ThreadedOpenGL: return true;
50#endif
52 }
53}
54
56{
58 int argc = args.size();
59 char **argv = new char*[argc];
60
61 for (int i = 0; i < argc; ++i)
62 argv[i] = qstrdup(args.at(i).toLocal8Bit().constData());
63
64 DFBResult result = DirectFBInit(&argc, &argv);
65 if (result != DFB_OK) {
66 DirectFBError("QDirectFBScreen: error initializing DirectFB",
67 result);
68 }
69
70 for (int i = 0; i < argc; ++i)
71 delete[] argv[i];
72 delete[] argv;
73
74 // This must happen after DirectFBInit.
76}
77
83
89
95
103
105{
107 dfbWindow->createDirectFBWindow();
108 return dfbWindow;
109}
110
112{
113 return createUnixEventDispatcher();
114}
115
120
125
130
135
static QStringList arguments()
static IDirectFB * dfbInterface()
QScopedPointer< QDirectFbInput > m_input
bool hasCapability(Capability cap) const override
QScopedPointer< QDirectFbScreen > m_primaryScreen
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformInputContext * m_inputContext
QPlatformServices * services() const override
QPlatformPixmap * createPlatformPixmap(QPlatformPixmap::PixelType type) const override
Factory function for QPlatformPixmap.
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QScopedPointer< QPlatformFontDatabase > m_fontDb
QDirectFBPointer< IDirectFB > m_dfb
QPlatformNativeInterface * nativeInterface() const override
QScopedPointer< QPlatformServices > m_services
IDirectFBDisplayLayer * dfbLayer() const
virtual void createDirectFBWindow()
qsizetype size() const noexcept
Definition qlist.h:397
const_reference at(qsizetype i) const noexcept
Definition qlist.h:446
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
static QPlatformInputContext * create()
virtual bool hasCapability(Capability cap) const
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
The QPlatformPixmap class provides an abstraction for native pixmaps.
The QPlatformServices provides the backend for desktop-related functionality.
The QPlatformWindow class provides an abstraction for top-level windows.
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
void start(Priority=InheritPriority)
Definition qthread.cpp:996
bool wait(QDeadlineTimer deadline=QDeadlineTimer(QDeadlineTimer::Forever))
Definition qthread.cpp:1023
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary=false)
Should be called by the implementation whenever a new screen is added.
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
Q_CORE_EXPORT char * qstrdup(const char *)
GLenum type
GLuint64EXT * result
[6]
GLenum cap
aWidget window() -> setWindowTitle("New Window Title")
[2]
QJSValueList args