2 * Copyright (C) 2008 Liam Girdwood
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __ASTRO_OBJECT_H
21 #define __ASTRO_OBJECT_H
23 #include <libastrodb/astrodb.h>
24 #include <glib-2.0/glib.h>
27 #define noffset(x,y) (long)(&((x*)0)->y) /* offset in struct */
28 #define nsizeof(x,y) sizeof(((x*)0)->y) /* size in struct */
29 #define nsize(x) (sizeof(x)/sizeof(x[0])) /* array size */
41 gint (*init
)(struct astrodb_table
*table
);
42 void (*free
)(struct astrodb_table
*table
);
43 void (*render
)(struct render_object
*r
);
44 gint (*info
)(void *object
, GList
*info
);