summaryrefslogtreecommitdiffstats
path: root/gui/resources.hpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-09-08 13:50:54 +0200
committerEthan Yonker <dees_troy@teamw.in>2017-09-08 14:14:59 +0200
commit8373cfe28cf1b5ad758faa1d502e21787c3665e4 (patch)
tree2f567c52cd6f89e1052481497d236b58d230b7e2 /gui/resources.hpp
parentDO NOT MERGE Android 8.0 stuff (diff)
parentrelease-request-f4ecf242-5d1c-45e0-8c7c-ede48d1a9e82-for-git_oc-release-4111650 snap-temp-L02200000075283731 (diff)
downloadandroid_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.gz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.bz2
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.lz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.xz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.zst
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.zip
Diffstat (limited to 'gui/resources.hpp')
-rw-r--r--gui/resources.hpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/gui/resources.hpp b/gui/resources.hpp
index 2d3067667..de673184c 100644
--- a/gui/resources.hpp
+++ b/gui/resources.hpp
@@ -25,8 +25,7 @@
#include <vector>
#include <map>
#include "rapidxml.hpp"
-
-struct ZipArchive;
+#include "../zipwrap.hpp"
extern "C" {
#include "../minuitwrp/minui.h"
@@ -36,7 +35,7 @@ extern "C" {
class Resource
{
public:
- Resource(xml_node<>* node, ZipArchive* pZip);
+ Resource(xml_node<>* node, ZipWrap* pZip);
virtual ~Resource() {}
public:
@@ -46,27 +45,27 @@ private:
std::string mName;
protected:
- static int ExtractResource(ZipArchive* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile);
- static void LoadImage(ZipArchive* pZip, std::string file, gr_surface* surface);
+ static int ExtractResource(ZipWrap* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile);
+ static void LoadImage(ZipWrap* pZip, std::string file, gr_surface* surface);
static void CheckAndScaleImage(gr_surface source, gr_surface* destination, int retain_aspect);
};
class FontResource : public Resource
{
public:
- FontResource(xml_node<>* node, ZipArchive* pZip);
+ FontResource(xml_node<>* node, ZipWrap* pZip);
virtual ~FontResource();
public:
void* GetResource() { return this ? mFont : NULL; }
int GetHeight() { return gr_ttf_getMaxFontHeight(this ? mFont : NULL); }
- void Override(xml_node<>* node, ZipArchive* pZip);
+ void Override(xml_node<>* node, ZipWrap* pZip);
protected:
void* mFont;
private:
- void LoadFont(xml_node<>* node, ZipArchive* pZip);
+ void LoadFont(xml_node<>* node, ZipWrap* pZip);
void DeleteFont();
private:
@@ -77,7 +76,7 @@ private:
class ImageResource : public Resource
{
public:
- ImageResource(xml_node<>* node, ZipArchive* pZip);
+ ImageResource(xml_node<>* node, ZipWrap* pZip);
virtual ~ImageResource();
public:
@@ -92,7 +91,7 @@ protected:
class AnimationResource : public Resource
{
public:
- AnimationResource(xml_node<>* node, ZipArchive* pZip);
+ AnimationResource(xml_node<>* node, ZipWrap* pZip);
virtual ~AnimationResource();
public:
@@ -112,7 +111,7 @@ public:
ResourceManager();
virtual ~ResourceManager();
void AddStringResource(std::string resource_source, std::string resource_name, std::string value);
- void LoadResources(xml_node<>* resList, ZipArchive* pZip, std::string resource_source);
+ void LoadResources(xml_node<>* resList, ZipWrap* pZip, std::string resource_source);
public:
FontResource* FindFont(const std::string& name) const;