summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h4
-rw-r--r--fpdfsdk/include/formfiller/FFL_IFormFiller.h6
-rw-r--r--fpdfsdk/include/formfiller/FFL_Notify.h2
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h16
-rw-r--r--fpdfsdk/include/fsdk_baseform.h14
-rw-r--r--fpdfsdk/include/fx_systemhandler.h28
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h86
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h122
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h90
-rw-r--r--fpdfsdk/include/javascript/Field.h4
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h2
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h2
-rw-r--r--fpdfsdk/include/javascript/JS_GlobalData.h6
-rw-r--r--fpdfsdk/include/javascript/util.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Caret.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h14
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h14
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h34
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h46
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_IconList.h50
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Label.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h22
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListCtrl.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h36
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ScrollBar.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Utils.h36
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h56
28 files changed, 355 insertions, 355 deletions
diff --git a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
index 5e596657ec..a51e9efbe1 100644
--- a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
+++ b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
@@ -29,12 +29,12 @@ public:
void SetAPType(const CFX_ByteString& sAPType);
protected:
- virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset);
+ virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset);
virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
virtual CPDF_Document* GetDocument();
private:
CPDF_Font* FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_ByteString& sFontAlias,
- FX_INT32 nCharset);
+ int32_t nCharset);
CPDF_Font* GetAnnotDefaultFont(CFX_ByteString &csNameTag);
void AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAlias);
diff --git a/fpdfsdk/include/formfiller/FFL_IFormFiller.h b/fpdfsdk/include/formfiller/FFL_IFormFiller.h
index cccf84f7b4..52cf2ee80a 100644
--- a/fpdfsdk/include/formfiller/FFL_IFormFiller.h
+++ b/fpdfsdk/include/formfiller/FFL_IFormFiller.h
@@ -67,15 +67,15 @@ public:
virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
public:
- virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, FX_INT32 & nRet, FX_FLOAT & fPopupRet);
- virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
+ virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet);
+ virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag);
virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) ;
virtual void OnSetWindowRect(void* pPrivateData, const CPDF_Rect & rcWindow);
- virtual void OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode, CFX_WideString & strChange,
+ virtual void OnKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode, CFX_WideString & strChange,
const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit);
public:
diff --git a/fpdfsdk/include/formfiller/FFL_Notify.h b/fpdfsdk/include/formfiller/FFL_Notify.h
index d1f43411ee..ea236defe1 100644
--- a/fpdfsdk/include/formfiller/FFL_Notify.h
+++ b/fpdfsdk/include/formfiller/FFL_Notify.h
@@ -49,7 +49,7 @@ private:
FX_BOOL ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit);
FX_BOOL m_bDoActioning;
- FX_INT32 m_nNotifyFlag;
+ int32_t m_nNotifyFlag;
};
#endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_NOTIFY_H_
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index dbd7e005b7..836190eae2 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -58,14 +58,14 @@ public:
struct FX_DATETIME
{
- FX_SHORT year;
- FX_BYTE month;
- FX_BYTE day;
- FX_BYTE hour;
- FX_BYTE minute;
- FX_BYTE second;
- FX_INT8 tzHour;
- FX_BYTE tzMinute;
+ int16_t year;
+ uint8_t month;
+ uint8_t day;
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
+ int8_t tzHour;
+ uint8_t tzMinute;
}dt;
};
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index 85ab3e6fd1..27ec143b35 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -128,8 +128,8 @@ public:
void ClearAppModified();
FX_BOOL IsAppModified() const;
- FX_INT32 GetAppearanceAge() const;
- FX_INT32 GetValueAge() const;
+ int32_t GetAppearanceAge() const;
+ int32_t GetValueAge() const;
private:
void ResetAppearance_PushButton();
@@ -161,8 +161,8 @@ public:
private:
CPDFSDK_InterForm* m_pInterForm;
FX_BOOL m_bAppModified;
- FX_INT32 m_nAppAge;
- FX_INT32 m_nValueAge;
+ int32_t m_nAppAge;
+ int32_t m_nValueAge;
};
#define CPDFSDK_WidgetMap CFX_MapPtrTemplate<CPDF_FormControl*, CPDFSDK_Widget*>
@@ -245,13 +245,13 @@ private:
public:
FX_BOOL IsNeedHighLight(int nFieldType);
void RemoveAllHighLight();
- void SetHighlightAlpha(FX_BYTE alpha) {m_iHighlightAlpha = alpha;}
- FX_BYTE GetHighlightAlpha() {return m_iHighlightAlpha;}
+ void SetHighlightAlpha(uint8_t alpha) {m_iHighlightAlpha = alpha;}
+ uint8_t GetHighlightAlpha() {return m_iHighlightAlpha;}
void SetHighlightColor(FX_COLORREF clr, int nFieldType);
FX_COLORREF GetHighlightColor(int nFieldType);
private:
FX_COLORREF m_aHighlightColor[6];
- FX_BYTE m_iHighlightAlpha;
+ uint8_t m_iHighlightAlpha;
FX_BOOL m_bNeedHightlight[6];
};
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index f8df723ad0..276019eae5 100644
--- a/fpdfsdk/include/fx_systemhandler.h
+++ b/fpdfsdk/include/fx_systemhandler.h
@@ -9,7 +9,7 @@
typedef FX_LPVOID FX_HWND;
typedef FX_LPVOID FX_HMENU;
-typedef void (*TimerCallback)(FX_INT32 idEvent);
+typedef void (*TimerCallback)(int32_t idEvent);
typedef struct _FX_SYSTEMTIME
{
@@ -52,8 +52,8 @@ public:
virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0;
virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0;
- virtual void ClientToScreen(FX_HWND hWnd, FX_INT32& x, FX_INT32& y) = 0;
- virtual void ScreenToClient(FX_HWND hWnd, FX_INT32& x, FX_INT32& y) = 0;
+ virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
+ virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
/*cursor style
FXCT_ARROW
@@ -63,20 +63,20 @@ public:
FXCT_HBEAM
FXCT_HAND
*/
- virtual void SetCursor(FX_INT32 nCursorType) = 0;
+ virtual void SetCursor(int32_t nCursorType) = 0;
virtual FX_HMENU CreatePopupMenu() = 0;
- virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, FX_INT32 nIDNewItem, CFX_WideString string) = 0;
- virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, FX_INT32 nIDItem, FX_BOOL bEnabled) = 0;
- virtual FX_INT32 TrackPopupMenu(FX_HMENU hMenu, FX_INT32 x, FX_INT32 y, FX_HWND hParent) = 0;
+ virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) = 0;
+ virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, FX_BOOL bEnabled) = 0;
+ virtual int32_t TrackPopupMenu(FX_HMENU hMenu, int32_t x, int32_t y, FX_HWND hParent) = 0;
virtual void DestroyMenu(FX_HMENU hMenu) = 0;
- virtual CFX_ByteString GetNativeTrueTypeFont(FX_INT32 nCharset) = 0;
- virtual FX_BOOL FindNativeTrueTypeFont(FX_INT32 nCharset, CFX_ByteString sFontFaceName) = 0;
- virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, FX_BYTE nCharset) = 0;
+ virtual CFX_ByteString GetNativeTrueTypeFont(int32_t nCharset) = 0;
+ virtual FX_BOOL FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName) = 0;
+ virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, uint8_t nCharset) = 0;
- virtual FX_INT32 SetTimer(FX_INT32 uElapse, TimerCallback lpTimerFunc) = 0;
- virtual void KillTimer(FX_INT32 nID) = 0;
+ virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) = 0;
+ virtual void KillTimer(int32_t nID) = 0;
virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) = 0;
@@ -86,8 +86,8 @@ public:
virtual FX_SYSTEMTIME GetLocalTime() = 0;
- virtual FX_INT32 GetCharSet() = 0;
- virtual void SetCharSet(FX_INT32 nCharSet) = 0;
+ virtual int32_t GetCharSet() = 0;
+ virtual void SetCharSet(int32_t nCharSet) = 0;
};
#endif // FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 31ede0564b..0da6fe6f9e 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -65,15 +65,15 @@ class IFX_Edit_FontMap
public:
virtual ~IFX_Edit_FontMap() { }
//map a fontindex to pdf font.
- virtual CPDF_Font * GetPDFFont(FX_INT32 nFontIndex) = 0;
+ virtual CPDF_Font * GetPDFFont(int32_t nFontIndex) = 0;
//get the alias of a pdf font.
- virtual CFX_ByteString GetPDFFontAlias(FX_INT32 nFontIndex) = 0;
+ virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0;
//get the index of a font that can show a word.
- virtual FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex) = 0;
+ virtual int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex) = 0;
//get the charcode of word from unicode
- virtual FX_INT32 CharCodeFromUnicode(FX_INT32 nFontIndex, FX_WORD word) = 0;
+ virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) = 0;
//get the charset of unicode
- virtual FX_INT32 CharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset) = 0;
+ virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) = 0;
};
class IFX_Edit_Notify
@@ -151,7 +151,7 @@ public:
//get the information of the current section.
virtual FX_BOOL GetSection(CPVT_Section & section) const = 0;
//set the current position.
- virtual void SetAt(FX_INT32 nWordIndex) = 0;
+ virtual void SetAt(int32_t nWordIndex) = 0;
//set the current position.
virtual void SetAt(const CPVT_WordPlace & place) = 0;
//get the current position.
@@ -200,19 +200,19 @@ public:
virtual void SetScrollPos(const CPDF_Point & point) = 0;
//set the horizontal text alignment in text box, nFormat (0:left 1:middle 2:right).
- virtual void SetAlignmentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
//set the vertical text alignment in text box, nFormat (0:top 1:center 2:bottom).
- virtual void SetAlignmentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
//if the text is shown in secret , set a character for substitute.
virtual void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0;
//set the maximal count of words of the text.
- virtual void SetLimitChar(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0;
//if set the count of charArray , then all words is shown in equal space.
- virtual void SetCharArray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) = 0;
//set the space of two characters.
virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0;
//set the horizontal scale of all characters.
- virtual void SetHorzScale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0;
//set the leading of all lines
virtual void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0;
//if set, CRLF is allowed.
@@ -235,11 +235,11 @@ public:
//set the fontsize of selected text.
virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0;
//set the fontindex of selected text, user can change the font of selected text.
- virtual FX_BOOL SetRichFontIndex(FX_INT32 nFontIndex) = 0;
+ virtual FX_BOOL SetRichFontIndex(int32_t nFontIndex) = 0;
//set the textcolor of selected text.
virtual FX_BOOL SetRichTextColor(FX_COLORREF dwColor) = 0;
//set the text script type of selected text. (0:normal 1:superscript 2:subscript)
- virtual FX_BOOL SetRichTextScript(FX_INT32 nScriptType) = 0;
+ virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0;
//set the bold font style of selected text.
virtual FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) = 0;
//set the italic font style of selected text.
@@ -251,25 +251,25 @@ public:
//set the charspace of selected text, in user coordinate.
virtual FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
//set the horizontal scale of selected text, default value is 100.
- virtual FX_BOOL SetRichTextHorzScale(FX_INT32 nHorzScale = 100) = 0;
+ virtual FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
//set the leading of selected section, in user coordinate.
virtual FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
//set the indent of selected section, in user coordinate.
virtual FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
//set the alignment of selected section, nAlignment(0:left 1:middle 2:right)
- virtual FX_BOOL SetRichTextAlignment(FX_INT32 nAlignment) = 0;
+ virtual FX_BOOL SetRichTextAlignment(int32_t nAlignment) = 0;
//set the selected range of text.
//if nStartChar == 0 and nEndChar == -1, select all the text.
- virtual void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar) = 0;
+ virtual void SetSel(int32_t nStartChar,int32_t nEndChar) = 0;
//get the selected range of text.
- virtual void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const = 0;
+ virtual void GetSel(int32_t & nStartChar, int32_t & nEndChar) const = 0;
//select all the text.
virtual void SelectAll() = 0;
//set text is not selected.
virtual void SelectNone() = 0;
//get the caret position.
- virtual FX_INT32 GetCaret() const = 0;
+ virtual int32_t GetCaret() const = 0;
virtual CPVT_WordPlace GetCaretWordPlace() const = 0;
//get the string of selected text.
virtual CFX_WideString GetSelText() const = 0;
@@ -309,14 +309,14 @@ public:
virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//put text into edit.
- virtual void SetText(FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET,
+ virtual void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a word into the edit.
- virtual FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
+ virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a return into the edit.
virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert text into the edit.
- virtual FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET,
+ virtual FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//do backspace operation.
virtual FX_BOOL Backspace() = 0;
@@ -330,7 +330,7 @@ public:
//do Undo operation.
virtual FX_BOOL Undo() = 0;
//move caret
- virtual void SetCaret(FX_INT32 nPos) = 0;
+ virtual void SetCaret(int32_t nPos) = 0;
//arrange all words over again
virtual void Paint() = 0;
@@ -350,9 +350,9 @@ public:
virtual void EnableOprNotify(FX_BOOL bNotify) = 0;
//map word place to word index.
- virtual FX_INT32 WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
+ virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
//map word index to word place.
- virtual CPVT_WordPlace WordIndexToWordPlace(FX_INT32 index) const = 0;
+ virtual CPVT_WordPlace WordIndexToWordPlace(int32_t index) const = 0;
//get the beginning position of a line
virtual CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace & place) const = 0;
@@ -374,9 +374,9 @@ public:
//get the mask character.
virtual FX_WORD GetPasswordChar() const = 0;
//get the count of charArray
- virtual FX_INT32 GetCharArray() const = 0;
+ virtual int32_t GetCharArray() const = 0;
//get the horizontal scale of all characters
- virtual FX_INT32 GetHorzScale() const = 0;
+ virtual int32_t GetHorzScale() const = 0;
//get the space of two characters
virtual FX_FLOAT GetCharSpace() const = 0;
//get the latin words of specified range
@@ -388,7 +388,7 @@ public:
//if the content is changed after settext?
virtual FX_BOOL IsModified() const = 0;
//get the total words in edit
- virtual FX_INT32 GetTotalWords() const = 0;
+ virtual int32_t GetTotalWords() const = 0;
virtual void AddUndoItem(IFX_Edit_UndoItem* pUndoItem) = 0;
@@ -449,29 +449,29 @@ public:
virtual CPDF_Rect GetContentRect() const = 0;
virtual FX_FLOAT GetFontSize() const = 0;
- virtual IFX_Edit* GetItemEdit(FX_INT32 nIndex) const = 0;
- virtual FX_INT32 GetCount() const = 0;
- virtual FX_BOOL IsItemSelected(FX_INT32 nIndex) const = 0;
+ virtual IFX_Edit* GetItemEdit(int32_t nIndex) const = 0;
+ virtual int32_t GetCount() const = 0;
+ virtual FX_BOOL IsItemSelected(int32_t nIndex) const = 0;
virtual FX_FLOAT GetFirstHeight() const = 0;
virtual void SetMultipleSel(FX_BOOL bMultiple) = 0;
virtual FX_BOOL IsMultipleSel() const = 0;
- virtual FX_BOOL IsValid(FX_INT32 nItemIndex) const = 0;
- virtual FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const = 0;
+ virtual FX_BOOL IsValid(int32_t nItemIndex) const = 0;
+ virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const = 0;
virtual void SetScrollPos(const CPDF_Point & point) = 0;
- virtual void ScrollToListItem(FX_INT32 nItemIndex) = 0;
- virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const = 0;
- virtual FX_INT32 GetCaret() const = 0;
- virtual FX_INT32 GetSelect() const = 0;
- virtual FX_INT32 GetTopItem() const = 0;
- virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const = 0;
- virtual FX_INT32 GetFirstSelected() const = 0;
+ virtual void ScrollToListItem(int32_t nItemIndex) = 0;
+ virtual CPDF_Rect GetItemRect(int32_t nIndex) const = 0;
+ virtual int32_t GetCaret() const = 0;
+ virtual int32_t GetSelect() const = 0;
+ virtual int32_t GetTopItem() const = 0;
+ virtual int32_t GetItemIndex(const CPDF_Point & point) const = 0;
+ virtual int32_t GetFirstSelected() const = 0;
virtual void AddString(FX_LPCWSTR string) = 0;
- virtual void SetTopItem(FX_INT32 nIndex) = 0;
- virtual void Select(FX_INT32 nItemIndex) = 0;
- virtual void SetCaret(FX_INT32 nItemIndex) = 0;
+ virtual void SetTopItem(int32_t nIndex) = 0;
+ virtual void Select(int32_t nItemIndex) = 0;
+ virtual void SetCaret(int32_t nItemIndex) = 0;
virtual void Empty() = 0;
virtual void Cancel() = 0;
virtual CFX_WideString GetText() const = 0;
@@ -485,7 +485,7 @@ public:
virtual void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
virtual void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
virtual FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
protected:
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 237aa66b53..6fd7b9a4ee 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -111,7 +111,7 @@ public:
void Empty()
{
- for (FX_INT32 i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
delete m_LineRects.GetAt(i);
m_LineRects.RemoveAll();
@@ -125,7 +125,7 @@ public:
void operator = (CFX_Edit_LineRectArray & rects)
{
Empty();
- for (FX_INT32 i = 0, sz = rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = rects.GetSize(); i < sz; i++)
m_LineRects.Add(rects.GetAt(i));
rects.RemoveAll();
@@ -137,12 +137,12 @@ public:
m_LineRects.Add(pRect);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_LineRects.GetSize();
}
- CFX_Edit_LineRect * GetAt(FX_INT32 nIndex) const
+ CFX_Edit_LineRect * GetAt(int32_t nIndex) const
{
if (nIndex < 0 || nIndex >= m_LineRects.GetSize())
return NULL;
@@ -167,7 +167,7 @@ public:
void Empty()
{
- for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
delete m_Rects.GetAt(i);
this->m_Rects.RemoveAll();
@@ -176,7 +176,7 @@ public:
void Add(const CPDF_Rect & rect)
{
//check for overlaped area
- for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
if (CPDF_Rect * pRect = m_Rects.GetAt(i))
if (pRect->Contains(rect))return;
@@ -184,12 +184,12 @@ public:
m_Rects.Add(pNewRect);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_Rects.GetSize();
}
- CPDF_Rect * GetAt(FX_INT32 nIndex) const
+ CPDF_Rect * GetAt(int32_t nIndex) const
{
if (nIndex < 0 || nIndex >= m_Rects.GetSize())
return NULL;
@@ -209,7 +209,7 @@ public:
void BeginRefresh();
void Push(const CPVT_WordRange & linerange,const CPDF_Rect & rect);
void NoAnalyse();
- void Analyse(FX_INT32 nAlignment);
+ void Analyse(int32_t nAlignment);
void AddRefresh(const CPDF_Rect & rect);
const CFX_Edit_RectArray * GetRefreshRects() const;
void EndRefresh();
@@ -285,7 +285,7 @@ public:
class CFX_Edit_Undo
{
public:
- CFX_Edit_Undo(FX_INT32 nBufsize = 10000);
+ CFX_Edit_Undo(int32_t nBufsize = 10000);
virtual ~CFX_Edit_Undo();
void Undo();
@@ -300,13 +300,13 @@ public:
void Reset();
- IFX_Edit_UndoItem* GetItem(FX_INT32 nIndex);
- FX_INT32 GetItemCount(){return m_UndoItemStack.GetSize();}
- FX_INT32 GetCurUndoPos(){return m_nCurUndoPos;}
+ IFX_Edit_UndoItem* GetItem(int32_t nIndex);
+ int32_t GetItemCount(){return m_UndoItemStack.GetSize();}
+ int32_t GetCurUndoPos(){return m_nCurUndoPos;}
private:
- void SetBufSize(FX_INT32 nSize){m_nBufSize = nSize;}
- FX_INT32 GetBufSize(){return m_nBufSize;}
+ void SetBufSize(int32_t nSize){m_nBufSize = nSize;}
+ int32_t GetBufSize(){return m_nBufSize;}
void RemoveHeads();
void RemoveTails();
@@ -314,8 +314,8 @@ private:
private:
CFX_ArrayTemplate<IFX_Edit_UndoItem*> m_UndoItemStack;
- FX_INT32 m_nCurUndoPos;
- FX_INT32 m_nBufSize;
+ int32_t m_nCurUndoPos;
+ int32_t m_nBufSize;
FX_BOOL m_bModified;
FX_BOOL m_bVirgin;
FX_BOOL m_bWorking;
@@ -362,7 +362,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem
{
public:
CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps);
+ FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps);
virtual ~CFXEU_InsertWord();
void Redo();
@@ -374,7 +374,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_WordProps m_WordProps;
};
@@ -401,7 +401,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem
{
public:
CFXEU_Backspace(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps);
virtual ~CFXEU_Backspace();
@@ -414,7 +414,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -423,7 +423,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem
{
public:
CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd);
virtual ~CFXEU_Delete();
@@ -436,7 +436,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
FX_BOOL m_bSecEnd;
@@ -463,7 +463,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem
public:
CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
const CPVT_WordRange & wrSel,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps);
virtual ~CFXEU_ClearRich();
@@ -477,7 +477,7 @@ private:
CPVT_WordPlace m_wpNew;
CPVT_WordRange m_wrSel;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -486,7 +486,7 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem
{
public:
CFXEU_InsertText(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- const CFX_WideString & swText, FX_INT32 charset,
+ const CFX_WideString & swText, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
virtual ~CFXEU_InsertText();
@@ -499,7 +499,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
CFX_WideString m_swText;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -578,13 +578,13 @@ public:
void SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE);
void SetScrollPos(const CPDF_Point & point);
- void SetAlignmentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE);
- void SetAlignmentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE);
+ void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
+ void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE);
- void SetLimitChar(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE);
- void SetCharArray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE);
+ void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE);
+ void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE);
void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE);
- void SetHorzScale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE);
void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE);
void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE);
@@ -596,18 +596,18 @@ public:
FX_BOOL IsRichText() const;
void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE);
FX_BOOL SetRichFontSize(FX_FLOAT fFontSize);
- FX_BOOL SetRichFontIndex(FX_INT32 nFontIndex);
+ FX_BOOL SetRichFontIndex(int32_t nFontIndex);
FX_BOOL SetRichTextColor(FX_COLORREF dwColor);
- FX_BOOL SetRichTextScript(FX_INT32 nScriptType);
+ FX_BOOL SetRichTextScript(int32_t nScriptType);
FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE);
FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE);
FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE);
FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE);
FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace);
- FX_BOOL SetRichTextHorzScale(FX_INT32 nHorzScale = 100);
+ FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100);
FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading);
FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent);
- FX_BOOL SetRichTextAlignment(FX_INT32 nAlignment);
+ FX_BOOL SetRichTextAlignment(int32_t nAlignment);
void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
@@ -618,24 +618,24 @@ public:
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void SetText(FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET,
+ void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
+ FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Backspace();
FX_BOOL Delete();
FX_BOOL Clear();
FX_BOOL Empty();
- FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET,
+ FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Redo();
FX_BOOL Undo();
- CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, FX_INT32 charset,
+ CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
- FX_INT32 GetCharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset);
+ int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
- FX_INT32 WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
- CPVT_WordPlace WordIndexToWordPlace(FX_INT32 index) const;
+ int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
+ CPVT_WordPlace WordIndexToWordPlace(int32_t index) const;
CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace & place) const;
@@ -643,24 +643,24 @@ public:
CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const;
- FX_INT32 GetCaret() const;
+ int32_t GetCaret() const;
CPVT_WordPlace GetCaretWordPlace() const;
CFX_WideString GetSelText() const;
CFX_WideString GetText() const;
FX_FLOAT GetFontSize() const;
FX_WORD GetPasswordChar() const;
CPDF_Point GetScrollPos() const;
- FX_INT32 GetCharArray() const;
+ int32_t GetCharArray() const;
CPDF_Rect GetPlateRect() const;
CPDF_Rect GetContentRect() const;
CFX_WideString GetRangeText(const CPVT_WordRange & range) const;
- FX_INT32 GetHorzScale() const;
+ int32_t GetHorzScale() const;
FX_FLOAT GetCharSpace() const;
- FX_INT32 GetTotalWords() const;
- FX_INT32 GetTotalLines() const;
+ int32_t GetTotalWords() const;
+ int32_t GetTotalLines() const;
- void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
+ void SetSel(int32_t nStartChar,int32_t nEndChar);
+ void GetSel(int32_t & nStartChar, int32_t & nEndChar) const;
private:
void SelectAll();
@@ -679,14 +679,14 @@ private:
void SetContentChanged();
void EnableNotify(FX_BOOL bNotify);
- void SetText(FX_LPCWSTR text,FX_INT32 charset,
+ void SetText(FX_LPCWSTR text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
+ FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset,
+ FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
@@ -708,7 +708,7 @@ private:
void RefreshPushRandomRects(const CPVT_WordRange & wr);
void RefreshWordRange(const CPVT_WordRange& wr);
- void SetCaret(FX_INT32 nPos);
+ void SetCaret(int32_t nPos);
void SetCaret(const CPVT_WordPlace & place);
void SetCaretInfo();
void SetCaretOrigin();
@@ -756,7 +756,7 @@ private:
CFX_Edit_Refresh m_Refresh;
CPDF_Point m_ptCaret;
CFX_Edit_Undo m_Undo;
- FX_INT32 m_nAlignment;
+ int32_t m_nAlignment;
FX_BOOL m_bNotifyFlag;
FX_BOOL m_bEnableOverflow;
FX_BOOL m_bEnableRefresh;
@@ -785,7 +785,7 @@ public:
FX_BOOL GetWord(CPVT_Word & word) const;
FX_BOOL GetLine(CPVT_Line & line) const;
FX_BOOL GetSection(CPVT_Section & section) const;
- void SetAt(FX_INT32 nWordIndex);
+ void SetAt(int32_t nWordIndex);
void SetAt(const CPVT_WordPlace & place);
const CPVT_WordPlace & GetAt() const;
IFX_Edit* GetEdit() const;
@@ -803,11 +803,11 @@ public:
IFX_Edit_FontMap* GetFontMap();
- FX_INT32 GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle);
- FX_INT32 GetTypeAscent(FX_INT32 nFontIndex);
- FX_INT32 GetTypeDescent(FX_INT32 nFontIndex);
- FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex);
- FX_INT32 GetDefaultFontIndex();
+ int32_t GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle);
+ int32_t GetTypeAscent(int32_t nFontIndex);
+ int32_t GetTypeDescent(int32_t nFontIndex);
+ int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
+ int32_t GetDefaultFontIndex();
FX_BOOL IsLatinWord(FX_WORD word);
private:
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index 5c689ed439..b7888eaf3b 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -209,8 +209,8 @@ template<class TYPE> class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE>
{
public:
FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
- TYPE GetAt(FX_INT32 nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;}
- void RemoveAt(FX_INT32 nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);}
+ TYPE GetAt(int32_t nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;}
+ void RemoveAt(int32_t nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);}
};
class CFX_List : protected CFX_ListContainer , public IFX_List
@@ -227,31 +227,31 @@ public:
virtual CPDF_Rect GetContentRect() const;
virtual FX_FLOAT GetFontSize() const;
- virtual IFX_Edit* GetItemEdit(FX_INT32 nIndex) const;
- virtual FX_INT32 GetCount() const;
- virtual FX_BOOL IsItemSelected(FX_INT32 nIndex) const;
+ virtual IFX_Edit* GetItemEdit(int32_t nIndex) const;
+ virtual int32_t GetCount() const;
+ virtual FX_BOOL IsItemSelected(int32_t nIndex) const;
virtual FX_FLOAT GetFirstHeight() const;
virtual void SetMultipleSel(FX_BOOL bMultiple);
virtual FX_BOOL IsMultipleSel() const;
- virtual FX_BOOL IsValid(FX_INT32 nItemIndex) const;
- virtual FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const;
+ virtual FX_BOOL IsValid(int32_t nItemIndex) const;
+ virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const;
protected:
virtual void Empty();
void AddItem(FX_LPCWSTR str);
- virtual void ReArrange(FX_INT32 nItemIndex);
+ virtual void ReArrange(int32_t nItemIndex);
- virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const;
- CFX_WideString GetItemText(FX_INT32 nIndex) const;
+ virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
+ CFX_WideString GetItemText(int32_t nIndex) const;
- void SetItemSelect(FX_INT32 nItemIndex, FX_BOOL bSelected);
- void SetItemCaret(FX_INT32 nItemIndex, FX_BOOL bCaret);
+ void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
+ void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret);
- virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const;
- FX_INT32 GetFirstSelected() const;
- FX_INT32 GetLastSelected() const;
+ virtual int32_t GetItemIndex(const CPDF_Point & point) const;
+ int32_t GetFirstSelected() const;
+ int32_t GetLastSelected() const;
FX_WCHAR Toupper(FX_WCHAR c) const;
private:
@@ -263,14 +263,14 @@ private:
struct CPLST_Select_Item
{
- CPLST_Select_Item(FX_INT32 nItemIndex,FX_INT32 nState)
+ CPLST_Select_Item(int32_t nItemIndex,int32_t nState)
{
this->nItemIndex = nItemIndex;
this->nState = nState;
}
- FX_INT32 nItemIndex;
- FX_INT32 nState; //0:normal select -1:to deselect 1: to select
+ int32_t nItemIndex;
+ int32_t nState; //0:normal select -1:to deselect 1: to select
};
class CPLST_Select
@@ -280,15 +280,15 @@ public:
virtual ~CPLST_Select();
public:
- void Add(FX_INT32 nItemIndex);
- void Add(FX_INT32 nBeginIndex, FX_INT32 nEndIndex);
- void Sub(FX_INT32 nItemIndex);
- void Sub(FX_INT32 nBeginIndex, FX_INT32 nEndIndex);
- FX_BOOL IsExist(FX_INT32 nItemIndex) const;
- FX_INT32 Find(FX_INT32 nItemIndex) const;
- FX_INT32 GetCount() const;
- FX_INT32 GetItemIndex(FX_INT32 nIndex) const;
- FX_INT32 GetState(FX_INT32 nIndex) const;
+ void Add(int32_t nItemIndex);
+ void Add(int32_t nBeginIndex, int32_t nEndIndex);
+ void Sub(int32_t nItemIndex);
+ void Sub(int32_t nBeginIndex, int32_t nEndIndex);
+ FX_BOOL IsExist(int32_t nItemIndex) const;
+ int32_t Find(int32_t nItemIndex) const;
+ int32_t GetCount() const;
+ int32_t GetItemIndex(int32_t nIndex) const;
+ int32_t GetState(int32_t nIndex) const;
void Done();
void DeselectAll();
@@ -313,7 +313,7 @@ public:
void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK(FX_INT32 nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl);
+ void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl);
FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl);
virtual CPDF_Point InToOut(const CPDF_Point & point) const;
@@ -323,41 +323,41 @@ public:
virtual void SetPlateRect(const CPDF_Rect & rect);
void SetScrollPos(const CPDF_Point & point);
- void ScrollToListItem(FX_INT32 nItemIndex);
- virtual CPDF_Rect GetItemRect(FX_INT32 nIndex) const;
- FX_INT32 GetCaret() const {return m_nCaretIndex;}
- FX_INT32 GetSelect() const {return m_nSelItem;}
- FX_INT32 GetTopItem() const;
+ void ScrollToListItem(int32_t nItemIndex);
+ virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
+ int32_t GetCaret() const {return m_nCaretIndex;}
+ int32_t GetSelect() const {return m_nSelItem;}
+ int32_t GetTopItem() const;
virtual CPDF_Rect GetContentRect() const;
- virtual FX_INT32 GetItemIndex(const CPDF_Point & point) const;
+ virtual int32_t GetItemIndex(const CPDF_Point & point) const;
void AddString(FX_LPCWSTR string);
- void SetTopItem(FX_INT32 nIndex);
- void Select(FX_INT32 nItemIndex);
- virtual void SetCaret(FX_INT32 nItemIndex);
+ void SetTopItem(int32_t nIndex);
+ void Select(int32_t nItemIndex);
+ virtual void SetCaret(int32_t nItemIndex);
virtual void Empty();
virtual void Cancel();
CFX_WideString GetText() const;
private:
- void SetMultipleSelect(FX_INT32 nItemIndex, FX_BOOL bSelected);
- void SetSingleSelect(FX_INT32 nItemIndex);
- void InvalidateItem(FX_INT32 nItemIndex);
+ void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected);
+ void SetSingleSelect(int32_t nItemIndex);
+ void InvalidateItem(int32_t nItemIndex);
void SelectItems();
- FX_BOOL IsItemVisible(FX_INT32 nItemIndex) const;
+ FX_BOOL IsItemVisible(int32_t nItemIndex) const;
void SetScrollInfo();
void SetScrollPosY(FX_FLOAT fy);
- virtual void ReArrange(FX_INT32 nItemIndex);
+ virtual void ReArrange(int32_t nItemIndex);
private:
IFX_List_Notify* m_pNotify;
FX_BOOL m_bNotifyFlag;
CPDF_Point m_ptScrollPos;
CPLST_Select m_aSelItems; //for multiple
- FX_INT32 m_nSelItem; //for single
- FX_INT32 m_nFootIndex; //for multiple
+ int32_t m_nSelItem; //for single
+ int32_t m_nFootIndex; //for multiple
FX_BOOL m_bCtrlSel; //for multiple
- FX_INT32 m_nCaretIndex; //for multiple
+ int32_t m_nCaretIndex; //for multiple
};
#endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_
diff --git a/fpdfsdk/include/javascript/Field.h b/fpdfsdk/include/javascript/Field.h
index 0da08b6e95..573fb392c0 100644
--- a/fpdfsdk/include/javascript/Field.h
+++ b/fpdfsdk/include/javascript/Field.h
@@ -87,7 +87,7 @@ struct CJS_DelayData
CFX_WideString sFieldName;
int nControlIndex;
enum FIELD_PROP eProp;
- FX_INT32 num;
+ int32_t num;
bool b;
CFX_ByteString string;
CFX_WideString widestring;
@@ -244,7 +244,7 @@ protected:
CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField);
FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
- void AddDelay_Int(enum FIELD_PROP prop, FX_INT32 n);
+ void AddDelay_Int(enum FIELD_PROP prop, int32_t n);
void AddDelay_Bool(enum FIELD_PROP prop,bool b);
void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string);
void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string);
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index 0900109021..2495876941 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -106,7 +106,7 @@ private:
FX_BOOL m_bInit;
int m_nRef;
CJS_GlobalData* m_pGlobalData;
- FX_INT32 m_nGlobalDataCount;
+ int32_t m_nGlobalDataCount;
};
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index 86c50f30a9..01952714ba 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -17,7 +17,7 @@ struct JSConstSpec
const wchar_t* pName;
double number;
const wchar_t* string;
- FX_BYTE t; //0:double 1:str
+ uint8_t t; //0:double 1:str
};
struct JSPropertySpec
diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h
index 276ff8cd4b..f19265c651 100644
--- a/fpdfsdk/include/javascript/JS_GlobalData.h
+++ b/fpdfsdk/include/javascript/JS_GlobalData.h
@@ -75,7 +75,7 @@ public:
FX_BOOL SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent);
FX_BOOL DeleteGlobalVariable(FX_LPCSTR propname);
- FX_INT32 GetSize() const;
+ int32_t GetSize() const;
CJS_GlobalData_Element* GetAt(int index) const;
private:
@@ -85,8 +85,8 @@ private:
CJS_GlobalData_Element* GetGlobalVariable(FX_LPCSTR propname);
int FindGlobalVariable(FX_LPCSTR propname);
- void LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, FX_INT32& nLength);
- void WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, FX_INT32 nLength);
+ void LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength);
+ void WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength);
void MakeByteString(const CFX_ByteString& name, CJS_KeyValue* pData, CFX_BinaryBuf& sData);
private:
diff --git a/fpdfsdk/include/javascript/util.h b/fpdfsdk/include/javascript/util.h
index b621067bc3..07f52ab8ce 100644
--- a/fpdfsdk/include/javascript/util.h
+++ b/fpdfsdk/include/javascript/util.h
@@ -45,6 +45,6 @@ public:
JS_STATIC_METHOD(byteToChar, util);
};
-FX_INT64 FX_atoi64(const char *nptr);
+int64_t FX_atoi64(const char *nptr);
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_UTIL_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_Caret.h b/fpdfsdk/include/pdfwindow/PWL_Caret.h
index b827f18d3f..8efbf79341 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Caret.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Caret.h
@@ -46,7 +46,7 @@ private:
CPDF_Point m_ptHead;
CPDF_Point m_ptFoot;
FX_FLOAT m_fWidth;
- FX_INT32 m_nDelay;
+ int32_t m_nDelay;
CPDF_Rect m_rcInvalid;
};
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index 826f4dcc3e..7abdeeffce 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -61,7 +61,7 @@ public:
virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
virtual void RePosChildWnd();
@@ -80,11 +80,11 @@ public:
void SetText(FX_LPCWSTR text);
void AddString(FX_LPCWSTR string);
- FX_INT32 GetSelect() const;
- void SetSelect(FX_INT32 nItemIndex);
+ int32_t GetSelect() const;
+ void SetSelect(int32_t nItemIndex);
- void SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetEditSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar ) const;
+ void SetEditSel(int32_t nStartChar,int32_t nEndChar);
+ void GetEditSel(int32_t & nStartChar, int32_t & nEndChar ) const;
void Clear();
void SelectAll();
FX_BOOL IsPopup() const;
@@ -105,8 +105,8 @@ private:
FX_BOOL m_bPopup;
CPDF_Rect m_rcOldWindow;
- FX_INT32 m_nPopupWhere;
- FX_INT32 m_nSelectItem;
+ int32_t m_nPopupWhere;
+ int32_t m_nSelectItem;
IPWL_Filler_Notify* m_pFillerNotify;
public:
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index 9a133d15cc..63625641ce 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -20,8 +20,8 @@ class IPWL_Filler_Notify
public:
virtual ~IPWL_Filler_Notify() { }
virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax,
- FX_INT32 & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
- virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_INT32 nKeyCode,
+ int32_t & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
+ virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag) = 0;
@@ -58,10 +58,10 @@ public:
void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle
void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center
- void SetCharArray(FX_INT32 nCharArray);
- void SetLimitChar(FX_INT32 nLimitChar);
+ void SetCharArray(int32_t nCharArray);
+ void SetLimitChar(int32_t nLimitChar);
- void SetHorzScale(FX_INT32 nHorzScale, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE);
void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
@@ -87,7 +87,7 @@ public:
FX_BOOL IsTextFull() const;
- static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, FX_INT32 nCharArray);
+ static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray);
void SetFillerNotify(IPWL_Filler_Notify* pNotify) {m_pFillerNotify = pNotify;}
@@ -116,7 +116,7 @@ private:
FX_BOOL IsVScrollBarVisible() const;
void SetParamByFlag();
- FX_FLOAT GetCharArrayAutoFontSize(FX_INT32 nCharArray);
+ FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray);
CPDF_Point GetWordRightBottomPoint(const CPVT_WordPlace& wpWord);
CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, const CPVT_WordRange& wr2);
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index 600c348446..2eb779ddc8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -37,7 +37,7 @@ class IPWL_Edit_Notify
public:
virtual ~IPWL_Edit_Notify() { }
//when the position of caret is changed in edit
- virtual void OnCaretMove(FX_INT32 x1, FX_INT32 y1, FX_INT32 x2, FX_INT32 y2) {}
+ virtual void OnCaretMove(int32_t x1, int32_t y1, int32_t x2, int32_t y2) {}
virtual void OnContentChange(const CPDF_Rect& rcContent){}
//OprType: 0 InsertWord
//1 InsertReturn
@@ -73,7 +73,7 @@ public:
virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
virtual void RePosChildWnd();
@@ -88,20 +88,20 @@ public:
virtual void CutText();
CPDF_Rect GetContentRect() const;
- void GetCaretPos(FX_INT32& x, FX_INT32& y) const;
+ void GetCaretPos(int32_t& x, int32_t& y) const;
FX_BOOL IsModified() const;
CFX_WideString GetText() const;
- void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar ) const;
- void GetTextRange(const CPDF_Rect& rect, FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
- CFX_WideString GetText(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
+ void SetSel(int32_t nStartChar,int32_t nEndChar);
+ void GetSel(int32_t & nStartChar, int32_t & nEndChar ) const;
+ void GetTextRange(const CPDF_Rect& rect, int32_t & nStartChar, int32_t & nEndChar) const;
+ CFX_WideString GetText(int32_t & nStartChar, int32_t & nEndChar) const;
void Clear();
void SelectAll();
- FX_INT32 GetCaret() const;
- void SetCaret(FX_INT32 nPos);
- FX_INT32 GetTotalWords() const;
+ int32_t GetCaret() const;
+ void SetCaret(int32_t nPos);
+ int32_t GetTotalWords() const;
void Paint();
@@ -111,11 +111,11 @@ public:
void SetEditNotify(IPWL_Edit_Notify* pNotify) {m_pEditNotify = pNotify;}
- void SetCharSet(FX_BYTE nCharSet){m_nCharSet = nCharSet;}
- FX_INT32 GetCharSet() const;
+ void SetCharSet(uint8_t nCharSet){m_nCharSet = nCharSet;}
+ int32_t GetCharSet() const;
- void SetCodePage(FX_INT32 nCodePage){m_nCodePage = nCodePage;}
- FX_INT32 GetCodePage() const {return m_nCodePage;}
+ void SetCodePage(int32_t nCodePage){m_nCodePage = nCodePage;}
+ int32_t GetCodePage() const {return m_nCodePage;}
CPDF_Font * GetCaretFont() const;
FX_FLOAT GetCaretFontSize() const;
@@ -129,7 +129,7 @@ public:
protected:
virtual void ShowVScrollBar(FX_BOOL bShow);
- virtual void InsertWord(FX_WORD word, FX_INT32 nCharset);
+ virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
virtual void InsertText(FX_LPCWSTR csText);
@@ -169,8 +169,8 @@ protected:
IPWL_Edit_Notify* m_pEditNotify;
private:
- FX_INT32 m_nCharSet;
- FX_INT32 m_nCodePage;
+ int32_t m_nCharSet;
+ int32_t m_nCodePage;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index cdce862b29..4f44660cb2 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -16,13 +16,13 @@ class IFX_SystemHandler;
struct CPWL_FontMap_Data
{
CPDF_Font* pFont;
- FX_INT32 nCharset;
+ int32_t nCharset;
CFX_ByteString sFontName;
};
struct CPWL_FontMap_Native
{
- FX_INT32 nCharset;
+ int32_t nCharset;
CFX_ByteString sFontName;
};
@@ -65,51 +65,51 @@ public:
CPWL_FontMap(IFX_SystemHandler* pSystemHandler);
virtual ~CPWL_FontMap();
- virtual CPDF_Font* GetPDFFont(FX_INT32 nFontIndex);
- virtual CFX_ByteString GetPDFFontAlias(FX_INT32 nFontIndex);
- virtual FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 nCharset, FX_INT32 nFontIndex);
- virtual FX_INT32 CharCodeFromUnicode(FX_INT32 nFontIndex, FX_WORD word);
- virtual FX_INT32 CharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset);
+ virtual CPDF_Font* GetPDFFont(int32_t nFontIndex);
+ virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex);
+ virtual int32_t GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t nFontIndex);
+ virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word);
+ virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
public:
virtual void Initial(FX_LPCSTR fontname = NULL);
void SetSystemHandler(IFX_SystemHandler* pSystemHandler);
- FX_INT32 GetFontMapCount() const;
- const CPWL_FontMap_Data* GetFontMapData(FX_INT32 nIndex) const;
+ int32_t GetFontMapCount() const;
+ const CPWL_FontMap_Data* GetFontMapData(int32_t nIndex) const;
public:
- static FX_INT32 GetNativeCharset();
- CFX_ByteString GetNativeFontName(FX_INT32 nCharset);
+ static int32_t GetNativeCharset();
+ CFX_ByteString GetNativeFontName(int32_t nCharset);
- static CFX_ByteString GetDefaultFontByCharset(FX_INT32 nCharset);
+ static CFX_ByteString GetDefaultFontByCharset(int32_t nCharset);
- CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, FX_BYTE nCharset);
+ CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset);
static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName);
CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName);
CPDF_Font* AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName,
- FX_BYTE nCharset);
+ uint8_t nCharset);
protected:
- virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, FX_INT32 nCharset);
+ virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset);
virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
- FX_BOOL KnowWord(FX_INT32 nFontIndex, FX_WORD word);
+ FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
virtual CPDF_Document* GetDocument();
void Empty();
- FX_INT32 GetFontIndex(const CFX_ByteString& sFontName, FX_INT32 nCharset, FX_BOOL bFind);
- FX_INT32 GetPWLFontIndex(FX_WORD word, FX_INT32 nCharset);
- FX_INT32 AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, FX_INT32 nCharset = DEFAULT_CHARSET);
+ int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind);
+ int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset);
+ int32_t AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, int32_t nCharset = DEFAULT_CHARSET);
- CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName, FX_INT32 nCharset);
+ CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName, int32_t nCharset);
CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName);
private:
- CFX_ByteString GetFontName(FX_INT32 nFontIndex);
- FX_INT32 FindFont(const CFX_ByteString& sFontName, FX_INT32 nCharset = DEFAULT_CHARSET);
+ CFX_ByteString GetFontName(int32_t nFontIndex);
+ int32_t FindFont(const CFX_ByteString& sFontName, int32_t nCharset = DEFAULT_CHARSET);
- CFX_ByteString GetNativeFont(FX_INT32 nCharset);
+ CFX_ByteString GetNativeFont(int32_t nCharset);
public:
using CharsetFontMap = FPDF_CharsetFontMap;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h
index cb56a9929e..c09f7a9fe8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Icon.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h
@@ -45,7 +45,7 @@ public:
virtual void GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale);
virtual void GetImageOffset(FX_FLOAT & x,FX_FLOAT & y);
- FX_INT32 GetScaleMethod();
+ int32_t GetScaleMethod();
FX_BOOL IsProportionalScale();
void GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom);
FX_BOOL GetFittingBounds();
diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h
index d074b76be1..74438c2afd 100644
--- a/fpdfsdk/include/pdfwindow/PWL_IconList.h
+++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h
@@ -21,7 +21,7 @@ class IPWL_IconList_Notify
{
public:
virtual ~IPWL_IconList_Notify() { }
- virtual void OnNoteListSelChanged(FX_INT32 nItemIndex) = 0;
+ virtual void OnNoteListSelChanged(int32_t nItemIndex) = 0;
};
class CPWL_IconList_Item : public CPWL_Wnd
@@ -37,7 +37,7 @@ public:
void SetSelect(FX_BOOL bSelected);
FX_BOOL IsSelected() const;
void SetData(void* pData);
- void SetIcon(FX_INT32 nIconIndex);
+ void SetIcon(int32_t nIconIndex);
void SetText(const CFX_WideString& str);
void SetIconFillColor(const CPWL_Color& color);
CFX_WideString GetText() const;
@@ -50,7 +50,7 @@ protected:
virtual void OnDisabled();
private:
- FX_INT32 m_nIconIndex;
+ int32_t m_nIconIndex;
void* m_pData;
FX_BOOL m_bSelected;
CPWL_Label* m_pText;
@@ -60,20 +60,20 @@ private:
class CPWL_IconList_Content : public CPWL_ListCtrl
{
public:
- CPWL_IconList_Content(FX_INT32 nListCount);
+ CPWL_IconList_Content(int32_t nListCount);
virtual ~CPWL_IconList_Content();
- void SetSelect(FX_INT32 nIndex);
- FX_INT32 GetSelect() const;
+ void SetSelect(int32_t nIndex);
+ int32_t GetSelect() const;
void SetNotify(IPWL_IconList_Notify* pNotify);
void EnableNotify(FX_BOOL bNotify);
- void SetListData(FX_INT32 nItemIndex, void* pData);
- void SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex);
- void SetListString(FX_INT32 nItemIndex, const CFX_WideString& str);
+ void SetListData(int32_t nItemIndex, void* pData);
+ void SetListIcon(int32_t nItemIndex, int32_t nIconIndex);
+ void SetListString(int32_t nItemIndex, const CFX_WideString& str);
void SetIconFillColor(const CPWL_Color& color);
- CFX_WideString GetListString(FX_INT32 nItemIndex) const;
+ CFX_WideString GetListString(int32_t nItemIndex) const;
IPWL_IconList_Notify* GetNotify() const;
- void ScrollToItem(FX_INT32 nItemIndex);
+ void ScrollToItem(int32_t nItemIndex);
protected:
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
@@ -83,46 +83,46 @@ protected:
virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
private:
- CPWL_IconList_Item* GetListItem(FX_INT32 nItemIndex) const;
- void SelectItem(FX_INT32 nItemIndex, FX_BOOL bSelect);
- FX_INT32 FindItemIndex(const CPDF_Point& point);
+ CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
+ void SelectItem(int32_t nItemIndex, FX_BOOL bSelect);
+ int32_t FindItemIndex(const CPDF_Point& point);
FX_BOOL m_nSelectIndex;
IPWL_IconList_Notify* m_pNotify;
FX_BOOL m_bEnableNotify;
FX_BOOL m_bMouseDown;
- FX_INT32 m_nListCount;
+ int32_t m_nListCount;
};
class PWL_CLASS CPWL_IconList : public CPWL_Wnd
{
public:
- CPWL_IconList(FX_INT32 nListCount);
+ CPWL_IconList(int32_t nListCount);
virtual ~CPWL_IconList();
virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
- void SetSelect(FX_INT32 nIndex);
- void SetTopItem(FX_INT32 nIndex);
- FX_INT32 GetSelect() const;
+ void SetSelect(int32_t nIndex);
+ void SetTopItem(int32_t nIndex);
+ int32_t GetSelect() const;
void SetNotify(IPWL_IconList_Notify* pNotify);
void EnableNotify(FX_BOOL bNotify);
- void SetListData(FX_INT32 nItemIndex, void* pData);
- void SetListIcon(FX_INT32 nItemIndex, FX_INT32 nIconIndex);
- void SetListString(FX_INT32 nItemIndex, const CFX_WideString& str);
+ void SetListData(int32_t nItemIndex, void* pData);
+ void SetListIcon(int32_t nItemIndex, int32_t nIconIndex);
+ void SetListString(int32_t nItemIndex, const CFX_WideString& str);
void SetIconFillColor(const CPWL_Color& color);
- CFX_WideString GetListString(FX_INT32 nItemIndex) const;
+ CFX_WideString GetListString(int32_t nItemIndex) const;
protected:
virtual void OnCreated();
virtual void RePosChildWnd();
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
private:
CPWL_IconList_Content* m_pListContent;
- FX_INT32 m_nListCount;
+ int32_t m_nListCount;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_Label.h b/fpdfsdk/include/pdfwindow/PWL_Label.h
index f724a0a82b..be083db486 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Label.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Label.h
@@ -23,11 +23,11 @@ public:
void SetText(FX_LPCWSTR csText);
CFX_WideString GetText() const;
- void SetLimitChar(FX_INT32 nLimitChar);
- void SetHorzScale(FX_INT32 nHorzScale);
+ void SetLimitChar(int32_t nLimitChar);
+ void SetHorzScale(int32_t nHorzScale);
void SetCharSpace(FX_FLOAT fCharSpace);
CPDF_Rect GetContentRect() const;
- FX_INT32 GetTotalWords();
+ int32_t GetTotalWords();
CFX_ByteString GetTextAppearanceStream(const CPDF_Point & ptOffset) const;
protected:
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index e8e9036b8e..c5a6df76dd 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -57,7 +57,7 @@ public:
virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
virtual void KillFocus();
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void RePosChildWnd();
virtual void SetText(FX_LPCWSTR csText,FX_BOOL bRefresh = TRUE);
virtual CFX_WideString GetText() const;
@@ -68,21 +68,21 @@ public:
void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag);
void AddString(FX_LPCWSTR string);
- void SetTopVisibleIndex(FX_INT32 nItemIndex);
- void ScrollToListItem(FX_INT32 nItemIndex);
+ void SetTopVisibleIndex(int32_t nItemIndex);
+ void ScrollToListItem(int32_t nItemIndex);
void ResetContent();
void Reset();
- void Select(FX_INT32 nItemIndex);
- void SetCaret(FX_INT32 nItemIndex);
+ void Select(int32_t nItemIndex);
+ void SetCaret(int32_t nItemIndex);
void SetHoverSel(FX_BOOL bHoverSel);
- FX_INT32 GetCount() const;
+ int32_t GetCount() const;
FX_BOOL IsMultipleSel() const;
- FX_INT32 GetCaretIndex() const;
- FX_INT32 GetCurSel() const;
- FX_BOOL IsItemSelected(FX_INT32 nItemIndex) const;
- FX_INT32 GetTopVisibleIndex() const;
- FX_INT32 FindNext(FX_INT32 nIndex,FX_WCHAR nChar) const;
+ int32_t GetCaretIndex() const;
+ int32_t GetCurSel() const;
+ FX_BOOL IsItemSelected(int32_t nItemIndex) const;
+ int32_t GetTopVisibleIndex() const;
+ int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const;
CPDF_Rect GetContentRect() const;
FX_FLOAT GetFirstHeight() const;
CPDF_Rect GetListRect() const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
index 65df7aecfc..56a1fbf919 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
@@ -22,8 +22,8 @@ public:
void SetTopSpace(FX_FLOAT fSpace);
void SetBottomSpace(FX_FLOAT fSpace);
void ResetFace();
- void ResetContent(FX_INT32 nStart);
- FX_INT32 GetItemIndex(CPWL_Wnd* pItem);
+ void ResetContent(int32_t nStart);
+ int32_t GetItemIndex(CPWL_Wnd* pItem);
FX_FLOAT GetContentsHeight(FX_FLOAT fLimitWidth);
CPDF_Point InToOut(const CPDF_Point& point) const;
CPDF_Point OutToIn(const CPDF_Point& point) const;
@@ -35,7 +35,7 @@ protected:
virtual void DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
private:
- void ResetAll(FX_BOOL bMove,FX_INT32 nStart);
+ void ResetAll(FX_BOOL bMove,int32_t nStart);
CPDF_Rect m_rcContent;
CPDF_Point m_ptScroll;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index c5cdc4dd9c..a9e6dda05b 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -43,8 +43,8 @@ public:
virtual void OnSetContents(IPWL_NoteItem* pItem) = 0;
virtual void OnSetDateTime(IPWL_NoteItem* pItem) = 0;
virtual void OnSetSubjectName(IPWL_NoteItem* pItem) = 0;
- virtual void OnPopupMenu(FX_INT32 x, FX_INT32 y) = 0;
- virtual void OnPopupMenu(IPWL_NoteItem* pItem, FX_INT32 x, FX_INT32 y) = 0;
+ virtual void OnPopupMenu(int32_t x, int32_t y) = 0;
+ virtual void OnPopupMenu(IPWL_NoteItem* pItem, int32_t x, int32_t y) = 0;
};
class IPWL_NoteHandler
@@ -66,8 +66,8 @@ public:
virtual void SetContents(const CFX_WideString& sContents) = 0;
virtual IPWL_NoteItem* CreateSubItem() = 0;
- virtual FX_INT32 CountSubItems() const = 0;
- virtual IPWL_NoteItem* GetSubItems(FX_INT32 index) const = 0;
+ virtual int32_t CountSubItems() const = 0;
+ virtual IPWL_NoteItem* GetSubItems(int32_t index) const = 0;
virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem) = 0;
virtual void SetFocus() = 0;
@@ -88,7 +88,7 @@ public:
CPWL_Note_Icon();
virtual ~CPWL_Note_Icon();
- void SetIconType(FX_INT32 nType);
+ void SetIconType(int32_t nType);
public:
@@ -96,7 +96,7 @@ protected:
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
private:
- FX_INT32 m_nType;
+ int32_t m_nType;
};
class CPWL_Note_CloseBox : public CPWL_Button
@@ -148,7 +148,7 @@ public:
virtual void SetText(FX_LPCWSTR csText);
protected:
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void RePosChildWnd();
virtual void OnSetFocus();
virtual void OnKillFocus();
@@ -187,7 +187,7 @@ public:
virtual ~CPWL_Note_Contents();
virtual CFX_ByteString GetClassName() const;
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
void SetEditFocus(FX_BOOL bLast);
@@ -199,8 +199,8 @@ public:
CPWL_NoteItem* CreateSubItem();
void DeleteSubItem(IPWL_NoteItem* pNoteItem);
- FX_INT32 CountSubItems() const;
- IPWL_NoteItem* GetSubItems(FX_INT32 index) const;
+ int32_t CountSubItems() const;
+ IPWL_NoteItem* GetSubItems(int32_t index) const;
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
void EnableRead(FX_BOOL bEnabled);
@@ -228,8 +228,8 @@ public:
virtual void SetContents(const CFX_WideString& sContents);
virtual IPWL_NoteItem* CreateSubItem();
- virtual FX_INT32 CountSubItems() const;
- virtual IPWL_NoteItem* GetSubItems(FX_INT32 index) const;
+ virtual int32_t CountSubItems() const;
+ virtual IPWL_NoteItem* GetSubItems(int32_t index) const;
virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem);
virtual void SetFocus(){SetNoteFocus(FALSE);}
@@ -250,7 +250,7 @@ public:
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
virtual IPWL_NoteItem* GetFocusedNoteItem() const;
- virtual void ResetSubjectName(FX_INT32 nItemIndex);
+ virtual void ResetSubjectName(int32_t nItemIndex);
void EnableRead(FX_BOOL bEnabled);
void EnableModify(FX_BOOL bEnabled);
@@ -258,7 +258,7 @@ protected:
virtual void RePosChildWnd();
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
public:
virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth);
@@ -304,7 +304,7 @@ public:
virtual void SetAuthorName(const CFX_WideString& sName);
virtual CFX_WideString GetAuthorName() const;
virtual void SetBkColor(const CPWL_Color& color);
- virtual void ResetSubjectName(FX_INT32 nItemIndex){}
+ virtual void ResetSubjectName(int32_t nItemIndex){}
virtual FX_BOOL IsTopItem() const {return TRUE;}
virtual const CPWL_Note* GetNote() const;
virtual IPWL_NoteNotify* GetNoteNotify() const;
@@ -312,7 +312,7 @@ public:
public:
IPWL_NoteItem* Reply();
void EnableNotify(FX_BOOL bEnabled);
- void SetIconType(FX_INT32 nType);
+ void SetIconType(int32_t nType);
void SetOptionsText(const CFX_WideString& sText);
void EnableRead(FX_BOOL bEnabled);
void EnableModify(FX_BOOL bEnabled);
@@ -321,7 +321,7 @@ public:
void SetReplyString(const CFX_WideString& string);
//0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options
- FX_INT32 NoteHitTest(const CPDF_Point& point) const;
+ int32_t NoteHitTest(const CPDF_Point& point) const;
CPDF_Rect GetCaptionRect() const {return m_rcCaption;}
IPopup_Note* GetPopupNote() const {return m_pPopupNote;}
@@ -334,7 +334,7 @@ protected:
virtual void RePosChildWnd();
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
FX_BOOL ResetScrollBar();
void RePosNoteChildren();
diff --git a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
index 2f0473f1d2..bf92399e88 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
@@ -112,7 +112,7 @@ public:
virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h
index 51514f2513..9f121e80a8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Utils.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h
@@ -18,7 +18,7 @@ struct CPWL_Color;
template<class T> T PWL_MIN (const T & i, const T & j) { return ((i < j) ? i : j); }
template<class T> T PWL_MAX (const T & i, const T & j) { return ((i > j) ? i : j); }
-#define PWL_PDF2WIN(color) (FX_BYTE(color*255))
+#define PWL_PDF2WIN(color) (uint8_t(color*255))
#define PWL_WIN2PDF(color) ((FX_FLOAT)((FX_FLOAT)color/255.0f))
#define PWL_MAKEDWORD(low,high) ((FX_DWORD)((FX_WORD)(low) | (FX_DWORD)(((FX_WORD)(high))<<16)))
@@ -119,17 +119,17 @@ public:
static CPDF_Rect MaxRect(const CPDF_Rect & rect1,const CPDF_Rect & rect2);
static CPDF_Rect OffsetRect(const CPDF_Rect & rect,FX_FLOAT x,FX_FLOAT y);
static CPDF_Point OffsetPoint(const CPDF_Point & point,FX_FLOAT x,FX_FLOAT y);
- static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, FX_INT32 nTransparancy = 255);
+ static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, int32_t nTransparancy = 255);
static FX_BOOL IsBlackOrWhite(const CPWL_Color& color);
static CPWL_Color GetReverseColor(const CPWL_Color& color);
static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke = TRUE);
static CFX_ByteString GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
- FX_INT32 nStyle, const CPWL_Dash & dash);
+ int32_t nStyle, const CPWL_Dash & dash);
static CFX_ByteString GetCircleBorderAppStream(const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
- FX_INT32 nStyle, const CPWL_Dash & dash);
+ int32_t nStyle, const CPWL_Dash & dash);
static CFX_ByteString GetRectFillAppStream(const CPDF_Rect & rect,const CPWL_Color & color);
static CFX_ByteString GetCircleFillAppStream(const CPDF_Rect & rect,const CPWL_Color & color);
@@ -140,12 +140,12 @@ public:
const CFX_WideString & sLabel,
const CPWL_Color & crText,
FX_FLOAT fFontSize,
- FX_INT32 nLayOut);
+ int32_t nLayOut);
static CFX_ByteString GetCheckBoxAppStream(const CPDF_Rect & rcBBox,
- FX_INT32 nStyle,
+ int32_t nStyle,
const CPWL_Color & crText);
static CFX_ByteString GetRadioButtonAppStream(const CPDF_Rect & rcBBox,
- FX_INT32 nStyle,
+ int32_t nStyle,
const CPWL_Color & crText);
static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL,
@@ -156,12 +156,12 @@ public:
const CPDF_Point & ptOffset,
const CPVT_WordRange * pRange = NULL);
static CFX_ByteString GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_FontMap * pFontMap,
- const CFX_WideString & sText, FX_INT32 nAlignmentH, FX_INT32 nAlignmentV,
+ const CFX_WideString & sText, int32_t nAlignmentH, int32_t nAlignmentV,
FX_FLOAT fFontSize, FX_BOOL bMultiLine, FX_BOOL bAutoReturn, const CPWL_Color & crText);
static CFX_ByteString GetDropButtonAppStream(const CPDF_Rect & rcBBox);
static void DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect,
- const CPWL_Color & color, FX_INT32 nTransparancy);
+ const CPWL_Color & color, int32_t nTransparancy);
static void DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
const CPDF_Rect & rect,const FX_COLORREF & color);
static void DrawStrokeRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect,
@@ -171,12 +171,12 @@ public:
static void DrawBorder(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
- FX_INT32 nStyle, const CPWL_Dash & dash, FX_INT32 nTransparancy);
+ int32_t nStyle, const CPWL_Dash & dash, int32_t nTransparancy);
static void DrawFillArea(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
- const CPDF_Point* pPts, FX_INT32 nCount, const FX_COLORREF& color);
+ const CPDF_Point* pPts, int32_t nCount, const FX_COLORREF& color);
static void DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect,
- FX_INT32 nTransparancy, FX_INT32 nStartGray, FX_INT32 nEndGray);
+ int32_t nTransparancy, int32_t nStartGray, int32_t nEndGray);
static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange,
IPWL_SpellCheck* pSpellCheck);
@@ -190,18 +190,18 @@ public:
static void ConvertCMYK2GRAY(FX_FLOAT dC,FX_FLOAT dM,FX_FLOAT dY,FX_FLOAT dK,FX_FLOAT &dGray);
static void ConvertGRAY2CMYK(FX_FLOAT dGray,FX_FLOAT &dC,FX_FLOAT &dM,FX_FLOAT &dY,FX_FLOAT &dK);
- static void PWLColorToARGB(const CPWL_Color& color, FX_INT32& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue);
+ static void PWLColorToARGB(const CPWL_Color& color, int32_t& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue);
public:
- static CFX_ByteString GetIconAppStream(FX_INT32 nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
+ static CFX_ByteString GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
const CPWL_Color& crStroke = PWL_DEFAULT_BLACKCOLOR);
static void DrawIconAppStream(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
- FX_INT32 nType, const CPDF_Rect & rect, const CPWL_Color& crFill,
- const CPWL_Color& crStroke, const FX_INT32 nTransparancy);
+ int32_t nType, const CPDF_Rect & rect, const CPWL_Color& crFill,
+ const CPWL_Color& crStroke, const int32_t nTransparancy);
private:
- static CFX_ByteString GetAppStreamFromArray(const CPWL_PathData* pPathData, FX_INT32 nCount);
- static void GetPathDataFromArray(CFX_PathData& path, const CPWL_PathData* pPathData, FX_INT32 nCount);
+ static CFX_ByteString GetAppStreamFromArray(const CPWL_PathData* pPathData, int32_t nCount);
+ static void GetPathDataFromArray(CFX_PathData& path, const CPWL_PathData* pPathData, int32_t nCount);
static CFX_ByteString GetAppStream_Check(const CPDF_Rect & rcBBox, const CPWL_Color & crText);
static CFX_ByteString GetAppStream_Circle(const CPDF_Rect & rcBBox, const CPWL_Color & crText);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 4fa1c7639b..970480f14a 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -107,25 +107,25 @@ class IPWL_SpellCheck;
struct CPWL_Dash
{
- CPWL_Dash(FX_INT32 dash, FX_INT32 gap, FX_INT32 phase) : nDash(dash), nGap(gap), nPhase(phase)
+ CPWL_Dash(int32_t dash, int32_t gap, int32_t phase) : nDash(dash), nGap(gap), nPhase(phase)
{}
- FX_INT32 nDash;
- FX_INT32 nGap;
- FX_INT32 nPhase;
+ int32_t nDash;
+ int32_t nGap;
+ int32_t nPhase;
};
struct PWL_CLASS CPWL_Color
{
- CPWL_Color(FX_INT32 type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)
+ CPWL_Color(int32_t type = COLORTYPE_TRANSPARENT, FX_FLOAT color1 = 0.0f, FX_FLOAT color2 = 0.0f, FX_FLOAT color3 = 0.0f, FX_FLOAT color4 = 0.0f)
: nColorType(type), fColor1(color1), fColor2(color2), fColor3(color3), fColor4(color4)
{}
- CPWL_Color(FX_INT32 r, FX_INT32 g, FX_INT32 b) :
+ CPWL_Color(int32_t r, int32_t g, int32_t b) :
nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f), fColor3(b/255.0f), fColor4(0)
{}
- void ConvertColorType(FX_INT32 nColorType);
+ void ConvertColorType(int32_t nColorType);
/*
COLORTYPE_TRANSPARENT
@@ -133,7 +133,7 @@ struct PWL_CLASS CPWL_Color
COLORTYPE_CMYK
COLORTYPE_GRAY
*/
- FX_INT32 nColorType;
+ int32_t nColorType;
FX_FLOAT fColor1,fColor2,fColor3,fColor4;
};
@@ -194,7 +194,7 @@ public:
5 L"&Delete"
6 L"&Select All\tCtrl+A"
*/
- virtual CFX_WideString LoadPopupMenuString(FX_INT32 nIndex) = 0;
+ virtual CFX_WideString LoadPopupMenuString(int32_t nIndex) = 0;
};
class IPWL_FocusHandler
@@ -242,18 +242,18 @@ public:
CPWL_Color sBackgroundColor; //optional
FX_HWND hAttachedWnd; //required for no-reader framework
IPWL_SpellCheck* pSpellCheck; //required for spellchecking
- FX_INT32 nBorderStyle; //optional
- FX_INT32 dwBorderWidth; //optional
+ int32_t nBorderStyle; //optional
+ int32_t dwBorderWidth; //optional
CPWL_Color sBorderColor; //optional
CPWL_Color sTextColor; //optional
CPWL_Color sTextStrokeColor; //optional
- FX_INT32 nTransparency; //optional
+ int32_t nTransparency; //optional
FX_FLOAT fFontSize; //optional
CPWL_Dash sDash; //optional
void* pAttachedData; //optional
CPWL_Wnd* pParentWnd; //ignore
CPWL_MsgControl* pMsgControl; //ignore
- FX_INT32 eCursorType; //ignore
+ int32_t eCursorType; //ignore
CPDF_Matrix mtChild; //ignore
};
@@ -263,12 +263,12 @@ public:
CPWL_Timer(CPWL_TimerHandler* pAttached, IFX_SystemHandler* pSystemHandler);
virtual ~CPWL_Timer();
- FX_INT32 SetPWLTimer(FX_INT32 nElapse);
+ int32_t SetPWLTimer(int32_t nElapse);
void KillPWLTimer();
- static void TimerProc(FX_INT32 idEvent);
+ static void TimerProc(int32_t idEvent);
private:
- FX_INT32 m_nTimerID;
+ int32_t m_nTimerID;
CPWL_TimerHandler* m_pAttached;
IFX_SystemHandler* m_pSystemHandler;
};
@@ -279,7 +279,7 @@ public:
CPWL_TimerHandler();
virtual ~CPWL_TimerHandler();
- void BeginTimer(FX_INT32 nElapse);
+ void BeginTimer(int32_t nElapse);
void EndTimer();
virtual void TimerProc();
virtual IFX_SystemHandler* GetSystemHandler() const = 0;
@@ -324,7 +324,7 @@ public:
void SetCapture();
void ReleaseCapture();
- virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0);
+ virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void SetTextColor(const CPWL_Color & color);
virtual void SetTextStrokeColor(const CPWL_Color & color);
virtual void SetVisible(FX_BOOL bVisible);
@@ -335,9 +335,9 @@ public:
virtual CPWL_Color GetTextColor() const;
virtual CPWL_Color GetTextStrokeColor() const;
virtual FX_FLOAT GetFontSize() const;
- virtual FX_INT32 GetInnerBorderWidth() const;
- virtual CPWL_Color GetBorderLeftTopColor(FX_INT32 nBorderStyle) const;
- virtual CPWL_Color GetBorderRightBottomColor(FX_INT32 nBorderStyle) const;
+ virtual int32_t GetInnerBorderWidth() const;
+ virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const;
+ virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const;
virtual FX_BOOL IsModified() const {return FALSE;}
@@ -345,9 +345,9 @@ public:
void SetBackgroundColor(const CPWL_Color & color);
void SetBorderColor(const CPWL_Color & color);
- void SetBorderWidth(FX_INT32 nBorderWidth);
+ void SetBorderWidth(int32_t nBorderWidth);
void SetClipRect(const CPDF_Rect & rect);
- void SetBorderStyle(FX_INT32 eBorderStyle);
+ void SetBorderStyle(int32_t eBorderStyle);
void SetBorderDash(const CPWL_Dash & sDash);
CPDF_Rect GetOriginWindowRect() const;
@@ -356,14 +356,14 @@ public:
CPDF_Point GetCenterPoint() const;
CPDF_Rect GetClientCenterSquare() const;
CPDF_Rect GetWindowCenterSquare() const;
- FX_INT32 GetBorderWidth() const;
+ int32_t GetBorderWidth() const;
FX_BOOL IsVisible() const {return m_bVisible;}
FX_BOOL HasFlag(FX_DWORD dwFlags) const;
void AddFlag(FX_DWORD dwFlags);
void RemoveFlag(FX_DWORD dwFlags);
CPDF_Rect GetClipRect() const;
CPWL_Wnd* GetParentWindow() const;
- FX_INT32 GetBorderStyle() const;
+ int32_t GetBorderStyle() const;
CPWL_Dash GetBorderDash() const;
void* GetAttachedData() const;
@@ -381,8 +381,8 @@ public:
virtual IFX_SystemHandler* GetSystemHandler() const;
IPWL_FocusHandler* GetFocusHandler() const;
- FX_INT32 GetTransparency();
- void SetTransparency(FX_INT32 nTransparency);
+ int32_t GetTransparency();
+ void SetTransparency(int32_t nTransparency);
CPDF_Matrix GetChildToRoot() const;
CPDF_Matrix GetChildMatrix() const;
@@ -431,7 +431,7 @@ protected:
void InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew);
- void PWLtoWnd(const CPDF_Point & point, FX_INT32& x, FX_INT32& y) const;
+ void PWLtoWnd(const CPDF_Point & point, int32_t& x, int32_t& y) const;
FX_RECT PWLtoWnd(const CPDF_Rect & rect) const;
FX_HWND GetAttachedHWnd() const;