1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the plugins of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
42 #ifndef QPLATFORMFUNCTIONS_WCE_H
43 #define QPLATFORMFUNCTIONS_WCE_H
48 // This file is part of the QPA API and is not meant to be used
49 // in applications. Usage of this API may make your code
50 // source and binary incompatible with future versions of Qt.
54 #include <QtCore/qfunctions_wince.h>
60 # define WM_MOUSELEAVE 0x02A3
64 # define WM_TOUCH 0x0240
68 #define WM_GETOBJECT 0x003D
71 #define GetWindowLongPtr GetWindowLong
72 #define SetWindowLongPtr SetWindowLong
73 #define GWLP_USERDATA GWL_USERDATA
75 #ifndef CWP_SKIPINVISIBLE
76 #define CWP_SKIPINVISIBLE 0x0001
77 #define findPlatformWindowAt(a, b, c) findPlatformWindowAt(a, b)
81 #define CS_OWNDC 0x0020
85 #define HWND_MESSAGE 0
89 #define CAPTUREBLT (DWORD)0x40000000
92 #define SW_SHOWMINIMIZED SW_MINIMIZE
93 #define SW_SHOWMINNOACTIVE SW_MINIMIZE
95 #ifndef ChildWindowFromPointEx
96 #define ChildWindowFromPointEx(a, b, c) ChildWindowFromPoint(a, b)
103 #ifndef WM_MOUSEACTIVATE
104 #define WM_MOUSEACTIVATE 0x0021
107 #ifndef WM_CHILDACTIVATE
108 #define WM_CHILDACTIVATE 0x0022
111 #ifndef WM_PARENTNOTIFY
112 #define WM_PARENTNOTIFY 0x0210
116 #define WM_ENTERIDLE 0x0121
119 #ifndef WM_GETMINMAXINFO
120 #define WM_GETMINMAXINFO 0x0024
123 #ifndef WM_WINDOWPOSCHANGING
124 #define WM_WINDOWPOSCHANGING 0x0046
127 #ifndef WM_NCMOUSEMOVE
128 #define WM_NCMOUSEMOVE 0x00A0
131 #ifndef WM_NCMBUTTONDBLCLK
132 #define WM_NCMBUTTONDBLCLK 0x00A
136 #define WM_NCCREATE 0x0081
139 #ifndef WM_NCCALCSIZE
140 #define WM_NCCALCSIZE 0x0083
143 #ifndef WM_NCACTIVATE
144 #define WM_NCACTIVATE 0x0086
147 #ifndef WM_NCMOUSELEAVE
148 #define WM_NCMOUSELEAVE 0x02A2
151 #ifndef WM_NCLBUTTONDOWN
152 #define WM_NCLBUTTONDOWN 0x00A1
155 #ifndef WM_NCLBUTTONUP
156 #define WM_NCLBUTTONUP 0x00A2
160 #define WM_NCPAINT 0x0085
164 #define WM_NCHITTEST 0x0084
167 #ifndef WM_THEMECHANGED
168 #define WM_THEMECHANGED 0x031A
171 #ifndef WM_DISPLAYCHANGE
172 #define WM_DISPLAYCHANGE 0x007E
179 #ifndef SM_SWAPBUTTON
180 #define SM_SWAPBUTTON 23
183 // application defines
184 #define SPI_SETNONCLIENTMETRICS 72
185 #define SPI_SETICONTITLELOGFONT 0x0022
186 #define WM_ACTIVATEAPP 0x001c
187 #define SW_PARENTCLOSING 1
188 #define SW_OTHERMAXIMIZED 2
189 #define SW_PARENTOPENING 3
190 #define SW_OTHERRESTORED 4
191 #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
194 #ifndef CFSTR_PERFORMEDDROPEFFECT
195 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
199 #define SW_SHOWMINIMIZED SW_MINIMIZE
206 typedef struct _FIXED {
211 typedef struct tagPOINTFX {
216 typedef struct _MAT2 {
223 typedef struct _GLYPHMETRICS {
226 POINT gmptGlyphOrigin;
231 typedef struct tagTTPOLYGONHEADER
238 typedef struct tagTTPOLYCURVE
246 #define GGO_GLYPH_INDEX 0x0080
247 #define TT_PRIM_LINE 1
248 #define TT_PRIM_QSPLINE 2
249 #define TT_PRIM_CSPLINE 3
250 #define ANSI_VAR_FONT 12
252 #ifndef OleInitialize
253 #define OleInitialize(a) 0
256 #ifndef SPI_GETSNAPTODEFBUTTON
257 #define SPI_GETSNAPTODEFBUTTON 95
260 #ifndef WS_EX_LAYERED
261 #define WS_EX_LAYERED 0x00080000
264 // Clipboard --------------------------------------------------------
265 #ifndef WM_CHANGECBCHAIN
266 #define WM_CHANGECBCHAIN 0x030D
269 #ifndef WM_DRAWCLIPBOARD
270 #define WM_DRAWCLIPBOARD 0x0308
273 inline bool IsIconic( HWND /*hWnd*/ )
278 inline bool IsZoomed( HWND /*hWnd*/ )
283 inline int AddFontResourceExW( LPCWSTR /*name*/, DWORD /*fl*/, PVOID /*res*/)
288 inline bool RemoveFontResourceExW( LPCWSTR /*name*/, DWORD /*fl*/, PVOID /*pdv*/)
293 inline void OleUninitialize()
297 inline DWORD GetGlyphOutline( HDC /*hdc*/, UINT /*uChar*/, INT /*fuFormat*/, GLYPHMETRICS * /*lpgm*/,
298 DWORD /*cjBuffer*/, LPVOID /*pvBuffer*/, CONST MAT2 * /*lpmat2*/ )
303 #ifndef SPI_SETFONTSMOOTHINGTYPE
304 # define SPI_SETFONTSMOOTHINGTYPE 0x200B
306 #ifndef SPI_GETFONTSMOOTHINGTYPE
307 # define SPI_GETFONTSMOOTHINGTYPE 0x200A
309 #ifndef FE_FONTSMOOTHINGCLEARTYPE
310 # define FE_FONTSMOOTHINGCLEARTYPE 0x0002
313 #ifndef DEVICE_FONTTYPE
314 #define DEVICE_FONTTYPE 0x0002
317 #ifndef RASTER_FONTTYPE
318 #define RASTER_FONTTYPE 0x0001
321 #ifndef WM_DISPLAYCHANGE
322 #define WM_DISPLAYCHANGE 0x007E
325 BOOL qt_wince_ChangeClipboardChain(
326 HWND hWndRemove, // handle to window to remove
327 HWND hWndNewNext // handle to next window
329 #define ChangeClipboardChain(a,b) qt_wince_ChangeClipboardChain(a,b);
331 HWND qt_wince_SetClipboardViewer(
332 HWND hWndNewViewer // handle to clipboard viewer window
334 #define SetClipboardViewer(a) qt_wince_SetClipboardViewer(a)
337 #endif // QPLATFORMFUNCTIONS_WCE_H