1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/windows/nsUXThemeConstants.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,251 @@ 1.4 +/* vim: se cin sw=2 ts=2 et : */ 1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.6 + * 1.7 + * This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +#ifndef nsUXThemeConstants_h 1.12 +#define nsUXThemeConstants_h 1.13 + 1.14 +/* 1.15 + * The following constants are used to determine how a widget is drawn using 1.16 + * Windows' Theme API. For more information on theme parts and states see 1.17 + * http://msdn.microsoft.com/en-us/library/bb773210(VS.85).aspx 1.18 + */ 1.19 + 1.20 +#include <vssym32.h> 1.21 +#include <vsstyle.h> 1.22 + 1.23 +#define THEME_COLOR 204 1.24 +#define THEME_FONT 210 1.25 + 1.26 +// Generic state constants 1.27 +#define TS_NORMAL 1 1.28 +#define TS_HOVER 2 1.29 +#define TS_ACTIVE 3 1.30 +#define TS_DISABLED 4 1.31 +#define TS_FOCUSED 5 1.32 + 1.33 +// These constants are reversed for the trackbar (scale) thumb 1.34 +#define TKP_FOCUSED 4 1.35 +#define TKP_DISABLED 5 1.36 + 1.37 +// Toolbarbutton constants 1.38 +#define TB_CHECKED 5 1.39 +#define TB_HOVER_CHECKED 6 1.40 + 1.41 +// Button constants 1.42 +#define BP_BUTTON 1 1.43 +#define BP_RADIO 2 1.44 +#define BP_CHECKBOX 3 1.45 +#define BP_GROUPBOX 4 1.46 + 1.47 +// Textfield constants 1.48 +/* This is the EP_EDITTEXT part */ 1.49 +#define TFP_TEXTFIELD 1 1.50 +#define TFP_EDITBORDER_NOSCROLL 6 1.51 +#define TFS_READONLY 6 1.52 + 1.53 +/* These are the state constants for the EDITBORDER parts */ 1.54 +#define TFS_EDITBORDER_NORMAL 1 1.55 +#define TFS_EDITBORDER_HOVER 2 1.56 +#define TFS_EDITBORDER_FOCUSED 3 1.57 +#define TFS_EDITBORDER_DISABLED 4 1.58 + 1.59 +// Treeview/listbox constants 1.60 +#define TREEVIEW_BODY 1 1.61 + 1.62 +// Scrollbar constants 1.63 +#define SP_BUTTON 1 1.64 +#define SP_THUMBHOR 2 1.65 +#define SP_THUMBVERT 3 1.66 +#define SP_TRACKSTARTHOR 4 1.67 +#define SP_TRACKENDHOR 5 1.68 +#define SP_TRACKSTARTVERT 6 1.69 +#define SP_TRACKENDVERT 7 1.70 +#define SP_GRIPPERHOR 8 1.71 +#define SP_GRIPPERVERT 9 1.72 + 1.73 +// Vista only; implict hover state. 1.74 +// BASE + 0 = UP, + 1 = DOWN, etc. 1.75 +#define SP_BUTTON_IMPLICIT_HOVER_BASE 17 1.76 + 1.77 +// Scale constants 1.78 +#define TKP_TRACK 1 1.79 +#define TKP_TRACKVERT 2 1.80 +#define TKP_THUMB 3 1.81 +#define TKP_THUMBBOTTOM 4 1.82 +#define TKP_THUMBTOP 5 1.83 +#define TKP_THUMBVERT 6 1.84 +#define TKP_THUMBLEFT 7 1.85 +#define TKP_THUMBRIGHT 8 1.86 + 1.87 +// Track state contstants 1.88 +#define TRS_NORMAL 1 1.89 + 1.90 +// Track vertical state constants 1.91 +#define TRVS_NORMAL 1 1.92 + 1.93 +// Spin constants 1.94 +#define SPNP_UP 1 1.95 +#define SPNP_DOWN 2 1.96 + 1.97 +// Tab constants 1.98 +#define TABP_TAB 4 1.99 +#define TABP_TAB_SELECTED 5 1.100 +#define TABP_PANELS 9 1.101 +#define TABP_PANEL 10 1.102 + 1.103 +// Tooltip constants 1.104 +#define TTP_STANDARD 1 1.105 + 1.106 +// Dropdown constants 1.107 +#define CBP_DROPMARKER 1 1.108 +#define CBP_DROPBORDER 4 1.109 +/* This is actually the 'READONLY' style */ 1.110 +#define CBP_DROPFRAME 5 1.111 +#define CBP_DROPMARKER_VISTA 6 1.112 + 1.113 +// Menu Constants 1.114 +#define MENU_BARBACKGROUND 7 1.115 +#define MENU_BARITEM 8 1.116 +#define MENU_POPUPBACKGROUND 9 1.117 +#define MENU_POPUPBORDERS 10 1.118 +#define MENU_POPUPCHECK 11 1.119 +#define MENU_POPUPCHECKBACKGROUND 12 1.120 +#define MENU_POPUPGUTTER 13 1.121 +#define MENU_POPUPITEM 14 1.122 +#define MENU_POPUPSEPARATOR 15 1.123 +#define MENU_POPUPSUBMENU 16 1.124 +#define MENU_SYSTEMCLOSE 17 1.125 +#define MENU_SYSTEMMAXIMIZE 18 1.126 +#define MENU_SYSTEMMINIMIZE 19 1.127 +#define MENU_SYSTEMRESTORE 20 1.128 + 1.129 +#define MB_ACTIVE 1 1.130 +#define MB_INACTIVE 2 1.131 + 1.132 +#define MS_NORMAL 1 1.133 +#define MS_SELECTED 2 1.134 +#define MS_DEMOTED 3 1.135 + 1.136 +#define MBI_NORMAL 1 1.137 +#define MBI_HOT 2 1.138 +#define MBI_PUSHED 3 1.139 +#define MBI_DISABLED 4 1.140 +#define MBI_DISABLEDHOT 5 1.141 +#define MBI_DISABLEDPUSHED 6 1.142 + 1.143 +#define MC_CHECKMARKNORMAL 1 1.144 +#define MC_CHECKMARKDISABLED 2 1.145 +#define MC_BULLETNORMAL 3 1.146 +#define MC_BULLETDISABLED 4 1.147 + 1.148 +#define MCB_DISABLED 1 1.149 +#define MCB_NORMAL 2 1.150 +#define MCB_BITMAP 3 1.151 + 1.152 +#define MPI_NORMAL 1 1.153 +#define MPI_HOT 2 1.154 +#define MPI_DISABLED 3 1.155 +#define MPI_DISABLEDHOT 4 1.156 + 1.157 +#define MSM_NORMAL 1 1.158 +#define MSM_DISABLED 2 1.159 + 1.160 +// Rebar constants 1.161 +#define RP_BAND 3 1.162 +#define RP_BACKGROUND 6 1.163 + 1.164 +// Constants only found in new (98+, 2K+, XP+, etc.) Windows. 1.165 +#ifdef DFCS_HOT 1.166 +#undef DFCS_HOT 1.167 +#endif 1.168 +#define DFCS_HOT 0x00001000 1.169 + 1.170 +#ifdef COLOR_MENUHILIGHT 1.171 +#undef COLOR_MENUHILIGHT 1.172 +#endif 1.173 +#define COLOR_MENUHILIGHT 29 1.174 + 1.175 +#ifdef SPI_GETFLATMENU 1.176 +#undef SPI_GETFLATMENU 1.177 +#endif 1.178 +#define SPI_GETFLATMENU 0x1022 1.179 +#ifndef SPI_GETMENUSHOWDELAY 1.180 +#define SPI_GETMENUSHOWDELAY 106 1.181 +#endif //SPI_GETMENUSHOWDELAY 1.182 +#ifndef WS_EX_LAYOUTRTL 1.183 +#define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring 1.184 +#endif 1.185 + 1.186 + 1.187 +// Our extra constants for passing a little bit more info to the renderer. 1.188 +#define DFCS_RTL 0x00010000 1.189 + 1.190 +// Toolbar separator dimension which can't be gotten from Windows 1.191 +#define TB_SEPARATOR_HEIGHT 2 1.192 + 1.193 +namespace mozilla { 1.194 +namespace widget { 1.195 +namespace themeconst { 1.196 + 1.197 +// Pulled from sdk/include/vsstyle.h 1.198 +enum { 1.199 + WP_CAPTION = 1, 1.200 + WP_SMALLCAPTION = 2, 1.201 + WP_MINCAPTION = 3, 1.202 + WP_SMALLMINCAPTION = 4, 1.203 + WP_MAXCAPTION = 5, 1.204 + WP_SMALLMAXCAPTION = 6, 1.205 + WP_FRAMELEFT = 7, 1.206 + WP_FRAMERIGHT = 8, 1.207 + WP_FRAMEBOTTOM = 9, 1.208 + WP_SMALLFRAMELEFT = 10, 1.209 + WP_SMALLFRAMERIGHT = 11, 1.210 + WP_SMALLFRAMEBOTTOM = 12, 1.211 + WP_SYSBUTTON = 13, 1.212 + WP_MDISYSBUTTON = 14, 1.213 + WP_MINBUTTON = 15, 1.214 + WP_MDIMINBUTTON = 16, 1.215 + WP_MAXBUTTON = 17, 1.216 + WP_CLOSEBUTTON = 18, 1.217 + WP_SMALLCLOSEBUTTON = 19, 1.218 + WP_MDICLOSEBUTTON = 20, 1.219 + WP_RESTOREBUTTON = 21, 1.220 + WP_MDIRESTOREBUTTON = 22, 1.221 + WP_HELPBUTTON = 23, 1.222 + WP_MDIHELPBUTTON = 24, 1.223 + WP_HORZSCROLL = 25, 1.224 + WP_HORZTHUMB = 26, 1.225 + WP_VERTSCROLL = 27, 1.226 + WP_VERTTHUMB = 28, 1.227 + WP_DIALOG = 29, 1.228 + WP_CAPTIONSIZINGTEMPLATE = 30, 1.229 + WP_SMALLCAPTIONSIZINGTEMPLATE = 31, 1.230 + WP_FRAMELEFTSIZINGTEMPLATE = 32, 1.231 + WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33, 1.232 + WP_FRAMERIGHTSIZINGTEMPLATE = 34, 1.233 + WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35, 1.234 + WP_FRAMEBOTTOMSIZINGTEMPLATE = 36, 1.235 + WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37, 1.236 + WP_FRAME = 38 1.237 +}; 1.238 + 1.239 +enum FRAMESTATES { 1.240 + FS_ACTIVE = 1, 1.241 + FS_INACTIVE = 2 1.242 +}; 1.243 + 1.244 +enum { 1.245 + BS_NORMAL = 1, 1.246 + BS_HOT = 2, 1.247 + BS_PUSHED = 3, 1.248 + BS_DISABLED = 4, 1.249 + BS_INACTIVE = 5 /* undocumented, inactive caption button */ 1.250 +}; 1.251 + 1.252 +}}} // mozilla::widget::themeconst 1.253 + 1.254 +#endif