scripts/mupdfwrap.py: Lots of improvements to C++ and Python bindings.
scripts/mupdfwrap.py: Lots of improvements to C++ and Python bindings.

When generating class methods, ignore fns ending with _drop() because they are
incorrect with our wrapper classes' auto-ref counting.

Added default constructor for fz_image wrapper that sets m_internal to null,
because python 'Image(0)' is ambiguous due to the Image(const char *path)
constructor.

For functions that returned raw unsigned char array, make alternative C++
wrappers that return a std::vector<unsigned char>, which work much better with
SWIG: fz_md5_final(), fz_md5_pixmap(), fz_memrnd(), fz_runetochar().

Made fz_md5 wrapper be pod so it can be default-constructed.

Allow construction of Document from PdfDocument, setting m_internal =
pdf_document.m_internal.super, with suitable calls to keep to make the ref
counts work.

Added method to write to PdfWriteOptions::opwd_utf8 and upwd_utf8.

Added PdfPage::super() to return Page wrapper for .super.

Made Python wrappers for fz_fill_text() take Python tuple/list for float* color
arg.

Fix reference counting for wrapper-class out-params. For out-params that are
class wrappers, we need to drop initial .m_internal then keep the overwritten
.m_internal.

Mpdf_dict_getl(): avoid unnecessary copy.

Provide wrapper classes' m_internal ptr as a long long int. Useful in python
debugging - allows one to detect whether two instances of a wrapper class refer
to the same underlying struct.

Better detection of reference counting. If there is a _keep() fn, we require
that we either find .refs in definition, or we have hard-coded info on location
and size of .refs for abstract structs. For example this fixes our wrapping of
pdf_annot, for which we only have a forward declaration.

Added details for pdf_lexbuf. Added custom constructor which calls
pdf_lexbuf_init(), and custom destructor which calls pdf_lexbuf_fin().

Added fz_page downcast constructor from pdf_page.

Expose pdf_widget_type enum.

Improved python *dict_getl() and *dict_putl(). We now also provide
mpdf_dict_getl() etc handling variable number of args.

Define pdf_filter_options wrapper as pod with default constructor.

Added spec for pdf_redact_options. Inline pod with custom default constructor.

Added default constructors to Buffer and ColorParams.

Pixmap: added samples_get() and samples_set() methods.

Added new python wrapper for pdf_set_annot_color and
pdf_set_annot_interior_color2(), to handle the input float array correctly.

Allow default construction of PdfObj, setting m_internal=null.

Added alternative wrappers for MuPDF functions in the form of free-standing
functions that operate on our wrapper classes. Useful when porting existing
code to Python, and generally as a non-class-based API that still gives
automatic handling of reference counting. New functions have same name as
underlying MuPDF function with a 'm' prefix; they do not take a fz_context arg
and take/return references to wrapper classes instead of pointers to MuPDF
structs.

Use SWIG's stdint.i to allow int64_t to work in python.

Fix ref checking for pdf_obj. We now have PdfObj instances where m_internal is
a small integer such as PDF_ENUM_NAME_1_2, so this commit allows ref checking
for PdfObj to do nothing if m_interal < 4096.

Scripts/mupdfwrap.py: improved handling of PDF_ENUM_NAME_* enums. In mupdf.py,
we convert PDF_ENUM_NAME_* enums into PdfObj*'s using obj_enum_to_obj() so that
they can be used directly without obj_enum_to_obj().

Don't omit pdf_annot_type() and pdf_string_from_annot_type() functions -
previously omitted because pdf_annot_type is also the name of an enum.

Wrap pdf_lookup_metadata() similarly to fz_lookup_metadata().

Added PdfDocument::doc() to access .doc member.

Added obj_enum_to_obj() C++ function for python that converts enums such as
mupdf.PDF_ENUM_NAME_Filter to proxies for pdf_obj*, which can then be passed
directly to functions such as mupdf.PdfObj.dict_put().

Reinstated Buffer.buffer_storage() and made it raise an exception with useful
error info.

Implement mupdf.Buffer.new_buffer_from_copied_data() in python.

Added extra bytes wrapper that returns unsigned char*. This can then be passed
directly to mupdf.new_buffer_from_copied_data().

Added fns to return python address and size of python bytes as integers.

Added obj() method to PdfObj() to give wrapper for pdf_page's .obj member.

Removed omit_class_names* - was unused. We have been wrapping all structs for
quite some time now.

Added regression checking to .i files.

Renamed commonly-occuring variables for clarity:
    struct => struct_cursor
    structname => struct_name

Cleanup of class_write_method_body().

Support checking for regressions in C++ output. See -b's new --regress flag.

Detect borrowed references by matching fn name infixes. Functions return kept
references iff fn name contains any of: 'new', 'create', 'find', 'load',
'open', 'keep', 'read'.

Call ::abs() instead of fz_abs().

Added overload for pdf_dict_get() that takes int. Allows python wrappers to
work without failing due to type error caused by treating an int as a pdf_obj*.

Avoid excluding class method wrappers for pdf_* fns in python. We were
previously not clipping pdf_ from method names, so they were being excluded
from python because we deliberately don't provide access to the raw MuPDF
functions (because they require a context and use fz_throw etc). So now we
rename all methods to remove initial fz_ or pdf_.

Minor fixes to C# testing.

Fixed new custom fz_outline_item methods on windows. Need to mark all class
method declarations and definitions with FZ_FUNCTION so that they are correctly
handled on Windows.

ArtifexSoftware/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf