presets.h 3.07 KB
Newer Older
1
#pragma once
2

3
// format flags stored into the presets database
4 5
typedef enum dt_gui_presets_format_flag_t
{
6 7 8 9
  FOR_LDR = 1 << 0,
  FOR_RAW = 1 << 1,
  FOR_HDR = 1 << 2
} dt_gui_presets_format_flag_t;
10 11 12 13 14

/** create a db table with presets for all operations. */
void dt_gui_presets_init();

/** add or replace a generic (i.e. non-exif specific) preset for this operation. */
15 16
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);
17

johannes hanika's avatar
johannes hanika committed
18
/** update match strings for maker, model, lens. */
19 20
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);
johannes hanika's avatar
johannes hanika committed
21
/** update ranges for iso, aperture, exposure, and focal length, respectively. */
22 23 24 25 26 27 28 29
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_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_tv(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);
30
/** update ldr flag: 0-dont care, 1-low dynamic range, 2-raw */
31 32
void dt_gui_presets_update_ldr(const char *name, dt_dev_operation_t op, const int32_t version,
                               const int ldrflag);
33
/** set auto apply property of preset. */
34 35
void dt_gui_presets_update_autoapply(const char *name, dt_dev_operation_t op, const int32_t version,
                                     const int autoapply);
johannes hanika's avatar
johannes hanika committed
36
/** set filter mode. if 1, the preset will only show for matching images. */
37 38
void dt_gui_presets_update_filter(const char *name, dt_dev_operation_t op, const int32_t version,
                                  const int filter);
johannes hanika's avatar
johannes hanika committed
39

johannes hanika's avatar
johannes hanika committed
40
/** show a popup menu without initialized module. */
41 42 43 44 45
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);
46 47 48 49

/** show the popup menu for the given module, with default behavior. */
void dt_gui_presets_popup_menu_show_for_module(dt_iop_module_t *module);

50 51 52
/** show popupmenu for favorite modules */
void dt_gui_favorite_presets_menu_show();

Richard Wonka's avatar
Richard Wonka committed
53
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
54
// vim: shiftwidth=2 expandtab tabstop=2 cindent
Tobias Ellinghaus's avatar
Tobias Ellinghaus committed
55
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;