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// format flags stored into the presets database; the FOR_NOT_ variants are negated to keep existing presets
47
72
73#define DT_PRESETS_FOR_NOT (FOR_NOT_MONO | FOR_NOT_COLOR);
74
79
81void dt_gui_presets_add_generic(const char *name, dt_dev_operation_t op, const int32_t version,
82 const void *params, const int32_t params_size,
83 const int32_t enabled,
84 const dt_develop_blend_colorspace_t blend_cst);
85
88 const char *name, dt_dev_operation_t op, const int32_t version,
89 const void *params, const int32_t params_size,
90 const void *blend_params, const int32_t enabled);
91
93void dt_gui_presets_update_mml(const char *name, dt_dev_operation_t op, const int32_t version,
94 const char *maker, const char *model, const char *lens);
96void dt_gui_presets_update_iso(const char *name, dt_dev_operation_t op, const int32_t version,
97 const float min, const float max);
98void dt_gui_presets_update_av(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
99 const float max);
100void dt_gui_presets_update_tv(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
101 const float max);
102void dt_gui_presets_update_fl(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
103 const float max);
105void dt_gui_presets_update_ldr(const char *name, dt_dev_operation_t op, const int32_t version,
106 const int ldrflag);
108void dt_gui_presets_update_autoapply(const char *name, dt_dev_operation_t op, const int32_t version,
109 const int autoapply);
111void dt_gui_presets_update_filter(const char *name, dt_dev_operation_t op, const int32_t version,
112 const int filter);
113
115void dt_gui_presets_popup_menu_show_for_params(dt_dev_operation_t op, int32_t version, void *params,
116 int32_t params_size, void *blendop_params,
117 const dt_image_t *image,
118 void (*pick_callback)(GtkMenuItem *, void *),
119 void *callback_data);
120
123
126
128void dt_gui_presets_apply_preset(const gchar* name, dt_iop_module_t *module);
129
132
133void dt_gui_presets_show_iop_edit_dialog(const char *name_in, dt_iop_module_t *module, GCallback final_callback,
134 gpointer data, gboolean allow_name_change, gboolean allow_desc_change,
135 gboolean allow_remove, GtkWindow *parent);
136void dt_gui_presets_show_edit_dialog(const char *name_in, const char *module_name, int rowid,
137 GCallback final_callback, gpointer data, gboolean allow_name_change,
138 gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent);
139
140void dt_gui_presets_confirm_and_delete(GtkWidget *parent_dialog, const char *name, const char *module_name, int rowid);
141
142#endif // DT_GUI_PRESETS_H
143
144// clang-format off
145// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
146// vim: shiftwidth=2 expandtab tabstop=2 cindent
147// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
148// clang-format on
size_t params_size(dt_imageio_module_format_t *self)
Definition avif.c:571
dt_develop_blend_colorspace_t
Definition blend.h:55
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
char * name
gboolean dt_gui_presets_autoapply_for_module(dt_iop_module_t *module)
dt_gui_presets_format_flag_t
Definition gui/presets.h:40
@ FOR_RAW
Definition gui/presets.h:42
@ FOR_NOT_MONO
Definition gui/presets.h:44
@ FOR_LDR
Definition gui/presets.h:41
@ FOR_HDR
Definition gui/presets.h:43
@ FOR_NOT_COLOR
Definition gui/presets.h:45
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_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)
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, const dt_develop_blend_colorspace_t blend_cst)
const char * maker
const char * model
static void pick_callback(GtkMenuItem *menuitem, dt_lib_module_info_t *minfo)
Definition lib.c:494
char dt_dev_operation_t[20]
Definition settings.h:37
GtkCheckButton * autoapply
Definition gui/presets.h:58