![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/utility.h"#include "common/history_actions.h"#include "common/conf.h"#include <glib/gstdio.h>#include "database/style_repository.h"#include "common/styles.h"#include "history/notify.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "common/logging.h"#include "common/paths.h"#include "common/image.h"#include "metadata/exif.h"#include "common/file_location.h"#include "history/history.h"#include "history/history_snapshot.h"#include "develop/iop_order.h"#include "metadata/tags.h"#include "develop/develop.h"#include "develop/dev_history.h"#include <libxml/encoding.h>#include <libxml/xmlwriter.h>#include <glib.h>#include <stdio.h>#include <string.h>
Include dependency graph for src/common/styles.c:Go to the source code of this file.
Data Structures | |
| struct | StyleInfoData |
| struct | StylePluginData |
| struct | StyleData |
| struct | _item_list_ctx_t |
Macros | |
| #define | DT_IOP_ORDER_INFO (dt_get_debug_flags() & DT_DEBUG_IOPORDER) |
Typedefs | |
| typedef struct _item_list_ctx_t | _item_list_ctx_t |
Functions | |
| void | dt_style_free (gpointer data) |
| void | dt_style_item_free (gpointer data) |
| int32_t | dt_styles_get_id_by_name (const char *name) |
| gboolean | dt_styles_exists (const char *name) |
| gboolean | dt_styles_has_module_order (const char *name) |
| GList * | dt_styles_module_order_list (const char *name) |
| static gboolean | dt_styles_create_style_header (const char *name, const char *description, GList *iop_list) |
| static void | _dt_style_update_from_image (int id, int32_t imgid, GList *filter, GList *update) |
| static void | _dt_style_update_iop_order (const gchar *name, const int id, const int32_t imgid, const gboolean copy_iop_order, const gboolean update_iop_order) |
| void | dt_styles_update (const char *name, const char *newname, const char *newdescription, GList *filter, const int32_t imgid, GList *update, const gboolean copy_iop_order, const gboolean update_iop_order) |
| void | dt_styles_create_from_style (const char *name, const char *newname, const char *description, GList *filter, const int32_t imgid, GList *update, const gboolean copy_iop_order, const gboolean update_iop_order) |
| gboolean | dt_styles_create_from_image (const char *name, const char *description, const int32_t imgid, GList *filter, gboolean copy_iop_order) |
| void | dt_multiple_styles_apply_to_list (GList *styles, const GList *list, gboolean duplicate) |
| static const char * | _dt_styles_normalize_multi_name (const char *multi_name) |
| static gboolean | _dt_styles_apply_item_to_module (dt_iop_module_t *module, const dt_style_item_t *style_item) |
| static dt_iop_module_t * | _dt_styles_get_or_create_module_instance (dt_develop_t *dev, const dt_style_item_t *style_item) |
| static dt_iop_module_t * | _dt_styles_tmp_module_from_style_item (dt_develop_t *dev, const dt_style_item_t *style_item) |
| static void | _prepend_apply_item (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) |
| static GList * | _dt_styles_get_apply_items (const int style_id) |
| static GList * | _dt_styles_build_mod_list_from_history (dt_develop_t *dev, GHashTable *style_ids) |
| static void | _dt_styles_tmp_module_free (dt_iop_module_t *module) |
| static int | _styles_init_source_dev (dt_develop_t *dev_src, const char *name, const int32_t imgid, gboolean *has_iop_list) |
| static GList * | _styles_collect_applied_items (dt_develop_t *dev_src, GList *si_list, GHashTable *style_ids) |
| static void | _styles_sync_pipeline_from_items (dt_develop_t *dev_src, GList *applied_items, const gboolean has_iop_list) |
| static int | _styles_rebuild_history_from_items (dt_develop_t *dev_src, GList *applied_items) |
| static int | _styles_prepare_source_dev (dt_develop_t *dev_src, const char *name, const int style_id, const int32_t imgid, GList **out_si_list, GHashTable **out_style_ids, GList **out_mod_list) |
| int | dt_styles_apply_to_image_merge (const char *name, const int style_id, const int32_t newimgid, const dt_history_merge_strategy_t mode, dt_hm_batch_state_t *batch) |
| void | dt_styles_apply_style_item (dt_develop_t *dev, dt_style_item_t *style_item) |
| void | dt_styles_apply_to_image (const char *name, const gboolean duplicate, const int32_t imgid) |
| void | dt_styles_delete_by_name_adv (const char *name, const gboolean raise) |
| void | dt_styles_delete_by_name (const char *name) |
| static void | _prepend_item (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) |
| GList * | dt_styles_get_item_list (const char *name, gboolean params, int32_t imgid) |
| char * | dt_styles_get_item_list_as_string (const char *name) |
| static void | _prepend_style (void *user_data, const char *name, const char *description) |
| GList * | dt_styles_get_list (const char *filter) |
| static void | _write_item (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) |
| void | dt_styles_save_to_file (const char *style_name, const char *filedir, gboolean overwrite) |
| static StyleData * | dt_styles_style_data_new () |
| static StylePluginData * | dt_styles_style_plugin_new () |
| static void | dt_styles_style_data_free (StyleData *style, gboolean free_segments) |
| static void | dt_styles_start_tag_handler (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error) |
| static void | dt_styles_end_tag_handler (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error) |
| static void | dt_styles_style_text_handler (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error) |
| static void | dt_style_plugin_save (StylePluginData *plugin, gpointer styleId) |
| static void | dt_style_save (StyleData *style) |
| void | dt_styles_import_from_file (const char *style_path) |
| gchar * | dt_styles_get_description (const char *name) |
| static void | _collect_style (void *user_data, const char *name, const char *description) |
| dt_style_t * | dt_styles_get_by_name (const char *name) |
| void | dt_styles_cleanup (void) |
Variables | |
| static GMarkupParser | dt_style_parser |
| #define DT_IOP_ORDER_INFO (dt_get_debug_flags() & DT_DEBUG_IOPORDER) |
Definition at line 75 of file src/common/styles.c.
| typedef struct _item_list_ctx_t _item_list_ctx_t |
Definition at line 1252 of file src/common/styles.c.
References dt_style_t::description, description(), name, dt_style_t::name, and out.
Referenced by dt_styles_get_by_name().
|
static |
Definition at line 177 of file src/common/styles.c.
References dt_style_repository_append_item_from_history(), dt_style_repository_update_item_from_history(), and UNKNOWN_IMAGE.
Referenced by dt_styles_create_from_style(), and dt_styles_update().
|
static |
Definition at line 202 of file src/common/styles.c.
References dt_free, dt_free_gpointer(), dt_ioppr_get_iop_order_list(), dt_ioppr_serialize_text_iop_order_list(), dt_style_repository_set_iop_list(), dt_styles_module_order_list(), FALSE, IS_NULL_PTR, and name.
Referenced by dt_styles_create_from_style(), and dt_styles_update().
|
static |
Definition at line 373 of file src/common/styles.c.
References _dt_styles_normalize_multi_name(), dt_iop_module_t::blend_params, dt_style_item_t::blendop_params, dt_style_item_t::blendop_params_size, dt_style_item_t::blendop_version, dt_iop_module_t::default_blendop_params, dt_iop_module_t::default_params, dt_develop_blend_legacy_params(), dt_develop_blend_version(), dt_history_message(), dt_iop_module_t::enabled, FALSE, dt_style_item_t::module_version, dt_style_item_t::multi_name, dt_iop_module_t::multi_name, dt_iop_module_t::op, dt_style_item_t::operation, dt_style_item_t::params, dt_iop_module_t::params, dt_style_item_t::params_size, dt_iop_module_t::params_size, and TRUE.
Referenced by _dt_styles_tmp_module_from_style_item(), and _styles_collect_applied_items().
|
static |
Definition at line 507 of file src/common/styles.c.
References dt_free, dt_develop_t::history, dt_dev_history_item_t::multi_name, and dt_dev_history_item_t::op_name.
Referenced by _styles_prepare_source_dev().
|
static |
Definition at line 500 of file src/common/styles.c.
References _prepend_apply_item(), and dt_style_repository_foreach_apply_item().
Referenced by _styles_prepare_source_dev().
|
static |
Definition at line 430 of file src/common/styles.c.
References _dt_styles_normalize_multi_name(), and dt_style_item_t::multi_name.
|
static |
Definition at line 367 of file src/common/styles.c.
References IS_NULL_PTR.
Referenced by _dt_styles_apply_item_to_module(), _dt_styles_get_or_create_module_instance(), _styles_collect_applied_items(), _styles_rebuild_history_from_items(), and _styles_sync_pipeline_from_items().
|
static |
Definition at line 525 of file src/common/styles.c.
References dt_free, dt_iop_cleanup_module(), and IS_NULL_PTR.
Referenced by dt_styles_apply_style_item().
|
static |
Definition at line 442 of file src/common/styles.c.
References _dt_styles_apply_item_to_module(), dt_free, dt_iop_cleanup_module(), dt_iop_get_module_by_op_priority(), dt_iop_load_module(), dt_develop_t::iop, IS_NULL_PTR, dt_style_item_t::multi_name, dt_style_item_t::operation, and dt_iop_module_t::so.
|
static |
Definition at line 470 of file src/common/styles.c.
References dt_style_item_t::blendop_params, dt_style_item_t::blendop_params_size, dt_style_item_t::blendop_version, dt_style_item_t::enabled, enabled, dt_style_item_t::iop_order, dt_style_item_t::module_version, dt_style_item_t::multi_name, dt_style_item_t::multi_priority, dt_style_item_t::name, dt_style_item_t::num, dt_style_item_t::operation, dt_style_item_t::params, dt_style_item_t::params_size, params_size(), and dt_style_item_t::selimg_num.
Referenced by _dt_styles_get_apply_items().
|
static |
Definition at line 776 of file src/common/styles.c.
References dt_style_item_t::blendop_params, dt_style_item_t::blendop_params_size, dt_style_item_t::blendop_version, dt_iop_get_localized_name(), dt_style_item_t::enabled, enabled, _item_list_ctx_t::imgid, dt_style_item_t::iop_order, dt_style_item_t::module_version, dt_style_item_t::multi_name, dt_style_item_t::multi_priority, dt_style_item_t::name, dt_style_item_t::num, dt_style_item_t::operation, _item_list_ctx_t::params, dt_style_item_t::params, dt_style_item_t::params_size, params_size(), _item_list_ctx_t::result, dt_style_item_t::selimg_num, and UNKNOWN_IMAGE.
Referenced by dt_styles_get_item_list().
Definition at line 878 of file src/common/styles.c.
References dt_style_t::description, description(), name, and dt_style_t::name.
Referenced by dt_styles_get_list().
|
static |
Definition at line 554 of file src/common/styles.c.
References _dt_styles_apply_item_to_module(), _dt_styles_normalize_multi_name(), IS_NULL_PTR, dt_style_item_t::multi_name, and dt_style_item_t::operation.
Referenced by _styles_prepare_source_dev().
|
static |
Definition at line 532 of file src/common/styles.c.
References dt_dev_ensure_image_storage(), dt_dev_init(), dt_dev_init_default_history(), dt_free_gpointer(), dt_ioppr_set_default_iop_order(), dt_styles_module_order_list(), FALSE, dt_develop_t::iop_order_list, name, and TRUE.
Referenced by _styles_prepare_source_dev().
|
static |
Definition at line 632 of file src/common/styles.c.
References _dt_styles_build_mod_list_from_history(), _dt_styles_get_apply_items(), _styles_collect_applied_items(), _styles_init_source_dev(), _styles_rebuild_history_from_items(), _styles_sync_pipeline_from_items(), dt_free_gpointer(), dt_ioppr_update_for_style_items(), dt_style_item_free(), FALSE, IS_NULL_PTR, and name.
Referenced by dt_styles_apply_to_image_merge().
|
static |
Definition at line 601 of file src/common/styles.c.
References _dt_styles_normalize_multi_name(), dt_dev_history_compress_ext(), dt_dev_history_free_history(), dt_dev_history_item_create(), dt_dev_history_item_update_from_params(), dt_dev_pop_history_items_ext(), dt_dev_set_history_end_ext(), dt_dev_history_item_t::enabled, FALSE, dt_develop_t::history, IS_NULL_PTR, and dt_style_item_t::multi_name.
Referenced by _styles_prepare_source_dev().
|
static |
Definition at line 577 of file src/common/styles.c.
References _dt_styles_normalize_multi_name(), dt_ioppr_get_iop_order(), dt_ioppr_resync_pipeline(), dt_ioppr_update_for_style_items(), FALSE, dt_style_item_t::iop_order, dt_develop_t::iop_order_list, IS_NULL_PTR, dt_style_item_t::multi_name, dt_style_item_t::multi_priority, and dt_style_item_t::operation.
Referenced by _styles_prepare_source_dev().
|
static |
Definition at line 894 of file src/common/styles.c.
References dt_exif_xmp_encode(), dt_free, enabled, and params_size().
Referenced by dt_styles_save_to_file().
| void dt_multiple_styles_apply_to_list | ( | GList * | styles, |
| const GList * | list, | ||
| gboolean | duplicate | ||
| ) |
applies the style to selection of images applies list of styles to selection of images
Definition at line 329 of file src/common/styles.c.
References dt_history_message(), dt_history_style_on_image(), dt_undo_end_group(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_start_group(), and IS_NULL_PTR.
Referenced by apply_clicked().
| void dt_style_free | ( | gpointer | data | ) |
helpers that free a style or style_item. can be used in g_list_free_full()
Definition at line 105 of file src/common/styles.c.
References dt_style_t::description, dt_free, and dt_style_t::name.
Referenced by _gui_styles_update_view(), _lib_export_styles_changed_callback(), _studio_style_populate_styles_tree(), append_styles(), gui_init(), and gui_reset().
| void dt_style_item_free | ( | gpointer | data | ) |
Definition at line 115 of file src/common/styles.c.
References dt_style_item_t::blendop_params, dt_free, dt_style_item_t::multi_name, dt_style_item_t::name, dt_style_item_t::operation, and dt_style_item_t::params.
Referenced by _apply_style_before_export(), _gui_styles_dialog_run(), _styles_prepare_source_dev(), dt_styles_apply_to_image_merge(), and dt_styles_get_item_list_as_string().
|
static |
Definition at line 1140 of file src/common/styles.c.
References StylePluginData::blendop_params, StylePluginData::blendop_version, dt_exif_xmp_decode(), dt_free, dt_style_repository_insert_item(), StylePluginData::enabled, StylePluginData::multi_name, StylePluginData::multi_priority, StylePluginData::num, StylePluginData::op_params, and StylePluginData::operation.
Referenced by dt_style_save().
Definition at line 1162 of file src/common/styles.c.
References StyleInfoData::description, dt_history_message(), dt_style_plugin_save(), dt_styles_create_style_header(), dt_styles_get_id_by_name(), StyleData::info, StyleInfoData::iop_list, IS_NULL_PTR, StyleInfoData::name, and StyleData::plugins.
Referenced by dt_styles_import_from_file().
| void dt_styles_apply_style_item | ( | dt_develop_t * | dev, |
| dt_style_item_t * | style_item | ||
| ) |
applies the item style to dev->history
Definition at line 729 of file src/common/styles.c.
References _dt_styles_tmp_module_free(), dt_dev_pop_history_items_ext(), dt_history_merge_module_into_history(), dt_ioppr_resync_pipeline(), dt_pthread_rwlock_unlock(), dt_pthread_rwlock_wrlock(), FALSE, and dt_develop_t::history_mutex.
Referenced by _apply_style_before_export().
| void dt_styles_apply_to_image | ( | const char * | name, |
| const gboolean | duplicate, | ||
| const int32_t | imgid | ||
| ) |
applies the style to image by imgid, takes care of overwrite and duplicate modes
Definition at line 745 of file src/common/styles.c.
References dt_history_style_on_image(), dt_undo_end_group(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_start_group(), and name.
| int dt_styles_apply_to_image_merge | ( | const char * | name, |
| const int | style_id, | ||
| const int32_t | newimgid, | ||
| const dt_history_merge_strategy_t | mode, | ||
| dt_hm_batch_state_t * | batch | ||
| ) |
internal helper used by history actions
Definition at line 688 of file src/common/styles.c.
References _styles_prepare_source_dev(), dt_conf_get_bool(), dt_dev_cleanup(), dt_dev_get_history_end_ext(), dt_dev_merge_history_into_image(), dt_dev_replace_history_on_image(), DT_HISTORY_MERGE_REPLACE, DT_IOP_ORDER_INFO, dt_style_item_free(), name, and TRUE.
Referenced by _history_style_apply(), _import_image(), _studio_style_apply_callback(), and apply_style_to_image().
cleanup cached statements
Definition at line 1268 of file src/common/styles.c.
References dt_style_repository_cleanup().
Referenced by dt_cleanup().
| gboolean dt_styles_create_from_image | ( | const char * | name, |
| const char * | description, | ||
| const int32_t | imgid, | ||
| GList * | items, | ||
| gboolean | copy_iop_order | ||
| ) |
creates a new style from specified image, items are the history stack number of items to include in style
Definition at line 292 of file src/common/styles.c.
References description(), dt_free_gpointer(), DT_HISTORY_CHANGE_STYLES, dt_history_changed(), dt_ioppr_get_iop_order_list(), dt_style_repository_copy_items_from_history(), dt_style_repository_normalize_multi_priority(), dt_styles_create_style_header(), dt_styles_get_id_by_name(), dt_styles_save_to_file(), FALSE, name, and TRUE.
Referenced by _gui_styles_new_style_response().
| void dt_styles_create_from_style | ( | const char * | name, |
| const char * | newname, | ||
| const char * | description, | ||
| GList * | filter, | ||
| const int32_t | imgid, | ||
| GList * | update, | ||
| gboolean | copy_iop_order, | ||
| const gboolean | update_iop_order | ||
| ) |
creates a new style from specified style, items are the style number of items to include in style
Definition at line 256 of file src/common/styles.c.
References _dt_style_update_from_image(), _dt_style_update_iop_order(), description(), DT_HISTORY_CHANGE_STYLES, dt_history_changed(), dt_history_message(), dt_style_repository_copy_items_from_style(), dt_style_repository_normalize_multi_priority(), dt_styles_create_style_header(), dt_styles_get_id_by_name(), dt_styles_save_to_file(), FALSE, and name.
Referenced by _gui_styles_edit_style_response().
|
static |
Definition at line 163 of file src/common/styles.c.
References description(), dt_free, dt_history_message(), dt_ioppr_serialize_text_iop_order_list(), dt_style_repository_insert_header(), dt_styles_get_id_by_name(), FALSE, name, and TRUE.
Referenced by dt_style_save(), dt_styles_create_from_image(), and dt_styles_create_from_style().
| void dt_styles_delete_by_name | ( | const char * | name | ) |
delete a style by name, raise signal
Definition at line 764 of file src/common/styles.c.
References dt_styles_delete_by_name_adv(), name, and TRUE.
Referenced by _gui_styles_new_style_response(), and import_clicked().
| void dt_styles_delete_by_name_adv | ( | const char * | name, |
| const gboolean | raise | ||
| ) |
delete a style by name
Definition at line 752 of file src/common/styles.c.
References DT_HISTORY_CHANGE_STYLES, dt_history_changed(), dt_style_repository_delete(), dt_styles_get_id_by_name(), and name.
Referenced by delete_clicked(), dt_styles_delete_by_name(), and gui_reset().
|
static |
Definition at line 1052 of file src/common/styles.c.
References FALSE, and StyleData::in_plugin.
| gboolean dt_styles_exists | ( | const char * | name | ) |
check if style exists by name
Definition at line 133 of file src/common/styles.c.
References dt_styles_get_id_by_name(), FALSE, name, and TRUE.
Referenced by _gui_styles_dialog_run(), _gui_styles_new_style_response(), dt_styles_save_to_file(), and import_clicked().
| dt_style_t * dt_styles_get_by_name | ( | const char * | name | ) |
get a style object by name, the object needs to be freed by the caller
Definition at line 1261 of file src/common/styles.c.
References _collect_style(), dt_style_repository_get_style(), and name.
| gchar * dt_styles_get_description | ( | const char * | name | ) |
get a description of a named style
Definition at line 1240 of file src/common/styles.c.
References dt_style_repository_get_description(), dt_styles_get_id_by_name(), and name.
Referenced by _gui_styles_dialog_run(), dt_styles_save_to_file(), and dt_styles_update().
| int32_t dt_styles_get_id_by_name | ( | const char * | name | ) |
get a style id by name
Definition at line 1247 of file src/common/styles.c.
References dt_style_repository_get_id_by_name(), and name.
Referenced by _import_image(), _studio_style_apply_callback(), apply_style_to_image(), dt_history_style_on_image(), dt_history_style_on_list(), dt_style_save(), dt_styles_create_from_image(), dt_styles_create_from_style(), dt_styles_create_style_header(), dt_styles_delete_by_name_adv(), dt_styles_exists(), dt_styles_get_description(), dt_styles_get_item_list(), dt_styles_save_to_file(), and dt_styles_update().
| GList * dt_styles_get_item_list | ( | const char * | name, |
| gboolean | params, | ||
| int32_t | imgid | ||
| ) |
get a list of items for a named style if imgid != UNKNOWN_IMAGE, then styles from the corresponding image are also reported if they are not already part of the style
Definition at line 841 of file src/common/styles.c.
References _prepend_item(), dt_style_repository_foreach_item(), dt_style_repository_foreach_item_against_image(), dt_style_repository_foreach_item_with_params(), dt_styles_get_id_by_name(), name, _item_list_ctx_t::result, and UNKNOWN_IMAGE.
Referenced by _apply_style_before_export(), _gui_styles_dialog_run(), and dt_styles_get_item_list_as_string().
| char * dt_styles_get_item_list_as_string | ( | const char * | name | ) |
get list of items for a named style as a nice string
Definition at line 857 of file src/common/styles.c.
References dt_free_gpointer(), dt_style_item_free(), dt_styles_get_item_list(), dt_util_glist_to_str(), FALSE, IS_NULL_PTR, items, name, dt_style_item_t::name, and names.
Referenced by _gui_styles_update_view(), and _styles_build_tooltip().
| GList * dt_styles_get_list | ( | const char * | filter | ) |
get a list of styles based on filter string
Definition at line 887 of file src/common/styles.c.
References _prepend_style(), and dt_style_repository_foreach_style().
Referenced by _gui_styles_update_view(), _lib_export_styles_changed_callback(), _studio_style_populate_styles_tree(), append_styles(), gui_init(), and gui_reset().
| gboolean dt_styles_has_module_order | ( | const char * | name | ) |
returns TRUE if the style has a module order defined
Definition at line 140 of file src/common/styles.c.
References dt_free, dt_style_repository_get_iop_list(), and name.
Referenced by _gui_styles_dialog_run(), and _styles_apply_callback().
| void dt_styles_import_from_file | ( | const char * | style_path | ) |
load style from file
Definition at line 1177 of file src/common/styles.c.
References DT_HISTORY_CHANGE_STYLES, dt_history_changed(), dt_history_message(), dt_style_parser, dt_style_save(), dt_styles_style_data_free(), dt_styles_style_data_new(), and TRUE.
Referenced by import_clicked(), and run_style_scenario().
| GList * dt_styles_module_order_list | ( | const char * | name | ) |
Definition at line 148 of file src/common/styles.c.
References dt_free, dt_ioppr_deserialize_text_iop_order_list(), dt_ioppr_insert_missing_modules(), dt_style_repository_get_iop_list(), and name.
Referenced by _dt_style_update_iop_order(), _styles_init_source_dev(), and dt_styles_save_to_file().
| void dt_styles_save_to_file | ( | const char * | style_name, |
| const char * | filedir, | ||
| gboolean | overwrite | ||
| ) |
save style to file
Definition at line 922 of file src/common/styles.c.
References _write_item(), dt_concat_path_file(), dt_free, dt_free_gpointer(), dt_history_message(), dt_ioppr_serialize_text_iop_order_list(), dt_loc_get_user_config_dir(), DT_PATH_MAX, dt_style_repository_foreach_item_for_export(), dt_styles_exists(), dt_styles_get_description(), dt_styles_get_id_by_name(), dt_styles_module_order_list(), IS_NULL_PTR, and TRUE.
Referenced by dt_styles_create_from_image(), dt_styles_create_from_style(), dt_styles_update(), and export_clicked().
|
static |
Definition at line 1036 of file src/common/styles.c.
References dt_styles_style_plugin_new(), StyleData::in_plugin, StyleData::plugins, and TRUE.
Definition at line 1025 of file src/common/styles.c.
References StyleInfoData::description, dt_free, dt_free_gpointer(), StyleData::info, StyleInfoData::iop_list, StyleInfoData::name, and StyleData::plugins.
Referenced by dt_styles_import_from_file().
|
static |
Definition at line 1000 of file src/common/styles.c.
References StyleInfoData::description, FALSE, StyleData::in_plugin, StyleData::info, StyleInfoData::name, and StyleData::plugins.
Referenced by dt_styles_import_from_file().
|
static |
Definition at line 1014 of file src/common/styles.c.
References StylePluginData::blendop_params, StylePluginData::iop_order, StylePluginData::multi_name, StylePluginData::op_params, and StylePluginData::operation.
Referenced by dt_styles_start_tag_handler().
|
static |
Definition at line 1066 of file src/common/styles.c.
References StylePluginData::blendop_params, StylePluginData::blendop_version, StyleInfoData::description, dt_ioppr_deserialize_text_iop_order_list(), dt_ioppr_insert_missing_modules(), StylePluginData::enabled, StyleData::in_plugin, StyleData::info, StyleInfoData::iop_list, StylePluginData::iop_order, StylePluginData::multi_name, StylePluginData::multi_priority, StyleInfoData::name, StylePluginData::num, StylePluginData::op_params, StylePluginData::operation, and StyleData::plugins.
| void dt_styles_update | ( | const char * | name, |
| const char * | newname, | ||
| const char * | description, | ||
| GList * | filter, | ||
| const int32_t | imgid, | ||
| GList * | update, | ||
| const gboolean | copy_iop_order, | ||
| const gboolean | update_iop_order | ||
| ) |
update a style
Definition at line 223 of file src/common/styles.c.
References _dt_style_update_from_image(), _dt_style_update_iop_order(), dt_free, DT_HISTORY_CHANGE_STYLES, dt_history_changed(), dt_style_repository_delete_items_except(), dt_style_repository_normalize_multi_priority(), dt_style_repository_update_header(), dt_styles_get_description(), dt_styles_get_id_by_name(), dt_styles_save_to_file(), name, and TRUE.
Referenced by _gui_styles_edit_style_response().
|
static |
Definition at line 1132 of file src/common/styles.c.
Referenced by dt_styles_import_from_file().