- Timestamp:
- Jun 15, 2010, 4:52:07 PM (15 years ago)
- Location:
- trunk/src/gui/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qwidget_pm.cpp
r711 r749 230 230 } 231 231 232 /** \internal flags for qt_WinProcessWindowObstacles() */233 enum {234 PWO_Children = 0x01,235 PWO_Sibings = 0x02,236 PWO_Ancestors = 0x04,237 PWO_Screen = 0x08,238 PWO_TopLevel = 0x80000000,239 // PWO_Default is suitable in most cases (for simple paint operations)240 PWO_Default = PWO_Children | PWO_Sibings | PWO_Ancestors | PWO_Screen,241 };242 243 232 /*! 244 233 \internal 245 234 246 Helper function to collect all relative windows intersecting with the 247 given window and placed above it in z-order.248 249 \param hwnd window in question250 \param prcl rectangle (in window coordinates) to limit processing to251 (if null, the whole window rectange is used)252 \param hrgn region where to combine all obstacles253 (if 0, obstacles are directly validated instead of collecting) 254 \param op region operation perfomed when combining obstacles (CRGN_*)255 \param flags flags defining the scope (PWO_* ORed together)256 257 \return complexity of the combined region (only when \a hrgn is not 0)235 Helper function to collect all relative windows intersecting with the given 236 \a hwnd and placed above it in z-order. The area of interest is limited to 237 the \a prcl rectangle (in window coordinates) which may be NULL to indicate 238 the whole window. If \a hrgn is not NULL, all found obstacles are combined 239 with the given region using the \a op operation (CRGN_*); otherwise they are 240 directly validated on the window. The scope of relativeness is defined by 241 the \fl argument which is one or more PWO_* flags OR-ed together. 242 243 Returns the complexity of the combined region (only when \a hrgn is not 244 NULL). Note that if no combining occurs (e.g. no relatives in the requested 245 scope), the return value is RGN_NULL regardless of the original complexity 246 of \a hrgn. 258 247 */ 259 static LONG qt_WinProcessWindowObstacles(HWND hwnd, PRECTLprcl, HRGN hrgn,260 LONG op, LONG flags = PWO_Default)248 LONG qt_WinProcessWindowObstacles(HWND hwnd, RECTL *prcl, HRGN hrgn, 249 LONG op, LONG flags) 261 250 { 262 251 Q_ASSERT(hwnd); … … 279 268 HRGN whrgn = GpiCreateRegion(displayPS, 0, NULL); 280 269 281 LONG cmplx = RGN_NULL;270 LONG cmplx; 282 271 HWND relative; 283 272 SWP swp; 273 274 bool cmplxChanged = false; 284 275 285 276 // first, process areas placed outside the screen bounds … … 301 292 if (hrgn != NULLHANDLE) { 302 293 cmplx = GpiCombineRegion(displayPS, hrgn, hrgn, whrgn, op); 294 cmplxChanged = true; 303 295 } else { 304 296 WinValidateRegion(hwnd, whrgn, FALSE); … … 336 328 if (hrgn != NULLHANDLE) { 337 329 cmplx = GpiCombineRegion(displayPS, hrgn, hrgn, whrgn, op); 330 cmplxChanged = true; 338 331 } else { 339 332 WinValidateRegion(hwnd, whrgn, FALSE); … … 377 370 if (hrgn != NULLHANDLE) { 378 371 cmplx = GpiCombineRegion(displayPS, hrgn, hrgn, whrgn, op); 372 cmplxChanged = true; 379 373 } else { 380 374 WinValidateRegion(hwnd, whrgn, FALSE); … … 436 430 if (hrgn != NULLHANDLE) { 437 431 cmplx = GpiCombineRegion(displayPS, hrgn, hrgn, whrgn, op); 432 cmplxChanged = true; 438 433 } else { 439 434 WinValidateRegion(hwnd, whrgn, FALSE); … … 448 443 449 444 GpiDestroyRegion(displayPS, whrgn); 445 446 if (hrgn != NULLHANDLE && cmplxChanged == false) { 447 // make sure to return the original complexity of the region 448 RECTL rclDummy; 449 cmplx = GpiQueryRegionBox(displayPS, hrgn, &rclDummy); 450 } 450 451 451 452 return cmplx; -
trunk/src/gui/kernel/qwindowdefs_pm.h
r748 r749 68 68 typedef void *MRESULT; 69 69 70 typedef struct _RECTL RECTL; 71 typedef RECTL *PRECTL; 72 70 73 typedef HWND WId; 71 74 … … 85 88 86 89 Q_GUI_EXPORT QWidget *qt_widget_from_hwnd(HWND hwnd); 90 91 /** \internal flags for qt_WinProcessWindowObstacles() */ 92 enum { 93 PWO_Children = 0x01, 94 PWO_Sibings = 0x02, 95 PWO_Ancestors = 0x04, 96 PWO_Screen = 0x08, 97 PWO_TopLevel = 0x80000000, 98 // PWO_Default is suitable in most cases (for simple paint operations) 99 PWO_Default = PWO_Children | PWO_Sibings | PWO_Ancestors | PWO_Screen, 100 }; 101 102 Q_GUI_EXPORT LONG qt_WinProcessWindowObstacles(HWND hwnd, RECTL *prcl, HRGN hrgn, 103 LONG op, LONG flags = PWO_Default); 87 104 88 105 // QDebug helpers for debugging various API types
Note:
See TracChangeset
for help on using the changeset viewer.