1
/*
2
 * Copyright (C) 2008 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
3
 * Copyright (C) 2011-2012 Jiri Techet <techet@gmail.com>
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 */
19
20
#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
21
#error "Only <champlain/champlain.h> can be included directly."
22
#endif
23
24
#ifndef CHAMPLAIN_PATH_LAYER_H
25
#define CHAMPLAIN_PATH_LAYER_H
26
27
#include <champlain/champlain-defines.h>
28
#include <champlain/champlain-layer.h>
29
#include <champlain/champlain-location.h>
30
#include <champlain/champlain-bounding-box.h>
31
32
#include <glib-object.h>
33
#include <clutter/clutter.h>
34
35
G_BEGIN_DECLS
36
37
#define CHAMPLAIN_TYPE_PATH_LAYER champlain_path_layer_get_type ()
38
39
#define CHAMPLAIN_PATH_LAYER(obj) \
40
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_PATH_LAYER, ChamplainPathLayer))
41
42
#define CHAMPLAIN_PATH_LAYER_CLASS(klass) \
43
  (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_PATH_LAYER, ChamplainPathLayerClass))
44
45
#define CHAMPLAIN_IS_PATH_LAYER(obj) \
46
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_PATH_LAYER))
47
48
#define CHAMPLAIN_IS_PATH_LAYER_CLASS(klass) \
49
  (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_PATH_LAYER))
50
51
#define CHAMPLAIN_PATH_LAYER_GET_CLASS(obj) \
52
  (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_PATH_LAYER, ChamplainPathLayerClass))
53
54
typedef struct _ChamplainPathLayerPrivate ChamplainPathLayerPrivate;
55
56
typedef struct _ChamplainPathLayer ChamplainPathLayer;
57
typedef struct _ChamplainPathLayerClass ChamplainPathLayerClass;
58
59
60
/**
61
 * ChamplainPathLayer:
62
 *
63
 * The #ChamplainPathLayer structure contains only private data
64
 * and should be accessed using the provided API
65
 *
66
 * Since: 0.10
67
 */
68
struct _ChamplainPathLayer
69
{
70
  ChamplainLayer parent;
71
72
  ChamplainPathLayerPrivate *priv;
73
};
74
75
struct _ChamplainPathLayerClass
76
{
77
  ChamplainLayerClass parent_class;
78
};
79
80
GType champlain_path_layer_get_type (void);
81
82
ChamplainPathLayer *champlain_path_layer_new (void);
83
84
void champlain_path_layer_add_node (ChamplainPathLayer *layer,
85
    ChamplainLocation *location);
86
void champlain_path_layer_remove_node (ChamplainPathLayer *layer,
87
    ChamplainLocation *location);
88
void champlain_path_layer_remove_all (ChamplainPathLayer *layer);
89
void champlain_path_layer_insert_node (ChamplainPathLayer *layer,
90
    ChamplainLocation *location,
91
    guint position);
92
GList *champlain_path_layer_get_nodes (ChamplainPathLayer *layer);
93
94
ClutterColor *champlain_path_layer_get_fill_color (ChamplainPathLayer *layer);
95
void champlain_path_layer_set_fill_color (ChamplainPathLayer *layer,
96
    const ClutterColor *color);
97
98
ClutterColor *champlain_path_layer_get_stroke_color (ChamplainPathLayer *layer);
99
void champlain_path_layer_set_stroke_color (ChamplainPathLayer *layer,
100
    const ClutterColor *color);
101
102
gboolean champlain_path_layer_get_fill (ChamplainPathLayer *layer);
103
void champlain_path_layer_set_fill (ChamplainPathLayer *layer,
104
    gboolean value);
105
106
gboolean champlain_path_layer_get_stroke (ChamplainPathLayer *layer);
107
void champlain_path_layer_set_stroke (ChamplainPathLayer *layer,
108
    gboolean value);
109
110
gdouble champlain_path_layer_get_stroke_width (ChamplainPathLayer *layer);
111
void champlain_path_layer_set_stroke_width (ChamplainPathLayer *layer,
112
    gdouble value);
113
114
gboolean champlain_path_layer_get_visible (ChamplainPathLayer *layer);
115
void champlain_path_layer_set_visible (ChamplainPathLayer *layer,
116
    gboolean value);
117
118
gboolean champlain_path_layer_get_closed (ChamplainPathLayer *layer);
119
void champlain_path_layer_set_closed (ChamplainPathLayer *layer,
120
    gboolean value);
121
122
GList *champlain_path_layer_get_dash (ChamplainPathLayer *layer);
123
void champlain_path_layer_set_dash (ChamplainPathLayer *layer,
124
    GList *dash_pattern);
125
126
G_END_DECLS
127
128
#endif