Contents of /trunk/src/custom_size_renderer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Sat Jun 20 11:08:47 2009 UTC (14 years, 11 months ago) by harbaum
File MIME type: text/plain
File size: 2301 byte(s)
Initial import
1 harbaum 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_SIZE_RENDERER_H
21     #define CUSTOM_SIZE_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_SIZE (custom_cell_renderer_size_get_type())
30     #define CUSTOM_CELL_RENDERER_SIZE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CUSTOM_TYPE_CELL_RENDERER_SIZE, CustomCellRendererSize))
31     #define CUSTOM_CELL_RENDERER_SIZE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CUSTOM_TYPE_CELL_RENDERER_SIZE, CustomCellRendererSizeClass))
32     #define CUSTOM_IS_CELL_SIZE_SIZE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUSTOM_TYPE_CELL_RENDERER_SIZE))
33     #define CUSTOM_IS_CELL_SIZE_SIZE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUSTOM_TYPE_CELL_RENDERER_SIZE))
34     #define CUSTOM_CELL_RENDERER_SIZE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CUSTOM_TYPE_CELL_RENDERER_SIZE, CustomCellRendererSizeClass))
35    
36     typedef struct _CustomCellRendererSize CustomCellRendererSize;
37     typedef struct _CustomCellRendererSizeClass CustomCellRendererSizeClass;
38    
39     /* CustomCellRendererSize: Our custom cell renderer
40     * structure. Extend according to need */
41    
42     struct _CustomCellRendererSize
43     {
44     GtkCellRenderer parent;
45     gint size;
46     };
47    
48    
49     struct _CustomCellRendererSizeClass
50     {
51     GtkCellRendererClass parent_class;
52     };
53    
54    
55     GType custom_cell_renderer_size_get_type (void);
56    
57     GtkCellRenderer *custom_cell_renderer_size_new (void);
58    
59    
60     #endif /* CUSTOM_SIZE_RENDERER_H */