![]() |
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/label.h"#include <gtk/gtk.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) |
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 } |
| 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 |
Definition at line 955 of file export.c.
References dt_bauhaus_combobox_get(), dt_conf_set_bool(), and key.
Referenced by gui_init().
|
static |
Definition at line 237 of file export.c.
References _update().
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 806 of file export.c.
References _resync_print_dimensions(), _size_update_display(), CONFIG_PREFIX, d, dt_bauhaus_combobox_get(), dt_conf_get_int(), dt_conf_set_int(), dt_conf_set_string(), dt_confgen_get_int(), DT_DEFAULT, DT_DIMENSIONS_CM, DT_DIMENSIONS_INCH, DT_DIMENSIONS_ORIGINAL, DT_DIMENSIONS_SCALE, and dt_gui_widgets_suppressed().
Referenced by gui_init().
|
static |
Definition at line 311 of file export.c.
References _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_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(), res, sanitize_colorspaces(), and TRUE.
Referenced by gui_init().
|
static |
Definition at line 661 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 669 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 914 of file export.c.
References CONFIG_PREFIX, d, dt_conf_set_int(), dt_gui_widgets_suppressed(), and height.
Referenced by _height_mdlclick(), and gui_init().
|
static |
Definition at line 481 of file export.c.
References _height_changed(), CONFIG_PREFIX, and dt_conf_set_int().
Referenced by gui_init().
|
static |
Definition at line 232 of file export.c.
References _update().
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 961 of file export.c.
References CONFIG_PREFIX, dt_bauhaus_combobox_get(), and dt_conf_set_int().
Referenced by gui_init().
| gboolean _is_int | ( | double | value | ) |
|
static |
Definition at line 1029 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 1049 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 1009 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().
Definition at line 941 of file export.c.
References _resync_pixel_dimensions(), _size_in_px_update(), CONFIG_PREFIX, d, dt_conf_set_int(), and dt_gui_widgets_suppressed().
Referenced by gui_init().
|
static |
Definition at line 923 of file export.c.
References _size_in_px_update(), CONFIG_PREFIX, d, dt_conf_set_int(), dt_free, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), height, and print2pixels().
Referenced by gui_init().
|
static |
Definition at line 896 of file export.c.
References _size_in_px_update(), CONFIG_PREFIX, d, dt_conf_set_int(), dt_free, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), print2pixels(), and width.
Referenced by gui_init().
|
static |
Definition at line 787 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 864 of file export.c.
References CONFIG_PREFIX, dt_conf_set_int(), dt_free, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), height, dt_lib_export_t::height, print2pixels(), dt_lib_export_t::print_height, dt_lib_export_t::print_width, width, and dt_lib_export_t::width.
Referenced by _print_dpi_changed().
|
static |
Definition at line 840 of file export.c.
References CONFIG_PREFIX, dt_conf_get_int(), dt_free, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), height, pixels2print(), dt_lib_export_t::print_dpi, dt_lib_export_t::print_height, dt_lib_export_t::print_width, and width.
Referenced by _dimensions_type_changed(), and _set_dimensions().
|
static |
Definition at line 386 of file export.c.
References CONFIG_PREFIX, dt_conf_set_string(), i, IS_NULL_PTR, and value.
Referenced by _scale_mdlclick(), and gui_init().
|
static |
Definition at line 450 of file export.c.
References _scale_changed(), CONFIG_PREFIX, d, dt_conf_set_string(), and FALSE.
Referenced by gui_init().
|
static |
Definition at line 249 of file export.c.
References _is_int(), CONFIG_PREFIX, dt_conf_get_string(), dt_conf_set_string(), dt_free, dt_imageio_resizing_factor_get_and_parsing(), 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 514 of file export.c.
References _resync_print_dimensions(), _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 |
Definition at line 496 of file export.c.
References d, dt_bauhaus_combobox_get(), DT_DIMENSIONS_ORIGINAL, DT_DIMENSIONS_PIXELS, and DT_DIMENSIONS_SCALE.
Referenced by _print_dpi_changed(), _print_height_changed(), _print_width_changed(), _set_dimensions(), and _size_update_display().
| void _size_update_display | ( | dt_lib_export_t * | self | ) |
Definition at line 534 of file export.c.
References _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 779 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 967 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 217 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 709 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 985 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 696 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 466 of file export.c.
References _width_changed(), CONFIG_PREFIX, and dt_conf_set_int().
Referenced by gui_init().
|
static |
Definition at line 887 of file export.c.
References CONFIG_PREFIX, d, dt_conf_set_int(), dt_gui_widgets_suppressed(), and width.
Referenced by _widht_mdlclick(), and gui_init().
|
inlinestatic |
Definition at line 148 of file export.c.
References INCH_TO_CM, and dt_lib_export_t::print_dpi.
Referenced by print2pixels().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
Definition at line 212 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 1774 of file export.c.
References 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, 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 1397 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 1064 of file export.c.
References _callback_bool(), _collection_updated_callback(), _dimensions_type_changed(), _export_button_clicked(), _format_changed(), _height_changed(), _height_mdlclick(), _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(), _scale_mdlclick(), _size_update_display(), _storage_changed(), _style_changed(), _widht_mdlclick(), _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 547 of file export.c.
References _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.
|
inlinestatic |
Definition at line 154 of file export.c.
References dt_lib_export_t::print_dpi.
Referenced by print2pixels().
| void init_presets | ( | dt_lib_module_t * | self | ) |
Definition at line 1427 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 1576 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 | ) |
|
inlinestatic |
Definition at line 136 of file export.c.
References INCH_TO_CM, and dt_lib_export_t::print_dpi.
Referenced by pixels2print().
|
inlinestatic |
Definition at line 142 of file export.c.
References dt_lib_export_t::print_dpi.
Referenced by pixels2print().
|
inlinestatic |
Definition at line 180 of file export.c.
References dt_lib_export_t::dimensions_type, dt_bauhaus_combobox_get(), DT_DIMENSIONS_CM, DT_DIMENSIONS_INCH, DT_DIMENSIONS_ORIGINAL, DT_DIMENSIONS_PIXELS, DT_DIMENSIONS_SCALE, pixels2cm(), and pixels2inch().
Referenced by _resync_print_dimensions().
|
inlinestatic |
Definition at line 160 of file export.c.
References cm2pixels(), dt_lib_export_t::dimensions_type, dt_bauhaus_combobox_get(), DT_DIMENSIONS_CM, DT_DIMENSIONS_INCH, DT_DIMENSIONS_ORIGINAL, DT_DIMENSIONS_PIXELS, DT_DIMENSIONS_SCALE, inch2pixels(), and value.
Referenced by _print_height_changed(), _print_width_changed(), and _resync_pixel_dimensions().
|
static |
Definition at line 602 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 1889 of file export.c.
References _set_dimensions(), 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, 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 1057 of file export.c.
References _menuitem_preferences().
|
static |
Definition at line 718 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 | ) |