Tags:
view all tags
---+ Auto-generated mupdf C++ wrappers ---++ Status As of 2020-4-28: * We generate class wrappers for all fz structs. * We auto-detect fz_*() fns suitable for wrapping as constructors, methods or static methods. * Some generated classes have auto-generated support for iteration. * We add various custom wrappers for fz_*() fns. * We add various custom methods/constructors. * We provide access via wrapper classes to 686 fz_*() fns. * There are a total of 888 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. * We work with swig-3 or swig-4. * We work with clang-6 or clang-7. * We work on peeved and jules-laptop. ---+++ 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. Here are Doxygen html representations of the mupdf C API and the generated mupdf C++ API: * https://ghostscript.com/~julian/doxygen/mupdf/index.html * https://ghostscript.com/~julian/doxygen/mupdfcpp/index.html And pydoc html representation of the generated mupdf.py API: * https://ghostscript.com/~julian/pydoc/mupdf.html ---++ Files Auto-generated C++ headers and implementation files, plus test outputs (.html files have syntax-colouring): * https://ghostscript.com/~julian/mupdf/platform/c++/ * https://ghostscript.com/~julian/mupdf/platform/python Information about fz_*() fns that are not in the class-based API: * https://ghostscript.com/~julian/mupdf/platform/c++/fn_usage.txt These were generated by the mupdfwrap.py programme, which also runs g++ and SWIG to generate a Python module that gives a Python API: * https://git.ghostscript.com/?p=user/julian/mupdf.git;a=blob;f=scripts/mupdfwrap.py;hb=HEAD The generated Python module is tested by the (rather hacky) test_mupdfcpp_swig() function in mupdfwrap.py. For convenience, this function and its output can be viewed in https://ghostscript.com/~julian/mupdf/platform/python. In mupdfwrap.py: * See "Todo:" section in comment near top, for status of various todo items. ---++ Integration with mupdf git. In mupdf, have added various things: <literal> <pre> mupdf/ build/ release-shared/ libmupdf.so [generated file] libmupdfcpp.so [generated file, implements C++ API] debug-shared/ libmupdf.so [generated file] libmupdfcpp.so [generated file, implements C++ API] platform/ c++/ implementation/ *.cpp [generated files] include/ mupdf/ *.h [generated files] python/ mudf.py [generated file, implements Python API] _mupdf.so [generated file, implements Python API internals] scripts/ mupdfwrap.py jlib.py </pre> </literal> See: * https://git.ghostscript.com/?p=user/julian/mupdf.git;a=summary To build: <literal> <pre> cd mupdf/ ./scripts/mupdfwrap.py -b all -t </pre> </literal> Have also added crude support for building mupdf as a shared object, which is required for integrating with the SWIG python module. At the moment, mupdfwrap.py drives this to build mupdf.so. ---- -- %USERSIG{JulianSmith - 2020-03-04}% ---++ Comments %COMMENT%
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r25
|
r18
<
r17
<
r16
<
r15
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r16 - 2020-04-27
-
JulianSmith
Home
Site map
GSView web
Ghostscript web
Main web
MuPDF web
Sandbox web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Edit
Attach
Copyright © 2014 Artifex Software Inc