1 /*
2  * gog-styled-object.h :
3  *
4  * Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
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 the
9  * License, or (at your option) version 3.
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, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
19  * USA
20  */
21 #ifndef GOG_STYLED_OBJECT_H
22 #define GOG_STYLED_OBJECT_H
23 
24 #include <goffice/goffice.h>
25 
26 G_BEGIN_DECLS
27 
28 /* deprecated, just there for file compatibility and to make gtk-doc happy */
29 typedef struct _GogStyle GogStyle;
30 
31 struct _GogStyledObject {
32 	GogObject	base;
33 
34 	GOStyle	*style;
35 };
36 
37 typedef struct {
38 	GogObjectClass base;
39 
40 	/* virtual */
41 	void	  (*init_style)     	(GogStyledObject *obj, GOStyle *style);
42 
43 	/* signal */
44 	void (*style_changed) (GogStyledObject *obj, GOStyle const *new_style);
45 } GogStyledObjectClass;
46 
47 #define GOG_TYPE_STYLED_OBJECT	(gog_styled_object_get_type ())
48 #define GOG_STYLED_OBJECT(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_TYPE_STYLED_OBJECT, GogStyledObject))
49 #define GOG_IS_STYLED_OBJECT(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_STYLED_OBJECT))
50 #define GOG_STYLED_OBJECT_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GOG_TYPE_STYLED_OBJECT, GogStyledObjectClass))
51 
52 GType     gog_styled_object_get_type (void);
53 GogStyle	 *gog_style_new (void);
54 
55 G_END_DECLS
56 
57 #endif /* GOG_STYLED_OBJECT_H */
58