OLD | NEW |
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_FDE_CSS_FDE_CSS_H_ | 7 #ifndef XFA_FDE_CSS_FDE_CSS_H_ |
8 #define XFA_FDE_CSS_FDE_CSS_H_ | 8 #define XFA_FDE_CSS_FDE_CSS_H_ |
9 | 9 |
10 #include "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 uint16_t wCodePage, | 452 uint16_t wCodePage, |
453 uint32_t dwMediaList = FDE_CSSMEDIATYPE_ALL); | 453 uint32_t dwMediaList = FDE_CSSMEDIATYPE_ALL); |
454 virtual FX_BOOL GetUrl(CFX_WideString& szUrl) = 0; | 454 virtual FX_BOOL GetUrl(CFX_WideString& szUrl) = 0; |
455 virtual uint32_t GetMediaList() const = 0; | 455 virtual uint32_t GetMediaList() const = 0; |
456 virtual uint16_t GetCodePage() const = 0; | 456 virtual uint16_t GetCodePage() const = 0; |
457 | 457 |
458 virtual int32_t CountRules() const = 0; | 458 virtual int32_t CountRules() const = 0; |
459 virtual IFDE_CSSRule* GetRule(int32_t index) = 0; | 459 virtual IFDE_CSSRule* GetRule(int32_t index) = 0; |
460 }; | 460 }; |
461 typedef CFX_ArrayTemplate<IFDE_CSSStyleSheet*> CFDE_CSSStyleSheetArray; | 461 typedef CFX_ArrayTemplate<IFDE_CSSStyleSheet*> CFDE_CSSStyleSheetArray; |
462 #define FDE_CSSUSERSTYLESHEET (FX_BSTRC("#USERSHEET")) | 462 |
463 #define FDE_CSSUAGENTSTYLESHEET (FX_BSTRC("#AGENTSHEET")) | |
464 class IFDE_CSSStyleSheetCache { | 463 class IFDE_CSSStyleSheetCache { |
465 public: | 464 public: |
466 static IFDE_CSSStyleSheetCache* Create(); | 465 static IFDE_CSSStyleSheetCache* Create(); |
467 virtual ~IFDE_CSSStyleSheetCache() {} | 466 virtual ~IFDE_CSSStyleSheetCache() {} |
468 virtual void Release() = 0; | 467 virtual void Release() = 0; |
469 virtual void SetMaxItems(int32_t iMaxCount = 5) = 0; | 468 virtual void SetMaxItems(int32_t iMaxCount = 5) = 0; |
470 virtual void AddStyleSheet(const CFX_ByteStringC& szKey, | 469 virtual void AddStyleSheet(const CFX_ByteStringC& szKey, |
471 IFDE_CSSStyleSheet* pStyleSheet) = 0; | 470 IFDE_CSSStyleSheet* pStyleSheet) = 0; |
472 virtual IFDE_CSSStyleSheet* GetStyleSheet( | 471 virtual IFDE_CSSStyleSheet* GetStyleSheet( |
473 const CFX_ByteStringC& szKey) const = 0; | 472 const CFX_ByteStringC& szKey) const = 0; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 IFDE_CSSTagProvider* pTag, | 1072 IFDE_CSSTagProvider* pTag, |
1074 CFDE_CSSDeclarationArray& matchedDecls, | 1073 CFDE_CSSDeclarationArray& matchedDecls, |
1075 FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE) = 0; | 1074 FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE) = 0; |
1076 virtual void ComputeStyle(IFDE_CSSTagProvider* pTag, | 1075 virtual void ComputeStyle(IFDE_CSSTagProvider* pTag, |
1077 const IFDE_CSSDeclaration** ppDeclArray, | 1076 const IFDE_CSSDeclaration** ppDeclArray, |
1078 int32_t iDeclCount, | 1077 int32_t iDeclCount, |
1079 IFDE_CSSComputedStyle* pDestStyle) = 0; | 1078 IFDE_CSSComputedStyle* pDestStyle) = 0; |
1080 }; | 1079 }; |
1081 | 1080 |
1082 #endif // XFA_FDE_CSS_FDE_CSS_H_ | 1081 #endif // XFA_FDE_CSS_FDE_CSS_H_ |
OLD | NEW |