summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qwindowsurface_raster.cpp
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2009-07-01 09:49:54 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-07-01 09:51:14 (GMT)
commit55137901012db28857fe7638e63c78743e277c56 (patch)
tree2361eb3eea67287bb22b9e3fb0690733ab76625f /src/gui/painting/qwindowsurface_raster.cpp
parentcfadf08a6c06ce319f6144e724f45e4923e72778 (diff)
downloadQt-55137901012db28857fe7638e63c78743e277c56.zip
Qt-55137901012db28857fe7638e63c78743e277c56.tar.gz
Qt-55137901012db28857fe7638e63c78743e277c56.tar.bz2
src/gui: Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support
Also - Make winPeekMessage() & winPostMessage() obsolete - FlashWindowEx, IsValidLanguageGroup functions no longer resolved dynamically (available on >= Windows 2000) - LoadIcon/LoadCursor -> LoadImage w/LR_SHARED for system icons/cursors - qsystemtrayicon_win: use Shell_NotifyIconGetRect if available (Windows 7) Merge-request: 604 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/gui/painting/qwindowsurface_raster.cpp')
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index c163d79..22433dd 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -43,6 +43,7 @@
#include <qglobal.h> // for Q_WS_WIN define (non-PCH)
#ifdef Q_WS_WIN
+#include <qlibrary.h>
#include <qt_windows.h>
#endif
@@ -67,10 +68,6 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_WS_WIN
-PtrUpdateLayeredWindowIndirect ptrUpdateLayeredWindowIndirect;
-#endif
-
class QRasterWindowSurfacePrivate
{
public:
@@ -82,9 +79,6 @@ public:
uint translucentBackground : 1;
#endif
#endif
-#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
- uint canUseLayeredWindow : 1;
-#endif
uint inSetGeometry : 1;
};
@@ -98,10 +92,6 @@ QRasterWindowSurface::QRasterWindowSurface(QWidget *window)
&& window->x11Info().depth() == 32;
#endif
#endif
-#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
- d_ptr->canUseLayeredWindow = ptrUpdateLayeredWindowIndirect
- && (qt_widget_private(window)->data.window_flags & Qt::FramelessWindowHint);
-#endif
d_ptr->image = 0;
d_ptr->inSetGeometry = false;
setStaticContentsSupport(true);
@@ -130,8 +120,7 @@ void QRasterWindowSurface::beginPaint(const QRegion &rgn)
#if (defined(Q_WS_X11) && !defined(QT_NO_XRENDER)) || (defined(Q_WS_WIN) && !defined(Q_WS_WINCE))
if (!qt_widget_private(window())->isOpaque) {
#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
- if (d_ptr->image->image.format() != QImage::Format_ARGB32_Premultiplied
- && d_ptr->canUseLayeredWindow)
+ if (d_ptr->image->image.format() != QImage::Format_ARGB32_Premultiplied)
prepareBuffer(QImage::Format_ARGB32_Premultiplied, window());
#endif
QPainter p(&d_ptr->image->image);
@@ -160,7 +149,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
QRect br = rgn.boundingRect();
#ifndef Q_WS_WINCE
- if (!qt_widget_private(window())->isOpaque && d->canUseLayeredWindow) {
+ if (!qt_widget_private(window())->isOpaque) {
QRect r = window()->frameGeometry();
QPoint frameOffset = qt_widget_private(window())->frameStrut().topLeft();
QRect dirtyRect = br.translated(offset + frameOffset);
@@ -168,12 +157,11 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
SIZE size = {r.width(), r.height()};
POINT ptDst = {r.x(), r.y()};
POINT ptSrc = {0, 0};
- Q_BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * window()->windowOpacity()), Q_AC_SRC_ALPHA};
+ BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * window()->windowOpacity()), Q_AC_SRC_ALPHA};
RECT dirty = {dirtyRect.x(), dirtyRect.y(),
dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};
Q_UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, d->image->hdc, &ptSrc, 0, &blend, Q_ULW_ALPHA, &dirty};
-
- (*ptrUpdateLayeredWindowIndirect)(window()->internalWinId(), &info);
+ ptrUpdateLayeredWindowIndirect(window()->internalWinId(), &info);
} else
#endif
{
@@ -308,7 +296,7 @@ void QRasterWindowSurface::setGeometry(const QRect &rect)
#ifndef Q_WS_WIN
if (d_ptr->translucentBackground)
#else
- if (!qt_widget_private(window())->isOpaque && d->canUseLayeredWindow)
+ if (!qt_widget_private(window())->isOpaque)
#endif
prepareBuffer(QImage::Format_ARGB32_Premultiplied, window());
else