equal
deleted
inserted
replaced
44 #include "qguifunctions_wince.h" |
44 #include "qguifunctions_wince.h" |
45 |
45 |
46 QT_BEGIN_NAMESPACE |
46 QT_BEGIN_NAMESPACE |
47 |
47 |
48 const QString qt_reg_winclass(QWidget *w); // defined in qapplication_win.cpp |
48 const QString qt_reg_winclass(QWidget *w); // defined in qapplication_win.cpp |
49 extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM); |
49 extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM); |
50 |
50 |
51 //#define TABLET_DEBUG |
51 //#define TABLET_DEBUG |
52 #define PACKETDATA (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE \ |
52 #define PACKETDATA (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE \ |
53 | PK_ORIENTATION | PK_CURSOR | PK_Z) |
53 | PK_ORIENTATION | PK_CURSOR | PK_Z) |
54 #define PACKETMODE 0 |
54 #define PACKETMODE 0 |
61 typedef int (API *PtrWTPacketsGet)(HCTX, int, LPVOID); |
61 typedef int (API *PtrWTPacketsGet)(HCTX, int, LPVOID); |
62 typedef BOOL (API *PtrWTGet)(HCTX, LPLOGCONTEXT); |
62 typedef BOOL (API *PtrWTGet)(HCTX, LPLOGCONTEXT); |
63 typedef int (API *PtrWTQueueSizeGet)(HCTX); |
63 typedef int (API *PtrWTQueueSizeGet)(HCTX); |
64 typedef BOOL (API *PtrWTQueueSizeSet)(HCTX, int); |
64 typedef BOOL (API *PtrWTQueueSizeSet)(HCTX, int); |
65 |
65 |
|
66 #ifndef QT_NO_TABLETEVENT |
66 static void qt_tablet_init_wce(); |
67 static void qt_tablet_init_wce(); |
67 static void qt_tablet_cleanup_wce(); |
68 static void qt_tablet_cleanup_wce(); |
68 |
69 |
69 static void qt_tablet_init_wce() { |
70 static void qt_tablet_init_wce() { |
70 static bool firstTime = true; |
71 static bool firstTime = true; |
133 if (ptrWTClose) |
134 if (ptrWTClose) |
134 ptrWTClose(qt_tablet_context); |
135 ptrWTClose(qt_tablet_context); |
135 delete qt_tablet_widget; |
136 delete qt_tablet_widget; |
136 qt_tablet_widget = 0; |
137 qt_tablet_widget = 0; |
137 } |
138 } |
|
139 #endif // QT_NO_TABLETEVENT |
138 |
140 |
139 |
141 |
140 // The internal qWinRequestConfig, defined in qapplication_win.cpp, stores move, |
142 // The internal qWinRequestConfig, defined in qapplication_win.cpp, stores move, |
141 // resize and setGeometry requests for a widget that is already |
143 // resize and setGeometry requests for a widget that is already |
142 // processing a config event. The purpose is to avoid recursion. |
144 // processing a config event. The purpose is to avoid recursion. |
356 |
358 |
357 if (destroyw) { |
359 if (destroyw) { |
358 DestroyWindow(destroyw); |
360 DestroyWindow(destroyw); |
359 } |
361 } |
360 |
362 |
|
363 #ifndef QT_NO_TABLETEVENT |
361 if (q != qt_tablet_widget && QWidgetPrivate::mapper) |
364 if (q != qt_tablet_widget && QWidgetPrivate::mapper) |
362 qt_tablet_init_wce(); |
365 qt_tablet_init_wce(); |
|
366 #endif // QT_NO_TABLETEVENT |
363 |
367 |
364 if (q->testAttribute(Qt::WA_DropSiteRegistered)) |
368 if (q->testAttribute(Qt::WA_DropSiteRegistered)) |
365 registerDropSite(true); |
369 registerDropSite(true); |
366 |
370 |
367 if (maybeTopData() && maybeTopData()->opacity != 255) |
371 if (maybeTopData() && maybeTopData()->opacity != 255) |
584 Q_UNUSED(level); |
588 Q_UNUSED(level); |
585 return; |
589 return; |
586 } |
590 } |
587 |
591 |
588 // The procedure does nothing, but is required for mousegrabbing to work |
592 // The procedure does nothing, but is required for mousegrabbing to work |
589 LRESULT CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam) { |
593 LRESULT QT_WIN_CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam) { |
590 Q_UNUSED(nCode); |
594 Q_UNUSED(nCode); |
591 Q_UNUSED(wParam); |
595 Q_UNUSED(wParam); |
592 Q_UNUSED(lParam); |
596 Q_UNUSED(lParam); |
593 return 0; |
597 return 0; |
594 } |
598 } |