42 #ifndef QDIRECTFBSCREEN_H 43 #define QDIRECTFBSCREEN_H 46 #ifndef QT_NO_QWS_DIRECTFB 47 #include <QtGui/qscreen_qws.h> 49 #include <directfb_version.h> 57 #if !defined QT_DIRECTFB_SUBSURFACE && !defined QT_NO_DIRECTFB_SUBSURFACE 58 #define QT_NO_DIRECTFB_SUBSURFACE 60 #if !defined QT_NO_DIRECTFB_LAYER && !defined QT_DIRECTFB_LAYER 61 #define QT_DIRECTFB_LAYER 63 #if !defined QT_NO_DIRECTFB_WM && !defined QT_DIRECTFB_WM 64 #define QT_DIRECTFB_WM 66 #if !defined QT_DIRECTFB_IMAGECACHE && !defined QT_NO_DIRECTFB_IMAGECACHE 67 #define QT_NO_DIRECTFB_IMAGECACHE 69 #if !defined QT_NO_DIRECTFB_IMAGEPROVIDER && !defined QT_DIRECTFB_IMAGEPROVIDER 70 #define QT_DIRECTFB_IMAGEPROVIDER 72 #if !defined QT_NO_DIRECTFB_STRETCHBLIT && !defined QT_DIRECTFB_STRETCHBLIT 73 #define QT_DIRECTFB_STRETCHBLIT 75 #if !defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE && !defined QT_NO_DIRECTFB_IMAGEPROVIDER_KEEPALIVE 76 #define QT_NO_DIRECTFB_IMAGEPROVIDER_KEEPALIVE 78 #if !defined QT_DIRECTFB_WINDOW_AS_CURSOR && !defined QT_NO_DIRECTFB_WINDOW_AS_CURSOR 79 #define QT_NO_DIRECTFB_WINDOW_AS_CURSOR 81 #if !defined QT_DIRECTFB_PALETTE && !defined QT_NO_DIRECTFB_PALETTE 82 #define QT_NO_DIRECTFB_PALETTE 84 #if !defined QT_NO_DIRECTFB_PREALLOCATED && !defined QT_DIRECTFB_PREALLOCATED 85 #define QT_DIRECTFB_PREALLOCATED 87 #if !defined QT_NO_DIRECTFB_MOUSE && !defined QT_DIRECTFB_MOUSE 88 #define QT_DIRECTFB_MOUSE 90 #if !defined QT_NO_DIRECTFB_KEYBOARD && !defined QT_DIRECTFB_KEYBOARD 91 #define QT_DIRECTFB_KEYBOARD 93 #if !defined QT_NO_DIRECTFB_OPAQUE_DETECTION && !defined QT_DIRECTFB_OPAQUE_DETECTION 94 #define QT_DIRECTFB_OPAQUE_DETECTION 96 #ifndef QT_NO_QWS_CURSOR 97 #if defined QT_DIRECTFB_WM && defined QT_DIRECTFB_WINDOW_AS_CURSOR 98 #define QT_DIRECTFB_CURSOR 99 #elif defined QT_DIRECTFB_LAYER 100 #define QT_DIRECTFB_CURSOR 103 #ifndef QT_DIRECTFB_CURSOR 104 #define QT_NO_DIRECTFB_CURSOR 106 #if defined QT_NO_DIRECTFB_LAYER && defined QT_DIRECTFB_WM 107 #error QT_NO_DIRECTFB_LAYER requires QT_NO_DIRECTFB_WM 109 #if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE && defined QT_NO_DIRECTFB_IMAGEPROVIDER 110 #error QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE requires QT_DIRECTFB_IMAGEPROVIDER to be defined 112 #if defined QT_DIRECTFB_WINDOW_AS_CURSOR && defined QT_NO_DIRECTFB_WM 113 #error QT_DIRECTFB_WINDOW_AS_CURSOR requires QT_DIRECTFB_WM to be defined 116 #define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERSION << 8) | DIRECTFB_MICRO_VERSION) 118 #define DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(F) \ 119 static inline F operator~(F f) { return F(~int(f)); } \ 120 static inline F operator&(F left, F right) { return F(int(left) & int(right)); } \ 121 static inline F operator|(F left, F right) { return F(int(left) | int(right)); } \ 122 static inline F &operator|=(F &left, F right) { left = (left | right); return left; } \ 123 static inline F &operator&=(F &left, F right) { left = (left & right); return left; } 147 BoundingRectFlip = 0x04,
153 DirectFBFlags directFBFlags()
const;
164 void setMode(
int width,
int height,
int depth);
173 #ifdef QT_DIRECTFB_SUBSURFACE 177 #ifdef QT_DIRECTFB_WM 178 IDirectFBWindow *windowForWidget(
const QWidget *widget)
const;
180 IDirectFBSurface *primarySurface();
182 #ifndef QT_NO_DIRECTFB_LAYER 183 IDirectFBDisplayLayer *dfbDisplayLayer();
188 DontTrackSurface = 0x1,
193 IDirectFBSurface *createDFBSurface(
const QImage &image,
195 SurfaceCreationOptions options,
196 DFBResult *result = 0);
197 IDirectFBSurface *createDFBSurface(
const QSize &size,
199 SurfaceCreationOptions options,
200 DFBResult *result = 0);
201 IDirectFBSurface *copyDFBSurface(IDirectFBSurface *src,
203 SurfaceCreationOptions options,
204 DFBResult *result = 0);
205 IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc,
206 SurfaceCreationOptions options,
208 #ifdef QT_DIRECTFB_SUBSURFACE 209 IDirectFBSurface *getSubSurface(IDirectFBSurface *surface,
211 SurfaceCreationOptions options,
215 void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags,
217 void releaseDFBSurface(IDirectFBSurface *surface);
224 static DFBSurfaceDescription getSurfaceDescription(
const uint *buffer,
227 static bool initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *description,
QImage::Format format);
229 static inline bool hasAlphaChannel(DFBSurfacePixelFormat
format);
230 static inline bool hasAlphaChannel(IDirectFBSurface *surface);
233 #ifndef QT_NO_DIRECTFB_PALETTE 234 static void setSurfaceColorTable(IDirectFBSurface *surface,
238 static uchar *lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags,
int *bpl = 0);
239 #if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE 240 void setDirectFBImageProvider(IDirectFBImageProvider *provider);
274 #if (Q_DIRECTFB_VERSION >= 0x000923) 277 #if (Q_DIRECTFB_VERSION >= 0x010000) 292 DFBSurfacePixelFormat
format;
293 surface->GetPixelFormat(surface, &format);
301 #endif // QT_NO_QWS_DIRECTFB 302 #endif // QDIRECTFBSCREEN_H The QColor class provides colors based on RGB, HSV or CMYK values.
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
Format
The following image formats are available in Qt.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
static bool hasAlphaChannel(DFBSurfacePixelFormat format)
#define DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(F)
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
static bool isPremultiplied(QImage::Format format)
virtual bool connect(const QString &displaySpec)=0
This function is called by every Qt for Embedded Linux application on startup, and must be implemente...
virtual void setMode(int, int, int)=0
Implement this function to reset the framebuffer's resolution (width and height) and bit depth...
The QString class provides a Unicode character string.
virtual void disconnect()=0
This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual bool initDevice()=0
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
QDirectFBScreenPrivate * d_ptr
The QImage class provides a hardware-independent image representation that allows direct access to th...
static QScreen * instance()
Returns a pointer to the application's QScreen instance.
The QRegion class specifies a clip region for a painter.
virtual QWSWindowSurface * createSurface(QWidget *widget) const
Creates and returns a new window surface for the given widget.
virtual void blank(bool on)
Prevents the screen driver form displaying any content on the screen.
Q_DECLARE_OPERATORS_FOR_FLAGS(QDirectFBScreen::SurfaceCreationOptions)
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
virtual void shutdownDevice()
This function is called by the Qt for Embedded Linux server before it calls the disconnect() function...
The QSize class defines the size of a two-dimensional object using integer point precision.
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
virtual void solidFill(const QColor &color, const QRegion ®ion)
Fills the given region of the screen with the specified color.
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
static int area(const QSize &s)