Let image loader backend decide how to process image buffer
[geeqie.git] / src / collect-io.h
1 /*
2  * Copyright (C) 2004 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef COLLECT_IO_H
23 #define COLLECT_IO_H
24
25 #include <glib.h>
26
27 #include "typedefs.h"
28
29 struct CollectionData;
30 struct FileData;
31
32 enum CollectionLoadFlags {
33         COLLECTION_LOAD_NONE    = 0,
34         COLLECTION_LOAD_APPEND  = 1 << 0,
35         COLLECTION_LOAD_FLUSH   = 1 << 1,
36         COLLECTION_LOAD_GEOMETRY= 1 << 2,
37 };
38
39 gboolean collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
40
41 gboolean collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
42 void collection_load_stop(CollectionData *cd);
43
44 void collection_load_thumb_idle(CollectionData *cd);
45
46 gboolean collection_save(CollectionData *cd, const gchar *path);
47
48 gboolean collection_load_only_geometry(CollectionData *cd, const gchar *path);
49
50
51 /**
52  * @headerfile collect_manager_moved
53  * these are used to update collections contained in user's collection
54  * folder when moving or renaming files.
55  * also handles:
56  *   deletes file when newpath == NULL
57  *   adds file when oldpath == NULL
58  */
59 void collect_manager_moved(FileData *fd);
60
61 /**
62  * @headerfile collect_manager_add
63  * add from a specific collection
64  */
65 void collect_manager_add(FileData *fd, const gchar *collection);
66
67 /**
68  * @headerfile collect_manager_remove
69  * removing from a specific collection
70  */
71 void collect_manager_remove(FileData *fd, const gchar *collection);
72
73 /**
74  * @headerfile collect_manager_flush
75  * commit pending operations to disk
76  */
77 void collect_manager_flush();
78
79 void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer data);
80 void collect_manager_list(GList **names_exc, GList **names_inc, GList **paths);
81
82 #endif
83 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */