Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
style_repository.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) 2011-2016 Tobias Ellinghaus.
5 Copyright (C) 2012, 2019-2022 Pascal Obry.
6 Copyright (C) 2018 Edgardo Hoszowski.
7 Copyright (C) 2025-2026 Aurélien PIERRE.
8
9 darktable is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 darktable is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with darktable. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#ifndef DT_DATABASE_STYLE_REPOSITORY_H
24#define DT_DATABASE_STYLE_REPOSITORY_H
25
26#include <glib.h>
27#include <inttypes.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
49/* ---------------------------------------------------------------------------------------------
50 * data.styles -- the header row
51 * ------------------------------------------------------------------------------------------ */
52
54int32_t dt_style_repository_get_id_by_name(const char *name);
55
59
62char *dt_style_repository_get_iop_list(const char *name);
63
65gboolean dt_style_repository_insert_header(const char *name, const char *description,
66 const char *iop_list_txt);
67
69gboolean dt_style_repository_set_iop_list(const int32_t styleid, const char *iop_list_txt);
70
72gboolean dt_style_repository_update_header(const int32_t styleid, const char *newname,
73 const char *description);
74
76gboolean dt_style_repository_delete(const int32_t styleid);
77
79typedef void (*dt_style_repository_style_cb)(void *user_data, const char *name,
80 const char *description);
81
85 void *user_data);
86
89 void *user_data);
90
91/* ---------------------------------------------------------------------------------------------
92 * data.style_items
93 * ------------------------------------------------------------------------------------------ */
94
107typedef void (*dt_style_repository_item_cb)(void *user_data,
108 const int num,
109 const int multi_priority,
110 const int module_version,
111 const char *operation,
112 const int enabled,
113 const void *params,
114 const int32_t params_size,
115 const void *blendop_params,
116 const int32_t blendop_params_size,
117 const int blendop_version,
118 const char *multi_name,
119 const int selimg_num,
120 const double iop_order);
121
125 dt_style_repository_item_cb cb, void *user_data);
126
131 dt_style_repository_item_cb cb, void *user_data);
132
139 dt_style_repository_item_cb cb, void *user_data);
140
146 void *user_data);
147
151void dt_style_repository_foreach_item_against_image(const int32_t styleid, const int32_t imgid,
153 void *user_data);
154
157gboolean dt_style_repository_copy_items_from_history(const int32_t styleid, const int32_t imgid,
158 GList *nums);
159
162 const int32_t source_styleid, GList *nums);
163
166
174 const int32_t imgid, const int history_num);
175
177void dt_style_repository_append_item_from_history(const int32_t styleid, const int32_t imgid,
178 const int history_num);
179
181gboolean dt_style_repository_insert_item(const int32_t styleid, const int num,
182 const int module_version, const char *operation,
183 const void *params, const int32_t params_size,
184 const int enabled, const void *blendop_params,
185 const int32_t blendop_params_size,
186 const int blendop_version, const int multi_priority,
187 const char *multi_name);
188
192
195
196#ifdef __cplusplus
197}
198#endif
199
200#endif // DT_DATABASE_STYLE_REPOSITORY_H
201
202// clang-format off
203// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
204// vim: shiftwidth=2 expandtab tabstop=2 cindent
205// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
206// clang-format on
const char ** description(struct dt_iop_module_t *self)
Definition ashift.c:166
size_t params_size(dt_imageio_module_format_t *self)
Definition avif.c:571
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
const char * name
Definition pdf.h:90
gboolean dt_style_repository_delete_items_except(const int32_t styleid, GList *nums)
void(* dt_style_repository_style_cb)(void *user_data, const char *name, const char *description)
gboolean dt_style_repository_copy_items_from_history(const int32_t styleid, const int32_t imgid, GList *nums)
void dt_style_repository_foreach_style(const char *filter, dt_style_repository_style_cb cb, void *user_data)
gboolean dt_style_repository_get_style(const char *name, dt_style_repository_style_cb cb, void *user_data)
int32_t dt_style_repository_get_id_by_name(const char *name)
char * dt_style_repository_get_iop_list(const char *name)
void dt_style_repository_foreach_item_with_params(const int32_t styleid, dt_style_repository_item_cb cb, void *user_data)
gboolean dt_style_repository_normalize_multi_priority(const int32_t styleid)
void dt_style_repository_foreach_item(const int32_t styleid, dt_style_repository_item_cb cb, void *user_data)
gboolean dt_style_repository_insert_item(const int32_t styleid, const int num, const int module_version, const char *operation, const void *params, const int32_t params_size, const int enabled, const void *blendop_params, const int32_t blendop_params_size, const int blendop_version, const int multi_priority, const char *multi_name)
gboolean dt_style_repository_set_iop_list(const int32_t styleid, const char *iop_list_txt)
void dt_style_repository_cleanup(void)
void dt_style_repository_foreach_item_against_image(const int32_t styleid, const int32_t imgid, dt_style_repository_item_cb cb, void *user_data)
void dt_style_repository_foreach_apply_item(const int32_t styleid, dt_style_repository_item_cb cb, void *user_data)
gboolean dt_style_repository_update_header(const int32_t styleid, const char *newname, const char *description)
gboolean dt_style_repository_insert_header(const char *name, const char *description, const char *iop_list_txt)
void dt_style_repository_append_item_from_history(const int32_t styleid, const int32_t imgid, const int history_num)
char * dt_style_repository_get_description(const int32_t styleid)
gboolean dt_style_repository_delete(const int32_t styleid)
void dt_style_repository_foreach_item_for_export(const int32_t styleid, dt_style_repository_item_cb cb, void *user_data)
void dt_style_repository_update_item_from_history(const int32_t styleid, const int item_num, const int32_t imgid, const int history_num)
void(* dt_style_repository_item_cb)(void *user_data, const int num, const int multi_priority, const int module_version, const char *operation, const int enabled, const void *params, const int32_t params_size, const void *blendop_params, const int32_t blendop_params_size, const int blendop_version, const char *multi_name, const int selimg_num, const double iop_order)
gboolean dt_style_repository_copy_items_from_style(const int32_t dest_styleid, const int32_t source_styleid, GList *nums)