first commit

This commit is contained in:
Furqan-14
2026-05-15 10:39:16 +05:30
commit 43eba01201
38 changed files with 2021 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// pdfengine — document API.
//
// ┌─────────────────────────────────────────────────────────────────────────┐
// │ PLACEHOLDER. This header is the deliverable of Phase 0 Gate G0b: │
// │ "Frozen interface contracts" — the PdfDocument / PdfPage API structs │
// │ reviewed and locked by all three developers before Phase 1 coding. │
// │ │
// │ Do NOT fill in method signatures yet. Nothing proceeds until the │
// │ contract is signed off (see docs/phase0.md, Gate G0b). │
// │ │
// │ Rule R2: only engine/src/parser/ may touch raw FPDF_* PDFium APIs. │
// │ Everything else in the codebase goes through these types. │
// └─────────────────────────────────────────────────────────────────────────┘
#pragma once
namespace pdfengine {
// Opaque, owning handle to a parsed PDF document.
// Full definition + API land at Gate G0b.
class PdfDocument;
// Opaque view onto a single page of a PdfDocument.
// Full definition + API land at Gate G0b.
class PdfPage;
} // namespace pdfengine
+25
View File
@@ -0,0 +1,25 @@
// pdfengine — public umbrella header for the PDF SDK core.
//
// Phase 0 surface only: version + build introspection. The real document API
// (PdfDocument / PdfPage) is frozen at Gate G0b and added in Phase 1 — see
// pdf_document.hpp.
#pragma once
#include <pdfengine/version.hpp>
#include <string_view>
namespace pdfengine {
// Human-readable engine version, e.g. "0.1.0".
[[nodiscard]] std::string_view engineVersion() noexcept;
// One-line build descriptor, e.g. "pdfengine 0.1.0 (pdfium=off)".
[[nodiscard]] std::string_view engineBuildInfo() noexcept;
// True if this build was compiled and linked against the PDFium parser core.
[[nodiscard]] bool engineHasPdfium() noexcept;
// Emits engineBuildInfo() through spdlog at info level.
void engineLogBuildInfo();
} // namespace pdfengine
+14
View File
@@ -0,0 +1,14 @@
// Generated by CMake from version.hpp.in — do not edit the generated copy.
#pragma once
#include <string_view>
namespace pdfengine {
inline constexpr int version_major = @PROJECT_VERSION_MAJOR@;
inline constexpr int version_minor = @PROJECT_VERSION_MINOR@;
inline constexpr int version_patch = @PROJECT_VERSION_PATCH@;
inline constexpr std::string_view version_string = "@PROJECT_VERSION@";
} // namespace pdfengine