| 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_MARKER_LAYER_H |
| 25 |
#define CHAMPLAIN_MARKER_LAYER_H |
| 26 |
|
| 27 |
#include <champlain/champlain-defines.h> |
| 28 |
#include <champlain/champlain-marker.h> |
| 29 |
#include <champlain/champlain-layer.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_MARKER_LAYER champlain_marker_layer_get_type () |
| 38 |
|
| 39 |
#define CHAMPLAIN_MARKER_LAYER(obj) \ |
| 40 |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_MARKER_LAYER, ChamplainMarkerLayer)) |
| 41 |
|
| 42 |
#define CHAMPLAIN_MARKER_LAYER_CLASS(klass) \ |
| 43 |
(G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_MARKER_LAYER, ChamplainMarkerLayerClass)) |
| 44 |
|
| 45 |
#define CHAMPLAIN_IS_MARKER_LAYER(obj) \ |
| 46 |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_MARKER_LAYER)) |
| 47 |
|
| 48 |
#define CHAMPLAIN_IS_MARKER_LAYER_CLASS(klass) \ |
| 49 |
(G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_MARKER_LAYER)) |
| 50 |
|
| 51 |
#define CHAMPLAIN_MARKER_LAYER_GET_CLASS(obj) \ |
| 52 |
(G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_MARKER_LAYER, ChamplainMarkerLayerClass)) |
| 53 |
|
| 54 |
typedef struct _ChamplainMarkerLayerPrivate ChamplainMarkerLayerPrivate; |
| 55 |
|
| 56 |
typedef struct _ChamplainMarkerLayer ChamplainMarkerLayer; |
| 57 |
typedef struct _ChamplainMarkerLayerClass ChamplainMarkerLayerClass; |
| 58 |
|
| 59 |
/** |
| 60 |
* ChamplainSelectionMode: |
| 61 |
* @CHAMPLAIN_SELECTION_NONE: No marker can be selected. |
| 62 |
* @CHAMPLAIN_SELECTION_SINGLE: Only one marker can be selected. |
| 63 |
* @CHAMPLAIN_SELECTION_MULTIPLE: Multiple marker can be selected. |
| 64 |
* |
| 65 |
* Selection mode |
| 66 |
*/ |
| 67 |
typedef enum |
| 68 |
{ |
| 69 |
CHAMPLAIN_SELECTION_NONE, |
| 70 |
CHAMPLAIN_SELECTION_SINGLE, |
| 71 |
CHAMPLAIN_SELECTION_MULTIPLE |
| 72 |
} ChamplainSelectionMode; |
| 73 |
|
| 74 |
/** |
| 75 |
* ChamplainMarkerLayer: |
| 76 |
* |
| 77 |
* The #ChamplainMarkerLayer structure contains only private data |
| 78 |
* and should be accessed using the provided API |
| 79 |
* |
| 80 |
* Since: 0.10 |
| 81 |
*/ |
| 82 |
struct _ChamplainMarkerLayer |
| 83 |
{ |
| 84 |
ChamplainLayer parent; |
| 85 |
|
| 86 |
ChamplainMarkerLayerPrivate *priv; |
| 87 |
}; |
| 88 |
|
| 89 |
struct _ChamplainMarkerLayerClass |
| 90 |
{ |
| 91 |
ChamplainLayerClass parent_class; |
| 92 |
}; |
| 93 |
|
| 94 |
GType champlain_marker_layer_get_type (void); |
| 95 |
|
| 96 |
ChamplainMarkerLayer *champlain_marker_layer_new (void); |
| 97 |
ChamplainMarkerLayer *champlain_marker_layer_new_full (ChamplainSelectionMode mode); |
| 98 |
|
| 99 |
void champlain_marker_layer_add_marker (ChamplainMarkerLayer *layer, |
| 100 |
ChamplainMarker *marker); |
| 101 |
void champlain_marker_layer_remove_marker (ChamplainMarkerLayer *layer, |
| 102 |
ChamplainMarker *marker); |
| 103 |
void champlain_marker_layer_remove_all (ChamplainMarkerLayer *layer); |
| 104 |
GList *champlain_marker_layer_get_markers (ChamplainMarkerLayer *layer); |
| 105 |
GList *champlain_marker_layer_get_selected (ChamplainMarkerLayer *layer); |
| 106 |
|
| 107 |
void champlain_marker_layer_animate_in_all_markers (ChamplainMarkerLayer *layer); |
| 108 |
void champlain_marker_layer_animate_out_all_markers (ChamplainMarkerLayer *layer); |
| 109 |
|
| 110 |
void champlain_marker_layer_show_all_markers (ChamplainMarkerLayer *layer); |
| 111 |
void champlain_marker_layer_hide_all_markers (ChamplainMarkerLayer *layer); |
| 112 |
|
| 113 |
void champlain_marker_layer_set_all_markers_draggable (ChamplainMarkerLayer *layer); |
| 114 |
void champlain_marker_layer_set_all_markers_undraggable (ChamplainMarkerLayer *layer); |
| 115 |
|
| 116 |
void champlain_marker_layer_select_all_markers (ChamplainMarkerLayer *layer); |
| 117 |
void champlain_marker_layer_unselect_all_markers (ChamplainMarkerLayer *layer); |
| 118 |
|
| 119 |
void champlain_marker_layer_set_selection_mode (ChamplainMarkerLayer *layer, |
| 120 |
ChamplainSelectionMode mode); |
| 121 |
ChamplainSelectionMode champlain_marker_layer_get_selection_mode (ChamplainMarkerLayer *layer); |
| 122 |
|
| 123 |
G_END_DECLS |
| 124 |
|
| 125 |
#endif |