apply new tangram
[platform/core/location/maps-plugin-mapzen.git] / src / mapzen / tangram / platform_tizen.h
1 #if 0
2 #pragma once
3
4 #include "platform.h"
5
6 bool shouldRender();
7
8 void initUrlRequests(const char* proxyAddress);
9 void stopUrlRequests();
10
11 #endif
12
13 #pragma once
14
15 #include "platform.h"
16 #include "urlClient.h"
17
18 #include <functional>
19 #include <Evas_GL.h>
20
21 typedef struct _FcConfig    FcConfig;
22
23 namespace Tangram {
24
25 void setEvasGlAPI(Evas_GL_API *glApi);
26
27 class TizenPlatform : public Platform {
28
29 public:
30
31     TizenPlatform();
32     TizenPlatform(UrlClient::Options urlClientOptions);
33     ~TizenPlatform() override;
34     void requestRender() const override;
35     bool startUrlRequest(const std::string& _url, UrlCallback _callback) override;
36     void cancelUrlRequest(const std::string& _url) override;
37
38
39     std::vector<FontSourceHandle> systemFontFallbacksHandle() const override;
40
41     std::vector<char> systemFont(const std::string& _name, const std::string& _weight,
42                                  const std::string& _face) const override;
43
44     void setRenderCallbackFunction(std::function<void()> callback);
45
46     
47 protected:
48
49     void initPlatformFontSetup() const;
50
51     std::string fontPath(const std::string& _name, const std::string& _weight,
52                          const std::string& _face) const;
53
54     UrlClient m_urlClient;
55
56     std::function<void()> m_renderCallbackFunction = nullptr;
57
58     mutable bool m_update = false;
59
60     mutable std::vector<std::string> m_fallbackFonts;
61     mutable FcConfig* m_fcConfig = nullptr;
62
63 };
64
65 } // namespace Tangram