1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
/*
* Copyright (c) 2022 Marcus Lundblad
*
* GNOME Maps is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* GNOME Maps is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with GNOME Maps; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Marcus Lundblad <ml@dfupdate.se>
*/
#ifndef _MAPS_SYNC_MAP_SOURCE_H_
#define _MAPS_SYNC_MAP_SOURCE_H_
#include <shumate/shumate.h>
G_BEGIN_DECLS
#define MAPS_TYPE_SYNC_MAP_SOURCE maps_sync_map_source_get_type ()
#define MAPS_SYNC_MAP_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), MAPS_TYPE_SYNC_MAP_SOURCE, MapsSyncMapSource))
#define MAPS_SYNC_MAP_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), MAPS_TYPE_SYNC_MAP_SOURCE, MapsSyncMapSourceClass))
#define MAPS_IS_SYNC_MAP_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAPS_TYPE_SYNC_MAP_SOURCE))
#define MAPS_IS_SYNC_MAP_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), MAPS_TYPE_SYNC_MAP_SOURCE))
#define MAPS_SYNC_MAP_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), MAPS_TYPE_SYNC_MAP_SOURCE, MapsSyncMapSourceClass))
typedef struct _MapsSyncMapSourcePrivate MapsSyncMapSourcePrivate;
typedef struct _MapsSyncMapSource MapsSyncMapSource;
typedef struct _MapsSyncMapSourceClass MapsSyncMapSourceClass;
/**
* MapsSyncMapSource:
*
* Wrapper of ShumateMapSource encapsulating fill_tile_async and
* fill_tile_finish into a synchronous file_tile vfunc as work-around for
* https://gitlab.gnome.org/GNOME/gjs/-/issues/72
*
* The #MapsSyncMapSource structure contains only private data
* and should be accessed using the provided API
*
*/
struct _MapsSyncMapSource
{
ShumateMapSource parent_instance;
MapsSyncMapSourcePrivate *priv;
};
struct _MapsSyncMapSourceClass
{
ShumateMapSourceClass parent_class;
void (*fill_tile) (MapsSyncMapSource *self,
ShumateTile *tile);
};
GType maps_sync_map_source_get_type (void);
#endif /* _MAPS_SYNC_MAP_SOURCE_H_ */
|