summaryrefslogtreecommitdiff
path: root/public/fpdf_text.h
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 /public/fpdf_text.h
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 'public/fpdf_text.h')
-rw-r--r--public/fpdf_text.h129
1 files changed, 63 insertions, 66 deletions
diff --git a/public/fpdf_text.h b/public/fpdf_text.h
index c069144026..5c241527eb 100644
--- a/public/fpdf_text.h
+++ b/public/fpdf_text.h
@@ -27,7 +27,7 @@ extern "C" {
// Application must call FPDFText_ClosePage to release the text page
// information.
//
-FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page);
+DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page);
// Function: FPDFText_ClosePage
// Release all resources allocated for a text page information
@@ -38,7 +38,7 @@ FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page);
// Return Value:
// None.
//
-FPDF_EXPORT void FPDF_CALLCONV FPDFText_ClosePage(FPDF_TEXTPAGE text_page);
+DLLEXPORT void STDCALL FPDFText_ClosePage(FPDF_TEXTPAGE text_page);
// Function: FPDFText_CountChars
// Get number of characters in a page.
@@ -56,7 +56,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_ClosePage(FPDF_TEXTPAGE text_page);
// first character in the page
// has an index value of zero.
//
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars(FPDF_TEXTPAGE text_page);
+DLLEXPORT int STDCALL FPDFText_CountChars(FPDF_TEXTPAGE text_page);
// Function: FPDFText_GetUnicode
// Get Unicode of a character in a page.
@@ -70,8 +70,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars(FPDF_TEXTPAGE text_page);
// convert to Unicode,
// the return value will be zero.
//
-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);
// Function: FPDFText_GetFontSize
// Get the font size of a particular character.
@@ -84,8 +84,8 @@ FPDFText_GetUnicode(FPDF_TEXTPAGE text_page, int index);
// 1/72 inch).
// This is the typographic size of the font (so called "em size").
//
-FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
- int index);
+DLLEXPORT double STDCALL FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
+ int index);
// Function: FPDFText_GetCharBox
// Get bounding box of a particular character.
@@ -106,12 +106,12 @@ FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
// Comments:
// All positions are measured in PDF "user space".
//
-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);
// Function: FPDFText_GetCharIndexAtPos
// Get the index of a character at or nearby a certain position on the
@@ -131,12 +131,11 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
// be -1.
// If an error occurs, -3 will be returned.
//
-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);
// Function: FPDFText_GetText
// Extract unicode text string from the page.
@@ -155,10 +154,10 @@ FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
// Comments:
// This function ignores characters without unicode information.
//
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText(FPDF_TEXTPAGE text_page,
- int start_index,
- int count,
- unsigned short* result);
+DLLEXPORT int STDCALL FPDFText_GetText(FPDF_TEXTPAGE text_page,
+ int start_index,
+ int count,
+ unsigned short* result);
// Function: FPDFText_CountRects
// Count number of rectangular areas occupied by a segment of texts.
@@ -178,9 +177,9 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText(FPDF_TEXTPAGE text_page,
// one if those characters
// are on the same line and use same font settings.
//
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects(FPDF_TEXTPAGE text_page,
- int start_index,
- int count);
+DLLEXPORT int STDCALL FPDFText_CountRects(FPDF_TEXTPAGE text_page,
+ int start_index,
+ int count);
// Function: FPDFText_GetRect
// Get a rectangular area from the result generated by
@@ -200,12 +199,12 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects(FPDF_TEXTPAGE text_page,
// Return Value:
// None.
//
-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);
// Function: FPDFText_GetBoundedText
// Extract unicode text within a rectangular boundary on the page.
@@ -233,13 +232,13 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetRect(FPDF_TEXTPAGE text_page,
// If the buffer is too small, as much text as will fit is copied into
// it.
//
-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);
// Flags used by FPDFText_FindStart function.
#define FPDF_MATCHCASE \
@@ -259,11 +258,10 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page,
// A handle for the search context. FPDFText_FindClose must be called
// to release this handle.
//
-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);
// Function: FPDFText_FindNext
// Search in the direction from page start to end.
@@ -273,7 +271,7 @@ FPDFText_FindStart(FPDF_TEXTPAGE text_page,
// Return Value:
// Whether a match is found.
//
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext(FPDF_SCHHANDLE handle);
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle);
// Function: FPDFText_FindPrev
// Search in the direction from page end to start.
@@ -283,7 +281,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext(FPDF_SCHHANDLE handle);
// Return Value:
// Whether a match is found.
//
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindPrev(FPDF_SCHHANDLE handle);
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle);
// Function: FPDFText_GetSchResultIndex
// Get the starting character index of the search result.
@@ -293,7 +291,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindPrev(FPDF_SCHHANDLE handle);
// Return Value:
// Index for the starting character.
//
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle);
+DLLEXPORT int STDCALL FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle);
// Function: FPDFText_GetSchCount
// Get the number of matched characters in the search result.
@@ -303,7 +301,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle);
// Return Value:
// Number of matched characters.
//
-FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchCount(FPDF_SCHHANDLE handle);
+DLLEXPORT int STDCALL FPDFText_GetSchCount(FPDF_SCHHANDLE handle);
// Function: FPDFText_FindClose
// Release a search context.
@@ -313,7 +311,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchCount(FPDF_SCHHANDLE handle);
// Return Value:
// None.
//
-FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose(FPDF_SCHHANDLE handle);
+DLLEXPORT void STDCALL FPDFText_FindClose(FPDF_SCHHANDLE handle);
// Function: FPDFLink_LoadWebLinks
// Prepare information about weblinks in a page.
@@ -338,8 +336,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose(FPDF_SCHHANDLE handle);
//
// FPDFLink_CloseWebLinks must be called to release resources.
//
-FPDF_EXPORT FPDF_PAGELINK FPDF_CALLCONV
-FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page);
+DLLEXPORT FPDF_PAGELINK STDCALL FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page);
// Function: FPDFLink_CountWebLinks
// Count number of detected web links.
@@ -348,7 +345,7 @@ FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page);
// Return Value:
// Number of detected web links.
//
-FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountWebLinks(FPDF_PAGELINK link_page);
+DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page);
// Function: FPDFLink_GetURL
// Fetch the URL information for a detected web link.
@@ -369,10 +366,10 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountWebLinks(FPDF_PAGELINK link_page);
// If |link_index| does not correspond to a valid link, then the result
// is an empty string.
//
-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);
// Function: FPDFLink_CountRects
// Count number of rectangular areas for the link.
@@ -383,8 +380,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetURL(FPDF_PAGELINK link_page,
// Number of rectangular areas for the link. If |link_index| does
// not correspond to a valid link, then 0 is returned.
//
-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);
// Function: FPDFLink_GetRect
// Fetch the boundaries of a rectangle for a link.
@@ -404,13 +401,13 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountRects(FPDF_PAGELINK link_page,
// None. If |link_index| does not correspond to a valid link, then
// |left|, |top|, |right|, and |bottom| remain unmodified.
//
-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);
// Function: FPDFLink_CloseWebLinks
// Release resources used by weblink feature.
@@ -419,7 +416,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFLink_GetRect(FPDF_PAGELINK link_page,
// Return Value:
// None.
//
-FPDF_EXPORT void FPDF_CALLCONV FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page);
+DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page);
#ifdef __cplusplus
}