1
/*
2
 * Copyright (C) 2010-2012 Jiri Techet <techet@gmail.com>
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Lesser General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2.1 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Lesser General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Lesser General Public
15
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 */
18
19
#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
20
#error "Only <champlain/champlain.h> can be included directly."
21
#endif
22
23
#ifndef __CHAMPLAIN_RENDERER_H__
24
#define __CHAMPLAIN_RENDERER_H__
25
26
#include <champlain/champlain-tile.h>
27
28
G_BEGIN_DECLS
29
30
#define CHAMPLAIN_TYPE_RENDERER champlain_renderer_get_type ()
31
32
#define CHAMPLAIN_RENDERER(obj) \
33
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_RENDERER, ChamplainRenderer))
34
35
#define CHAMPLAIN_RENDERER_CLASS(klass) \
36
  (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_RENDERER, ChamplainRendererClass))
37
38
#define CHAMPLAIN_IS_RENDERER(obj) \
39
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_RENDERER))
40
41
#define CHAMPLAIN_IS_RENDERER_CLASS(klass) \
42
  (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_RENDERER))
43
44
#define CHAMPLAIN_RENDERER_GET_CLASS(obj) \
45
  (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_RENDERER, ChamplainRendererClass))
46
47
typedef struct _ChamplainRenderer ChamplainRenderer;
48
typedef struct _ChamplainRendererClass ChamplainRendererClass;
49
50
51
/**
52
 * ChamplainRenderer:
53
 *
54
 * The #ChamplainRenderer structure contains only private data
55
 * and should be accessed using the provided API
56
 *
57
 * Since: 0.8
58
 */
59
struct _ChamplainRenderer
60
{
61
  GInitiallyUnowned parent;
62
};
63
64
struct _ChamplainRendererClass
65
{
66
  GInitiallyUnownedClass parent_class;
67
68
  void (*set_data)(ChamplainRenderer *renderer,
69
      const gchar *data,
70
      guint size);
71
  void (*render)(ChamplainRenderer *renderer,
72
      ChamplainTile *tile);
73
};
74
75
GType champlain_renderer_get_type (void);
76
77
void champlain_renderer_set_data (ChamplainRenderer *renderer,
78
    const gchar *data,
79
    guint size);
80
void champlain_renderer_render (ChamplainRenderer *renderer,
81
    ChamplainTile *tile);
82
83
G_END_DECLS
84
85
#endif /* __CHAMPLAIN_RENDERER_H__ */