source: trunk/src/gui/styles/qwindowsxpstyle_p.h@ 412

Last change on this file since 412 was 2, checked in by Dmitry A. Kuminov, 17 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 9.9 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the QtGui module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef QWINDOWSXPSTYLE_P_H
43#define QWINDOWSXPSTYLE_P_H
44
45//
46// W A R N I N G
47// -------------
48//
49// This file is not part of the Qt API. It exists for the convenience
50// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
51// file may change from version to version without notice, or even be removed.
52//
53// We mean it.
54//
55
56#include "qwindowsxpstyle.h"
57#include "qwindowsstyle_p.h"
58#include <qmap.h>
59#include <qt_windows.h>
60
61// Note, these tests are duplicated in qwizard_win.cpp.
62#ifdef Q_CC_GNU
63# include <w32api.h>
64# if (__W32API_MAJOR_VERSION >= 3 || (__W32API_MAJOR_VERSION == 2 && __W32API_MINOR_VERSION >= 5))
65# ifdef _WIN32_WINNT
66# undef _WIN32_WINNT
67# endif
68# define _WIN32_WINNT 0x0501
69# include <commctrl.h>
70# endif
71#endif
72
73#include <uxtheme.h>
74
75#if WINVER >= 0x0600
76#include <vssym32.h>
77#else
78#include <tmschema.h>
79#endif
80
81#include <limits.h>
82
83QT_BEGIN_NAMESPACE
84
85// Older Platform SDKs do not have the extended DrawThemeBackgroundEx
86// function. We add the needed parts here, and use the extended
87// function dynamically, if available in uxtheme.dll. Else, we revert
88// back to using the DrawThemeBackground function.
89#ifndef DTBG_OMITBORDER
90# ifndef DTBG_CLIPRECT
91# define DTBG_CLIPRECT 0x00000001
92# endif
93# ifndef DTBG_DRAWSOLID
94# define DTBG_DRAWSOLID 0x00000002
95# endif
96# ifndef DTBG_OMITBORDER
97# define DTBG_OMITBORDER 0x00000004
98# endif
99# ifndef DTBG_OMITCONTENT
100# define DTBG_OMITCONTENT 0x00000008
101# endif
102# ifndef DTBG_COMPUTINGREGION
103# define DTBG_COMPUTINGREGION 0x00000010
104# endif
105# ifndef DTBG_MIRRORDC
106# define DTBG_MIRRORDC 0x00000020
107# endif
108 typedef struct _DTBGOPTS
109 {
110 DWORD dwSize;
111 DWORD dwFlags;
112 RECT rcClip;
113 } DTBGOPTS, *PDTBGOPTS;
114#endif // _DTBGOPTS
115
116// Undefined for some compile environments
117#ifndef TMT_TEXTCOLOR
118# define TMT_TEXTCOLOR 3803
119#endif
120#ifndef TMT_BORDERCOLORHINT
121# define TMT_BORDERCOLORHINT 3822
122#endif
123#ifndef TMT_BORDERSIZE
124# define TMT_BORDERSIZE 2403
125#endif
126#ifndef TMT_BORDERONLY
127# define TMT_BORDERONLY 2203
128#endif
129#ifndef TMT_TRANSPARENTCOLOR
130# define TMT_TRANSPARENTCOLOR 3809
131#endif
132#ifndef TMT_CAPTIONMARGINS
133# define TMT_CAPTIONMARGINS 3603
134#endif
135#ifndef TMT_CONTENTMARGINS
136# define TMT_CONTENTMARGINS 3602
137#endif
138#ifndef TMT_SIZINGMARGINS
139# define TMT_SIZINGMARGINS 3601
140#endif
141#ifndef TMT_GLYPHTYPE
142# define TMT_GLYPHTYPE 4012
143#endif
144#ifndef TMT_BGTYPE
145# define TMT_BGTYPE 4001
146#endif
147#ifndef TMT_TEXTSHADOWTYPE
148# define TMT_TEXTSHADOWTYPE 4010
149#endif
150#ifndef TMT_BORDERCOLOR
151# define TMT_BORDERCOLOR 3801
152#endif
153#ifndef BT_IMAGEFILE
154# define BT_IMAGEFILE 0
155#endif
156#ifndef BT_BORDERFILL
157# define BT_BORDERFILL 1
158#endif
159#ifndef BT_NONE
160# define BT_NONE 2
161#endif
162#ifndef TMT_FILLCOLOR
163# define TMT_FILLCOLOR 3802
164#endif
165#ifndef TMT_PROGRESSCHUNKSIZE
166# define TMT_PROGRESSCHUNKSIZE 2411