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: {
1562 if (lParam & ENDSESSION_LOGOFF) {
1567 case WM_ENDSESSION: {
1570 bool endsession = (bool) wParam;
1586 case WM_DISPLAYCHANGE:
1591 QSize sz(GetSystemMetrics(78), GetSystemMetrics(79));
1603 case WM_SETTINGCHANGE:
1624 QSize sz(GetSystemMetrics(78), GetSystemMetrics(79));
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:
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) {
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:
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);
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);
2209 if (enter == widget)
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))
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)) {
2544 bool OkCommand = (LOWORD(wParam) == 0x1);
2545 bool CancelCommand = (LOWORD(wParam) == 0x2);
2551 #ifndef QT_NO_MENUBAR 2587 dispatch = !PtInRegion(hrgn, lcpos.
x(), lcpos.
y());
2613 if (wParam == IMN_OPENCANDIDATE) {
2621 }
else if (wParam == IMN_CLOSECANDIDATE) {
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());
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 void updateSystemPrivate()
HCURSOR_or_HANDLE handle() const
Returns a platform-specific cursor handle.
virtual void unpolish(QWidget *)
Uninitialize the given {widget}'s appearance.
static HWND autoCaptureWnd
int reconvertString(RECONVERTSTRING *reconv)
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
QPointer< QWidget > widget
QTabletDeviceData currentTabletPointer
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
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...
Q_GUI_EXPORT bool qt_win_ignoreNextMouseReleaseEvent
void qt_wince_hide_taskbar(HWND hwnd)
The QPointF class defines a point in the plane using floating point precision.
int left() const
Returns the x-coordinate of the rectangle's left edge.
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
int width() const
Returns the width of the rectangle.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QApplicationPrivate * instance()
#define SPI_SETNONCLIENTMETRICS
static QStyle * style()
Returns the application's style object.
int height() const
Returns the height of the rectangle.
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.
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.
QWidget * qt_get_tablet_widget()
static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab)
void updateKeyMap(const MSG &msg)
static void resolveAygLibs()
#define APPCOMMAND_BASS_UP
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 contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
PtrGetGestureInfo GetGestureInfo
const T value(const Key &key) const
Returns the value associated with the key.
static void quit()
Tells the application to exit with return code 0 (success).
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or 0 if there is no Qt widget there...
static QThreadData * get2(QThread *thread)
static QCursor * overrideCursor()
Strips out vertical alignment flags and transforms an alignment align of Qt::AlignLeft into Qt::Align...
QDesktopWidget * qt_desktopWidget
static AygRecognizeGesture ptrRecognizeGesture
static PACKET localPacketBuf[QT_TABLET_NPACKETQSIZE]
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
struct tagGESTUREINFO GESTUREINFO
void setTop(int pos)
Sets the top edge of the rectangle to the given y coordinate.
static bool qt_try_modal(QWidget *, MSG *, int &ret)
QSize size() const
Returns the size of the rectangle.
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.
Qt::KeyboardModifiers qt_win_getKeyboardModifiers()
The QResizeEvent class contains event parameters for resize events.
Q_CORE_EXPORT void qWarning(const char *,...)
#define FALSE
Synonym for false.
bool translateKeyEvent(QWidget *receiver, const MSG &msg, bool grab)
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
#define GET_DEVICE_LPARAM(lParam)
#define APPCOMMAND_BASS_DOWN
#define IMR_CONFIRMRECONVERTSTRING
#define SPI_SETICONTITLELOGFONT
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()
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.
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...
The QTabletEvent class contains parameters that describe a Tablet event.
static bool startingUp()
Returns true if an application object has not been created yet; otherwise returns false...
#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.
QPoint center() const
Returns the center point of the rectangle.
static bool tryModalHelper(QWidget *widget, QWidget **rettop=0)
static PtrWTPacketsGet ptrWTPacketsGet
bool composition(LPARAM lparam)
int top() const
Returns the y-coordinate of the rectangle's top edge.
static QWidget * activePopupWidget()
Returns the active popup widget.
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.
#define SPI_SETFONTSMOOTHINGTYPE
Type
This enum type defines the valid event types in Qt.
void setLeft(int pos)
Sets the left edge of the rectangle to the given x coordinate.
#define APPCOMMAND_TREBLE_UP
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...
QRect toRect() const
Returns the variant as a QRect if the variant has type() Rect ; otherwise returns an invalid QRect...
static void changeKeyboard()
int x() const
Returns the x-coordinate of the rectangle's left edge.
static PtrWTInfo ptrWTInfo
PtrCloseGestureInfoHandle CloseGestureInfoHandle
#define GET_APPCOMMAND_LPARAM(lParam)
static void qt_win_read_cleartype_settings()
The QPoint class defines a point in the plane using integer precision.
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.
The QRect class defines a rectangle in the plane using integer precision.
static LRESULT DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
bool translateTouchEvent(const MSG &msg)
static void dispatchEnterLeave(QWidget *enter, QWidget *leave)
int y() const
Returns the y coordinate of this point.
static PtrWTOverlap ptrWTOverlap
virtual void polish(QWidget *)
Initializes the appearance of the given widget.
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)
QKeyMapperPrivate * qt_keymapper_private()
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.
int x() const
Returns the x coordinate of this point.
bool qt_sendSpontaneousEvent(QObject *, QEvent *)
#define GET_KEYSTATE_LPARAM(lParam)
QSessionManager * qt_session_manager_self
static void alert_widget(QWidget *widget, int duration)
static QPointer< QWidget > popupButtonFocus
static bool sm_blockUserInput
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)
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).
static QWidget * focusWidget()
Returns the application widget that has the keyboard input focus, or 0 if no widget in this applicati...
IAccessible * qt_createWindowsAccessible(QAccessibleInterface *object)
static int translateButtonState(int s, int type, int button)
static void qt_set_windows_updateScrollBar(QWidget *widget)
#define APPCOMMAND_BASS_BOOST
static void enterWhatsThisMode()
This function switches the user interface into "What's This?" mode.
static void qt_set_windows_color_resources()
static QPoint pos()
Returns the position of the cursor (hot spot) in global screen coordinates.
static Qt::KeyboardModifiers oldstate
static int area(const QSize &s)
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.