mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
OS X: Update bundled pdfium to r3729
This commit is contained in:
@ -5,7 +5,9 @@
|
||||
#ifndef PUBLIC_CPP_FPDF_DELETERS_H_
|
||||
#define PUBLIC_CPP_FPDF_DELETERS_H_
|
||||
|
||||
#include "public/fpdf_annot.h"
|
||||
#include "public/fpdf_dataavail.h"
|
||||
#include "public/fpdf_edit.h"
|
||||
#include "public/fpdf_formfill.h"
|
||||
#include "public/fpdf_structtree.h"
|
||||
#include "public/fpdf_text.h"
|
||||
@ -13,6 +15,10 @@
|
||||
|
||||
// Custom deleters for using FPDF_* types with std::unique_ptr<>.
|
||||
|
||||
struct FPDFAnnotationDeleter {
|
||||
inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }
|
||||
};
|
||||
|
||||
struct FPDFAvailDeleter {
|
||||
inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }
|
||||
};
|
||||
@ -25,22 +31,42 @@ struct FPDFDocumentDeleter {
|
||||
inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }
|
||||
};
|
||||
|
||||
struct FPDFFontDeleter {
|
||||
inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }
|
||||
};
|
||||
|
||||
struct FPDFFormHandleDeleter {
|
||||
inline void operator()(FPDF_FORMHANDLE form) {
|
||||
FPDFDOC_ExitFormFillEnvironment(form);
|
||||
}
|
||||
};
|
||||
|
||||
struct FPDFTextPageDeleter {
|
||||
inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }
|
||||
};
|
||||
|
||||
struct FPDFPageDeleter {
|
||||
inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }
|
||||
};
|
||||
|
||||
struct FPDFPageLinkDeleter {
|
||||
inline void operator()(FPDF_PAGELINK pagelink) {
|
||||
FPDFLink_CloseWebLinks(pagelink);
|
||||
}
|
||||
};
|
||||
|
||||
struct FPDFPageObjectDeleter {
|
||||
inline void operator()(FPDF_PAGEOBJECT object) {
|
||||
FPDFPageObj_Destroy(object);
|
||||
}
|
||||
};
|
||||
|
||||
struct FPDFStructTreeDeleter {
|
||||
inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }
|
||||
};
|
||||
|
||||
struct FPDFTextFindDeleter {
|
||||
inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }
|
||||
};
|
||||
|
||||
struct FPDFTextPageDeleter {
|
||||
inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }
|
||||
};
|
||||
|
||||
#endif // PUBLIC_CPP_FPDF_DELETERS_H_
|
||||
|
Reference in New Issue
Block a user