diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-02-24 15:07:13 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-02-25 14:03:38 +0200 |
commit | 92e6e48699f5f94a80d69a94202f0f9c803fa2a7 (patch) | |
tree | 43d98fcea65b0b6fc9e8697310c9135810b40606 /platform/glfw/glfw_view.hpp | |
parent | 4c2e720b1522d2a45980ac8dcf34d2a3783cf426 (diff) | |
download | qtlocation-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.hpp | 5 |
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; |