Commit Graph

11 Commits

Author SHA1 Message Date
Christoph Reiter 9215412954 c-api: Make it possible to use the C API with Python 3 outside of the CU doing the import. Fixes #110
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.
2018-04-13 17:11:32 +02:00
Christoph Reiter f0fdcee0ac bump minor version
There are new files to install and new API.
2018-02-05 16:27:09 +01:00
Christoph Reiter fa0707e565 Move header into the package and add a get_include() function. See #92
Pycairo installs .pc files which work quite well where the default
prefix is used, like with distro packaging etc. In virtualenvs
the pkg-config look up path needs to be set manually, and in pip
wheels are involved, where we had to disable installing .pc files
as they can get reused for a different prefix.

To make it easier for other python modules to use the C API introduce
a new function get_include() (similar ot what numpy has) which returns
the include path that needs to be passed to the compiler.

Since we can't really get the old header install path from the module
(one could walk up the tree and look for matching files, but that's ugly)
move the header file into the package itself, so that the path can be
dervived from the package path.

To prevent code from breaking which hardcodes the old include path
install a header to the old location which includes the new header
location.
2018-01-31 21:53:59 +01:00
Christoph Reiter df880d58f5 docs: Move the C API documentation from the source code into the docs. Fixes #58
Also add some more info regarding ownership transfer and error handling.
2017-07-19 11:27:33 +02:00
Christoph Reiter 7fe2155f1d docs: fix various sphinx warnings 2017-05-02 22:59:15 +02:00
Christoph Reiter 6b956ad986 Re-add support for RecordingSurface
This time without breaking ABI
2017-04-12 15:32:53 +02:00
Christoph Reiter 55259f63c5 Revert "Add support for RecordingSurface, using patch (modified) from bug #36854. Add docs and tests for RecordingSurface. Adding the RecordingSurface to the pycairo API breaks ABI compatibility with previous pycairo versions."
This reverts commit c4df9b51c8.

I didn't notice that pyc2cairo master also broke ABI :(
2017-04-12 15:14:10 +02:00
Christoph Reiter 2a4762faa9 docs: fix a typo 2017-04-09 08:29:42 +02:00
Christoph Reiter a05e95a3fc Add support for cairo_region_t and cairo_rectangle_int_t
This is based on a patch at (by mozbugbox@yahoo.com.au)
    https://bugs.freedesktop.org/show_bug.cgi?id=44336#c2
2017-04-08 12:20:19 +02:00
Christoph Reiter 3fdab52926 docs: Move overview to index; restructure menu 2017-04-07 15:04:54 +02:00
Christoph Reiter 7630f6d7d0 Rename src->cairo, doc->docs, test->tests 2017-04-07 09:45:40 +02:00