4 * Copyright (C) 2008 - 2010 The Geeqie Team
6 * Author: John Ellis, Laurent Monin
8 * This software is released under the GNU General Public License (GNU GPL).
9 * Please read the included file COPYING for more information.
10 * This software comes with no warranty of any kind, use at your own risk!
17 #define COMMENT_KEY "Xmp.dc.description"
18 #define KEYWORD_KEY "Xmp.dc.subject"
19 #define ORIENTATION_KEY "Xmp.tiff.Orientation"
21 void metadata_cache_free(FileData *fd);
23 gboolean metadata_write_queue_remove(FileData *fd);
24 gboolean metadata_write_queue_remove_list(GList *list);
25 gboolean metadata_write_perform(FileData *fd);
26 gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc done_func, gpointer done_data);
27 void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data);
29 gint metadata_queue_length(void);
31 gboolean metadata_write_revert(FileData *fd, const gchar *key);
32 gboolean metadata_write_list(FileData *fd, const gchar *key, const GList *values);
33 gboolean metadata_write_string(FileData *fd, const gchar *key, const char *value);
34 gboolean metadata_write_int(FileData *fd, const gchar *key, guint64 value);
36 GList *metadata_read_list(FileData *fd, const gchar *key, MetadataFormat format);
37 gchar *metadata_read_string(FileData *fd, const gchar *key, MetadataFormat format);
38 guint64 metadata_read_int(FileData *fd, const gchar *key, guint64 fallback);
39 gdouble metadata_read_GPS_coord(FileData *fd, const gchar *key, gdouble fallback);
41 gboolean metadata_append_string(FileData *fd, const gchar *key, const char *value);
42 gboolean metadata_append_list(FileData *fd, const gchar *key, const GList *values);
44 GList *string_to_keywords_list(const gchar *text);
46 gboolean meta_data_get_keyword_mark(FileData *fd, gint n, gpointer data);
47 gboolean meta_data_set_keyword_mark(FileData *fd, gint n, gboolean value, gpointer data);
53 KEYWORD_COLUMN_CASEFOLD,
54 KEYWORD_COLUMN_IS_KEYWORD,
55 KEYWORD_COLUMN_HIDE_IN,
59 extern GtkTreeStore *keyword_tree;
61 void meta_data_connect_mark_with_keyword(GtkTreeModel *keyword_tree, GtkTreeIter *kw_iter, gint mark);
64 gchar *keyword_get_name(GtkTreeModel *keyword_tree, GtkTreeIter *iter);
65 gchar *keyword_get_casefold(GtkTreeModel *keyword_tree, GtkTreeIter *iter);
66 gboolean keyword_get_is_keyword(GtkTreeModel *keyword_tree, GtkTreeIter *iter);
68 gboolean keyword_compare(GtkTreeModel *keyword_tree, GtkTreeIter *a, GtkTreeIter *b);
69 gboolean keyword_same_parent(GtkTreeModel *keyword_tree, GtkTreeIter *a, GtkTreeIter *b);
70 gboolean keyword_exists(GtkTreeModel *keyword_tree, GtkTreeIter *parent_ptr, GtkTreeIter *sibling, const gchar *name, gboolean exclude_sibling, GtkTreeIter *result);
72 void keyword_copy(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from);
73 void keyword_copy_recursive(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from);
74 void keyword_move_recursive(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from);
76 GList *keyword_tree_get_path(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr);
77 gboolean keyword_tree_get_iter(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr, GList *path);
79 void keyword_set(GtkTreeStore *keyword_tree, GtkTreeIter *iter, const gchar *name, gboolean is_keyword);
80 gboolean keyword_tree_is_set(GtkTreeModel *keyword_tree, GtkTreeIter *iter, GList *kw_list);
81 void keyword_tree_set(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr, GList **kw_list);
82 GList *keyword_tree_get(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr);
83 void keyword_tree_reset(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr, GList **kw_list);
85 void keyword_delete(GtkTreeStore *keyword_tree, GtkTreeIter *iter_ptr);
88 void keyword_hide_in(GtkTreeStore *keyword_tree, GtkTreeIter *iter, gpointer id);
89 void keyword_show_in(GtkTreeStore *keyword_tree, GtkTreeIter *iter, gpointer id);
90 gboolean keyword_is_hidden_in(GtkTreeModel *keyword_tree, GtkTreeIter *iter, gpointer id);
91 void keyword_show_all_in(GtkTreeStore *keyword_tree, gpointer id);
92 void keyword_hide_unset_in(GtkTreeStore *keyword_tree, gpointer id, GList *keywords);
93 void keyword_show_set_in(GtkTreeStore *keyword_tree, gpointer id, GList *keywords);
95 void keyword_tree_new_default(void);
96 void keyword_tree_new(void);
98 void keyword_tree_write_config(GString *outstr, gint indent);
99 GtkTreeIter *keyword_add_from_config(GtkTreeStore *keyword_tree, GtkTreeIter *parent, const gchar **attribute_names, const gchar **attribute_values);
102 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */