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#pragma once
34
35#include "develop/blend.h"
36
37// format flags stored into the presets database; the FOR_NOT_ variants are negated to keep existing presets
46
71
72#define DT_PRESETS_FOR_NOT (FOR_NOT_MONO | FOR_NOT_COLOR);
73
78
80void dt_gui_presets_add_generic(const char *name, dt_dev_operation_t op, const int32_t version,
81 const void *params, const int32_t params_size,
82 const int32_t enabled,
83 const dt_develop_blend_colorspace_t blend_cst);
84
87 const char *name, dt_dev_operation_t op, const int32_t version,
88 const void *params, const int32_t params_size,
89 const void *blend_params, const int32_t enabled);
90
92void dt_gui_presets_update_mml(const char *name, dt_dev_operation_t op, const int32_t version,
93 const char *maker, const char *model, const char *lens);
95void dt_gui_presets_update_iso(const char *name, dt_dev_operation_t op, const int32_t version,
96 const float min, const float max);
97void dt_gui_presets_update_av(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
98 const float max);
99void dt_gui_presets_update_tv(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
100 const float max);
101void dt_gui_presets_update_fl(const char *name, dt_dev_operation_t op, const int32_t version, const float min,
102 const float max);
104void dt_gui_presets_update_ldr(const char *name, dt_dev_operation_t op, const int32_t version,
105 const int ldrflag);
107void dt_gui_presets_update_autoapply(const char *name, dt_dev_operation_t op, const int32_t version,
108 const int autoapply);
110void dt_gui_presets_update_filter(const char *name, dt_dev_operation_t op, const int32_t version,
111 const int filter);
112
114void dt_gui_presets_popup_menu_show_for_params(dt_dev_operation_t op, int32_t version, void *params,
115 int32_t params_size, void *blendop_params,
116 const dt_image_t *image,
117 void (*pick_callback)(GtkMenuItem *, void *),
118 void *callback_data);
119
122
125
127void dt_gui_presets_apply_preset(const gchar* name, dt_iop_module_t *module);
128
131
132void dt_gui_presets_show_iop_edit_dialog(const char *name_in, dt_iop_module_t *module, GCallback final_callback,
133 gpointer data, gboolean allow_name_change, gboolean allow_desc_change,
134 gboolean allow_remove, GtkWindow *parent);
135void dt_gui_presets_show_edit_dialog(const char *name_in, const char *module_name, int rowid,
136 GCallback final_callback, gpointer data, gboolean allow_name_change,
137 gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent);
138
139void dt_gui_presets_confirm_and_delete(GtkWidget *parent_dialog, const char *name, const char *module_name, int rowid);
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:565
dt_develop_blend_colorspace_t
Definition blend.h:55
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:39
@ FOR_RAW
Definition gui/presets.h:41
@ FOR_NOT_MONO
Definition gui/presets.h:43
@ FOR_LDR
Definition gui/presets.h:40
@ FOR_HDR
Definition gui/presets.h:42
@ FOR_NOT_COLOR
Definition gui/presets.h:44
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:487
char dt_dev_operation_t[20]
Definition settings.h:38
struct _GtkWidget GtkWidget
Definition splash.h:29
GtkCheckButton * autoapply
Definition gui/presets.h:57