Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
gui/presets.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010-2011 Henrik Andersson.
4 Copyright (C) 2010-2012, 2018 johannes hanika.
5 Copyright (C) 2011 Brian Teague.
6 Copyright (C) 2011 Ulrich Pegelow.
7 Copyright (C) 2012 Richard Wonka.
8 Copyright (C) 2012, 2014, 2016 Tobias Ellinghaus.
9 Copyright (C) 2013, 2020-2021 Pascal Obry.
10 Copyright (C) 2014 Roman Lebedev.
11 Copyright (C) 2019 luzpaz.
12 Copyright (C) 2020 Chris Elston.
13 Copyright (C) 2020 Hanno Schwalm.
14 Copyright (C) 2021 Aldric Renaudin.
15 Copyright (C) 2021 Diederik Ter Rahe.
16 Copyright (C) 2022 Martin Bařinka.
17 Copyright (C) 2025-2026 Aurélien PIERRE.
18
19 darktable is free software: you can redistribute it and/or modify
20 it under the terms of the GNU General Public License as published by
21 the Free Software Foundation, either version 3 of the License, or
22 (at your option) any later version.
23
24 darktable is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 GNU General Public License for more details.
28
29 You should have received a copy of the GNU General Public License
30 along with darktable. If not, see <http://www.gnu.org/licenses/>.
31*/
32
33#ifndef DT_GUI_PRESETS_H
34#define DT_GUI_PRESETS_H
35
36#include "develop/blend.h"
37
38// The preset format flags (FOR_RAW, FOR_LDR, ...) used to be defined here. They are
39// persisted database vocabulary — database/preset_repository.h documents its `format` and
40// `excluded` fields in terms of them — so they live in history/presets.h now, with the
41// preset code that owns the concept. This include keeps every existing consumer working.
42#include "history/history.h" // dt_dev_operation_t, named throughout
43#include "history/presets.h"
44
69
70#define DT_PRESETS_FOR_NOT (FOR_NOT_MONO | FOR_NOT_COLOR);
71
76
79void dt_gui_presets_add_generic(const char *name, dt_dev_operation_t op, const int32_t version,
80 const void *params, const int32_t params_size,
81 const int32_t enabled);
82
85 const char *name, dt_dev_operation_t op, const int32_t version,
86 const void *params, const int32_t params_size,
87 const void *blend_params, const int32_t enabled);
88
90void dt_gui_presets_update_mml(const char *name, dt_dev_operation_t op, const int32_t version,
91 const char *maker, const char *model, const char *lens);
93void dt_gui_presets_update_iso(const char *name, dt_dev_operation_t op, const int32_t version,
94 const float min, const float max);
95void dt_gui_presets_update_av(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
96 const float max);
97void dt_gui_presets_update_tv(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
98 const float max);
99void dt_gui_presets_update_fl(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
100 const float max);
102void dt_gui_presets_update_ldr(const char *name, dt_dev_operation_t op, const int32_t version,
103 const int ldrflag);
105void dt_gui_presets_update_autoapply(const char *name, dt_dev_operation_t op, const int32_t version,
106 const int autoapply);
108void dt_gui_presets_update_filter(const char *name, dt_dev_operation_t op, const int32_t version,
109 const int filter);
110
112void dt_gui_presets_popup_menu_show_for_params(dt_dev_operation_t op, int32_t version, void *params,
113 int32_t params_size, void *blendop_params,
114 const dt_image_t *image,
115 void (*pick_callback)(GtkMenuItem *, void *),
116 void *callback_data);
117
120
123
125void dt_gui_presets_apply_preset(const gchar* name, dt_iop_module_t *module);
126
129
130void dt_gui_presets_show_iop_edit_dialog(const char *name_in, dt_iop_module_t *module, GCallback final_callback,
131 gpointer data, gboolean allow_name_change, gboolean allow_desc_change,
132 gboolean allow_remove, GtkWindow *parent);
133void dt_gui_presets_show_edit_dialog(const char *name_in, const char *module_name, int rowid,
134 GCallback final_callback, gpointer data, gboolean allow_name_change,
135 gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent);
136
137void dt_gui_presets_confirm_and_delete(GtkWidget *parent_dialog, const char *name, const char *module_name, int rowid);
138
139#endif // DT_GUI_PRESETS_H
140
141// clang-format off
142// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
143// vim: shiftwidth=2 expandtab tabstop=2 cindent
144// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
145// clang-format on
size_t params_size(dt_imageio_module_format_t *self)
Definition avif.c:571
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
static const float const float const float min
const float max
gboolean enabled
–doc was passed on the command line
gboolean dt_gui_presets_autoapply_for_module(dt_iop_module_t *module)
void dt_gui_presets_show_edit_dialog(const char *name_in, const char *module_name, int rowid, GCallback final_callback, gpointer data, gboolean allow_name_change, gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent)
void dt_gui_presets_show_iop_edit_dialog(const char *name_in, dt_iop_module_t *module, GCallback final_callback, gpointer data, gboolean allow_name_change, gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent)
void dt_gui_presets_popup_menu_show_for_params(dt_dev_operation_t op, int32_t version, void *params, int32_t params_size, void *blendop_params, const dt_image_t *image, void(*pick_callback)(GtkMenuItem *, void *), void *callback_data)
void dt_gui_presets_update_filter(const char *name, dt_dev_operation_t op, const int32_t version, const int filter)
void dt_gui_presets_confirm_and_delete(GtkWidget *parent_dialog, const char *name, const char *module_name, int rowid)
void dt_gui_presets_update_ldr(const char *name, dt_dev_operation_t op, const int32_t version, const int ldrflag)
void dt_gui_presets_update_av(const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
void dt_gui_presets_update_fl(const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
void dt_gui_presets_popup_menu_show_for_module(dt_iop_module_t *module)
void dt_gui_presets_update_iso(const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
void dt_gui_presets_init()
void dt_gui_presets_update_mml(const char *name, dt_dev_operation_t op, const int32_t version, const char *maker, const char *model, const char *lens)
void dt_gui_presets_add_with_blendop(const char *name, dt_dev_operation_t op, const int32_t version, const void *params, const int32_t params_size, const void *blend_params, const int32_t enabled)
void dt_gui_presets_cleanup()
void dt_gui_presets_add_generic(const char *name, dt_dev_operation_t op, const int32_t version, const void *params, const int32_t params_size, const int32_t enabled)
void dt_gui_presets_apply_preset(const gchar *name, dt_iop_module_t *module)
gboolean dt_gui_presets_autogen_enabled()
void dt_gui_presets_update_tv(const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
void dt_gui_favorite_presets_menu_show()
void dt_gui_presets_update_autoapply(const char *name, dt_dev_operation_t op, const int32_t version, const int autoapply)
char dt_dev_operation_t[20]
The string identifying an operation in the history stack ("exposure", "colorbalancergb",...
Definition history.h:50
const char * maker
const char * model
static void pick_callback(GtkMenuItem *menuitem, dt_lib_module_info_t *minfo)
Definition lib.c:337
const char * name
Definition pdf.h:90
GtkCheckButton * autoapply
Definition gui/presets.h:55