Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / windows / nsUXThemeConstants.h
blob44ce9ab34e203c82303cfde447dbc8837a8bf05d
1 /* vim: se cin sw=2 ts=2 et : */
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef nsUXThemeConstants_h
9 #define nsUXThemeConstants_h
12 * The following constants are used to determine how a widget is drawn using
13 * Windows' Theme API. For more information on theme parts and states see
14 * http://msdn.microsoft.com/en-us/library/bb773210(VS.85).aspx
17 #include <vssym32.h>
18 #include <vsstyle.h>
20 #define THEME_COLOR 204
21 #define THEME_FONT 210
23 // Generic state constants
24 #define TS_NORMAL 1
25 #define TS_HOVER 2
26 #define TS_ACTIVE 3
27 #define TS_DISABLED 4
28 #define TS_FOCUSED 5
30 // These constants are reversed for the trackbar (scale) thumb
31 #define TKP_FOCUSED 4
32 #define TKP_DISABLED 5
34 // Toolbarbutton constants
35 #define TB_CHECKED 5
36 #define TB_HOVER_CHECKED 6
38 // Button constants
39 #define BP_BUTTON 1
40 #define BP_RADIO 2
41 #define BP_CHECKBOX 3
42 #define BP_GROUPBOX 4
43 #define BP_Count 5
45 // Textfield constants
46 /* This is the EP_EDITTEXT part */
47 #define TFP_TEXTFIELD 1
48 #define TFP_EDITBORDER_NOSCROLL 6
49 #define TFS_READONLY 6
51 /* These are the state constants for the EDITBORDER parts */
52 #define TFS_EDITBORDER_NORMAL 1
53 #define TFS_EDITBORDER_HOVER 2
54 #define TFS_EDITBORDER_FOCUSED 3
55 #define TFS_EDITBORDER_DISABLED 4
57 // Treeview/listbox constants
58 #define TREEVIEW_BODY 1
60 // Scrollbar constants
61 #define SP_BUTTON 1
62 #define SP_THUMBHOR 2
63 #define SP_THUMBVERT 3
64 #define SP_TRACKSTARTHOR 4
65 #define SP_TRACKENDHOR 5
66 #define SP_TRACKSTARTVERT 6
67 #define SP_TRACKENDVERT 7
68 #define SP_GRIPPERHOR 8
69 #define SP_GRIPPERVERT 9
71 // Implicit hover state.
72 // BASE + 0 = UP, + 1 = DOWN, etc.
73 #define SP_BUTTON_IMPLICIT_HOVER_BASE 17
75 // Scale constants
76 #define TKP_TRACK 1
77 #define TKP_TRACKVERT 2
78 #define TKP_THUMB 3
79 #define TKP_THUMBBOTTOM 4
80 #define TKP_THUMBTOP 5
81 #define TKP_THUMBVERT 6
82 #define TKP_THUMBLEFT 7
83 #define TKP_THUMBRIGHT 8
85 // Track state contstants
86 #define TRS_NORMAL 1
88 // Track vertical state constants
89 #define TRVS_NORMAL 1
91 // Spin constants
92 #define SPNP_UP 1
93 #define SPNP_DOWN 2
95 // Tab constants
96 #define TABP_TAB 4
97 #define TABP_TAB_SELECTED 5
98 #define TABP_PANELS 9
99 #define TABP_PANEL 10
101 // Tooltip constants
102 #define TTP_STANDARD 1
104 // Dropdown constants
105 #define CBP_DROPMARKER 1
106 #define CBP_DROPBORDER 4
107 /* This is actually the 'READONLY' style */
108 #define CBP_DROPFRAME 5
109 #define CBP_DROPMARKER_VISTA 6
111 // Menu Constants
112 #define MENU_BARBACKGROUND 7
113 #define MENU_BARITEM 8
114 #define MENU_POPUPBACKGROUND 9
115 #define MENU_POPUPBORDERS 10
116 #define MENU_POPUPCHECK 11
117 #define MENU_POPUPCHECKBACKGROUND 12
118 #define MENU_POPUPGUTTER 13
119 #define MENU_POPUPITEM 14
120 #define MENU_POPUPSEPARATOR 15
121 #define MENU_POPUPSUBMENU 16
122 #define MENU_SYSTEMCLOSE 17
123 #define MENU_SYSTEMMAXIMIZE 18
124 #define MENU_SYSTEMMINIMIZE 19
125 #define MENU_SYSTEMRESTORE 20
127 #define MB_ACTIVE 1
128 #define MB_INACTIVE 2
130 #define MS_NORMAL 1
131 #define MS_SELECTED 2
132 #define MS_DEMOTED 3
134 #define MBI_NORMAL 1
135 #define MBI_HOT 2
136 #define MBI_PUSHED 3
137 #define MBI_DISABLED 4
138 #define MBI_DISABLEDHOT 5
139 #define MBI_DISABLEDPUSHED 6
141 #define MC_CHECKMARKNORMAL 1
142 #define MC_CHECKMARKDISABLED 2
143 #define MC_BULLETNORMAL 3
144 #define MC_BULLETDISABLED 4
146 #define MCB_DISABLED 1
147 #define MCB_NORMAL 2
148 #define MCB_BITMAP 3
150 #define MPI_NORMAL 1
151 #define MPI_HOT 2
152 #define MPI_DISABLED 3
153 #define MPI_DISABLEDHOT 4
155 #define MSM_NORMAL 1
156 #define MSM_DISABLED 2
158 // Rebar constants
159 #define RP_BAND 3
160 #define RP_BACKGROUND 6
162 // Constants only found in new (98+, 2K+, XP+, etc.) Windows.
163 #ifdef DFCS_HOT
164 # undef DFCS_HOT
165 #endif
166 #define DFCS_HOT 0x00001000
168 #ifdef COLOR_MENUHILIGHT
169 # undef COLOR_MENUHILIGHT
170 #endif
171 #define COLOR_MENUHILIGHT 29
173 #ifdef SPI_GETFLATMENU
174 # undef SPI_GETFLATMENU
175 #endif
176 #define SPI_GETFLATMENU 0x1022
177 #ifndef SPI_GETMENUSHOWDELAY
178 # define SPI_GETMENUSHOWDELAY 106
179 #endif // SPI_GETMENUSHOWDELAY
180 #ifndef SPI_GETCARETTIMEOUT
181 # define SPI_GETCARETTIMEOUT 0x2022
182 #endif // SPI_GETCARETTIMEOUT
183 #ifndef WS_EX_LAYOUTRTL
184 # define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
185 #endif
187 // Our extra constants for passing a little bit more info to the renderer.
188 #define DFCS_RTL 0x00010000
190 // Toolbar separator dimension which can't be gotten from Windows
191 #define TB_SEPARATOR_HEIGHT 2
193 namespace mozilla {
194 namespace widget {
195 namespace themeconst {
197 // Pulled from sdk/include/vsstyle.h
198 enum {
199 WP_CAPTION = 1,
200 WP_SMALLCAPTION = 2,
201 WP_MINCAPTION = 3,
202 WP_SMALLMINCAPTION = 4,
203 WP_MAXCAPTION = 5,
204 WP_SMALLMAXCAPTION = 6,
205 WP_FRAMELEFT = 7,
206 WP_FRAMERIGHT = 8,
207 WP_FRAMEBOTTOM = 9,
208 WP_SMALLFRAMELEFT = 10,
209 WP_SMALLFRAMERIGHT = 11,
210 WP_SMALLFRAMEBOTTOM = 12,
211 WP_SYSBUTTON = 13,
212 WP_MDISYSBUTTON = 14,
213 WP_MINBUTTON = 15,
214 WP_MDIMINBUTTON = 16,
215 WP_MAXBUTTON = 17,
216 WP_CLOSEBUTTON = 18,
217 WP_SMALLCLOSEBUTTON = 19,
218 WP_MDICLOSEBUTTON = 20,
219 WP_RESTOREBUTTON = 21,
220 WP_MDIRESTOREBUTTON = 22,
221 WP_HELPBUTTON = 23,
222 WP_MDIHELPBUTTON = 24,
223 WP_HORZSCROLL = 25,
224 WP_HORZTHUMB = 26,
225 WP_VERTSCROLL = 27,
226 WP_VERTTHUMB = 28,
227 WP_DIALOG = 29,
228 WP_CAPTIONSIZINGTEMPLATE = 30,
229 WP_SMALLCAPTIONSIZINGTEMPLATE = 31,
230 WP_FRAMELEFTSIZINGTEMPLATE = 32,
231 WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33,
232 WP_FRAMERIGHTSIZINGTEMPLATE = 34,
233 WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35,
234 WP_FRAMEBOTTOMSIZINGTEMPLATE = 36,
235 WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37,
236 WP_FRAME = 38,
237 WP_Count
240 enum {
241 BS_NORMAL = 1,
242 BS_HOT = 2,
243 BS_PUSHED = 3,
244 BS_DISABLED = 4,
245 BS_INACTIVE = 5 /* undocumented, inactive caption button */
248 } // namespace themeconst
249 } // namespace widget
250 } // namespace mozilla
252 // If any theme part ends up having a value higher than WP_Count, this will
253 // need to change.
254 #define THEME_PART_DISTINCT_VALUE_COUNT mozilla::widget::themeconst::WP_Count
256 #endif