diff options
Diffstat (limited to 'src/private.h')
-rw-r--r-- | src/private.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/private.h b/src/private.h index 197f935..4a6b6ad 100644 --- a/src/private.h +++ b/src/private.h @@ -22,7 +22,7 @@ #define _PYCAIRO_PRIVATE_H_ #ifdef _PYCAIRO_H_ -# error "don't include pycairo.h and pycairo-private.h together" +# error "don't include py3cairo.h and private.h together" #endif #define _INSIDE_PYCAIRO_ @@ -62,6 +62,13 @@ extern PyTypeObject PycairoRadialGradient_Type; PyObject *PycairoPattern_FromPattern (cairo_pattern_t *pattern, PyObject *base); +extern PyTypeObject PycairoRectangleInt_Type; +PyObject *PycairoRectangleInt_FromRectangleInt ( + cairo_rectangle_int_t *rectangle_int); + +extern PyTypeObject PycairoRegion_Type; +PyObject *PycairoRegion_FromRegion (cairo_region_t *region); + extern PyTypeObject PycairoScaledFont_Type; PyObject *PycairoScaledFont_FromScaledFont (cairo_scaled_font_t *scaled_font); @@ -161,5 +168,14 @@ int Pycairo_Check_Status (cairo_status_t status); } \ } while (0) +#define RETURN_NULL_IF_CAIRO_REGION_ERROR(region) \ + do { \ + cairo_status_t status = cairo_region_status (region); \ + if (status != CAIRO_STATUS_SUCCESS) { \ + Pycairo_Check_Status (status); \ + return NULL; \ + } \ + } while (0) + #endif /* _PYCAIRO_PRIVATE_H_ */ |