root/trunk/midgard/apis/php5/php_midgard_gobject.h

Revision 16225, 1.8 kB (checked in by piotras, 7 months ago)

extern object handlers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* Copyright (C) 2007 Piotr Pokora <piotrek.pokora@gmail.com>
2  *
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU Lesser General Public License as published
5  * by the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16  */
17 #ifndef PHP_MIDGARD_GOBJECT_GENERIC
18 #define PHP_MIDGARD_GOBJECT_GENERIC
19
20 #include "php_midgard.h"
21
22 /* Opaque struct to extend zend_object */
23 typedef struct _php_midgard_gobject {
24         zend_object zo;
25         GObject *gobject;
26         gboolean properties;
27 } php_midgard_gobject;
28
29 /* Global handlers */
30 extern zend_object_handlers php_midgard_gobject_handlers;
31
32 /* Generic zend_object constructor */
33 zend_object_value php_midgard_gobject_new(zend_class_entry *class_type TSRMLS_DC);
34
35 /* Inititlize new php object for given GObject */
36 void php_midgard_gobject_new_with_gobject(
37                 zval *zvalue, zend_class_entry *ce, GObject *gobject, gboolean dtor);
38
39 /* Initialize new php object by classname */
40 void php_midgard_gobject_init(zval *zvalue, const gchar *classname, GObject *gobject, gboolean dtor);
41
42 /* Get base class pointer */
43 zend_class_entry *php_midgard_get_baseclass_ptr(zend_class_entry *ce);
44
45 /* SIGNALS */
46 void php_midgard_gobject_connect(INTERNAL_FUNCTION_PARAMETERS);
47 void php_midgard_object_class_onnect_default(INTERNAL_FUNCTION_PARAMETERS);
48
49 #endif /* PHP_MIDGARD_GOBJECT_GENERIC  */
Note: See TracBrowser for help on using the browser.