summaryrefslogtreecommitdiff
path: root/platform/qt/include/qmapbox.hpp
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-04-02 16:15:25 -0700
committerGitHub <noreply@github.com>2018-04-02 16:15:25 -0700
commit099fcc3b3c72b117e93d4da39ee6f70c6c5a2bc8 (patch)
tree523c8c884404f82075702b6ea707e2b2b8015089 /platform/qt/include/qmapbox.hpp
parentc3079c6155d7ba2a0c8dd36571f17d7652a2092e (diff)
downloadqtlocation-mapboxgl-099fcc3b3c72b117e93d4da39ee6f70c6c5a2bc8.tar.gz
Use a host interface for CustomLayer instead of function pointers (#11553)
Use a host interface for CustomLayer instead of function pointers Co-authored-by: Julian Rex <julian.rex@mapbox.com>
Diffstat (limited to 'platform/qt/include/qmapbox.hpp')
-rw-r--r--platform/qt/include/qmapbox.hpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/platform/qt/include/qmapbox.hpp b/platform/qt/include/qmapbox.hpp
index 5a5198108c..369890343f 100644
--- a/platform/qt/include/qmapbox.hpp
+++ b/platform/qt/include/qmapbox.hpp
@@ -112,12 +112,16 @@ struct Q_MAPBOXGL_EXPORT CustomLayerRenderParameters {
double zoom;
double bearing;
double pitch;
- double altitude;
+ double fieldOfView;
};
-typedef void (*CustomLayerInitializeFunction)(void* context) ;
-typedef void (*CustomLayerRenderFunction)(void* context, const CustomLayerRenderParameters&);
-typedef void (*CustomLayerDeinitializeFunction)(void* context);
+class Q_MAPBOXGL_EXPORT CustomLayerHostInterface {
+public:
+ virtual ~CustomLayerHostInterface() = default;
+ virtual void initialize() = 0;
+ virtual void render(const CustomLayerRenderParameters&) = 0;
+ virtual void deinitialize() = 0;
+};
} // namespace QMapbox