9#include <qpa/qwindowsysteminterface.h>
24 DFBDisplayLayerConfig layerConfig;
25 IDirectFBDisplayLayer *
layer;
30 DFBWindowDescription description;
31 memset(&description,0,
sizeof(DFBWindowDescription));
39 DirectFBError(
"QDirectFbWindow: failed to create window",
result);
42 description.flags = DFBWindowDescriptionFlags(DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_POSX|DWDESC_POSY|DWDESC_SURFACE_CAPS
47 description.posx =
window()->
x();
48 description.posy =
window()->
y();
50 if (layerConfig.surface_caps & DSCAPS_PREMULTIPLIED)
51 description.surface_caps = DSCAPS_PREMULTIPLIED;
52 description.pixelformat = layerConfig.pixelformat;
54 description.options = DFBWindowOptions(DWOP_ALPHACHANNEL);
55 description.caps = DFBWindowCapabilities(DWCAPS_DOUBLEBUFFER|DWCAPS_ALPHACHANNEL);
60 DirectFBError(
"QDirectFbWindow: failed to create window",
result);
97 DFBDisplayLayerConfig
config;
98 displayLayer->GetConfiguration(displayLayer.
data(), &
config);
102 if (
window()->isTopLevel() && visible)
111 DFBWindowOptions options;
113 options = DFBWindowOptions(options | DWOP_GHOST);
151 return res == DFB_OK;
163 return res == DFB_OK;
static IDirectFB * dfbInterface()
IDirectFBDisplayLayer * dfbLayer() const
void lower() override
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
void raise() override
Reimplement to be able to let Qt raise windows to the top of the desktop.
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
QDirectFbInput * m_inputHandler
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
~QDirectFbWindow() override
QDirectFBPointer< IDirectFBSurface > m_dfbSurface
QDirectFbWindow(QWindow *tlw, QDirectFbInput *inputhandler)
bool setKeyboardGrabEnabled(bool grab) override
QDirectFBPointer< IDirectFBWindow > m_dfbWindow
void setOpacity(qreal level) override
Reimplement to be able to let Qt set the opacity level of a window.
bool setMouseGrabEnabled(bool grab) override
void setWindowFlags(Qt::WindowFlags flags) override
Requests setting the window flags of this surface to flags.
IDirectFBWindow * dfbWindow() const
virtual void createDirectFBWindow()
IDirectFBSurface * dfbSurface()
void setVisible(bool visible) override
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
int x
the x position of the window's geometry
int y
the y position of the window's geometry
void setGeometry(int posx, int posy, int w, int h)
Sets the geometry of the window, excluding its window frame, to a rectangle constructed from posx,...
Combined button and popup list for selecting options.
QDirectFbScreen * toDfbScreen(QWindow *window)
constexpr const T & qMax(const T &a, const T &b)
GLint GLint GLint GLint GLint x
[0]
GLenum GLuint GLint level
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]