summaryrefslogtreecommitdiff
path: root/src/mbgl/sprite/sprite_image_collection.hpp
diff options
context:
space:
mode:
authorIvo van Dongen <ivovandongen@users.noreply.github.com>2017-05-12 23:19:00 +0300
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-12 13:19:00 -0700
commitcc9f040a2d35293c51dcc5be9c7affea7f1263bd (patch)
treede62a5610e719f5bfe07226c3382d4d2a5e17530 /src/mbgl/sprite/sprite_image_collection.hpp
parentc80f3e9d29d1c26ccc88ef30f8f17329c9bfb1b7 (diff)
downloadqtlocation-mapboxgl-cc9f040a2d35293c51dcc5be9c7affea7f1263bd.tar.gz
[core] Split style image collection from SpriteAtlas
Diffstat (limited to 'src/mbgl/sprite/sprite_image_collection.hpp')
-rw-r--r--src/mbgl/sprite/sprite_image_collection.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mbgl/sprite/sprite_image_collection.hpp b/src/mbgl/sprite/sprite_image_collection.hpp
new file mode 100644
index 0000000000..00e252f74f
--- /dev/null
+++ b/src/mbgl/sprite/sprite_image_collection.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <mbgl/style/image.hpp>
+
+#include <functional>
+#include <memory>
+#include <string>
+#include <unordered_map>
+
+namespace mbgl {
+
+using Images = std::unordered_map<std::string, std::unique_ptr<style::Image>>;
+
+void addSpriteImage(Images&,
+ const std::string&,
+ std::unique_ptr<style::Image>,
+ std::function<void (style::Image&)> onAdded = [] (style::Image&){});
+
+void removeSpriteImage(Images&,
+ const std::string&,
+ std::function<void ()> onRemoved = [] (){});
+
+
+
+} // namespace mbgl