Contents of /trunk/src/custom_rating_renderer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Sat Jun 20 11:08:47 2009 UTC (14 years, 11 months ago) by harbaum
File MIME type: text/plain
File size: 2372 byte(s)
Initial import
1 /*
2 * Copyright (C) 2008 Till Harbaum <till@harbaum.org>.
3 *
4 * This file is part of GPXView.
5 *
6 * GPXView is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * GPXView 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 GPXView. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef CUSTOM_RATING_RENDERER_H
21 #define CUSTOM_RATING_RENDERER_H
22
23 #include <gtk/gtk.h>
24
25 /* Some boilerplate GObject type check and type cast macros.
26 * 'klass' is used here instead of 'class', because 'class'
27 * is a c++ keyword */
28
29 #define CUSTOM_TYPE_CELL_RENDERER_RATING (custom_cell_renderer_rating_get_type())
30 #define CUSTOM_CELL_RENDERER_RATING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CUSTOM_TYPE_CELL_RENDERER_RATING, CustomCellRendererRating))
31 #define CUSTOM_CELL_RENDERER_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CUSTOM_TYPE_CELL_RENDERER_RATING, CustomCellRendererRatingClass))
32 #define CUSTOM_IS_CELL_RATING_RATING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUSTOM_TYPE_CELL_RENDERER_RATING))
33 #define CUSTOM_IS_CELL_RATING_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUSTOM_TYPE_CELL_RENDERER_RATING))
34 #define CUSTOM_CELL_RENDERER_RATING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CUSTOM_TYPE_CELL_RENDERER_RATING, CustomCellRendererRatingClass))
35
36 typedef struct _CustomCellRendererRating CustomCellRendererRating;
37 typedef struct _CustomCellRendererRatingClass CustomCellRendererRatingClass;
38
39 /* CustomCellRendererRating: Our custom cell renderer
40 * structure. Extend according to need */
41
42 struct _CustomCellRendererRating
43 {
44 GtkCellRenderer parent;
45 gint difficulty, terrain;
46 };
47
48
49 struct _CustomCellRendererRatingClass
50 {
51 GtkCellRendererClass parent_class;
52 };
53
54
55 GType custom_cell_renderer_rating_get_type (void);
56
57 GtkCellRenderer *custom_cell_renderer_rating_new (void);
58
59
60 #endif /* CUSTOM_RATING_RENDERER_H */