mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Windows: Update bundled pdfium to r3729
This commit is contained in:
202
dependencies/pdfium/win/public/fpdf_text.h
vendored
202
dependencies/pdfium/win/public/fpdf_text.h
vendored
@ -27,7 +27,7 @@ extern "C" {
|
||||
// Application must call FPDFText_ClosePage to release the text page
|
||||
// information.
|
||||
//
|
||||
DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page);
|
||||
FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page);
|
||||
|
||||
// Function: FPDFText_ClosePage
|
||||
// Release all resources allocated for a text page information
|
||||
@ -38,7 +38,7 @@ DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page);
|
||||
// Return Value:
|
||||
// None.
|
||||
//
|
||||
DLLEXPORT void STDCALL FPDFText_ClosePage(FPDF_TEXTPAGE text_page);
|
||||
FPDF_EXPORT void FPDF_CALLCONV FPDFText_ClosePage(FPDF_TEXTPAGE text_page);
|
||||
|
||||
// Function: FPDFText_CountChars
|
||||
// Get number of characters in a page.
|
||||
@ -56,7 +56,7 @@ DLLEXPORT void STDCALL FPDFText_ClosePage(FPDF_TEXTPAGE text_page);
|
||||
// first character in the page
|
||||
// has an index value of zero.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_CountChars(FPDF_TEXTPAGE text_page);
|
||||
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars(FPDF_TEXTPAGE text_page);
|
||||
|
||||
// Function: FPDFText_GetUnicode
|
||||
// Get Unicode of a character in a page.
|
||||
@ -70,8 +70,8 @@ DLLEXPORT int STDCALL FPDFText_CountChars(FPDF_TEXTPAGE text_page);
|
||||
// convert to Unicode,
|
||||
// the return value will be zero.
|
||||
//
|
||||
DLLEXPORT unsigned int STDCALL FPDFText_GetUnicode(FPDF_TEXTPAGE text_page,
|
||||
int index);
|
||||
FPDF_EXPORT unsigned int FPDF_CALLCONV
|
||||
FPDFText_GetUnicode(FPDF_TEXTPAGE text_page, int index);
|
||||
|
||||
// Function: FPDFText_GetFontSize
|
||||
// Get the font size of a particular character.
|
||||
@ -84,8 +84,33 @@ DLLEXPORT unsigned int STDCALL FPDFText_GetUnicode(FPDF_TEXTPAGE text_page,
|
||||
// 1/72 inch).
|
||||
// This is the typographic size of the font (so called "em size").
|
||||
//
|
||||
DLLEXPORT double STDCALL FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
|
||||
int index);
|
||||
FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
|
||||
int index);
|
||||
|
||||
// Experimental API.
|
||||
// Function: FPDFText_GetFontInfo
|
||||
// Get the font name and flags of a particular character.
|
||||
// Parameters:
|
||||
// text_page - Handle to a text page information structure.
|
||||
// Returned by FPDFText_LoadPage function.
|
||||
// index - Zero-based index of the character.
|
||||
// buffer - A buffer receiving the font name.
|
||||
// buflen - The length of |buffer| in bytes.
|
||||
// flags - Optional pointer to an int receiving the font flags.
|
||||
// These flags should be interpreted per PDF spec 1.7 Section 5.7.1
|
||||
// Font Descriptor Flags.
|
||||
// Return value:
|
||||
// On success, return the length of the font name, including the
|
||||
// trailing NUL character, in bytes. If this length is less than or
|
||||
// equal to |length|, |buffer| is set to the font name, |flags| is
|
||||
// set to the font flags. |buffer| is in UTF-8 encoding. Return 0 on
|
||||
// failure.
|
||||
FPDF_EXPORT unsigned long FPDF_CALLCONV
|
||||
FPDFText_GetFontInfo(FPDF_TEXTPAGE text_page,
|
||||
int index,
|
||||
void* buffer,
|
||||
unsigned long buflen,
|
||||
int* flags);
|
||||
|
||||
// Function: FPDFText_GetCharBox
|
||||
// Get bounding box of a particular character.
|
||||
@ -102,16 +127,39 @@ DLLEXPORT double STDCALL FPDFText_GetFontSize(FPDF_TEXTPAGE text_page,
|
||||
// top - Pointer to a double number receiving top position of
|
||||
// the character box.
|
||||
// Return Value:
|
||||
// None.
|
||||
// On success, return TRUE and fill in |left|, |right|, |bottom|, and
|
||||
// |top|. If |text_page| is invalid, or if |index| is out of bounds,
|
||||
// then return FALSE, and the out parameters remain unmodified.
|
||||
// Comments:
|
||||
// All positions are measured in PDF "user space".
|
||||
//
|
||||
DLLEXPORT void STDCALL FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
|
||||
int index,
|
||||
double* left,
|
||||
double* right,
|
||||
double* bottom,
|
||||
double* top);
|
||||
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
|
||||
int index,
|
||||
double* left,
|
||||
double* right,
|
||||
double* bottom,
|
||||
double* top);
|
||||
|
||||
// Function: FPDFText_GetCharOrigin
|
||||
// Get origin of a particular character.
|
||||
// Parameters:
|
||||
// text_page - Handle to a text page information structure.
|
||||
// Returned by FPDFText_LoadPage function.
|
||||
// index - Zero-based index of the character.
|
||||
// x - Pointer to a double number receiving x coordinate of
|
||||
// the character origin.
|
||||
// y - Pointer to a double number receiving y coordinate of
|
||||
// the character origin.
|
||||
// Return Value:
|
||||
// Whether the call succeeded. If false, x and y are unchanged.
|
||||
// Comments:
|
||||
// All positions are measured in PDF "user space".
|
||||
//
|
||||
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
|
||||
FPDFText_GetCharOrigin(FPDF_TEXTPAGE text_page,
|
||||
int index,
|
||||
double* x,
|
||||
double* y);
|
||||
|
||||
// Function: FPDFText_GetCharIndexAtPos
|
||||
// Get the index of a character at or nearby a certain position on the
|
||||
@ -131,11 +179,12 @@ DLLEXPORT void STDCALL FPDFText_GetCharBox(FPDF_TEXTPAGE text_page,
|
||||
// be -1.
|
||||
// If an error occurs, -3 will be returned.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
|
||||
double x,
|
||||
double y,
|
||||
double xTolerance,
|
||||
double yTolerance);
|
||||
FPDF_EXPORT int FPDF_CALLCONV
|
||||
FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
|
||||
double x,
|
||||
double y,
|
||||
double xTolerance,
|
||||
double yTolerance);
|
||||
|
||||
// Function: FPDFText_GetText
|
||||
// Extract unicode text string from the page.
|
||||
@ -154,10 +203,10 @@ DLLEXPORT int STDCALL FPDFText_GetCharIndexAtPos(FPDF_TEXTPAGE text_page,
|
||||
// Comments:
|
||||
// This function ignores characters without unicode information.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_GetText(FPDF_TEXTPAGE text_page,
|
||||
int start_index,
|
||||
int count,
|
||||
unsigned short* result);
|
||||
FPDF_EXPORT int FPDF_CALLCONV 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.
|
||||
@ -177,9 +226,9 @@ DLLEXPORT int STDCALL FPDFText_GetText(FPDF_TEXTPAGE text_page,
|
||||
// one if those characters
|
||||
// are on the same line and use same font settings.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_CountRects(FPDF_TEXTPAGE text_page,
|
||||
int start_index,
|
||||
int count);
|
||||
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects(FPDF_TEXTPAGE text_page,
|
||||
int start_index,
|
||||
int count);
|
||||
|
||||
// Function: FPDFText_GetRect
|
||||
// Get a rectangular area from the result generated by
|
||||
@ -197,14 +246,18 @@ DLLEXPORT int STDCALL FPDFText_CountRects(FPDF_TEXTPAGE text_page,
|
||||
// bottom - Pointer to a double value receiving the rectangle
|
||||
// bottom boundary.
|
||||
// Return Value:
|
||||
// None.
|
||||
// On success, return TRUE and fill in |left|, |top|, |right|, and
|
||||
// |bottom|. If |text_page| is invalid then return FALSE, and the out
|
||||
// parameters remain unmodified. If |text_page| is valid but
|
||||
// |rect_index| is out of bounds, then return FALSE and set the out
|
||||
// parameters to 0.
|
||||
//
|
||||
DLLEXPORT void STDCALL FPDFText_GetRect(FPDF_TEXTPAGE text_page,
|
||||
int rect_index,
|
||||
double* left,
|
||||
double* top,
|
||||
double* right,
|
||||
double* bottom);
|
||||
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV 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.
|
||||
@ -232,19 +285,22 @@ DLLEXPORT void STDCALL FPDFText_GetRect(FPDF_TEXTPAGE text_page,
|
||||
// If the buffer is too small, as much text as will fit is copied into
|
||||
// it.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page,
|
||||
double left,
|
||||
double top,
|
||||
double right,
|
||||
double bottom,
|
||||
unsigned short* buffer,
|
||||
int buflen);
|
||||
FPDF_EXPORT int FPDF_CALLCONV 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 \
|
||||
0x00000001 // If not set, it will not match case by default.
|
||||
#define FPDF_MATCHWHOLEWORD \
|
||||
0x00000002 // If not set, it will not match the whole word by default.
|
||||
//
|
||||
// If not set, it will not match case by default.
|
||||
#define FPDF_MATCHCASE 0x00000001
|
||||
// If not set, it will not match the whole word by default.
|
||||
#define FPDF_MATCHWHOLEWORD 0x00000002
|
||||
// If not set, it will skip past the current match to look for the next match.
|
||||
#define FPDF_CONSECUTIVE 0x00000004
|
||||
|
||||
// Function: FPDFText_FindStart
|
||||
// Start a search.
|
||||
@ -258,10 +314,11 @@ DLLEXPORT int STDCALL FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page,
|
||||
// A handle for the search context. FPDFText_FindClose must be called
|
||||
// to release this handle.
|
||||
//
|
||||
DLLEXPORT FPDF_SCHHANDLE STDCALL FPDFText_FindStart(FPDF_TEXTPAGE text_page,
|
||||
FPDF_WIDESTRING findwhat,
|
||||
unsigned long flags,
|
||||
int start_index);
|
||||
FPDF_EXPORT FPDF_SCHHANDLE FPDF_CALLCONV
|
||||
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.
|
||||
@ -271,7 +328,7 @@ DLLEXPORT FPDF_SCHHANDLE STDCALL FPDFText_FindStart(FPDF_TEXTPAGE text_page,
|
||||
// Return Value:
|
||||
// Whether a match is found.
|
||||
//
|
||||
DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle);
|
||||
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext(FPDF_SCHHANDLE handle);
|
||||
|
||||
// Function: FPDFText_FindPrev
|
||||
// Search in the direction from page end to start.
|
||||
@ -281,7 +338,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle);
|
||||
// Return Value:
|
||||
// Whether a match is found.
|
||||
//
|
||||
DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle);
|
||||
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindPrev(FPDF_SCHHANDLE handle);
|
||||
|
||||
// Function: FPDFText_GetSchResultIndex
|
||||
// Get the starting character index of the search result.
|
||||
@ -291,7 +348,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle);
|
||||
// Return Value:
|
||||
// Index for the starting character.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle);
|
||||
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle);
|
||||
|
||||
// Function: FPDFText_GetSchCount
|
||||
// Get the number of matched characters in the search result.
|
||||
@ -301,7 +358,7 @@ DLLEXPORT int STDCALL FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle);
|
||||
// Return Value:
|
||||
// Number of matched characters.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFText_GetSchCount(FPDF_SCHHANDLE handle);
|
||||
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchCount(FPDF_SCHHANDLE handle);
|
||||
|
||||
// Function: FPDFText_FindClose
|
||||
// Release a search context.
|
||||
@ -311,7 +368,7 @@ DLLEXPORT int STDCALL FPDFText_GetSchCount(FPDF_SCHHANDLE handle);
|
||||
// Return Value:
|
||||
// None.
|
||||
//
|
||||
DLLEXPORT void STDCALL FPDFText_FindClose(FPDF_SCHHANDLE handle);
|
||||
FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose(FPDF_SCHHANDLE handle);
|
||||
|
||||
// Function: FPDFLink_LoadWebLinks
|
||||
// Prepare information about weblinks in a page.
|
||||
@ -336,7 +393,8 @@ DLLEXPORT void STDCALL FPDFText_FindClose(FPDF_SCHHANDLE handle);
|
||||
//
|
||||
// FPDFLink_CloseWebLinks must be called to release resources.
|
||||
//
|
||||
DLLEXPORT FPDF_PAGELINK STDCALL FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page);
|
||||
FPDF_EXPORT FPDF_PAGELINK FPDF_CALLCONV
|
||||
FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page);
|
||||
|
||||
// Function: FPDFLink_CountWebLinks
|
||||
// Count number of detected web links.
|
||||
@ -345,7 +403,7 @@ DLLEXPORT FPDF_PAGELINK STDCALL FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page);
|
||||
// Return Value:
|
||||
// Number of detected web links.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page);
|
||||
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountWebLinks(FPDF_PAGELINK link_page);
|
||||
|
||||
// Function: FPDFLink_GetURL
|
||||
// Fetch the URL information for a detected web link.
|
||||
@ -366,10 +424,10 @@ DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page);
|
||||
// If |link_index| does not correspond to a valid link, then the result
|
||||
// is an empty string.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFLink_GetURL(FPDF_PAGELINK link_page,
|
||||
int link_index,
|
||||
unsigned short* buffer,
|
||||
int buflen);
|
||||
FPDF_EXPORT int FPDF_CALLCONV 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.
|
||||
@ -380,8 +438,8 @@ DLLEXPORT int STDCALL 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.
|
||||
//
|
||||
DLLEXPORT int STDCALL FPDFLink_CountRects(FPDF_PAGELINK link_page,
|
||||
int link_index);
|
||||
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountRects(FPDF_PAGELINK link_page,
|
||||
int link_index);
|
||||
|
||||
// Function: FPDFLink_GetRect
|
||||
// Fetch the boundaries of a rectangle for a link.
|
||||
@ -398,16 +456,18 @@ DLLEXPORT int STDCALL FPDFLink_CountRects(FPDF_PAGELINK link_page,
|
||||
// bottom - Pointer to a double value receiving the rectangle
|
||||
// bottom boundary.
|
||||
// Return Value:
|
||||
// None. If |link_index| does not correspond to a valid link, then
|
||||
// |left|, |top|, |right|, and |bottom| remain unmodified.
|
||||
// On success, return TRUE and fill in |left|, |top|, |right|, and
|
||||
// |bottom|. If |link_page| is invalid or if |link_index| does not
|
||||
// correspond to a valid link, then return FALSE, and the out
|
||||
// parameters remain unmodified.
|
||||
//
|
||||
DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page,
|
||||
int link_index,
|
||||
int rect_index,
|
||||
double* left,
|
||||
double* top,
|
||||
double* right,
|
||||
double* bottom);
|
||||
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV 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.
|
||||
@ -416,7 +476,7 @@ DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page,
|
||||
// Return Value:
|
||||
// None.
|
||||
//
|
||||
DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page);
|
||||
FPDF_EXPORT void FPDF_CALLCONV FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user