Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: xfa/include/fwl/theme/utils.h

Issue 1835703002: Remove FX_DWORD from XFA, part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/include/fwl/theme/scrollbartp.h ('k') | xfa/include/fwl/theme/widgettp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_INCLUDE_FWL_THEME_UTILS_H_ 7 #ifndef XFA_INCLUDE_FWL_THEME_UTILS_H_
8 #define XFA_INCLUDE_FWL_THEME_UTILS_H_ 8 #define XFA_INCLUDE_FWL_THEME_UTILS_H_
9 9
10 #include "core/fxcrt/include/fx_system.h" 10 #include "core/fxcrt/include/fx_system.h"
(...skipping 11 matching lines...) Expand all
22 FWLTHEME_STATE_Disabale 22 FWLTHEME_STATE_Disabale
23 }; 23 };
24 enum FWLTHEME_DIRECTION { 24 enum FWLTHEME_DIRECTION {
25 FWLTHEME_DIRECTION_Up = 0, 25 FWLTHEME_DIRECTION_Up = 0,
26 FWLTHEME_DIRECTION_Down, 26 FWLTHEME_DIRECTION_Down,
27 FWLTHEME_DIRECTION_Left, 27 FWLTHEME_DIRECTION_Left,
28 FWLTHEME_DIRECTION_Right 28 FWLTHEME_DIRECTION_Right
29 }; 29 };
30 struct FWLCOLOR { 30 struct FWLCOLOR {
31 union { 31 union {
32 FX_DWORD color; 32 uint32_t color;
33 struct { 33 struct {
34 uint8_t b; 34 uint8_t b;
35 uint8_t g; 35 uint8_t g;
36 uint8_t r; 36 uint8_t r;
37 uint8_t a; 37 uint8_t a;
38 }; 38 };
39 }; 39 };
40 40
41 FWLCOLOR() : color(0) {} 41 FWLCOLOR() : color(0) {}
42 FWLCOLOR(FX_DWORD c) : color(c) {} 42 FWLCOLOR(uint32_t c) : color(c) {}
43 FWLCOLOR(const FWLCOLOR& c) : color(c.color) {} 43 FWLCOLOR(const FWLCOLOR& c) : color(c.color) {}
44 44
45 bool operator==(const FWLCOLOR& frColor) { return color == frColor.color; } 45 bool operator==(const FWLCOLOR& frColor) { return color == frColor.color; }
46 operator FX_DWORD() { return color; } 46 operator uint32_t() { return color; }
47 }; 47 };
48 #define FWLTHEME_BEZIER FX_BEZIER 48 #define FWLTHEME_BEZIER FX_BEZIER
49 #define FWLTHEME_PI FX_PI 49 #define FWLTHEME_PI FX_PI
50 #define FWLTHEME_PI_2_1 (FX_PI / 2.0f) 50 #define FWLTHEME_PI_2_1 (FX_PI / 2.0f)
51 #define FWLTHEME_PI_2_3 (3.0f * FX_PI / 2.0f) 51 #define FWLTHEME_PI_2_3 (3.0f * FX_PI / 2.0f)
52 #define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153)) 52 #define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153))
53 #define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100)) 53 #define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100))
54 #define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226)) 54 #define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226))
55 #define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255)) 55 #define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255))
56 #define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216)) 56 #define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216))
57 #define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218)) 57 #define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218))
58 #define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112)) 58 #define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112))
59 #ifdef THEME_XPSimilar 59 #ifdef THEME_XPSimilar
60 #define FWLTHEME_CAPACITY_EdgeFlat 2.0f 60 #define FWLTHEME_CAPACITY_EdgeFlat 2.0f
61 #else 61 #else
62 #define FWLTHEME_CAPACITY_EdgeFlat 0.0f 62 #define FWLTHEME_CAPACITY_EdgeFlat 0.0f
63 #endif 63 #endif
64 #define FWLTHEME_CAPACITY_EdgeRaised 2.0f 64 #define FWLTHEME_CAPACITY_EdgeRaised 2.0f
65 #define FWLTHEME_CAPACITY_EdgeSunken 2.0f 65 #define FWLTHEME_CAPACITY_EdgeSunken 2.0f
66 #define FWLTHEME_CAPACITY_FontSize 12.0f 66 #define FWLTHEME_CAPACITY_FontSize 12.0f
67 #define FWLTHEME_CAPACITY_LineHeight 12.0f 67 #define FWLTHEME_CAPACITY_LineHeight 12.0f
68 #define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0)) 68 #define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0))
69 #define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218)) 69 #define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218))
70 #define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153)) 70 #define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153))
71 #define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f 71 #define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f
72 #define FWLTHEME_CAPACITY_CXBorder 1.0f 72 #define FWLTHEME_CAPACITY_CXBorder 1.0f
73 #define FWLTHEME_CAPACITY_CYBorder 1.0f 73 #define FWLTHEME_CAPACITY_CYBorder 1.0f
74 74
75 #endif // XFA_INCLUDE_FWL_THEME_UTILS_H_ 75 #endif // XFA_INCLUDE_FWL_THEME_UTILS_H_
OLDNEW
« no previous file with comments | « xfa/include/fwl/theme/scrollbartp.h ('k') | xfa/include/fwl/theme/widgettp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698