45 #include "private/qobject_p.h" 46 #include "private/qapplication_p.h" 51 #include <private/qwindowsurface_qws_p.h> 52 #include <private/qwsdisplay_qws_p.h> 57 #ifndef QT_NO_DIRECTPAINTER 173 if (!screen->
base()) {
175 if (subScreens.
size() < 1)
177 screen = subScreens.
at(0);
236 if (dp != QDirectPainterPrivate::staticPainter) {
243 #ifndef QT_NO_QWSEMBEDWIDGET 247 QScreen *screen = dp->d_func()->surface->screen();
269 d->surface->setReserved();
323 return d->requested_region.boundingRect();
345 const QScreen *screen =
d->surface->screen();
349 d->surface->setRegion(r);
351 d->surface->setRegion(region);
373 return d->requested_region;
394 const QScreen *screen =
d->surface->screen();
397 return screen->
mapToDevice(
d->surface->region(), screenSize);
399 return d->surface->region();
414 return d->surface->windowId();
467 d->surface->setLocking(lockDisplay);
469 const QScreen *screen =
d->surface->screen();
473 d->surface->beginPaint(r);
475 d->surface->beginPaint(
d->surface->region());
493 const QScreen *screen =
d->surface->screen();
497 d->surface->endPaint(r);
499 d->surface->endPaint(
d->surface->region());
532 const QScreen *screen =
d->surface->screen();
536 d->surface->flush(0, r,
QPoint());
538 d->surface->flush(0, region,
QPoint());
600 if (!QDirectPainterPrivate::staticPainter)
629 return screen->
base();
648 return QDirectPainterPrivate::staticPainter
662 return screen->
depth();
728 #endif //QT_NO_DIRECTPAINTER QWSDirectPainterSurface * surface
~QDirectPainter()
Destroys this QDirectPainter object, releasing the reserved region.
QRegion requestedRegion() const
Returns the region requested by this QDirectPainter.
static int linestep()
Returns the length (in bytes) of each scanline of the framebuffer.
int height() const
Returns the logical height of the framebuffer in pixels.
QRegion allocatedRegion() const
Returns the currently reserved region.
#define QT_END_NAMESPACE
This macro expands to.
void setAltitude(int winId, int altitude, bool fixed=false)
WId winId() const
Returns the window system identifier of the widget.
static QWSDisplay * qwsDisplay()
void raise()
Raises the reserved region to the top of the widget stack.
void qt_directpainter_region(QDirectPainter *dp, const QRegion &alloc, int type)
static int screenWidth()
Returns the width of the display in pixels.
int deviceWidth() const
Returns the physical width of the framebuffer device in pixels.
virtual QSize mapFromDevice(const QSize &) const
Maps the given size from the framebuffer coordinate system to the coordinate space used by the applic...
static int screenHeight()
Returns the height of the display in pixels.
The QDirectPainter class provides direct access to the underlying hardware in Qt for Embedded Linux...
The QObject class is the base class of all Qt objects.
static QScreen * getPrimaryScreen()
virtual QSize mapToDevice(const QSize &) const
Maps the given size from the coordinate space used by the application to the framebuffer coordinate s...
int width() const
Returns the logical width of the framebuffer in pixels.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static int screenDepth()
Returns the bit depth of the display.
int linestep() const
Returns the length of each scanline of the framebuffer in bytes.
void startPainting(bool lockDisplay=true)
Call this function before you start updating the pixels in the allocated region.
static QRegion reservedRegion()
Returns the reserved region.
const T & at(int i) const
Returns the item at index position i in the list.
void setGeometry(const QRect &)
Request to reserve the given rectangle of the framebuffer.
QDirectPainter(QObject *parentObject=0, SurfaceFlag flag=NonReserved)
Constructs a QDirectPainter object with the given parent and surface flag.
static QScreen * instance()
Returns a pointer to the application's QScreen instance.
The QRegion class specifies a clip region for a painter.
void endPainting()
Call this function when you are done updating the screen.
virtual void regionChanged(const QRegion &exposedRegion)
This function is called when the allocated region changes.
void qt_directpainter_embedevent(QDirectPainter *dp, const QWSEmbedEvent *event)
static void unlock()
Unlocks the lock on the framebuffer (set using the lock() function), allowing other applications to a...
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
Q_DECLARE_PUBLIC(QDirectPainter)
int deviceHeight() const
Returns the full height of the framebuffer device in pixels.
void setClipRegion(const QRegion &)
Sets the region currently visible on the screen to be the given clip region.
bool flushingRegionEvents
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
void lower()
Lowers the reserved region to the bottom of the widget stack.
virtual QList< QScreen * > subScreens() const
virtual bool isTransformed() const
Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false...
The QPoint class defines a point in the plane using integer precision.
int size() const
Returns the number of items in the list.
static QRegion reserveRegion(const QRegion &)
Attempts to reserve the region and returns the region that is actually reserved.
The QRect class defines a rectangle in the plane using integer precision.
static QRegion region()
Use QDirectPainter::allocatedRegion() instead.
SurfaceFlag
This enum describes the behavior of the region reserved by this QDirectPainter object.
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
void setRegion(const QRegion &)
Requests to reserve the given region of the framebuffer.
QMap< WId, QDirectPainter * > * directPainters
The QSize class defines the size of a two-dimensional object using integer point precision.
QRect geometry() const
Returns the bounding rectangle of the requested region.
static uchar * frameBuffer()
Returns a pointer to the beginning of the display memory.
static QDirectPainter * staticPainter
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
static void lock()
Locks access to the framebuffer.
void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
void flush(const QRegion ®ion)
Flushes the region onto the screen.
The QMap class is a template class that provides a skip-list-based dictionary.
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
The QList class is a template class that provides lists.