![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/collection.h"#include "common/colorspaces.h"#include "common/darktable.h"#include "common/debug.h"#include "common/file_location.h"#include "common/imageio_module.h"#include "common/styles.h"#include "control/conf.h"#include "control/control.h"#include "control/jobs.h"#include "control/signal.h"#include "dtgtk/button.h"#include "gui/gtk.h"#include "gui/presets.h"#include "libs/lib.h"#include "libs/lib_api.h"#include <gdk/gdkkeysyms.h>#include <gtk/gtk.h>#include <stdlib.h>#include <ctype.h>#include <glib.h>
Include dependency graph for export.c: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 } |
Variables | |
| static sqlite3_stmt * | _export_presets_stmt = NULL |
| #define CONFIG_PREFIX "plugins/lighttable/export/" |
| #define EXPORT_MAX_IMAGE_SIZE UINT16_MAX |
| #define INCH_TO_CM (2.54f) |
| 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 |
References dt_bauhaus_combobox_get(), dt_conf_set_bool(), and key.
Referenced by gui_init().
|
static |
References _update().
Referenced by gui_cleanup(), and gui_init().
|
static |
References _resync_print_dimensions(), _size_update_display(), CONFIG_PREFIX, d, darktable, 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, darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References _scale_optim(), CONFIG_PREFIX, d, darktable, 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_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_ui_main_window(), darktable_t::gui, sanitize_colorspaces(), TRUE, and dt_gui_gtk_t::ui.
Referenced by gui_init().
|
static |
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..
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 |
References CONFIG_PREFIX, d, darktable, dt_conf_set_int(), darktable_t::gui, height, and dt_gui_gtk_t::reset.
Referenced by _height_mdlclick(), and gui_init().
|
static |
References _height_changed(), CONFIG_PREFIX, and dt_conf_set_int().
Referenced by gui_init().
|
static |
References _update().
Referenced by gui_cleanup(), and gui_init().
|
static |
References CONFIG_PREFIX, dt_bauhaus_combobox_get(), and dt_conf_set_int().
Referenced by gui_init().
| gboolean _is_int | ( | double | value | ) |
References value.
Referenced by _scale_optim().
|
static |
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 | ||
| ) |
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 |
References d, darktable, 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_index_of_storage(), dt_imageio_get_storage(), darktable_t::imageio, and dt_imageio_t::plugins_storage.
Referenced by gui_cleanup(), and gui_init().
References _resync_pixel_dimensions(), _size_in_px_update(), CONFIG_PREFIX, d, darktable, dt_conf_set_int(), darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References _size_in_px_update(), CONFIG_PREFIX, d, darktable, dt_conf_set_int(), dt_free, darktable_t::gui, height, print2pixels(), and dt_gui_gtk_t::reset.
Referenced by gui_init().
|
static |
References _size_in_px_update(), CONFIG_PREFIX, d, darktable, dt_conf_set_int(), dt_free, darktable_t::gui, print2pixels(), dt_gui_gtk_t::reset, and width.
Referenced by gui_init().
|
static |
References darktable_t::color_profiles, CONFIG_PREFIX, darktable, dt_bauhaus_combobox_get(), DT_COLORSPACE_FILE, DT_COLORSPACE_NONE, dt_conf_set_int(), dt_conf_set_string(), dt_colorspaces_color_profile_t::filename, dt_colorspaces_color_profile_t::out_pos, dt_colorspaces_t::profiles, and dt_colorspaces_color_profile_t::type.
Referenced by gui_init().
|
static |
|
static |
References CONFIG_PREFIX, darktable, dt_conf_get_int(), dt_free, darktable_t::gui, height, pixels2print(), dt_lib_export_t::print_dpi, dt_lib_export_t::print_height, dt_lib_export_t::print_width, dt_gui_gtk_t::reset, and width.
Referenced by _dimensions_type_changed(), and _set_dimensions().
|
static |
References CONFIG_PREFIX, dt_conf_set_string(), i, and value.
Referenced by _scale_mdlclick(), and gui_init().
|
static |
References _scale_changed(), CONFIG_PREFIX, d, dt_conf_set_string(), and FALSE.
Referenced by gui_init().
|
static |
References _is_int(), CONFIG_PREFIX, dt_conf_get_string(), dt_conf_set_string(), dt_free, and dt_imageio_resizing_factor_get_and_parsing().
Referenced by _export_button_clicked().
| void _set_dimensions | ( | dt_lib_export_t * | d, |
| uint32_t | max_width, | ||
| uint32_t | max_height | ||
| ) |
References _resync_print_dimensions(), _size_in_px_update(), CONFIG_PREFIX, d, darktable, dt_conf_set_int(), dt_free, darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by _validate_dimensions(), set_params(), and set_storage_by_name().
|
static |
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 | ) |
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 |
References _storage_changed(), d, dt_bauhaus_combobox_get_text(), name, and set_storage_by_name().
Referenced by _storage_changed(), and gui_init().
|
static |
References CONFIG_PREFIX, d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), and dt_conf_set_string().
Referenced by gui_init().
|
static |
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
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
References CONFIG_PREFIX, d, darktable, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_conf_get_string_const(), dt_imageio_get_storage_by_name(), FALSE, darktable_t::imageio, dt_imageio_t::plugins_format, and TRUE.
Referenced by set_storage_by_name().
|
static |
References _set_dimensions(), CONFIG_PREFIX, d, dt_conf_get_int(), height, and width.
Referenced by _update_dimensions().
|
static |
References _width_changed(), CONFIG_PREFIX, and dt_conf_set_int().
Referenced by gui_init().
|
static |
References CONFIG_PREFIX, d, darktable, dt_conf_set_int(), darktable_t::gui, dt_gui_gtk_t::reset, and width.
Referenced by _widht_mdlclick(), and gui_init().
|
inlinestatic |
References INCH_TO_CM, and dt_lib_export_t::print_dpi.
Referenced by print2pixels().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
References DT_UI_CONTAINER_SIZE.
| char * dt_lib_export_metadata_configuration_dialog | ( | char * | list, |
| const gboolean | ondisk | ||
| ) |
References _add_tag_button_clicked(), _delete_tag_button_clicked(), _formula_edited(), _formula_editing_started(), _key_press_on_list(), _tags_toggled(), d, darktable, dt_exif_get_exiv2_taglist(), dt_free, dt_free_gpointer(), 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_ui_main_window(), dt_util_dstrcat(), dt_util_str_to_glist(), dtgtk_button_new(), dtgtk_cairo_paint_minus_simple(), dtgtk_cairo_paint_plus_simple(), FALSE, flags, darktable_t::gui, TRUE, dt_gui_gtk_t::ui, and view().
Referenced by _menuitem_preferences().
| void * get_params | ( | dt_lib_module_t * | self, |
| int * | size | ||
| ) |
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, 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 | ) |
References _collection_updated_callback(), _export_presets_stmt, _image_selection_changed_callback(), _lib_export_styles_changed_callback(), _on_storage_list_changed(), d, darktable, dt_lib_module_t::data, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, dt_lib_cancel_postponed_update(), darktable_t::imageio, dt_imageio_t::plugins_format, dt_imageio_t::plugins_storage, and darktable_t::signals.
| void gui_init | ( | dt_lib_module_t * | self | ) |
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(), darktable_t::bauhaus, darktable_t::color_profiles, CONFIG_PREFIX, d, darktable, 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_widget_set_label(), DT_COLORSPACE_FILE, DT_COLORSPACE_NONE, dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string(), dt_conf_get_string_const(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_free, DT_GUI_MODULE, 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_export_metadata_get_conf(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_SIGNAL_COLLECTION_CHANGED, DT_SIGNAL_IMAGEIO_STORAGE_CHANGE, DT_SIGNAL_SELECTION_CHANGED, DT_SIGNAL_STYLE_CHANGED, dt_ui_section_label_new(), FALSE, dt_colorspaces_color_profile_t::filename, darktable_t::imageio, dt_colorspaces_color_profile_t::name, dt_colorspaces_color_profile_t::out_pos, PATH_MAX, dt_imageio_t::plugins_format, dt_imageio_t::plugins_storage, dt_colorspaces_t::profiles, darktable_t::signals, dt_lib_module_t::timeout_handle, tooltip, TRUE, dt_colorspaces_color_profile_t::type, and dt_lib_module_t::widget.
| void gui_reset | ( | dt_lib_module_t * | self | ) |
References _size_update_display(), _update(), darktable_t::color_profiles, CONFIG_PREFIX, d, darktable, dt_lib_module_t::data, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), DT_COLORSPACE_FILE, DT_COLORSPACE_NONE, 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(), FALSE, dt_colorspaces_color_profile_t::filename, dt_colorspaces_color_profile_t::out_pos, dt_colorspaces_t::profiles, and dt_colorspaces_color_profile_t::type.
|
inlinestatic |
References dt_lib_export_t::print_dpi.
Referenced by print2pixels().
| void init_presets | ( | dt_lib_module_t * | self | ) |
References _export_presets_stmt, darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_BLOB, DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), and name.
| 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 | ||
| ) |
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 |
References INCH_TO_CM, and dt_lib_export_t::print_dpi.
Referenced by pixels2print().
|
inlinestatic |
References dt_lib_export_t::print_dpi.
Referenced by pixels2print().
|
inlinestatic |
| int position | ( | ) |
|
inlinestatic |
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 |
References _update_dimensions(), CONFIG_PREFIX, d, darktable, 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(), FALSE, darktable_t::imageio, name, dt_imageio_t::plugins_format, and TRUE.
Referenced by _format_changed(), and set_params().
| int set_params | ( | dt_lib_module_t * | self, |
| const void * | params, | ||
| int | size | ||
| ) |
References _set_dimensions(), darktable_t::color_profiles, d, darktable, dt_lib_module_t::data, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_text(), DT_COLORSPACE_FILE, DT_COLORSPACE_NONE, dt_free, dt_imageio_get_format_by_name(), dt_imageio_get_storage_by_name(), dt_lib_export_metadata_set_conf(), dt_colorspaces_color_profile_t::filename, dt_colorspaces_color_profile_t::out_pos, dt_colorspaces_t::profiles, set_format_by_name(), set_storage_by_name(), size, dt_imageio_module_data_t::style, and dt_colorspaces_color_profile_t::type.
| void set_preferences | ( | void * | menu, |
| dt_lib_module_t * | self | ||
| ) |
References _menuitem_preferences().
|
static |
References _set_dimensions(), _update_formats_combobox(), CONFIG_PREFIX, d, darktable, 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(), FALSE, h, darktable_t::imageio, name, dt_imageio_module_storage_t::plugin_name, and dt_imageio_t::plugins_storage.
Referenced by _storage_changed(), and set_params().
| const char ** views | ( | dt_lib_module_t * | self | ) |
References v.
|
static |
Referenced by gui_cleanup(), and init_presets().