1 /* Dia -- an diagram creation/manipulation program
2  * Copyright (C) 1998 Alexander Larsson
3  *
4  * diacellrendererproperty.h
5  * Copyright (C) 2008 Hans Breuer <hans@breuer.org>
6  *
7  * gimpcellrendererviewable.h
8  * Copyright (C) 2003 Michael Natterer <mitch@gimp.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23  */
24 
25 #ifndef __DIA_CELL_RENDERER_PROPERTY_H__
26 #define __DIA_CELL_RENDERER_PROPERTY_H__
27 
28 
29 #include <gtk/gtkcellrenderer.h>
30 #include "diatypes.h"
31 
32 #define DIA_TYPE_CELL_RENDERER_PROPERTY            (dia_cell_renderer_property_get_type ())
33 #define DIA_CELL_RENDERER_PROPERTY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIA_TYPE_CELL_RENDERER_PROPERTY, DiaCellRendererProperty))
34 #define DIA_CELL_RENDERER_PROPERTY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), DIA_TYPE_CELL_RENDERER_PROPERTY, DiaCellRendererPropertyClass))
35 #define DIA_IS_CELL_RENDERER_PROPERTY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIA_TYPE_CELL_RENDERER_PROPERTY))
36 #define DIA_IS_CELL_RENDERER_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIA_TYPE_CELL_RENDERER_PROPERTY))
37 #define DIA_CELL_RENDERER_PROPERTY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), DIA_TYPE_CELL_RENDERER_PROPERTY, DiaCellRendererPropertyClass))
38 
39 
40 typedef struct _DiaCellRendererPropertyClass DiaCellRendererPropertyClass;
41 
42 struct _DiaCellRendererProperty
43 {
44   GtkCellRenderer   parent_instance;
45 
46   /*< private >*/
47   DiaRenderer      *renderer;
48 };
49 
50 struct _DiaCellRendererPropertyClass
51 {
52   GtkCellRendererClass  parent_class;
53 
54   void (* clicked) (DiaCellRendererProperty *cell,
55                     const gchar              *path,
56                     GdkModifierType           state);
57 };
58 
59 
60 GType             dia_cell_renderer_property_get_type (void) G_GNUC_CONST;
61 
62 GtkCellRenderer * dia_cell_renderer_property_new      (void);
63 
64 void   dia_cell_renderer_property_clicked (DiaCellRendererProperty *cell,
65                                             const gchar              *path,
66                                             GdkModifierType           state);
67 
68 #endif /* __DIA_CELL_RENDERER_PROPERTY_H__ */
69