history.h 2.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
    This file is part of darktable,
    copyright (c) 2010 henrik andersson.

    darktable is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    darktable is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with darktable.  If not, see <http://www.gnu.org/licenses/>.
*/

19 20
#pragma once

21 22
#include <glib.h>
#include <inttypes.h>
23
#include <sqlite3.h>
24

25 26 27
/** helper function to free a GList of dt_history_item_t */
void dt_history_item_free(gpointer data);

28
/** copy history from imgid and pasts on dest_imgid, merge or overwrite... */
29
int dt_history_copy_and_paste_on_image(int32_t imgid, int32_t dest_imgid, gboolean merge, GList *ops);
30

31 32
void dt_history_delete_on_image(int32_t imgid);

33
/** copy history from imgid and pasts on selected images, merge or overwrite... */
34
int dt_history_copy_and_paste_on_selection(int32_t imgid, gboolean merge, GList *ops);
35 36 37 38

/** load a dt file and applies to selected images */
int dt_history_load_and_apply_on_selection(gchar *filename);

39 40 41
/** load a dt file and applies to specified image */
int dt_history_load_and_apply(int imgid, gchar *filename, int history_only);

42 43 44
/** delete historystack of selected images */
void dt_history_delete_on_selection();

45 46
typedef struct dt_history_item_t
{
47
  guint num;
48
  gchar *op;
49 50
  gchar *name;
} dt_history_item_t;
51 52

/** get list of history items for image */
53
GList *dt_history_get_items(int32_t imgid, gboolean enabled);
54

55 56 57
/** get list of history items for image as a nice string */
char *dt_history_get_items_as_string(int32_t imgid);

Richard Wonka's avatar
Richard Wonka committed
58
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
59
// vim: shiftwidth=2 expandtab tabstop=2 cindent
Tobias Ellinghaus's avatar
Tobias Ellinghaus committed
60
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;