File: cairo-perl-private.h

package info (click to toggle)
libcairo-perl 1.109-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 732 kB
  • sloc: perl: 3,313; ansic: 89; makefile: 11
file content (44 lines) | stat: -rw-r--r-- 1,216 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (c) 2004-2005 by the cairo perl team (see the file README)
 *
 * Licensed under the LGPL, see LICENSE file for more information.
 *
 * $Id$
 *
 */

#ifndef _CAIRO_PERL_PRIVATE_H_
#define _CAIRO_PERL_PRIVATE_H_

#include "ppport.h"

void * cairo_perl_alloc_temp (int nbytes);

void cairo_perl_set_isa (const char * child_package, const char * parent_package);

cairo_matrix_t * cairo_perl_copy_matrix (cairo_matrix_t *matrix);

#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 2, 0)

void cairo_perl_package_table_insert (void *pointer, const char *package);

const char * cairo_perl_package_table_lookup (void *pointer);

#endif

#define CAIRO_PERL_CHECK_STATUS(status)				\
	if (CAIRO_STATUS_SUCCESS != status) {			\
		SV *errsv = get_sv ("@", TRUE);			\
		sv_setsv (errsv, newSVCairoStatus (status));	\
		croak (Nullch);					\
	}

cairo_bool_t cairo_perl_sv_is_defined (SV *sv);
#define cairo_perl_sv_is_ref(sv) \
	(cairo_perl_sv_is_defined (sv) && SvROK (sv))
#define cairo_perl_sv_is_array_ref(sv) \
	(cairo_perl_sv_is_ref (sv) && SvTYPE (SvRV(sv)) == SVt_PVAV)
#define cairo_perl_sv_is_hash_ref(sv) \
	(cairo_perl_sv_is_ref (sv) && SvTYPE (SvRV(sv)) == SVt_PVHV)

#endif /* _CAIRO_PERL_PRIVATE_H_ */