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

Unified Diff: fpdfsdk/cfx_systemhandler.h

Issue 1923093002: Remove IFX_SystemHandler. (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 side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/cfx_systemhandler.h
diff --git a/fpdfsdk/cfx_systemhandler.h b/fpdfsdk/cfx_systemhandler.h
new file mode 100644
index 0000000000000000000000000000000000000000..97764639120ee4ffad6953e5cda56ce50510d006
--- /dev/null
+++ b/fpdfsdk/cfx_systemhandler.h
@@ -0,0 +1,84 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef FPDFSDK_CFX_SYSTEMHANDLER_H_
+#define FPDFSDK_CFX_SYSTEMHANDLER_H_
+
+#include "core/fxcrt/include/fx_coordinates.h"
+#include "core/fxcrt/include/fx_system.h"
+
+using FX_HWND = void*;
+using FX_HMENU = void*;
+using TimerCallback = void (*)(int32_t idEvent);
+
+struct FX_SYSTEMTIME {
+ FX_SYSTEMTIME()
+ : wYear(0),
+ wMonth(0),
+ wDayOfWeek(0),
+ wDay(0),
+ wHour(0),
+ wMinute(0),
+ wSecond(0),
+ wMilliseconds(0) {}
+
+ uint16_t wYear;
+ uint16_t wMonth;
+ uint16_t wDayOfWeek;
+ uint16_t wDay;
+ uint16_t wHour;
+ uint16_t wMinute;
+ uint16_t wSecond;
+ uint16_t wMilliseconds;
+};
+
+// Cursor style. These must match the values in public/fpdf_formfill.h
+#define FXCT_ARROW 0
+#define FXCT_NESW 1
+#define FXCT_NWSE 2
+#define FXCT_VBEAM 3
+#define FXCT_HBEAM 4
+#define FXCT_HAND 5
+
+class CPDF_Document;
+class CPDF_Font;
+class CPDFDoc_Environment;
+
+class CFX_SystemHandler {
+ public:
+ explicit CFX_SystemHandler(CPDFDoc_Environment* pEnv)
+ : m_pEnv(pEnv), m_nCharSet(-1) {}
+ ~CFX_SystemHandler() {}
+
+ void InvalidateRect(FX_HWND hWnd, FX_RECT rect);
+ void OutputSelectedRect(void* pFormFiller, CFX_FloatRect& rect);
+ FX_BOOL IsSelectionImplemented();
Tom Sepez 2016/04/26 21:37:17 nit: can this be bool and a const method?
dsinclair 2016/04/27 13:26:08 Done.
+
+ void SetCursor(int32_t nCursorType);
+
+ FX_BOOL FindNativeTrueTypeFont(int32_t nCharset,
+ CFX_ByteString sFontFaceName);
+ CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc,
+ CFX_ByteString sFontFaceName,
+ uint8_t nCharset);
+ int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc);
+ void KillTimer(int32_t nID);
+ FX_BOOL IsSHIFTKeyDown(uint32_t nFlag);
Tom Sepez 2016/04/26 21:37:16 nit: same here.
dsinclair 2016/04/27 13:26:08 Done.
+ FX_BOOL IsCTRLKeyDown(uint32_t nFlag);
+ FX_BOOL IsALTKeyDown(uint32_t nFlag);
+ FX_BOOL IsINSERTKeyDown(uint32_t nFlag);
+
+ FX_SYSTEMTIME GetLocalTime();
+
+ int32_t GetCharSet() { return m_nCharSet; }
Tom Sepez 2016/04/26 21:37:16 nit: I know this is const :)
dsinclair 2016/04/27 13:26:08 Done.
+ void SetCharSet(int32_t nCharSet) { m_nCharSet = nCharSet; }
+
+ private:
+ CPDFDoc_Environment* m_pEnv;
Tom Sepez 2016/04/26 21:37:16 can this be CPDFDOC_Environment* const m_pEnv; ?
dsinclair 2016/04/27 13:26:09 Done.
+ int m_nCharSet;
+};
+
+#endif // FPDFSDK_CFX_SYSTEMHANDLER_H_
« no previous file with comments | « BUILD.gn ('k') | fpdfsdk/cfx_systemhandler.cpp » ('j') | fpdfsdk/pdfwindow/PWL_Edit.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698