54 #ifdef QT_WINCE_GESTURES 55 #ifndef QT_NO_GESTURES 64 #include "private/qeventdispatcher_win_p.h" 84 #if defined(QT_NON_COMMERCIAL) 87 #include "private/qwininputcontext_p.h" 88 #include "private/qcursor_p.h" 89 #include "private/qmath_p.h" 90 #include "private/qapplication_p.h" 91 #include "private/qbackingstore_p.h" 92 #include "private/qwindowsurface_raster_p.h" 94 #include <private/qkeymapper_p.h> 95 #include <private/qlocale_p.h> 96 #include <private/qsystemlibrary_p.h> 105 #ifndef QT_NO_ACCESSIBILITY 110 #define WM_GETOBJECT 0x003D 112 #endif // QT_NO_ACCESSIBILITY 114 #if !defined(WINABLEAPI) 115 # if defined(Q_WS_WINCE) 118 # if !defined(Q_WS_WINCE) 119 # include <winable.h> 123 #ifndef QT_NO_GESTURES 126 # define GID_TWOFINGERTAP 6 127 # define GID_PRESSANDTAP 7 128 # define GID_ROLLOVER GID_PRESSANDTAP 133 # define WM_TOUCH 0x0240 136 #ifndef TOUCHEVENTF_MOVE 137 # define TOUCHEVENTF_MOVE 0x0001 138 # define TOUCHEVENTF_DOWN 0x0002 139 # define TOUCHEVENTF_UP 0x0004 140 # define TOUCHEVENTF_INRANGE 0x0008 141 # define TOUCHEVENTF_PRIMARY 0x0010 142 # define TOUCHEVENTF_NOCOALESCE 0x0020 143 # define TOUCHEVENTF_PEN 0x0040 144 # define TOUCHEVENTF_PALM 0x0080 146 # define TOUCHINPUTMASKF_TIMEFROMSYSTEM 0x0001 147 # define TOUCHINPUTMASKF_EXTRAINFO 0x0002 148 # define TOUCHINPUTMASKF_CONTACTAREA 0x0004 166 #include <windowsx.h> 173 #define PACKETDATA (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE \ 174 | PK_ORIENTATION | PK_CURSOR | PK_Z) 179 #define CSR_TYPE 20 // Some old Wacom wintab.h may not provide this constant. 183 #if defined(__CYGWIN32__) 184 #define __INSIDE_CYGWIN32__ 185 #include <mywinsock.h> 188 #ifndef IMR_RECONVERTSTRING 189 #define IMR_RECONVERTSTRING 4 192 #ifndef IMR_CONFIRMRECONVERTSTRING 193 #define IMR_CONFIRMRECONVERTSTRING 0x0005 198 #ifndef SHRG_RETURNCMD 205 #define GN_CONTEXTMENU 1000 206 #define SHRG_RETURNCMD 0x00000001 207 #define SHRG_NOANIMATION 0x00000010 210 #ifndef SPI_SETSIPINFO 211 #define SPI_SETSIPINFO 224 214 #ifndef QT_NO_GESTURES 226 #endif // QT_NO_GESTURES 230 #ifndef SPI_SETFONTSMOOTHINGTYPE 231 # define SPI_SETFONTSMOOTHINGTYPE 0x200B 233 #ifndef SPI_GETFONTSMOOTHINGTYPE 234 # define SPI_GETFONTSMOOTHINGTYPE 0x200A 236 #ifndef FE_FONTSMOOTHINGCLEARTYPE 237 # define FE_FONTSMOOTHINGCLEARTYPE 0x0002 268 #ifndef QT_NO_TABLETEVENT 272 #endif // QT_NO_TABLETEVENT 275 #ifndef QT_NO_ACCESSIBILITY 277 #endif // QT_NO_ACCESSIBILITY 292 #ifndef WM_THEMECHANGED 293 #define WM_THEMECHANGED 0x031A 295 #ifndef COLOR_MENUHILIGHT 296 #define COLOR_MENUHILIGHT 29 297 #define COLOR_MENUBAR 30 301 #ifndef WM_XBUTTONDOWN 302 #define WM_XBUTTONDOWN 0x020B 303 #define WM_XBUTTONUP 0x020C 304 #define WM_XBUTTONDBLCLK 0x020D 306 #ifndef GET_KEYSTATE_WPARAM 307 #define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam)) 308 #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam)) 309 #define XBUTTON1 0x0001 310 #define XBUTTON2 0x0002 313 #define MK_XBUTTON1 0x0020 314 #define MK_XBUTTON2 0x0040 318 #ifndef WM_APPCOMMAND 319 #define WM_APPCOMMAND 0x0319 322 #ifndef FAPPCOMMAND_MOUSE 323 #define FAPPCOMMAND_MOUSE 0x8000 324 #define FAPPCOMMAND_KEY 0 325 #define FAPPCOMMAND_OEM 0x1000 326 #define FAPPCOMMAND_MASK 0xF000 327 #define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK)) 328 #define GET_DEVICE_LPARAM(lParam) ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK)) 329 #define GET_MOUSEORKEY_LPARAM GET_DEVICE_LPARAM 330 #define GET_FLAGS_LPARAM(lParam) (LOWORD(lParam)) 331 #define GET_KEYSTATE_LPARAM(lParam) GET_FLAGS_LPARAM(lParam) 333 #define APPCOMMAND_BROWSER_BACKWARD 1 334 #define APPCOMMAND_BROWSER_FORWARD 2 335 #define APPCOMMAND_BROWSER_REFRESH 3 336 #define APPCOMMAND_BROWSER_STOP 4 337 #define APPCOMMAND_BROWSER_SEARCH 5 338 #define APPCOMMAND_BROWSER_FAVORITES 6 339 #define APPCOMMAND_BROWSER_HOME 7 340 #define APPCOMMAND_VOLUME_MUTE 8 341 #define APPCOMMAND_VOLUME_DOWN 9 342 #define APPCOMMAND_VOLUME_UP 10 343 #define APPCOMMAND_MEDIA_NEXTTRACK 11 344 #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12 345 #define APPCOMMAND_MEDIA_STOP 13 346 #define APPCOMMAND_MEDIA_PLAY_PAUSE 14 347 #define APPCOMMAND_LAUNCH_MAIL 15 348 #define APPCOMMAND_LAUNCH_MEDIA_SELECT 16 349 #define APPCOMMAND_LAUNCH_APP1 17 350 #define APPCOMMAND_LAUNCH_APP2 18 351 #define APPCOMMAND_BASS_DOWN 19 352 #define APPCOMMAND_BASS_BOOST 20 353 #define APPCOMMAND_BASS_UP 21 354 #define APPCOMMAND_TREBLE_DOWN 22 355 #define APPCOMMAND_TREBLE_UP 23 356 #endif // FAPPCOMMAND_MOUSE 359 #ifndef APPCOMMAND_MICROPHONE_VOLUME_MUTE 360 #define APPCOMMAND_MICROPHONE_VOLUME_MUTE 24 361 #define APPCOMMAND_MICROPHONE_VOLUME_DOWN 25 362 #define APPCOMMAND_MICROPHONE_VOLUME_UP 26 363 #define APPCOMMAND_HELP 27 364 #define APPCOMMAND_FIND 28 365 #define APPCOMMAND_NEW 29 366 #define APPCOMMAND_OPEN 30 367 #define APPCOMMAND_CLOSE 31 368 #define APPCOMMAND_SAVE 32 369 #define APPCOMMAND_PRINT 33 370 #define APPCOMMAND_UNDO 34 371 #define APPCOMMAND_REDO 35 372 #define APPCOMMAND_COPY 36 373 #define APPCOMMAND_CUT 37 374 #define APPCOMMAND_PASTE 38 375 #define APPCOMMAND_REPLY_TO_MAIL 39 376 #define APPCOMMAND_FORWARD_MAIL 40 377 #define APPCOMMAND_SEND_MAIL 41 378 #define APPCOMMAND_SPELL_CHECK 42 379 #define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43 380 #define APPCOMMAND_MIC_ON_OFF_TOGGLE 44 381 #define APPCOMMAND_CORRECTION_LIST 45 382 #define APPCOMMAND_MEDIA_PLAY 46 383 #define APPCOMMAND_MEDIA_PAUSE 47 384 #define APPCOMMAND_MEDIA_RECORD 48 385 #define APPCOMMAND_MEDIA_FAST_FORWARD 49 386 #define APPCOMMAND_MEDIA_REWIND 50 387 #define APPCOMMAND_MEDIA_CHANNEL_UP 51 388 #define APPCOMMAND_MEDIA_CHANNEL_DOWN 52 389 #endif // APPCOMMAND_MICROPHONE_VOLUME_MUTE 391 #if (_WIN32_WINNT < 0x0400) 401 #ifndef WM_MOUSELEAVE 402 #define WM_MOUSELEAVE 0x02A3 406 #include "private/qwidget_p.h" 414 return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
437 #if defined(QT_DEBUG) 459 #if defined(Q_WS_WIN) 478 bool translateMouseEvent(
const MSG &msg);
479 bool translateWheelEvent(
const MSG &msg);
480 bool translatePaintEvent(
const MSG &msg);
481 bool translateConfigEvent(
const MSG &msg);
482 bool translateCloseEvent(
const MSG &msg);
483 bool translateTabletEvent(
const MSG &msg, PACKET *
localPacketBuf,
int numPackets);
484 #ifndef QT_NO_GESTURES 485 bool translateGestureEvent(
const MSG &msg,
const GESTUREINFO &gi);
487 void repolishStyle(
QStyle &style);
488 inline void showChildren(
bool spontaneous) { d_func()->showChildren(spontaneous); }
489 inline void hideChildren(
bool spontaneous) { d_func()->hideChildren(spontaneous); }
536 #if defined(Q_WS_WINCE) 565 (fg.
blue()+btn.blue())/2);
585 #ifndef QT_NO_TOOLTIP 599 (fg.
blue()+btn.blue())/2);
605 #endif //QT_NO_TOOLTIP 612 NONCLIENTMETRICS ncm;
613 ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) +
sizeof(LOGFONT);
614 SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize , &ncm, 0);
621 LOGFONT lfIconTitleFont;
622 SystemParametersInfo(SPI_GETICONTITLELOGFONT,
sizeof(lfIconTitleFont), &lfIconTitleFont, 0);
637 HGDIOBJ stockFont = GetStockObject(SYSTEM_FONT);
638 GetObject(stockFont,
sizeof(lf), &lf);
655 if (SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &result, 0))
663 if (SystemParametersInfo(0x200C , 0, &winSmooth, 0)) {
737 for (
int i = 0; i < children.
size(); ++i) {
741 if (
QWidget *w = static_cast<QWidget *>(o))
744 #ifndef QT_NO_SCROLLBAR 745 if (qobject_cast<QScrollBar*>(widget))
768 int argc = priv->
argc;
769 char **argv = priv->
argv;
775 for (i=1; i<argc; i++) {
776 if (argv[i] && *argv[i] !=
'-') {
780 #if defined(QT_DEBUG) 781 if (
qstrcmp(argv[i],
"-nograb") == 0)
802 r = OleInitialize(0);
803 if (r != S_OK && r != S_FALSE) {
804 qWarning(
"Qt: Could not initialize OLE (error %x)", (
unsigned int)r);
809 #if defined(QT_DEBUG) && !defined(Q_WS_WINCE) 828 HGDIOBJ stockFont = GetStockObject(SYSTEM_FONT);
832 GetObject(stockFont,
sizeof(lf), &lf);
848 #ifndef QT_NO_TABLETEVENT 850 #endif // QT_NO_TABLETEVENT 868 if (ptrUpdateLayeredWindow && !ptrUpdateLayeredWindowIndirect)
873 if (ptrSetProcessDPIAware)
877 #ifndef QT_NO_GESTURES 887 #if defined(Q_WS_WINCE_WM) && defined(QT_WINCE_GESTURES) 890 #elif !defined(Q_WS_WINCE) 891 #if !defined(QT_NO_NATIVE_GESTURES) 897 #endif // QT_NO_NATIVE_GESTURES 903 #endif // QT_NO_GESTURES 922 ReleaseDC(0, displayDC);
946 displayDC = GetDC(0);
952 #if defined(QT_DEBUG) 971 Qt::WindowFlags flags = w ? w->windowFlags() : (Qt::WindowFlags)0;
993 if (type ==
Qt::ToolTip || w->inherits(
"QTipLabel") || w->inherits(
"QAlphaWidget")) {
1003 style |= CS_SAVEBITS;
1010 style |= CS_SAVEBITS;
1034 wchar_t uniqueAppID[MAX_PATH];
1035 GetModuleFileName(0, uniqueAppID, MAX_PATH);
1046 static int classExists = -1;
1048 if (classExists == -1) {
1050 classExists = GetClassInfo((HINSTANCE)
qWinAppInst(), (
wchar_t*)cname.
utf16(), &wcinfo);
1051 classExists = classExists && wcinfo.lpfnWndProc !=
QtWndProc;
1057 if (winclassNames()->contains(cname))
1062 wc.cbSize =
sizeof(WNDCLASSEX);
1067 wc.lpfnWndProc = (WNDPROC)QtWndProc;
1075 int sw = GetSystemMetrics(SM_CXSMICON);
1076 int sh = GetSystemMetrics(SM_CYSMICON);
1077 wc.hIconSm = (HICON)LoadImage(
qWinAppInst(), L
"IDI_ICON1", IMAGE_ICON, sw, sh, 0);
1093 brush = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
1094 wc.hbrBackground = brush;
1096 wc.hbrBackground = 0;
1098 wc.lpszMenuName = 0;
1099 wc.lpszClassName = (
wchar_t*)cname.
utf16();
1102 ATOM atom = RegisterClassEx(&wc);
1104 ATOM atom = RegisterClass(&wc);
1109 qErrnoWarning(
"QApplication::regClass: Registering window class failed.");
1114 winclassNames()->insert(cname, 1);
1125 WinClassNameHash *
hash = winclassNames();
1150 if (!configRequests)
1159 configRequests->
append(r);
1164 if (!configRequests)
1168 if (configRequests->
isEmpty())
1201 bool processEvents(QEventLoop::ProcessEventsFlags flags);
1235 void QApplication::setMainWidget(
QWidget *mainWidget)
1244 #ifndef QT_NO_CURSOR 1252 qApp->d_func()->cursor_list.prepend(cursor);
1253 SetCursor(
qApp->d_func()->cursor_list.first().handle());
1258 if (
qApp->d_func()->cursor_list.isEmpty())
1260 qApp->d_func()->cursor_list.removeFirst();
1262 if (!
qApp->d_func()->cursor_list.isEmpty()) {
1263 SetCursor(
qApp->d_func()->cursor_list.first().handle());
1281 #ifndef QT_NO_CURSOR 1301 #endif // QT_NO_CURSOR 1306 if (GetKeyState(VK_SHIFT) < 0)
1308 if (GetKeyState(VK_CONTROL) < 0)
1310 if (GetKeyState(VK_MENU) < 0)
1331 win = WindowFromPoint(p);
1337 win = GetParent(win);
1340 return w ? w->
window() : 0;
1354 bool stopFlash = duration < 0;
1357 DWORD timeOut = GetCaretBlinkTime();
1365 flashCount = duration/timeOut;
1368 info.cbSize =
sizeof(
info);
1370 info.dwFlags = stopFlash ? FLASHW_STOP : FLASHW_TRAY;
1371 info.dwTimeout = stopFlash ? 0 : timeOut;
1372 info.uCount = stopFlash ? 0 : flashCount;
1374 FlashWindowEx(&info);
1388 for (
int i = 0; i < toplevels.
count(); ++i) {
1409 if (d_func()->inPopupMode())
1412 setActiveWindow(widget);
1421 SetWindowPos(mw->
internalWinId(), HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
1437 HWND state = HWND_TOP;
1439 state = HWND_BOTTOM;
1442 SetWindowPos(mw->
internalWinId(), state, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
1460 #define RETURN(x) { inLoop=false;return x; } 1464 return (((message >= WM_MOUSEFIRST && message <= WM_MOUSELAST) ||
1470 || (message >= WM_NCMOUSEMOVE && message <= WM_NCMBUTTONDBLCLK)
1496 if (inLoop &&
qApp->loopLevel())
1504 msg.message = message;
1505 msg.wParam = wParam;
1506 msg.lParam = lParam;
1512 if (message < WM_NCMOUSEMOVE || message > WM_NCMBUTTONDBLCLK)
1514 ClientToScreen(msg.hwnd, &msg.pt);
1529 #if defined(QT_NON_COMMERCIAL) 1534 if (
qApp->filterEvent(&msg, &res))
1540 || message == WM_LBUTTONDOWN || message == WM_RBUTTONDOWN
1542 || message == WM_NCMBUTTONDOWN || message == WM_NCLBUTTONDOWN
1543 || message == WM_NCRBUTTONDOWN)) {
1547 ::SendMessage(imeParentWnd, WM_IME_ENDCOMPOSITION, 0, 0);
1552 #ifndef QT_NO_SESSIONMANAGER 1553 case WM_QUERYENDSESSION: {
1558 sm_blockUserInput =
true;
1560 if (qt_session_manager_self)
1561 qApp->commitData(*qt_session_manager_self);
1562 if (lParam & ENDSESSION_LOGOFF) {
1567 case WM_ENDSESSION: {
1568 sm_smActive =
false;
1569 sm_blockUserInput =
false;
1570 bool endsession = (bool) wParam;
1586 case WM_DISPLAYCHANGE:
1589 if (qt_desktopWidget) {
1590 qt_desktopWidget->
move(GetSystemMetrics(76), GetSystemMetrics(77));
1591 QSize sz(GetSystemMetrics(78), GetSystemMetrics(79));
1592 if (sz == qt_desktopWidget->
size()) {
1597 qt_desktopWidget->
resize(sz);
1603 case WM_SETTINGCHANGE:
1622 else if (qt_desktopWidget && wParam == SPI_SETWORKAREA) {
1623 qt_desktopWidget->
move(GetSystemMetrics(76), GetSystemMetrics(77));
1624 QSize sz(GetSystemMetrics(78), GetSystemMetrics(79));
1625 if (sz == qt_desktopWidget->
size()) {
1630 qt_desktopWidget->
resize(sz);
1644 case WM_SYSCOLORCHANGE:
1654 case WM_LBUTTONDOWN:
1655 case WM_MBUTTONDOWN:
1656 case WM_RBUTTONDOWN:
1658 case WM_LBUTTONDBLCLK:
1659 case WM_RBUTTONDBLCLK:
1660 case WM_MBUTTONDBLCLK:
1662 if (qt_win_ignoreNextMouseReleaseEvent)
1663 qt_win_ignoreNextMouseReleaseEvent =
false;
1670 if (qt_win_ignoreNextMouseReleaseEvent) {
1671 qt_win_ignoreNextMouseReleaseEvent =
false;
1702 POINT curPos = msg.pt;
1710 #if defined(Q_WS_WINCE) && !defined(QT_NO_CONTEXTMENU) 1715 QPoint globalPos(msg.pt.x, msg.pt.y);
1725 shrg.
cbSize =
sizeof(shrg);
1730 #ifndef QT_NO_GESTURES 1738 #endif // QT_NO_GESTURES 1753 bool next_is_button =
false;
1754 bool is_mouse_move = (message == WM_MOUSEMOVE);
1755 if (is_mouse_move) {
1757 if (PeekMessage(&msg1, msg.hwnd, WM_MOUSEFIRST,
1758 WM_MOUSELAST, PM_NOREMOVE))
1759 next_is_button = (msg1.message == WM_LBUTTONUP
1760 || msg1.message == WM_LBUTTONDOWN);
1762 if (!is_mouse_move || (is_mouse_move && !next_is_button))
1778 if(HIWORD(msg.lParam) == VK_TBACK) {
1779 const bool hotKeyDown = !(LOWORD(msg.lParam) & MOD_KEYUP);
1780 msg.lParam = 0x69 << 16;
1781 msg.wParam = VK_BACK;
1783 msg.message = WM_KEYDOWN;
1786 msg.message = WM_KEYUP;
1792 case WM_IME_KEYDOWN:
1795 bool anyMsg = PeekMessage(&msg1, msg.hwnd, 0, 0, PM_NOREMOVE);
1796 if (anyMsg && msg1.message == WM_DEADCHAR) {
1819 result = sm_blockUserInput
1883 QString(),
false, 0, 0, 0, 0);
1907 if (pos.
y() < -(fs.
top() - fs.
left()))
1909 if (pos.
y() >= widget->
height())
1921 case WM_SYSCOMMAND: {
1923 bool window_state_change =
false;
1929 switch(0xfff0 & wParam) {
1930 case SC_CONTEXTHELP:
1931 #ifndef QT_NO_WHATSTHIS 1934 DefWindowProc(hwnd, WM_NCPAINT, 1, 0);
1936 #if defined(QT_NON_COMMERCIAL) 1940 window_state_change =
true;
1956 window_state_change =
true;
1957 if ((0xfff0 & wParam) == SC_MAXIMIZE)
1978 if (window_state_change) {
1982 #endif // #ifndef Q_OS_WINCE 1987 case WM_SETTINGCHANGE:
1994 if (msg.lParam == INI_INTL) {
2031 case WM_ENTERSIZEMOVE:
2032 autoCaptureWnd = hwnd;
2034 case WM_EXITSIZEMOVE:
2044 if (wParam ==
FALSE) {
2079 if (LOWORD(wParam) != WA_INACTIVE) {
2085 #ifdef Q_WS_WINCE_WM 2098 #endif // Q_WS_WINCE_WM 2104 #ifdef Q_WS_WINCE_WM 2108 qApp->winFocus(widget,
true);
2116 if (app_do_modal && LOWORD(wParam) == WA_ACTIVE) {
2132 case WM_MOUSEACTIVATE:
2148 SetWindowPos(pw->
internalWinId(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
2184 case WM_PALETTECHANGED:
2188 case WM_QUERYNEWPALETTE:
2193 uint n = RealizePalette(hdc);
2196 SelectPalette(hdc, hpalOld,
TRUE);
2197 RealizePalette(hdc);
2207 if (hwnd == curWin) {
2209 if (enter == widget)
2213 qt_last_mouse_receiver = enter;
2215 if (widget == popupButtonFocus)
2216 popupButtonFocus = 0;
2221 case WM_WINDOWPOSCHANGING:
2225 WINDOWPOS *winPos = (WINDOWPOS *)lParam;
2227 && !(winPos->flags & (SWP_NOCOPYBITS | SWP_NOSIZE))) {
2231 winPos->y + fs.
top(),
2238 int dw = newSize.width() - newRect.
width();
2242 if (rect.
y() != newRect.
y()) {
2248 if (rect.
x() != newRect.
x()) {
2254 winPos->x = newRect.
x() - fs.
left();
2255 winPos->y = newRect.
y() - fs.
top();
2262 winPos->hwndInsertAfter = HWND_BOTTOM;
2268 case WM_GETMINMAXINFO:
2269 if (widget->
xtra()) {
2270 MINMAXINFO *mmi = (MINMAXINFO *)lParam;
2280 mmi->ptMaxTrackSize.x = maxw + fs.
right() + fs.
left();
2283 mmi->ptMaxTrackSize.x = qMax<long>(mmi->ptMaxTrackSize.x, 112);
2286 mmi->ptMaxTrackSize.y = maxh + fs.
top() + fs.
bottom();
2291 #ifndef QT_NO_CONTEXTMENU 2292 case WM_CONTEXTMENU:
2295 if (lParam != (
int)0xffffffff) {
2323 case WM_IME_STARTCOMPOSITION:
2324 case WM_IME_ENDCOMPOSITION:
2325 case WM_IME_COMPOSITION: {
2329 if(message == WM_IME_STARTCOMPOSITION)
2331 else if (message == WM_IME_ENDCOMPOSITION)
2333 else if (message == WM_IME_COMPOSITION)
2338 case WM_IME_REQUEST: {
2363 case WM_RENDERFORMAT:
2364 case WM_RENDERALLFORMATS:
2365 #ifndef QT_NO_CLIPBOARD 2366 case WM_DESTROYCLIPBOARD:
2374 #endif //QT_NO_CLIPBOARD 2375 #ifndef QT_NO_ACCESSIBILITY 2378 #if !defined(Q_OS_WINCE) 2383 const DWORD dwObjId = (DWORD)lParam;
2390 typedef LRESULT (WINAPI *PtrLresultFromObject)(REFIID, WPARAM, LPUNKNOWN);
2391 static PtrLresultFromObject ptrLresultFromObject = 0;
2392 static bool oleaccChecked =
false;
2393 if (!oleaccChecked) {
2395 ptrLresultFromObject = (PtrLresultFromObject)oleacclib.
resolve(
"LresultFromObject");
2396 oleaccChecked =
true;
2398 if (ptrLresultFromObject) {
2407 res = ptrLresultFromObject(IID_IAccessible, wParam, iface);
2425 ret = qMin<int>(wParam - 1, text.
size());
2427 memcpy((
void *)lParam, text.
utf16(), (text.
size() + 1) *
sizeof(
ushort));
2448 #ifndef QT_NO_TABLETEVENT 2450 const bool enteredProximity = LOWORD(lParam) != 0;
2451 PACKET proximityBuffer[1];
2453 if (totalPacks > 0) {
2457 ptrWTInfo(WTI_CURSORS + currentCursor, CSR_PHYSID, &csr_physid);
2460 const UINT deviceIdMask = 0xFF6;
2461 quint64 uniqueId = (csr_type & deviceIdMask);
2462 uniqueId = (uniqueId << 32) | csr_physid;
2468 if (!globalCursorInfo->
contains(uniqueId))
2471 currentTabletPointer = globalCursorInfo->
value(uniqueId);
2478 QPoint(),
QPoint(),
QPointF(), currentTabletPointer.currentDevice, currentTabletPointer.currentPointerType, 0, 0,
2479 0, 0, 0, 0, 0, currentTabletPointer.llId);
2482 #endif // QT_NO_TABLETEVENT 2485 #ifdef Q_WS_WINCE_WM 2488 hC = ImmGetContext(hwnd);
2489 ImmSetOpenStatus(hC,
TRUE);
2490 ImmEscape(NULL, hC, IME_ESC_SET_MODE, (LPVOID)IM_SPELL);
2499 HWND focus = ::GetFocus();
2505 const bool embedded = widget && ((
QETWidget*)widget->
window())->topData()->embedded;
2532 case WM_INPUTLANGCHANGE: {
2534 if (!GetLocaleInfo(MAKELCID(lParam, SORT_DEFAULT), LOCALE_IDEFAULTANSICODEPAGE, info, 6)) {
2535 inputcharset = CP_ACP;
2544 bool OkCommand = (LOWORD(wParam) == 0x1);
2545 bool CancelCommand = (LOWORD(wParam) == 0x2);
2551 #ifndef QT_NO_MENUBAR 2585 if (GetWindowRgn(curWin, hrgn) !=
ERROR) {
2587 dispatch = !PtInRegion(hrgn, lcpos.
x(), lcpos.
y());
2593 if (qt_last_mouse_receiver && !qt_last_mouse_receiver->
internalWinId())
2598 qt_last_mouse_receiver = 0;
2613 if (wParam == IMN_OPENCANDIDATE) {
2614 imeParentWnd = hwnd;
2621 }
else if (wParam == IMN_CLOSECANDIDATE) {
2626 SetCapture(autoCaptureWnd);
2631 #ifndef QT_NO_GESTURES 2632 #if !defined(Q_WS_WINCE) || defined(QT_WINCE_GESTURES) 2639 BOOL bResult =
false;
2658 DWORD dwErr = GetLastError();
2660 qWarning() <<
"translateGestureEvent: error = " << dwErr;
2665 #endif // !defined(Q_WS_WINCE) || defined(QT_WINCE_GESTURES) 2666 #endif // QT_NO_GESTURES 2667 #ifndef QT_NO_CURSOR 2671 SetCursor(ovr->
handle());
2725 if (!qt_modal_stack)
2734 qt_modal_stack->
insert(0, widget);
2735 app_do_modal =
true;
2737 qt_last_mouse_receiver = 0;
2738 qt_win_ignoreNextMouseReleaseEvent =
false;
2743 if (qt_modal_stack && qt_modal_stack->
removeAll(widget)) {
2744 if (qt_modal_stack->
isEmpty()) {
2748 app_do_modal =
false;
2760 qt_last_mouse_receiver = w;
2762 qt_win_ignoreNextMouseReleaseEvent =
true;
2764 app_do_modal = qt_modal_stack != 0;
2769 #if defined(Q_OS_WINCE) 2777 int type = msg->message;
2779 bool block_event =
false;
2781 if (type != WM_NCHITTEST) {
2783 if ((type >= WM_MOUSEFIRST && type <= WM_MOUSELAST) ||
2786 (type >= WM_KEYFIRST && type <= WM_KEYLAST)
2788 || type == WM_NCMOUSEMOVE
2791 if (type == WM_MOUSEMOVE
2793 || type == WM_NCMOUSEMOVE
2796 #ifndef QT_NO_CURSOR 2804 #endif // QT_NO_CURSOR 2807 }
else if (type == WM_CLOSE) {
2811 else if (type == WM_MOUSEACTIVATE || type == WM_NCLBUTTONDOWN){
2818 ret = MA_NOACTIVATEANDEAT;
2819 }
else if (type == WM_SYSCOMMAND) {
2820 if (!(msg->wParam == SC_RESTORE && widget->
isMinimized()))
2826 return !block_event;
2854 ::SendMessage(imeParentWnd, WM_IME_ENDCOMPOSITION, 0, 0);
2879 GetCursorPos(&curPos);
2883 ::SendMessage(imeParentWnd, WM_IME_ENDCOMPOSITION, 0, 0);
2940 if (autoCaptureWnd) {
3006 if (GetKeyState(VK_MENU) < 0)
3009 if ((GetKeyState(VK_LWIN) < 0) ||
3010 (GetKeyState(VK_RWIN) < 0))
3024 MSG msg = {0, 0, 0, 0, 0, {0, 0} };
3025 while (PeekMessage(&msg, 0, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE))
3027 if (msg.message == WM_MOUSEMOVE)
3028 PostMessage(msg.hwnd, msg.message, 0, msg.lParam);
3051 static POINT gpos={-1,-1};
3057 if (sm_blockUserInput)
3061 if (msg.message == WM_MOUSEMOVE) {
3063 while (PeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEFIRST,
3064 WM_MOUSELAST, PM_NOREMOVE)) {
3065 if (mouseMsg.message == WM_MOUSEMOVE) {
3066 #define PEEKMESSAGE_IS_BROKEN 1 3067 #ifdef PEEKMESSAGE_IS_BROKEN 3075 while (PeekMessage(&keyMsg, 0, WM_KEYFIRST, WM_KEYLAST,
3077 if (keyMsg.time < mouseMsg.time) {
3078 if ((keyMsg.lParam & 0xC0000000) == 0x40000000) {
3079 PeekMessage(&keyMsg, 0, keyMsg.message,
3080 keyMsg.message, PM_REMOVE);
3095 if (mouseMsg.wParam != msg.wParam)
3099 MSG *msgPtr = (
MSG *)(&msg);
3102 msgPtr->lParam = mouseMsg.lParam;
3103 msgPtr->wParam = mouseMsg.wParam;
3107 ClientToScreen(msg.hwnd, &(msgPtr->pt));
3109 PeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEMOVE,
3110 WM_MOUSEMOVE, PM_REMOVE);
3117 for (i=0; (UINT)mouseTbl[i] != msg.message && mouseTbl[i]; i += 3)
3122 button = mouseTbl[++i];
3134 static bool trackMouseEventLookup =
false;
3136 static PtrTrackMouseEvent ptrTrackMouseEvent = 0;
3139 const QPoint widgetPos = mapFromGlobal(
QPoint(msg.pt.x, msg.pt.y));
3140 QWidget *alienWidget = !internalWinId() ? this : childAt(widgetPos);
3149 #ifndef QT_NO_CURSOR 3157 QWidget *w = alienWidget ? alienWidget :
this;
3162 #endif // QT_NO_CURSOR 3164 HWND
id = effectiveWinId();
3168 if (!activePopupWidget || (activePopupWidget ==
this && !rect().contains(widgetPos)))
3180 qt_last_mouse_receiver = 0;
3184 if (curWin && qt_last_mouse_receiver)
3188 QWidget *enter = alienWidget ? alienWidget :
this;
3189 if (mouseGrabber && activePopupWidget) {
3190 if (leave != mouseGrabber)
3191 enter = mouseGrabber;
3193 enter = activePopupWidget ==
this ? this : mouseGrabber;
3196 qt_last_mouse_receiver = enter;
3202 if (!trackMouseEventLookup) {
3204 trackMouseEventLookup =
true;
3206 if (ptrTrackMouseEvent && !
qApp->d_func()->inPopupMode()) {
3214 ptrTrackMouseEvent(&tme);
3217 #endif // Q_OS_WINCE 3220 POINT curPos = msg.pt;
3221 if (curPos.x == gpos.x && curPos.y == gpos.y)
3226 ScreenToClient(internalWinId(), &curPos);
3228 pos.
rx() = curPos.x;
3229 pos.
ry() = curPos.y;
3230 pos = d_func()->mapFromWS(pos);
3233 pos = mapFromGlobal(
QPoint(gpos.x, gpos.y));
3239 qt_button_down = child;
3241 qt_button_down =
this;
3250 if (
qApp->d_func()->inPopupMode()) {
3252 if (nonClientAreaEvent)
3255 replayPopupMouseEvent =
false;
3257 QWidget *target = activePopupWidget;
3258 const QPoint globalPos(gpos.x, gpos.y);
3260 if (target !=
this) {
3261 if ((windowType() ==
Qt::Popup) && rect().contains(pos) && 0)
3267 bool releaseAfter =
false;
3271 popupButtonFocus = popupChild;
3276 releaseAfter =
true;
3283 if (popupButtonFocus) {
3285 }
else if (popupChild) {
3286 target = popupChild;
3295 qt_last_mouse_receiver);
3311 popupButtonFocus = 0;
3318 && ptrTrackMouseEvent
3327 ptrTrackMouseEvent(&tme);
3332 && replayPopupMouseEvent) {
3342 POINT widgetpt = gpos;
3343 ScreenToClient(hwndTarget, &widgetpt);
3344 LPARAM lParam = MAKELPARAM(widgetpt.x, widgetpt.y);
3345 PostMessage(hwndTarget, msg.message, msg.wParam, lParam);
3350 #if !defined(QT_NO_CONTEXTMENU) 3370 const QPoint globalPos(gpos.x,gpos.y);
3372 Qt::MouseButtons(bs),
3373 qt_button_down, alienWidget);
3378 Qt::MouseButtons(state & Qt::MouseButtonMask),
3382 qt_last_mouse_receiver);
3385 res = res && e.
isAccepted() && !nonClientAreaEvent;
3386 #if !defined(QT_NO_CONTEXTMENU) 3397 pos.
rx() = pos.
ry() = -9999;
3406 if (sm_blockUserInput)
3413 delta = (short) HIWORD (msg.wParam);
3415 delta = (int) msg.wParam;
3426 if (delta == 240 || delta == -240)
3440 globalPos.
rx() = (short)LOWORD (msg.lParam);
3441 globalPos.
ry() = (short)HIWORD (msg.lParam);
3451 w = this->childAt(this->mapFromGlobal(globalPos));
3459 if (popup && w->
window() != popup)
3461 #ifndef QT_NO_WHEELEVENT 3469 #endif //QT_NO_WHEELEVENT 3476 if (popup && w->
window() != popup)
3478 #ifndef QT_NO_WHEELEVENT 3500 #ifndef QT_NO_TABLETEVENT 3507 Q_ASSERT(!tCursorInfo()->contains(uniqueId));
3518 tdd.llId = uniqueId;
3520 ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_NPRESSURE, &np);
3521 tdd.minPressure = int(np.axMin);
3522 tdd.maxPressure = int(np.axMax);
3524 ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_TPRESSURE, &np);
3525 tdd.minTanPressure = int(np.axMin);
3526 tdd.maxTanPressure = int(np.axMax);
3534 tdd.maxX = int(lcMine.lcInExtX) - int(lcMine.lcInOrgX);
3537 tdd.maxY = int(lcMine.lcInExtY) - int(lcMine.lcInOrgY);
3540 tdd.maxZ = int(lcMine.lcInExtZ) - int(lcMine.lcInOrgZ);
3542 const uint cursorTypeBitMask = 0x0F06;
3543 if (((csr_type & 0x0006) == 0x0002) && ((csr_type & cursorTypeBitMask) != 0x0902)) {
3546 switch (csr_type & cursorTypeBitMask) {
3566 tCursorInfo()->insert(uniqueId, tdd);
3568 #endif // QT_NO_TABLETEVENT 3573 #ifndef QT_NO_TABLETEVENT 3577 switch (currentCursor % 3) {
3591 #endif // QT_NO_TABLETEVENT 3598 static DWORD btnNew, btnOld, btnChange;
3601 static bool button_pressed =
false;
3605 bool sendEvent =
false;
3608 qreal rotation = 0.0;
3609 qreal tangentialPressure;
3622 enum { absoluteRange = 20 };
3626 for (i = 0; i < numPackets; i++) {
3629 btnNew = localPacketBuf[i].pkButtons;
3630 btnChange = btnOld ^ btnNew;
3632 if (btnNew & btnChange) {
3633 button_pressed =
true;
3636 ptNew.x = UINT(localPacketBuf[i].pkX);
3637 ptNew.y = UINT(localPacketBuf[i].pkY);
3638 #ifndef QT_NO_TABLETEVENT 3642 #endif // QT_NO_TABLETEVENT 3648 oldHiResTabletGlobalPosF =
3649 currentTabletPointer.scaleCoord(ptNew.x, ptNew.y, desktopArea.
left(),
3650 desktopArea.
width(), desktopArea.
top(),
3654 #ifndef QT_NO_TABLETEVENT 3656 prsNew = localPacketBuf[i].pkNormalPressure
3657 /
qreal(currentTabletPointer.maxPressure
3658 - currentTabletPointer.minPressure);
3660 #endif // QT_NO_TABLETEVENT 3662 }
else if (button_pressed) {
3665 button_pressed =
false;
3673 POINT mouseLocationP;
3674 if (GetCursorPos(&mouseLocationP)) {
3675 const QPoint mouseLocation(mouseLocationP.x, mouseLocationP.y);
3676 if ((mouseLocation - globalPos).manhattanLength() > absoluteRange) {
3677 globalPos = mouseLocation;
3678 hiResTabletGlobalPosF = globalPos;
3681 #endif // !Q_WS_WINCE 3701 if (qt_win_ignoreNextMouseReleaseEvent) {
3702 qt_win_ignoreNextMouseReleaseEvent =
false;
3712 #ifndef QT_NO_TABLETEVENT 3714 tangentialPressure = localPacketBuf[i].pkTangentPressure
3715 /
qreal(currentTabletPointer.maxTanPressure
3716 - currentTabletPointer.minTanPressure);
3718 tangentialPressure = 0.0;
3721 tangentialPressure = 0.0;
3722 #endif // QT_NO_TABLETEVENT 3728 ort = localPacketBuf[i].pkOrientation;
3737 double radAzim = (ort.orAzimuth / 10) * (
Q_PI / 180);
3739 double tanAlt = tan((abs(ort.orAltitude / 10)) * (
Q_PI / 180));
3741 double degX = atan(sin(radAzim) / tanAlt);
3742 double degY = atan(cos(radAzim) / tanAlt);
3743 tiltX = int(degX * (180 /
Q_PI));
3744 tiltY = int(-degY * (180 /
Q_PI));
3745 rotation = ort.orTwist;
3747 #ifndef QT_NO_TABLETEVENT 3748 QTabletEvent e(t, localPos, globalPos, hiResTabletGlobalPosF, currentTabletPointer.currentDevice,
3749 currentTabletPointer.currentPointerType, prsNew, tiltX, tiltY,
3752 #endif // QT_NO_TABLETEVENT 3760 #ifndef QT_NO_TABLETEVENT 3764 #if defined(Q_OS_WINCE) 3767 if (!qt_is_gui_used)
3776 #endif // Q_OS_WINCE 3778 #endif // QT_NO_TABLETEVENT 3790 if (!GetUpdateRect(internalWinId(), 0,
FALSE)) {
3796 if (msg.message == WM_ERASEBKGND)
3801 if (d_func()->isGLWidget) {
3802 if (d_func()->usesDoubleBufferedGLContext)
3803 InvalidateRect(internalWinId(), 0,
false);
3810 if (!dirtyInBackingStore.
isEmpty())
3811 InvalidateRgn(internalWinId(), dirtyInBackingStore.
handle(),
false);
3814 d_func()->hd = BeginPaint(internalWinId(), &ps);
3816 const QRect updateRect(
QPoint(ps.rcPaint.left, ps.rcPaint.top),
3817 QPoint(ps.rcPaint.right, ps.rcPaint.bottom));
3820 d_func()->syncBackingStore(updateRect.
translated(
data->wrect.topLeft()));
3823 EndPaint(internalWinId(), &ps);
3843 QRect cr = geometry();
3844 if (msg.message == WM_SIZE) {
3845 WORD
a = LOWORD(msg.lParam);
3846 WORD b = HIWORD(msg.lParam);
3847 QSize oldSize = size();
3848 QSize newSize(a, b);
3849 #ifdef Q_WS_WINCE_WM 3854 if (msg.wParam != SIZE_MINIMIZED)
3857 d_func()->createTLExtra();
3860 if (msg.wParam == SIZE_MINIMIZED && !isMinimized()) {
3862 const QString title = windowIconText();
3864 d_func()->setWindowTitle_helper(title);
3872 }
else if (msg.wParam != SIZE_MINIMIZED) {
3873 bool window_state_changed =
false;
3874 Qt::WindowStates
oldstate = Qt::WindowStates(dataPtr()->window_state);
3875 if (isMinimized()) {
3877 const QString title = windowTitle();
3879 d_func()->setWindowTitle_helper(title);
3887 }
else if (msg.wParam == SIZE_MAXIMIZED && !isMaximized()) {
3889 window_state_changed =
true;
3890 }
else if (msg.wParam == SIZE_RESTORED && isMaximized()) {
3892 window_state_changed =
true;
3894 if (window_state_changed) {
3900 if (msg.wParam != SIZE_MINIMIZED && oldSize != newSize) {
3903 static bool slowResize =
qgetenv(
"QT_SLOW_TOPLEVEL_RESIZE").
toInt();
3904 const bool hasStaticContents = tlwExtra && tlwExtra->
backingStore 3910 if (!slowResize && tlwExtra && !hasStaticContents)
3914 if (d_func()->paintOnScreen()) {
3918 d_func()->syncBackingStore(updateRegion);
3920 d_func()->syncBackingStore();
3922 if (!slowResize && tlwExtra)
3929 }
else if (msg.message == WM_MOVE) {
3930 int a = (int) (
short) LOWORD(msg.lParam);
3931 int b = (int) (
short) HIWORD(msg.lParam);
3932 QPoint oldPos = geometry().topLeft();
3935 #if !defined(Q_WS_WINCE) 3936 if (!IsIconic(internalWinId()) && newCPos != oldPos) {
3947 #if !defined(Q_WS_WINCE) 3968 #ifndef QT_NO_GESTURES 3972 QWidget *alienWidget = !internalWinId() ? this : childAt(widgetPos);
3975 QWidget *widget = alienWidget ? alienWidget :
this;
4007 #endif // QT_NO_GESTURES 4011 SetCaretBlinkTime(msecs / 2);
4018 int blink = (int)GetCaretBlinkTime();
4030 SetDoubleClickTime(ms);
4037 int ms = GetDoubleClickTime();
4055 #ifndef QT_NO_WHEELEVENT 4058 #ifdef SPI_SETWHEELSCROLLLINES 4061 SystemParametersInfo(SPI_SETWHEELSCROLLLINES, (
uint)n, 0, 0);
4069 #ifdef SPI_GETWHEELSCROLLLINES 4071 SystemParametersInfo(SPI_GETWHEELSCROLLLINES,
sizeof(
uint), &i, 0);
4079 #endif //QT_NO_WHEELEVENT 4085 effect_override =
true;
4116 if (!effect_override && desktopSettingsAware()) {
4140 SystemParametersInfo(api, 0, &enabled, 0);
4162 #ifndef QT_NO_SESSIONMANAGER 4166 sm_blockUserInput =
false;
4172 sm_blockUserInput =
false;
4179 sm_blockUserInput =
true;
4187 #endif //QT_NO_SESSIONMANAGER 4199 static const int QT_SM_DIGITIZER = 94;
4200 int value = GetSystemMetrics(QT_SM_DIGITIZER);
4201 static const int QT_NID_INTEGRATED_TOUCH = 0x01;
4202 static const int QT_NID_EXTERNAL_TOUCH = 0x02;
4203 static const int QT_NID_MULTI_INPUT = 0x40;
4204 QApplicationPrivate::HasTouchSupport =
4205 value & (QT_NID_INTEGRATED_TOUCH | QT_NID_EXTERNAL_TOUCH | QT_NID_MULTI_INPUT);
4214 touchInputIDToTouchPointID.clear();
4219 touchInputIDToTouchPointID.clear();
4234 Qt::TouchPointStates allStates = 0;
4236 for (
int i = 0; i < winTouchInputs.
count(); ++i) {
4239 int touchPointID = touchInputIDToTouchPointID.value(touchInput.
dwID, -1);
4240 if (touchPointID == -1) {
4241 touchPointID = touchInputIDToTouchPointID.count();
4242 touchInputIDToTouchPointID.insert(touchInput.
dwID, touchPointID);
4255 Qt::TouchPointStates state;
4261 state = (screenPos == touchPoint.
screenPos()
4270 screenPos.
y() / screenGeometry.
height()));
4274 touchPoints.
append(touchPoint);
4280 touchInputIDToTouchPointID.clear();
#define SPI_GETTOOLTIPFADE
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QPointF oldHiResTabletGlobalPosF
static void qt_set_windows_font_resources()
static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
static int keyboardInputInterval()
static void updateSystemPrivate()
The QColor class provides colors based on RGB, HSV or CMYK values.
HCURSOR_or_HANDLE handle() const
Returns a platform-specific cursor handle.
void setPointSize(int)
Sets the point size to pointSize.
static uint hash(const uchar *p, int n)
int(API * PtrWTQueueSizeGet)(HCTX)
virtual void unpolish(QWidget *)
Uninitialize the given {widget}'s appearance.
static QWidget * main_widget
bool allowsErrorInteraction()
Returns true if error interaction is permitted; otherwise returns false.
static HWND autoCaptureWnd
static void setAutoCapture(HWND)
const QBrush & highlight() const
Returns the highlight brush of the current color group.
The QApplication class manages the GUI application's control flow and main settings.
static QColormap instance(int screen=-1)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
int reconvertString(RECONVERTSTRING *reconv)
static QWidgetList topLevelWidgets()
BOOL(API * PtrWTEnable)(HCTX, BOOL)
static bool checkInstance(const char *method)
static void setPalette(const QPalette &, const char *className=0)
Changes the default application palette to palette.
const QBrush & base() const
Returns the base brush of the current color group.
void push_back(const T &t)
This function is provided for STL compatibility.
const QBrush & brightText() const
Returns the bright text foreground brush of the current color group.
static void beep()
Sounds the bell, using the default volume and sound.
void qWinRequestConfig(WId id, int req, int x, int y, int w, int h)
bool QT_ENSURE_STACK_ALIGNED_FOR_SSE processEvents(QEventLoop::ProcessEventsFlags flags)
Processes pending events that match flags until there are no more events to process.
QIntegerForSizeof< void * >::Unsigned quintptr
BOOL(WINAPI * PtrEndPanningFeedback)(HWND, BOOL)
PtrUpdateLayeredWindowIndirect ptrUpdateLayeredWindowIndirect
void setBottom(int pos)
Sets the bottom edge of the rectangle to the given y coordinate.
The QCursor class provides a mouse cursor with an arbitrary shape.
static mach_timebase_info_data_t info
#define QT_END_NAMESPACE
This macro expands to.
const QColor & color() const
Returns the brush color.
QPointer< QWidget > widget
QTabletDeviceData currentTabletPointer
void clear()
Removes all items from the hash.
static QWidget * pickMouseReceiver(QWidget *candidate, const QPoint &globalPos, QPoint &pos, QEvent::Type type, Qt::MouseButtons buttons, QWidget *buttonDown, QWidget *alienWidget)
bool qt_wince_is_smartphone()
const QBrush & dark() const
Returns the dark brush of the current color group.
static bool qt_is_translatable_mouse_event(UINT message)
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
static PtrWTEnable ptrWTEnable
#define it(className, varName)
static PtrCloseTouchInputHandle CloseTouchInputHandle
int count(const T &t) const
Returns the number of occurrences of value in the vector.
QList< QWidget * > QWidgetList
The QWheelEvent class contains parameters that describe a wheel event.
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
static void initializeWidgetPaletteHash()
BOOL(WINAPI * PtrGetTouchInputInfo)(HANDLE, UINT, PVOID, int)
QRegion qt_dirtyRegion(QWidget *)
Q_GUI_EXPORT bool qt_cleartype_enabled
const QBrush & background() const
Use window() instead.
Q_GUI_EXPORT bool qt_win_ignoreNextMouseReleaseEvent
QFont qt_LOGFONTtoQFont(LOGFONT &lf, bool scale)
static void qWinProcessConfigRequests()
void qt_wince_hide_taskbar(HWND hwnd)
The QPointF class defines a point in the plane using floating point precision.
void initializeMultitouch_sys()
QRgb qt_colorref2qrgb(COLORREF col)
#define SEM_FAILCRITICALERRORS
static int wheel_scroll_lines
PtrSetGestureConfig SetGestureConfig
static WinVersion windowsVersion()
Returns the version of the Windows operating system on which the application is run (Windows only)...
PtrUpdatePanningFeedback UpdatePanningFeedback
void createEventDispatcher()
int left() const
Returns the x-coordinate of the rectangle's left edge.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
int width() const
Returns the width of the rectangle.
QGuiEventDispatcherWin32(QObject *parent=0)
int & ry()
Returns a reference to the y coordinate of this point.
void insert(int i, const T &t)
Inserts value at index position i in the list.
#define FE_FONTSMOOTHINGCLEARTYPE
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
HCTX(API * PtrWTOpen)(HWND, LPLOGCONTEXT, BOOL)
static QWidget * active_window
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
const QBrush & foreground() const
Use windowText() instead.
static QApplicationPrivate * instance()
static void cleanup()
Internal function that cleans up the font system.
long ASN1_INTEGER_get ASN1_INTEGER * a
int count(const T &t) const
Returns the number of occurrences of value in the list.
#define SPI_SETNONCLIENTMETRICS
static QStyle * style()
Returns the application's style object.
BOOL(API * PtrWTQueueSizeSet)(HCTX, int)
void closePopup(QWidget *popup)
BOOL(WINAPI * PtrSetGestureConfig)(HWND, DWORD, UINT, PVOID, UINT)
BOOL(WINAPI * PtrCloseTouchInputHandle)(HANDLE)
static int cursorFlashTime()
ushort red
Returns the red color component of this color.
int height() const
Returns the height of the rectangle.
static const WinVersion WindowsVersion
the version of the Windows operating system on which the application is run (Windows only) ...
void setY(int y)
Sets the top edge of the rectangle to the given y coordinate.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
static QList< QWinConfigRequest * > * configRequests
T * qobject_cast(QObject *object)
virtual bool hasHeightForWidth() const
Returns true if this layout's preferred height depends on its width; otherwise returns false...
#define APPCOMMAND_TREBLE_DOWN
QClipboard * qt_clipboard
The QHash class is a template class that provides a hash-table-based dictionary.
void setNormalizedPos(const QPointF &normalizedPos)
QWidget * qt_get_tablet_widget()
QEventDispatcherWin32(QObject *parent=0)
static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab)
void updateKeyMap(const MSG &msg)
static void resolveAygLibs()
void cleanupMultitouch_sys()
The QVector class is a template class that provides a dynamic array.
The QObject class is the base class of all Qt objects.
PtrEndPanningFeedback EndPanningFeedback
bool qt_wince_is_pocket_pc()
BOOL(WINAPI * PtrBeginPanningFeedback)(HWND)
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
#define APPCOMMAND_BASS_UP
static int wheelScrollLines()
static QSize closestAcceptableSize(const QWidget *w, const QSize &s)
Returns a size that satisfies all size constraints on widget, including heightForWidth() and that is ...
BOOL(WINAPI * PtrRegisterTouchWindow)(HWND, ULONG)
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
The QSizeF class defines the size of a two-dimensional object using floating point precision...
PtrGetGestureInfo GetGestureInfo
BOOL(WINAPI * PtrUpdateLayeredWindow)(HWND hwnd, HDC hdcDst, const POINT *pptDst, const SIZE *psize, HDC hdcSrc, const POINT *pptSrc, COLORREF crKey, const BLENDFUNCTION *pblend, DWORD dwflags)
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
const T value(const Key &key) const
Returns the value associated with the key.
Q_GUI_EXPORT bool qt_win_owndc_required
bool event(QEvent *e)
This virtual function receives events to an object and should return true if the event e was recogniz...
static BOOL WINAPI qt_updateLayeredWindowIndirect(HWND hwnd, const Q_UPDATELAYEREDWINDOWINFO *info)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
bool allowsInteraction()
Asks the session manager for permission to interact with the user.
qreal x() const
Returns the x-coordinate of this point.
BOOL(WINAPI * PtrCloseGestureInfoHandle)(HANDLE)
void setFamily(const QString &)
Sets the family name of the font.
void setState(Qt::TouchPointStates state)
void release()
Releases the session manager's interaction semaphore after an interaction phase.
static int keyboard_input_time
static void quit()
Tells the application to exit with return code 0 (success).
BOOL(API * PtrWTOverlap)(HCTX, BOOL)
uint qGlobalPostedEventsCount()
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or 0 if there is no Qt widget there...
QColor darker(int f=200) const
Returns a darker (or lighter) color, but does not change this object.
static void unregWinClasses()
int width() const
Returns the width.
UINT(API * PtrWTInfo)(UINT, UINT, LPVOID)
bool qt_wince_is_mobile()
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
static QThreadData * get2(QThread *thread)
void append(const T &t)
Inserts value at the end of the list.
static void setSystemFont(const QFont &font)
The QSessionManager class provides access to the session manager.
static QCursor * overrideCursor()
Strips out vertical alignment flags and transforms an alignment align of Qt::AlignLeft into Qt::Align...
struct tagTRACKMOUSEEVENT * LPTRACKMOUSEEVENT
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual QString appName() const
The QMoveEvent class contains event parameters for move events.
The QRectF class defines a rectangle in the plane using floating point precision. ...
void setBold(bool)
If enable is true sets the font's weight to QFont::Bold ; otherwise sets the weight to QFont::Normal...
#define SPI_GETMENUANIMATION
static bool isEmpty(const char *str)
QDesktopWidget * qt_desktopWidget
static AygRecognizeGesture ptrRecognizeGesture
static PACKET localPacketBuf[QT_TABLET_NPACKETQSIZE]
const QBrush & light() const
Returns the light brush of the current color group.
static QCursorData * currentCursor
int size() const
Returns the number of characters in this string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QPointer< QWidget > qt_last_mouse_receiver
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
static void initialize()
Internal function that initializes the font system.
struct tagGESTUREINFO GESTUREINFO
void setTop(int pos)
Sets the top edge of the rectangle to the given y coordinate.
static const ushort mouseTbl[]
static bool qt_try_modal(QWidget *, MSG *, int &ret)
#define SPI_GETCOMBOBOXANIMATION
static QWidgetList * popupWidgets
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
QSize size() const
Returns the size of the rectangle.
const T & at(int i) const
Returns the item at index position i in the list.
QColor dark(int f=200) const
Use darker(factor) instead.
BOOL(WINAPI * PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL)
const QString qt_reg_winclass(QWidget *w)
The QHideEvent class provides an event which is sent after a widget is hidden.
void setRight(int pos)
Sets the right edge of the rectangle to the given x coordinate.
const QBrush & midlight() const
Returns the midlight brush of the current color group.
static void clear()
Removes all pixmaps from the cache.
const QBrush & mid() const
Returns the mid brush of the current color group.
Qt::KeyboardModifiers qt_win_getKeyboardModifiers()
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event)
static int mouse_double_click_time
The QResizeEvent class contains event parameters for resize events.
#define GET_XBUTTON_WPARAM(wParam)
Q_CORE_EXPORT void qWarning(const char *,...)
void qt_win_eatMouseMove()
int & rx()
Returns a reference to the x coordinate of this point.
void setSize(const QSize &s)
Sets the size of the rectangle to the given size.
static const char * data(const QByteArray &arr)
static void setKeyboardInputInterval(int)
int(API * PtrWTPacketsGet)(HCTX, int, LPVOID)
PtrGetGestureExtraArgs GetGestureExtraArgs
#define FALSE
Synonym for false.
static bool animate_combo
static void alert(QWidget *widget, int duration=0)
Q_GUI_EXPORT qreal qt_fontsmoothing_gamma
static bool HasTouchSupport
bool translateKeyEvent(QWidget *receiver, const MSG &msg, bool grab)
QCursor * qt_grab_cursor()
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
struct tagTOUCHINPUT TOUCHINPUT
#define GET_DEVICE_LPARAM(lParam)
#define COLOR_MENUHILIGHT
DWORD(API * AygRecognizeGesture)(SHRGINFO *)
QPointF screenPos() const
Returns the screen position of this touch point.
#define APPCOMMAND_BASS_DOWN
#define IMR_CONFIRMRECONVERTSTRING
The QRegion class specifies a clip region for a painter.
#define SPI_SETICONTITLELOGFONT
static QPalette * sys_pal
BOOL(WINAPI * PtrGetGestureExtraArgs)(HANDLE, UINT, PBYTE)
static PtrRegisterTouchWindow RegisterTouchWindow
QHash< QString, int > WinClassNameHash
void setScreenRect(const QRectF &screenRect)
The QShowEvent class provides an event that is sent when a widget is shown.
static void tabletUpdateCursor(QTabletDeviceData &tdd, const UINT currentCursor)
static void setActiveWindow(QWidget *act)
Sets the active window to the active widget in response to a system event.
#define IMR_RECONVERTSTRING
static void releaseAutoCapture()
Q_GUI_EXPORT HDC qt_win_display_dc()
const BLENDFUNCTION * pblend
void setX(int x)
Sets the left edge of the rectangle to the given x coordinate.
static QWidgetList topLevelWidgets()
Returns a list of the top-level widgets (windows) in the application.
static QWidget * topLevelAt(const QPoint &p)
Returns the top-level widget at the given point; returns 0 if there is no such widget.
#define GET_KEYSTATE_WPARAM(wParam)
static PtrGetTouchInputInfo GetTouchInputInfo
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
void setSize(const QSizeF &s)
Sets the size of the rectangle to the given size.
The QTabletEvent class contains parameters that describe a Tablet event.
void moveTopLeft(const QPoint &p)
Moves the rectangle, leaving the top-left corner at the given position.
const T & at(int i) const
Returns the item at index position i in the vector.
void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &window)
Sets a the group at cg.
static bool startingUp()
Returns true if an application object has not been created yet; otherwise returns false...
static void enterModal_sys(QWidget *)
The QMouseEvent class contains parameters that describe a mouse event.
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
#define TRUE
Synonym for true.
static QAccessibleInterface * queryAccessibleInterface(QObject *)
If a QAccessibleInterface implementation exists for the given object, this function returns a pointer...
void resize(int size)
Sets the size of the string to size characters.
static void initWinTabFunctions()
static bool animate_tooltip
bool qt_use_rtl_extensions
QPoint center() const
Returns the center point of the rectangle.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
QWidgetList * qt_modal_stack
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
static bool tryModalHelper(QWidget *widget, QWidget **rettop=0)
static PtrWTPacketsGet ptrWTPacketsGet
bool composition(LPARAM lparam)
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
void qt_init(QApplicationPrivate *priv, int)
int top() const
Returns the y-coordinate of the rectangle's top edge.
static Qt::KeyboardModifiers queryKeyboardModifiers()
Queries and returns the state of the modifier keys on the keyboard.
static void setCursorFlashTime(int)
static bool isEffectEnabled(Qt::UIEffect)
Returns true if effect is enabled; otherwise returns false.
void * resolve(const char *symbol)
static Qt::KeyboardModifiers keyboardModifiers()
Returns the current state of the modifier keys on the keyboard.
static QWidget * activePopupWidget()
Returns the active popup widget.
ushort blue
Returns the blue color component of this color.
The QWindowStateChangeEvent class provides the window state before a window state change...
static bool closingDown()
Returns true if the application objects are being destroyed; otherwise returns false.
int right() const
Returns the x-coordinate of the rectangle's right edge.
void qt_win_set_cursor(QWidget *w, bool force)
#define SPI_SETFONTSMOOTHINGTYPE
Type
This enum type defines the valid event types in Qt.
static bool isBlockedByModal(QWidget *widget)
Returns true if widget is blocked by a modal window.
struct tagTRACKMOUSEEVENT TRACKMOUSEEVENT
void setLeft(int pos)
Sets the left edge of the rectangle to the given x coordinate.
static QInputContext * inputContext
#define APPCOMMAND_TREBLE_UP
The QFont class specifies a font used for drawing text.
BOOL(WINAPI * PtrGetGestureConfig)(HWND, DWORD, DWORD, PUINT, PVOID, UINT)
int y() const
Returns the y-coordinate of the rectangle's top edge.
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
bool processEvents(QEventLoop::ProcessEventsFlags flags)
Processes pending events that match flags until there are no more events to process.
QRect toRect() const
Returns the variant as a QRect if the variant has type() Rect ; otherwise returns an invalid QRect...
QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
QString family() const
Returns the requested font family name, i.e.
BOOL(WINAPI * PtrGetGestureInfo)(HANDLE, PVOID)
static void changeKeyboard()
const Key key(const T &value) const
Returns the first key mapped to value.
BOOL(API * PtrWTClose)(HCTX)
int x() const
Returns the x-coordinate of the rectangle's left edge.
static bool animate_toolbox
int toInt(bool *ok=0, int base=10) const
Returns the byte array converted to an int using base base, which is 10 by default and must be betwee...
static PtrWTInfo ptrWTInfo
PtrCloseGestureInfoHandle CloseGestureInfoHandle
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
#define GET_APPCOMMAND_LPARAM(lParam)
static void qt_win_read_cleartype_settings()
The QPoint class defines a point in the plane using integer precision.
static void setWheelScrollLines(int)
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
T & last()
Returns a reference to the last item in the list.
int size() const
Returns the number of items in the list.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
virtual QString text(Text t, int child) const =0
Returns the value of the text property t of the object, or of the object's child if child is not 0...
static bool desktopSettingsAware()
Returns true if Qt is set to use the system's standard colors, fonts, etc.
QString objectName() const
int height() const
Returns the height.
void createInternalHwnd()
The QRect class defines a rectangle in the plane using integer precision.
static HFONT systemFont()
#define SEM_NOOPENFILEERRORBOX
static LRESULT DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
const QObjectList & children() const
Returns a list of child objects.
bool translateTouchEvent(const MSG &msg)
static bool replayPopupMouseEvent
QHash< quint64, QTabletDeviceData > QTabletCursorInfo
static void dispatchEnterLeave(QWidget *enter, QWidget *leave)
static void setSystemPalette(const QPalette &pal)
int y() const
Returns the y coordinate of this point.
qreal y() const
Returns the y-coordinate of this point.
static PtrWTOverlap ptrWTOverlap
LRESULT QT_WIN_CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM)
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
The TouchPoint class provides information about a touch point in a QTouchEvent.
virtual void polish(QWidget *)
Initializes the appearance of the given widget.
static void setOverrideCursor(const QCursor &)
Use changeOverrideCursor(cursor) (if replace is true) or setOverrideCursor(cursor) (if replace is fal...
static bool sendKeyEvent(QWidget *widget, bool grab, QEvent::Type type, int code, Qt::KeyboardModifiers modifiers, const QString &text, bool autorepeat, int count, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, bool *unusedExceptForCocoa=0)
T takeLast()
Removes the last item in the list and returns it.
Q_GUI_EXPORT const QString qt_getRegisteredWndClass()
Q_CORE_EXPORT HINSTANCE qWinAppInst()
BOOL(WINAPI * PtrSetProcessDPIAware)(VOID)
QKeyMapperPrivate * qt_keymapper_private()
int pointSize() const
Returns the point size of the font.
The QClipboardEvent class provides the parameters used in a clipboard event.
The QSize class defines the size of a two-dimensional object using integer point precision.
T * data()
Returns a pointer to the data stored in the vector.
static PtrSetProcessDPIAware ptrSetProcessDPIAware
#define Q_DECLARE_PRIVATE(Class)
int qstrcmp(const QByteArray &str1, const char *str2)
bool qt_tablet_tilt_support
static void setDoubleClickInterval(int)
struct tagTOUCHINPUT * PTOUCHINPUT
int x() const
Returns the x coordinate of this point.
static void qt_set_windows_resources()
#define TOUCHEVENTF_PRIMARY
#define TOUCHINPUTMASKF_CONTACTAREA
bool qt_sendSpontaneousEvent(QObject *, QEvent *)
static void restoreOverrideCursor()
Undoes the last setOverrideCursor().
#define SPI_GETFONTSMOOTHINGTYPE
#define GET_KEYSTATE_LPARAM(lParam)
QColor lighter(int f=150) const
Returns a lighter (or darker) color, but does not change this object.
bool qt_wince_is_high_dpi()
QSessionManager * qt_session_manager_self
static void leaveModal_sys(QWidget *)
static void setFont(const QFont &, const char *className=0)
Changes the default application font to font.
static void alert_widget(QWidget *widget, int duration)
static QPointer< QWidget > popupButtonFocus
const QBrush & button() const
Returns the button brush of the current color group.
static bool sm_blockUserInput
static void winMouseButtonUp()
void moveCenter(const QPointF &p)
Moves the rectangle, leaving the center point at the given position.
static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget, QWidget *native, QWidget **buttonDown, QPointer< QWidget > &lastMouseReceiver, bool spontaneous=true)
The QEvent class is the base class of all event classes.
HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right, int bottom)
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
static int doubleClickInterval()
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).
BOOL(WINAPI * PtrUpdateLayeredWindowIndirect)(HWND hwnd, const Q_UPDATELAYEREDWINDOWINFO *pULWInfo)
static QWidget * focusWidget()
Returns the application widget that has the keyboard input focus, or 0 if no widget in this applicati...
void winFocus(QWidget *, bool)
BOOL(API * PtrWTGet)(HCTX, LPLOGCONTEXT)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
IAccessible * qt_createWindowsAccessible(QAccessibleInterface *object)
ushort green
Returns the green color component of this color.
PtrGetGestureConfig GetGestureConfig
void cancel()
Tells the session manager to cancel the shutdown process.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static int translateButtonState(int s, int type, int button)
static bool effect_override
static void qt_set_windows_updateScrollBar(QWidget *widget)
#define APPCOMMAND_BASS_BOOST
PtrUpdateLayeredWindow ptrUpdateLayeredWindow
PtrBeginPanningFeedback BeginPanningFeedback
The QFocusEvent class contains event parameters for widget focus events.
static void setEffectEnabled(Qt::UIEffect, bool enable=true)
Enables the UI effect effect if enable is true, otherwise the effect will not be used.
#define SPI_GETTOOLTIPANIMATION
static void enterWhatsThisMode()
This function switches the user interface into "What's This?" mode.
void openPopup(QWidget *popup)
static void qt_set_windows_color_resources()
static bool isNull(const QVariant::Private *d)
Handle handle() const
Returns a platform-specific region handle.
const QBrush & text() const
Returns the text foreground brush of the current color group.
static QPoint pos()
Returns the position of the cursor (hot spot) in global screen coordinates.
The QList class is a template class that provides lists.
static Qt::KeyboardModifiers oldstate
static int area(const QSize &s)
static int cursor_flash_time
QColor light(int f=150) const
Use lighter(factor) instead.
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.
void qErrnoWarning(const char *msg,...)
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
The QPalette class contains color groups for each widget state.