In case PYCAIRO_NO_IMPORT is defined we declare the api struct as extern and hide the
import function. Also don't make the API struct static so we can access it from outside.
With https://cgit.freedesktop.org/cairo/commit/?id=84fc0ce91d1a57d20500f710abc0e17de82c67df
cairo has moved from using fopen, which supports ANSI paths, to _wfopen, which
supports all Windows paths. The input is changed/limited to utf-8.
To paper over this "API break" (anything outside of ASCII is different)
adjust the encoding based on the cairo library version at runtime.
It's a tuple subclass, so can be used everywhere where it was used before.
In the documentation remove all the optional glyph array lengths, as they
are not strictly needed (one cas just pass slices) and just complicate things.
This only adds the type, constructor and the get/set_acquire() methods.
Since for some reason the callbacks don't get passed the pattern, this
uses the callback data to access the Python functions in the callbacks.
The whole thing doesn't look heavily tested in cairo, so I'm waiting
for a response in https://bugs.freedesktop.org/show_bug.cgi?id=101866
before looking into wrapping more functions there.
Move all documentation to reference the new types and move the old
constants to a "legacy constants" page to help people support older
versions or cairocffi.