Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / src / cairo / php_cairo.h
blob8051af4ae6a3f463e1a14fd5e4fe7348096c9852
1 /*
2 +----------------------------------------------------------------------+
3 | This source file is subject to version 3.01 of the PHP license, |
4 | that is bundled with this package in the file LICENSE, and is |
5 | available through the world-wide-web at the following url: |
6 | http://www.php.net/license/3_01.txt. |
7 | If you did not receive a copy of the PHP license and are unable to |
8 | obtain it through the world-wide-web, please send a note to |
9 | license@php.net so we can mail you a copy immediately. |
10 +----------------------------------------------------------------------+
11 | Authors: Akshat Gupta <g.akshat@gmail.com> |
12 +----------------------------------------------------------------------+
15 /* $ Id: $ */
17 #define PHP_CAIRO_VERSION "1.01"
19 #ifndef PHP_CAIRO_H
20 #define PHP_CAIRO_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
30 #include <php.h>
32 #ifdef HAVE_CAIRO
34 #include <php_ini.h>
35 #include <SAPI.h>
36 #include <ext/standard/info.h>
37 #include <Zend/zend_extensions.h>
38 #ifdef __cplusplus
39 } /* extern "C" */
41 #endif
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
46 extern zend_module_entry phpCairo_module_entry;
47 #define phpext_phpCairo_ptr &phpCairo_module_entry
49 #ifdef PHP_WIN32
50 #define PHP_CAIRO_API __declspec(dllexport)
51 #else
52 #define PHP_CAIRO_API
53 #endif
55 PHP_MINIT_FUNCTION(cairo);
56 PHP_MINFO_FUNCTION(cairo);
58 #ifdef ZTS
59 #include "TSRM.h"
60 #endif
62 #define FREE_RESOURCE(resource) zend_list_delete(Z_LVAL_P(resource))
64 #define PROP_GET_LONG(name) Z_LVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
65 #define PROP_SET_LONG(name, l) zend_update_property_long(_this_ce, _this_zval, #name, strlen(#name), l TSRMLS_CC)
67 #define PROP_GET_DOUBLE(name) Z_DVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
68 #define PROP_SET_DOUBLE(name, d) zend_update_property_double(_this_ce, _this_zval, #name, strlen(#name), d TSRMLS_CC)
70 #define PROP_GET_STRING(name) Z_STRVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
71 #define PROP_GET_STRLEN(name) Z_STRLEN_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
72 #define PROP_SET_STRING(name, s) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s TSRMLS_CC)
73 #define PROP_SET_STRINGL(name, s, l) zend_update_property_stringl(_this_ce, _this_zval, #name, strlen(#name), s, l TSRMLS_CC)
76 PHP_FUNCTION(cairo_version);
77 #if (PHP_MAJOR_VERSION >= 5)
78 ZEND_BEGIN_ARG_INFO_EX(cairo_version_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
79 ZEND_END_ARG_INFO()
80 #endif
82 PHP_FUNCTION(cairo_version_string);
83 #if (PHP_MAJOR_VERSION >= 5)
84 ZEND_BEGIN_ARG_INFO_EX(cairo_version_string_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
85 ZEND_END_ARG_INFO()
86 #endif
97 #ifdef __cplusplus
98 } /* extern "C" */
99 #endif
101 #endif /* PHP_HAVE_CAIRO */
103 #endif /* PHP_CAIRO_H */
105 /* {{{ Proto's */
108 /* }}} */
112 * Local variables:
113 * tab-width: 4
114 * c-basic-offset: 4
115 * End:
116 * vim600: noet sw = 4 ts = 4 fdm = marker
117 * vim<600: noet sw = 4 ts = 4