equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtCore module of the Qt Toolkit. |
7 ** This file is part of the QtCore module of the Qt Toolkit. |
8 ** |
8 ** |
64 # define TIME_KILL_SYNCHRONOUS 0x0100 |
64 # define TIME_KILL_SYNCHRONOUS 0x0100 |
65 #endif |
65 #endif |
66 |
66 |
67 #ifndef QS_RAWINPUT |
67 #ifndef QS_RAWINPUT |
68 # define QS_RAWINPUT 0x0400 |
68 # define QS_RAWINPUT 0x0400 |
|
69 #endif |
|
70 |
|
71 #ifndef WM_TOUCH |
|
72 # define WM_TOUCH 0x0240 |
|
73 #endif |
|
74 #ifndef WM_GESTURE |
|
75 # define WM_GESTURE 0x0119 |
|
76 # define WM_GESTURENOTIFY 0x011A |
69 #endif |
77 #endif |
70 |
78 |
71 enum { |
79 enum { |
72 WM_QT_SOCKETNOTIFIER = WM_USER, |
80 WM_QT_SOCKETNOTIFIER = WM_USER, |
73 WM_QT_SENDPOSTEDEVENTS = WM_USER + 1, |
81 WM_QT_SENDPOSTEDEVENTS = WM_USER + 1, |
500 // sent now |
508 // sent now |
501 (void) d->wakeUps.fetchAndStoreRelease(0); |
509 (void) d->wakeUps.fetchAndStoreRelease(0); |
502 MSG *msg = (MSG *) lp; |
510 MSG *msg = (MSG *) lp; |
503 if (localSerialNumber != d->lastSerialNumber |
511 if (localSerialNumber != d->lastSerialNumber |
504 // if this message IS the one that triggers sendPostedEvents(), no need to post it again |
512 // if this message IS the one that triggers sendPostedEvents(), no need to post it again |
505 && msg->hwnd != d->internalHwnd |
513 && (msg->hwnd != d->internalHwnd |
506 && msg->message != WM_QT_SENDPOSTEDEVENTS) { |
514 || msg->message != WM_QT_SENDPOSTEDEVENTS)) { |
507 PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0); |
515 PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0); |
508 } |
516 } |
509 } |
517 } |
510 } |
518 } |
511 } |
519 } |
712 && msg.message <= WM_KEYLAST) |
720 && msg.message <= WM_KEYLAST) |
713 || (msg.message >= WM_MOUSEFIRST |
721 || (msg.message >= WM_MOUSEFIRST |
714 && msg.message <= WM_MOUSELAST) |
722 && msg.message <= WM_MOUSELAST) |
715 || msg.message == WM_MOUSEWHEEL |
723 || msg.message == WM_MOUSEWHEEL |
716 || msg.message == WM_MOUSEHWHEEL |
724 || msg.message == WM_MOUSEHWHEEL |
|
725 || msg.message == WM_TOUCH |
|
726 || msg.message == WM_GESTURE |
|
727 || msg.message == WM_GESTURENOTIFY |
717 || msg.message == WM_CLOSE)) { |
728 || msg.message == WM_CLOSE)) { |
718 // queue user input events for later processing |
729 // queue user input events for later processing |
719 haveMessage = false; |
730 haveMessage = false; |
720 d->queuedUserInputEvents.append(msg); |
731 d->queuedUserInputEvents.append(msg); |
721 } |
732 } |