![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "common/paths.h"#include "database/preset_repository.h"#include "common/act_on.h"#include "control/jobs/control_jobs.h"#include "common/collection.h"#include "colorprofiles/colorspaces.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "common/module_versioning.h"#include "common/file_location.h"#include "imageio/imageio_module.h"#include "common/styles.h"#include "common/conf.h"#include "control/control.h"#include "control/signal.h"#include "gui/application.h"#include "widgets/accelerators.h"#include "libs/lib.h"#include "libs/lib_api.h"#include <gdk/gdkkeysyms.h>#include "widgets/container.h"#include "widgets/dialog.h"#include "widgets/label.h"#include <gtk/gtk.h>#include <limits.h>#include <stdlib.h>#include <glib.h>
Include dependency graph for export.c:Go to the source code of this file.
Data Structures | |
| struct | dt_lib_export_t |
Macros | |
| #define | EXPORT_MAX_IMAGE_SIZE UINT16_MAX |
| #define | CONFIG_PREFIX "plugins/lighttable/export/" |
| #define | INCH_TO_CM (2.54f) |
| #define | CONF_PRINT_WIDTH CONFIG_PREFIX "print_width" |
| #define | CONF_PRINT_HEIGHT CONFIG_PREFIX "print_height" |
Typedefs | |
| typedef struct dt_lib_export_t | dt_lib_export_t |
| typedef enum dt_dimensions_type_t | dt_dimensions_type_t |
Enumerations | |
| enum | dt_dimensions_type_t { DT_DIMENSIONS_PIXELS = 0 , DT_DIMENSIONS_CM = 1 , DT_DIMENSIONS_INCH = 2 , DT_DIMENSIONS_SCALE = 3 , DT_DIMENSIONS_ORIGINAL = 4 } |
| #define CONF_PRINT_HEIGHT CONFIG_PREFIX "print_height" |
| #define CONF_PRINT_WIDTH CONFIG_PREFIX "print_width" |
| typedef enum dt_dimensions_type_t dt_dimensions_type_t |
| typedef struct dt_lib_export_t dt_lib_export_t |
| enum dt_dimensions_type_t |
|
static |
Definition at line 879 of file export.c.
References dt_bauhaus_combobox_get(), dt_conf_set_bool(), and key.
Referenced by gui_init().
|
static |
Definition at line 162 of file export.c.
References INCH_TO_CM.
Referenced by _resolve_export_size().
|
static |
Definition at line 253 of file export.c.
References _update().
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 145 of file export.c.
References CONFIG_PREFIX, and dt_conf_get_int().
Referenced by _print_size_changed(), _print_size_display(), _resolve_export_size(), and _size_in_px_update().
|
static |
Definition at line 785 of file export.c.
References _print_dpi(), _size_update_display(), CONFIG_PREFIX, d, dt_bauhaus_combobox_get(), dt_conf_set_int(), dt_confgen_get_int(), DT_DEFAULT, DT_DIMENSIONS_CM, DT_DIMENSIONS_INCH, and dt_gui_widgets_suppressed().
Referenced by gui_init().
Definition at line 174 of file export.c.
References _print_size_from_pixels(), CONF_PRINT_HEIGHT, CONF_PRINT_WIDTH, CONFIG_PREFIX, dt_conf_get_int(), and dt_conf_key_exists().
Referenced by gui_init().
|
static |
Definition at line 314 of file export.c.
References _resolve_export_size(), _scale_optim(), CONFIG_PREFIX, d, dt_act_on_get_images(), dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string(), dt_conf_get_string_const(), dt_control_export(), dt_control_log(), dt_free, dt_gui_main_window(), dt_gui_refocus_parent(), dt_imageio_get_format_by_name(), dt_imageio_get_index_of_format(), dt_imageio_get_index_of_storage(), dt_imageio_get_storage(), dt_imageio_get_storage_by_name(), dt_osx_disallow_fullscreen(), dt_control_export_request_t::export_masks, dt_control_export_request_t::format_index, dt_control_export_request_t::icc_filename, dt_control_export_request_t::icc_intent, dt_control_export_request_t::icc_type, dt_control_export_request_t::max_height, dt_control_export_request_t::max_width, dt_control_export_request_t::metadata_export, res, sanitize_colorspaces(), dt_control_export_request_t::scale_factor, and dt_control_export_request_t::style.
Referenced by gui_init().
|
static |
Definition at line 640 of file export.c.
References _format_changed(), d, dt_bauhaus_combobox_get_text(), name, and set_format_by_name().
Referenced by _format_changed(), and gui_init().
|
static |
get the max output dimension supported by combination of storage and format..
Definition at line 648 of file export.c.
References CONFIG_PREFIX, dt_conf_get_string_const(), dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), height, and width.
Referenced by _update_dimensions().
|
static |
Definition at line 850 of file export.c.
References CONFIG_PREFIX, d, dt_conf_set_int(), dt_gui_widgets_suppressed(), and height.
Referenced by gui_init().
|
static |
Definition at line 248 of file export.c.
References _update().
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 885 of file export.c.
References CONFIG_PREFIX, dt_bauhaus_combobox_get(), and dt_conf_set_int().
Referenced by gui_init().
|
static |
Definition at line 261 of file export.c.
References double(), and value.
Referenced by _scale_optim().
|
static |
Definition at line 953 of file export.c.
References d, dt_lib_module_t::data, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_bauhaus_combobox_set(), dt_style_free(), dt_styles_get_list(), and dt_style_t::name.
Referenced by gui_cleanup(), and gui_init().
| void _menuitem_preferences | ( | GtkMenuItem * | menuitem, |
| dt_lib_module_t * | self | ||
| ) |
Definition at line 973 of file export.c.
References d, dt_lib_module_t::data, dt_bauhaus_combobox_get_text(), dt_lib_export_metadata_configuration_dialog(), and name.
Referenced by set_preferences().
|
static |
Definition at line 933 of file export.c.
References d, dt_lib_module_t::data, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_bauhaus_combobox_set(), dt_gui_container_remove_children(), dt_imageio_get_global(), dt_imageio_get_index_of_storage(), and dt_imageio_get_storage().
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 150 of file export.c.
References CONFIG_PREFIX, and dt_conf_get_int().
Referenced by _dimensions_type_changed(), _print_size_display(), _print_size_from_pixels(), and _resolve_export_size().
Definition at line 865 of file export.c.
References _size_in_px_update(), CONFIG_PREFIX, d, dt_conf_set_int(), and dt_gui_widgets_suppressed().
Referenced by gui_init().
|
static |
Definition at line 859 of file export.c.
References _print_size_changed(), CONF_PRINT_HEIGHT, and dt_gui_widgets_suppressed().
Referenced by gui_init().
|
static |
Definition at line 837 of file export.c.
References _dimensions_type(), _print_unit_in_cm(), _size_in_px_update(), d, dt_conf_set_float(), key, MAX, and value.
Referenced by _print_height_changed(), and _print_width_changed().
|
static |
Definition at line 809 of file export.c.
References _dimensions_type(), _print_dpi(), _print_unit_in_cm(), CONF_PRINT_HEIGHT, CONF_PRINT_WIDTH, d, dt_conf_get_float(), dt_free, dt_gui_freeze_begin, and dt_gui_freeze_end.
Referenced by _size_update_display(), and set_params().
|
static |
Definition at line 167 of file export.c.
References _print_dpi(), CONF_PRINT_HEIGHT, CONF_PRINT_WIDTH, dt_conf_set_float(), height, INCH_TO_CM, and width.
Referenced by _ensure_print_size_conf(), gui_reset(), and set_params().
|
static |
Definition at line 157 of file export.c.
References DT_DIMENSIONS_INCH, and INCH_TO_CM.
Referenced by _print_size_changed(), and _print_size_display().
|
static |
Definition at line 844 of file export.c.
References _print_size_changed(), CONF_PRINT_WIDTH, and dt_gui_widgets_suppressed().
Referenced by gui_init().
|
static |
Definition at line 766 of file export.c.
References CONFIG_PREFIX, dt_bauhaus_combobox_get(), DT_COLORSPACE_FILE, DT_COLORSPACE_NONE, dt_colorspaces_profile_at(), dt_conf_set_int(), dt_conf_set_string(), DT_PROFILE_ROLE_OUTPUT, dt_colorprofile_desc_t::filename, and dt_colorprofile_desc_t::type.
Referenced by gui_init().
|
static |
Definition at line 183 of file export.c.
References _cm_to_pixels(), _dimensions_type(), _print_dpi(), CONF_PRINT_HEIGHT, CONF_PRINT_WIDTH, CONFIG_PREFIX, dt_conf_get_float(), dt_conf_get_int(), dt_conf_get_string_const(), DT_DIMENSIONS_CM, DT_DIMENSIONS_INCH, DT_DIMENSIONS_ORIGINAL, DT_DIMENSIONS_PIXELS, DT_DIMENSIONS_SCALE, dt_imageio_resizing_factor_parse(), and MAX.
Referenced by _export_button_clicked(), _size_in_px_update(), and get_params().
|
static |
Definition at line 393 of file export.c.
References CONFIG_PREFIX, dt_conf_set_string(), i, IS_NULL_PTR, MIN, and value.
Referenced by gui_init().
|
static |
Definition at line 267 of file export.c.
References _is_int(), CONFIG_PREFIX, dt_conf_get_string(), dt_conf_set_string(), dt_free, dt_imageio_resizing_factor_parse(), and IS_NULL_PTR.
Referenced by _export_button_clicked().
| void _set_dimensions | ( | dt_lib_export_t * | d, |
| uint32_t | max_width, | ||
| uint32_t | max_height | ||
| ) |
Definition at line 490 of file export.c.
References _size_in_px_update(), CONFIG_PREFIX, d, dt_conf_set_int(), dt_free, dt_gui_freeze_begin, and dt_gui_freeze_end.
Referenced by _validate_dimensions(), set_params(), and set_storage_by_name().
|
static |
|
static |
Definition at line 465 of file export.c.
References _dimensions_type(), _resolve_export_size(), d, DT_DIMENSIONS_ORIGINAL, DT_DIMENSIONS_PIXELS, and DT_DIMENSIONS_SCALE.
Referenced by _print_dpi_changed(), _print_size_changed(), _set_dimensions(), _size_update_display(), and set_params().
| void _size_update_display | ( | dt_lib_export_t * | self | ) |
Definition at line 509 of file export.c.
References _print_size_display(), _size_in_px_update(), dt_lib_export_t::dimensions_type, dt_bauhaus_combobox_get(), DT_DIMENSIONS_CM, DT_DIMENSIONS_INCH, DT_DIMENSIONS_PIXELS, DT_DIMENSIONS_SCALE, dt_lib_export_t::print_size, dt_lib_export_t::px_size, dt_lib_export_t::scale, and dt_lib_export_t::unit_label.
Referenced by _dimensions_type_changed(), gui_init(), and gui_reset().
|
static |
Definition at line 758 of file export.c.
References _storage_changed(), d, dt_bauhaus_combobox_get_text(), name, and set_storage_by_name().
Referenced by _storage_changed(), and gui_init().
|
static |
Definition at line 891 of file export.c.
References CONFIG_PREFIX, d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), and dt_conf_set_string().
Referenced by gui_init().
|
static |
Definition at line 233 of file export.c.
References CONFIG_PREFIX, d, dt_lib_module_t::data, dt_act_on_get_images_nb(), dt_conf_get_string_const(), dt_imageio_get_format_by_name(), dt_imageio_get_index_of_format(), dt_imageio_get_index_of_storage(), dt_imageio_get_storage_by_name(), dt_lib_cancel_postponed_update(), FALSE, and TRUE.
Referenced by _collection_updated_callback(), _image_selection_changed_callback(), and gui_reset().
|
static |
Sets the max dimensions based upon what storage and format supports
Definition at line 688 of file export.c.
References _get_max_output_dimension(), _validate_dimensions(), d, and EXPORT_MAX_IMAGE_SIZE.
Referenced by set_format_by_name().
|
static |
Updates the combo box and shows only the supported formats of current selected storage module
Definition at line 909 of file export.c.
References CONFIG_PREFIX, d, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_conf_get_string_const(), dt_imageio_get_global(), dt_imageio_get_storage_by_name(), FALSE, and TRUE.
Referenced by set_storage_by_name().
|
static |
Definition at line 675 of file export.c.
References _set_dimensions(), CONFIG_PREFIX, d, dt_conf_get_int(), height, and width.
Referenced by _update_dimensions().
|
static |
Definition at line 827 of file export.c.
References CONFIG_PREFIX, d, dt_conf_set_int(), dt_gui_widgets_suppressed(), and width.
Referenced by gui_init().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
Definition at line 228 of file export.c.
References DT_UI_CONTAINER_SIZE.
| char * dt_lib_export_metadata_configuration_dialog | ( | char * | list, |
| const gboolean | ondisk | ||
| ) |
Definition at line 296 of file export_metadata.c.
References _add_tag_button_clicked(), _delete_tag_button_clicked(), _formula_edited(), _formula_editing_started(), _key_press_on_list(), _tags_toggled(), d, dt_exif_get_exiv2_taglist(), dt_free, dt_free_gpointer(), dt_gui_add_class(), DT_GUI_BOX_SPACING, dt_gui_main_window(), dt_handle_dialog_enter(), DT_LIB_EXPORT_METADATA_COL_FORMULA, DT_LIB_EXPORT_METADATA_COL_XMP, dt_lib_export_metadata_set_conf(), DT_META_CALCULATED, DT_META_DT_HISTORY, DT_META_EXIF, DT_META_GEOTAG, DT_META_HIERARCHICAL_TAG, DT_META_METADATA, DT_META_OMIT_HIERARCHY, DT_META_PRIVATE_TAG, DT_META_SYNONYMS_TAG, DT_META_TAG, dt_osx_disallow_fullscreen(), DT_PIXEL_APPLY_DPI, dt_util_dstrcat(), dt_util_str_to_glist(), dtgtk_button_new(), dtgtk_cairo_paint_minus_simple(), dtgtk_cairo_paint_plus_simple(), FALSE, flags, IS_NULL_PTR, TRUE, and view.
Referenced by _menuitem_preferences().
| void * get_params | ( | dt_lib_module_t * | self, |
| int * | size | ||
| ) |
Definition at line 1696 of file export.c.
References _resolve_export_size(), CONFIG_PREFIX, d, dt_lib_module_t::data, DT_COLORSPACE_FILE, dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string(), dt_free, dt_imageio_get_format(), dt_imageio_get_storage(), FALSE, IS_NULL_PTR, params, dt_imageio_module_format_t::plugin_name, dt_imageio_module_storage_t::plugin_name, size, dt_imageio_module_data_t::style, and TRUE.
| void gui_cleanup | ( | dt_lib_module_t * | self | ) |
Definition at line 1319 of file export.c.
References _collection_updated_callback(), _image_selection_changed_callback(), _lib_export_styles_changed_callback(), _on_storage_list_changed(), d, dt_lib_module_t::data, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, dt_imageio_get_global(), dt_lib_cancel_postponed_update(), and IS_NULL_PTR.
| void gui_init | ( | dt_lib_module_t * | self | ) |
Definition at line 988 of file export.c.
References _callback_bool(), _collection_updated_callback(), _dimensions_type_changed(), _ensure_print_size_conf(), _export_button_clicked(), _format_changed(), _height_changed(), _image_selection_changed_callback(), _intent_changed(), _lib_export_styles_changed_callback(), _on_storage_list_changed(), _print_dpi_changed(), _print_height_changed(), _print_width_changed(), _profile_changed(), _scale_changed(), _size_entry_reset_click(), _size_update_display(), _storage_changed(), _style_changed(), _width_changed(), CONFIG_PREFIX, d, dt_lib_module_t::data, dt_accels_disconnect_on_text_input(), dt_action_button_new(), dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), DT_BAUHAUS_COMBOBOX_NEW_FULL, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), dt_bauhaus_get_global(), dt_bauhaus_widget_set_label(), DT_COLORSPACE_NONE, dt_colorspaces_enumerate_profiles(), dt_colorspaces_profile_index(), dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string(), dt_conf_get_string_const(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_free, dt_free_align, DT_GUI_BOX_SPACING, dt_gui_flow_box_as_layout(), DT_GUI_MODULE, dt_imageio_get_format_by_name(), dt_imageio_get_global(), dt_imageio_get_index_of_format(), dt_imageio_get_index_of_storage(), dt_imageio_get_storage_by_name(), dt_lib_export_metadata_get_conf(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_PATH_MAX, DT_PRIMARY_MASK, DT_PROFILE_ROLE_OUTPUT, DT_SIGNAL_COLLECTION_CHANGED, DT_SIGNAL_IMAGEIO_STORAGE_CHANGE, DT_SIGNAL_SELECTION_CHANGED, DT_SIGNAL_STYLE_CHANGED, dt_ui_section_label_new(), FALSE, IS_NULL_PTR, k, dt_colorprofile_desc_t::name, dt_lib_module_t::timeout_handle, tooltip, TRUE, and dt_lib_module_t::widget.
| void gui_reset | ( | dt_lib_module_t * | self | ) |
Definition at line 524 of file export.c.
References _print_size_from_pixels(), _size_update_display(), _update(), CONFIG_PREFIX, d, dt_lib_module_t::data, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), DT_COLORSPACE_NONE, dt_colorspaces_profile_index(), dt_conf_get_string(), dt_confgen_get(), dt_confgen_get_bool(), dt_confgen_get_int(), dt_control_running(), DT_DEFAULT, dt_free, dt_imageio_get_format(), dt_imageio_get_index_of_storage(), dt_imageio_get_storage(), dt_imageio_get_storage_by_name(), dt_lib_export_metadata_get_conf(), DT_PROFILE_ROLE_OUTPUT, FALSE, and IS_NULL_PTR.
| void init_presets | ( | dt_lib_module_t * | self | ) |
Definition at line 1349 of file export.c.
References dt_free, dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), dt_module_preset_free(), dt_preset_repository_delete_by_rowid(), dt_preset_repository_list_all_versions(), dt_preset_repository_update_params_by_rowid(), name, and p.
| void * legacy_params | ( | dt_lib_module_t * | self, |
| const void *const | old_params, | ||
| const size_t | old_params_size, | ||
| const int | old_version, | ||
| int * | new_version, | ||
| size_t * | new_size | ||
| ) |
Definition at line 1498 of file export.c.
References DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_FILE, DT_COLORSPACE_LIN_REC2020, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_NONE, DT_COLORSPACE_SRGB, dt_conf_get_bool(), dt_free, dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), dt_lib_export_metadata_default_flags(), DT_META_OMIT_HIERARCHY, and flags.
| const char * name | ( | struct dt_lib_module_t * | self | ) |
|
static |
Definition at line 581 of file export.c.
References _update_dimensions(), CONFIG_PREFIX, d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), dt_conf_get_bool(), dt_conf_set_bool(), dt_conf_set_string(), dt_imageio_get_global(), FALSE, name, and TRUE.
Referenced by _format_changed(), and set_params().
| int set_params | ( | dt_lib_module_t * | self, |
| const void * | params, | ||
| int | size | ||
| ) |
Definition at line 1829 of file export.c.
References _blob_string(), _print_size_display(), _print_size_from_pixels(), _set_dimensions(), _size_in_px_update(), d, dt_lib_module_t::data, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), DT_COLORSPACE_NONE, dt_colorspaces_profile_index(), dt_free, dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), dt_lib_export_metadata_set_conf(), DT_PROFILE_ROLE_OUTPUT, IS_NULL_PTR, params, res, set_format_by_name(), set_storage_by_name(), size, and dt_imageio_module_data_t::style.
| void set_preferences | ( | void * | menu, |
| dt_lib_module_t * | self | ||
| ) |
Definition at line 981 of file export.c.
References _menuitem_preferences().
|
static |
Definition at line 697 of file export.c.
References _set_dimensions(), _update_formats_combobox(), ch, CONFIG_PREFIX, d, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), dt_conf_get_int(), dt_conf_get_string_const(), dt_conf_set_string(), dt_imageio_get_format_by_name(), dt_imageio_get_global(), FALSE, IS_NULL_PTR, k, name, and dt_imageio_module_storage_t::plugin_name.
Referenced by _storage_changed(), and set_params().
| const char ** views | ( | dt_lib_module_t * | self | ) |