Difference: MupdfCppWrappers (17 vs. 18)

Revision 182020-05-11 - JulianSmith

Line: 1 to 1
 
META TOPICPARENT name="JulianSmith"

Auto-generated C++ and Python APIs for mupdf.

Status

Changed:
<
<
As of 2020-5-4:
>
>
As of 2020-5-11:
 

C++

  • C++ API is generated by mupdf:scripts/mupdfwrap.py, which uses python-clang.
  • We require clang-6 or clang-7.
Changed:
<
<
  • We generate C++ class wrappers for all fz structs.
  • We auto-detect fz_*() fns suitable for wrapping as constructors, methods or static methods.
>
>
  • We generate C++ wrapper functions for most fz_ and pdf_ functions. These wrapper convert fz_ exceptions into C++ exceptions, and use auto-generated per-thread fz_context's.
  • We generate C++ class wrappers for most fz_ and pdf_ structs.
  • We auto-detect fz_*() and pdf_*() fns suitable for wrapping as constructors, methods or static methods.
 
  • Some generated classes have auto-generated support for iteration.
  • We add various custom methods/constructors.
Changed:
<
<
  • We provide access via wrapper classes to 690 fz_*() fns.
  • There are a total of 890 fz_*() functions. Most of the omitted functions don't take struct args, e.g. fz_strlcpy(). Of the remaining, some use fz_* enums (which we don't yet wrap); see https://ghostscript.com/~julian/mupdf/platform/c++/fn_usage.txt for more information.
>
>
  • Wrapper class constructors and methods provide access to 1270 fz_*() and pdf_*() fns, out of a total of 1513 wrapped fz_*() and pdf_*() functions. Most of the omitted functions don't take struct args, e.g. fz_strlcpy().
 

Python

Line: 32 to 32
 

Comments

Changed:
<
<
  • We use clang to extract doxygen-style comments, and propogate them into generated header files.
  • If swig is version 4+, we tell it to propogate comments into generated mupdf.py.
>
>
  • We use clang to extract doxygen-style comments, and propagate them into generated header files.
  • If swig is version 4+, we tell it to propagate comments into the generated mupdf.py.
  Here are Doxygen html representations of the mupdf C API and the generated mupdf C++ API:
Changed:
<
<
>
>
  And pydoc html representation of the generated mupdf.py API:
Changed:
<
<
>
>
 

mutool.py

Changed:
<
<
mudpdf:scripts/mutool*.py are a Python re-implementation of the mutool application.

They do not use threads, or the include/mupdf/pdf/ functionality.

>
>
mudpdf:scripts/mutool*.py are an incomplete Python re-implementation of the mutool application.
 

Files

Line: 59 to 57
 
Changed:
<
<
Information about fz_*() fns that are not in the class-based API:
>
>
Information about fz_*() and pdf_*() fns that are not in the class-based API:
 
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 2014 Artifex Software Inc