Sync to GQview 1.5.9 release.
[geeqie.git] / src / ui_bookmark.h
1 /*
2  * (SLIK) SimpLIstic sKin functions
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 UI_BOOKMARK_H
14 #define UI_BOOKMARK_H
15
16
17 /* history lists */
18
19 gint history_list_load(const gchar *path);
20 gint history_list_save(const gchar *path);
21
22 void history_list_free_key(const gchar *key);
23
24 void history_list_add_to_key(const gchar *key, const gchar *path, gint max);
25
26 void history_list_item_change(const gchar *key, const gchar *oldpath, const gchar *newpath);
27 void history_list_item_move(const gchar *key, const gchar *path, gint direction);
28 void history_list_item_remove(const gchar *key, const gchar *path);
29
30 const gchar *history_list_find_last_path_by_key(const gchar* key);
31
32 /* the returned GList is internal, don't free it */
33 GList *history_list_get_by_key(const gchar *key);
34
35
36 /* bookmarks */
37
38 GtkWidget *bookmark_list_new(const gchar *key,
39                              void (*select_func)(const gchar *path, gpointer data), gpointer select_data);
40 void bookmark_list_set_key(GtkWidget *list, const gchar *key);
41 void bookmark_list_set_no_defaults(GtkWidget *list, gint no_defaults);
42 void bookmark_list_set_editable(GtkWidget *list, gint editable);
43 void bookmark_list_add(GtkWidget *list, const gchar *name, const gchar *path);
44
45 /* allows apps to set up the defaults */
46 void bookmark_add_default(const gchar *name, const gchar *path);
47
48
49 /* history combo entry */
50
51 GtkWidget *history_combo_new(GtkWidget **entry, const gchar *text,
52                              const gchar *history_key, gint max_levels);
53 void history_combo_append_history(GtkWidget *widget, const gchar *text);
54
55
56 /* dnd data parsers (uris) */
57
58 gchar *uri_text_escape(const gchar *text);
59 void uri_text_decode(gchar *text);
60
61 GList *uri_list_from_text(gchar *data, gint files_only);
62 gchar *uri_text_from_list(GList *list, gint *len, gint plain_text);
63
64
65 #endif
66