summaryrefslogtreecommitdiff
path: root/public/fpdf_edit.h
diff options
context:
space:
mode:
authorFelix Kauselmann <licorn@gmail.com>2017-08-09 21:44:31 +0200
committerChromium commit bot <commit-bot@chromium.org>2017-08-09 20:14:43 +0000
commit00334675c18a0203f313cceb670c970a77280f49 (patch)
tree431cc04539913358cedf9f1386b7dda0e3982562 /public/fpdf_edit.h
parentd0f2dcd0802969494e991d8cef00b4bd81aefc8d (diff)
downloadpdfium-00334675c18a0203f313cceb670c970a77280f49.tar.xz
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>
Diffstat (limited to 'public/fpdf_edit.h')
-rw-r--r--public/fpdf_edit.h256
1 files changed, 134 insertions, 122 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 54127d80ea..f75744599f 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -54,7 +54,7 @@ extern "C" {
// Create a new PDF document.
//
// Returns a handle to a new document, or NULL on failure.
-DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument();
+FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument();
// Create a new PDF page.
//
@@ -69,16 +69,17 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument();
//
// The page should be closed with CPDF_ClosePage() when finished as
// with any other page in the document.
-DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
- int page_index,
- double width,
- double height);
+FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDFPage_New(FPDF_DOCUMENT document,
+ int page_index,
+ double width,
+ double height);
// Delete the page at |page_index|.
//
// document - handle to document.
// page_index - the index of the page to delete.
-DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPage_Delete(FPDF_DOCUMENT document,
+ int page_index);
// Get the rotation of |page|.
//
@@ -89,7 +90,7 @@ DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index);
// 1 - Rotated 90 degrees clockwise.
// 2 - Rotated 180 degrees clockwise.
// 3 - Rotated 270 degrees clockwise.
-DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page);
+FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetRotation(FPDF_PAGE page);
// Set rotation for |page|.
//
@@ -99,22 +100,22 @@ DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page);
// 1 - Rotated 90 degrees clockwise.
// 2 - Rotated 180 degrees clockwise.
// 3 - Rotated 270 degrees clockwise.
-DLLEXPORT void STDCALL FPDFPage_SetRotation(FPDF_PAGE page, int rotate);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetRotation(FPDF_PAGE page, int rotate);
// Insert |page_obj| into |page|.
//
// page - handle to a page
// page_obj - handle to a page object. The |page_obj| will be automatically
// freed.
-DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page,
- FPDF_PAGEOBJECT page_obj);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertObject(FPDF_PAGE page,
+ FPDF_PAGEOBJECT page_obj);
// Get number of page objects inside |page|.
//
// page - handle to a page.
//
// Returns the number of objects in |page|.
-DLLEXPORT int STDCALL FPDFPage_CountObject(FPDF_PAGE page);
+FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObject(FPDF_PAGE page);
// Get object in |page| at |index|.
//
@@ -122,14 +123,15 @@ DLLEXPORT int STDCALL FPDFPage_CountObject(FPDF_PAGE page);
// index - the index of a page object.
//
// Returns the handle to the page object, or NULL on failed.
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPage_GetObject(FPDF_PAGE page, int index);
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPage_GetObject(FPDF_PAGE page,
+ int index);
// Checks if |page| contains transparency.
//
// page - handle to a page.
//
// Returns TRUE if |page| contains transparency.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_HasTransparency(FPDF_PAGE page);
// Generate the content of |page|.
//
@@ -139,7 +141,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page);
//
// Before you save the page to a file, or reload the page, you must call
// |FPDFPage_GenerateContent| or any changes to |page| will be lost.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_GenerateContent(FPDF_PAGE page);
// Destroy |page_obj| by releasing its resources. |page_obj| must have been
// created by FPDFPageObj_CreateNew{Path|Rect}() or
@@ -148,14 +150,14 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page);
// FPDFPage_InsertObject() or to an annotation through FPDFAnnot_AppendObject().
//
// page_obj - handle to a page object.
-DLLEXPORT void STDCALL FPDFPageObj_Destroy(FPDF_PAGEOBJECT page_obj);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPageObj_Destroy(FPDF_PAGEOBJECT page_obj);
// Checks if |page_object| contains transparency.
//
// page_object - handle to a page object.
//
// Returns TRUE if |pageObject| contains transparency.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT page_object);
// Get type of |page_object|.
@@ -164,7 +166,7 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT page_object);
//
// Returns one of the FPDF_PAGEOBJ_* values on success, FPDF_PAGEOBJ_UNKNOWN on
// error.
-DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT page_object);
+FPDF_EXPORT int FPDF_CALLCONV FPDFPageObj_GetType(FPDF_PAGEOBJECT page_object);
// Transform |page_object| by the given matrix.
//
@@ -180,13 +182,14 @@ DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT page_object);
// |a c e|
// |b d f|
// and can be used to scale, rotate, shear and translate the |page_object|.
-DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
- double a,
- double b,
- double c,
- double d,
- double e,
- double f);
+FPDF_EXPORT void FPDF_CALLCONV
+FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
+ double a,
+ double b,
+ double c,
+ double d,
+ double e,
+ double f);
// Transform all annotations in |page|.
//
@@ -202,20 +205,20 @@ DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
// |a c e|
// |b d f|
// and can be used to scale, rotate, shear and translate the |page| annotations.
-DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page,
- double a,
- double b,
- double c,
- double d,
- double e,
- double f);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPage_TransformAnnots(FPDF_PAGE page,
+ double a,
+ double b,
+ double c,
+ double d,
+ double e,
+ double f);
// Create a new image object.
//
// document - handle to a document.
//
// Returns a handle to a new image object.
-DLLEXPORT FPDF_PAGEOBJECT STDCALL
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
FPDFPageObj_NewImageObj(FPDF_DOCUMENT document);
// Load an image from a JPEG image file and then set it into |image_object|.
@@ -232,7 +235,7 @@ FPDFPageObj_NewImageObj(FPDF_DOCUMENT document);
// for all the loaded pages. Pass |pages| and page count (|nCount|) to this API
// to clear the image cache. If the image is not previously shared, or NULL is a
// valid |pages| value.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
int nCount,
FPDF_PAGEOBJECT image_object,
@@ -254,7 +257,7 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
// valid |pages| value. This function loads the JPEG image inline, so the image
// content is copied to the file. This allows |fileAccess| and its associated
// data to be deleted after this function returns.
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
int nCount,
FPDF_PAGEOBJECT image_object,
@@ -276,13 +279,14 @@ FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
// and can be used to scale, rotate, shear and translate the |page| annotations.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
- double a,
- double b,
- double c,
- double d,
- double e,
- double f);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
+ double a,
+ double b,
+ double c,
+ double d,
+ double e,
+ double f);
// Set |bitmap| to |image_object|.
//
@@ -292,10 +296,11 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object,
// bitmap - handle of the bitmap.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
- int nCount,
- FPDF_PAGEOBJECT image_object,
- FPDF_BITMAP bitmap);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
+ int nCount,
+ FPDF_PAGEOBJECT image_object,
+ FPDF_BITMAP bitmap);
// Get a bitmap rasterisation of |image_object|. The returned bitmap will be
// owned by the caller, and FPDFBitmap_Destroy() must be called on the returned
@@ -304,7 +309,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
// image_object - handle to an image object.
//
// Returns the bitmap.
-DLLEXPORT FPDF_BITMAP STDCALL
+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
FPDFImageObj_GetBitmap(FPDF_PAGEOBJECT image_object);
// Get the decoded image data of |image_object|. The decoded data is the
@@ -317,7 +322,7 @@ FPDFImageObj_GetBitmap(FPDF_PAGEOBJECT image_object);
// buflen - length of the buffer.
//
// Returns the length of the decoded image data.
-DLLEXPORT unsigned long STDCALL
+FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDFImageObj_GetImageDataDecoded(FPDF_PAGEOBJECT image_object,
void* buffer,
unsigned long buflen);
@@ -331,7 +336,7 @@ FPDFImageObj_GetImageDataDecoded(FPDF_PAGEOBJECT image_object,
// buflen - length of the buffer.
//
// Returns the length of the raw image data.
-DLLEXPORT unsigned long STDCALL
+FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDFImageObj_GetImageDataRaw(FPDF_PAGEOBJECT image_object,
void* buffer,
unsigned long buflen);
@@ -341,7 +346,7 @@ FPDFImageObj_GetImageDataRaw(FPDF_PAGEOBJECT image_object,
// image_object - handle to an image object.
//
// Returns the number of |image_object|'s filters.
-DLLEXPORT int STDCALL
+FPDF_EXPORT int FPDF_CALLCONV
FPDFImageObj_GetImageFilterCount(FPDF_PAGEOBJECT image_object);
// Get the filter at |index| of |image_object|'s list of filters. Note that the
@@ -355,7 +360,7 @@ FPDFImageObj_GetImageFilterCount(FPDF_PAGEOBJECT image_object);
// buflen - length of the buffer.
//
// Returns the length of the filter string.
-DLLEXPORT unsigned long STDCALL
+FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDFImageObj_GetImageFilter(FPDF_PAGEOBJECT image_object,
int index,
void* buffer,
@@ -367,7 +372,8 @@ FPDFImageObj_GetImageFilter(FPDF_PAGEOBJECT image_object,
// y - initial vertical position.
//
// Returns a handle to a new path object.
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewPath(float x, float y);
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewPath(float x,
+ float y);
// Create a closed path consisting of a rectangle.
//
@@ -377,10 +383,10 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewPath(float x, float y);
// h - height of the rectangle.
//
// Returns a handle to the new path object.
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x,
- float y,
- float w,
- float h);
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewRect(float x,
+ float y,
+ float w,
+ float h);
// Get the bounding box of |page_object|.
//
@@ -391,11 +397,12 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x,
// top - pointer where the top coordinate will be stored
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT page_object,
- float* left,
- float* bottom,
- float* right,
- float* top);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_GetBounds(FPDF_PAGEOBJECT page_object,
+ float* left,
+ float* bottom,
+ float* right,
+ float* top);
// Set the blend mode of |page_object|.
//
@@ -405,8 +412,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT page_object,
// Blend mode can be one of following: Color, ColorBurn, ColorDodge, Darken,
// Difference, Exclusion, HardLight, Hue, Lighten, Luminosity, Multiply, Normal,
// Overlay, Saturation, Screen, SoftLight
-DLLEXPORT void STDCALL FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
- FPDF_BYTESTRING blend_mode);
+FPDF_EXPORT void FPDF_CALLCONV
+FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
+ FPDF_BYTESTRING blend_mode);
// Set the stroke RGBA of a path. Range of values: 0 - 255.
//
@@ -417,11 +425,12 @@ DLLEXPORT void STDCALL FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
// A - the stroke alpha for the path.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A);
// Get the stroke RGBA of a path. Range of values: 0 - 255.
//
@@ -432,11 +441,12 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
// A - the stroke alpha of the path.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A);
// Set the stroke width of a path.
//
@@ -444,8 +454,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
// width - the width of the stroke.
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path,
- float width);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width);
// Set the line join of |page_object|.
//
@@ -454,8 +464,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path,
//
// Line join can be one of following: FPDF_LINEJOIN_MITER, FPDF_LINEJOIN_ROUND,
// FPDF_LINEJOIN_BEVEL
-DLLEXPORT void STDCALL STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object,
- int line_join);
+FPDF_EXPORT void FPDF_CALLCONV FPDF_CALLCONV
+FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object, int line_join);
// Set the line cap of |page_object|.
//
@@ -464,8 +474,8 @@ DLLEXPORT void STDCALL STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object,
//
// Line cap can be one of following: FPDF_LINECAP_BUTT, FPDF_LINECAP_ROUND,
// FPDF_LINECAP_PROJECTING_SQUARE
-DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT page_object,
- int line_cap);
+FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineCap(FPDF_PAGEOBJECT page_object,
+ int line_cap);
// Set the fill RGBA of a path. Range of values: 0 - 255.
//
@@ -476,11 +486,11 @@ DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT page_object,
// A - the fill alpha for the path.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A);
// Get the fill RGBA of a path. Range of values: 0 - 255.
//
@@ -491,11 +501,11 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
// A - the fill alpha of the path.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A);
// Move a path's current point.
//
@@ -507,9 +517,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
// new one.
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
- float x,
- float y);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
+ float x,
+ float y);
// Add a line between the current point and a new point in the path.
//
@@ -520,9 +530,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
// The path's current point is changed to (x, y).
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_LineTo(FPDF_PAGEOBJECT path,
- float x,
- float y);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_LineTo(FPDF_PAGEOBJECT path,
+ float x,
+ float y);
// Add a cubic Bezier curve to the given path, starting at the current point.
//
@@ -535,13 +545,13 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_LineTo(FPDF_PAGEOBJECT path,
// y3 - the vertical position of the ending point of the Bezier curve.
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
- float x1,
- float y1,
- float x2,
- float y2,
- float x3,
- float y3);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
+ float x1,
+ float y1,
+ float x2,
+ float y2,
+ float x3,
+ float y3);
// Close the current subpath of a given path.
//
@@ -551,7 +561,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
// subpath, thus terminating the current subpath.
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_Close(FPDF_PAGEOBJECT path);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_Close(FPDF_PAGEOBJECT path);
// Set the drawing mode of a path.
//
@@ -561,9 +571,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_Close(FPDF_PAGEOBJECT path);
// stroke - a boolean specifying if the path should be stroked or not.
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
- int fillmode,
- FPDF_BOOL stroke);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
+ int fillmode,
+ FPDF_BOOL stroke);
// Create a new text object using one of the standard PDF fonts.
//
@@ -572,9 +582,10 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
// font_size - the font size for the new text object.
//
// Returns a handle to a new text object, or NULL on failure
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
- FPDF_BYTESTRING font,
- float font_size);
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
+FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING font,
+ float font_size);
// Set the text for a textobject. If it had text, it will be replaced.
//
@@ -582,8 +593,8 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
// text - the UTF-16LE encoded string containing the text to be added.
//
// Returns TRUE on success
-DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object,
- FPDF_WIDESTRING text);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFText_SetText(FPDF_PAGEOBJECT text_object, FPDF_WIDESTRING text);
// Returns a font object loaded from a stream of data. The font is loaded
// into the document.
@@ -598,11 +609,11 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object,
// The loaded font can be closed using FPDF_Font_Close.
//
// Returns NULL on failure
-DLLEXPORT FPDF_FONT STDCALL FPDFText_LoadFont(FPDF_DOCUMENT document,
- const uint8_t* data,
- uint32_t size,
- int font_type,
- FPDF_BOOL cid);
+FPDF_EXPORT FPDF_FONT FPDF_CALLCONV FPDFText_LoadFont(FPDF_DOCUMENT document,
+ const uint8_t* data,
+ uint32_t size,
+ int font_type,
+ FPDF_BOOL cid);
// Set the fill RGBA of a text object. Range of values: 0 - 255.
//
@@ -613,16 +624,17 @@ DLLEXPORT FPDF_FONT STDCALL FPDFText_LoadFont(FPDF_DOCUMENT document,
// A - the fill alpha for the path.
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A);
// Close a loaded PDF font.
//
// font - Handle to the loaded font.
-DLLEXPORT void STDCALL FPDFFont_Close(FPDF_FONT font);
+FPDF_EXPORT void FPDF_CALLCONV FPDFFont_Close(FPDF_FONT font);
// Create a new text object using a loaded font.
//
@@ -631,7 +643,7 @@ DLLEXPORT void STDCALL FPDFFont_Close(FPDF_FONT font);
// font_size - the font size for the new text object.
//
// Returns a handle to a new text object, or NULL on failure
-DLLEXPORT FPDF_PAGEOBJECT STDCALL
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
FPDFPageObj_CreateTextObj(FPDF_DOCUMENT document,
FPDF_FONT font,
float font_size);