rendered paste body# Cairo Declarations
#
# Copyright (C) 2007 Team PySoy
#
# This program is free software you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation either version 3 of the License, or
# (at your option ) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program if not, see http://www.gnu.org/licenses
#
# $Id: cairo.pxd 577 2007-12-28 01:31:39Z ArcRiley $
cdef extern from "cairo/cairo.h" :
ctypedef int cairo_bool_t
ctypedef void *cairo_t
ctypedef void *cairo_surface_t
ctypedef struct cairo_matrix_t :
double xx
double yx
double xy
double yy
double x0
double y0
ctypedef void *cairo_pattern_t
ctypedef void (*cairo_destroy_func_t) (void *data)
ctypedef void *cairo_user_data_key_t
ctypedef enum cairo_status_t :
CAIRO_STATUS_SUCCESS = 0,
CAIRO_STATUS_NO_MEMORY,
CAIRO_STATUS_INVALID_RESTORE,
CAIRO_STATUS_INVALID_POP_GROUP,
CAIRO_STATUS_NO_CURRENT_POINT,
CAIRO_STATUS_INVALID_MATRIX,
CAIRO_STATUS_INVALID_STATUS,
CAIRO_STATUS_NULL_POINTER,
CAIRO_STATUS_INVALID_STRING,
CAIRO_STATUS_INVALID_PATH_DATA,
CAIRO_STATUS_READ_ERROR,
CAIRO_STATUS_WRITE_ERROR,
CAIRO_STATUS_SURFACE_FINISHED,
CAIRO_STATUS_SURFACE_TYPE_MISMATCH,
CAIRO_STATUS_PATTERN_TYPE_MISMATCH,
CAIRO_STATUS_INVALID_CONTENT,
CAIRO_STATUS_INVALID_FORMAT,
CAIRO_STATUS_INVALID_VISUAL,
CAIRO_STATUS_FILE_NOT_FOUND,
CAIRO_STATUS_INVALID_DASH,
CAIRO_STATUS_INVALID_DSC_COMMENT,
CAIRO_STATUS_INVALID_INDEX,
CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
ctypedef enum cairo_content_t :
CAIRO_CONTENT_COLOR
CAIRO_CONTENT_ALPHA
CAIRO_CONTENT_COLOR_ALPHA
ctypedef cairo_status_t (*cairo_write_func_t) (void *closure,
unsigned char *data,
unsigned int length)
ctypedef enum cairo_operator_t :
CAIRO_OPERATOR_CLEAR,
CAIRO_OPERATOR_SOURCE,
CAIRO_OPERATOR_OVER,
CAIRO_OPERATOR_IN,
CAIRO_OPERATOR_OUT,
CAIRO_OPERATOR_ATOP,
CAIRO_OPERATOR_DEST,
CAIRO_OPERATOR_DEST_OVER,
CAIRO_OPERATOR_DEST_IN,
CAIRO_OPERATOR_DEST_OUT,
CAIRO_OPERATOR_DEST_ATOP,
CAIRO_OPERATOR_XOR,
CAIRO_OPERATOR_ADD,
CAIRO_OPERATOR_SATURATE
#line 367
ctypedef enum cairo_format_t :
CAIRO_FORMAT_ARGB32,
CAIRO_FORMAT_RGB24,
CAIRO_FORMAT_A8,
CAIRO_FORMAT_A1
cdef cairo_t* cairo_create ( cairo_surface_t* )
cdef cairo_t* cairo_reference ( cairo_t* )
cdef void cairo_destroy ( cairo_t* )
cdef unsigned int cairo_get_reference_count ( cairo_t* )
cdef void* cairo_get_user_data ( cairo_t*,
cairo_user_data_key_t* )
cdef cairo_status_t cairo_set_user_data ( cairo_t*,
cairo_user_data_key_t*,
void*,
cairo_destroy_func_t )
cdef void cairo_save ( cairo_t* )
cdef void cairo_restore ( cairo_t* )
cdef void cairo_push_group ( cairo_t* )
cdef void cairo_push_group_with_content ( cairo_t*,
cairo_content )
cdef cairo_pattern_t* cairo_pop_group ( cairo_t* )
cdef void cairo_pop_group_to_source ( cairo_t* )
cdef void cairo_set_operator ( cairo_t*,
cairo_operator_t )
cdef void cairo_set_source ( cairo_t*,
cairo_pattern_t* )
#line 367
cdef cairo_surface_t* cairo_image_surface_create ( cairo_format_t,
int, int )
cdef cairo_surface_t* cairo_image_surface_create_for_data \
( unsigned char*,
cairo_format_t,
int, int, int )
cdef unsigned char *cairo_image_surface_get_data ( cairo_surface_t* )
cdef cairo_format_t cairo_image_surface_get_format ( cairo_surface_t* )
cdef int cairo_image_surface_get_width ( cairo_surface_t* )
cdef int cairo_image_surface_get_height ( cairo_surface_t* )
cdef int cairo_image_surface_get_stride ( cairo_surface_t* )
#if CAIRO_HAS_PNG_FUNCTIONS
cdef char *cairo_image_surface_create_from_png \
( cairo_surface_t* )
cdef void *cairo_image_surface_create_from_png_stream \
( cairo_read_func_t,
void* )
#endif
# Pattern creation functions
cdef unsigned char *cairo_image_surface_get_data ( cairo_surface_t * )
cdef cairo_pattern_t *cairo_pattern_create_rgb ( double, double,
double )
cdef cairo_pattern_t *cairo_pattern_create_rgba ( double, double,
double, double )
cdef cairo_pattern_t *cairo_pattern_create_for_surface \
( cairo_surface_t* )
cdef cairo_pattern_t *cairo_pattern_create_linear ( double, double,
double, double )
cdef cairo_pattern_t *cairo_pattern_create_radial ( double, double,
double, double,
double, double )
cdef void *cairo_get_user_data ( cairo_t*,
cairo_user_data_key_t* )
cdef cairo_pattern_t *cairo_pattern_reference ( cairo_pattern_t* )
cdef void cairo_pattern_destroy ( cairo_pattern_t* )
cdef unsigned int cairo_pattern_get_reference_count \
( cairo_pattern_t* )
cdef cairo_status_t cairo_pattern_status ( cairo_pattern_t* )
cdef void *cairo_pattern_get_user_data ( cairo_pattern_t*,
cairo_user_data_key_t* )
cdef cairo_status_t cairo_pattern_set_user_data ( cairo_pattern_t*,
cairo_user_data_key_t*,
void*,
cairo_destroy_func_t )
# cairo_pattern_type_t
ctypedef enum _cairo_pattern_type_t :
CAIRO_PATTERN_TYPE_SOLID,
CAIRO_PATTERN_TYPE_SURFACE,
CAIRO_PATTERN_TYPE_LINEAR,
CAIRO_PATTERN_TYPE_RADIAL
cdef _cairo_pattern_type_t cairo_pattern_get_type ( cairo_pattern_t* )
cdef void cairo_pattern_add_color_stop_rgb \
( cairo_pattern_t*,
double, double,
double, double )
cdef void cairo_pattern_add_color_stop_rgba \
( cairo_pattern_t*,
double, double,
double, double,
double )
cdef void cairo_pattern_set_matrix ( cairo_pattern_t*,
cairo_matrix_t * )
cdef void cairo_pattern_get_matrix ( cairo_pattern_t*,
cairo_matrix_t* )
# cairo_extend_t
ctypedef enum _cairo_extend_t :
CAIRO_EXTEND_NONE,
CAIRO_EXTEND_REPEAT,
CAIRO_EXTEND_REFLECT,
CAIRO_EXTEND_PAD
cdef void cairo_pattern_set_extend ( cairo_pattern_t*,
cairo_extend_t )
cdef _cairo_extend_t cairo_pattern_get_extend ( cairo_pattern_t* )
ctypedef enum _cairo_filter_t :
CAIRO_FILTER_FAST,
CAIRO_FILTER_GOOD,
CAIRO_FILTER_BEST,
CAIRO_FILTER_NEAREST,
CAIRO_FILTER_BILINEAR,
CAIRO_FILTER_GAUSSIAN
cdef void cairo_pattern_set_filter ( cairo_pattern_t*,
cairo_filter_t )
cdef _cairo_filter_t cairo_pattern_get_filter ( cairo_pattern_t* )
cdef cairo_status_t cairo_pattern_get_rgba ( cairo_pattern_t*,
double*, double*,
double*, double* )
cdef cairo_status_t cairo_pattern_get_surface ( cairo_pattern_t*,
cairo_surface_t** )
cdef cairo_status_t cairo_pattern_get_color_stop_rgba \
( cairo_pattern_t*,
int, double*,
double*, double*,
double*, double* )
cdef cairo_status_t cairo_pattern_get_color_stop_count \
( cairo_pattern_t*,
int* )
cdef cairo_status_t cairo_pattern_get_linear_points \
( cairo_pattern_t*,
double*, double *,
double*, double * )
cdef cairo_status_t cairo_pattern_get_radial_circles \
( cairo_pattern_t*,
double*, double*,
double*, double*,
double*, double* )
# Matrix functions
cdef void cairo_matrix_init ( cairo_matrix_t*,
double, double,
double, double,
double, double )
cdef void cairo_matrix_init_identity ( cairo_matrix_t* )
cdef void cairo_matrix_init_translate ( cairo_matrix_t*,
double, double )
cdef void cairo_matrix_init_scale ( cairo_matrix_t*,
double, double )
cdef void cairo_matrix_init_rotate ( cairo_matrix_t*,
double )
cdef void cairo_matrix_translate ( cairo_matrix_t*,
double, double )
cdef void cairo_matrix_scale ( cairo_matrix_t*,
double, double )
cdef void cairo_matrix_rotate ( cairo_matrix_t*,
double )
cdef cairo_status_t cairo_matrix_invert ( cairo_matrix_t* )
cdef void cairo_matrix_multiply ( cairo_matrix_t*,
cairo_matrix_t*,
cairo_matrix_t* )
cdef void cairo_matrix_transform_distance \
( cairo_matrix_t*,
double*, double* )
cdef void cairo_matrix_transform_point ( cairo_matrix_t*,
double*, double* )
# Functions to be used while debugging (not intended for use in production code)
cdef void cairo_debug_reset_static_data ( )#void )