Changeset 1034
- Timestamp:
- Aug 29, 2011, 1:43:52 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.OS2
r990 r1034 613 613 CURRENT LIMITATIONS 614 614 615 1. configure.cmd is does not build demos and examples by default (to save 616 time). They may be built by hand, as described above. 617 618 2. configure.cmd does not understand all command line options understood by 615 1. configure.cmd does not understand all command line options understood by 619 616 configure scripts on other platforms. If you want to customize your build 620 617 of the Qt library (which is normally not recommended and not supported), 621 618 you may try to modify configure.cmd itself. 622 619 623 3. OS/2 bitmap fonts are not supported. Use TTF or Type1 (PFB) fonts with Qt. 620 2. OS/2 bitmap fonts are not supported. Use TTF or Type1 (PFB) fonts with Qt. 621 622 3. No support for widget masks and trapsparency in top-level widgets and in 623 child widgets with native window IDs (Presentation Manager limitation). 624 624 625 625 4. No native PM style, but Qt will use fonts and colors from the current -
trunk/src/gui/kernel/qapplication_pm.cpp
r1009 r1034 123 123 extern QCursor *qt_grab_cursor(); 124 124 125 #ifdef QT_PM_NATIVEWIDGETMASK 125 126 extern void qt_WinQueryClipRegionOrRect(HWND hwnd, HRGN hrgn); // qwidget_pm.cpp 127 #endif 126 128 127 129 extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); // qapplication.cpp … … 1191 1193 } 1192 1194 if (!dispatch) { 1195 #ifdef QT_PM_NATIVEWIDGETMASK 1193 1196 HPS hps = qt_display_ps(); 1194 1197 HRGN hrgn = GpiCreateRegion(hps, 0, NULL); … … 1199 1202 dispatch = !GpiPtInRegion(hps, hrgn, &pt); 1200 1203 GpiDestroyRegion(hps, hrgn); 1204 #else 1205 QPoint lcpos = widget->mapFromGlobal(cpos); 1206 QRect rect(0, 0, widget->width(), widget->height()); 1207 dispatch = !rect.contains(lcpos); 1208 #endif 1201 1209 } 1202 1210 } … … 2326 2334 HPS displayPS = qt_display_ps(); 2327 2335 2336 #ifdef QT_PM_NATIVEWIDGETMASK 2328 2337 // Since we don't use WS_CLIPSIBLINGS and WS_CLIPCHILDREN bits (see 2329 2338 // qwidget_pm.cpp), we have to validate areas that intersect with our 2330 2339 // children and siblings, taking their clip regions into account. 2331 2340 d_func()->validateObstacles(); 2341 #endif 2332 2342 2333 2343 Q_ASSERT(testAttribute(Qt::WA_WState_Created)); -
trunk/src/gui/kernel/qwidget_p.h
r938 r1034 785 785 inline HWND frameWinId() const; 786 786 HWND effectiveFrameWinId() const; 787 #ifdef QT_PM_NATIVEWIDGETMASK 787 788 void validateObstacles(); 789 #endif 788 790 void reparentChildren(); 789 791 void setModalBlocker (QWidget *modal); -
trunk/src/gui/kernel/qwidget_pm.cpp
r1019 r1034 75 75 extern MRESULT EXPENTRY QtFrameCtlProc(HWND, ULONG, MPARAM, MPARAM); 76 76 77 #ifndef QT_PM_NATIVEWIDGETMASK 78 #define qt_WinSetWindowPos WinSetWindowPos 79 #endif 80 77 81 #if !defined(QT_NO_SESSIONMANAGER) 78 82 bool qt_about_to_destroy_wnd = false; … … 114 118 // this function -- it is done automatically upon process termination. 115 119 } 120 121 #ifdef QT_PM_NATIVEWIDGETMASK 116 122 117 123 /*! … … 231 237 232 238 /*! 239 \internal 240 233 241 \enum PWOFlags 234 242 \relates QWidget … … 249 257 250 258 /*! 259 \internal 260 251 261 \fn LONG qt_WinProcessWindowObstacles(HWND hwnd, RECTL *prcl, HRGN hrgn, 252 262 LONG op, LONG flags) … … 511 521 ULONG fl) 512 522 { 523 // @todo We need to send WM_VRNENABLED/WM_VRNDISABLED to all affected 524 // windows as it turned out that WinSetWindowPos() called with SWP_NOREDRAW 525 // does not do that. The problem here is that it's unknown how to determine 526 // which windows asked to send them visible region change notifications with 527 // WinSetVisibleRegionNotify(). This is the main reason why we do not define 528 // QT_PM_NATIVEWIDGETMASK by default. Not sending those notifications breaks 529 // painting to widgets that depend on this information, e.g. all direct 530 // painting modes using DIVE. Note that this only affects cases when native 531 // windows are created for child widgets. Normally, this is not the case, 532 // all masking is done by Qt and this code is not involved at all, so 533 // disabling it doesn't affect applications. 534 513 535 #if defined(QT_DEBUGWIDGETMASK) 514 536 qDebug() << "qt_WinSetWindowPos: hwnd" << qDebugHWND(hwnd) … … 843 865 } 844 866 867 #endif // QT_PM_NATIVEWIDGETMASK 868 845 869 /*! 846 870 \internal … … 850 874 hrgn. hps is the presentation space of hrgn. 851 875 */ 852 void qt_WinExcludeOverlappingWindows(HWND hwnd, HPS hps, HRGN hrgn)876 static void qt_WinExcludeOverlappingWindows(HWND hwnd, HPS hps, HRGN hrgn) 853 877 { 854 878 HRGN vr = GpiCreateRegion(hps, 0, NULL); … … 882 906 all clip coordinates are inclusive. 883 907 */ 884 void qt_WinScrollWindowWell(HWND hwnd, LONG dx, LONG dy, const PRECTL clip = NULL) 908 static void qt_WinScrollWindowWell(HWND hwnd, LONG dx, LONG dy, 909 const PRECTL clip = NULL) 885 910 { 886 911 WinLockVisRegions(HWND_DESKTOP, TRUE); … … 1103 1128 // problems with this line enabled in Qt3 on OS/2 in QT_PM_NO_WIDGETMASK 1104 1129 // mode (terrible flicker in QFileDialog because QSplitter used there 1105 // sets WA_PaintUnclipped). This however doesn't make a big difference 1106 // now since we don't support QT_PM_NO_WIDGETMASK anymore (read below 1107 // about clipping) and is left here just to show where WA_PaintUnclipped 1108 // was originally intended to be used. 1130 // sets WA_PaintUnclipped). Note that in QT_PM_NATIVEWIDGETMASK mode it 1131 // doesn't play any role since all clipping is manually done by us 1132 // anyway (see below). 1109 1133 #if 0 1110 1134 if (!testAttribute(Qt::WA_PaintUnclipped)) 1111 1135 #endif 1112 1136 { 1137 #ifdef QT_PM_NATIVEWIDGETMASK 1113 1138 // We don't use WS_CLIPSIBLINGS and WS_CLIPCHILDREN because when these 1114 1139 // styles are set and the child (sibling) window has a non-NULL clip region, … … 1123 1148 if (topLevel) 1124 1149 style |= WS_CLIPSIBLINGS; 1150 #else 1151 style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN; 1152 #endif 1125 1153 } 1126 1154 … … 2488 2516 void QWidgetPrivate::setMask_sys(const QRegion ®ion) 2489 2517 { 2518 #ifdef QT_PM_NATIVEWIDGETMASK 2490 2519 // @todo implement 2520 #endif 2491 2521 } 2492 2522 … … 2567 2597 } 2568 2598 2599 #ifdef QT_PM_NATIVEWIDGETMASK 2600 2569 2601 /*! 2570 2602 \internal … … 2590 2622 } 2591 2623 2624 #endif // QT_PM_NATIVEWIDGETMASK 2625 2592 2626 QT_END_NAMESPACE -
trunk/src/gui/kernel/qwindowdefs_pm.h
r1013 r1034 92 92 Q_GUI_EXPORT QWidget *qt_widget_from_hwnd(HWND hwnd); 93 93 94 #ifdef QT_PM_NATIVEWIDGETMASK 95 94 96 enum PWOFlags { 95 97 PWO_Children = 0x01, … … 109 111 LONG flags); 110 112 #endif 113 114 #endif // QT_PM_NATIVEWIDGETMASK 111 115 112 116 // QDebug helpers for debugging various API types -
trunk/src/gui/painting/qwindowsurface_pm.cpp
r1033 r1034 608 608 bmh.cy = d->image->height(); 609 609 610 #ifdef QT_PM_NATIVEWIDGETMASK 610 611 int wh = widget->height(); 611 612 … … 623 624 GpiSetClipRegion(wps, wrgn, &oldRgn); 624 625 wrgn = oldRgn; 625 626 #endif 626 627 // Note: target is inclusive-inclusive, source is inclusive-exclusive 627 628 POINTL ptls[] = { { wbr.left(), wbr.top() }, … … 631 632 GpiDrawBits(wps, (PVOID) const_cast<const QImage *>(d->image)->bits(), 632 633 (PBITMAPINFO2) &bmh, 4, ptls, ROP_SRCCOPY, BBO_IGNORE); 634 635 #ifdef QT_PM_NATIVEWIDGETMASK 633 636 } 634 637 635 638 if (wrgn != NULLHANDLE) 636 639 GpiDestroyRegion(wps, wrgn); 640 #endif 637 641 638 642 widget->releasePS(wps); … … 696 700 HWND hwndWidget = widget->internalWinId(); 697 701 ULONG rc = WinQueryVisibleRegion(hwndWidget, hrgn); 702 #ifdef QT_PM_NATIVEWIDGETMASK 698 703 if (rc != RGN_ERROR) { 699 704 // substract children from the visible region, if any 700 705 rc = qt_WinProcessWindowObstacles(hwndWidget, NULL, hrgn, 701 706 CRGN_DIFF, PWO_Children); 707 #endif 702 708 if (rc != RGN_ERROR && hwnd != hwndWidget) { 703 709 // translate coords to the main widget's coordinate space … … 708 714 GpiOffsetRegion(hps, hrgn, &ptlOffset); 709 715 } 710 } 716 #ifdef QT_PM_NATIVEWIDGETMASK 717 } 718 #endif 711 719 712 720 if (rc == RGN_RECT || rc == RGN_COMPLEX) { -
trunk/src/gui/painting/qwindowsurface_raster.cpp
r846 r1034 248 248 int ih = img.height(); 249 249 250 #ifdef QT_PM_NATIVEWIDGETMASK 250 251 // produce a clip region that excludes all descending obstacles 251 252 // (like child widgets with real HWNDs which are not excluded by Qt) … … 261 262 GpiSetClipRegion(wps, wrgn, &oldRgn); 262 263 wrgn = oldRgn; 263 264 #endif 264 265 // Note: target is inclusive-inclusive, source is inclusive-exclusive 265 266 POINTL ptls[] = { { wbr.left(), wh - wbr.bottom() - 1 }, … … 275 276 GpiDrawBits(wps, (PVOID) img.bits(), (PBITMAPINFO2) &bmh, 4, ptls, 276 277 ROP_SRCCOPY, BBO_IGNORE); 278 279 #ifdef QT_PM_NATIVEWIDGETMASK 277 280 } 278 281 279 282 if (wrgn != NULLHANDLE) 280 283 GpiDestroyRegion(wps, wrgn); 284 #endif 281 285 282 286 #elif QT_BITMAP_MIRROR == 2 … … 306 310 bmh.cy = d->image->height(); 307 311 312 #ifdef QT_PM_NATIVEWIDGETMASK 308 313 int wh = widget->height(); 309 314 … … 321 326 GpiSetClipRegion(wps, wrgn, &oldRgn); 322 327 wrgn = oldRgn; 323 328 #endif 324 329 // Note: target is inclusive-inclusive, source is inclusive-exclusive 325 330 POINTL ptls[] = { { wbr.left(), wbr.top() }, … … 343 348 344 349 GpiEnableYInversion(wps, oldInversion); 350 351 #ifdef QT_PM_NATIVEWIDGETMASK 345 352 } 346 353 347 354 if (wrgn != NULLHANDLE) 348 355 GpiDestroyRegion(wps, wrgn); 356 #endif 349 357 350 358 #ifndef QT_NO_DEBUG … … 391 399 bmh.cy = d->image->height(); 392 400 401 #ifdef QT_PM_NATIVEWIDGETMASK 393 402 int wh = widget->height(); 394 403 … … 406 415 GpiSetClipRegion(wps, wrgn, &oldRgn); 407 416 wrgn = oldRgn; 408 417 #endif 409 418 // Note: target is inclusive-inclusive, source is inclusive-exclusive 410 419 POINTL ptls[] = { { wbr.left(), wbr.top() }, … … 414 423 GpiDrawBits(wps, (PVOID) const_cast<const QImage &>(d->image->image).bits(), 415 424 (PBITMAPINFO2) &bmh, 4, ptls, ROP_SRCCOPY, BBO_IGNORE); 425 426 #ifdef QT_PM_NATIVEWIDGETMASK 416 427 } 417 428 418 429 if (wrgn != NULLHANDLE) 419 430 GpiDestroyRegion(wps, wrgn); 431 #endif 420 432 421 433 #ifndef QT_NO_DEBUG
Note:
See TracChangeset
for help on using the changeset viewer.