annotate src/collect.h @ 2878:8b1c451c8ff2

Additional remote commands --get-filelist:[<FOLDER>] Get list of files and class --get-filelist-recurse:[<FOLDER>] Get list of files and class recursive --get-collection:<COLLECTION> Get collection content --get-collection-list Get list of collections Changed command: --tell Print filename of current image [and Collection, if collection being displayed]
author Colin Clark <colin.clark@cclark.uk>
date Fri, 04 Jan 2019 13:44:58 +0000
parents 03014a1eb7e7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
1 /*
2350
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
2 * Copyright (C) 2004 John Ellis
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
3 * Copyright (C) 2008 - 2016 The Geeqie Team
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
4 *
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
5 * Author: John Ellis
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
6 *
2350
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
7 * This program is free software; you can redistribute it and/or modify
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
8 * it under the terms of the GNU General Public License as published by
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
10 * (at your option) any later version.
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
11 *
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
12 * This program is distributed in the hope that it will be useful,
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
15 * GNU General Public License for more details.
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
16 *
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
17 * You should have received a copy of the GNU General Public License along
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
18 * with this program; if not, write to the Free Software Foundation, Inc.,
95507e596256 Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents: 2021
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
20 */
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
21
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
22 #ifndef COLLECT_H
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
23 #define COLLECT_H
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
24
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
25
138
5be5d1c53016 replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 9
diff changeset
26 CollectInfo *collection_info_new(FileData *fd, struct stat *st, GdkPixbuf *pixbuf);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
27
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
28 void collection_info_free_thumb(CollectInfo *ci);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
29 void collection_info_free(CollectInfo *ci);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
30
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
31 void collection_info_set_thumb(CollectInfo *ci, GdkPixbuf *pixbuf);
1420
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
32 gboolean collection_info_load_thumb(CollectInfo *ci);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
33
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
34 void collection_list_free(GList *list);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
35
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
36 GList *collection_list_sort(GList *list, SortType method);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
37 GList *collection_list_add(GList *list, CollectInfo *ci, SortType method);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
38 GList *collection_list_insert(GList *list, CollectInfo *ci, CollectInfo *insert_ci, SortType method);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
39 GList *collection_list_remove(GList *list, CollectInfo *ci);
799
e8085600fd69 use the new notification for collections
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 475
diff changeset
40 CollectInfo *collection_list_find_fd(GList *list, FileData *fd);
138
5be5d1c53016 replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 9
diff changeset
41 GList *collection_list_to_filelist(GList *list);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
42
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
43 CollectionData *collection_new(const gchar *path);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
44 void collection_free(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
45
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
46 void collection_ref(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
47 void collection_unref(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
48
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
49 void collection_path_changed(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
50
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
51 gint collection_to_number(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
52 CollectionData *collection_from_number(gint n);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
53
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
54 /* pass a NULL pointer to whatever you don't need
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
55 * use free_selected_list to free list, and
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
56 * g_list_free to free info_list, which is a list of
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
57 * CollectInfo pointers into CollectionData
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
58 */
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
59 CollectionData *collection_from_dnd_data(const gchar *data, GList **list, GList **info_list);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
60 gchar *collection_info_list_to_dnd_data(CollectionData *cd, GList *list, gint *length);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
61
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
62 gint collection_info_valid(CollectionData *cd, CollectInfo *info);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
63
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
64 CollectInfo *collection_next_by_info(CollectionData *cd, CollectInfo *info);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
65 CollectInfo *collection_prev_by_info(CollectionData *cd, CollectInfo *info);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
66 CollectInfo *collection_get_first(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
67 CollectInfo *collection_get_last(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
68
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
69 void collection_set_sort_method(CollectionData *cd, SortType method);
1535
4be0a5710458 Implement random sort method for collections
Klaus Ethgen <Klaus@Ethgen.de>
parents: 1420
diff changeset
70 void collection_randomize(CollectionData *cd);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
71 void collection_set_update_info_func(CollectionData *cd,
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
72 void (*func)(CollectionData *, CollectInfo *, gpointer), gpointer data);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
73
1420
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
74 gboolean collection_add(CollectionData *cd, FileData *fd, gboolean sorted);
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
75 gboolean collection_add_check(CollectionData *cd, FileData *fd, gboolean sorted, gboolean must_exist);
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
76 gboolean collection_insert(CollectionData *cd, FileData *fd, CollectInfo *insert_ci, gboolean sorted);
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
77 gboolean collection_remove(CollectionData *cd, FileData *fd);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
78 void collection_remove_by_info_list(CollectionData *cd, GList *list);
1420
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
79 gboolean collection_rename(CollectionData *cd, FileData *fd);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
80
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
81 void collection_update_geometry(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
82
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
83 CollectWindow *collection_window_new(const gchar *path);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
84 void collection_window_close_by_collection(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
85 CollectWindow *collection_window_find(CollectionData *cd);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
86 CollectWindow *collection_window_find_by_path(const gchar *path);
1420
6cda3d9d6a7b Use gboolean where applicable, for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents: 1284
diff changeset
87 gboolean collection_window_modified_exists(void);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
88
2878
8b1c451c8ff2 Additional remote commands
Colin Clark <colin.clark@cclark.uk>
parents: 2582
diff changeset
89 gboolean is_collection(const gchar *param);
8b1c451c8ff2 Additional remote commands
Colin Clark <colin.clark@cclark.uk>
parents: 2582
diff changeset
90 gchar *collection_path(const gchar *param);
8b1c451c8ff2 Additional remote commands
Colin Clark <colin.clark@cclark.uk>
parents: 2582
diff changeset
91 void collection_contents(const gchar *name, GString **contents);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
92 #endif
1055
4bbdfab3c89a Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 799
diff changeset
93 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */