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 // application defines
180 #define SPI_SETNONCLIENTMETRICS 72
181 #define SPI_SETICONTITLELOGFONT 0x0022
182 #define WM_ACTIVATEAPP 0x001c
183 #define SW_PARENTCLOSING 1
184 #define SW_OTHERMAXIMIZED 2
185 #define SW_PARENTOPENING 3
186 #define SW_OTHERRESTORED 4
187 #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
190 #ifndef CFSTR_PERFORMEDDROPEFFECT
191 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
195 #define SW_SHOWMINIMIZED SW_MINIMIZE
202 typedef struct _FIXED {
207 typedef struct tagPOINTFX {
212 typedef struct _MAT2 {
219 typedef struct _GLYPHMETRICS {
222 POINT gmptGlyphOrigin;
227 typedef struct tagTTPOLYGONHEADER
234 typedef struct tagTTPOLYCURVE
242 #define GGO_GLYPH_INDEX 0x0080
243 #define TT_PRIM_LINE 1
244 #define TT_PRIM_QSPLINE 2
245 #define TT_PRIM_CSPLINE 3
246 #define ANSI_VAR_FONT 12
248 #ifndef OleInitialize
249 #define OleInitialize(a) 0
252 #ifndef SPI_GETSNAPTODEFBUTTON
253 #define SPI_GETSNAPTODEFBUTTON 95
256 #ifndef WS_EX_LAYERED
257 #define WS_EX_LAYERED 0x00080000
260 // Clipboard --------------------------------------------------------
261 #ifndef WM_CHANGECBCHAIN
262 #define WM_CHANGECBCHAIN 0x030D
265 #ifndef WM_DRAWCLIPBOARD
266 #define WM_DRAWCLIPBOARD 0x0308
269 inline bool IsIconic( HWND /*hWnd*/ )
274 inline bool IsZoomed( HWND /*hWnd*/ )
279 inline int AddFontResourceExW( LPCWSTR /*name*/, DWORD /*fl*/, PVOID /*res*/)
284 inline bool RemoveFontResourceExW( LPCWSTR /*name*/, DWORD /*fl*/, PVOID /*pdv*/)
289 inline void OleUninitialize()
293 inline DWORD GetGlyphOutline( HDC /*hdc*/, UINT /*uChar*/, INT /*fuFormat*/, GLYPHMETRICS * /*lpgm*/,
294 DWORD /*cjBuffer*/, LPVOID /*pvBuffer*/, CONST MAT2 * /*lpmat2*/ )
299 #ifndef SPI_SETFONTSMOOTHINGTYPE
300 # define SPI_SETFONTSMOOTHINGTYPE 0x200B
302 #ifndef SPI_GETFONTSMOOTHINGTYPE
303 # define SPI_GETFONTSMOOTHINGTYPE 0x200A
305 #ifndef FE_FONTSMOOTHINGCLEARTYPE
306 # define FE_FONTSMOOTHINGCLEARTYPE 0x0002
309 #ifndef DEVICE_FONTTYPE
310 #define DEVICE_FONTTYPE 0x0002
313 #ifndef RASTER_FONTTYPE
314 #define RASTER_FONTTYPE 0x0001
317 #ifndef WM_DISPLAYCHANGE
318 #define WM_DISPLAYCHANGE 0x007E
321 BOOL qt_wince_ChangeClipboardChain(
322 HWND hWndRemove, // handle to window to remove
323 HWND hWndNewNext // handle to next window
325 #define ChangeClipboardChain(a,b) qt_wince_ChangeClipboardChain(a,b);
327 HWND qt_wince_SetClipboardViewer(
328 HWND hWndNewViewer // handle to clipboard viewer window
330 #define SetClipboardViewer(a) qt_wince_SetClipboardViewer(a)
333 #endif // QPLATFORMFUNCTIONS_WCE_H