| 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 FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ |
| 8 #define FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ | 8 #define FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ |
| 9 | 9 |
| 10 typedef void*» » » » FX_HWND; | 10 typedef void* FX_HWND; |
| 11 typedef void*» » » » FX_HMENU; | 11 typedef void* FX_HMENU; |
| 12 typedef void» » » » » (*TimerCallback)(int32_t idEvent
); | 12 typedef void (*TimerCallback)(int32_t idEvent); |
| 13 | 13 |
| 14 typedef struct _FX_SYSTEMTIME | 14 typedef struct _FX_SYSTEMTIME { |
| 15 { | 15 _FX_SYSTEMTIME() |
| 16 _FX_SYSTEMTIME() | |
| 17 : wYear(0), | 16 : wYear(0), |
| 18 wMonth(0), | 17 wMonth(0), |
| 19 wDayOfWeek(0), | 18 wDayOfWeek(0), |
| 20 wDay(0), | 19 wDay(0), |
| 21 wHour(0), | 20 wHour(0), |
| 22 wMinute(0), | 21 wMinute(0), |
| 23 wSecond(0), | 22 wSecond(0), |
| 24 wMilliseconds(0) {} | 23 wMilliseconds(0) {} |
| 25 FX_WORD wYear; | 24 FX_WORD wYear; |
| 26 FX_WORD wMonth; | 25 FX_WORD wMonth; |
| 27 FX_WORD wDayOfWeek; | 26 FX_WORD wDayOfWeek; |
| 28 FX_WORD wDay; | 27 FX_WORD wDay; |
| 29 FX_WORD wHour; | 28 FX_WORD wHour; |
| 30 FX_WORD wMinute; | 29 FX_WORD wMinute; |
| 31 FX_WORD wSecond; | 30 FX_WORD wSecond; |
| 32 FX_WORD wMilliseconds; | 31 FX_WORD wMilliseconds; |
| 33 }FX_SYSTEMTIME; | 32 } FX_SYSTEMTIME; |
| 34 | 33 |
| 35 //cursor style | 34 // cursor style |
| 36 #define FXCT_ARROW» » » » 0 | 35 #define FXCT_ARROW 0 |
| 37 #define FXCT_NESW» » » » 1 | 36 #define FXCT_NESW 1 |
| 38 #define FXCT_NWSE» » » » 2 | 37 #define FXCT_NWSE 2 |
| 39 #define FXCT_VBEAM» » » » 3 | 38 #define FXCT_VBEAM 3 |
| 40 #define FXCT_HBEAM» » » » 4 | 39 #define FXCT_HBEAM 4 |
| 41 #define FXCT_HAND» » » » 5 | 40 #define FXCT_HAND 5 |
| 42 | 41 |
| 43 class IFX_SystemHandler | 42 class IFX_SystemHandler { |
| 44 { | 43 public: |
| 45 public: | 44 virtual ~IFX_SystemHandler() {} |
| 46 » virtual ~IFX_SystemHandler() {} | 45 virtual void InvalidateRect(FX_HWND hWnd, FX_RECT rect) = 0; |
| 47 » virtual void» » » » InvalidateRect(FX_HWND hWnd, FX_
RECT rect) = 0; | 46 virtual void OutputSelectedRect(void* pFormFiller, CPDF_Rect& rect) = 0; |
| 48 virtual void» » » » OutputSelectedRect(void* pFormFi
ller, CPDF_Rect&rect) = 0; | |
| 49 | 47 |
| 50 » virtual FX_BOOL»» » » IsSelectionImplemented() = 0; | 48 virtual FX_BOOL IsSelectionImplemented() = 0; |
| 51 | 49 |
| 52 » virtual CFX_WideString» » GetClipboardText(FX_HWND hWnd) = 0; | 50 virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0; |
| 53 » virtual FX_BOOL»» » » SetClipboardText(FX_HWND hWnd, C
FX_WideString string) = 0; | 51 virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0; |
| 54 | 52 |
| 55 » virtual void» » » » ClientToScreen(FX_HWND hWnd, int
32_t& x, int32_t& y) = 0; | 53 virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) = 0; |
| 56 » virtual void» » » » ScreenToClient(FX_HWND hWnd, int
32_t& x, int32_t& y) = 0; | 54 virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) = 0; |
| 57 | 55 |
| 58 » /*cursor style | 56 /*cursor style |
| 59 » FXCT_ARROW | 57 FXCT_ARROW |
| 60 » FXCT_NESW | 58 FXCT_NESW |
| 61 » FXCT_NWSE | 59 FXCT_NWSE |
| 62 » FXCT_VBEAM | 60 FXCT_VBEAM |
| 63 » FXCT_HBEAM | 61 FXCT_HBEAM |
| 64 » FXCT_HAND | 62 FXCT_HAND |
| 65 » */ | 63 */ |
| 66 » virtual void» » » » SetCursor(int32_t nCursorType) =
0; | 64 virtual void SetCursor(int32_t nCursorType) = 0; |
| 67 | 65 |
| 68 » virtual FX_HMENU» » » CreatePopupMenu() = 0; | 66 virtual FX_HMENU CreatePopupMenu() = 0; |
| 69 » virtual FX_BOOL»» » » AppendMenuItem(FX_HMENU hMenu, i
nt32_t nIDNewItem, CFX_WideString string) = 0; | 67 virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, |
| 70 » virtual FX_BOOL»» » » EnableMenuItem(FX_HMENU hMenu, i
nt32_t nIDItem, FX_BOOL bEnabled) = 0; | 68 int32_t nIDNewItem, |
| 71 » virtual int32_t»» » TrackPopupMenu(FX_HMENU hMenu, int32_t x
, int32_t y, FX_HWND hParent) = 0; | 69 CFX_WideString string) = 0; |
| 72 » virtual void» » » » DestroyMenu(FX_HMENU hMenu) = 0; | 70 virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, |
| 71 int32_t nIDItem, |
| 72 FX_BOOL bEnabled) = 0; |
| 73 virtual int32_t TrackPopupMenu(FX_HMENU hMenu, |
| 74 int32_t x, |
| 75 int32_t y, |
| 76 FX_HWND hParent) = 0; |
| 77 virtual void DestroyMenu(FX_HMENU hMenu) = 0; |
| 73 | 78 |
| 74 » virtual CFX_ByteString» » GetNativeTrueTypeFont(int32_t nCharset)
= 0; | 79 virtual CFX_ByteString GetNativeTrueTypeFont(int32_t nCharset) = 0; |
| 75 » virtual FX_BOOL»» » » FindNativeTrueTypeFont(int32_t n
Charset, CFX_ByteString sFontFaceName) = 0; | 80 virtual FX_BOOL FindNativeTrueTypeFont(int32_t nCharset, |
| 76 » virtual CPDF_Font*» » » AddNativeTrueTypeFontToPDF(CPDF_
Document* pDoc, CFX_ByteString sFontFaceName, uint8_t nCharset) = 0; | 81 CFX_ByteString sFontFaceName) = 0; |
| 82 virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, |
| 83 CFX_ByteString sFontFaceName, |
| 84 uint8_t nCharset) = 0; |
| 77 | 85 |
| 78 » virtual int32_t»» » SetTimer(int32_t uElapse, TimerCallback
lpTimerFunc) = 0; | 86 virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) = 0; |
| 79 » virtual void» » » » KillTimer(int32_t nID) = 0; | 87 virtual void KillTimer(int32_t nID) = 0; |
| 80 | 88 |
| 89 virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) = 0; |
| 90 virtual FX_BOOL IsCTRLKeyDown(FX_DWORD nFlag) = 0; |
| 91 virtual FX_BOOL IsALTKeyDown(FX_DWORD nFlag) = 0; |
| 92 virtual FX_BOOL IsINSERTKeyDown(FX_DWORD nFlag) = 0; |
| 81 | 93 |
| 82 » virtual FX_BOOL»» » » IsSHIFTKeyDown(FX_DWORD nFlag) =
0; | 94 virtual FX_SYSTEMTIME GetLocalTime() = 0; |
| 83 » virtual FX_BOOL»» » » IsCTRLKeyDown(FX_DWORD nFlag) =
0; | |
| 84 » virtual FX_BOOL»» » » IsALTKeyDown(FX_DWORD nFlag) = 0
; | |
| 85 » virtual FX_BOOL»» » » IsINSERTKeyDown(FX_DWORD nFlag)
= 0; | |
| 86 | 95 |
| 87 » virtual»FX_SYSTEMTIME» » GetLocalTime() = 0; | 96 virtual int32_t GetCharSet() = 0; |
| 88 | 97 virtual void SetCharSet(int32_t nCharSet) = 0; |
| 89 » virtual int32_t»» » GetCharSet() = 0; | |
| 90 » virtual void » » » » SetCharSet(int32_t nCharSet) = 0
; | |
| 91 }; | 98 }; |
| 92 | 99 |
| 93 #endif // FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ | 100 #endif // FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ |
| OLD | NEW |