Use util_clip_triangle() in pan_item_tri_new()
[geeqie.git] / src / cache-loader.h
index 6095908..1db8b74 100644 (file)
@@ -1,59 +1,64 @@
 /*
- * GQview
- * (C) 2005 John Ellis
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-
 #ifndef CACHE_LOADER_H
 #define CACHE_LOADER_H
 
+#include <glib.h>
 
-#include "cache.h"
-#include "image-load.h"
-
-
-typedef struct _CacheLoader CacheLoader;
+struct CacheData;
+struct FileData;
+struct ImageLoader;
 
-typedef void (* CacheLoaderDoneFunc)(CacheLoader *cl, gint error, gpointer data);
-
-
-typedef enum {
-       CACHE_LOADER_NONE       = 0,
-       CACHE_LOADER_DIMENSIONS = 1 << 0,
-       CACHE_LOADER_DATE       = 1 << 1,
-       CACHE_LOADER_MD5SUM     = 1 << 2,
-       CACHE_LOADER_SIMILARITY = 1 << 3
-} CacheDataType;
+enum CacheDataType {
+       CACHE_LOADER_NONE       = 0,
+       CACHE_LOADER_DIMENSIONS = 1 << 0,
+       CACHE_LOADER_DATE       = 1 << 1,
+       CACHE_LOADER_MD5SUM     = 1 << 2,
+       CACHE_LOADER_SIMILARITY = 1 << 3
+};
 
-struct _CacheLoader {
-       gchar *path;
+struct CacheLoader {
+       FileData *fd;
        CacheData *cd;
 
        CacheDataType todo_mask;
        CacheDataType done_mask;
 
-       CacheLoaderDoneFunc done_func;
+       using DoneFunc = void (*)(CacheLoader *, gint, gpointer);
+       DoneFunc done_func;
        gpointer done_data;
 
-       gint error;
+       gboolean error;
 
        ImageLoader *il;
-       gint idle_id;
+       guint idle_id; /**< event source id */
 };
 
 
-CacheLoader *cache_loader_new(const gchar *path, CacheDataType load_mask,
-                             CacheLoaderDoneFunc done_func, gpointer done_data);
+CacheLoader *cache_loader_new(FileData *fd, CacheDataType load_mask,
+                             CacheLoader::DoneFunc done_func, gpointer done_data);
 
 void cache_loader_free(CacheLoader *cl);
 
 
 #endif
-
-
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */