|
META TOPICPARENT |
name="JulianSmith" |
Auto-generated C++ and Python APIs for mupdf.
Status |
|
< < | 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.
|
|
< < |
- 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.
|
|
< < |
- 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 |
|
Comments |
|
< < |
- 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: |
|
< < | |
> > | |
|
And pydoc html representation of the generated mupdf.py API: |
|
< < | |
> > | |
|
mutool.py |
|
< < | 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 |
| |
|
< < | 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: |
| |