![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/extra_optimizations.h"
#include "views/view.h"
#include "bauhaus/bauhaus.h"
#include "common/collection.h"
#include "common/darktable.h"
#include "common/debug.h"
#include "common/image_cache.h"
#include "common/mipmap_cache.h"
#include "common/module.h"
#include "common/selection.h"
#include "common/undo.h"
#include "common/usermanual_url.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/develop.h"
#include "dtgtk/button.h"
#include "dtgtk/expander.h"
#include "dtgtk/thumbtable.h"
#include "gui/draw.h"
#include "gui/gtk.h"
#include "libs/lib.h"
#include <glib.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "views/view_api.h"
Macros | |
#define | DECORATION_SIZE_LIMIT 40 |
#define | INCLUDE_API_FROM_MODULE_LOAD "view_load_module" |
#define DECORATION_SIZE_LIMIT 40 |
#define INCLUDE_API_FROM_MODULE_LOAD "view_load_module" |
|
static |
References dt_view_manager_t::audio, and dt_view_manager_t::audio_player_id.
Referenced by dt_view_audio_start().
|
static |
References container(), DTGTK_EXPANDER, dtgtk_expander_get_body(), dtgtk_expander_get_body_event_box(), and DTGTK_IS_EXPANDER.
Referenced by dt_view_manager_switch_by_view().
|
static |
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 | ( | 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().
|
static |
load a view module
References darktable, darktable_t::develop, dt_lua_register_view(), and darktable_t::lua_state.
Referenced by dt_view_manager_load_modules().
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().
|
static |
References dt_module_load_modules(), dt_view_load_module(), sort_views(), and dt_view_manager_t::views.
Referenced by dt_view_manager_init().
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 * | nv | ||
) |
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().
void dt_vm_remove_child | ( | GtkWidget * | widget, |
gpointer | data | ||
) |
|
static |
References dt_view_t::module_name.
Referenced by dt_view_manager_load_modules().