OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef PUBLIC_FPDF_TEXT_H_ | 7 #ifndef PUBLIC_FPDF_TEXT_H_ |
8 #define PUBLIC_FPDF_TEXT_H_ | 8 #define PUBLIC_FPDF_TEXT_H_ |
9 | 9 |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // | 346 // |
347 DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page); | 347 DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page); |
348 | 348 |
349 // Function: FPDFLink_GetURL | 349 // Function: FPDFLink_GetURL |
350 // Fetch the URL information for a detected web link. | 350 // Fetch the URL information for a detected web link. |
351 // Parameters: | 351 // Parameters: |
352 // link_page - Handle returned by FPDFLink_LoadWebLinks. | 352 // link_page - Handle returned by FPDFLink_LoadWebLinks. |
353 // link_index - Zero-based index for the link. | 353 // link_index - Zero-based index for the link. |
354 // buffer - A unicode buffer. | 354 // buffer - A unicode buffer. |
355 // buflen - Number of characters (not bytes) for the buffer, | 355 // buflen - Number of characters (not bytes) for the buffer, |
356 // including an additional terminator. | 356 // including an additional terminator. |
357 // Return Value: | 357 // Return Value: |
358 // If buffer is NULL or buflen is zero, return number of characters | 358 // If buffer is NULL or buflen is zero, return number of characters |
359 // (not bytes and an additional terminator is also counted) needed, | 359 // (not bytes and an additional terminator is also counted) needed, |
360 // otherwise, return number of characters copied into the buffer. | 360 // otherwise, return number of characters copied into the buffer. |
| 361 // If |link_index| does not correspond to a valid link, then 0 is |
| 362 // returned and |buffer| is unmodified (if present). |
361 // | 363 // |
362 DLLEXPORT int STDCALL FPDFLink_GetURL(FPDF_PAGELINK link_page, | 364 DLLEXPORT int STDCALL FPDFLink_GetURL(FPDF_PAGELINK link_page, |
363 int link_index, | 365 int link_index, |
364 unsigned short* buffer, | 366 unsigned short* buffer, |
365 int buflen); | 367 int buflen); |
366 | 368 |
367 // Function: FPDFLink_CountRects | 369 // Function: FPDFLink_CountRects |
368 // Count number of rectangular areas for the link. | 370 // Count number of rectangular areas for the link. |
369 // Parameters: | 371 // Parameters: |
370 // link_page - Handle returned by FPDFLink_LoadWebLinks. | 372 // link_page - Handle returned by FPDFLink_LoadWebLinks. |
371 // link_index - Zero-based index for the link. | 373 // link_index - Zero-based index for the link. |
372 // Return Value: | 374 // Return Value: |
373 // Number of rectangular areas for the link. | 375 // Number of rectangular areas for the link. If |link_index| does |
| 376 // not correspond to a valid link, then 0 is returned. |
374 // | 377 // |
375 DLLEXPORT int STDCALL FPDFLink_CountRects(FPDF_PAGELINK link_page, | 378 DLLEXPORT int STDCALL FPDFLink_CountRects(FPDF_PAGELINK link_page, |
376 int link_index); | 379 int link_index); |
377 | 380 |
378 // Function: FPDFLink_GetRect | 381 // Function: FPDFLink_GetRect |
379 // Fetch the boundaries of a rectangle for a link. | 382 // Fetch the boundaries of a rectangle for a link. |
380 // Parameters: | 383 // Parameters: |
381 // link_page - Handle returned by FPDFLink_LoadWebLinks. | 384 // link_page - Handle returned by FPDFLink_LoadWebLinks. |
382 // link_index - Zero-based index for the link. | 385 // link_index - Zero-based index for the link. |
383 // rect_index - Zero-based index for a rectangle. | 386 // rect_index - Zero-based index for a rectangle. |
384 // left - Pointer to a double value receiving the rectangle | 387 // left - Pointer to a double value receiving the rectangle |
385 // left boundary. | 388 // left boundary. |
386 // top - Pointer to a double value receiving the rectangle | 389 // top - Pointer to a double value receiving the rectangle |
387 // top boundary. | 390 // top boundary. |
388 // right - Pointer to a double value receiving the rectangle | 391 // right - Pointer to a double value receiving the rectangle |
389 // right boundary. | 392 // right boundary. |
390 // bottom - Pointer to a double value receiving the rectangle | 393 // bottom - Pointer to a double value receiving the rectangle |
391 // bottom boundary. | 394 // bottom boundary. |
392 // Return Value: | 395 // Return Value: |
393 // None. | 396 // None. If |link_index| does not correspond to a valid link, then |
| 397 // |left|, |top|, |right|, and |bottom| remain unmodified. |
394 // | 398 // |
395 DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page, | 399 DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page, |
396 int link_index, | 400 int link_index, |
397 int rect_index, | 401 int rect_index, |
398 double* left, | 402 double* left, |
399 double* top, | 403 double* top, |
400 double* right, | 404 double* right, |
401 double* bottom); | 405 double* bottom); |
402 | 406 |
403 // Function: FPDFLink_CloseWebLinks | 407 // Function: FPDFLink_CloseWebLinks |
404 // Release resources used by weblink feature. | 408 // Release resources used by weblink feature. |
405 // Parameters: | 409 // Parameters: |
406 // link_page - Handle returned by FPDFLink_LoadWebLinks. | 410 // link_page - Handle returned by FPDFLink_LoadWebLinks. |
407 // Return Value: | 411 // Return Value: |
408 // None. | 412 // None. |
409 // | 413 // |
410 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page); | 414 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page); |
411 | 415 |
412 #ifdef __cplusplus | 416 #ifdef __cplusplus |
413 } | 417 } |
414 #endif | 418 #endif |
415 | 419 |
416 #endif // PUBLIC_FPDF_TEXT_H_ | 420 #endif // PUBLIC_FPDF_TEXT_H_ |
OLD | NEW |