summaryrefslogtreecommitdiff
path: root/platform/glfw/glfw_view.hpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2017-02-24 15:07:13 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-02-25 14:03:38 +0200
commit92e6e48699f5f94a80d69a94202f0f9c803fa2a7 (patch)
tree43d98fcea65b0b6fc9e8697310c9135810b40606 /platform/glfw/glfw_view.hpp
parent4c2e720b1522d2a45980ac8dcf34d2a3783cf426 (diff)
downloadqtlocation-mapboxgl-92e6e48699f5f94a80d69a94202f0f9c803fa2a7.tar.gz
[glfw] Make P pause/resume the network thread
Simple test of the DefaultFileSource pause/resume API.
Diffstat (limited to 'platform/glfw/glfw_view.hpp')
-rw-r--r--platform/glfw/glfw_view.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/glfw/glfw_view.hpp b/platform/glfw/glfw_view.hpp
index 835a73b54e..a426e58a94 100644
--- a/platform/glfw/glfw_view.hpp
+++ b/platform/glfw/glfw_view.hpp
@@ -27,6 +27,10 @@ public:
// The expected action is to set a new style, different to the current one.
void setChangeStyleCallback(std::function<void()> callback);
+ void setPauseResumeCallback(std::function<void()> callback) {
+ pauseResumeCallback = callback;
+ };
+
void setShouldClose();
void setWindowTitle(const std::string&);
@@ -104,6 +108,7 @@ private:
double lastClick = -1;
std::function<void()> changeStyleCallback;
+ std::function<void()> pauseResumeCallback;
mbgl::util::RunLoop runLoop;
mbgl::util::Timer frameTick;