Changeset 100 for trunk/src/gui
- Timestamp:
- Aug 6, 2009, 2:24:58 AM (16 years ago)
- Location:
- trunk/src/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r99 r100 205 205 *****************************************************************************/ 206 206 207 Q_GUI_EXPORT HPS qt_display_ dc()207 Q_GUI_EXPORT HPS qt_display_() 208 208 { 209 209 Q_ASSERT(qApp && qApp->thread() == QThread::currentThread()); … … 424 424 MRESULT EXPENTRY QtWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 425 425 { 426 // @todo implement 427 return FALSE; 426 // message handling indicators: if handled is true at the end of message 427 // processing, no default window proc is called but rc is returned. 428 bool handled = false; 429 MRESULT rc = (MRESULT) FALSE; 430 QETWidget *widget = 0; 431 HWND hwndC = NULLHANDLE; 432 433 do { 434 switch(msg) { 435 default: 436 break; 437 } 438 if (handled) 439 return rc; 440 } while(0); 441 442 return WinDefWindowProc(hwnd, msg, mp1, mp2); 428 443 } 429 444 … … 432 447 MRESULT EXPENTRY QtFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 433 448 { 434 // @todo implement 435 return FALSE; 449 // message handling indicators: if handled is true at the end of message 450 // processing, no default window proc is called but rc is returned. 451 bool handled = false; 452 MRESULT rc = (MRESULT) FALSE; 453 QETWidget *widget = 0; 454 HWND hwndC = NULLHANDLE; 455 456 do { 457 switch(msg) { 458 default: 459 break; 460 } 461 if (handled) 462 return rc; 463 } while(0); 464 465 return QtOldFrameProc(hwnd, msg, mp1, mp2); 436 466 } 437 467 -
trunk/src/gui/kernel/qwidget_p.h
r99 r100 156 156 #if defined(Q_WS_PM) 157 157 HWND fId; 158 158 159 #endif 159 160 QRect normalGeometry; // used by showMin/maximized/FullScreen -
trunk/src/gui/kernel/qwidget_pm.cpp
r99 r100 51 51 52 52 #include "private/qapplication_p.h" 53 53 54 54 55 #include <qdebug.h> 55 56 56 57 #define QT_DEBUGWINCREATEDESTROY 58 57 59 58 60 QT_BEGIN_NAMESPACE … … 105 107 } 106 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 107 660 /*! 108 661 * \internal … … 115 668 static BOOL qt_WinDestroyWindow(HWND hwnd) 116 669 { 117 #if !defined 670 #if !defined(QT_NO_SESSIONMANAGER) 118 671 qt_about_to_destroy_wnd = true; 119 672 #endif 120 673 BOOL rc = WinDestroyWindow(hwnd); 121 #if !defined 674 #if !defined(QT_NO_SESSIONMANAGER) 122 675 qt_about_to_destroy_wnd = false; 123 676 #endif … … 321 874 QWidget *parent = q->parentWidget(); 322 875 323 QWidgetPrivate *ppp;324 ppp->frameWinId();325 876 if (parent && !(parent->windowType() == Qt::Desktop)) 326 877 ownerw = parent->window()->d_func()->frameWinId(); … … 682 1233 void QWidgetPrivate::hide_sys() 683 1234 { 684 // @todo implement 1235 Q_Q(QWidget); 1236 deactivateWidgetCleanup(); 1237 Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); 1238 if (q->windowFlags() != Qt::Desktop) { 1239 ULONG fl = SWP_HIDE; 1240 if (q->isWindow() && frameWinId() != NULLHANDLE) { 1241 if (!(q->windowFlags() & Qt::Popup)) 1242 fl |= SWP_DEACTIVATE; 1243 } 1244 qt_WinSetWindowPos(frameWinId(), 0, 0, 0, 0, 0, fl); 1245 HSWITCH swEntry = maybeTopData() ? maybeTopData()->swEntry : NULLHANDLE; 1246 if (swEntry != NULLHANDLE) { 1247 SWCNTRL swc; 1248 WinQuerySwitchEntry(swEntry, &swc); 1249 swc.uchVisibility = SWL_INVISIBLE; 1250 WinChangeSwitchEntry(swEntry, &swc); 1251 } 1252 } 1253 if (q->isWindow()) { 1254 if (QWidgetBackingStore *bs = maybeBackingStore()) 1255 bs->releaseBuffer(); 1256 } else { 1257 invalidateBuffer(q->rect()); 1258 } 1259 q->setAttribute(Qt::WA_Mapped, false); 685 1260 } 686 1261 687 1262 void QWidgetPrivate::show_sys() 688 1263 { 689 // @todo implement 1264 Q_Q(QWidget); 1265 #if defined(QT_NON_COMMERCIAL) 1266 QT_NC_SHOW_WINDOW 1267 #endif 1268 if (q->testAttribute(Qt::WA_OutsideWSRange)) 1269 return; 1270 q->setAttribute(Qt::WA_Mapped); 1271 Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); 1272 1273 if (q->testAttribute(Qt::WA_DontShowOnScreen)) { 1274 invalidateBuffer(q->rect()); 1275 return; 1276 } 1277 1278 if (frameWinId() != NULLHANDLE) { 1279 ULONG fl = SWP_SHOW; 1280 if (q->isWindow()) { 1281 if (q->isMinimized()) { 1282 fl = SWP_MINIMIZE; 1283 } else if (q->isMaximized()) { 1284 fl |= SWP_MAXIMIZE; 1285 } else { 1286 fl |= SWP_RESTORE; 1287 } 1288 1289 if (!(q->testAttribute(Qt::WA_ShowWithoutActivating) 1290 || (q->windowType() == Qt::Popup) 1291 || (q->windowType() == Qt::ToolTip) 1292 || (q->windowType() == Qt::Tool))) { 1293 fl |= SWP_ACTIVATE; 1294 } 1295 } 1296 1297 qt_WinSetWindowPos(frameWinId(), 0, 0, 0, 0, 0, fl); 1298 1299 if (q->isWindow()) { 1300 if (q->windowType() != Qt::Popup && 1301 q->windowType() != Qt::Tool && 1302 (q->windowType() != Qt::Dialog || !q->parentWidget()) 1303 ) { 1304 HSWITCH &swEntry = topData()->swEntry; 1305 if (!swEntry) { 1306 // lazily create a new window list entry 1307 HWND id = frameWinId(); 1308 PID pid; 1309 WinQueryWindowProcess(id, &pid, NULL); 1310 SWCNTRL swc; 1311 memset(&swc, 0, sizeof(SWCNTRL)); 1312 swc.hwnd = id; 1313 swc.idProcess = pid; 1314 swc.uchVisibility = SWL_VISIBLE; 1315 swc.fbJump = SWL_JUMPABLE; 1316 WinQueryWindowText(id, sizeof(swc.szSwtitle), swc.szSwtitle); 1317 swEntry = WinAddSwitchEntry(&swc); 1318 } else { 1319 SWCNTRL swc; 1320 WinQuerySwitchEntry(swEntry, &swc); 1321 swc.uchVisibility = SWL_VISIBLE; 1322 WinChangeSwitchEntry(swEntry, &swc); 1323 } 1324 } 1325 1326 ULONG wstyle = WinQueryWindowULong(frameWinId(), QWL_STYLE); 1327 if (wstyle & WS_MINIMIZED) 1328 data.window_state |= Qt::WindowMinimized; 1329 if (wstyle & WS_MAXIMIZED) 1330 data.window_state |= Qt::WindowMaximized; 1331 } 1332 } 1333 1334 invalidateBuffer(q->rect()); 690 1335 } 691 1336 … … 764 1409 { 765 1410 extra->topextra->fId = NULLHANDLE; 1411 766 1412 } 767 1413 768 1414 void QWidgetPrivate::deleteTLSysExtra() 769 1415 { 1416 1417 770 1418 // Note: extra->topextra->fId is cleaned up in QWidget::destroy() 771 1419 } -
trunk/src/gui/kernel/qwindowdefs_pm.h
r92 r100 58 58 typedef unsigned long LHANDLE; 59 59 typedef LHANDLE HWND; 60 60 61 typedef struct _QMSG QMSG; 61 62 typedef void *MRESULT; 62 63 63 64 typedef HWND WId; 65 66 64 67 65 68 // constants to address extra window data -
trunk/src/gui/painting/qregion_pm.cpp
r95 r100 60 60 QRegion::QRegion(const QRect &r, RegionType t) 61 61 { 62 63 62 64 // @todo implement 63 65 } … … 65 67 QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule) 66 68 { 69 70 67 71 // @todo implement 68 72 } … … 76 80 QRegion::QRegion(const QBitmap &bm) 77 81 { 82 83 78 84 // @todo implement 79 85 } … … 81 87 void QRegion::cleanUp(QRegion::QRegionData *x) 82 88 { 89 83 90 // @todo implement 84 91 }
Note:
See TracChangeset
for help on using the changeset viewer.