30#ifndef DT_DATABASE_PRESET_REPOSITORY_H
31#define DT_DATABASE_PRESET_REPOSITORY_H
174 const int op_version,
const void *params,
185 const int op_version,
const void *params,
190 const int op_version,
const void *params,
205 const int op_version);
210 const int blendop_version,
const void *blend_params,
278 const double min,
const double max);
293 const char *
maker,
const char *
model,
const char *lens);
330 const int blendop_version,
const int enabled);
410 const char *operation,
const int op_version,
414 const int blendop_version);
422 const int op_version,
426 const int blendop_version);
const char ** description(struct dt_iop_module_t *self)
size_t params_size(dt_imageio_module_format_t *self)
static const float const float const float min
struct dt_iop_tonecurve_params_t preset
gboolean dt_preset_repository_insert(const dt_preset_t *preset)
Insert preset, replacing any row that collides with it.
void dt_preset_repository_delete_module_preset(const char *operation, const int op_version, const char *name)
Delete (operation, op_version, name) unless it is write-protected.
void dt_preset_repository_add_iop_preset(const char *name, const char *operation, const int op_version, const void *params, const int params_size, const void *blend_params, const int blend_params_size, const int blendop_version, const int enabled)
Store an IOP preset, blend parameters included, replacing any of the same name.
void dt_module_preset_free(gpointer data)
Release one dt_module_preset_t. Suits g_list_free_full().
GList * dt_preset_repository_list_all(void)
Every preset, ordered by (operation, name) – the grouping the tree relies on to start a new module no...
GList * dt_preset_repository_list_all_versions(const char *operation)
Every preset of operation at ANY version, with rowid and op_version filled in, SHIPPED FIRST then by ...
void dt_preset_row_free(gpointer data)
Free one dt_preset_row_t. Suits g_list_free_full().
@ DT_PRESET_FLAG_AUTOAPPLY
void dt_preset_repository_update_range(const char *operation, const int op_version, const char *name, const dt_preset_range_t range, const double min, const double max)
Set the <range>_min / <range>_max pair of (operation, op_version, name).
GList * dt_preset_repository_list_for_module(const char *operation, const int op_version, const gboolean with_description, const gboolean shipped_first)
Every preset of (operation, op_version).
void dt_preset_repository_delete_shipped(void)
Delete every write-protected preset – the auto-generated ones, dropped at startup so module code can ...
void dt_preset_repository_cleanup(void)
Finalise the cached statements. See dt_colorlabel_repository_cleanup().
void dt_preset_repository_update_iop_params(const char *operation, const char *name, const int op_version, const void *params, const int params_size, const int enabled, const void *blend_params, const int blend_params_size, const int blendop_version)
Replace the module payload of (operation, name), at any version.
dt_module_preset_t * dt_preset_repository_get_iop_preset(const char *operation, const int op_version, const char *name)
One IOP preset by name, blend parameters included, or NULL.
dt_preset_t * dt_preset_repository_get_by_rowid(const int rowid)
The preset at rowid, or NULL when there is none. Free with dt_preset_free().
dt_module_preset_t * dt_preset_repository_get_module_preset(const char *operation, const int op_version, const char *name)
One preset by name, or NULL. Free with dt_module_preset_free().
void dt_preset_repository_update_conditions(const int rowid, const dt_preset_conditions_t *c)
Overwrite the conditions of the row at rowid.
GList * dt_preset_repository_list_for_menu(const char *operation, const dt_preset_match_t *match, const gboolean shipped_first)
Presets of operation to offer in a menu, in display order.
GList * dt_preset_repository_list_editable(void)
Every preset the user may edit (writeprotect = 0), in row order.
void dt_preset_repository_update_params_by_rowid(const int rowid, const int op_version, const void *params, const int params_size)
Replace the parameters of one row, by rowid.
GList * dt_preset_repository_list_for_upgrade(const char *operation)
Every preset of operation at any version, with both parameter blobs.
int dt_preset_repository_find_rowid(const char *operation, const int op_version, const char *name)
rowid of (operation, op_version, name), or -1.
void dt_preset_repository_update_camera(const char *operation, const int op_version, const char *name, const char *maker, const char *model, const char *lens)
Set the camera match of (operation, op_version, name).
void dt_preset_repository_update_module_params(const char *operation, const char *name, const int op_version, const void *params, const int params_size)
Replace the parameters (and version) of (operation, name).
void dt_preset_identity_free(gpointer data)
Free one dt_preset_identity_t. Suits g_list_free_full().
void dt_preset_repository_add_module_preset(const char *name, const char *operation, const int op_version, const void *params, const int params_size)
Create an empty user preset holding params, as the "new preset" menu item does.
GList * dt_preset_repository_list_for_version(const char *operation, const int op_version)
As above, restricted to one op_version. Same columns, same order.
void dt_preset_repository_delete_by_rowid(const int rowid)
Delete one row by rowid.
gboolean dt_preset_repository_get_conditions(const char *operation, const int op_version, const char *name, dt_preset_conditions_t *c, int *rowid)
Read the conditions of (operation, op_version, name).
void dt_preset_repository_delete_all_for_module(const char *operation)
Delete every preset of operation, whatever its version or protection.
void dt_preset_free(dt_preset_t *preset)
Release a dt_preset_t and everything it owns. NULL-safe.
gboolean dt_preset_repository_module_preset_exists(const char *operation, const int op_version, const char *name)
TRUE when (operation, op_version, name) exists.
GList * dt_preset_repository_list_for_iop(const char *operation, const int op_version)
Every preset of (operation, op_version), with blend parameters.
void dt_preset_repository_rename_module_preset(const char *operation, const int op_version, const char *old_name, const char *new_name, const char *description, const void *params, const int params_size)
Replace name, description and parameters of (operation, op_version, old_name).
void dt_preset_repository_set_module_version(const char *operation, const char *name, const int op_version)
Set ONLY the version of (operation, name), leaving the parameters alone.
void dt_preset_repository_set_blend_params(const char *operation, const char *name, const int blendop_version, const void *blend_params, const int blend_params_size)
Replace the blend parameters (and blend version) of (operation, name), at any version....
void dt_preset_repository_delete_by_rowid_unprotected(const int rowid)
Delete the row at rowid unless it is write-protected.
void dt_preset_conditions_free(dt_preset_conditions_t *c)
Release the strings owned by c (not c itself).
gboolean dt_preset_repository_get_identity(const int rowid, gchar **operation, int *op_version)
The (operation, op_version) a rowid belongs to. Returns FALSE if there is none; *operation is newly a...
void dt_preset_repository_add_shipped_preset(const char *name, const char *operation, const int op_version, const void *params, const int params_size, const int writeprotect)
Create a preset from code rather than from the menu – the built-in presets a module registers at star...
void dt_preset_repository_update_flag(const char *operation, const int op_version, const char *name, const dt_preset_flag_t flag, const int value)
Set one integer condition of (operation, op_version, name).
void dt_preset_repository_insert_with_conditions(const dt_preset_conditions_t *c, const char *operation, const int op_version, const void *params, const int params_size, const int enabled, const void *blend_params, const int blend_params_size, const int blendop_version)
Create a preset from a full condition set plus its module payload.
void dt_preset_repository_duplicate_module_preset(const char *operation, const int op_version, const char *name, const char *new_name)
Copy (operation, op_version, name) to new_name, unprotected.
GList * dt_preset_repository_find_autoapply(const char *operation, const int op_version, const dt_preset_match_t *match, const char *always_name)
Names of the presets that should be applied to this image automatically.
@ DT_PRESET_RANGE_FOCAL_LENGTH
@ DT_PRESET_RANGE_APERTURE
@ DT_PRESET_RANGE_EXPOSURE
static const dt_aligned_pixel_simd_t value
Identity of one preset, for callers listing rather than loading.
The facts about one image that decide whether a preset matches it.
const char * camera_maker
const char * camera_alias
One row of the Preferences preset tree, with its auto-apply conditions.
One row of data.presets, owned by the caller.