annotate src/metadata.h @ 1783:b0352818977b

Allow to switch to fullscreen mode using LIRC. Imagine the following situation (which happened to me several times) : you want to see photos from your bed or your sofa so you launch geeqie and go to the right directory, then you take your remote control and sit comfortably far from your keyboard and mouse. And when you want to begin to watch photos, you realize you forgot to enable full screen! You have to stand up and to go until your computer and come back, whereas you could have done it with your remote control. Patch by Bernard Massot.
author zas_
date Tue, 05 Jan 2010 17:49:50 +0000
parents 808d4308ca00
children 956aab097ea7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
1 /*
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
2 * Geeqie
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
3 * (C) 2004 John Ellis
1284
8b89e3ff286b Add year 2009 to copyright info everywhere.
zas_
parents: 1240
diff changeset
4 * Copyright (C) 2008 - 2009 The Geeqie Team
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
5 *
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
6 * Author: John Ellis, Laurent Monin
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
7 *
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
9 * Please read the included file COPYING for more information.
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
11 */
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
12
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
13
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
14 #ifndef METADATA_H
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
15 #define METADATA_H
1224
ebfd305d902e improved sidecar writting
nadvornik
parents: 1222
diff changeset
16
1234
31f50c1b6a9a write keywords and comments with separate functions
nadvornik
parents: 1231
diff changeset
17 #define COMMENT_KEY "Xmp.dc.description"
31f50c1b6a9a write keywords and comments with separate functions
nadvornik
parents: 1231
diff changeset
18 #define KEYWORD_KEY "Xmp.dc.subject"
1567
c776b1310ca6 added an option to write image orientation to the metadata
nadvornik
parents: 1509
diff changeset
19 #define ORIENTATION_KEY "Xmp.tiff.Orientation"
1234
31f50c1b6a9a write keywords and comments with separate functions
nadvornik
parents: 1231
diff changeset
20
1205
3ff2aa99108b use the workflow in utilops.c for metadata approving and writting
nadvornik
parents: 1194
diff changeset
21 gboolean metadata_write_queue_remove(FileData *fd);
1211
e2bbe90b0dcd most of the metadata options now works
nadvornik
parents: 1205
diff changeset
22 gboolean metadata_write_queue_remove_list(GList *list);
1205
3ff2aa99108b use the workflow in utilops.c for metadata approving and writting
nadvornik
parents: 1194
diff changeset
23 gboolean metadata_write_perform(FileData *fd);
1586
249b539cc952 force the metadata dialog if it was triggered by the menu or the button
nadvornik
parents: 1567
diff changeset
24 gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc done_func, gpointer done_data);
1720
808d4308ca00 remove deleted files from metadata queue
nadvornik
parents: 1715
diff changeset
25 void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data);
1214
31402ecb2aed write metadata after timeout, image change or dir change
nadvornik
parents: 1211
diff changeset
26
1240
30e207ac22e4 added a status bar button for writting metadata immediately
nadvornik
parents: 1238
diff changeset
27 gint metadata_queue_length(void);
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
28
1567
c776b1310ca6 added an option to write image orientation to the metadata
nadvornik
parents: 1509
diff changeset
29 gboolean metadata_write_revert(FileData *fd, const gchar *key);
1234
31f50c1b6a9a write keywords and comments with separate functions
nadvornik
parents: 1231
diff changeset
30 gboolean metadata_write_list(FileData *fd, const gchar *key, const GList *values);
31f50c1b6a9a write keywords and comments with separate functions
nadvornik
parents: 1231
diff changeset
31 gboolean metadata_write_string(FileData *fd, const gchar *key, const char *value);
1567
c776b1310ca6 added an option to write image orientation to the metadata
nadvornik
parents: 1509
diff changeset
32 gboolean metadata_write_int(FileData *fd, const gchar *key, guint64 value);
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
33
1288
10073464e6aa use metadata_read_* functions where possible
nadvornik
parents: 1284
diff changeset
34 GList *metadata_read_list(FileData *fd, const gchar *key, MetadataFormat format);
10073464e6aa use metadata_read_* functions where possible
nadvornik
parents: 1284
diff changeset
35 gchar *metadata_read_string(FileData *fd, const gchar *key, MetadataFormat format);
10073464e6aa use metadata_read_* functions where possible
nadvornik
parents: 1284
diff changeset
36 guint64 metadata_read_int(FileData *fd, const gchar *key, guint64 fallback);
1509
e70bbc97acc5 added metadata_read_GPS_coord
nadvornik
parents: 1465
diff changeset
37 gdouble metadata_read_GPS_coord(FileData *fd, const gchar *key, gdouble fallback);
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
38
1238
947e603a52c6 simplified metadata interface, dropped metadata_read,
nadvornik
parents: 1234
diff changeset
39 gboolean metadata_append_string(FileData *fd, const gchar *key, const char *value);
947e603a52c6 simplified metadata interface, dropped metadata_read,
nadvornik
parents: 1234
diff changeset
40 gboolean metadata_append_list(FileData *fd, const gchar *key, const GList *values);
947e603a52c6 simplified metadata interface, dropped metadata_read,
nadvornik
parents: 1234
diff changeset
41
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
42 GList *string_to_keywords_list(const gchar *text);
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
43
1222
31dc2f240afb low-level keyword-to-mark functionality
nadvornik
parents: 1220
diff changeset
44 gboolean meta_data_get_keyword_mark(FileData *fd, gint n, gpointer data);
31dc2f240afb low-level keyword-to-mark functionality
nadvornik
parents: 1220
diff changeset
45 gboolean meta_data_set_keyword_mark(FileData *fd, gint n, gboolean value, gpointer data);
31dc2f240afb low-level keyword-to-mark functionality
nadvornik
parents: 1220
diff changeset
46
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
47
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
48 enum {
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
49 KEYWORD_COLUMN_MARK,
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
50 KEYWORD_COLUMN_NAME,
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
51 KEYWORD_COLUMN_CASEFOLD,
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
52 KEYWORD_COLUMN_IS_KEYWORD,
1428
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
53 KEYWORD_COLUMN_HIDE_IN,
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
54 KEYWORD_COLUMN_COUNT
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
55 };
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
56
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
57 extern GtkTreeStore *keyword_tree;
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
58
1425
80462be81410 fixed keyword to mark connection
nadvornik
parents: 1414
diff changeset
59 void meta_data_connect_mark_with_keyword(GtkTreeModel *keyword_tree, GtkTreeIter *kw_iter, gint mark);
80462be81410 fixed keyword to mark connection
nadvornik
parents: 1414
diff changeset
60
80462be81410 fixed keyword to mark connection
nadvornik
parents: 1414
diff changeset
61
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
62 gchar *keyword_get_name(GtkTreeModel *keyword_tree, GtkTreeIter *iter);
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
63 gchar *keyword_get_casefold(GtkTreeModel *keyword_tree, GtkTreeIter *iter);
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
64 gboolean keyword_get_is_keyword(GtkTreeModel *keyword_tree, GtkTreeIter *iter);
1392
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
65
1396
58f0b4586c8c dnd fixes
nadvornik
parents: 1392
diff changeset
66 gboolean keyword_compare(GtkTreeModel *keyword_tree, GtkTreeIter *a, GtkTreeIter *b);
1429
985366bccfb8 do not allow to add keywords with the same name as siblings
nadvornik
parents: 1428
diff changeset
67 gboolean keyword_same_parent(GtkTreeModel *keyword_tree, GtkTreeIter *a, GtkTreeIter *b);
1465
400ecfc3d8b1 do not add duplicate keywords from config file
nadvornik
parents: 1429
diff changeset
68 gboolean keyword_exists(GtkTreeModel *keyword_tree, GtkTreeIter *parent_ptr, GtkTreeIter *sibling, const gchar *name, gboolean exclude_sibling, GtkTreeIter *result);
1396
58f0b4586c8c dnd fixes
nadvornik
parents: 1392
diff changeset
69
1392
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
70 void keyword_copy(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from);
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
71 void keyword_copy_recursive(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from);
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
72 void keyword_move_recursive(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from);
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
73
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
74 GList *keyword_tree_get_path(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr);
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
75 gboolean keyword_tree_get_iter(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr, GList *path);
d1b32a69b40a dnd in keywords tree
nadvornik
parents: 1391
diff changeset
76
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
77 void keyword_set(GtkTreeStore *keyword_tree, GtkTreeIter *iter, const gchar *name, gboolean is_keyword);
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
78 gboolean keyword_tree_is_set(GtkTreeModel *keyword_tree, GtkTreeIter *iter, GList *kw_list);
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
79 void keyword_tree_set(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr, GList **kw_list);
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
80 void keyword_tree_reset(GtkTreeModel *keyword_tree, GtkTreeIter *iter_ptr, GList **kw_list);
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
81
1414
6ce1f7171d48 added a popup menu in keyword tree
nadvornik
parents: 1404
diff changeset
82 void keyword_delete(GtkTreeStore *keyword_tree, GtkTreeIter *iter_ptr);
6ce1f7171d48 added a popup menu in keyword tree
nadvornik
parents: 1404
diff changeset
83
1428
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
84
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
85 void keyword_hide_in(GtkTreeStore *keyword_tree, GtkTreeIter *iter, gpointer id);
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
86 void keyword_show_in(GtkTreeStore *keyword_tree, GtkTreeIter *iter, gpointer id);
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
87 gboolean keyword_is_hidden_in(GtkTreeModel *keyword_tree, GtkTreeIter *iter, gpointer id);
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
88 void keyword_show_all_in(GtkTreeStore *keyword_tree, gpointer id);
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
89 void keyword_hide_unset_in(GtkTreeStore *keyword_tree, gpointer id, GList *keywords);
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
90 void keyword_show_set_in(GtkTreeStore *keyword_tree, gpointer id, GList *keywords);
3019f5d3a3c7 added keyword tree filtering
nadvornik
parents: 1425
diff changeset
91
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
92 void keyword_tree_new_default(void);
1404
de06d83e1adc save and restore the keyword tree
nadvornik
parents: 1396
diff changeset
93 void keyword_tree_new(void);
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
94
1404
de06d83e1adc save and restore the keyword tree
nadvornik
parents: 1396
diff changeset
95 void keyword_tree_write_config(GString *outstr, gint indent);
de06d83e1adc save and restore the keyword tree
nadvornik
parents: 1396
diff changeset
96 GtkTreeIter *keyword_add_from_config(GtkTreeStore *keyword_tree, GtkTreeIter *parent, const gchar **attribute_names, const gchar **attribute_values);
1391
9e0df7903581 implemented keywords editor as described at
nadvornik
parents: 1340
diff changeset
97
1178
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
98 #endif
f6449c17306b Move comments/keywords read and write stuff to new metadata.{c,h}.
zas_
parents:
diff changeset
99 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */