Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
history.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2011 johannes hanika.
4 Copyright (C) 2010 Henrik Andersson.
5 Copyright (C) 2011, 2014-2016 Tobias Ellinghaus.
6 Copyright (C) 2012 Frédéric Grollier.
7 Copyright (C) 2012, 2019-2022 Pascal Obry.
8 Copyright (C) 2012 Richard Wonka.
9 Copyright (C) 2016 Roman Lebedev.
10 Copyright (C) 2018 Edgardo Hoszowski.
11 Copyright (C) 2019-2020 Aldric Renaudin.
12 Copyright (C) 2019, 2022 Hanno Schwalm.
13 Copyright (C) 2020 Chris Elston.
14 Copyright (C) 2020-2021 Hubert Kowalski.
15 Copyright (C) 2020 Philippe Weyland.
16 Copyright (C) 2022 Martin Bařinka.
17 Copyright (C) 2025 Alynx Zhou.
18 Copyright (C) 2025-2026 Aurélien PIERRE.
19
20 darktable is free software: you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation, either version 3 of the License, or
23 (at your option) any later version.
24
25 darktable is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
29
30 You should have received a copy of the GNU General Public License
31 along with darktable. If not, see <http://www.gnu.org/licenses/>.
32*/
33
34#ifndef DT_HISTORY_HISTORY_H
35#define DT_HISTORY_HISTORY_H
36
37#include <gtk/gtk.h>
38#include <inttypes.h>
39
50typedef char dt_dev_operation_t[20];
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
62
64void dt_history_item_free(gpointer data);
65
67void dt_history_delete_on_image(int32_t imgid);
68
70void dt_history_delete_on_image_ext(int32_t imgid, gboolean undo);
71
72/* dt_history_duplicate() used to be declared here. It walks dt_dev_history_item_t and calls
73 * dt_iop_get_module(), both of which develop/ owns, so its definition cannot come down to
74 * this layer -- the declaration went up to develop/dev_history.h instead, beside it. */
75
76
77
78typedef struct dt_history_item_t
79{
80 guint num;
81 gchar *op;
82 gchar *name;
83 gboolean enabled;
85
87GList *dt_history_get_items(int32_t imgid, gboolean enabled);
88
90char *dt_history_get_items_as_string(int32_t imgid);
91
93char *dt_history_item_as_string(const char *name, gboolean enabled);
94
109typedef const char *(*dt_history_operation_name_resolver_t)(const char *operation);
111
113const char *dt_history_operation_name(const char *operation);
114
115#ifdef __cplusplus
116}
117#endif
118
119#endif // DT_HISTORY_HISTORY_H
120
121// clang-format off
122// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
123// vim: shiftwidth=2 expandtab tabstop=2 cindent
124// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
125// clang-format on
gboolean enabled
–doc was passed on the command line
void dt_history_set_operation_name_resolver(dt_history_operation_name_resolver_t resolver)
char * dt_history_item_as_string(const char *name, gboolean enabled)
const char *(* dt_history_operation_name_resolver_t)(const char *operation)
Turns an operation string ("exposure", "colorbalancergb") into the name a user should read.
Definition history.h:109
char dt_dev_operation_t[20]
The string identifying an operation in the history stack ("exposure", "colorbalancergb",...
Definition history.h:50
char * dt_history_get_items_as_string(int32_t imgid)
void dt_history_delete_on_image_ext(int32_t imgid, gboolean undo)
const char * dt_history_operation_name(const char *operation)
Resolve operation through the installed resolver, or return it unchanged.
void dt_history_delete_on_image(int32_t imgid)
GList * dt_history_get_items(int32_t imgid, gboolean enabled)
void dt_history_item_free(gpointer data)
const char * name
Definition pdf.h:90
GtkTreeView * items
Definition history.h:59
gboolean enabled
Definition history.h:83