aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ImageUtils.hpp10
-rw-r--r--include/QuickMedia.hpp2
-rw-r--r--include/Storage.hpp1
3 files changed, 11 insertions, 2 deletions
diff --git a/include/ImageUtils.hpp b/include/ImageUtils.hpp
index 58eb197..f5f757e 100644
--- a/include/ImageUtils.hpp
+++ b/include/ImageUtils.hpp
@@ -3,7 +3,13 @@
#include "Path.hpp"
namespace QuickMedia {
- // Works with jpg, png and gif files
- bool image_get_resolution(const Path &path, int *width, int *height);
+ enum class ImageType {
+ JPG,
+ PNG,
+ GIF
+ };
+
+ // Works with jpg, png and gif files. |image_type| can be NULL
+ bool image_get_resolution(const Path &path, int *width, int *height, ImageType *image_type = nullptr);
bool is_image_ext(const char *ext);
} \ No newline at end of file
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 6afdfce..18f3a6b 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -21,6 +21,7 @@
namespace QuickMedia {
class Plugin;
+ class FileManager;
class Manga;
enum class ImageViewMode {
@@ -122,5 +123,6 @@ namespace QuickMedia {
ImageViewMode image_view_mode = ImageViewMode::SINGLE;
Body *related_media_body;
std::vector<std::string> selected_files;
+ FileManager *file_manager = nullptr;
};
} \ No newline at end of file
diff --git a/include/Storage.hpp b/include/Storage.hpp
index cdae7b0..38c083e 100644
--- a/include/Storage.hpp
+++ b/include/Storage.hpp
@@ -22,6 +22,7 @@ namespace QuickMedia {
int create_directory_recursive(const Path &path);
FileType get_file_type(const Path &path);
int file_get_content(const Path &path, std::string &result);
+ int file_get_size(const Path &path, size_t *size);
int file_overwrite(const Path &path, const std::string &data);
void for_files_in_dir(const Path &path, FileIteratorCallback callback);
void for_files_in_dir_sort_last_modified(const Path &path, FileIteratorCallback callback);