![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/act_on.h"
#include "common/history.h"
#include "common/image.h"
#include <cairo.h>
#include <gmodule.h>
#include <gui/gtk.h>
#include <inttypes.h>
#include <sqlite3.h>
#include "views/view_api.h"
Go to the source code of this file.
Data Structures | |
struct | dt_view_t |
struct | dt_view_manager_t |
Macros | |
#define | DT_VIEW_ALL |
#define | DT_LIGHTTABLE_MAX_ZOOM 12 |
#define | INCLUDE_API_FROM_MODULE_H |
Typedefs | |
typedef enum dt_view_flags_t | dt_view_flags_t |
typedef enum dt_darkroom_layout_t | dt_darkroom_layout_t |
typedef enum dt_view_surface_value_t | dt_view_surface_value_t |
typedef struct dt_view_t | dt_view_t |
typedef enum dt_view_image_over_t | dt_view_image_over_t |
typedef struct dt_view_manager_t | dt_view_manager_t |
Enumerations | |
enum | dt_view_type_flags_t { DT_VIEW_LIGHTTABLE = 1 << 0 , DT_VIEW_DARKROOM = 1 << 2 , DT_VIEW_MAP = 1 << 3 , DT_VIEW_SLIDESHOW = 1 << 4 , DT_VIEW_PRINT = 1 << 5 } |
enum | dt_view_flags_t { VIEW_FLAGS_NONE = 0 , VIEW_FLAGS_HIDDEN = 1 << 0 } |
enum | dt_darkroom_layout_t { DT_DARKROOM_LAYOUT_FIRST = -1 , DT_DARKROOM_LAYOUT_EDITING = 0 , DT_DARKROOM_LAYOUT_COLOR_ASSESMENT = 1 , DT_DARKROOM_LAYOUT_LAST = 3 } |
enum | dt_view_surface_value_t { DT_VIEW_SURFACE_OK = 0 , DT_VIEW_SURFACE_KO } |
enum | dt_view_image_over_t { DT_VIEW_ERR = -1 , DT_VIEW_DESERT = 0 , DT_VIEW_STAR_1 = 1 , DT_VIEW_STAR_2 = 2 , DT_VIEW_STAR_3 = 3 , DT_VIEW_STAR_4 = 4 , DT_VIEW_STAR_5 = 5 , DT_VIEW_REJECT = 6 , DT_VIEW_GROUP = 7 , DT_VIEW_AUDIO = 8 , DT_VIEW_ALTERED = 9 , DT_VIEW_END = 10 } |
#define DT_LIGHTTABLE_MAX_ZOOM 12 |
#define DT_VIEW_ALL |
#define INCLUDE_API_FROM_MODULE_H |
typedef enum dt_darkroom_layout_t dt_darkroom_layout_t |
typedef enum dt_view_flags_t dt_view_flags_t |
typedef enum dt_view_image_over_t dt_view_image_over_t |
typedef struct dt_view_manager_t dt_view_manager_t |
holds all relevant data needed to manage the view modules.
typedef enum dt_view_surface_value_t dt_view_surface_value_t |
enum dt_darkroom_layout_t |
enum dt_view_flags_t |
enum dt_view_image_over_t |
enum dt_view_type_flags_t |
available views flags, a view should return its type and is also used in modules flags available in src/libs to control which view the module should be available in also which placement in the panels the module have.
Enumerator | |
---|---|
DT_VIEW_LIGHTTABLE | |
DT_VIEW_DARKROOM | |
DT_VIEW_MAP | |
DT_VIEW_SLIDESHOW | |
DT_VIEW_PRINT |
void dt_view_active_images_add | ( | int32_t | imgid, |
gboolean | raise | ||
) |
References dt_view_manager_t::active_images, darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_ACTIVE_IMAGES_CHANGE, darktable_t::signals, and darktable_t::view_manager.
Referenced by _film_strip_activated(), and enter().
GList * dt_view_active_images_get_all | ( | ) |
References dt_view_manager_t::active_images, darktable, and darktable_t::view_manager.
Referenced by dt_act_on_get_images(), dt_act_on_get_images_nb(), and dt_view_active_images_has_imgid().
int32_t dt_view_active_images_get_first | ( | ) |
References dt_view_manager_t::active_images, darktable, and darktable_t::view_manager.
Referenced by dt_act_on_get_first_image(), dt_act_on_get_images(), dt_act_on_get_images_nb(), and leave().
gboolean dt_view_active_images_has_imgid | ( | int32_t | imgid | ) |
References dt_view_active_images_get_all().
Referenced by _add_thumbnail_at_rowid().
void dt_view_active_images_remove | ( | int32_t | imgid, |
gboolean | raise | ||
) |
void dt_view_active_images_reset | ( | gboolean | raise | ) |
References dt_view_manager_t::active_images, darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_ACTIVE_IMAGES_CHANGE, darktable_t::signals, and darktable_t::view_manager.
Referenced by _film_strip_activated(), enter(), leave(), and try_enter().
void dt_view_active_images_set | ( | GList * | images, |
gboolean | raise | ||
) |
void dt_view_audio_start | ( | dt_view_manager_t * | vm, |
int32_t | imgid | ||
) |
void dt_view_audio_stop | ( | dt_view_manager_t * | vm | ) |
dt_darkroom_layout_t dt_view_darkroom_get_layout | ( | dt_view_manager_t * | vm | ) |
get the darkroom current layout
References dt_view_manager_t::darkroom, DT_DARKROOM_LAYOUT_EDITING, dt_view_manager_t::get_layout, dt_view_manager_t::proxy, and dt_view_manager_t::view.
Referenced by _conf_get_path(), _get_lib_view_path(), and panels_get_view_path().
char * dt_view_extend_modes_str | ( | const char * | name, |
const gboolean | is_hdr, | ||
const gboolean | is_bw, | ||
const gboolean | is_bw_flow | ||
) |
returns an uppercase string of file extension plus some flag information
References name.
Referenced by _thumb_write_extension().
dt_view_surface_value_t dt_view_image_get_surface | ( | int32_t | imgid, |
int | width, | ||
int | height, | ||
cairo_surface_t ** | surface, | ||
int | zoom | ||
) |
expose an image and return a cair0_surface.
References dt_mipmap_buffer_t::buf, darktable_t::color_profiles, dt_mipmap_buffer_t::color_space, darktable, DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_DISPLAY, DT_COLORSPACE_SRGB, DT_DEBUG_IMAGEIO, DT_DEBUG_LIGHTTABLE, DT_DEBUG_PERF, dt_get_wtime(), dt_image_cache_get(), dt_image_cache_read_release(), DT_MIPMAP_BLOCKING, dt_mipmap_cache_get, dt_mipmap_cache_get_matching_size(), dt_mipmap_cache_release, DT_MIPMAP_F, DT_MIPMAP_NONE, dt_print(), DT_THUMBTABLE_ZOOM_FIT, DT_THUMBTABLE_ZOOM_FULL, DT_THUMBTABLE_ZOOM_HALF, DT_THUMBTABLE_ZOOM_TWICE, DT_VIEW_SURFACE_KO, DT_VIEW_SURFACE_OK, darktable_t::gui, height, dt_image_t::height, dt_mipmap_buffer_t::height, darktable_t::image_cache, darktable_t::mipmap_cache, dt_gui_gtk_t::ppd, transform(), dt_colorspaces_t::transform_adobe_rgb_to_display, dt_colorspaces_t::transform_srgb_to_display, darktable_t::unmuted, width, dt_image_t::width, dt_mipmap_buffer_t::width, and dt_colorspaces_t::xprofile_lock.
Referenced by _get_image_buffer(), _thumb_draw_image(), and gui_post_expose().
void dt_view_image_info_update | ( | const int32_t | imgid | ) |
References darktable, dt_conf_get_string(), dt_image_full_path(), dt_ui_set_image_info_label(), dt_variables_expand(), dt_variables_params_destroy(), dt_variables_params_init(), dt_variables_params_t::escape_markup, dt_variables_params_t::filename, darktable_t::gui, dt_view_manager_t::image_info_id, dt_variables_params_t::imgid, dt_variables_params_t::jobcode, dt_variables_params_t::sequence, TRUE, dt_gui_gtk_t::ui, UNKNOWN_IMAGE, and darktable_t::view_manager.
Referenced by _dt_image_info_changed_callback(), _dt_selection_changed_callback(), and enter().
int dt_view_manager_button_pressed | ( | dt_view_manager_t * | vm, |
double | x, | ||
double | y, | ||
double | pressure, | ||
int | which, | ||
int | type, | ||
uint32_t | state | ||
) |
int dt_view_manager_button_released | ( | dt_view_manager_t * | vm, |
double | x, | ||
double | y, | ||
int | which, | ||
uint32_t | state | ||
) |
References dt_view_manager_t::current_view, darktable, dt_lib_is_visible_in_view(), FALSE, darktable_t::lib, dt_lib_t::plugins, and TRUE.
Referenced by dt_control_button_released().
void dt_view_manager_cleanup | ( | dt_view_manager_t * | vm | ) |
References dt_view_manager_t::active_images, dt_view_unload_module(), and dt_view_manager_t::views.
Referenced by dt_cleanup().
void dt_view_manager_configure | ( | dt_view_manager_t * | vm, |
int | width, | ||
int | height | ||
) |
References dt_view_t::data, height, dt_view_t::height, dt_view_manager_t::views, width, and dt_view_t::width.
Referenced by dt_control_configure(), and dt_gui_gtk_run().
void dt_view_manager_expose | ( | dt_view_manager_t * | vm, |
cairo_t * | cr, | ||
int32_t | width, | ||
int32_t | height, | ||
int32_t | pointerx, | ||
int32_t | pointery | ||
) |
expose current module.
References dt_view_manager_t::current_view, darktable, DT_GUI_COLOR_BG, dt_gui_gtk_set_source_rgb(), dt_lib_is_visible_in_view(), height, dt_view_t::height, darktable_t::lib, dt_lib_t::plugins, width, and dt_view_t::width.
Referenced by dt_control_expose().
const dt_view_t * dt_view_manager_get_current_view | ( | dt_view_manager_t * | vm | ) |
get current view of the view manager.
References dt_view_manager_t::current_view.
Referenced by _conf_get_path(), _current_view_cb(), _export_button_clicked(), _get_lib_view_path(), _is_lighttable(), _lib_plugin_header_button_press(), available_in_lighttable_callback(), configure(), container_wrapper(), dt_collection_load_filmroll(), dt_ctl_reload_view(), dt_ctl_switch_mode_to(), dt_ctl_switch_mode_to_by_view(), dt_dev_undo_end_record(), dt_dev_undo_start_record(), dt_image_flip(), dt_lib_gui_get_expanded(), dt_lib_gui_set_expanded(), dt_multiple_styles_apply_to_list(), dt_styles_apply_to_list(), panels_get_view_path(), position_wrapper(), redo_callback(), redo_sensitive_callback(), register_lib(), undo_callback(), undo_sensitive_callback(), views_active_callback(), and views_sensitive_callback().
void dt_view_manager_gui_init | ( | dt_view_manager_t * | vm | ) |
References dt_view_t::data, view(), and dt_view_manager_t::views.
Referenced by dt_init().
void dt_view_manager_init | ( | dt_view_manager_t * | vm | ) |
int dt_view_manager_key_pressed | ( | dt_view_manager_t * | vm, |
GdkEventKey * | event | ||
) |
References dt_view_manager_t::current_view, darktable, dt_lib_is_visible_in_view(), FALSE, darktable_t::lib, dt_lib_t::plugins, and TRUE.
Referenced by dt_control_key_pressed().
void dt_view_manager_module_toolbox_add | ( | dt_view_manager_t * | vm, |
GtkWidget * | tool, | ||
dt_view_type_flags_t | view | ||
) |
add widget to the current module toolbox
References dt_view_manager_t::add, dt_view_manager_t::module_toolbox, dt_view_manager_t::proxy, and views().
Referenced by gui_init().
void dt_view_manager_mouse_enter | ( | dt_view_manager_t * | vm | ) |
References dt_view_manager_t::current_view.
Referenced by dt_control_mouse_enter().
void dt_view_manager_mouse_leave | ( | dt_view_manager_t * | vm | ) |
References dt_view_manager_t::current_view, darktable, dt_lib_is_visible_in_view(), FALSE, darktable_t::lib, dt_lib_t::plugins, and TRUE.
Referenced by dt_control_mouse_leave().
void dt_view_manager_mouse_moved | ( | dt_view_manager_t * | vm, |
double | x, | ||
double | y, | ||
double | pressure, | ||
int | which | ||
) |
References dt_view_manager_t::current_view, darktable, dt_lib_is_visible_in_view(), FALSE, darktable_t::lib, dt_lib_t::plugins, and TRUE.
Referenced by dt_control_mouse_moved().
const char * dt_view_manager_name | ( | dt_view_manager_t * | vm | ) |
return translated name.
References dt_view_manager_t::current_view, and dt_view_t::module_name.
Referenced by dt_gui_refocus_center().
void dt_view_manager_reset | ( | dt_view_manager_t * | vm | ) |
int dt_view_manager_scrolled | ( | dt_view_manager_t * | vm, |
double | x, | ||
double | y, | ||
int | up, | ||
int | state | ||
) |
References dt_view_manager_t::current_view, and FALSE.
Referenced by _scrolled().
int dt_view_manager_switch | ( | dt_view_manager_t * | vm, |
const char * | view_name | ||
) |
switch to this module. returns non-null if the module fails to change.
References dt_view_t::data, dt_view_manager_switch_by_view(), dt_view_t::module_name, and dt_view_manager_t::views.
Referenced by _dev_change_image(), _dt_ctl_switch_mode_to(), _pop_menu_goto_collection(), and _view_lighttable_activate_callback().
int dt_view_manager_switch_by_view | ( | dt_view_manager_t * | vm, |
const dt_view_t * | new_view | ||
) |
References _remove_child(), dt_view_manager_t::current_view, darktable, dt_lib_module_t::data, dt_conf_get_bool(), dt_control_change_cursor(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_get_help_url(), dt_gui_add_help_link(), dt_lib_gui_get_expander(), dt_lib_gui_set_expanded(), dt_lib_is_visible(), dt_lib_is_visible_in_view(), dt_lib_set_visible(), DT_SIGNAL_CONTROL_LOG_REDRAW, DT_SIGNAL_CONTROL_TOAST_REDRAW, DT_SIGNAL_VIEWMANAGER_VIEW_CANNOT_CHANGE, DT_SIGNAL_VIEWMANAGER_VIEW_CHANGED, dt_ui_cleanup_main_table(), dt_ui_container_add_widget(), dt_ui_container_destroy_children(), dt_ui_container_foreach(), DT_UI_CONTAINER_SIZE, dt_ui_main_window(), dt_ui_restore_panels(), DT_UNDO_ALL, dt_undo_clear(), DT_VIEW_DARKROOM, DT_VIEW_LIGHTTABLE, error(), FALSE, darktable_t::gui, dt_gui_gtk_t::has_scroll_focus, darktable_t::lib, dt_view_t::module_name, dt_lib_module_t::plugin_name, dt_lib_t::plugins, dt_gui_gtk_t::scroll_to, darktable_t::signals, dt_gui_gtk_t::ui, darktable_t::undo, and dt_lib_module_t::widget.
Referenced by _dt_ctl_switch_mode_to_by_view(), dt_view_manager_switch(), and register_lib().