Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fpdf_deleters.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PUBLIC_CPP_FPDF_DELETERS_H_
6#define PUBLIC_CPP_FPDF_DELETERS_H_
7
8#include "public/fpdf_annot.h"
9#include "public/fpdf_dataavail.h"
10#include "public/fpdf_edit.h"
11#include "public/fpdf_formfill.h"
12#include "public/fpdf_javascript.h"
13#include "public/fpdf_structtree.h"
14#include "public/fpdf_text.h"
15#include "public/fpdf_transformpage.h"
16#include "public/fpdfview.h"
17
18// Custom deleters for using FPDF_* types with std::unique_ptr<>.
19
21 inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }
22};
23
25 inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }
26};
27
29 inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }
30};
31
33 inline void operator()(FPDF_CLIPPATH clip_path) {
35 }
36};
37
39 inline void operator()(FPDF_DOCUMENT doc) { FPDF_CloseDocument(doc); }
40};
41
43 inline void operator()(FPDF_FONT font) { FPDFFont_Close(font); }
44};
45
47 inline void operator()(FPDF_FORMHANDLE form) {
49 }
50};
51
53 inline void operator()(FPDF_JAVASCRIPT_ACTION javascript) {
55 }
56};
57
59 inline void operator()(FPDF_PAGE page) { FPDF_ClosePage(page); }
60};
61
63 inline void operator()(FPDF_PAGELINK pagelink) {
65 }
66};
67
69 inline void operator()(FPDF_PAGEOBJECT object) {
71 }
72};
73
75 inline void operator()(FPDF_STRUCTTREE tree) { FPDF_StructTree_Close(tree); }
76};
77
79 inline void operator()(FPDF_SCHHANDLE handle) { FPDFText_FindClose(handle); }
80};
81
83 inline void operator()(FPDF_TEXTPAGE text) { FPDFText_ClosePage(text); }
84};
85
86#endif // PUBLIC_CPP_FPDF_DELETERS_H_
FX_DOWNLOADHINTS * GetDownloadHints() const
FX_FILEAVAIL * GetFileAvail() const
FPDF_FILEACCESS * GetFileAccess() const
TEST_F(CPDF_CreatorEmbedderTest, SavedDocsAreEqualAfterParse)
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_CloseAnnot(FPDF_ANNOTATION annot)
#define PDF_DATA_AVAIL
FPDF_EXPORT void FPDF_CALLCONV FPDFAvail_Destroy(FPDF_AVAIL avail)
FPDF_EXPORT void FPDF_CALLCONV FPDFFont_Close(FPDF_FONT font)
FPDF_EXPORT void FPDF_CALLCONV FPDFPageObj_Destroy(FPDF_PAGEOBJECT page_object)
FPDF_EXPORT void FPDF_CALLCONV FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle)
FPDF_EXPORT void FPDF_CALLCONV FPDFDoc_CloseJavaScriptAction(FPDF_JAVASCRIPT_ACTION javascript)
FPDF_EXPORT void FPDF_CALLCONV FPDF_StructTree_Close(FPDF_STRUCTTREE struct_tree)
FPDF_EXPORT void FPDF_CALLCONV FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page)
FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose(FPDF_SCHHANDLE handle)
FPDF_EXPORT void FPDF_CALLCONV FPDFText_ClosePage(FPDF_TEXTPAGE text_page)
Definition fpdf_text.cpp:53
FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath)
FPDF_EXPORT void FPDF_CALLCONV FPDFBitmap_Destroy(FPDF_BITMAP bitmap)
FPDF_EXPORT void FPDF_CALLCONV FPDF_CloseDocument(FPDF_DOCUMENT document)
FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page)
#define FPDF_ANNOT
Definition fpdfview.h:804
void operator()(FPDF_ANNOTATION annot)
void operator()(FPDF_AVAIL avail)
void operator()(FPDF_BITMAP bitmap)
void operator()(FPDF_CLIPPATH clip_path)
void operator()(FPDF_DOCUMENT doc)
void operator()(FPDF_FONT font)
void operator()(FPDF_FORMHANDLE form)
void operator()(FPDF_JAVASCRIPT_ACTION javascript)
void operator()(FPDF_PAGE page)
void operator()(FPDF_PAGELINK pagelink)
void operator()(FPDF_PAGEOBJECT object)
void operator()(FPDF_STRUCTTREE tree)
void operator()(FPDF_SCHHANDLE handle)
void operator()(FPDF_TEXTPAGE text)