summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-08-10 15:13:19 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-08-10 15:13:33 +0000
commit7e805d1a6f3bf7ddd04b2c1ce857a2cf6d9ff873 (patch)
tree0aab30fc879ea390d3f3351dafc5511e16ddedc0 /fpdfsdk
parente6c67cd64a80bd67c587ad3ffb380fe1b7574d1f (diff)
downloadpdfium-7e805d1a6f3bf7ddd04b2c1ce857a2cf6d9ff873.tar.xz
Revert "Add a build target and a proper export header for shared library builds."
This reverts commit 00334675c18a0203f313cceb670c970a77280f49. Reason for revert: Breaking the deps roller - https://chromium-review.googlesource.com/c/609307 Original change's description: > Add a build target and a proper export header for shared library builds. > > This CL adds support for Chromium's component build feature to pdfium. > > The export header stub in fpdfview.h is expanded to match Chromium's > export mechanisms and patterns (fixes pdfium:825). > > A component/shared library build can be triggered by adding > > is_component_build = true > > as a gn argument. Please note that setting this will also affect some > of pdfiums dependencies like v8, which will be build as components > too. > > Additionally, this CL provides a "pdf_source_set" template which > dynamically enables the use of "source_set" when building a complete > static library or a shared library to reduce build time. > > When testing this it is recommended to only build the pdfium target as > most of pdfiums test rely on non-public functions which aren't exported > by the shared library. > > Bug: pdfium:825,pdfium:826 > Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752 > Reviewed-on: https://pdfium-review.googlesource.com/8970 > Reviewed-by: dsinclair <dsinclair@chromium.org> > Commit-Queue: dsinclair <dsinclair@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,brucedawson@chromium.org,dsinclair@google.com,dsinclair@chromium.org,licorn@gmail.com Change-Id: Ib02af2298932481293f50d362ae87bfedf284821 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: pdfium:825, pdfium:826 Reviewed-on: https://pdfium-review.googlesource.com/10550 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_dataavail.cpp26
-rw-r--r--fpdfsdk/fpdf_ext.cpp4
-rw-r--r--fpdfsdk/fpdf_flatten.cpp2
-rw-r--r--fpdfsdk/fpdf_progressive.cpp24
-rw-r--r--fpdfsdk/fpdf_searchex.cpp4
-rw-r--r--fpdfsdk/fpdf_structtree.cpp20
-rw-r--r--fpdfsdk/fpdf_sysfontinfo.cpp15
-rw-r--r--fpdfsdk/fpdf_transformpage.cpp63
-rw-r--r--fpdfsdk/fpdfannot.cpp108
-rw-r--r--fpdfsdk/fpdfattachment.cpp38
-rw-r--r--fpdfsdk/fpdfdoc.cpp113
-rw-r--r--fpdfsdk/fpdfeditimg.cpp40
-rw-r--r--fpdfsdk/fpdfeditpage.cpp83
-rw-r--r--fpdfsdk/fpdfeditpath.cpp98
-rw-r--r--fpdfsdk/fpdfedittext.cpp36
-rw-r--r--fpdfsdk/fpdfformfill.cpp237
-rw-r--r--fpdfsdk/fpdfppo.cpp12
-rw-r--r--fpdfsdk/fpdfsave.cpp15
-rw-r--r--fpdfsdk/fpdftext.cpp130
-rw-r--r--fpdfsdk/fpdfview.cpp242
20 files changed, 632 insertions, 678 deletions
diff --git a/fpdfsdk/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp
index e365fd9313..85dd873cf3 100644
--- a/fpdfsdk/fpdf_dataavail.cpp
+++ b/fpdfsdk/fpdf_dataavail.cpp
@@ -116,8 +116,8 @@ CFPDF_DataAvail* CFPDFDataAvailFromFPDFAvail(FPDF_AVAIL avail) {
} // namespace
-FPDF_EXPORT FPDF_AVAIL FPDF_CALLCONV FPDFAvail_Create(FX_FILEAVAIL* file_avail,
- FPDF_FILEACCESS* file) {
+DLLEXPORT FPDF_AVAIL STDCALL FPDFAvail_Create(FX_FILEAVAIL* file_avail,
+ FPDF_FILEACCESS* file) {
auto pAvail = pdfium::MakeUnique<CFPDF_DataAvail>();
pAvail->m_FileAvail->Set(file_avail);
pAvail->m_FileRead->Set(file);
@@ -126,13 +126,13 @@ FPDF_EXPORT FPDF_AVAIL FPDF_CALLCONV FPDFAvail_Create(FX_FILEAVAIL* file_avail,
return pAvail.release(); // Caller takes ownership.
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFAvail_Destroy(FPDF_AVAIL avail) {
+DLLEXPORT void STDCALL FPDFAvail_Destroy(FPDF_AVAIL avail) {
// Take ownership back from caller and destroy.
std::unique_ptr<CFPDF_DataAvail>(static_cast<CFPDF_DataAvail*>(avail));
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsDocAvail(FPDF_AVAIL avail,
- FX_DOWNLOADHINTS* hints) {
+DLLEXPORT int STDCALL FPDFAvail_IsDocAvail(FPDF_AVAIL avail,
+ FX_DOWNLOADHINTS* hints) {
if (!avail || !hints)
return PDF_DATA_ERROR;
CFPDF_DownloadHintsWrap hints_wrap(hints);
@@ -140,7 +140,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsDocAvail(FPDF_AVAIL avail,
&hints_wrap);
}
-FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV
+DLLEXPORT FPDF_DOCUMENT STDCALL
FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
CFPDF_DataAvail* pDataAvail = static_cast<CFPDF_DataAvail*>(avail);
if (!pDataAvail)
@@ -161,14 +161,14 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
return FPDFDocumentFromCPDFDocument(pDocument.release());
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {
+DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc);
return pDoc ? pDoc->GetParser()->GetFirstPageNo() : 0;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsPageAvail(FPDF_AVAIL avail,
- int page_index,
- FX_DOWNLOADHINTS* hints) {
+DLLEXPORT int STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail,
+ int page_index,
+ FX_DOWNLOADHINTS* hints) {
if (!avail || !hints)
return PDF_DATA_ERROR;
if (page_index < 0)
@@ -178,8 +178,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsPageAvail(FPDF_AVAIL avail,
page_index, &hints_wrap);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsFormAvail(FPDF_AVAIL avail,
- FX_DOWNLOADHINTS* hints) {
+DLLEXPORT int STDCALL FPDFAvail_IsFormAvail(FPDF_AVAIL avail,
+ FX_DOWNLOADHINTS* hints) {
if (!avail || !hints)
return PDF_FORM_ERROR;
CFPDF_DownloadHintsWrap hints_wrap(hints);
@@ -187,7 +187,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsFormAvail(FPDF_AVAIL avail,
&hints_wrap);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsLinearized(FPDF_AVAIL avail) {
+DLLEXPORT int STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) {
if (!avail)
return PDF_LINEARIZATION_UNKNOWN;
return CFPDFDataAvailFromFPDFAvail(avail)->m_pDataAvail->IsLinearizedPDF();
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 2284453d2d..f598835e3c 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -37,7 +37,7 @@ bool FPDF_UnSupportError(int nError) {
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info) {
if (!unsp_info || unsp_info->version != 1)
return false;
@@ -169,7 +169,7 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) {
#endif // PDF_ENABLE_XFA
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
+DLLEXPORT int STDCALL FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return PAGEMODE_UNKNOWN;
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 5be322a9b0..16528c2ee3 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -235,7 +235,7 @@ CFX_Matrix GetMatrix(CFX_FloatRect rcAnnot,
} // namespace
-FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
+DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!page)
return FLATTEN_FAIL;
diff --git a/fpdfsdk/fpdf_progressive.cpp b/fpdfsdk/fpdf_progressive.cpp
index c52f3707cc..2411869904 100644
--- a/fpdfsdk/fpdf_progressive.cpp
+++ b/fpdfsdk/fpdf_progressive.cpp
@@ -30,15 +30,15 @@ static_assert(CPDF_ProgressiveRenderer::Done == FPDF_RENDER_DONE,
static_assert(CPDF_ProgressiveRenderer::Failed == FPDF_RENDER_FAILED,
"CPDF_ProgressiveRenderer::Failed value mismatch");
-FPDF_EXPORT int FPDF_CALLCONV FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
- FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- int flags,
- IFSDK_PAUSE* pause) {
+DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
+ FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int flags,
+ IFSDK_PAUSE* pause) {
if (!bitmap || !pause || pause->version != 1)
return FPDF_RENDER_FAILED;
@@ -71,8 +71,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
return FPDF_RENDER_FAILED;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDF_RenderPage_Continue(FPDF_PAGE page,
- IFSDK_PAUSE* pause) {
+DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
+ IFSDK_PAUSE* pause) {
if (!pause || pause->version != 1)
return FPDF_RENDER_FAILED;
@@ -95,7 +95,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_RenderPage_Continue(FPDF_PAGE page,
return FPDF_RENDER_FAILED;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage_Close(FPDF_PAGE page) {
+DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (pPage) {
#ifdef _SKIA_SUPPORT_PATHS_
diff --git a/fpdfsdk/fpdf_searchex.cpp b/fpdfsdk/fpdf_searchex.cpp
index 9d48cebf8a..13729167ed 100644
--- a/fpdfsdk/fpdf_searchex.cpp
+++ b/fpdfsdk/fpdf_searchex.cpp
@@ -8,7 +8,7 @@
#include "core/fpdftext/cpdf_textpage.h"
-FPDF_EXPORT int FPDF_CALLCONV
+DLLEXPORT int STDCALL
FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex) {
if (!text_page)
return -1;
@@ -16,7 +16,7 @@ FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex) {
->CharIndexFromTextIndex(nTextIndex);
}
-FPDF_EXPORT int FPDF_CALLCONV
+DLLEXPORT int STDCALL
FPDFText_GetTextIndexFromCharIndex(FPDF_TEXTPAGE text_page, int nCharIndex) {
if (!text_page)
return -1;
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index a6bf60d0df..bd6641f7cb 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -37,8 +37,7 @@ unsigned long WideStringToBuffer(const CFX_WideString& str,
} // namespace
-FPDF_EXPORT FPDF_STRUCTTREE FPDF_CALLCONV
-FPDF_StructTree_GetForPage(FPDF_PAGE page) {
+DLLEXPORT FPDF_STRUCTTREE STDCALL FPDF_StructTree_GetForPage(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return nullptr;
@@ -47,18 +46,17 @@ FPDF_StructTree_GetForPage(FPDF_PAGE page) {
.release();
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_StructTree_Close(FPDF_STRUCTTREE struct_tree) {
+DLLEXPORT void STDCALL FPDF_StructTree_Close(FPDF_STRUCTTREE struct_tree) {
std::unique_ptr<CPDF_StructTree>(ToStructTree(struct_tree));
}
-FPDF_EXPORT int FPDF_CALLCONV
+DLLEXPORT int STDCALL
FPDF_StructTree_CountChildren(FPDF_STRUCTTREE struct_tree) {
CPDF_StructTree* tree = ToStructTree(struct_tree);
return tree ? tree->CountTopElements() : -1;
}
-FPDF_EXPORT FPDF_STRUCTELEMENT FPDF_CALLCONV
+DLLEXPORT FPDF_STRUCTELEMENT STDCALL
FPDF_StructTree_GetChildAtIndex(FPDF_STRUCTTREE struct_tree, int index) {
CPDF_StructTree* tree = ToStructTree(struct_tree);
if (!tree || index < 0 || index >= tree->CountTopElements())
@@ -66,7 +64,7 @@ FPDF_StructTree_GetChildAtIndex(FPDF_STRUCTTREE struct_tree, int index) {
return tree->GetTopElement(index);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDF_StructElement_GetAltText(FPDF_STRUCTELEMENT struct_element,
void* buffer,
unsigned long buflen) {
@@ -77,7 +75,7 @@ FPDF_StructElement_GetAltText(FPDF_STRUCTELEMENT struct_element,
: 0;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDF_StructElement_GetType(FPDF_STRUCTELEMENT struct_element,
void* buffer,
unsigned long buflen) {
@@ -86,7 +84,7 @@ FPDF_StructElement_GetType(FPDF_STRUCTELEMENT struct_element,
: 0;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDF_StructElement_GetTitle(FPDF_STRUCTELEMENT struct_element,
void* buffer,
unsigned long buflen) {
@@ -96,13 +94,13 @@ FPDF_StructElement_GetTitle(FPDF_STRUCTELEMENT struct_element,
: 0;
}
-FPDF_EXPORT int FPDF_CALLCONV
+DLLEXPORT int STDCALL
FPDF_StructElement_CountChildren(FPDF_STRUCTELEMENT struct_element) {
CPDF_StructElement* elem = ToStructTreeElement(struct_element);
return elem ? elem->CountKids() : -1;
}
-FPDF_EXPORT FPDF_STRUCTELEMENT FPDF_CALLCONV
+DLLEXPORT FPDF_STRUCTELEMENT STDCALL
FPDF_StructElement_GetChildAtIndex(FPDF_STRUCTELEMENT struct_element,
int index) {
CPDF_StructElement* elem = ToStructTreeElement(struct_element);
diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
index 9228326096..5dca4814d4 100644
--- a/fpdfsdk/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/fpdf_sysfontinfo.cpp
@@ -103,15 +103,14 @@ class CFX_ExternalFontInfo final : public IFX_SystemFontInfo {
FPDF_SYSFONTINFO* const m_pInfo;
};
-FPDF_EXPORT void FPDF_CALLCONV FPDF_AddInstalledFont(void* mapper,
- const char* name,
- int charset) {
+DLLEXPORT void STDCALL FPDF_AddInstalledFont(void* mapper,
+ const char* name,
+ int charset) {
CFX_FontMapper* pMapper = static_cast<CFX_FontMapper*>(mapper);
pMapper->AddInstalledFont(name, charset);
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_SetSystemFontInfo(FPDF_SYSFONTINFO* pFontInfoExt) {
+DLLEXPORT void STDCALL FPDF_SetSystemFontInfo(FPDF_SYSFONTINFO* pFontInfoExt) {
if (pFontInfoExt->version != 1)
return;
@@ -119,7 +118,7 @@ FPDF_SetSystemFontInfo(FPDF_SYSFONTINFO* pFontInfoExt) {
pdfium::MakeUnique<CFX_ExternalFontInfo>(pFontInfoExt));
}
-FPDF_EXPORT const FPDF_CharsetFontMap* FPDF_CALLCONV FPDF_GetDefaultTTFMap() {
+DLLEXPORT const FPDF_CharsetFontMap* STDCALL FPDF_GetDefaultTTFMap() {
return CPWL_FontMap::defaultTTFMap;
}
@@ -192,7 +191,7 @@ static void DefaultDeleteFont(struct _FPDF_SYSFONTINFO* pThis, void* hFont) {
pDefault->m_pFontInfo->DeleteFont(hFont);
}
-FPDF_EXPORT FPDF_SYSFONTINFO* FPDF_CALLCONV FPDF_GetDefaultSystemFontInfo() {
+DLLEXPORT FPDF_SYSFONTINFO* STDCALL FPDF_GetDefaultSystemFontInfo() {
std::unique_ptr<IFX_SystemFontInfo> pFontInfo =
IFX_SystemFontInfo::CreateDefault(nullptr);
if (!pFontInfo)
@@ -213,7 +212,7 @@ FPDF_EXPORT FPDF_SYSFONTINFO* FPDF_CALLCONV FPDF_GetDefaultSystemFontInfo() {
return pFontInfoExt;
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDF_FreeDefaultSystemFontInfo(FPDF_SYSFONTINFO* pDefaultFontInfo) {
FX_Free(static_cast<FPDF_SYSFONTINFO_DEFAULT*>(pDefaultFontInfo));
}
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 93df594618..b419ad1fb2 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -56,11 +56,11 @@ bool GetBoundingBox(CPDF_Page* page,
} // namespace
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetMediaBox(FPDF_PAGE page,
- float left,
- float bottom,
- float right,
- float top) {
+DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page,
+ float left,
+ float bottom,
+ float right,
+ float top) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
@@ -68,11 +68,11 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetMediaBox(FPDF_PAGE page,
SetBoundingBox(pPage, "MediaBox", left, bottom, right, top);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetCropBox(FPDF_PAGE page,
- float left,
- float bottom,
- float right,
- float top) {
+DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page,
+ float left,
+ float bottom,
+ float right,
+ float top) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
@@ -80,28 +80,27 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetCropBox(FPDF_PAGE page,
SetBoundingBox(pPage, "CropBox", left, bottom, right, top);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetMediaBox(FPDF_PAGE page,
- float* left,
- float* bottom,
- float* right,
- float* top) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page,
+ float* left,
+ float* bottom,
+ float* right,
+ float* top) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
return pPage && GetBoundingBox(pPage, "MediaBox", left, bottom, right, top);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GetCropBox(FPDF_PAGE page,
- float* left,
- float* bottom,
- float* right,
- float* top) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page,
+ float* left,
+ float* bottom,
+ float* right,
+ float* top) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
return pPage && GetBoundingBox(pPage, "CropBox", left, bottom, right, top);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPage_TransFormWithClip(FPDF_PAGE page,
- FS_MATRIX* matrix,
- FS_RECTF* clipRect) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
+ FS_MATRIX* matrix,
+ FS_RECTF* clipRect) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return false;
@@ -198,7 +197,7 @@ FPDFPage_TransFormWithClip(FPDF_PAGE page,
return true;
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object,
double a,
double b,
@@ -218,10 +217,10 @@ FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object,
pPageObj->TransformGeneralState(matrix);
}
-FPDF_EXPORT FPDF_CLIPPATH FPDF_CALLCONV FPDF_CreateClipPath(float left,
- float bottom,
- float right,
- float top) {
+DLLEXPORT FPDF_CLIPPATH STDCALL FPDF_CreateClipPath(float left,
+ float bottom,
+ float right,
+ float top) {
CPDF_Path Path;
Path.AppendRect(left, bottom, right, top);
@@ -230,7 +229,7 @@ FPDF_EXPORT FPDF_CLIPPATH FPDF_CALLCONV FPDF_CreateClipPath(float left,
return pNewClipPath.release(); // Caller takes ownership.
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) {
+DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) {
// Take ownership back from caller and destroy.
std::unique_ptr<CPDF_ClipPath>(static_cast<CPDF_ClipPath*>(clipPath));
}
@@ -272,8 +271,8 @@ void OutputPath(std::ostringstream& buf, CPDF_Path path) {
}
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertClipPath(FPDF_PAGE page,
- FPDF_CLIPPATH clipPath) {
+DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,
+ FPDF_CLIPPATH clipPath) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
diff --git a/fpdfsdk/fpdfannot.cpp b/fpdfsdk/fpdfannot.cpp
index 9213877b0b..64c95a3777 100644
--- a/fpdfsdk/fpdfannot.cpp
+++ b/fpdfsdk/fpdfannot.cpp
@@ -184,7 +184,7 @@ void UpdateContentStream(CPDF_Form* pForm, CPDF_Stream* pStream) {
} // namespace
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFAnnot_IsSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype) {
// The supported subtypes must also be communicated in the user doc.
return subtype == FPDF_ANNOT_CIRCLE || subtype == FPDF_ANNOT_HIGHLIGHT ||
@@ -194,7 +194,7 @@ FPDFAnnot_IsSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype) {
subtype == FPDF_ANNOT_TEXT || subtype == FPDF_ANNOT_UNDERLINE;
}
-FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV
+DLLEXPORT FPDF_ANNOTATION STDCALL
FPDFPage_CreateAnnot(FPDF_PAGE page, FPDF_ANNOTATION_SUBTYPE subtype) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage || !FPDFAnnot_IsSupportedSubtype(subtype))
@@ -217,7 +217,7 @@ FPDFPage_CreateAnnot(FPDF_PAGE page, FPDF_ANNOTATION_SUBTYPE subtype) {
return pNewAnnot.release();
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotCount(FPDF_PAGE page) {
+DLLEXPORT int STDCALL FPDFPage_GetAnnotCount(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage || !pPage->m_pFormDict)
return 0;
@@ -226,8 +226,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotCount(FPDF_PAGE page) {
return pAnnots ? pAnnots->GetCount() : 0;
}
-FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFPage_GetAnnot(FPDF_PAGE page,
- int index) {
+DLLEXPORT FPDF_ANNOTATION STDCALL FPDFPage_GetAnnot(FPDF_PAGE page, int index) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage || !pPage->m_pFormDict || index < 0)
return nullptr;
@@ -241,12 +240,11 @@ FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFPage_GetAnnot(FPDF_PAGE page,
return pNewAnnot.release();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_CloseAnnot(FPDF_ANNOTATION annot) {
+DLLEXPORT void STDCALL FPDFPage_CloseAnnot(FPDF_ANNOTATION annot) {
delete CPDFAnnotContextFromFPDFAnnotation(annot);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_RemoveAnnot(FPDF_PAGE page,
- int index) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_RemoveAnnot(FPDF_PAGE page, int index) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage || !pPage->m_pFormDict || index < 0)
return false;
@@ -259,7 +257,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_RemoveAnnot(FPDF_PAGE page,
return true;
}
-FPDF_EXPORT FPDF_ANNOTATION_SUBTYPE FPDF_CALLCONV
+DLLEXPORT FPDF_ANNOTATION_SUBTYPE STDCALL
FPDFAnnot_GetSubtype(FPDF_ANNOTATION annot) {
if (!annot)
return FPDF_ANNOT_UNKNOWN;
@@ -273,14 +271,14 @@ FPDFAnnot_GetSubtype(FPDF_ANNOTATION annot) {
CPDF_Annot::StringToAnnotSubtype(pAnnotDict->GetStringFor("Subtype")));
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFAnnot_IsObjectSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype) {
// The supported subtypes must also be communicated in the user doc.
return subtype == FPDF_ANNOT_INK || subtype == FPDF_ANNOT_STAMP;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFAnnot_UpdateObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_UpdateObject(FPDF_ANNOTATION annot,
+ FPDF_PAGEOBJECT obj) {
CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot);
CPDF_PageObject* pObj = CPDFPageObjectFromFPDFPageObject(obj);
if (!pAnnot || !pAnnot->GetAnnotDict() || !pAnnot->HasForm() || !pObj)
@@ -313,8 +311,8 @@ FPDFAnnot_UpdateObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj) {
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFAnnot_AppendObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_AppendObject(FPDF_ANNOTATION annot,
+ FPDF_PAGEOBJECT obj) {
CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot);
CPDF_PageObject* pObj = CPDFPageObjectFromFPDFPageObject(obj);
if (!pAnnot || !pObj)
@@ -375,7 +373,7 @@ FPDFAnnot_AppendObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj) {
return true;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot) {
+DLLEXPORT int STDCALL FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot) {
CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot);
if (!pAnnot || !pAnnot->GetAnnotDict())
return 0;
@@ -391,8 +389,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot) {
return pdfium::CollectionSize<int>(*pAnnot->GetForm()->GetPageObjectList());
}
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
-FPDFAnnot_GetObject(FPDF_ANNOTATION annot, int index) {
+DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFAnnot_GetObject(FPDF_ANNOTATION annot,
+ int index) {
CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot);
if (!pAnnot || !pAnnot->GetAnnotDict() || index < 0)
return nullptr;
@@ -409,8 +407,8 @@ FPDFAnnot_GetObject(FPDF_ANNOTATION annot, int index) {
return pAnnot->GetForm()->GetPageObjectList()->GetPageObjectByIndex(index);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFAnnot_RemoveObject(FPDF_ANNOTATION annot, int index) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_RemoveObject(FPDF_ANNOTATION annot,
+ int index) {
CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot);
if (!pAnnot || !pAnnot->GetAnnotDict() || !pAnnot->HasForm() || index < 0)
return false;
@@ -435,12 +433,12 @@ FPDFAnnot_RemoveObject(FPDF_ANNOTATION annot, int index) {
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetColor(FPDF_ANNOTATION annot,
- FPDFANNOT_COLORTYPE type,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetColor(FPDF_ANNOTATION annot,
+ FPDFANNOT_COLORTYPE type,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A) {
if (!annot || R > 255 || G > 255 || B > 255 || A > 255)
return false;
@@ -473,12 +471,12 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetColor(FPDF_ANNOTATION annot,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetColor(FPDF_ANNOTATION annot,
- FPDFANNOT_COLORTYPE type,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_GetColor(FPDF_ANNOTATION annot,
+ FPDFANNOT_COLORTYPE type,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A) {
if (!annot || !R || !G || !B || !A)
return false;
@@ -538,7 +536,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetColor(FPDF_ANNOTATION annot,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFAnnot_HasAttachmentPoints(FPDF_ANNOTATION annot) {
if (!annot)
return false;
@@ -549,7 +547,7 @@ FPDFAnnot_HasAttachmentPoints(FPDF_ANNOTATION annot) {
subtype == FPDF_ANNOT_STRIKEOUT;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot,
const FS_QUADPOINTSF* quadPoints) {
if (!annot || !quadPoints || !FPDFAnnot_HasAttachmentPoints(annot))
@@ -590,7 +588,7 @@ FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot,
return true;
}
-FPDF_EXPORT FS_QUADPOINTSF FPDF_CALLCONV
+DLLEXPORT FS_QUADPOINTSF STDCALL
FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot) {
if (!annot || !FPDFAnnot_HasAttachmentPoints(annot))
return FS_QUADPOINTSF();
@@ -643,8 +641,8 @@ FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot) {
return quadPoints;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
- const FS_RECTF* rect) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
+ const FS_RECTF* rect) {
if (!annot || !rect)
return false;
@@ -673,7 +671,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
return true;
}
-FPDF_EXPORT FS_RECTF FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot) {
+DLLEXPORT FS_RECTF STDCALL FPDFAnnot_GetRect(FPDF_ANNOTATION annot) {
if (!annot)
return FS_RECTF();
@@ -704,8 +702,8 @@ FPDF_EXPORT FS_RECTF FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot) {
return rect;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_HasKey(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_HasKey(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key) {
if (!annot)
return false;
@@ -717,8 +715,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_HasKey(FPDF_ANNOTATION annot,
return pAnnotDict->KeyExist(CFXByteStringFromFPDFWideString(key));
}
-FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV
-FPDFAnnot_GetValueType(FPDF_ANNOTATION annot, FPDF_WIDESTRING key) {
+DLLEXPORT FPDF_OBJECT_TYPE STDCALL FPDFAnnot_GetValueType(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key) {
if (!FPDFAnnot_HasKey(annot, key))
return FPDF_OBJECT_UNKNOWN;
@@ -731,10 +729,9 @@ FPDFAnnot_GetValueType(FPDF_ANNOTATION annot, FPDF_WIDESTRING key) {
return pObj->GetType();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFAnnot_SetStringValue(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key,
- FPDF_WIDESTRING value) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetStringValue(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key,
+ FPDF_WIDESTRING value) {
if (!annot)
return false;
@@ -749,11 +746,10 @@ FPDFAnnot_SetStringValue(FPDF_ANNOTATION annot,
return true;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFAnnot_GetStringValue(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFAnnot_GetStringValue(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key,
+ void* buffer,
+ unsigned long buflen) {
if (!annot)
return 0;
@@ -767,7 +763,7 @@ FPDFAnnot_GetStringValue(FPDF_ANNOTATION annot,
buffer, buflen);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetFlags(FPDF_ANNOTATION annot) {
+DLLEXPORT int STDCALL FPDFAnnot_GetFlags(FPDF_ANNOTATION annot) {
if (!annot)
return FPDF_ANNOT_FLAG_NONE;
@@ -779,8 +775,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetFlags(FPDF_ANNOTATION annot) {
return pAnnotDict->GetIntegerFor("F");
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetFlags(FPDF_ANNOTATION annot,
- int flags) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetFlags(FPDF_ANNOTATION annot,
+ int flags) {
if (!annot)
return false;
@@ -793,8 +789,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetFlags(FPDF_ANNOTATION annot,
return true;
}
-FPDF_EXPORT int FPDF_CALLCONV
-FPDFAnnot_GetFormFieldFlags(FPDF_PAGE page, FPDF_ANNOTATION annot) {
+DLLEXPORT int STDCALL FPDFAnnot_GetFormFieldFlags(FPDF_PAGE page,
+ FPDF_ANNOTATION annot) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage || !annot)
return FPDF_FORMFLAG_NONE;
@@ -809,7 +805,7 @@ FPDFAnnot_GetFormFieldFlags(FPDF_PAGE page, FPDF_ANNOTATION annot) {
return pFormField ? pFormField->GetFieldFlags() : FPDF_FORMFLAG_NONE;
}
-FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV
+DLLEXPORT FPDF_ANNOTATION STDCALL
FPDFAnnot_GetFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
FPDF_PAGE page,
double page_x,
diff --git a/fpdfsdk/fpdfattachment.cpp b/fpdfsdk/fpdfattachment.cpp
index b759ae2655..5bdb3bd4a2 100644
--- a/fpdfsdk/fpdfattachment.cpp
+++ b/fpdfsdk/fpdfattachment.cpp
@@ -45,8 +45,7 @@ CFX_ByteString GenerateMD5Base16(const void* contents,
} // namespace
-FPDF_EXPORT int FPDF_CALLCONV
-FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) {
+DLLEXPORT int STDCALL FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return 0;
@@ -54,8 +53,8 @@ FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) {
return CPDF_NameTree(pDoc, "EmbeddedFiles").GetCount();
}
-FPDF_EXPORT FPDF_ATTACHMENT FPDF_CALLCONV
-FPDFDoc_AddAttachment(FPDF_DOCUMENT document, FPDF_WIDESTRING name) {
+DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
+ FPDF_WIDESTRING name) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
CFX_WideString wsName =
CFX_WideString::FromUTF16LE(name, CFX_WideString::WStringLength(name));
@@ -98,8 +97,8 @@ FPDFDoc_AddAttachment(FPDF_DOCUMENT document, FPDF_WIDESTRING name) {
return pFile;
}
-FPDF_EXPORT FPDF_ATTACHMENT FPDF_CALLCONV
-FPDFDoc_GetAttachment(FPDF_DOCUMENT document, int index) {
+DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_GetAttachment(FPDF_DOCUMENT document,
+ int index) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc || index < 0)
return nullptr;
@@ -112,8 +111,8 @@ FPDFDoc_GetAttachment(FPDF_DOCUMENT document, int index) {
return nameTree.LookupValueAndName(index, &csName);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document, int index) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document,
+ int index) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc || index < 0)
return false;
@@ -125,7 +124,7 @@ FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document, int index) {
return nameTree.DeleteValueAndName(index);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDFAttachment_GetName(FPDF_ATTACHMENT attachment,
void* buffer,
unsigned long buflen) {
@@ -137,8 +136,8 @@ FPDFAttachment_GetName(FPDF_ATTACHMENT attachment,
buffer, buflen);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment,
+ FPDF_WIDESTRING key) {
CPDF_Object* pFile = CPDFObjectFromFPDFAttachment(attachment);
if (!pFile)
return 0;
@@ -150,7 +149,7 @@ FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
return pParamsDict->KeyExist(CFXByteStringFromFPDFWideString(key));
}
-FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV
+DLLEXPORT FPDF_OBJECT_TYPE STDCALL
FPDFAttachment_GetValueType(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
if (!FPDFAttachment_HasKey(attachment, key))
return FPDF_OBJECT_UNKNOWN;
@@ -164,7 +163,7 @@ FPDFAttachment_GetValueType(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
return pObj->GetType();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFAttachment_SetStringValue(FPDF_ATTACHMENT attachment,
FPDF_WIDESTRING key,
FPDF_WIDESTRING value) {
@@ -186,7 +185,7 @@ FPDFAttachment_SetStringValue(FPDF_ATTACHMENT attachment,
return true;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDFAttachment_GetStringValue(FPDF_ATTACHMENT attachment,
FPDF_WIDESTRING key,
void* buffer,
@@ -214,11 +213,10 @@ FPDFAttachment_GetStringValue(FPDF_ATTACHMENT attachment,
return Utf16EncodeMaybeCopyAndReturnLength(value, buffer, buflen);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
- FPDF_DOCUMENT document,
- const void* contents,
- const unsigned long len) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
+ FPDF_DOCUMENT document,
+ const void* contents,
+ const unsigned long len) {
CPDF_Object* pFile = CPDFObjectFromFPDFAttachment(attachment);
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pFile || !pFile->IsDictionary() || !pDoc || len > INT_MAX)
@@ -262,7 +260,7 @@ FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
return true;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDFAttachment_GetFile(FPDF_ATTACHMENT attachment,
void* buffer,
unsigned long buflen) {
diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp
index 8f81b3a840..b6088604fd 100644
--- a/fpdfsdk/fpdfdoc.cpp
+++ b/fpdfsdk/fpdfdoc.cpp
@@ -62,7 +62,7 @@ CPDF_LinkList* GetLinkList(CPDF_Page* page) {
} // namespace
-FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
+DLLEXPORT FPDF_BOOKMARK STDCALL
FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
@@ -73,7 +73,7 @@ FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
return tree.GetFirstChild(bookmark).GetDict();
}
-FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
+DLLEXPORT FPDF_BOOKMARK STDCALL
FPDFBookmark_GetNextSibling(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
if (!pDict)
return nullptr;
@@ -86,8 +86,9 @@ FPDFBookmark_GetNextSibling(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {
return tree.GetNextSibling(bookmark).GetDict();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFBookmark_GetTitle(FPDF_BOOKMARK pDict, void* buffer, unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFBookmark_GetTitle(FPDF_BOOKMARK pDict,
+ void* buffer,
+ unsigned long buflen) {
if (!pDict)
return 0;
CPDF_Bookmark bookmark(ToDictionary(static_cast<CPDF_Object*>(pDict)));
@@ -95,8 +96,8 @@ FPDFBookmark_GetTitle(FPDF_BOOKMARK pDict, void* buffer, unsigned long buflen) {
return Utf16EncodeMaybeCopyAndReturnLength(title, buffer, buflen);
}
-FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
-FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_WIDESTRING title) {
+DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_Find(FPDF_DOCUMENT document,
+ FPDF_WIDESTRING title) {
if (!title || title[0] == 0)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -109,8 +110,8 @@ FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_WIDESTRING title) {
return FindBookmark(tree, CPDF_Bookmark(), encodedTitle, &visited).GetDict();
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest(FPDF_DOCUMENT document,
- FPDF_BOOKMARK pDict) {
+DLLEXPORT FPDF_DEST STDCALL FPDFBookmark_GetDest(FPDF_DOCUMENT document,
+ FPDF_BOOKMARK pDict) {
if (!pDict)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -128,15 +129,14 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest(FPDF_DOCUMENT document,
return action.GetDest(pDoc).GetObject();
}
-FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV
-FPDFBookmark_GetAction(FPDF_BOOKMARK pDict) {
+DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK pDict) {
if (!pDict)
return nullptr;
CPDF_Bookmark bookmark(ToDictionary(static_cast<CPDF_Object*>(pDict)));
return bookmark.GetAction().GetDict();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType(FPDF_ACTION pDict) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION pDict) {
if (!pDict)
return PDFACTION_UNSUPPORTED;
@@ -156,8 +156,8 @@ FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType(FPDF_ACTION pDict) {
}
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest(FPDF_DOCUMENT document,
- FPDF_ACTION pDict) {
+DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document,
+ FPDF_ACTION pDict) {
if (!pDict)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -167,8 +167,9 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest(FPDF_DOCUMENT document,
return action.GetDest(pDoc).GetObject();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFAction_GetFilePath(FPDF_ACTION pDict, void* buffer, unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetFilePath(FPDF_ACTION pDict,
+ void* buffer,
+ unsigned long buflen) {
unsigned long type = FPDFAction_GetType(pDict);
if (type != PDFACTION_REMOTEGOTO && type != PDFACTION_LAUNCH)
return 0;
@@ -181,11 +182,10 @@ FPDFAction_GetFilePath(FPDF_ACTION pDict, void* buffer, unsigned long buflen) {
return len;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFAction_GetURIPath(FPDF_DOCUMENT document,
- FPDF_ACTION pDict,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document,
+ FPDF_ACTION pDict,
+ void* buffer,
+ unsigned long buflen) {
if (!pDict)
return 0;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -199,8 +199,8 @@ FPDFAction_GetURIPath(FPDF_DOCUMENT document,
return len;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST pDict) {
+DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document,
+ FPDF_DEST pDict) {
if (!pDict)
return 0;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -210,14 +210,13 @@ FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST pDict) {
return dest.GetPageIndex(pDoc);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFDest_GetLocationInPage(FPDF_DEST pDict,
- FPDF_BOOL* hasXVal,
- FPDF_BOOL* hasYVal,
- FPDF_BOOL* hasZoomVal,
- FS_FLOAT* x,
- FS_FLOAT* y,
- FS_FLOAT* zoom) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST pDict,
+ FPDF_BOOL* hasXVal,
+ FPDF_BOOL* hasYVal,
+ FPDF_BOOL* hasZoomVal,
+ FS_FLOAT* x,
+ FS_FLOAT* y,
+ FS_FLOAT* zoom) {
if (!pDict)
return false;
@@ -236,9 +235,9 @@ FPDFDest_GetLocationInPage(FPDF_DEST pDict,
return true;
}
-FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
- double x,
- double y) {
+DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
+ double x,
+ double y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return nullptr;
@@ -254,9 +253,9 @@ FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
.GetDict();
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
- double x,
- double y) {
+DLLEXPORT int STDCALL FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
+ double x,
+ double y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return -1;
@@ -272,8 +271,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
return z_order;
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest(FPDF_DOCUMENT document,
- FPDF_LINK pDict) {
+DLLEXPORT FPDF_DEST STDCALL FPDFLink_GetDest(FPDF_DOCUMENT document,
+ FPDF_LINK pDict) {
if (!pDict)
return nullptr;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -290,7 +289,7 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest(FPDF_DOCUMENT document,
return action.GetDest(pDoc).GetObject();
}
-FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction(FPDF_LINK pDict) {
+DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK pDict) {
if (!pDict)
return nullptr;
@@ -298,9 +297,9 @@ FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction(FPDF_LINK pDict) {
return link.GetAction().GetDict();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate(FPDF_PAGE page,
- int* startPos,
- FPDF_LINK* linkAnnot) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page,
+ int* startPos,
+ FPDF_LINK* linkAnnot) {
if (!startPos || !linkAnnot)
return false;
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
@@ -323,8 +322,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate(FPDF_PAGE page,
return false;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot,
- FS_RECTF* rect) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot,
+ FS_RECTF* rect) {
if (!linkAnnot || !rect)
return false;
CPDF_Dictionary* pAnnotDict =
@@ -337,7 +336,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot,
return true;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) {
+DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) {
if (!linkAnnot)
return 0;
CPDF_Dictionary* pAnnotDict =
@@ -348,10 +347,9 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) {
return static_cast<int>(pArray->GetCount() / 8);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
- int quadIndex,
- FS_QUADPOINTSF* quadPoints) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
+ int quadIndex,
+ FS_QUADPOINTSF* quadPoints) {
if (!linkAnnot || !quadPoints)
return false;
CPDF_Dictionary* pAnnotDict =
@@ -377,10 +375,10 @@ FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
return true;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText(FPDF_DOCUMENT document,
- FPDF_BYTESTRING tag,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING tag,
+ void* buffer,
+ unsigned long buflen) {
if (!tag)
return 0;
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
@@ -394,11 +392,10 @@ FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText(FPDF_DOCUMENT document,
return Utf16EncodeMaybeCopyAndReturnLength(text, buffer, buflen);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDF_GetPageLabel(FPDF_DOCUMENT document,
- int page_index,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDF_GetPageLabel(FPDF_DOCUMENT document,
+ int page_index,
+ void* buffer,
+ unsigned long buflen) {
if (page_index < 0)
return 0;
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
index f19e21c8ff..b4254e97c6 100644
--- a/fpdfsdk/fpdfeditimg.cpp
+++ b/fpdfsdk/fpdfeditimg.cpp
@@ -47,7 +47,7 @@ bool LoadJpegHelper(FPDF_PAGE* pages,
} // namespace
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
+DLLEXPORT FPDF_PAGEOBJECT STDCALL
FPDFPageObj_NewImageObj(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
@@ -58,7 +58,7 @@ FPDFPageObj_NewImageObj(FPDF_DOCUMENT document) {
return pImageObj.release();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
int nCount,
FPDF_PAGEOBJECT image_object,
@@ -66,7 +66,7 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
return LoadJpegHelper(pages, nCount, image_object, fileAccess, false);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
int nCount,
FPDF_PAGEOBJECT image_object,
@@ -74,14 +74,13 @@ FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
return LoadJpegHelper(pages, nCount, image_object, fileAccess, true);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
- double a,
- double b,
- double c,
- double d,
- double e,
- double f) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
+ double a,
+ double b,
+ double c,
+ double d,
+ double e,
+ double f) {
if (!image_object)
return false;
@@ -94,11 +93,10 @@ FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
- int nCount,
- FPDF_PAGEOBJECT image_object,
- FPDF_BITMAP bitmap) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
+ int nCount,
+ FPDF_PAGEOBJECT image_object,
+ FPDF_BITMAP bitmap) {
if (!image_object || !bitmap || !pages)
return false;
@@ -115,7 +113,7 @@ FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
return true;
}
-FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
+DLLEXPORT FPDF_BITMAP STDCALL
FPDFImageObj_GetBitmap(FPDF_PAGEOBJECT image_object) {
CPDF_PageObject* pObj = CPDFPageObjectFromFPDFPageObject(image_object);
if (!pObj || !pObj->IsImage())
@@ -142,7 +140,7 @@ FPDFImageObj_GetBitmap(FPDF_PAGEOBJECT image_object) {
return pBitmap.Leak();
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDFImageObj_GetImageDataDecoded(FPDF_PAGEOBJECT image_object,
void* buffer,
unsigned long buflen) {
@@ -161,7 +159,7 @@ FPDFImageObj_GetImageDataDecoded(FPDF_PAGEOBJECT image_object,
return DecodeStreamMaybeCopyAndReturnLength(pImgStream, buffer, buflen);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDFImageObj_GetImageDataRaw(FPDF_PAGEOBJECT image_object,
void* buffer,
unsigned long buflen) {
@@ -184,7 +182,7 @@ FPDFImageObj_GetImageDataRaw(FPDF_PAGEOBJECT image_object,
return len;
}
-FPDF_EXPORT int FPDF_CALLCONV
+DLLEXPORT int STDCALL
FPDFImageObj_GetImageFilterCount(FPDF_PAGEOBJECT image_object) {
CPDF_PageObject* pObj = CPDFPageObjectFromFPDFPageObject(image_object);
if (!pObj || !pObj->IsImage())
@@ -207,7 +205,7 @@ FPDFImageObj_GetImageFilterCount(FPDF_PAGEOBJECT image_object) {
return 0;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
+DLLEXPORT unsigned long STDCALL
FPDFImageObj_GetImageFilter(FPDF_PAGEOBJECT image_object,
int index,
void* buffer,
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 489053080c..91b966c384 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -95,7 +95,7 @@ void CalcBoundingBox(CPDF_PageObject* pPageObj) {
} // namespace
-FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
+DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
auto pDoc = pdfium::MakeUnique<CPDF_Document>(nullptr);
pDoc->CreateNewDoc();
@@ -123,16 +123,15 @@ FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
return FPDFDocumentFromCPDFDocument(pDoc.release());
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_Delete(FPDF_DOCUMENT document,
- int page_index) {
+DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) {
if (UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document))
pDoc->DeletePage(page_index);
}
-FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDFPage_New(FPDF_DOCUMENT document,
- int page_index,
- double width,
- double height) {
+DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
+ int page_index,
+ double width,
+ double height) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return nullptr;
@@ -162,13 +161,13 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDFPage_New(FPDF_DOCUMENT document,
#endif // PDF_ENABLE_XFA
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetRotation(FPDF_PAGE page) {
+DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
return IsPageObject(pPage) ? pPage->GetPageRotation() : -1;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertObject(FPDF_PAGE page,
- FPDF_PAGEOBJECT page_obj) {
+DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page,
+ FPDF_PAGEOBJECT page_obj) {
CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_obj);
if (!pPageObj)
return;
@@ -182,31 +181,31 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertObject(FPDF_PAGE page,
CalcBoundingBox(pPageObj);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObject(FPDF_PAGE page) {
+DLLEXPORT int STDCALL FPDFPage_CountObject(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!IsPageObject(pPage))
return -1;
return pdfium::CollectionSize<int>(*pPage->GetPageObjectList());
}
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPage_GetObject(FPDF_PAGE page,
- int index) {
+DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPage_GetObject(FPDF_PAGE page,
+ int index) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!IsPageObject(pPage))
return nullptr;
return pPage->GetPageObjectList()->GetPageObjectByIndex(index);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_HasTransparency(FPDF_PAGE page) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
return pPage && pPage->BackgroundAlphaNeeded();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPageObj_Destroy(FPDF_PAGEOBJECT page_obj) {
+DLLEXPORT void STDCALL FPDFPageObj_Destroy(FPDF_PAGEOBJECT page_obj) {
delete CPDFPageObjectFromFPDFPageObject(page_obj);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)
return false;
@@ -240,7 +239,7 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
return false;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFPageObj_GetType(FPDF_PAGEOBJECT pageObject) {
+DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)
return FPDF_PAGEOBJ_UNKNOWN;
@@ -248,7 +247,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPageObj_GetType(FPDF_PAGEOBJECT pageObject) {
return pPageObj->GetType();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GenerateContent(FPDF_PAGE page) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!IsPageObject(pPage))
return false;
@@ -258,14 +257,13 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GenerateContent(FPDF_PAGE page) {
return true;
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
- double a,
- double b,
- double c,
- double d,
- double e,
- double f) {
+DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
+ double a,
+ double b,
+ double c,
+ double d,
+ double e,
+ double f) {
CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
if (!pPageObj)
return;
@@ -274,9 +272,8 @@ FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
pPageObj->Transform(matrix);
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
- FPDF_BYTESTRING blend_mode) {
+DLLEXPORT void STDCALL FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
+ FPDF_BYTESTRING blend_mode) {
CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
if (!pPageObj)
return;
@@ -285,13 +282,13 @@ FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
pPageObj->SetDirty(true);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_TransformAnnots(FPDF_PAGE page,
- double a,
- double b,
- double c,
- double d,
- double e,
- double f) {
+DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page,
+ double a,
+ double b,
+ double c,
+ double d,
+ double e,
+ double f) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
@@ -320,8 +317,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_TransformAnnots(FPDF_PAGE page,
}
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetRotation(FPDF_PAGE page,
- int rotate) {
+DLLEXPORT void STDCALL FPDFPage_SetRotation(FPDF_PAGE page, int rotate) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!IsPageObject(pPage))
return;
@@ -347,12 +343,11 @@ FPDF_BOOL FPDFPageObj_SetFillColor(FPDF_PAGEOBJECT page_object,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPageObj_GetBounds(FPDF_PAGEOBJECT pageObject,
- float* left,
- float* bottom,
- float* right,
- float* top) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT pageObject,
+ float* left,
+ float* bottom,
+ float* right,
+ float* top) {
if (!pageObject)
return false;
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 19d47e6a44..2181df8406 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -26,30 +26,28 @@ static_assert(CFX_GraphStateData::LineJoinRound == FPDF_LINEJOIN_ROUND,
static_assert(CFX_GraphStateData::LineJoinBevel == FPDF_LINEJOIN_BEVEL,
"CFX_GraphStateData::LineJoinBevel value mismatch");
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewPath(float x,
- float y) {
+DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewPath(float x, float y) {
auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false);
pPathObj->DefaultStates();
return pPathObj.release(); // Caller takes ownership.
}
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewRect(float x,
- float y,
- float w,
- float h) {
+DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x,
+ float y,
+ float w,
+ float h) {
auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendRect(x, y, x + w, y + h);
pPathObj->DefaultStates();
return pPathObj.release(); // Caller takes ownership.
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A) {
if (!path || R > 255 || G > 255 || B > 255 || A > 255)
return false;
@@ -62,12 +60,11 @@ FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A) {
if (!path || !R || !G || !B || !A)
return false;
@@ -81,8 +78,8 @@ FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path,
+ float width) {
if (!path || width < 0.0f)
return false;
@@ -92,19 +89,19 @@ FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A) {
return FPDFPageObj_SetFillColor(path, R, G, B, A);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A) {
if (!path || !R || !G || !B || !A)
return false;
@@ -118,9 +115,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
- float x,
- float y) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
+ float x,
+ float y) {
if (!path)
return false;
@@ -130,9 +127,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_LineTo(FPDF_PAGEOBJECT path,
- float x,
- float y) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_LineTo(FPDF_PAGEOBJECT path,
+ float x,
+ float y) {
if (!path)
return false;
@@ -142,13 +139,13 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_LineTo(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
- float x1,
- float y1,
- float x2,
- float y2,
- float x3,
- float y3) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
+ float x1,
+ float y1,
+ float x2,
+ float y2,
+ float x3,
+ float y3) {
if (!path)
return false;
@@ -160,7 +157,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_Close(FPDF_PAGEOBJECT path) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_Close(FPDF_PAGEOBJECT path) {
if (!path)
return false;
@@ -173,9 +170,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_Close(FPDF_PAGEOBJECT path) {
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
- int fillmode,
- FPDF_BOOL stroke) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
+ int fillmode,
+ FPDF_BOOL stroke) {
if (!path)
return false;
@@ -192,8 +189,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
return true;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
- int line_join) {
+DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
+ int line_join) {
if (!path)
return;
if (line_join <
@@ -209,8 +206,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
pPathObj->SetDirty(true);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineCap(FPDF_PAGEOBJECT path,
- int line_cap) {
+DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT path, int line_cap) {
if (!path)
return;
if (line_cap < static_cast<int>(CFX_GraphStateData::LineCap::LineCapButt) ||
diff --git a/fpdfsdk/fpdfedittext.cpp b/fpdfsdk/fpdfedittext.cpp
index 47facb4345..f498917a19 100644
--- a/fpdfsdk/fpdfedittext.cpp
+++ b/fpdfsdk/fpdfedittext.cpp
@@ -396,10 +396,9 @@ void* LoadCompositeFont(CPDF_Document* pDoc,
} // namespace
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
-FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
- FPDF_BYTESTRING font,
- float font_size) {
+DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING font,
+ float font_size) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return nullptr;
@@ -415,8 +414,8 @@ FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
return pTextObj.release(); // Caller takes ownership.
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFText_SetText(FPDF_PAGEOBJECT text_object, FPDF_WIDESTRING text) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object,
+ FPDF_WIDESTRING text) {
auto* pTextObj = static_cast<CPDF_TextObject*>(text_object);
if (!pTextObj)
return false;
@@ -432,11 +431,11 @@ FPDFText_SetText(FPDF_PAGEOBJECT text_object, FPDF_WIDESTRING text) {
return true;
}
-FPDF_EXPORT FPDF_FONT FPDF_CALLCONV FPDFText_LoadFont(FPDF_DOCUMENT document,
- const uint8_t* data,
- uint32_t size,
- int font_type,
- FPDF_BOOL cid) {
+DLLEXPORT FPDF_FONT STDCALL FPDFText_LoadFont(FPDF_DOCUMENT document,
+ const uint8_t* data,
+ uint32_t size,
+ int font_type,
+ FPDF_BOOL cid) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc || !data || size == 0 ||
(font_type != FPDF_FONT_TYPE1 && font_type != FPDF_FONT_TRUETYPE)) {
@@ -455,16 +454,15 @@ FPDF_EXPORT FPDF_FONT FPDF_CALLCONV FPDFText_LoadFont(FPDF_DOCUMENT document,
: LoadSimpleFont(pDoc, std::move(pFont), data, size, font_type);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A) {
return FPDFPageObj_SetFillColor(text_object, R, G, B, A);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFFont_Close(FPDF_FONT font) {
+DLLEXPORT void STDCALL FPDFFont_Close(FPDF_FONT font) {
CPDF_Font* pFont = static_cast<CPDF_Font*>(font);
if (!pFont)
return;
@@ -478,7 +476,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFFont_Close(FPDF_FONT font) {
pPageData->ReleaseFont(pFont->GetFontDict());
}
-FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
+DLLEXPORT FPDF_PAGEOBJECT STDCALL
FPDFPageObj_CreateTextObj(FPDF_DOCUMENT document,
FPDF_FONT font,
float font_size) {
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index 6e142ed97c..7f4e3dfd69 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -151,11 +151,10 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
} // namespace
-FPDF_EXPORT int FPDF_CALLCONV
-FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- double page_x,
- double page_y) {
+DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ double page_x,
+ double page_y) {
if (!hHandle)
return -1;
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
@@ -210,11 +209,10 @@ FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
return -1;
}
-FPDF_EXPORT int FPDF_CALLCONV
-FPDFPage_FormFieldZOrderAtPoint(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- double page_x,
- double page_y) {
+DLLEXPORT int STDCALL FPDFPage_FormFieldZOrderAtPoint(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ double page_x,
+ double page_y) {
if (!hHandle)
return -1;
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
@@ -228,7 +226,7 @@ FPDFPage_FormFieldZOrderAtPoint(FPDF_FORMHANDLE hHandle,
return z_order;
}
-FPDF_EXPORT FPDF_FORMHANDLE FPDF_CALLCONV
+DLLEXPORT FPDF_FORMHANDLE STDCALL
FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document,
FPDF_FORMFILLINFO* formInfo) {
#ifdef PDF_ENABLE_XFA
@@ -261,7 +259,7 @@ FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document,
return pFormFillEnv.release(); // Caller takes ownership.
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
@@ -280,33 +278,33 @@ FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle) {
delete pFormFillEnv;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int modifier,
- double page_x,
- double page_y) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int modifier,
+ double page_x,
+ double page_y) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
return pPageView->OnMouseMove(CFX_PointF(page_x, page_y), modifier);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int modifier,
- double page_x,
- double page_y) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int modifier,
+ double page_x,
+ double page_y) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
return pPageView->OnLButtonDown(CFX_PointF(page_x, page_y), modifier);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int modifier,
- double page_x,
- double page_y) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int modifier,
+ double page_x,
+ double page_y) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
@@ -314,22 +312,22 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,
}
#ifdef PDF_ENABLE_XFA
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int modifier,
- double page_x,
- double page_y) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int modifier,
+ double page_x,
+ double page_y) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
return pPageView->OnRButtonDown(CFX_PointF(page_x, page_y), modifier);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int modifier,
- double page_x,
- double page_y) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int modifier,
+ double page_x,
+ double page_y) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
@@ -337,41 +335,40 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle,
}
#endif // PDF_ENABLE_XFA
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int nKeyCode,
- int modifier) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int nKeyCode,
+ int modifier) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
return pPageView->OnKeyDown(nKeyCode, modifier);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int nKeyCode,
- int modifier) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int nKeyCode,
+ int modifier) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
return pPageView->OnKeyUp(nKeyCode, modifier);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FORM_OnChar(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- int nChar,
- int modifier) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ int nChar,
+ int modifier) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return false;
return pPageView->OnChar(nChar, modifier);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FORM_GetSelectedText(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- void* buffer,
- unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FORM_GetSelectedText(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ void* buffer,
+ unsigned long buflen) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return 0;
@@ -386,9 +383,9 @@ FORM_GetSelectedText(FPDF_FORMHANDLE hHandle,
return form_text_len;
}
-FPDF_EXPORT void FPDF_CALLCONV FORM_ReplaceSelection(FPDF_FORMHANDLE hHandle,
- FPDF_PAGE page,
- FPDF_WIDESTRING wsText) {
+DLLEXPORT void STDCALL FORM_ReplaceSelection(FPDF_FORMHANDLE hHandle,
+ FPDF_PAGE page,
+ FPDF_WIDESTRING wsText) {
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
return;
@@ -399,8 +396,7 @@ FPDF_EXPORT void FPDF_CALLCONV FORM_ReplaceSelection(FPDF_FORMHANDLE hHandle,
pPageView->ReplaceSelection(wide_str_text);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle) {
+DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
if (!pFormFillEnv)
@@ -408,37 +404,37 @@ FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle) {
return pFormFillEnv->KillFocusAnnot(0);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
- FPDF_BITMAP bitmap,
- FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- int flags) {
+DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
+ FPDF_BITMAP bitmap,
+ FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int flags) {
FFLCommon(hHandle, bitmap, nullptr, page, start_x, start_y, size_x, size_y,
rotate, flags);
}
#ifdef _SKIA_SUPPORT_
-FPDF_EXPORT void FPDF_CALLCONV FPDF_FFLRecord(FPDF_FORMHANDLE hHandle,
- FPDF_RECORDER recorder,
- FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- int flags) {
+DLLEXPORT void STDCALL FPDF_FFLRecord(FPDF_FORMHANDLE hHandle,
+ FPDF_RECORDER recorder,
+ FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int flags) {
FFLCommon(hHandle, nullptr, recorder, page, start_x, start_y, size_x, size_y,
rotate, flags);
}
#endif
#ifdef PDF_ENABLE_XFA
-FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Undo(FPDF_DOCUMENT document,
- FPDF_WIDGET hWidget) {
+DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document,
+ FPDF_WIDGET hWidget) {
if (!hWidget || !document)
return;
@@ -451,8 +447,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Undo(FPDF_DOCUMENT document,
static_cast<CXFA_FFWidget*>(hWidget)->Undo();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Redo(FPDF_DOCUMENT document,
- FPDF_WIDGET hWidget) {
+DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document,
+ FPDF_WIDGET hWidget) {
if (!hWidget || !document)
return;
@@ -464,8 +460,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Redo(FPDF_DOCUMENT document,
static_cast<CXFA_FFWidget*>(hWidget)->Redo();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_SelectAll(FPDF_DOCUMENT document,
- FPDF_WIDGET hWidget) {
+DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document,
+ FPDF_WIDGET hWidget) {
if (!hWidget || !document)
return;
@@ -477,10 +473,10 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_SelectAll(FPDF_DOCUMENT document,
static_cast<CXFA_FFWidget*>(hWidget)->SelectAll();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Copy(FPDF_DOCUMENT document,
- FPDF_WIDGET hWidget,
- FPDF_WIDESTRING wsText,
- FPDF_DWORD* size) {
+DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document,
+ FPDF_WIDGET hWidget,
+ FPDF_WIDESTRING wsText,
+ FPDF_DWORD* size) {
if (!hWidget || !document)
return;
@@ -509,10 +505,10 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Copy(FPDF_DOCUMENT document,
*size = real_size;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Cut(FPDF_DOCUMENT document,
- FPDF_WIDGET hWidget,
- FPDF_WIDESTRING wsText,
- FPDF_DWORD* size) {
+DLLEXPORT void STDCALL FPDF_Widget_Cut(FPDF_DOCUMENT document,
+ FPDF_WIDGET hWidget,
+ FPDF_WIDESTRING wsText,
+ FPDF_DWORD* size) {
if (!hWidget || !document)
return;
@@ -541,10 +537,10 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Cut(FPDF_DOCUMENT document,
*size = real_size;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Paste(FPDF_DOCUMENT document,
- FPDF_WIDGET hWidget,
- FPDF_WIDESTRING wsText,
- FPDF_DWORD size) {
+DLLEXPORT void STDCALL FPDF_Widget_Paste(FPDF_DOCUMENT document,
+ FPDF_WIDGET hWidget,
+ FPDF_WIDESTRING wsText,
+ FPDF_DWORD size) {
if (!hWidget || !document)
return;
@@ -557,7 +553,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Paste(FPDF_DOCUMENT document,
static_cast<CXFA_FFWidget*>(hWidget)->Paste(wstr);
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document,
FPDF_WIDGET hWidget,
float x,
@@ -578,7 +574,7 @@ FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document,
static_cast<CXFA_FFWidget*>(hWidget)->ReplaceSpellCheckWord(ptPopup, bs);
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document,
FPDF_WIDGET hWidget,
float x,
@@ -603,13 +599,12 @@ FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document,
*stringHandle = ToFPDFStringHandle(sSuggestWords.release());
}
-FPDF_EXPORT int FPDF_CALLCONV
-FPDF_StringHandleCounts(FPDF_STRINGHANDLE sHandle) {
+DLLEXPORT int STDCALL FPDF_StringHandleCounts(FPDF_STRINGHANDLE sHandle) {
std::vector<CFX_ByteString>* sSuggestWords = FromFPDFStringHandle(sHandle);
return sSuggestWords ? pdfium::CollectionSize<int>(*sSuggestWords) : -1;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE sHandle,
int index,
FPDF_BYTESTRING bsText,
@@ -635,12 +630,12 @@ FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE sHandle,
return true;
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle) {
delete FromFPDFStringHandle(stringHandle);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle,
FPDF_BYTESTRING bsText,
FPDF_DWORD size) {
@@ -652,34 +647,32 @@ FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle,
}
#endif // PDF_ENABLE_XFA
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
- int fieldType,
- unsigned long color) {
+DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
+ int fieldType,
+ unsigned long color) {
if (CPDFSDK_InterForm* pInterForm = FormHandleToInterForm(hHandle))
pInterForm->SetHighlightColor(color, fieldType);
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle, unsigned char alpha) {
+DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle,
+ unsigned char alpha) {
if (CPDFSDK_InterForm* pInterForm = FormHandleToInterForm(hHandle))
pInterForm->SetHighlightAlpha(alpha);
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle) {
+DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle) {
if (CPDFSDK_InterForm* pInterForm = FormHandleToInterForm(hHandle))
pInterForm->RemoveAllHighLight();
}
-FPDF_EXPORT void FPDF_CALLCONV FORM_OnAfterLoadPage(FPDF_PAGE page,
- FPDF_FORMHANDLE hHandle) {
+DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page,
+ FPDF_FORMHANDLE hHandle) {
if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page))
pPageView->SetValid(true);
}
-FPDF_EXPORT void FPDF_CALLCONV FORM_OnBeforeClosePage(FPDF_PAGE page,
- FPDF_FORMHANDLE hHandle) {
+DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page,
+ FPDF_FORMHANDLE hHandle) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
if (!pFormFillEnv)
@@ -697,24 +690,22 @@ FPDF_EXPORT void FPDF_CALLCONV FORM_OnBeforeClosePage(FPDF_PAGE page,
}
}
-FPDF_EXPORT void FPDF_CALLCONV
-FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle) {
+DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
if (pFormFillEnv && pFormFillEnv->IsJSInitiated())
pFormFillEnv->ProcJavascriptFun();
}
-FPDF_EXPORT void FPDF_CALLCONV
-FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle) {
+DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
if (pFormFillEnv && pFormFillEnv->IsJSInitiated())
pFormFillEnv->ProcOpenAction();
}
-FPDF_EXPORT void FPDF_CALLCONV FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle,
- int aaType) {
+DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle,
+ int aaType) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
if (!pFormFillEnv)
@@ -735,9 +726,9 @@ FPDF_EXPORT void FPDF_CALLCONV FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle,
}
}
-FPDF_EXPORT void FPDF_CALLCONV FORM_DoPageAAction(FPDF_PAGE page,
- FPDF_FORMHANDLE hHandle,
- int aaType) {
+DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page,
+ FPDF_FORMHANDLE hHandle,
+ int aaType) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
HandleToCPDFSDKEnvironment(hHandle);
if (!pFormFillEnv)
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 905d53af48..bf52932a1d 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -344,10 +344,10 @@ uint32_t CPDF_PageOrganizer::GetNewObjId(ObjectNumberMap* pObjNumberMap,
return dwNewObjNum;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_ImportPages(FPDF_DOCUMENT dest_doc,
- FPDF_DOCUMENT src_doc,
- FPDF_BYTESTRING pagerange,
- int index) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_ImportPages(FPDF_DOCUMENT dest_doc,
+ FPDF_DOCUMENT src_doc,
+ FPDF_BYTESTRING pagerange,
+ int index) {
CPDF_Document* pDestDoc = CPDFDocumentFromFPDFDocument(dest_doc);
if (!dest_doc)
return false;
@@ -371,8 +371,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_ImportPages(FPDF_DOCUMENT dest_doc,
return pageOrg.PDFDocInit() && pageOrg.ExportPage(pageArray, index);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc, FPDF_DOCUMENT src_doc) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc,
+ FPDF_DOCUMENT src_doc) {
CPDF_Document* pDstDoc = CPDFDocumentFromFPDFDocument(dest_doc);
if (!pDstDoc)
return false;
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index 91f88503fc..ae9f2a17b8 100644
--- a/fpdfsdk/fpdfsave.cpp
+++ b/fpdfsdk/fpdfsave.cpp
@@ -274,16 +274,15 @@ bool FPDF_Doc_Save(FPDF_DOCUMENT document,
} // namespace
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_SaveAsCopy(FPDF_DOCUMENT document,
- FPDF_FILEWRITE* pFileWrite,
- FPDF_DWORD flags) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveAsCopy(FPDF_DOCUMENT document,
+ FPDF_FILEWRITE* pFileWrite,
+ FPDF_DWORD flags) {
return FPDF_Doc_Save(document, pFileWrite, flags, false, 0);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_SaveWithVersion(FPDF_DOCUMENT document,
- FPDF_FILEWRITE* pFileWrite,
- FPDF_DWORD flags,
- int fileVersion) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveWithVersion(FPDF_DOCUMENT document,
+ FPDF_FILEWRITE* pFileWrite,
+ FPDF_DWORD flags,
+ int fileVersion) {
return FPDF_Doc_Save(document, pFileWrite, flags, true, fileVersion);
}
diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp
index 70acf54ec7..916233c56e 100644
--- a/fpdfsdk/fpdftext.cpp
+++ b/fpdfsdk/fpdftext.cpp
@@ -43,7 +43,7 @@ CPDF_LinkExtract* CPDFLinkExtractFromFPDFPageLink(FPDF_PAGELINK link) {
} // namespace
-FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page) {
+DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page) {
CPDF_Page* pPDFPage = CPDFPageFromFPDFPage(page);
if (!pPDFPage)
return nullptr;
@@ -63,11 +63,11 @@ FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page) {
return textpage;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFText_ClosePage(FPDF_TEXTPAGE text_page) {
+DLLEXPORT void STDCALL FPDFText_ClosePage(FPDF_TEXTPAGE text_page) {
delete CPDFTextPageFromFPDFTextPage(text_page);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars(FPDF_TEXTPAGE text_page) {
+DLLEXPORT int STDCALL FPDFText_CountChars(FPDF_TEXTPAGE text_page) {
if (!text_page)
return -1;
@@ -75,8 +75,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars(FPDF_TEXTPAGE text_page) {
return textpage->CountChars();
}
-FPDF_EXPORT unsigned int FPDF_CALLCONV
-FPDFText_GetUnicode(FPDF_TEXTPAGE text_page, int index) {
+DLLEXPORT unsigned int STDCALL FPDFText_GetUnicode(FPDF_TEXTPAGE text_page,
+ int index) {
if (!text_page)
return 0;
@@ -89,8 +89,8 @@ FPDFText_GetUnicode(FPDF_TEXTPAGE text_page, int index) {
return charinfo.m_Unicode;
}
-FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
- int index) {
+DLLEXPORT double STDCALL FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
+ int index) {
if (!text_page)
return 0;
CPDF_TextPage* textpage = CPDFTextPageFromFPDFTextPage(text_page);
@@ -103,12 +103,12 @@ FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
return charinfo.m_FontSize;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
- int index,
- double* left,
- double* right,
- double* bottom,
- double* top) {
+DLLEXPORT void STDCALL FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
+ int index,
+ double* left,
+ double* right,
+ double* bottom,
+ double* top) {
if (!text_page)
return;
CPDF_TextPage* textpage = CPDFTextPageFromFPDFTextPage(text_page);
@@ -124,12 +124,11 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
}
// select
-FPDF_EXPORT int FPDF_CALLCONV
-FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
- double x,
- double y,
- double xTolerance,
- double yTolerance) {
+DLLEXPORT int STDCALL FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
+ double x,
+ double y,
+ double xTolerance,
+ double yTolerance) {
if (!text_page)
return -3;
@@ -140,10 +139,10 @@ FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
static_cast<float>(yTolerance)));
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText(FPDF_TEXTPAGE text_page,
- int start,
- int count,
- unsigned short* result) {
+DLLEXPORT int STDCALL FPDFText_GetText(FPDF_TEXTPAGE text_page,
+ int start,
+ int count,
+ unsigned short* result) {
if (!text_page)
return 0;
@@ -163,9 +162,9 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText(FPDF_TEXTPAGE text_page,
return cbUTF16str.GetLength() / sizeof(unsigned short);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects(FPDF_TEXTPAGE text_page,
- int start,
- int count) {
+DLLEXPORT int STDCALL FPDFText_CountRects(FPDF_TEXTPAGE text_page,
+ int start,
+ int count) {
if (!text_page)
return 0;
@@ -173,12 +172,12 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects(FPDF_TEXTPAGE text_page,
return textpage->CountRects(start, count);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetRect(FPDF_TEXTPAGE text_page,
- int rect_index,
- double* left,
- double* top,
- double* right,
- double* bottom) {
+DLLEXPORT void STDCALL FPDFText_GetRect(FPDF_TEXTPAGE text_page,
+ int rect_index,
+ double* left,
+ double* top,
+ double* right,
+ double* bottom) {
if (!text_page)
return;
@@ -191,13 +190,13 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetRect(FPDF_TEXTPAGE text_page,
*bottom = rect.bottom;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page,
- double left,
- double top,
- double right,
- double bottom,
- unsigned short* buffer,
- int buflen) {
+DLLEXPORT int STDCALL FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page,
+ double left,
+ double top,
+ double right,
+ double bottom,
+ unsigned short* buffer,
+ int buflen) {
if (!text_page)
return 0;
@@ -220,11 +219,10 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page,
// Search
// -1 for end
-FPDF_EXPORT FPDF_SCHHANDLE FPDF_CALLCONV
-FPDFText_FindStart(FPDF_TEXTPAGE text_page,
- FPDF_WIDESTRING findwhat,
- unsigned long flags,
- int start_index) {
+DLLEXPORT FPDF_SCHHANDLE STDCALL FPDFText_FindStart(FPDF_TEXTPAGE text_page,
+ FPDF_WIDESTRING findwhat,
+ unsigned long flags,
+ int start_index) {
if (!text_page)
return nullptr;
@@ -236,7 +234,7 @@ FPDFText_FindStart(FPDF_TEXTPAGE text_page,
return textpageFind;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext(FPDF_SCHHANDLE handle) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle) {
if (!handle)
return false;
@@ -244,7 +242,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext(FPDF_SCHHANDLE handle) {
return textpageFind->FindNext();
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindPrev(FPDF_SCHHANDLE handle) {
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle) {
if (!handle)
return false;
@@ -252,8 +250,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindPrev(FPDF_SCHHANDLE handle) {
return textpageFind->FindPrev();
}
-FPDF_EXPORT int FPDF_CALLCONV
-FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle) {
+DLLEXPORT int STDCALL FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle) {
if (!handle)
return 0;
@@ -261,7 +258,7 @@ FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle) {
return textpageFind->GetCurOrder();
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchCount(FPDF_SCHHANDLE handle) {
+DLLEXPORT int STDCALL FPDFText_GetSchCount(FPDF_SCHHANDLE handle) {
if (!handle)
return 0;
@@ -269,7 +266,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchCount(FPDF_SCHHANDLE handle) {
return textpageFind->GetMatchedCount();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose(FPDF_SCHHANDLE handle) {
+DLLEXPORT void STDCALL FPDFText_FindClose(FPDF_SCHHANDLE handle) {
if (!handle)
return;
@@ -279,8 +276,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose(FPDF_SCHHANDLE handle) {
}
// web link
-FPDF_EXPORT FPDF_PAGELINK FPDF_CALLCONV
-FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page) {
+DLLEXPORT FPDF_PAGELINK STDCALL FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page) {
if (!text_page)
return nullptr;
@@ -290,7 +286,7 @@ FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page) {
return pageLink;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountWebLinks(FPDF_PAGELINK link_page) {
+DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page) {
if (!link_page)
return 0;
@@ -298,10 +294,10 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountWebLinks(FPDF_PAGELINK link_page) {
return pdfium::base::checked_cast<int>(pageLink->CountLinks());
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetURL(FPDF_PAGELINK link_page,
- int link_index,
- unsigned short* buffer,
- int buflen) {
+DLLEXPORT int STDCALL FPDFLink_GetURL(FPDF_PAGELINK link_page,
+ int link_index,
+ unsigned short* buffer,
+ int buflen) {
CFX_WideString wsUrl(L"");
if (link_page && link_index >= 0) {
CPDF_LinkExtract* pageLink = CPDFLinkExtractFromFPDFPageLink(link_page);
@@ -320,8 +316,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetURL(FPDF_PAGELINK link_page,
return size;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountRects(FPDF_PAGELINK link_page,
- int link_index) {
+DLLEXPORT int STDCALL FPDFLink_CountRects(FPDF_PAGELINK link_page,
+ int link_index) {
if (!link_page || link_index < 0)
return 0;
@@ -329,13 +325,13 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountRects(FPDF_PAGELINK link_page,
return pdfium::CollectionSize<int>(pageLink->GetRects(link_index));
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFLink_GetRect(FPDF_PAGELINK link_page,
- int link_index,
- int rect_index,
- double* left,
- double* top,
- double* right,
- double* bottom) {
+DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page,
+ int link_index,
+ int rect_index,
+ double* left,
+ double* top,
+ double* right,
+ double* bottom) {
if (!link_page || link_index < 0 || rect_index < 0)
return;
@@ -350,6 +346,6 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFLink_GetRect(FPDF_PAGELINK link_page,
*bottom = rectArray[rect_index].bottom;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) {
+DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) {
delete CPDFLinkExtractFromFPDFPageLink(link_page);
}
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index c9d6bee40e..57e4806d39 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -439,11 +439,11 @@ FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy) {
}
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_InitLibrary() {
+DLLEXPORT void STDCALL FPDF_InitLibrary() {
FPDF_InitLibraryWithConfig(nullptr);
}
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* cfg) {
if (g_bLibraryInitialized)
return;
@@ -466,7 +466,7 @@ FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* cfg) {
g_bLibraryInitialized = true;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
+DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
if (!g_bLibraryInitialized)
return;
@@ -517,29 +517,28 @@ void ProcessParseError(CPDF_Parser::Error err) {
SetLastError(err_code);
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_SetSandBoxPolicy(FPDF_DWORD policy,
- FPDF_BOOL enable) {
+DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy,
+ FPDF_BOOL enable) {
return FSDK_SetSandBoxPolicy(policy, enable);
}
#if defined(_WIN32)
#if defined(PDFIUM_PRINT_TEXT_WITH_GDI)
-FPDF_EXPORT void FPDF_CALLCONV
+DLLEXPORT void STDCALL
FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func) {
g_pdfium_typeface_accessible_func = func;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi) {
+DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi) {
g_pdfium_print_text_with_gdi = !!use_gdi;
}
#endif // PDFIUM_PRINT_TEXT_WITH_GDI
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_SetPrintPostscriptLevel(int postscript_level) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintPostscriptLevel(int postscript_level) {
return postscript_level != 1 && FPDF_SetPrintMode(postscript_level);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_SetPrintMode(int mode) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintMode(int mode) {
if (mode < FPDF_PRINTMODE_EMF || mode > FPDF_PRINTMODE_POSTSCRIPT3)
return FALSE;
g_pdfium_print_mode = mode;
@@ -547,8 +546,8 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_SetPrintMode(int mode) {
}
#endif // defined(_WIN32)
-FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV
-FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password) {
+DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
+ FPDF_BYTESTRING password) {
// NOTE: the creation of the file needs to be by the embedder on the
// other side of this API.
return LoadDocumentImpl(
@@ -557,8 +556,8 @@ FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BYTESTRING password) {
}
#ifdef PDF_ENABLE_XFA
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_HasXFAField(FPDF_DOCUMENT document,
- int* docType) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document,
+ int* docType) {
if (!document)
return false;
@@ -584,7 +583,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_HasXFAField(FPDF_DOCUMENT document,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_LoadXFA(FPDF_DOCUMENT document) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_LoadXFA(FPDF_DOCUMENT document) {
return document && (static_cast<CPDFXFA_Context*>(document))->LoadXFADoc();
}
#endif // PDF_ENABLE_XFA
@@ -616,20 +615,21 @@ class CMemFile final : public IFX_SeekableReadStream {
const FX_FILESIZE m_size;
};
-FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV
-FPDF_LoadMemDocument(const void* data_buf, int size, FPDF_BYTESTRING password) {
+DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf,
+ int size,
+ FPDF_BYTESTRING password) {
return LoadDocumentImpl(CMemFile::Create((uint8_t*)data_buf, size), password);
}
-FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV
+DLLEXPORT FPDF_DOCUMENT STDCALL
FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAccess,
FPDF_BYTESTRING password) {
return LoadDocumentImpl(pdfium::MakeRetain<CPDF_CustomAccess>(pFileAccess),
password);
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_GetFileVersion(FPDF_DOCUMENT doc,
- int* fileVersion) {
+DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc,
+ int* fileVersion) {
if (!fileVersion)
return false;
@@ -648,8 +648,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_GetFileVersion(FPDF_DOCUMENT doc,
// jabdelmalek: changed return type from uint32_t to build on Linux (and match
// header).
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDF_GetDocPermissions(FPDF_DOCUMENT document) {
+DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
// https://bugs.chromium.org/p/pdfium/issues/detail?id=499
if (!pDoc) {
@@ -663,8 +662,7 @@ FPDF_GetDocPermissions(FPDF_DOCUMENT document) {
return pDoc->GetUserPermissions();
}
-FPDF_EXPORT int FPDF_CALLCONV
-FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) {
+DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc || !pDoc->GetParser())
return -1;
@@ -673,13 +671,13 @@ FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) {
return pDict ? pDict->GetIntegerFor("R") : -1;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageCount(FPDF_DOCUMENT document) {
+DLLEXPORT int STDCALL FPDF_GetPageCount(FPDF_DOCUMENT document) {
UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document);
return pDoc ? pDoc->GetPageCount() : 0;
}
-FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document,
- int page_index) {
+DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document,
+ int page_index) {
UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document);
if (!pDoc)
return nullptr;
@@ -700,12 +698,12 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document,
#endif // PDF_ENABLE_XFA
}
-FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageWidth(FPDF_PAGE page) {
+DLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page) {
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
return pPage ? pPage->GetPageWidth() : 0.0;
}
-FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageHeight(FPDF_PAGE page) {
+DLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page) {
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
return pPage ? pPage->GetPageHeight() : 0.0;
}
@@ -839,14 +837,14 @@ void RenderBitmap(CFX_RenderDevice* device,
} // namespace
-FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc,
- FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- int flags) {
+DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
+ FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int flags) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
@@ -936,14 +934,14 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc,
}
#endif // defined(_WIN32)
-FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
- FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- int flags) {
+DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
+ FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int flags) {
if (!bitmap)
return;
@@ -969,12 +967,11 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
pPage->SetRenderContext(nullptr);
}
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap,
- FPDF_PAGE page,
- const FS_MATRIX* matrix,
- const FS_RECTF* clipping,
- int flags) {
+DLLEXPORT void STDCALL FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap,
+ FPDF_PAGE page,
+ const FS_MATRIX* matrix,
+ const FS_RECTF* clipping,
+ int flags) {
if (!bitmap)
return;
@@ -1013,9 +1010,9 @@ FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap,
}
#ifdef _SKIA_SUPPORT_
-FPDF_EXPORT FPDF_RECORDER FPDF_CALLCONV FPDF_RenderPageSkp(FPDF_PAGE page,
- int size_x,
- int size_y) {
+DLLEXPORT FPDF_RECORDER STDCALL FPDF_RenderPageSkp(FPDF_PAGE page,
+ int size_x,
+ int size_y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return nullptr;
@@ -1032,7 +1029,7 @@ FPDF_EXPORT FPDF_RECORDER FPDF_CALLCONV FPDF_RenderPageSkp(FPDF_PAGE page,
}
#endif
-FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page) {
+DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page) {
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
if (!page)
return;
@@ -1065,24 +1062,24 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page) {
#endif // PDF_ENABLE_XFA
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_CloseDocument(FPDF_DOCUMENT document) {
+DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document) {
delete UnderlyingFromFPDFDocument(document);
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetLastError() {
+DLLEXPORT unsigned long STDCALL FPDF_GetLastError() {
return GetLastError();
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_DeviceToPage(FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- int device_x,
- int device_y,
- double* page_x,
- double* page_y) {
+DLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int device_x,
+ int device_y,
+ double* page_x,
+ double* page_y) {
if (!page || !page_x || !page_y)
return;
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
@@ -1101,16 +1098,16 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DeviceToPage(FPDF_PAGE page,
#endif // PDF_ENABLE_XFA
}
-FPDF_EXPORT void FPDF_CALLCONV FPDF_PageToDevice(FPDF_PAGE page,
- int start_x,
- int start_y,
- int size_x,
- int size_y,
- int rotate,
- double page_x,
- double page_y,
- int* device_x,
- int* device_y) {
+DLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ double page_x,
+ double page_y,
+ int* device_x,
+ int* device_y) {
if (!device_x || !device_y)
return;
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
@@ -1130,9 +1127,9 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_PageToDevice(FPDF_PAGE page,
#endif // PDF_ENABLE_XFA
}
-FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFBitmap_Create(int width,
- int height,
- int alpha) {
+DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create(int width,
+ int height,
+ int alpha) {
auto pBitmap = pdfium::MakeRetain<CFX_DIBitmap>();
if (!pBitmap->Create(width, height, alpha ? FXDIB_Argb : FXDIB_Rgb32))
return nullptr;
@@ -1140,11 +1137,11 @@ FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFBitmap_Create(int width,
return pBitmap.Leak();
}
-FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFBitmap_CreateEx(int width,
- int height,
- int format,
- void* first_scan,
- int stride) {
+DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width,
+ int height,
+ int format,
+ void* first_scan,
+ int stride) {
FXDIB_Format fx_format;
switch (format) {
case FPDFBitmap_Gray:
@@ -1167,7 +1164,7 @@ FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV FPDFBitmap_CreateEx(int width,
return pBitmap.Leak();
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetFormat(FPDF_BITMAP bitmap) {
+DLLEXPORT int STDCALL FPDFBitmap_GetFormat(FPDF_BITMAP bitmap) {
if (!bitmap)
return FPDFBitmap_Unknown;
@@ -1187,12 +1184,12 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetFormat(FPDF_BITMAP bitmap) {
}
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_FillRect(FPDF_BITMAP bitmap,
- int left,
- int top,
- int width,
- int height,
- FPDF_DWORD color) {
+DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap,
+ int left,
+ int top,
+ int width,
+ int height,
+ FPDF_DWORD color) {
if (!bitmap)
return;
@@ -1205,23 +1202,23 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_FillRect(FPDF_BITMAP bitmap,
device.FillRect(&rect, color);
}
-FPDF_EXPORT void* FPDF_CALLCONV FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap) {
+DLLEXPORT void* STDCALL FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap) {
return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetBuffer() : nullptr;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetWidth(FPDF_BITMAP bitmap) {
+DLLEXPORT int STDCALL FPDFBitmap_GetWidth(FPDF_BITMAP bitmap) {
return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetWidth() : 0;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetHeight(FPDF_BITMAP bitmap) {
+DLLEXPORT int STDCALL FPDFBitmap_GetHeight(FPDF_BITMAP bitmap) {
return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetHeight() : 0;
}
-FPDF_EXPORT int FPDF_CALLCONV FPDFBitmap_GetStride(FPDF_BITMAP bitmap) {
+DLLEXPORT int STDCALL FPDFBitmap_GetStride(FPDF_BITMAP bitmap) {
return bitmap ? CFXBitmapFromFPDFBitmap(bitmap)->GetPitch() : 0;
}
-FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_Destroy(FPDF_BITMAP bitmap) {
+DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap) {
CFX_RetainPtr<CFX_DIBitmap> destroyer;
destroyer.Unleak(CFXBitmapFromFPDFBitmap(bitmap));
}
@@ -1246,10 +1243,10 @@ void FPDF_RenderPage_Retail(CPDF_PageRenderContext* pContext,
flags, bNeedToRestore, pause);
}
-FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document,
- int page_index,
- double* width,
- double* height) {
+DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document,
+ int page_index,
+ double* width,
+ double* height) {
UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document);
if (!pDoc)
return false;
@@ -1276,7 +1273,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document,
return true;
}
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+DLLEXPORT FPDF_BOOL STDCALL
FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
@@ -1285,8 +1282,7 @@ FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document) {
return viewRef.PrintScaling();
}
-FPDF_EXPORT int FPDF_CALLCONV
-FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) {
+DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return 1;
@@ -1294,7 +1290,7 @@ FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) {
return viewRef.NumCopies();
}
-FPDF_EXPORT FPDF_PAGERANGE FPDF_CALLCONV
+DLLEXPORT FPDF_PAGERANGE STDCALL
FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
@@ -1303,7 +1299,7 @@ FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document) {
return viewRef.PrintPageRange();
}
-FPDF_EXPORT FPDF_DUPLEXTYPE FPDF_CALLCONV
+DLLEXPORT FPDF_DUPLEXTYPE STDCALL
FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
@@ -1319,11 +1315,10 @@ FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) {
return DuplexUndefined;
}
-FPDF_EXPORT unsigned long FPDF_CALLCONV
-FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document,
- FPDF_BYTESTRING key,
- char* buffer,
- unsigned long length) {
+DLLEXPORT unsigned long STDCALL FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING key,
+ char* buffer,
+ unsigned long length) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return 0;
@@ -1339,8 +1334,7 @@ FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document,
return dwStringLen;
}
-FPDF_EXPORT FPDF_DWORD FPDF_CALLCONV
-FPDF_CountNamedDests(FPDF_DOCUMENT document) {
+DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return 0;
@@ -1361,8 +1355,8 @@ FPDF_CountNamedDests(FPDF_DOCUMENT document) {
return count.ValueOrDie();
}
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV
-FPDF_GetNamedDestByName(FPDF_DOCUMENT document, FPDF_BYTESTRING name) {
+DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING name) {
if (!name || name[0] == 0)
return nullptr;
@@ -1375,7 +1369,7 @@ FPDF_GetNamedDestByName(FPDF_DOCUMENT document, FPDF_BYTESTRING name) {
}
#ifdef PDF_ENABLE_XFA
-FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Init(FPDF_BSTR* str) {
+DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str) {
if (!str)
return -1;
@@ -1383,9 +1377,9 @@ FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Init(FPDF_BSTR* str) {
return 0;
}
-FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Set(FPDF_BSTR* str,
- FPDF_LPCSTR bstr,
- int length) {
+DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Set(FPDF_BSTR* str,
+ FPDF_LPCSTR bstr,
+ int length) {
if (!str)
return -1;
if (!bstr || !length)
@@ -1414,7 +1408,7 @@ FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Set(FPDF_BSTR* str,
return 0;
}
-FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Clear(FPDF_BSTR* str) {
+DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str) {
if (!str)
return -1;
@@ -1427,10 +1421,10 @@ FPDF_EXPORT FPDF_RESULT FPDF_CALLCONV FPDF_BStr_Clear(FPDF_BSTR* str) {
}
#endif // PDF_ENABLE_XFA
-FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDF_GetNamedDest(FPDF_DOCUMENT document,
- int index,
- void* buffer,
- long* buflen) {
+DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document,
+ int index,
+ void* buffer,
+ long* buflen) {
if (!buffer)
*buflen = 0;