Parent Directory | Revision Log
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_TYPE_RENDERER_H |
21 | #define CUSTOM_TYPE_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_TYPE (custom_cell_renderer_type_get_type()) |
30 | #define CUSTOM_CELL_RENDERER_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CUSTOM_TYPE_CELL_RENDERER_TYPE, CustomCellRendererType)) |
31 | #define CUSTOM_CELL_RENDERER_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CUSTOM_TYPE_CELL_RENDERER_TYPE, CustomCellRendererTypeClass)) |
32 | #define CUSTOM_IS_CELL_TYPE_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUSTOM_TYPE_CELL_RENDERER_TYPE)) |
33 | #define CUSTOM_IS_CELL_TYPE_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUSTOM_TYPE_CELL_RENDERER_TYPE)) |
34 | #define CUSTOM_CELL_RENDERER_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CUSTOM_TYPE_CELL_RENDERER_TYPE, CustomCellRendererTypeClass)) |
35 | |
36 | typedef struct _CustomCellRendererType CustomCellRendererType; |
37 | typedef struct _CustomCellRendererTypeClass CustomCellRendererTypeClass; |
38 | |
39 | /* CustomCellRendererType: Our custom cell renderer |
40 | * structure. Extend according to need */ |
41 | |
42 | struct _CustomCellRendererType |
43 | { |
44 | GtkCellRenderer parent; |
45 | gint type; |
46 | }; |
47 | |
48 | |
49 | struct _CustomCellRendererTypeClass |
50 | { |
51 | GtkCellRendererClass parent_class; |
52 | }; |
53 | |
54 | |
55 | GType custom_cell_renderer_type_get_type (void); |
56 | |
57 | GtkCellRenderer *custom_cell_renderer_type_new (void); |
58 | |
59 | |
60 | #endif /* CUSTOM_TYPE_RENDERER_H */ |