Line data Source code
1 : /*
2 : +----------------------------------------------------------------------+
3 : | For PHP Version 8 |
4 : +----------------------------------------------------------------------+
5 : | Copyright (c) 2015 Elizabeth M Smith |
6 : +----------------------------------------------------------------------+
7 : | http://www.opensource.org/licenses/mit-license.php MIT License |
8 : | Also available in LICENSE |
9 : +----------------------------------------------------------------------+
10 : | Authors: Elizabeth M Smith <auroraeosrose@gmail.com> |
11 : | Swen Zanon <swen.zanon@geoglis.de> |
12 : +----------------------------------------------------------------------+
13 : */
14 :
15 : #ifdef HAVE_CONFIG_H
16 : #include "config.h"
17 : #endif
18 :
19 : #include <cairo.h>
20 : #include <php.h>
21 : #include <zend_exceptions.h>
22 :
23 : #include "php_cairo.h"
24 : #include "php_cairo_internal.h"
25 : #include "sub_surface_arginfo.h"
26 :
27 :
28 : zend_class_entry *ce_cairo_subsurface;
29 :
30 :
31 : /* ----------------------------------------------------------------
32 : \Cairo\TextCluster C API
33 : ------------------------------------------------------------------*/
34 :
35 1 : zend_class_entry* php_cairo_get_subsurface_ce()
36 : {
37 1 : return ce_cairo_subsurface;
38 : }
39 :
40 :
41 : /* ----------------------------------------------------------------
42 : \Cairo\TextCluster Class API
43 : ------------------------------------------------------------------*/
44 :
45 : /* {{{ proto CairoSubSurface __construct(int content, array extents)
46 : Returns new CairoSubSurface */
47 1 : PHP_METHOD(Cairo_Surface_SubSurface, __construct)
48 : {
49 1 : zend_throw_exception(ce_cairo_exception, "Cairo\\Surface\\SubSurface cannot be constructed", 0);
50 1 : }
51 : /* }}} */
52 :
53 :
54 : /* ----------------------------------------------------------------
55 : Cairo\Surface\Sub Definition and registration
56 : ------------------------------------------------------------------*/
57 :
58 : /* {{{ PHP_MINIT_FUNCTION */
59 424 : PHP_MINIT_FUNCTION(cairo_sub_surface)
60 : {
61 424 : ce_cairo_subsurface = register_class_Cairo_Surface_SubSurface(ce_cairo_surface);
62 :
63 424 : return SUCCESS;
64 : }
|