![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "bauhaus/bauhaus.h"#include "common/debug.h"#include "common/file_location.h"#include "common/history.h"#include "common/interpolation.h"#include "common/iop_order.h"#include "common/mipmap_cache.h"#include "control/conf.h"#include "control/control.h"#include "develop/develop.h"#include "develop/dev_history.h"#include "develop/pixelpipe_cache.h"#include "develop/pixelpipe_hb.h"#include "dtgtk/paint.h"#include "gui/color_picker_proxy.h"#include "gui/gtk.h"#include "gui/draw.h"#include "libs/lib.h"#include "libs/lib_api.h"
Include dependency graph for snapshots.c:Go to the source code of this file.
Data Structures | |
| struct | dt_lib_snapshot_t |
| struct | dt_lib_snapshots_t |
Macros | |
| #define | DT_LIB_SNAPSHOTS_COUNT 4 |
| #define | SNAP_LOG(...) dt_print(DT_DEBUG_DEV, __VA_ARGS__) |
| #define | HANDLE_SIZE DT_PIXEL_APPLY_DPI_DPP(36) |
Typedefs | |
| typedef struct dt_lib_snapshot_t | dt_lib_snapshot_t |
| typedef struct dt_lib_snapshots_t | dt_lib_snapshots_t |
Functions | |
| static void | _lib_snapshots_add_button_clicked_callback (GtkWidget *widget, gpointer user_data) |
| static void | _lib_snapshots_toggled_callback (GtkToggleButton *widget, gpointer user_data) |
| static void | _lib_snapshots_delete_button_clicked_callback (GtkWidget *widget, gpointer user_data) |
| static void | _lib_snapshot_reset_fields (dt_lib_snapshot_t *snap) |
| static void | _lib_snapshot_clear_state (dt_lib_snapshot_t *snap) |
| static cairo_surface_t * | _render_snapshot_image (dt_develop_t *frozen, float scale) |
| static int | _lib_snapshot_capture_state (dt_lib_snapshot_t *snapshot, dt_develop_t *source) |
| const char * | name (struct dt_lib_module_t *self) |
| const char ** | views (dt_lib_module_t *self) |
| uint32_t | container (dt_lib_module_t *self) |
| int | position () |
| static void | _snapshot_build_display_image (dt_lib_snapshot_t *snap, float render_scale, float vis_x0, float vis_y0, float vis_x1, float vis_y1) |
| static void | _draw_sym (cairo_t *cr, float x, float y, gboolean vertical, gboolean inverted) |
| void | gui_post_expose (dt_lib_module_t *self, cairo_t *cri, int32_t width, int32_t height, int32_t pointerx, int32_t pointery) |
| int | button_released (struct dt_lib_module_t *self, double x, double y, int which, uint32_t state) |
| int | button_pressed (struct dt_lib_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state) |
| int | mouse_moved (dt_lib_module_t *self, double x, double y, double pressure, int which) |
| void | gui_reset (dt_lib_module_t *self) |
| void | gui_init (dt_lib_module_t *self) |
| void | gui_cleanup (dt_lib_module_t *self) |
Variables | |
| static int | _lib_snapshot_rotation_cnt = 0 |
| #define DT_LIB_SNAPSHOTS_COUNT 4 |
Definition at line 64 of file snapshots.c.
| #define HANDLE_SIZE DT_PIXEL_APPLY_DPI_DPP(36) |
Definition at line 66 of file snapshots.c.
| #define SNAP_LOG | ( | ... | ) | dt_print(DT_DEBUG_DEV, __VA_ARGS__) |
Definition at line 65 of file snapshots.c.
| typedef struct dt_lib_snapshot_t dt_lib_snapshot_t |
| typedef struct dt_lib_snapshots_t dt_lib_snapshots_t |
|
static |
Definition at line 477 of file snapshots.c.
References darktable_t::bauhaus, darktable, dt_draw_set_color_overlay(), DT_PIXEL_APPLY_DPI, FALSE, inv, dt_bauhaus_t::pango_font_desc, and x.
Referenced by gui_post_expose().
|
static |
Definition at line 242 of file snapshots.c.
References _lib_snapshot_clear_state(), _render_snapshot_image(), dt_control_change_cursor_by_name_and_flush(), dt_control_commit_cursor(), dt_dev_cleanup(), dt_dev_create_module_instance(), dt_dev_get_history_end_ext(), dt_dev_get_module_instance(), dt_dev_history_compute_hash(), dt_dev_history_free_history(), dt_dev_init(), dt_dev_load_image(), dt_dev_set_history_end_ext(), dt_dev_set_history_hash(), dt_free, dt_free_gpointer(), dt_history_duplicate(), dt_iop_get_module_by_op_priority(), dt_ioppr_iop_order_copy_deep(), dt_pthread_rwlock_rdlock(), dt_pthread_rwlock_unlock(), FALSE, dt_develop_t::history, dt_lib_snapshot_t::history_end, dt_develop_t::history_mutex, dt_image_t::id, dt_lib_snapshot_t::image, dt_develop_t::image_storage, dt_lib_snapshot_t::imgid, dt_develop_t::iop, dt_develop_t::iop_order_list, IS_NULL_PTR, dt_dev_history_item_t::multi_name, dt_dev_history_item_t::multi_priority, dt_dev_history_item_t::op_name, dt_lib_snapshot_t::sample_scale, and SNAP_LOG.
Referenced by _lib_snapshots_add_button_clicked_callback().
|
static |
Definition at line 130 of file snapshots.c.
References _lib_snapshot_reset_fields(), dt_lib_snapshot_t::display_image, dt_lib_snapshot_t::image, and IS_NULL_PTR.
Referenced by _lib_snapshot_capture_state(), _lib_snapshots_add_button_clicked_callback(), _lib_snapshots_delete_button_clicked_callback(), gui_cleanup(), and gui_reset().
|
static |
Definition at line 119 of file snapshots.c.
References dt_lib_snapshot_t::crop_h, dt_lib_snapshot_t::crop_w, dt_lib_snapshot_t::crop_x, dt_lib_snapshot_t::crop_y, dt_lib_snapshot_t::display_image, dt_lib_snapshot_t::display_scale, dt_lib_snapshot_t::history_end, dt_lib_snapshot_t::image, dt_lib_snapshot_t::imgid, dt_lib_snapshot_t::sample_scale, and UNKNOWN_IMAGE.
Referenced by _lib_snapshot_clear_state(), and _lib_snapshots_delete_button_clicked_callback().
|
static |
Definition at line 872 of file snapshots.c.
References _lib_snapshot_capture_state(), _lib_snapshot_clear_state(), d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_dev_get_history_end_ext(), dt_free, dt_history_item_get_name(), dt_develop_t::history, IS_NULL_PTR, k, name, r, and dt_lib_snapshot_t::row.
Referenced by gui_init().
|
static |
Definition at line 946 of file snapshots.c.
References _lib_snapshot_clear_state(), _lib_snapshot_reset_fields(), d, dt_lib_module_t::data, dt_control_queue_redraw_center(), FALSE, IS_NULL_PTR, k, p, and r.
Referenced by gui_init().
|
static |
Definition at line 996 of file snapshots.c.
References d, dt_lib_module_t::data, dt_control_queue_redraw_center(), FALSE, dt_lib_snapshot_t::image, IS_NULL_PTR, and k.
Referenced by gui_init().
|
static |
Definition at line 140 of file snapshots.c.
References dt_dev_pixelpipe_t::backbuf, dt_mipmap_buffer_t::buf, cleanup(), darktable, darktable_t::develop, dt_dev_backbuf_get_hash(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_cache_ref_entry_by_hash(), dt_dev_pixelpipe_cleanup(), dt_dev_pixelpipe_create_nodes(), dt_dev_pixelpipe_get_roi_out(), dt_dev_pixelpipe_init_preview(), dt_dev_pixelpipe_process(), dt_dev_pixelpipe_propagate_formats(), dt_dev_pixelpipe_set_icc(), dt_dev_pixelpipe_set_input(), dt_dev_pixelpipe_synch_all, DT_MIPMAP_BLOCKING, dt_mipmap_cache_get, dt_mipmap_cache_release, DT_MIPMAP_FULL, dt_pixel_cache_entry_get_size(), DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, darktable_t::gui, dt_mipmap_buffer_t::height, dt_backbuf_t::height, dt_dev_pixelpipe_t::icc_filename, dt_dev_pixelpipe_t::icc_intent, dt_dev_pixelpipe_t::icc_type, dt_image_t::id, dt_dev_pixelpipe_t::iheight, dt_develop_t::image_storage, IS_NULL_PTR, dt_mipmap_buffer_t::iscale, dt_dev_pixelpipe_t::iwidth, MAX, darktable_t::mipmap_cache, darktable_t::pixelpipe_cache, dt_gui_gtk_t::ppd, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processed_height, dt_dev_pixelpipe_t::processed_width, SNAP_LOG, TRUE, dt_mipmap_buffer_t::width, dt_backbuf_t::width, and dt_iop_roi_t::x.
Referenced by _lib_snapshot_capture_state().
|
static |
Definition at line 350 of file snapshots.c.
References dt_lib_snapshot_t::crop_h, dt_lib_snapshot_t::crop_w, dt_lib_snapshot_t::crop_x, dt_lib_snapshot_t::crop_y, darktable, dt_lib_snapshot_t::display_image, dt_lib_snapshot_t::display_scale, dt_alloc_align_float(), dt_free_align, DT_INTERPOLATION_MITCHELL, dt_interpolation_new(), dt_interpolation_resample(), darktable_t::gui, dt_lib_snapshot_t::image, IS_NULL_PTR, MAX, mitchell(), dt_gui_gtk_t::ppd, row, x, and dt_iop_roi_t::x.
Referenced by gui_post_expose().
| int button_pressed | ( | struct dt_lib_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Definition at line 689 of file snapshots.c.
References _lib_snapshot_rotation_cnt, d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_control_queue_redraw_center(), dt_iop_color_picker_is_visible(), TRUE, and x.
| int button_released | ( | struct dt_lib_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | which, | ||
| uint32_t | state | ||
| ) |
Definition at line 669 of file snapshots.c.
References d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_iop_color_picker_is_visible(), FALSE, mouse_moved(), and x.
| uint32_t container | ( | dt_lib_module_t * | self | ) |
Definition at line 335 of file snapshots.c.
References DT_UI_CONTAINER_PANEL_LEFT_CENTER.
| void gui_cleanup | ( | dt_lib_module_t * | self | ) |
Definition at line 861 of file snapshots.c.
References _lib_snapshot_clear_state(), d, dt_lib_module_t::data, dt_free, IS_NULL_PTR, and k.
| void gui_init | ( | dt_lib_module_t * | self | ) |
Definition at line 792 of file snapshots.c.
References _lib_snapshots_add_button_clicked_callback(), _lib_snapshots_delete_button_clicked_callback(), _lib_snapshots_toggled_callback(), d, dt_lib_module_t::data, dt_action_button_new(), DT_GUI_BOX_SPACING, DT_UI_RESIZE_DYNAMIC, dt_ui_scroll_wrap(), FALSE, k, TRUE, and dt_lib_module_t::widget.
| void gui_post_expose | ( | dt_lib_module_t * | self, |
| cairo_t * | cri, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | pointerx, | ||
| int32_t | pointery | ||
| ) |
Definition at line 502 of file snapshots.c.
References _draw_sym(), _snapshot_build_display_image(), dt_lib_snapshot_t::crop_x, dt_lib_snapshot_t::crop_y, d, dt_view_manager_t::darkroom, darktable, dt_lib_module_t::data, darktable_t::develop, dt_lib_snapshot_t::display_image, double(), dt_control_queue_cursor_by_name(), dt_dev_get_image_box_in_widget(), dt_dev_get_zoom_level(), dt_draw_set_color_overlay(), DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_refresh(), FALSE, darktable_t::gui, HANDLE_SIZE, height, dt_lib_snapshot_t::image, IS_NULL_PTR, dt_gui_gtk_t::ppd, dt_view_manager_t::proxy, dt_develop_t::roi, dt_lib_snapshot_t::sample_scale, dt_view_manager_t::set_default_cursor, size, TRUE, view(), dt_view_manager_t::view, darktable_t::view_manager, width, x, dt_develop_t::x, and dt_develop_t::y.
| void gui_reset | ( | dt_lib_module_t * | self | ) |
Definition at line 775 of file snapshots.c.
References _lib_snapshot_clear_state(), d, dt_lib_module_t::data, dt_control_queue_redraw_center(), FALSE, and k.
| int mouse_moved | ( | dt_lib_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Definition at line 738 of file snapshots.c.
References d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_control_queue_redraw_center(), DT_GUI_MOUSE_EFFECT_RADIUS, dt_iop_color_picker_is_visible(), FALSE, HANDLE_SIZE, and x.
Referenced by button_released().
| const char * name | ( | struct dt_lib_module_t * | self | ) |
Definition at line 324 of file snapshots.c.
| int position | ( | ) |
Definition at line 340 of file snapshots.c.
| const char ** views | ( | dt_lib_module_t * | self | ) |
Definition at line 329 of file snapshots.c.
References v.
|
static |
Definition at line 687 of file snapshots.c.
Referenced by button_pressed().