Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
27 #include <glib-object.h>
29 #define MAMAN_TYPE_IBAZ (maman_ibaz_get_type ())
30 #define MAMAN_IBAZ(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAMAN_TYPE_IBAZ, MamanIbaz))
31 #define MAMAN_IS_IBAZ(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAMAN_TYPE_IBAZ))
32 #define MAMAN_IBAZ_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), MAMAN_TYPE_IBAZ, MamanIbazInterface))
35 typedef struct _MamanIbaz MamanIbaz; /* dummy object */
36 typedef struct _MamanIbazInterface MamanIbazInterface;
38 struct _MamanIbazInterface {
39 GTypeInterface parent;
41 void (*do_action) (MamanIbaz *self);
44 GType maman_ibaz_get_type (void);
46 void maman_ibaz_do_action (MamanIbaz *self);
48 //that was the interface class
49 //now the derived class
51 #include <glib-object.h>
53 #define MAMAN_TYPE_BAZ (baz_type)
54 #define MAMAN_BAZ(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAMAN_TYPE_BAZ, MamanBaz))
55 #define MAMAN_BAZ_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MAMAN_TYPE_BAZ, MamanbazClass))
56 #define MAMAN_IS_BAZ(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAMAN_TYPE_BAZ))
57 #define MAMAN_IS_BAZ_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MAMAN_TYPE_BAZ))
58 #define MAMAN_BAZ_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MAMAN_TYPE_BAZ, MamanbazClass))
61 typedef struct _MamanBaz MamanBaz;
62 typedef struct _MamanBazClass MamanBazClass;
69 struct _MamanBazClass {
73 GType maman_baz_get_type (void);
75 void baz_do_action (MamanBaz *self);
76 void baz_instance_init (GTypeInstance *instance, gpointer g_class);
77 void baz_interface_init (gpointer g_iface,gpointer iface_data);
82 #endif // __DERIVED_H__