9
|
1 /*
|
|
2 * GQview
|
|
3 * (C) 2004 John Ellis
|
|
4 *
|
|
5 * Author: John Ellis
|
|
6 *
|
|
7 * This software is released under the GNU General Public License (GNU GPL).
|
|
8 * Please read the included file COPYING for more information.
|
|
9 * This software comes with no warranty of any kind, use at your own risk!
|
|
10 */
|
|
11
|
|
12
|
|
13 #ifndef COLLECT_H
|
|
14 #define COLLECT_H
|
|
15
|
|
16
|
|
17 CollectInfo *collection_info_new(const gchar *path, struct stat *st, GdkPixbuf *pixbuf);
|
|
18
|
|
19 void collection_info_free_thumb(CollectInfo *ci);
|
|
20 void collection_info_free(CollectInfo *ci);
|
|
21
|
|
22 void collection_info_set_thumb(CollectInfo *ci, GdkPixbuf *pixbuf);
|
|
23 gint collection_info_load_thumb(CollectInfo *ci);
|
|
24
|
|
25 void collection_list_free(GList *list);
|
|
26
|
|
27 GList *collection_list_sort(GList *list, SortType method);
|
|
28 GList *collection_list_add(GList *list, CollectInfo *ci, SortType method);
|
|
29 GList *collection_list_insert(GList *list, CollectInfo *ci, CollectInfo *insert_ci, SortType method);
|
|
30 GList *collection_list_remove(GList *list, CollectInfo *ci);
|
|
31 CollectInfo *collection_list_find(GList *list, const gchar *path);
|
|
32 GList *collection_list_to_path_list(GList *list);
|
|
33
|
|
34 CollectionData *collection_new(const gchar *path);
|
|
35 void collection_free(CollectionData *cd);
|
|
36
|
|
37 void collection_ref(CollectionData *cd);
|
|
38 void collection_unref(CollectionData *cd);
|
|
39
|
|
40 void collection_path_changed(CollectionData *cd);
|
|
41
|
|
42 gint collection_to_number(CollectionData *cd);
|
|
43 CollectionData *collection_from_number(gint n);
|
|
44
|
|
45 /* pass a NULL pointer to whatever you don't need
|
|
46 * use free_selected_list to free list, and
|
|
47 * g_list_free to free info_list, which is a list of
|
|
48 * CollectInfo pointers into CollectionData
|
|
49 */
|
|
50 CollectionData *collection_from_dnd_data(const gchar *data, GList **list, GList **info_list);
|
|
51 gchar *collection_info_list_to_dnd_data(CollectionData *cd, GList *list, gint *length);
|
|
52
|
|
53 gint collection_info_valid(CollectionData *cd, CollectInfo *info);
|
|
54
|
|
55 CollectInfo *collection_next_by_info(CollectionData *cd, CollectInfo *info);
|
|
56 CollectInfo *collection_prev_by_info(CollectionData *cd, CollectInfo *info);
|
|
57 CollectInfo *collection_get_first(CollectionData *cd);
|
|
58 CollectInfo *collection_get_last(CollectionData *cd);
|
|
59
|
|
60 void collection_set_sort_method(CollectionData *cd, SortType method);
|
|
61 void collection_set_update_info_func(CollectionData *cd,
|
|
62 void (*func)(CollectionData *, CollectInfo *, gpointer), gpointer data);
|
|
63
|
|
64 gint collection_add(CollectionData *cd, const gchar *path, gint sorted);
|
|
65 gint collection_add_check(CollectionData *cd, const gchar *path, gint sorted, gint must_exist);
|
|
66 gint collection_insert(CollectionData *cd, const gchar *path, CollectInfo *insert_ci, gint sorted);
|
|
67 gint collection_remove(CollectionData *cd, const gchar *path);
|
|
68 void collection_remove_by_info_list(CollectionData *cd, GList *list);
|
|
69 gint collection_rename(CollectionData *cd, const gchar *source, const gchar *dest);
|
|
70
|
|
71 void collection_update_geometry(CollectionData *cd);
|
|
72
|
|
73 void collection_maint_removed(const gchar *path);
|
|
74 void collection_maint_renamed(const gchar *source, const gchar *dest);
|
|
75
|
|
76 CollectWindow *collection_window_new(const gchar *path);
|
|
77 void collection_window_close_by_collection(CollectionData *cd);
|
|
78 CollectWindow *collection_window_find(CollectionData *cd);
|
|
79 CollectWindow *collection_window_find_by_path(const gchar *path);
|
|
80 gint collection_window_modified_exists(void);
|
|
81
|
|
82
|
|
83 #endif
|
|
84
|