1 /* guile-gnome
2  * Copyright (C) 2003 Andy Wingo <wingo at pobox dot com>
3  *
4  * gobject.h: Support for GObject and GInterface
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, contact:
18  *
19  * Free Software Foundation           Voice:  +1-617-542-5942
20  * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
21  * Boston, MA  02111-1307,  USA       gnu@gnu.org
22  */
23 
24 #ifndef __GUILE_GNOME_GOBJECT_OBJECT_H__
25 #define __GUILE_GNOME_GOBJECT_OBJECT_H__
26 
27 #include <guile-gnome-gobject/gtype.h>
28 #include <guile-gnome-gobject/gparameter.h>
29 #include <guile-gnome-gobject/gvalue.h>
30 #include <guile-gnome-gobject/gsignal.h>
31 #include <guile-gnome-gobject/gutil.h>
32 
33 G_BEGIN_DECLS
34 
35 
36 
37 
38 #define SCM_GOBJECT_CLASSP(scm) \
39   scm_c_gtype_class_is_a_p (scm, G_TYPE_OBJECT)
40 
41 #define SCM_VALIDATE_GOBJECT_CLASS(pos, scm) \
42   SCM_MAKE_VALIDATE (pos, scm, GOBJECT_CLASSP)
43 
44 #define SCM_VALIDATE_GOBJECT_CLASS_COPY(pos, scm, cvar) \
45   do { \
46     SCM_VALIDATE_GOBJECT_CLASS (pos, scm); \
47     SCM_VALIDATE_GTYPE_CLASS_COPY (pos, scm, cvar); \
48   } while (0)
49 
50 #define SCM_GOBJECTP(scm) \
51   scm_c_gtype_instance_is_a_p (scm, G_TYPE_OBJECT)
52 
53 #define SCM_VALIDATE_GOBJECT(pos, scm) \
54   SCM_MAKE_VALIDATE (pos, scm, GOBJECTP)
55 
56 #define SCM_VALIDATE_GOBJECT_COPY(pos, scm, cvar) \
57   SCM_VALIDATE_GTYPE_INSTANCE_TYPE_COPY (pos, scm, G_TYPE_OBJECT, cvar)
58 
59 
60 
61 
62 void scm_register_gobject_postmakefunc (GType type, gpointer (*postmakefunc) (gpointer));
63 
64 
65 
66 G_END_DECLS
67 
68 #endif
69