OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 FPDFSDK_CFX_SYSTEMHANDLER_H_ | 7 #ifndef FPDFSDK_CFX_SYSTEMHANDLER_H_ |
8 #define FPDFSDK_CFX_SYSTEMHANDLER_H_ | 8 #define FPDFSDK_CFX_SYSTEMHANDLER_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_coordinates.h" | 10 #include "core/fxcrt/include/fx_coordinates.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #define FXCT_VBEAM 3 | 42 #define FXCT_VBEAM 3 |
43 #define FXCT_HBEAM 4 | 43 #define FXCT_HBEAM 4 |
44 #define FXCT_HAND 5 | 44 #define FXCT_HAND 5 |
45 | 45 |
46 class CPDF_Document; | 46 class CPDF_Document; |
47 class CPDF_Font; | 47 class CPDF_Font; |
48 class CPDFDoc_Environment; | 48 class CPDFDoc_Environment; |
49 | 49 |
50 class CFX_SystemHandler { | 50 class CFX_SystemHandler { |
51 public: | 51 public: |
52 explicit CFX_SystemHandler(CPDFDoc_Environment* pEnv) | 52 explicit CFX_SystemHandler(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv) {} |
53 : m_pEnv(pEnv), m_nCharSet(-1) {} | |
54 ~CFX_SystemHandler() {} | 53 ~CFX_SystemHandler() {} |
55 | 54 |
56 void InvalidateRect(FX_HWND hWnd, FX_RECT rect); | 55 void InvalidateRect(FX_HWND hWnd, FX_RECT rect); |
57 void OutputSelectedRect(void* pFormFiller, CFX_FloatRect& rect); | 56 void OutputSelectedRect(void* pFormFiller, CFX_FloatRect& rect); |
58 bool IsSelectionImplemented() const; | 57 bool IsSelectionImplemented() const; |
59 | 58 |
60 void SetCursor(int32_t nCursorType); | 59 void SetCursor(int32_t nCursorType); |
61 | 60 |
62 bool FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName); | 61 bool FindNativeTrueTypeFont(CFX_ByteString sFontFaceName); |
63 CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, | 62 CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, |
64 CFX_ByteString sFontFaceName, | 63 CFX_ByteString sFontFaceName, |
65 uint8_t nCharset); | 64 uint8_t nCharset); |
66 int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc); | 65 int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc); |
67 void KillTimer(int32_t nID); | 66 void KillTimer(int32_t nID); |
68 bool IsSHIFTKeyDown(uint32_t nFlag) const; | 67 bool IsSHIFTKeyDown(uint32_t nFlag) const; |
69 bool IsCTRLKeyDown(uint32_t nFlag) const; | 68 bool IsCTRLKeyDown(uint32_t nFlag) const; |
70 bool IsALTKeyDown(uint32_t nFlag) const; | 69 bool IsALTKeyDown(uint32_t nFlag) const; |
71 | 70 |
72 FX_SYSTEMTIME GetLocalTime(); | 71 FX_SYSTEMTIME GetLocalTime(); |
73 | 72 |
74 int32_t GetCharSet() const { return m_nCharSet; } | |
75 void SetCharSet(int32_t nCharSet) { m_nCharSet = nCharSet; } | |
76 | |
77 private: | 73 private: |
78 CPDFDoc_Environment* const m_pEnv; | 74 CPDFDoc_Environment* const m_pEnv; |
79 int m_nCharSet; | |
80 }; | 75 }; |
81 | 76 |
82 #endif // FPDFSDK_CFX_SYSTEMHANDLER_H_ | 77 #endif // FPDFSDK_CFX_SYSTEMHANDLER_H_ |
OLD | NEW |