Branch data Line data Source code
1 : : /*
2 : : * Copyright (C) 2008-2009 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
3 : : * Copyright (C) 2010-2013 Jiri Techet <techet@gmail.com>
4 : : * Copyright (C) 2019 Marcus Lundblad <ml@update.uu.se>
5 : : *
6 : : * This library is free software; you can redistribute it and/or
7 : : * modify it under the terms of the GNU Lesser General Public
8 : : * License as published by the Free Software Foundation; either
9 : : * version 2.1 of the License, or (at your option) any later version.
10 : : *
11 : : * This library 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 GNU
14 : : * Lesser General Public License for more details.
15 : : *
16 : : * You should have received a copy of the GNU Lesser General Public
17 : : * License along with this library; if not, write to the Free Software
18 : : * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 : : */
20 : :
21 : : #ifndef SHUMATE_MAP_TILE_H
22 : : #define SHUMATE_MAP_TILE_H
23 : :
24 : : #include <glib.h>
25 : : #include <glib-object.h>
26 : : #include <gtk/gtk.h>
27 : :
28 : : G_BEGIN_DECLS
29 : :
30 : : #define SHUMATE_TYPE_TILE shumate_tile_get_type ()
31 [ + - + - : 204 : G_DECLARE_FINAL_TYPE (ShumateTile, shumate_tile, SHUMATE, TILE, GObject)
+ + + - +
- + - + -
+ - + - +
- + - +
- ]
32 : :
33 : : /**
34 : : * ShumateState:
35 : : * @SHUMATE_STATE_NONE: Initial or undefined state
36 : : * @SHUMATE_STATE_LOADING: Tile is loading
37 : : * @SHUMATE_STATE_LOADED: Tile is loaded but not yet displayed
38 : : * @SHUMATE_STATE_DONE: Tile loading finished. Also used to inform map sources
39 : : * that tile loading has been cancelled.
40 : : *
41 : : * Tile loading state.
42 : : */
43 : : typedef enum
44 : : {
45 : : SHUMATE_STATE_NONE,
46 : : SHUMATE_STATE_LOADING,
47 : : SHUMATE_STATE_LOADED,
48 : : SHUMATE_STATE_DONE
49 : : } ShumateState;
50 : :
51 : : ShumateTile *shumate_tile_new (void);
52 : : ShumateTile *shumate_tile_new_full (guint x,
53 : : guint y,
54 : : guint size,
55 : : guint zoom_level);
56 : :
57 : : guint shumate_tile_get_x (ShumateTile *self);
58 : : void shumate_tile_set_x (ShumateTile *self,
59 : : guint x);
60 : :
61 : : guint shumate_tile_get_y (ShumateTile *self);
62 : : void shumate_tile_set_y (ShumateTile *self,
63 : : guint y);
64 : :
65 : : guint shumate_tile_get_zoom_level (ShumateTile *self);
66 : : void shumate_tile_set_zoom_level (ShumateTile *self,
67 : : guint zoom_level);
68 : :
69 : : guint shumate_tile_get_size (ShumateTile *self);
70 : : void shumate_tile_set_size (ShumateTile *self,
71 : : guint size);
72 : :
73 : : ShumateState shumate_tile_get_state (ShumateTile *self);
74 : : void shumate_tile_set_state (ShumateTile *self,
75 : : ShumateState state);
76 : :
77 : : gboolean shumate_tile_get_fade_in (ShumateTile *self);
78 : : void shumate_tile_set_fade_in (ShumateTile *self,
79 : : gboolean fade_in);
80 : :
81 : : GdkPaintable *shumate_tile_get_paintable (ShumateTile *self);
82 : : void shumate_tile_set_paintable (ShumateTile *self,
83 : : GdkPaintable *paintable);
84 : :
85 : : double shumate_tile_get_scale_factor (ShumateTile *self);
86 : : void shumate_tile_set_scale_factor (ShumateTile *self,
87 : : double scale_factor);
88 : :
89 : : G_END_DECLS
90 : :
91 : : #endif /* SHUMATE_MAP_TILE_H */
|