Rename DLLEXPORT AND STDCALL
This CL renames DLLEXPORT to FPDF_EXPORT and STDCALL to FPDF_CALLCONV to
be more PDFium specific.
This is split off of https://pdfium-review.googlesource.com/c/8970 by
Felix Kauselmann.
Bug: pdfium:825
Change-Id: I0aea9d43f1714b1e10e935c4a7eea685a5ad8998
Reviewed-on: https://pdfium-review.googlesource.com/10610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h
index c0f9a6e..243896e 100644
--- a/public/fpdf_annot.h
+++ b/public/fpdf_annot.h
@@ -8,7 +8,9 @@
// NOLINTNEXTLINE(build/include)
#include "fpdfview.h"
+// NOLINTNEXTLINE(build/include)
#include "fpdf_doc.h"
+// NOLINTNEXTLINE(build/include)
#include "fpdf_formfill.h"
#ifdef __cplusplus
@@ -96,7 +98,7 @@
// subtype - the subtype to be checked.
//
// Returns true if this subtype supported.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFAnnot_IsSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype);
// Experimental API.
@@ -109,7 +111,7 @@
// subtype - the subtype of the new annotation.
//
// Returns a handle to the new annotation object, or NULL on failure.
-DLLEXPORT FPDF_ANNOTATION STDCALL
+FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV
FPDFPage_CreateAnnot(FPDF_PAGE page, FPDF_ANNOTATION_SUBTYPE subtype);
// Experimental API.
@@ -118,7 +120,7 @@
// page - handle to a page.
//
// Returns the number of annotations in |page|.
-DLLEXPORT int STDCALL FPDFPage_GetAnnotCount(FPDF_PAGE page);
+FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotCount(FPDF_PAGE page);
// Experimental API.
// Get annotation in |page| at |index|. Must call FPDFPage_CloseAnnot() when the
@@ -128,7 +130,8 @@
// index - the index of the annotation.
//
// Returns a handle to the annotation object, or NULL on failure.
-DLLEXPORT FPDF_ANNOTATION STDCALL FPDFPage_GetAnnot(FPDF_PAGE page, int index);
+FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFPage_GetAnnot(FPDF_PAGE page,
+ int index);
// Experimental API.
// Close an annotation. Must be called when the annotation returned by
@@ -136,7 +139,7 @@
// function does not remove the annotation from the document.
//
// annot - handle to an annotation.
-DLLEXPORT void STDCALL FPDFPage_CloseAnnot(FPDF_ANNOTATION annot);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPage_CloseAnnot(FPDF_ANNOTATION annot);
// Experimental API.
// Remove the annotation in |page| at |index|.
@@ -145,7 +148,8 @@
// index - the index of the annotation.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPage_RemoveAnnot(FPDF_PAGE page, int index);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_RemoveAnnot(FPDF_PAGE page,
+ int index);
// Experimental API.
// Get the subtype of an annotation.
@@ -153,7 +157,7 @@
// annot - handle to an annotation.
//
// Returns the annotation subtype.
-DLLEXPORT FPDF_ANNOTATION_SUBTYPE STDCALL
+FPDF_EXPORT FPDF_ANNOTATION_SUBTYPE FPDF_CALLCONV
FPDFAnnot_GetSubtype(FPDF_ANNOTATION annot);
// Experimental API.
@@ -164,7 +168,7 @@
// subtype - the subtype to be checked.
//
// Returns true if this subtype supported.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFAnnot_IsObjectSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype);
// Experimental API.
@@ -178,8 +182,8 @@
// obj - handle to the object that |annot| needs to update.
//
// Return true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_UpdateObject(FPDF_ANNOTATION annot,
- FPDF_PAGEOBJECT obj);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFAnnot_UpdateObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj);
// Experimental API.
// Add |obj| to |annot|. |obj| must have been created by
@@ -192,8 +196,8 @@
// obj - handle to the object that is to be added to |annot|.
//
// Return true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_AppendObject(FPDF_ANNOTATION annot,
- FPDF_PAGEOBJECT obj);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFAnnot_AppendObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj);
// Experimental API.
// Get the total number of objects in |annot|, including path objects, text
@@ -202,7 +206,7 @@
// annot - handle to an annotation.
//
// Returns the number of objects in |annot|.
-DLLEXPORT int STDCALL FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot);
+FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot);
// Experimental API.
// Get the object in |annot| at |index|.
@@ -211,8 +215,8 @@
// index - the index of the object.
//
// Return a handle to the object, or NULL on failure.
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFAnnot_GetObject(FPDF_ANNOTATION annot,
- int index);
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
+FPDFAnnot_GetObject(FPDF_ANNOTATION annot, int index);
// Experimental API.
// Remove the object in |annot| at |index|.
@@ -221,8 +225,8 @@
// index - the index of the object to be removed.
//
// Return true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_RemoveObject(FPDF_ANNOTATION annot,
- int index);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFAnnot_RemoveObject(FPDF_ANNOTATION annot, int index);
// Experimental API.
// Set the color of an annotation. Fails when called on annotations with
@@ -235,12 +239,12 @@
// A - buffer to hold the opacity. Ranges from 0 to 255.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetColor(FPDF_ANNOTATION annot,
- FPDFANNOT_COLORTYPE type,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A);
+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);
// Experimental API.
// Get the color of an annotation. If no color is specified, default to yellow
@@ -254,12 +258,12 @@
// A - buffer to hold the opacity. Ranges from 0 to 255.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_GetColor(FPDF_ANNOTATION annot,
- FPDFANNOT_COLORTYPE type,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A);
+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);
// Experimental API.
// Check if the annotation is of a type that has attachment points
@@ -273,7 +277,7 @@
//
// Returns true if the annotation is of a type that has quadpoints, false
// otherwise.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFAnnot_HasAttachmentPoints(FPDF_ANNOTATION annot);
// Experimental API.
@@ -285,7 +289,7 @@
// quadPoints - the quadpoints to be set.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot,
const FS_QUADPOINTSF* quadPoints);
@@ -297,7 +301,7 @@
// annot - handle to an annotation.
//
// Returns a quadpoints object, or an empty set of quadpoints on failure.
-DLLEXPORT FS_QUADPOINTSF STDCALL
+FPDF_EXPORT FS_QUADPOINTSF FPDF_CALLCONV
FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot);
// Experimental API.
@@ -309,8 +313,8 @@
// rect - the annotation rectangle to be set.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
- const FS_RECTF* rect);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
+ const FS_RECTF* rect);
// Experimental API.
// Get the annotation rectangle defining the location of the annotation. If the
@@ -320,7 +324,7 @@
// annot - handle to an annotation.
//
// Returns a rectangle object, or an empty rectangle on failure.
-DLLEXPORT FS_RECTF STDCALL FPDFAnnot_GetRect(FPDF_ANNOTATION annot);
+FPDF_EXPORT FS_RECTF FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot);
// Experimental API.
// Check if |annot|'s dictionary has |key| as a key.
@@ -329,8 +333,8 @@
// key - the key to look for.
//
// Returns true if |key| exists.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_HasKey(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_HasKey(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key);
// Experimental API.
// Get the type of the value corresponding to |key| in |annot|'s dictionary.
@@ -339,8 +343,8 @@
// key - the key to look for.
//
// Returns the type of the dictionary value.
-DLLEXPORT FPDF_OBJECT_TYPE STDCALL FPDFAnnot_GetValueType(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key);
+FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV
+FPDFAnnot_GetValueType(FPDF_ANNOTATION annot, FPDF_WIDESTRING key);
// Experimental API.
// Set the string value corresponding to |key| in |annot|'s dictionary,
@@ -352,9 +356,10 @@
// value - the string value to be set, encoded in UTF16-LE.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetStringValue(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key,
- FPDF_WIDESTRING value);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFAnnot_SetStringValue(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key,
+ FPDF_WIDESTRING value);
// Experimental API.
// Get the string value corresponding to |key| in |annot|'s dictionary. |buffer|
@@ -371,10 +376,11 @@
// buflen - length of the buffer.
//
// Returns the length of the string value.
-DLLEXPORT unsigned long STDCALL FPDFAnnot_GetStringValue(FPDF_ANNOTATION annot,
- FPDF_WIDESTRING key,
- void* buffer,
- unsigned long buflen);
+FPDF_EXPORT unsigned long FPDF_CALLCONV
+FPDFAnnot_GetStringValue(FPDF_ANNOTATION annot,
+ FPDF_WIDESTRING key,
+ void* buffer,
+ unsigned long buflen);
// Experimental API.
// Get the annotation flags of |annot|.
@@ -382,7 +388,7 @@
// annot - handle to an annotation.
//
// Returns the annotation flags.
-DLLEXPORT int STDCALL FPDFAnnot_GetFlags(FPDF_ANNOTATION annot);
+FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetFlags(FPDF_ANNOTATION annot);
// Experimental API.
// Set the |annot|'s flags to be of the value |flags|.
@@ -391,8 +397,8 @@
// flags - the flag values to be set.
//
// Returns true if successful.
-DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetFlags(FPDF_ANNOTATION annot,
- int flags);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetFlags(FPDF_ANNOTATION annot,
+ int flags);
// Experimental API.
// Get the annotation flags of |annot|, which is an interactive form
@@ -402,8 +408,8 @@
// annot - handle to an interactive form annotation.
//
// Returns the annotation flags specific to interactive forms.
-DLLEXPORT int STDCALL FPDFAnnot_GetFormFieldFlags(FPDF_PAGE page,
- FPDF_ANNOTATION annot);
+FPDF_EXPORT int FPDF_CALLCONV
+FPDFAnnot_GetFormFieldFlags(FPDF_PAGE page, FPDF_ANNOTATION annot);
// Experimental API.
// Retrieves an interactive form annotation whose rectangle contains a given
@@ -419,7 +425,7 @@
//
// Returns the interactive form annotation whose rectangle contains the given
// coordinates on the page. If there is no such annotation, return NULL.
-DLLEXPORT FPDF_ANNOTATION STDCALL
+FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV
FPDFAnnot_GetFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
FPDF_PAGE page,
double page_x,