1 /* 2 * goc-styled-item.h : 3 * 4 * Copyright (C) 2009 Jean Brefort (jean.brefort@normalesup.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) 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, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 19 * USA 20 */ 21 22 #ifndef GOC_STYLED_ITEM_H 23 #define GOC_STYLED_ITEM_H 24 25 #include <goffice/goffice.h> 26 27 G_BEGIN_DECLS 28 29 struct _GocStyledItem { 30 GocItem base; 31 32 GOStyle *style; 33 gboolean scale_line_width; 34 gpointer priv; 35 }; 36 37 typedef struct _GocStyledItemClass GocStyledItemClass; 38 struct _GocStyledItemClass { 39 /*< private >*/ 40 GocItemClass base; 41 42 /*< public >*/ 43 /* virtual */ 44 void (*init_style) (GocStyledItem *item, GOStyle *style); 45 void (*reserved1) (void); 46 void (*reserved2) (void); 47 48 /*< private >*/ 49 /* signal */ 50 void (*style_changed) (GocStyledItem *item, GOStyle const *new_style); 51 void (*reserved_signal1) (void); 52 void (*reserved_signal2) (void); 53 }; 54 55 #define GOC_TYPE_STYLED_ITEM (goc_styled_item_get_type ()) 56 #define GOC_STYLED_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOC_TYPE_STYLED_ITEM, GocStyledItem)) 57 #define GOC_IS_STYLED_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOC_TYPE_STYLED_ITEM)) 58 #define GOC_STYLED_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOC_TYPE_STYLED_ITEM, GocStyledItemClass)) 59 60 GType goc_styled_item_get_type (void); 61 62 gboolean goc_styled_item_set_cairo_line (GocStyledItem const *gsi, cairo_t *cr); 63 gboolean goc_styled_item_get_scale_line_width (GocStyledItem const *gsi); 64 void goc_styled_item_set_scale_line_width (GocStyledItem *gsi, gboolean scale_line_width); 65 66 G_END_DECLS 67 68 #endif /* GOC_STYLED_ITEM_H */ 69