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

Side by Side Diff: xfa/fwl/lightwidget/theme.cpp

Issue 1830323006: Remove FX_DWORD from XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/fwl/lightwidget/scrollbar.cpp ('k') | xfa/fwl/lightwidget/widget.cpp » ('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 #include "xfa/include/fwl/lightwidget/theme.h" 7 #include "xfa/include/fwl/lightwidget/theme.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 std::unique_ptr<CFWL_WidgetTP>(new CFWL_MonthCalendarTP)); 42 std::unique_ptr<CFWL_WidgetTP>(new CFWL_MonthCalendarTP));
43 m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_CaretTP)); 43 m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_CaretTP));
44 } 44 }
45 45
46 CFWL_Theme::~CFWL_Theme() {} 46 CFWL_Theme::~CFWL_Theme() {}
47 47
48 FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { 48 FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) {
49 return !!GetTheme(pWidget); 49 return !!GetTheme(pWidget);
50 } 50 }
51 51
52 FX_DWORD CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) { 52 uint32_t CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) {
53 return GetTheme(pWidget)->GetThemeID(pWidget); 53 return GetTheme(pWidget)->GetThemeID(pWidget);
54 } 54 }
55 55
56 FX_DWORD CFWL_Theme::SetThemeID(IFWL_Widget* pWidget, 56 uint32_t CFWL_Theme::SetThemeID(IFWL_Widget* pWidget,
57 FX_DWORD dwThemeID, 57 uint32_t dwThemeID,
58 FX_BOOL bChildren) { 58 FX_BOOL bChildren) {
59 FX_DWORD dwID; 59 uint32_t dwID;
60 for (const auto& pTheme : m_ThemesArray) { 60 for (const auto& pTheme : m_ThemesArray) {
61 dwID = pTheme->GetThemeID(pWidget); 61 dwID = pTheme->GetThemeID(pWidget);
62 pTheme->SetThemeID(pWidget, dwThemeID, FALSE); 62 pTheme->SetThemeID(pWidget, dwThemeID, FALSE);
63 } 63 }
64 return dwID; 64 return dwID;
65 } 65 }
66 66
67 FWL_ERR CFWL_Theme::GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { 67 FWL_ERR CFWL_Theme::GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) {
68 return FWL_ERR_Succeeded; 68 return FWL_ERR_Succeeded;
69 } 69 }
70 70
71 FWL_ERR CFWL_Theme::SetThemeMatrix(IFWL_Widget* pWidget, 71 FWL_ERR CFWL_Theme::SetThemeMatrix(IFWL_Widget* pWidget,
72 const CFX_Matrix& matrix) { 72 const CFX_Matrix& matrix) {
73 return FWL_ERR_Succeeded; 73 return FWL_ERR_Succeeded;
74 } 74 }
75 75
76 FX_BOOL CFWL_Theme::DrawBackground(CFWL_ThemeBackground* pParams) { 76 FX_BOOL CFWL_Theme::DrawBackground(CFWL_ThemeBackground* pParams) {
77 return GetTheme(pParams->m_pWidget)->DrawBackground(pParams); 77 return GetTheme(pParams->m_pWidget)->DrawBackground(pParams);
78 } 78 }
79 79
80 FX_BOOL CFWL_Theme::DrawText(CFWL_ThemeText* pParams) { 80 FX_BOOL CFWL_Theme::DrawText(CFWL_ThemeText* pParams) {
81 return GetTheme(pParams->m_pWidget)->DrawText(pParams); 81 return GetTheme(pParams->m_pWidget)->DrawText(pParams);
82 } 82 }
83 83
84 void* CFWL_Theme::GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity) { 84 void* CFWL_Theme::GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity) {
85 return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity); 85 return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity);
86 } 86 }
87 87
88 FX_BOOL CFWL_Theme::IsCustomizedLayout(IFWL_Widget* pWidget) { 88 FX_BOOL CFWL_Theme::IsCustomizedLayout(IFWL_Widget* pWidget) {
89 return GetTheme(pWidget)->IsCustomizedLayout(pWidget); 89 return GetTheme(pWidget)->IsCustomizedLayout(pWidget);
90 } 90 }
91 91
92 FWL_ERR CFWL_Theme::GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) { 92 FWL_ERR CFWL_Theme::GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) {
93 return GetTheme(pThemePart->m_pWidget)->GetPartRect(pThemePart, rtPart); 93 return GetTheme(pThemePart->m_pWidget)->GetPartRect(pThemePart, rtPart);
94 } 94 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return FWL_ERR_Succeeded; 129 return FWL_ERR_Succeeded;
130 } 130 }
131 131
132 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) { 132 CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) {
133 for (const auto& pTheme : m_ThemesArray) { 133 for (const auto& pTheme : m_ThemesArray) {
134 if (pTheme->IsValidWidget(pWidget)) 134 if (pTheme->IsValidWidget(pWidget))
135 return pTheme.get(); 135 return pTheme.get();
136 } 136 }
137 return nullptr; 137 return nullptr;
138 } 138 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/scrollbar.cpp ('k') | xfa/fwl/lightwidget/widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698