4#ifndef QOFFSCREENCOMMON_H
5#define QOFFSCREENCOMMON_H
7#include <qpa/qplatformbackingstore.h>
8#if QT_CONFIG(draganddrop)
9#include <qpa/qplatformdrag.h>
11#include <qpa/qplatformintegration.h>
12#include <qpa/qplatformnativeinterface.h>
13#include <qpa/qplatformscreen.h>
14#include <qpa/qplatformwindow.h>
16#include <qscopedpointer.h>
18#include <qjsonobject.h>
39 QPixmap grabWindow(WId window,
int x,
int y,
int width,
int height)
const override;
53#if QT_CONFIG(draganddrop)
54class QOffscreenDrag :
public QPlatformDrag
57 Qt::DropAction drag(QDrag *) override {
return Qt::IgnoreAction; }
68 void flush(QWindow *window,
const QRegion ®ion,
const QPoint &offset)
override;
69 void resize(
const QSize &size,
const QRegion &staticContents)
override;
70 bool scroll(
const QRegion &area,
int dx,
int dy)
override;
82 QHash<WId, QRect> m_windowAreaHash;
84 static QHash<WId, QOffscreenBackingStore *> m_backingStoreForWinIdHash;
bool scroll(const QRegion &area, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
void beginPaint(const QRegion &) override
This function is called before painting onto the surface begins, with the region in which the paintin...
static QOffscreenBackingStore * backingStoreForWinId(WId id)
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override
Flushes the given region from the specified window.
~QOffscreenBackingStore()
void resize(const QSize &size, const QRegion &staticContents) override
QOffscreenBackingStore(QWindow *window)
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
QPixmap grabWindow(WId window, const QRect &rect) const
void setPos(const QPoint &pos) override
QPoint pos() const override
void changeCursor(QCursor *windowCursor, QWindow *window) override
This method is called by Qt whenever the cursor graphic should be changed.
static QPlatformWindow * windowContainingCursor
QOffscreenScreen(const QOffscreenIntegration *integration)
QScopedPointer< QPlatformCursor > m_cursor
int depth() const override
Reimplement in subclass to return current depth of the screen.
QPixmap grabWindow(WId window, int x, int y, int width, int height) const override
This function is called when Qt needs to be able to grab the content of a window.
const QOffscreenIntegration * m_integration
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)