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" |
11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
12 | 12 |
13 using FX_HWND = void*; | |
14 using FX_HMENU = void*; | |
15 using TimerCallback = void (*)(int32_t idEvent); | 13 using TimerCallback = void (*)(int32_t idEvent); |
16 | 14 |
17 struct FX_SYSTEMTIME { | 15 struct FX_SYSTEMTIME { |
18 FX_SYSTEMTIME() | 16 FX_SYSTEMTIME() |
19 : wYear(0), | 17 : wYear(0), |
20 wMonth(0), | 18 wMonth(0), |
21 wDayOfWeek(0), | 19 wDayOfWeek(0), |
22 wDay(0), | 20 wDay(0), |
23 wHour(0), | 21 wHour(0), |
24 wMinute(0), | 22 wMinute(0), |
(...skipping 11 matching lines...) Expand all Loading... |
36 }; | 34 }; |
37 | 35 |
38 // Cursor style. These must match the values in public/fpdf_formfill.h | 36 // Cursor style. These must match the values in public/fpdf_formfill.h |
39 #define FXCT_ARROW 0 | 37 #define FXCT_ARROW 0 |
40 #define FXCT_NESW 1 | 38 #define FXCT_NESW 1 |
41 #define FXCT_NWSE 2 | 39 #define FXCT_NWSE 2 |
42 #define FXCT_VBEAM 3 | 40 #define FXCT_VBEAM 3 |
43 #define FXCT_HBEAM 4 | 41 #define FXCT_HBEAM 4 |
44 #define FXCT_HAND 5 | 42 #define FXCT_HAND 5 |
45 | 43 |
| 44 class CFFL_FormFiller; |
46 class CPDF_Document; | 45 class CPDF_Document; |
47 class CPDF_Font; | 46 class CPDF_Font; |
48 class CPDFSDK_Environment; | 47 class CPDFSDK_Environment; |
| 48 class CPDFSDK_Widget; |
49 | 49 |
50 class CFX_SystemHandler { | 50 class CFX_SystemHandler { |
51 public: | 51 public: |
52 explicit CFX_SystemHandler(CPDFSDK_Environment* pEnv) : m_pEnv(pEnv) {} | 52 explicit CFX_SystemHandler(CPDFSDK_Environment* pEnv) : m_pEnv(pEnv) {} |
53 ~CFX_SystemHandler() {} | 53 ~CFX_SystemHandler() {} |
54 | 54 |
55 void InvalidateRect(FX_HWND hWnd, FX_RECT rect); | 55 void InvalidateRect(CPDFSDK_Widget* widget, FX_RECT rect); |
56 void OutputSelectedRect(void* pFormFiller, CFX_FloatRect& rect); | 56 void OutputSelectedRect(CFFL_FormFiller* pFormFiller, CFX_FloatRect& rect); |
57 bool IsSelectionImplemented() const; | 57 bool IsSelectionImplemented() const; |
58 | 58 |
59 void SetCursor(int32_t nCursorType); | 59 void SetCursor(int32_t nCursorType); |
60 | 60 |
61 bool FindNativeTrueTypeFont(CFX_ByteString sFontFaceName); | 61 bool FindNativeTrueTypeFont(CFX_ByteString sFontFaceName); |
62 CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, | 62 CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, |
63 CFX_ByteString sFontFaceName, | 63 CFX_ByteString sFontFaceName, |
64 uint8_t nCharset); | 64 uint8_t nCharset); |
| 65 |
65 int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc); | 66 int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc); |
66 void KillTimer(int32_t nID); | 67 void KillTimer(int32_t nID); |
| 68 |
67 bool IsSHIFTKeyDown(uint32_t nFlag) const; | 69 bool IsSHIFTKeyDown(uint32_t nFlag) const; |
68 bool IsCTRLKeyDown(uint32_t nFlag) const; | 70 bool IsCTRLKeyDown(uint32_t nFlag) const; |
69 bool IsALTKeyDown(uint32_t nFlag) const; | 71 bool IsALTKeyDown(uint32_t nFlag) const; |
70 | 72 |
71 FX_SYSTEMTIME GetLocalTime(); | |
72 | |
73 private: | 73 private: |
74 CPDFSDK_Environment* const m_pEnv; | 74 CPDFSDK_Environment* const m_pEnv; |
75 }; | 75 }; |
76 | 76 |
77 #endif // FPDFSDK_CFX_SYSTEMHANDLER_H_ | 77 #endif // FPDFSDK_CFX_SYSTEMHANDLER_H_ |
OLD | NEW |