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 +----------------------------------------------------------------------+
17 #define PHP_CAIRO_VERSION "1.01"
36 #include <ext/standard/info.h>
37 #include <Zend/zend_extensions.h>
46 extern zend_module_entry phpCairo_module_entry
;
47 #define phpext_phpCairo_ptr &phpCairo_module_entry
50 #define PHP_CAIRO_API __declspec(dllexport)
55 PHP_MINIT_FUNCTION(cairo
);
56 PHP_MINFO_FUNCTION(cairo
);
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)
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)
101 #endif /* PHP_HAVE_CAIRO */
103 #endif /* PHP_CAIRO_H */
116 * vim600: noet sw = 4 ts = 4 fdm = marker
117 * vim<600: noet sw = 4 ts = 4