summaryrefslogtreecommitdiffstats
path: root/src/widgets/platforms/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/platforms/x11')
-rw-r--r--src/widgets/platforms/x11/qcursor_x11.cpp4
-rw-r--r--src/widgets/platforms/x11/qfontengine_x11.cpp2
-rw-r--r--src/widgets/platforms/x11/qpaintengine_x11.cpp22
-rw-r--r--src/widgets/platforms/x11/qpixmap_x11.cpp114
-rw-r--r--src/widgets/platforms/x11/qpixmap_x11_p.h24
-rw-r--r--src/widgets/platforms/x11/qwidget_x11.cpp4
-rw-r--r--src/widgets/platforms/x11/qx11info_x11.h2
7 files changed, 86 insertions, 86 deletions
diff --git a/src/widgets/platforms/x11/qcursor_x11.cpp b/src/widgets/platforms/x11/qcursor_x11.cpp
index 167e8f8517..1132d3737d 100644
--- a/src/widgets/platforms/x11/qcursor_x11.cpp
+++ b/src/widgets/platforms/x11/qcursor_x11.cpp
@@ -539,8 +539,8 @@ void QCursorData::update()
fg.green = 0;
fg.blue = 0;
QImage image = QApplicationPrivate::instance()->getPixmapCursor(cshape).toImage();
- pm = QX11PixmapData::createBitmapFromImage(image);
- pmm = QX11PixmapData::createBitmapFromImage(image.createAlphaMask().convertToFormat(QImage::Format_MonoLSB));
+ pm = QX11PlatformPixmap::createBitmapFromImage(image);
+ pmm = QX11PlatformPixmap::createBitmapFromImage(image.createAlphaMask().convertToFormat(QImage::Format_MonoLSB));
hcurs = XCreatePixmapCursor(dpy, pm, pmm, &fg, &bg, 8, 8);
}
diff --git a/src/widgets/platforms/x11/qfontengine_x11.cpp b/src/widgets/platforms/x11/qfontengine_x11.cpp
index c23fb0c174..be421976fa 100644
--- a/src/widgets/platforms/x11/qfontengine_x11.cpp
+++ b/src/widgets/platforms/x11/qfontengine_x11.cpp
@@ -641,7 +641,7 @@ QBitmap QFontEngineXLFD::bitmapForGlyphs(const QGlyphLayout &glyphs, const glyph
if (w <= 0 || h <= 0)
return QBitmap();
- QPixmapData *data = new QX11PixmapData(QPixmapData::BitmapType);
+ QPlatformPixmap *data = new QX11PlatformPixmap(QPlatformPixmap::BitmapType);
data->resize(w, h);
QPixmap bm(data);
QPainter p(&bm);
diff --git a/src/widgets/platforms/x11/qpaintengine_x11.cpp b/src/widgets/platforms/x11/qpaintengine_x11.cpp
index 6b480815cf..3cb3e3caf7 100644
--- a/src/widgets/platforms/x11/qpaintengine_x11.cpp
+++ b/src/widgets/platforms/x11/qpaintengine_x11.cpp
@@ -487,7 +487,7 @@ bool QX11PaintEngine::begin(QPaintDevice *pdev)
d->picture = (::Picture)w->x11PictureHandle();
} else if (pdev->devType() == QInternal::Pixmap) {
const QPixmap *pm = static_cast<const QPixmap *>(pdev);
- QX11PixmapData *data = static_cast<QX11PixmapData*>(pm->data.data());
+ QX11PlatformPixmap *data = static_cast<QX11PlatformPixmap*>(pm->data.data());
if (X11->use_xrender && data->depth() != 32 && data->x11_mask)
data->convertToARGB32();
d->picture = (::Picture)static_cast<const QPixmap *>(pdev)->x11PictureHandle();
@@ -1370,7 +1370,7 @@ void QX11PaintEngine::updateBrush(const QBrush &brush, const QPointF &origin)
XRenderPictureAttributes attrs;
attrs.repeat = true;
XRenderChangePicture(d->dpy, d->brush_pm.x11PictureHandle(), CPRepeat, &attrs);
- QX11PixmapData *data = static_cast<QX11PixmapData*>(d->brush_pm.data.data());
+ QX11PlatformPixmap *data = static_cast<QX11PlatformPixmap*>(d->brush_pm.data.data());
if (data->mask_picture)
XRenderChangePicture(d->dpy, data->mask_picture, CPRepeat, &attrs);
}
@@ -1408,13 +1408,13 @@ void QX11PaintEngine::updateBrush(const QBrush &brush, const QPointF &origin)
#ifndef QT_NO_XRENDER
if (d->pdev_depth == 32 && d->brush_pm.depth() != 32) {
d->brush_pm.detach();
- QX11PixmapData *brushData = static_cast<QX11PixmapData*>(d->brush_pm.data.data());
+ QX11PlatformPixmap *brushData = static_cast<QX11PlatformPixmap*>(d->brush_pm.data.data());
brushData->convertToARGB32();
}
#endif
vals.tile = (d->brush_pm.depth() == d->pdev_depth
? d->brush_pm.handle()
- : static_cast<QX11PixmapData*>(d->brush_pm.data.data())->x11ConvertToDefaultDepth());
+ : static_cast<QX11PlatformPixmap*>(d->brush_pm.data.data())->x11ConvertToDefaultDepth());
s = FillTiled;
#if !defined(QT_NO_XRENDER)
d->current_brush = d->cbrush.texture().x11PictureHandle();
@@ -1925,7 +1925,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
QPixmap::x11SetDefaultScreen(pixmap.x11Info().screen());
#ifndef QT_NO_XRENDER
- ::Picture src_pict = static_cast<QX11PixmapData*>(pixmap.data.data())->picture;
+ ::Picture src_pict = static_cast<QX11PlatformPixmap*>(pixmap.data.data())->picture;
if (src_pict && d->picture) {
const int pDepth = pixmap.depth();
if (pDepth == 1 && (d->has_alpha_pen)) {
@@ -1944,7 +1944,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
bool mono_dst = d->pdev_depth == 1;
bool restore_clip = false;
- if (static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask) { // pixmap has a mask
+ if (static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask) { // pixmap has a mask
QBitmap comb(sw, sh);
GC cgc = XCreateGC(d->dpy, comb.handle(), 0, 0);
XSetForeground(d->dpy, cgc, 0);
@@ -1961,7 +1961,7 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
XSetFillStyle(d->dpy, cgc, FillOpaqueStippled);
XSetTSOrigin(d->dpy, cgc, -sx, -sy);
XSetStipple(d->dpy, cgc,
- static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask);
+ static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask);
XFillRectangle(d->dpy, comb.handle(), cgc, 0, 0, sw, sh);
XFreeGC(d->dpy, cgc);
@@ -2007,8 +2007,8 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
if (d->pdev->devType() == QInternal::Pixmap) {
const QPixmap *px = static_cast<const QPixmap*>(d->pdev);
- Pixmap src_mask = static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask;
- Pixmap dst_mask = static_cast<QX11PixmapData*>(px->data.data())->x11_mask;
+ Pixmap src_mask = static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask;
+ Pixmap dst_mask = static_cast<QX11PlatformPixmap*>(px->data.data())->x11_mask;
if (dst_mask) {
GC cgc = XCreateGC(d->dpy, dst_mask, 0, 0);
if (src_mask) { // copy src mask into dst mask
@@ -2222,7 +2222,7 @@ void QX11PaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, co
#endif
} else
#endif // !QT_NO_XRENDER
- if (pixmap.depth() > 1 && !static_cast<QX11PixmapData*>(pixmap.data.data())->x11_mask) {
+ if (pixmap.depth() > 1 && !static_cast<QX11PlatformPixmap*>(pixmap.data.data())->x11_mask) {
XSetTile(d->dpy, d->gc, pixmap.handle());
XSetFillStyle(d->dpy, d->gc, FillTiled);
XSetTSOrigin(d->dpy, d->gc, x-sx, y-sy);
@@ -2358,7 +2358,7 @@ void QX11PaintEngine::drawFreetype(const QPointF &p, const QTextItemInt &ti)
const bool xrenderPath = (X11->use_xrender
&& !(d->pdev->devType() == QInternal::Pixmap
- && static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPixmapData::BitmapType));
+ && static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPlatformPixmap::BitmapType));
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
diff --git a/src/widgets/platforms/x11/qpixmap_x11.cpp b/src/widgets/platforms/x11/qpixmap_x11.cpp
index 89f5b0926f..500d1e3ddf 100644
--- a/src/widgets/platforms/x11/qpixmap_x11.cpp
+++ b/src/widgets/platforms/x11/qpixmap_x11.cpp
@@ -80,10 +80,10 @@ QT_BEGIN_NAMESPACE
QPixmap qt_toX11Pixmap(const QImage &image)
{
- QPixmapData *data =
- new QX11PixmapData(image.depth() == 1
- ? QPixmapData::BitmapType
- : QPixmapData::PixmapType);
+ QPlatformPixmap *data =
+ new QX11PlatformPixmap(image.depth() == 1
+ ? QPlatformPixmap::BitmapType
+ : QPlatformPixmap::PixmapType);
data->fromImage(image, Qt::AutoColor);
@@ -95,7 +95,7 @@ QPixmap qt_toX11Pixmap(const QPixmap &pixmap)
if (pixmap.isNull())
return QPixmap();
- if (QPixmap(pixmap).data_ptr()->classId() == QPixmapData::X11Class)
+ if (QPixmap(pixmap).data_ptr()->classId() == QPlatformPixmap::X11Class)
return pixmap;
return qt_toX11Pixmap(pixmap.toImage());
@@ -113,7 +113,7 @@ inline static void qSafeXDestroyImage(XImage *x)
XDestroyImage(x);
}
-QBitmap QX11PixmapData::mask_to_bitmap(int screen) const
+QBitmap QX11PlatformPixmap::mask_to_bitmap(int screen) const
{
if (!x11_mask)
return QBitmap();
@@ -126,7 +126,7 @@ QBitmap QX11PixmapData::mask_to_bitmap(int screen) const
return bm;
}
-Qt::HANDLE QX11PixmapData::bitmap_to_mask(const QBitmap &bitmap, int screen)
+Qt::HANDLE QX11PlatformPixmap::bitmap_to_mask(const QBitmap &bitmap, int screen)
{
if (bitmap.isNull())
return 0;
@@ -313,19 +313,19 @@ static int defaultScreen = -1;
QBasicAtomicInt qt_pixmap_serial = Q_BASIC_ATOMIC_INITIALIZER(0);
int Q_WIDGETS_EXPORT qt_x11_preferred_pixmap_depth = 0;
-QX11PixmapData::QX11PixmapData(PixelType type)
- : QPixmapData(type, X11Class), gl_surface(0), hd(0),
+QX11PlatformPixmap::QX11PlatformPixmap(PixelType type)
+ : QPlatformPixmap(type, X11Class), gl_surface(0), hd(0),
flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0),
share_mode(QPixmap::ImplicitlyShared), pengine(0)
{
}
-QPixmapData *QX11PixmapData::createCompatiblePixmapData() const
+QPlatformPixmap *QX11PlatformPixmap::createCompatiblePlatformPixmap() const
{
- return new QX11PixmapData(pixelType());
+ return new QX11PlatformPixmap(pixelType());
}
-void QX11PixmapData::resize(int width, int height)
+void QX11PlatformPixmap::resize(int width, int height)
{
setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
@@ -407,7 +407,7 @@ struct QX11AlphaDetector
mutable bool has;
};
-void QX11PixmapData::fromImage(const QImage &img,
+void QX11PlatformPixmap::fromImage(const QImage &img,
Qt::ImageConversionFlags flags)
{
setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
@@ -1142,7 +1142,7 @@ void QX11PixmapData::fromImage(const QImage &img,
}
}
-Qt::HANDLE QX11PixmapData::createBitmapFromImage(const QImage &image)
+Qt::HANDLE QX11PlatformPixmap::createBitmapFromImage(const QImage &image)
{
QImage img = image.convertToFormat(QImage::Format_MonoLSB);
const QRgb c0 = QColor(Qt::black).rgb();
@@ -1183,7 +1183,7 @@ Qt::HANDLE QX11PixmapData::createBitmapFromImage(const QImage &image)
return hd;
}
-void QX11PixmapData::bitmapFromImage(const QImage &image)
+void QX11PlatformPixmap::bitmapFromImage(const QImage &image)
{
w = image.width();
h = image.height();
@@ -1197,7 +1197,7 @@ void QX11PixmapData::bitmapFromImage(const QImage &image)
#endif // QT_NO_XRENDER
}
-void QX11PixmapData::fill(const QColor &fillColor)
+void QX11PlatformPixmap::fill(const QColor &fillColor)
{
if (fillColor.alpha() != 255) {
#ifndef QT_NO_XRENDER
@@ -1233,18 +1233,18 @@ void QX11PixmapData::fill(const QColor &fillColor)
XFreeGC(X11->display, gc);
}
-QX11PixmapData::~QX11PixmapData()
+QX11PlatformPixmap::~QX11PlatformPixmap()
{
// Cleanup hooks have to be called before the handles are freed
if (is_cached) {
- QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this);
+ QImagePixmapCleanupHooks::executePlatformPixmapDestructionHooks(this);
is_cached = false;
}
release();
}
-void QX11PixmapData::release()
+void QX11PlatformPixmap::release()
{
delete pengine;
pengine = 0;
@@ -1283,7 +1283,7 @@ void QX11PixmapData::release()
}
}
-QPixmap QX11PixmapData::alphaChannel() const
+QPixmap QX11PlatformPixmap::alphaChannel() const
{
if (!hasAlphaChannel()) {
QPixmap pm(w, h);
@@ -1294,7 +1294,7 @@ QPixmap QX11PixmapData::alphaChannel() const
return QPixmap::fromImage(im.alphaChannel(), Qt::OrderedDither);
}
-void QX11PixmapData::setAlphaChannel(const QPixmap &alpha)
+void QX11PlatformPixmap::setAlphaChannel(const QPixmap &alpha)
{
QImage image(toImage());
image.setAlphaChannel(alpha.toImage());
@@ -1303,7 +1303,7 @@ void QX11PixmapData::setAlphaChannel(const QPixmap &alpha)
}
-QBitmap QX11PixmapData::mask() const
+QBitmap QX11PlatformPixmap::mask() const
{
QBitmap mask;
#ifndef QT_NO_XRENDER
@@ -1313,7 +1313,7 @@ QBitmap QX11PixmapData::mask() const
} else
#endif
if (d == 1) {
- QX11PixmapData *that = const_cast<QX11PixmapData*>(this);
+ QX11PlatformPixmap *that = const_cast<QX11PlatformPixmap*>(this);
mask = QPixmap(that);
} else {
mask = mask_to_bitmap(xinfo.screen());
@@ -1342,12 +1342,12 @@ QBitmap QX11PixmapData::mask() const
\sa mask(), {QPixmap#Pixmap Transformations}{Pixmap
Transformations}, QBitmap
*/
-void QX11PixmapData::setMask(const QBitmap &newmask)
+void QX11PlatformPixmap::setMask(const QBitmap &newmask)
{
if (newmask.isNull()) { // clear mask
#ifndef QT_NO_XRENDER
if (picture && d == 32) {
- QX11PixmapData newData(pixelType());
+ QX11PlatformPixmap newData(pixelType());
newData.resize(w, h);
newData.fill(Qt::black);
XRenderComposite(X11->display, PictOpOver,
@@ -1355,11 +1355,11 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
0, 0, 0, 0, 0, 0, w, h);
release();
*this = newData;
- // the new QX11PixmapData object isn't referenced yet, so
+ // the new QX11PlatformPixmap object isn't referenced yet, so
// ref it
ref.ref();
- // the below is to make sure the QX11PixmapData destructor
+ // the below is to make sure the QX11PlatformPixmap destructor
// doesn't delete our newly created render picture
newData.hd = 0;
newData.x11_mask = 0;
@@ -1409,7 +1409,7 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
XRenderFreePicture(X11->display, mask_picture);
#endif
}
- x11_mask = QX11PixmapData::bitmap_to_mask(newmask, xinfo.screen());
+ x11_mask = QX11PlatformPixmap::bitmap_to_mask(newmask, xinfo.screen());
#ifndef QT_NO_XRENDER
if (picture) {
mask_picture = XRenderCreatePicture(X11->display, x11_mask,
@@ -1422,7 +1422,7 @@ void QX11PixmapData::setMask(const QBitmap &newmask)
}
}
-int QX11PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+int QX11PlatformPixmap::metric(QPaintDevice::PaintDeviceMetric metric) const
{
switch (metric) {
case QPaintDevice::PdmWidth:
@@ -1452,7 +1452,7 @@ int QX11PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
case QPaintDevice::PdmPhysicalDpiY:
return QX11Info::appDpiY(xinfo.screen());
default:
- qWarning("QX11PixmapData::metric(): Invalid metric");
+ qWarning("QX11PlatformPixmap::metric(): Invalid metric");
return 0;
}
}
@@ -1462,7 +1462,7 @@ struct QXImageWrapper
XImage *xi;
};
-bool QX11PixmapData::canTakeQImageFromXImage(const QXImageWrapper &xiWrapper) const
+bool QX11PlatformPixmap::canTakeQImageFromXImage(const QXImageWrapper &xiWrapper) const
{
XImage *xi = xiWrapper.xi;
@@ -1485,7 +1485,7 @@ bool QX11PixmapData::canTakeQImageFromXImage(const QXImageWrapper &xiWrapper) co
return false;
}
-QImage QX11PixmapData::takeQImageFromXImage(const QXImageWrapper &xiWrapper) const
+QImage QX11PlatformPixmap::takeQImageFromXImage(const QXImageWrapper &xiWrapper) const
{
XImage *xi = xiWrapper.xi;
@@ -1538,7 +1538,7 @@ QImage QX11PixmapData::takeQImageFromXImage(const QXImageWrapper &xiWrapper) con
return image;
}
-QImage QX11PixmapData::toImage(const QRect &rect) const
+QImage QX11PlatformPixmap::toImage(const QRect &rect) const
{
QXImageWrapper xiWrapper;
xiWrapper.xi = XGetImage(X11->display, hd, rect.x(), rect.y(), rect.width(), rect.height(),
@@ -1571,12 +1571,12 @@ QImage QX11PixmapData::toImage(const QRect &rect) const
\sa fromImage(), {QImage#Image Formats}{Image Formats}
*/
-QImage QX11PixmapData::toImage() const
+QImage QX11PlatformPixmap::toImage() const
{
return toImage(QRect(0, 0, w, h));
}
-QImage QX11PixmapData::toImage(const QXImageWrapper &xiWrapper, const QRect &rect) const
+QImage QX11PlatformPixmap::toImage(const QXImageWrapper &xiWrapper, const QRect &rect) const
{
XImage *xi = xiWrapper.xi;
@@ -1852,7 +1852,7 @@ QImage QX11PixmapData::toImage(const QXImageWrapper &xiWrapper, const QRect &rec
\sa trueMatrix(), {QPixmap#Pixmap Transformations}{Pixmap
Transformations}
*/
-QPixmap QX11PixmapData::transformed(const QTransform &transform,
+QPixmap QX11PlatformPixmap::transformed(const QTransform &transform,
Qt::TransformationMode mode ) const
{
if (mode == Qt::SmoothTransformation || transform.type() >= QTransform::TxProject) {
@@ -2002,9 +2002,9 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform,
free(dptr);
return bm;
} else { // color pixmap
- QX11PixmapData *x11Data = new QX11PixmapData(QPixmapData::PixmapType);
+ QX11PlatformPixmap *x11Data = new QX11PlatformPixmap(QPlatformPixmap::PixmapType);
QPixmap pm(x11Data);
- x11Data->flags &= ~QX11PixmapData::Uninitialized;
+ x11Data->flags &= ~QX11PlatformPixmap::Uninitialized;
x11Data->xinfo = xinfo;
x11Data->d = d;
x11Data->w = w;
@@ -2067,13 +2067,13 @@ void QPixmap::x11SetScreen(int screen)
if (isNull())
return;
- if (data->classId() != QPixmapData::X11Class)
+ if (data->classId() != QPlatformPixmap::X11Class)
return;
if (screen < 0)
screen = QX11Info::appScreen();
- QX11PixmapData *x11Data = static_cast<QX11PixmapData*>(data.data());
+ QX11PlatformPixmap *x11Data = static_cast<QX11PlatformPixmap*>(data.data());
if (screen == x11Data->xinfo.screen())
return; // nothing to do
@@ -2142,7 +2142,7 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
window_attr = root_attr;
}
- QX11PixmapData *data = new QX11PixmapData(QPixmapData::PixmapType);
+ QX11PlatformPixmap *data = new QX11PlatformPixmap(QPlatformPixmap::PixmapType);
void qt_x11_getX11InfoForWindow(QX11Info * xinfo, const XWindowAttributes &a);
qt_x11_getX11InfoForWindow(&data->xinfo,window_attr);
@@ -2151,7 +2151,7 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
QPixmap pm(data);
- data->flags &= ~QX11PixmapData::Uninitialized;
+ data->flags &= ~QX11PlatformPixmap::Uninitialized;
pm.x11SetScreen(scr);
GC gc = XCreateGC(dpy, pm.handle(), 0, 0);
@@ -2162,15 +2162,15 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
return pm;
}
-bool QX11PixmapData::hasAlphaChannel() const
+bool QX11PlatformPixmap::hasAlphaChannel() const
{
return d == 32;
}
const QX11Info &QPixmap::x11Info() const
{
- if (data && data->classId() == QPixmapData::X11Class)
- return static_cast<QX11PixmapData*>(data.data())->xinfo;
+ if (data && data->classId() == QPlatformPixmap::X11Class)
+ return static_cast<QX11PlatformPixmap*>(data.data())->xinfo;
else {
static QX11Info nullX11Info;
return nullX11Info;
@@ -2189,9 +2189,9 @@ static XRenderPictFormat *qt_renderformat_for_depth(const QX11Info &xinfo, int d
}
#endif
-QPaintEngine* QX11PixmapData::paintEngine() const
+QPaintEngine* QX11PlatformPixmap::paintEngine() const
{
- QX11PixmapData *that = const_cast<QX11PixmapData*>(this);
+ QX11PlatformPixmap *that = const_cast<QX11PlatformPixmap*>(this);
if ((flags & Readonly) && share_mode == QPixmap::ImplicitlyShared) {
// if someone wants to draw onto us, copy the shared contents
@@ -2215,7 +2215,7 @@ QPaintEngine* QX11PixmapData::paintEngine() const
XFreeGC(X11->display, gc);
}
that->hd = hd_copy;
- that->flags &= ~QX11PixmapData::Readonly;
+ that->flags &= ~QX11PlatformPixmap::Readonly;
}
if (!that->pengine)
@@ -2226,8 +2226,8 @@ QPaintEngine* QX11PixmapData::paintEngine() const
Qt::HANDLE QPixmap::x11PictureHandle() const
{
#ifndef QT_NO_XRENDER
- if (data && data->classId() == QPixmapData::X11Class)
- return static_cast<const QX11PixmapData*>(data.data())->picture;
+ if (data && data->classId() == QPlatformPixmap::X11Class)
+ return static_cast<const QX11PlatformPixmap*>(data.data())->picture;
else
return 0;
#else
@@ -2235,7 +2235,7 @@ Qt::HANDLE QPixmap::x11PictureHandle() const
#endif // QT_NO_XRENDER
}
-Qt::HANDLE QX11PixmapData::x11ConvertToDefaultDepth()
+Qt::HANDLE QX11PlatformPixmap::x11ConvertToDefaultDepth()
{
#ifndef QT_NO_XRENDER
if (d == QX11Info::appDepth() || !X11->use_xrender)
@@ -2255,14 +2255,14 @@ Qt::HANDLE QX11PixmapData::x11ConvertToDefaultDepth()
#endif
}
-void QX11PixmapData::copy(const QPixmapData *data, const QRect &rect)
+void QX11PlatformPixmap::copy(const QPlatformPixmap *data, const QRect &rect)
{
if (data->pixelType() == BitmapType) {
fromImage(data->toImage().copy(rect), Qt::AutoColor);
return;
}
- const QX11PixmapData *x11Data = static_cast<const QX11PixmapData*>(data);
+ const QX11PlatformPixmap *x11Data = static_cast<const QX11PlatformPixmap*>(data);
setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
@@ -2317,7 +2317,7 @@ void QX11PixmapData::copy(const QPixmapData *data, const QRect &rect)
}
}
-bool QX11PixmapData::scroll(int dx, int dy, const QRect &rect)
+bool QX11PlatformPixmap::scroll(int dx, int dy, const QRect &rect)
{
GC gc = XCreateGC(X11->display, hd, 0, 0);
XCopyArea(X11->display, hd, hd, gc,
@@ -2328,7 +2328,7 @@ bool QX11PixmapData::scroll(int dx, int dy, const QRect &rect)
}
#if !defined(QT_NO_XRENDER)
-void QX11PixmapData::convertToARGB32(bool preserveContents)
+void QX11PlatformPixmap::convertToARGB32(bool preserveContents)
{
if (!X11->use_xrender)
return;
@@ -2383,9 +2383,9 @@ QPixmap QPixmap::fromX11Pixmap(Qt::HANDLE pixmap, QPixmap::ShareMode mode)
break;
}
- QX11PixmapData *data = new QX11PixmapData(depth == 1 ? QPixmapData::BitmapType : QPixmapData::PixmapType);
+ QX11PlatformPixmap *data = new QX11PlatformPixmap(depth == 1 ? QPlatformPixmap::BitmapType : QPlatformPixmap::PixmapType);
data->setSerialNumber(qt_pixmap_serial.fetchAndAddRelaxed(1));
- data->flags = QX11PixmapData::Readonly;
+ data->flags = QX11PlatformPixmap::Readonly;
data->share_mode = mode;
data->w = width;
data->h = height;
diff --git a/src/widgets/platforms/x11/qpixmap_x11_p.h b/src/widgets/platforms/x11/qpixmap_x11_p.h
index 8c8ccd156c..fce32cbe3e 100644
--- a/src/widgets/platforms/x11/qpixmap_x11_p.h
+++ b/src/widgets/platforms/x11/qpixmap_x11_p.h
@@ -53,8 +53,8 @@
// We mean it.
//
-#include <QtGui/private/qpixmapdata_p.h>
-#include <QtGui/private/qpixmapdatafactory_p.h>
+#include <QtGui/qplatformpixmap_qpa.h>
+#include <QtGui/qplatformpixmapfactory_p.h>
#include "QtGui/qx11info_x11.h"
@@ -64,20 +64,20 @@ class QX11PaintEngine;
struct QXImageWrapper;
-class Q_WIDGETS_EXPORT QX11PixmapData : public QPixmapData
+class Q_WIDGETS_EXPORT QX11PlatformPixmap : public QPlatformPixmap
{
public:
- QX11PixmapData(PixelType type);
-// QX11PixmapData(PixelType type, int width, int height);
-// QX11PixmapData(PixelType type, const QImage &image,
+ QX11PlatformPixmap(PixelType type);
+// QX11PlatformPixmap(PixelType type, int width, int height);
+// QX11PlatformPixmap(PixelType type, const QImage &image,
// Qt::ImageConversionFlags flags);
- ~QX11PixmapData();
+ ~QX11PlatformPixmap();
- QPixmapData *createCompatiblePixmapData() const;
+ QPlatformPixmap *createCompatiblePlatformPixmap() const;
void resize(int width, int height);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
- void copy(const QPixmapData *data, const QRect &rect);
+ void copy(const QPlatformPixmap *data, const QRect &rect);
bool scroll(int dx, int dy, const QRect &rect);
void fill(const QColor &color);
@@ -114,9 +114,9 @@ private:
friend class QGLContextPrivate; // Needs to access xinfo, gl_surface & flags
friend class QEglContext; // Needs gl_surface
friend class QGLContext; // Needs gl_surface
- friend class QX11GLPixmapData; // Needs gl_surface
- friend class QMeeGoLivePixmapData; // Needs gl_surface and flags
- friend bool qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs gl_surface
+ friend class QX11GLPlatformPixmap; // Needs gl_surface
+ friend class QMeeGoLivePlatformPixmap; // Needs gl_surface and flags
+ friend bool qt_createEGLSurfaceForPixmap(QPlatformPixmap*, bool); // Needs gl_surface
void release();
diff --git a/src/widgets/platforms/x11/qwidget_x11.cpp b/src/widgets/platforms/x11/qwidget_x11.cpp
index cd4b7b4e15..5bb59b26c9 100644
--- a/src/widgets/platforms/x11/qwidget_x11.cpp
+++ b/src/widgets/platforms/x11/qwidget_x11.cpp
@@ -1400,7 +1400,7 @@ void QWidgetPrivate::updateSystemBackground()
else if (brush.style() == Qt::TexturePattern) {
extern QPixmap qt_toX11Pixmap(const QPixmap &pixmap); // qpixmap_x11.cpp
XSetWindowBackgroundPixmap(X11->display, q->internalWinId(),
- static_cast<QX11PixmapData*>(qt_toX11Pixmap(brush.texture()).data.data())->x11ConvertToDefaultDepth());
+ static_cast<QX11PlatformPixmap*>(qt_toX11Pixmap(brush.texture()).data.data())->x11ConvertToDefaultDepth());
} else
XSetWindowBackground(X11->display, q->internalWinId(),
QColormap::instance(xinfo.screen()).pixel(brush.color()));
@@ -1546,7 +1546,7 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
// violates the ICCCM), since this works on all DEs known to Qt
if (!forceReset || !topData->iconPixmap)
topData->iconPixmap = new QPixmap(qt_toX11Pixmap(icon.pixmap(QSize(64,64))));
- pixmap_handle = static_cast<QX11PixmapData*>(topData->iconPixmap->data.data())->x11ConvertToDefaultDepth();
+ pixmap_handle = static_cast<QX11PlatformPixmap*>(topData->iconPixmap->data.data())->x11ConvertToDefaultDepth();
}
}
}
diff --git a/src/widgets/platforms/x11/qx11info_x11.h b/src/widgets/platforms/x11/qx11info_x11.h
index ac2c36e175..60cd0e9e92 100644
--- a/src/widgets/platforms/x11/qx11info_x11.h
+++ b/src/widgets/platforms/x11/qx11info_x11.h
@@ -106,7 +106,7 @@ protected:
friend class QX11PaintEngine;
friend class QPixmap;
- friend class QX11PixmapData;
+ friend class QX11PlatformPixmap;
friend class QWidget;
friend class QWidgetPrivate;
friend class QGLWidget;