55 DFBDisplayLayerConfig layerConfig;
56 IDirectFBDisplayLayer *layer;
61 DFBWindowDescription description;
62 memset(&description,0,
sizeof(DFBWindowDescription));
63 description.flags = DFBWindowDescriptionFlags(DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_POSX|DWDESC_POSY|DWDESC_SURFACE_CAPS
64 #
if DIRECTFB_MINOR_VERSION >= 1
68 description.width = tlw->
width();
69 description.height = tlw->
height();
70 description.posx = tlw->
x();
71 description.posy = tlw->
y();
73 if (layerConfig.surface_caps & DSCAPS_PREMULTIPLIED)
74 description.surface_caps = DSCAPS_PREMULTIPLIED;
75 description.pixelformat = layerConfig.pixelformat;
77 #if DIRECTFB_MINOR_VERSION >= 1 78 description.options = DFBWindowOptions(DWOP_ALPHACHANNEL);
80 description.caps = DFBWindowCapabilities(DWCAPS_DOUBLEBUFFER|DWCAPS_ALPHACHANNEL);
81 description.surface_caps = DSCAPS_PREMULTIPLIED;
83 DFBResult result = layer->CreateWindow(layer, &description,
m_dfbWindow.
outPtr());
84 if (result != DFB_OK) {
85 DirectFBError(
"QDirectFbGraphicsSystemScreen: failed to create window",result);
133 DFBDisplayLayerConfig config;
134 displayLayer->GetConfiguration(displayLayer.
data(), &config);
143 DFBWindowOptions options;
145 options = DFBWindowOptions(options | DWOP_GHOST);
182 return res == DFB_OK;
194 return res == DFB_OK;
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags)
Requests setting the window flags of this surface to type.
void setOpacity(qreal level)
Reimplement to be able to let Qt set the opacity level of a window.
#define QT_END_NAMESPACE
This macro expands to.
T * data() const
Returns the value of the pointer referenced by this object.
void setGeometry(const QRect &rect)
This function is called by Qt whenever a window is moved or the window is resized.
int width() const
Returns the width of the rectangle.
int height() const
Returns the height of the rectangle.
QDirectFbScreen * toDfbScreen(QWidget *window)
QDirectFbWindow(QWidget *tlw, QDirectFbInput *inputhandler)
IDirectFBSurface * dfbSurface()
QDirectFBPointer< IDirectFBWindow > m_dfbWindow
#define QT_BEGIN_NAMESPACE
This macro expands to.
IDirectFBWindow * dfbWindow() const
QSize size() const
Returns the size of the rectangle.
QDirectFBPointer< IDirectFBSurface > m_dfbSurface
IDirectFBDisplayLayer * dfbLayer() const
bool setMouseGrabEnabled(bool grab)
int y() const
Returns the y-coordinate of the rectangle's top edge.
int x() const
Returns the x-coordinate of the rectangle's left edge.
void raise()
Reimplement to be able to let Qt rais windows to the top of the desktop.
void lower()
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
The QRect class defines a rectangle in the plane using integer precision.
QDirectFbInput * m_inputHandler
static IDirectFB * dfbInterface()
bool setKeyboardGrabEnabled(bool grab)
WId winId() const
Reimplement in subclasses to return a handle to the native window.
void setVisible(bool visible)
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false...
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.