Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2015 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // This "C" (not "C++") file ensures that the public headers compile | |
| 6 // and link for "C" (and not just "C++"). | |
| 7 | |
| 8 #include <stdio.h> | |
| 9 | |
| 10 #include "c_api_test.h" | |
| 11 | |
| 12 #include "../public/fpdf_dataavail.h" | |
| 13 #include "../public/fpdf_doc.h" | |
| 14 #include "../public/fpdf_edit.h" | |
| 15 #include "../public/fpdf_ext.h" | |
| 16 #include "../public/fpdf_flatten.h" | |
| 17 #include "../public/fpdf_formfill.h" | |
| 18 #include "../public/fpdf_fwlevent.h" | |
| 19 #include "../public/fpdf_ppo.h" | |
| 20 #include "../public/fpdf_progressive.h" | |
| 21 #include "../public/fpdf_save.h" | |
| 22 #include "../public/fpdf_searchex.h" | |
| 23 #include "../public/fpdf_sysfontinfo.h" | |
| 24 #include "../public/fpdf_text.h" | |
| 25 #include "../public/fpdf_transformpage.h" | |
| 26 #include "../public/fpdfview.h" | |
| 27 | |
| 28 // Scheme for avoiding LTO out of existence, warnings, etc. | |
| 29 typedef void (*fnptr)(void); // Legal generic function type for casts. | |
| 30 fnptr g_c_api_test_fnptr = NULL; // Extern, so can't know it doesn't change. | |
| 31 #define CHK(x) if ((fnptr)(x) == g_c_api_test_fnptr) return 0 | |
| 32 | |
| 33 // Function to call from gtest harness to ensure linker resolution. | |
| 34 int CheckPDFiumCApi() { | |
| 35 CHK(FORM_DoDocumentAAction); | |
|
Lei Zhang
2015/05/12 21:43:03
Do we want to organize these by header file?
Tom Sepez
2015/05/12 22:36:55
Yeah. I went and just sorted the lot of them, but
| |
| 36 CHK(FORM_DoDocumentJSAction); | |
| 37 CHK(FORM_DoDocumentOpenAction); | |
| 38 CHK(FORM_DoPageAAction); | |
| 39 CHK(FORM_ForceToKillFocus); | |
| 40 CHK(FORM_OnAfterLoadPage); | |
| 41 CHK(FORM_OnBeforeClosePage); | |
| 42 CHK(FORM_OnChar); | |
| 43 CHK(FORM_OnKeyDown); | |
| 44 CHK(FORM_OnKeyUp); | |
| 45 CHK(FORM_OnLButtonDown); | |
| 46 CHK(FORM_OnLButtonUp); | |
| 47 CHK(FORM_OnMouseMove); | |
| 48 CHK(FPDFAction_GetDest); | |
| 49 CHK(FPDFAction_GetType); | |
| 50 CHK(FPDFAction_GetURIPath); | |
| 51 CHK(FPDF_AddInstalledFont); | |
| 52 CHK(FPDFAvail_Create); | |
| 53 CHK(FPDFAvail_Destroy); | |
| 54 CHK(FPDFAvail_GetDocument); | |
| 55 CHK(FPDFAvail_GetFirstPageNum); | |
| 56 CHK(FPDFAvail_IsDocAvail); | |
| 57 CHK(FPDFAvail_IsFormAvail); | |
| 58 CHK(FPDFAvail_IsLinearized); | |
| 59 CHK(FPDFAvail_IsPageAvail); | |
| 60 CHK(FPDFBitmap_Create); | |
| 61 CHK(FPDFBitmap_CreateEx); | |
| 62 CHK(FPDFBitmap_Destroy); | |
| 63 CHK(FPDFBitmap_FillRect); | |
| 64 CHK(FPDFBitmap_GetBuffer); | |
| 65 CHK(FPDFBitmap_GetHeight); | |
| 66 CHK(FPDFBitmap_GetStride); | |
| 67 CHK(FPDFBitmap_GetWidth); | |
| 68 CHK(FPDFBookmark_Find); | |
| 69 CHK(FPDFBookmark_GetAction); | |
| 70 CHK(FPDFBookmark_GetDest); | |
| 71 CHK(FPDFBookmark_GetFirstChild); | |
| 72 CHK(FPDFBookmark_GetNextSibling); | |
| 73 CHK(FPDFBookmark_GetTitle); | |
| 74 CHK(FPDF_CloseDocument); | |
| 75 CHK(FPDF_ClosePage); | |
| 76 CHK(FPDF_CopyViewerPreferences); | |
| 77 CHK(FPDF_CountNamedDests); | |
| 78 CHK(FPDF_CreateClipPath); | |
| 79 CHK(FPDF_CreateNewDocument); | |
| 80 CHK(FPDFDest_GetPageIndex); | |
| 81 CHK(FPDF_DestroyClipPath); | |
| 82 CHK(FPDF_DestroyLibrary); | |
| 83 CHK(FPDF_DeviceToPage); | |
| 84 CHK(FPDFDOC_ExitFormFillEnvironment); | |
| 85 CHK(FPDFDoc_GetPageMode); | |
| 86 CHK(FPDFDOC_InitFormFillEnvironment); | |
| 87 CHK(FPDF_FFLDraw); | |
| 88 CHK(FPDF_GetDefaultSystemFontInfo); | |
| 89 CHK(FPDF_GetDocPermissions); | |
| 90 CHK(FPDF_GetFileVersion); | |
| 91 CHK(FPDF_GetLastError); | |
| 92 CHK(FPDF_GetMetaText); | |
| 93 CHK(FPDF_GetNamedDest); | |
| 94 CHK(FPDF_GetNamedDestByName); | |
| 95 CHK(FPDF_GetPageCount); | |
| 96 CHK(FPDF_GetPageHeight); | |
| 97 CHK(FPDF_GetPageSizeByIndex); | |
| 98 CHK(FPDF_GetPageWidth); | |
| 99 CHK(FPDF_GetSecurityHandlerRevision); | |
| 100 CHK(FPDFImageObj_LoadJpegFile); | |
| 101 CHK(FPDFImageObj_SetBitmap); | |
| 102 CHK(FPDFImageObj_SetMatrix); | |
| 103 CHK(FPDF_ImportPages); | |
| 104 CHK(FPDF_InitLibrary); | |
| 105 CHK(FPDFLink_CloseWebLinks); | |
| 106 CHK(FPDFLink_CountQuadPoints); | |
| 107 CHK(FPDFLink_CountRects); | |
| 108 CHK(FPDFLink_CountWebLinks); | |
| 109 CHK(FPDFLink_Enumerate); | |
| 110 CHK(FPDFLink_GetAction); | |
| 111 CHK(FPDFLink_GetAnnotRect); | |
| 112 CHK(FPDFLink_GetDest); | |
| 113 CHK(FPDFLink_GetLinkAtPoint); | |
| 114 CHK(FPDFLink_GetQuadPoints); | |
| 115 CHK(FPDFLink_GetRect); | |
| 116 CHK(FPDFLink_GetURL); | |
| 117 CHK(FPDFLink_LoadWebLinks); | |
| 118 CHK(FPDF_LoadCustomDocument); | |
| 119 CHK(FPDF_LoadDocument); | |
| 120 CHK(FPDF_LoadMemDocument); | |
| 121 CHK(FPDF_LoadPage); | |
| 122 CHK(FPDFPage_CountObject); | |
| 123 CHK(FPDFPage_Delete); | |
| 124 CHK(FPDFPage_Flatten); | |
| 125 CHK(FPDFPage_GenerateContent); | |
| 126 CHK(FPDFPage_GetCropBox); | |
| 127 CHK(FPDFPage_GetMediaBox); | |
| 128 CHK(FPDFPage_GetObject); | |
| 129 CHK(FPDFPage_GetRotation); | |
| 130 CHK(FPDFPage_HasTransparency); | |
| 131 CHK(FPDFPage_InsertClipPath); | |
| 132 CHK(FPDFPage_InsertObject); | |
| 133 CHK(FPDFPage_New); | |
| 134 CHK(FPDFPageObj_HasTransparency); | |
| 135 CHK(FPDFPageObj_NewImgeObj); | |
| 136 CHK(FPDFPageObj_Transform); | |
| 137 CHK(FPDFPageObj_TransformClipPath); | |
| 138 CHK(FPDFPage_SetCropBox); | |
| 139 CHK(FPDFPage_SetMediaBox); | |
| 140 CHK(FPDFPage_SetRotation); | |
| 141 CHK(FPDF_PageToDevice); | |
| 142 CHK(FPDFPage_TransformAnnots); | |
| 143 CHK(FPDFPage_TransFormWithClip); | |
| 144 CHK(FPDF_RemoveFormFieldHighlight); | |
| 145 CHK(FPDF_RenderPageBitmap); | |
| 146 CHK(FPDF_RenderPageBitmap_Start); | |
| 147 CHK(FPDF_RenderPage_Close); | |
| 148 CHK(FPDF_RenderPage_Continue); | |
| 149 CHK(FPDF_SaveAsCopy); | |
| 150 CHK(FPDF_SaveWithVersion); | |
| 151 CHK(FPDF_SetFormFieldHighlightAlpha); | |
| 152 CHK(FPDF_SetFormFieldHighlightColor); | |
| 153 CHK(FPDF_SetSandBoxPolicy); | |
| 154 CHK(FPDF_SetSystemFontInfo); | |
| 155 CHK(FPDFText_ClosePage); | |
| 156 CHK(FPDFText_CountChars); | |
| 157 CHK(FPDFText_CountRects); | |
| 158 CHK(FPDFText_FindClose); | |
| 159 CHK(FPDFText_FindNext); | |
| 160 CHK(FPDFText_FindPrev); | |
| 161 CHK(FPDFText_FindStart); | |
| 162 CHK(FPDFText_GetBoundedText); | |
| 163 CHK(FPDFText_GetCharBox); | |
| 164 CHK(FPDFText_GetCharIndexAtPos); | |
| 165 CHK(FPDFText_GetCharIndexFromTextIndex); | |
| 166 CHK(FPDFText_GetFontSize); | |
| 167 CHK(FPDFText_GetRect); | |
| 168 CHK(FPDFText_GetSchCount); | |
| 169 CHK(FPDFText_GetSchResultIndex); | |
| 170 CHK(FPDFText_GetText); | |
| 171 CHK(FPDFText_GetUnicode); | |
| 172 CHK(FPDFText_LoadPage); | |
| 173 CHK(FPDF_VIEWERREF_GetDuplex); | |
| 174 CHK(FPDF_VIEWERREF_GetNumCopies); | |
| 175 CHK(FPDF_VIEWERREF_GetPrintPageRange); | |
| 176 CHK(FPDF_VIEWERREF_GetPrintScaling); | |
| 177 CHK(FPDPage_HasFormFieldAtPoint); | |
| 178 CHK(FSDK_SetUnSpObjProcessHandler); | |
| 179 | |
| 180 return 1; | |
| 181 } | |
| 182 | |
| 183 #undef CHK | |
| OLD | NEW |