98#ifdef GDK_WINDOWING_QUARTZ
102#include <glib/gi18n.h>
104#include <pango/pangocairo.h>
111#define DECORATION_SIZE_LIMIT 40
128 for(GList *iter = vm->
views; iter; iter = g_list_next(iter))
153 static const char *view_order[] = {
"lighttable",
"darkroom"};
154 static const int n_view_order = G_N_ELEMENTS(view_order);
158 const char *aname = av->name(av);
159 const char *bname = bv->name(bv);
160 int apos = n_view_order;
161 int bpos = n_view_order;
163 for(
int i = 0;
i < n_view_order;
i++)
170 const int order = apos - bpos;
171 return order ? order : strcmp(aname, bname);
189 g_strlcpy(module->module_name, module_name,
sizeof(module->module_name));
191#define INCLUDE_API_FROM_MODULE_LOAD "view_load_module"
195 module->vscroll_size = module->vscroll_viewport_size = 1.0;
196 module->hscroll_size = module->hscroll_viewport_size = 1.0;
197 module->vscroll_pos = module->hscroll_pos = 0.0;
198 module->height = module->width = 100;
200 if(module->init)
module->init(module);
210 if(
view->module) g_module_close(
view->module);
215 if(GTK_IS_CONTAINER(data))
216 gtk_container_remove(GTK_CONTAINER(data), widget);
229 if(GTK_IS_CONTAINER(evb))
231 gtk_widget_destroy(child);
241 gboolean switching_to_none = *view_name ==
'\0';
244 if(!switching_to_none)
246 for(GList *iter = vm->
views; iter; iter = g_list_next(iter))
249 if(!strcmp(
v->module_name, view_name))
290 if(old_view->leave) old_view->leave(old_view);
300 if(plugin->view_leave) plugin->view_leave(plugin, old_view, NULL);
301 plugin->gui_cleanup(plugin);
320 if(new_view->try_enter)
322 const int error = new_view->try_enter(new_view);
334 if(old_view->leave) old_view->leave(old_view);
344 if(plugin->view_leave) plugin->view_leave(plugin, old_view, new_view);
361 for(GList *iter = g_list_last(
dt_lib_get_global()->plugins); iter; iter = g_list_previous(iter))
399 gboolean expanded =
FALSE;
401 if(plugin->expandable(plugin))
413 gtk_widget_show_all(plugin->
widget);
415 gtk_widget_hide(plugin->
widget);
417 if(plugin->view_enter) plugin->view_enter(plugin, old_view, new_view);
423 if(new_view->enter) new_view->enter(new_view);
456 int32_t pointerx, int32_t pointery)
474 float px = pointerx, py = pointery;
484 for(
const GList *plugins = g_list_last(
dt_lib_get_global()->plugins); plugins; plugins = g_list_previous(plugins))
489 if(plugin->gui_post_expose
508 gboolean handled =
FALSE;
511 plugins = g_list_previous(plugins))
517 if(plugin->mouse_leave(plugin)) handled =
TRUE;
521 if(!handled &&
v->mouse_leave)
v->mouse_leave(
v);
536 gboolean handled =
FALSE;
539 plugins = g_list_previous(plugins))
545 if(plugin->mouse_moved(plugin,
x, y, pressure, which)) handled =
TRUE;
549 if(!handled &&
v->mouse_moved)
v->mouse_moved(
v,
x, y, pressure, which);
558 gboolean handled =
FALSE;
561 plugins = g_list_previous(plugins))
567 if(plugin->key_pressed(plugin, event)) handled =
TRUE;
573 else if(
v->key_pressed)
574 handled =
v->key_pressed(
v, event);
585 gboolean handled =
FALSE;
588 plugins = g_list_previous(plugins))
594 if(plugin->button_released(plugin,
x, y, which,
state)) handled =
TRUE;
600 else if(
v->button_released)
601 v->button_released(
v,
x, y, which,
state);
617 gboolean handled =
FALSE;
621 plugins = g_list_previous(plugins))
627 if(plugin->button_pressed(plugin,
x, y, pressure, which,
type,
state)) handled =
TRUE;
630 if(handled)
return 1;
632 else if(
v->button_pressed)
633 return v->button_pressed(
v,
x, y, pressure, which,
type,
state);
640 for(GList *iter = vm->
views; iter; iter = g_list_next(iter))
681 cairo_surface_t **surface,
int zoom,
686 if(surface && *surface && cairo_surface_get_reference_count(*surface) > 0)
687 cairo_surface_destroy(*surface);
688 if(surface) *surface = NULL;
692 const int32_t imgid,
const int width,
const int height,
const int zoom)
701 params->fetcher = fetcher;
727 gboolean queue_redraw =
FALSE;
728 gboolean enqueue_next =
FALSE;
732 pthread_cond_broadcast(&fetcher->
cond);
763 gtk_widget_queue_draw(widget);
764 GdkWindow *
window = gtk_widget_get_window(widget);
767 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
769 G_GNUC_END_IGNORE_DEPRECATIONS
772 g_object_unref(widget);
785 return G_SOURCE_REMOVE;
796 if(stale || cancelled)
808 pthread_cond_broadcast(&fetcher->
cond);
814 cairo_surface_t *surface = NULL;
832 pthread_cond_broadcast(&fetcher->
cond);
837 g_main_context_wakeup(g_main_context_default());
845 pthread_cond_init(&fetcher->
cond, NULL);
867 g_main_context_iteration(g_main_context_default(),
TRUE);
872 pthread_cond_destroy(&fetcher->
cond);
907 const gboolean changed = fetcher->
target != target || fetcher->
imgid != imgid || fetcher->
width !=
width
910 const gboolean fallback_match = target && *target && fetcher->
cached_imgid == imgid
913 fetcher->
imgid = imgid;
916 fetcher->
zoom = zoom;
919 if(exact_match || fallback_match)
928 else if(changed && !exact_match && !fetcher->
destroying)
940 if(!src || dst_w <= 0 || dst_h <= 0)
943 const int src_w = cairo_image_surface_get_width(src);
944 const int src_h = cairo_image_surface_get_height(src);
946 cairo_surface_t *dst =
947 cairo_image_surface_create(CAIRO_FORMAT_RGB24, dst_w, dst_h);
949 cairo_t *cr = cairo_create(dst);
952 cairo_set_source_rgba(cr, 0, 0, 0, 0);
955 double scale_x = (
double)dst_w / src_w;
956 double scale_y = (
double)dst_h / src_h;
964 double s =
MIN(scale_x, scale_y);
967 tx = (dst_w - src_w * s) * 0.5;
968 ty = (dst_h - src_h * s) * 0.5;
971 cairo_translate(cr, tx, ty);
972 cairo_scale(cr, sx, sy);
974 cairo_set_source_surface(cr, src, 0, 0);
976 cairo_pattern_t *pat = cairo_get_source(cr);
977 cairo_pattern_set_filter(pat, CAIRO_FILTER_BEST);
978 cairo_pattern_set_extend(pat, CAIRO_EXTEND_PAD);
991 cairo_surface_flush(surface);
993 unsigned char *data = cairo_image_surface_get_data(surface);
994 int width = cairo_image_surface_get_width(surface);
995 int height = cairo_image_surface_get_height(surface);
996 int stride = cairo_image_surface_get_stride(surface);
1003 const float k_center = 4.0f;
1004 const float k_edge = -0.5f;
1005 const float k_corner = -0.25f;
1008 const float amount = 0.05f;
1009 const float amount_inv = 1.f - amount;
1012 for(
int y = 1; y <
height - 1; y++)
1015 int idx = y * stride +
x * 4;
1017 for(
int c = 0; c < 3; c++)
1032 copy[
i - stride - 4] +
1033 copy[
i - stride + 4] +
1034 copy[
i + stride - 4] +
1035 copy[
i + stride + 4]
1039 const float out = amount_inv *
copy[
i] + amount *
v;
1040 data[
i] = (
unsigned char)(CLAMP(roundf(
out), 0.f, 255.f));
1043 data[idx + 3] =
copy[idx + 3];
1047 cairo_surface_mark_dirty(surface);
1069 cairo_surface_t **surface,
int zoom,
1079 if(*surface && cairo_surface_get_reference_count(*surface) > 0)
1080 cairo_surface_destroy(*surface);
1094 const int full_width = image->
width;
1095 const int full_height = image->
height;
1121 const int buf_wd = buf.
width;
1122 const int buf_ht = buf.
height;
1132 _(
"Not enough memory to display the thumbnail.\n"
1133 "Close other applications or add more RAM to your system."),
1134 path[0] ? path : NULL);
1148 int img_width = buf_wd;
1149 int img_height = buf_ht;
1154 img_width = roundf(buf_wd * scale);
1155 img_height = roundf(buf_ht * scale);
1158 scale = fmaxf((
float)img_width / (
float)buf_wd, (
float)img_height / (
float)buf_ht);
1165 img_width = roundf(buf_wd * scale);
1166 img_height = roundf(buf_ht * scale);
1169 *surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, img_width, img_height);
1172 uint8_t *rgbbuf = (uint8_t *)calloc((
size_t)buf_wd * buf_ht * 4,
sizeof(uint8_t));
1186 const int32_t stride = cairo_format_stride_for_width(CAIRO_FORMAT_RGB24, buf_wd);
1187 cairo_surface_t *tmp_surface = cairo_image_surface_create_for_data(rgbbuf, CAIRO_FORMAT_RGB24, buf_wd, buf_ht, stride);
1195 cairo_t *cr = cairo_create(*surface);
1196 cairo_scale(cr, scale, scale);
1197 cairo_set_source_surface(cr, tmp_surface, 0, 0);
1203 if((buf_wd <= 8 && buf_ht <= 8)
1204 || fabsf(scale - 1.0f) < 0.01f
1206 cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_NEAREST);
1208 cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_BEST);
1211 cairo_surface_destroy(tmp_surface);
1216 cairo_identity_matrix(cr);
1217 PangoLayout *layout = pango_cairo_create_layout(cr);
1219 PangoFontDescription *desc = pango_font_description_from_string(
"sans bold");
1220 pango_font_description_set_absolute_size(desc,
DT_UI_SCALE_DEVICE(12) * PANGO_SCALE);
1221 pango_layout_set_font_description(layout, desc);
1222 pango_font_description_free(desc);
1224 pango_layout_set_width(layout, img_width * PANGO_SCALE);
1225 pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
1226 pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
1230 pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
1231 pango_layout_set_height(layout, img_height / 2 * PANGO_SCALE);
1234 pango_layout_get_pixel_size(layout, NULL, &text_h);
1237 cairo_rectangle(cr, 0., img_height - band_h, img_width, band_h);
1238 cairo_set_source_rgba(cr, 0., 0., 0., 0.7);
1240 cairo_set_source_rgb(cr, 1., 1., 1.);
1241 cairo_move_to(cr, 0., img_height - (band_h + text_h) / 2.);
1242 pango_cairo_show_layout(cr, layout);
1243 g_object_unref(layout);
1254 if(buf_wd <= 8 && buf_ht <= 8)
1270 "[dt_view_image_get_surface] id %i, mip code %i, dots %ix%i, mip %ix%i, surf %ix%i created in %0.04f sec\n",
1275 dt_print(
DT_DEBUG_IMAGEIO,
"[dt_view_image_get_surface] id %i, mip code %i, dots %ix%i, mip %ix%i, surf %ix%i\n", imgid, mip,
1276 width,
height, buf_wd, buf_ht, img_width, img_height);
1293 char* upcase = g_ascii_strup(
name, -1);
1295 if(0 == g_ascii_strcasecmp(upcase,
"JPG"))
1297 gchar* canonical = g_strdup(
"JPEG");
1301 else if(0 == g_ascii_strcasecmp(upcase,
"HDR"))
1303 gchar* canonical = g_strdup(
"RGBE");
1307 else if(0 == g_ascii_strcasecmp(upcase,
"TIF"))
1309 gchar* canonical = g_strdup(
"TIFF");
1316 gchar* fullname = g_strdup_printf(
"%s HDR", upcase);
1322 gchar* fullname = g_strdup_printf(
"%s B&W", upcase);
1327 fullname = g_strdup_printf(
"%s-", upcase);
1358 GList *link = g_list_find(vm->
active_images, GINT_TO_POINTER(imgid));
1485 g_spawn_close_pid(pid);
1491 if(player && *player)
1496 char *argv[] = { player, filename, NULL };
1497 gboolean ret = g_spawn_async(NULL, argv, NULL,
1498 G_SPAWN_DO_NOT_REAP_CHILD
1499 | G_SPAWN_SEARCH_PATH
1500 | G_SPAWN_STDOUT_TO_DEV_NULL
1501 | G_SPAWN_STDERR_TO_DEV_NULL,
1554 char input_dir[512] = { 0 };
1555 gboolean from_cache =
TRUE;
GtkWidget * dt_gui_main_window(void)
void dt_ui_container_foreach(dt_ui_t *ui, const dt_ui_container_t c, GtkCallback callback)
calls a callback on all children widgets from container
void dt_ui_container_destroy_children(dt_ui_t *ui, const dt_ui_container_t c)
destroy all child widgets from container
struct dt_ui_t * dt_gui_get_ui(void)
GtkWidget * dt_gui_center_widget(void)
void dt_gui_add_help_link(GtkWidget *widget, char *link)
static void error(char *msg)
void dt_atomic_set_int(dt_atomic_int *var, int value)
uint32_t container(dt_lib_module_t *self)
const char ** views(dt_lib_module_t *self)
gboolean dt_colorprofiles_rgba8_to_display_bgra8(const uint8_t *const in, uint8_t *const out, const int width, const int height, const dt_colorspaces_color_profile_type_t src_space)
Convert a whole 8-bit plane from src_space to the display profile: packed RGBA8 in,...
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
int dt_conf_get_bool(const char *name)
gchar * dt_conf_get_string(const char *name)
Read the stored string for name as a private copy.
char * dt_image_get_audio_path(const int32_t imgid)
void dt_image_full_path(const int32_t imgid, char *pathname, size_t pathname_len, gboolean *from_cache, const char *calling_func)
Get the full path of an image out of the database.
void dt_control_alert_once(const char *title, const char *message, const char *item)
dt_control_alert() for a failure that repeats as long as its cause lasts – memory running short,...
void dt_control_queue_redraw_center()
Request a redraw of the centre view.
#define dt_control_change_cursor(cursor)
struct dt_control_t * dt_control_get_global(void)
struct dt_lib_t * dt_lib_get_global(void)
struct dt_view_manager_t * dt_view_manager_get_global(void)
void * dt_alloc_align(size_t size)
Allocate cacheline-aligned memory.
struct dt_gui_gtk_t * dt_gui_get_global(void)
GtkWidget * view
the tree view
static int dt_pthread_mutex_unlock(dt_pthread_mutex_t *mutex) RELEASE(mutex) NO_THREAD_SAFETY_ANALYSIS
static int dt_pthread_mutex_init(dt_pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr)
Initialise a mutex. With mutexattr NULL – which is how 54 of the 56 call sites in this tree spell it ...
static int dt_pthread_mutex_destroy(dt_pthread_mutex_t *mutex)
static int dt_pthread_cond_wait(pthread_cond_t *cond, dt_pthread_mutex_t *mutex)
Wait on cond, releasing mutex for the duration.
static int dt_pthread_mutex_lock(dt_pthread_mutex_t *mutex) ACQUIRE(mutex) NO_THREAD_SAFETY_ANALYSIS
GtkWidget * dtgtk_expander_get_body_event_box(GtkDarktableExpander *expander)
GtkWidget * dtgtk_expander_get_body(GtkDarktableExpander *expander)
#define DTGTK_EXPANDER(obj)
#define DTGTK_IS_EXPANDER(obj)
dt_imageio_retval_t
Return value of image io functions: loading, exporting, and making a thumbnail.
@ DT_IMAGEIO_UNSUPPORTED_FEATURE
@ DT_IMAGEIO_FILE_CORRUPTED
@ DT_IMAGEIO_PROCESSING_FAILED
@ DT_IMAGEIO_NO_EMBEDDED_THUMBNAIL
@ DT_IMAGEIO_UNSUPPORTED_FORMAT
@ DT_IMAGEIO_FILE_NOT_FOUND
@ DT_IMAGEIO_UNSUPPORTED_CAMERA
dt_image_t * dt_image_cache_get(const int32_t imgid, char mode)
void dt_image_cache_read_release(const dt_image_t *img)
dt_job_state_t dt_control_job_get_state(_dt_job_t *job)
dt_job_t * dt_control_job_create(dt_job_execute_callback execute, const char *msg,...)
int dt_control_add_job(dt_control_t *control, dt_job_queue_t queue_id, _dt_job_t *job)
void * dt_control_job_get_params(const _dt_job_t *job)
void dt_control_job_set_params_with_size(dt_job_t *job, void *params, size_t params_size, dt_job_destroy_callback callback)
static const dt_iop_drawlayer_params_t * params
gboolean dt_lib_is_visible_in_view(dt_lib_module_t *module, const dt_view_t *view)
gboolean dt_lib_is_visible(dt_lib_module_t *module)
void dt_lib_gui_set_expanded(dt_lib_module_t *module, gboolean expanded)
void dt_lib_set_visible(dt_lib_module_t *module, gboolean visible)
GtkWidget * dt_lib_gui_get_expander(dt_lib_module_t *module)
_lib_location_type_t type
int32_t dt_get_debug_flags(void)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
#define dt_free_align(ptr)
Release memory from dt_alloc_align() and set ptr to NULL.
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
dt_imageio_retval_t status
dt_mipmap_size_t dt_mipmap_cache_get_matching_size(const int32_t width, const int32_t height, const uint32_t imgid)
#define dt_mipmap_cache_get_with_shutdown(B, C, D, E, F, G)
#define dt_mipmap_cache_release(B)
GList * dt_module_load_modules(const char *subdir, size_t module_size, int(*load_module_so)(void *module, const char *libname, const char *plugin_name), void(*init_module)(void *module), gint(*sort_modules)(gconstpointer a, gconstpointer b))
Load every module the given directory's manifest lists.
#define __OMP_PARALLEL_FOR__(...)
#define DT_PATH_MAX
Buffer size for a filesystem path anywhere in Ansel.
void copy(TYPE *dest, TYPE *source, size_t num_el)
Copy a flat buffer used to initialize test matrices.
void dt_sentry_record_module_usage(const char *category, const char *name)
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ DT_SIGNAL_ACTIVE_IMAGES_CHANGE
This signal is raised when image shown in the main view change no param, no returned value.
@ DT_SIGNAL_CONTROL_TOAST_REDRAW
This signal is raised when dt_control_toast_redraw() is called. no param, no returned value.
@ DT_SIGNAL_VIEWMANAGER_VIEW_CANNOT_CHANGE
This signal is raised by viewmanager when a view has changed. 1 : dt_view_t * the old view 2 : dt_vie...
@ DT_SIGNAL_CONTROL_LOG_REDRAW
This signal is raised when dt_control_log_redraw() is called. no param, no returned value.
@ DT_SIGNAL_VIEWMANAGER_VIEW_CHANGED
This signal is raised by viewmanager when a view has changed. 1 : dt_view_t * the old view 2 : dt_vie...
char * dt_variables_expand(dt_variables_params_t *params, gchar *source, gboolean iterate)
void dt_variables_params_destroy(dt_variables_params_t *params)
void dt_variables_params_init(dt_variables_params_t **params)
const float uint32_t state[4]
dt_colorspaces_color_profile_type_t color_space
dt_cache_entry_t * cache_entry
NULL with a non-NULL buf when a blocking get could not allocate the thumbnail's entry: buf is then a ...
dt_imageio_retval_t status
Why the entry holds no image: a thumbnail drawn as a skull, or a full-size input with no pixels....
Track one asynchronous Cairo surface fetch request for a GUI widget.
cairo_surface_t ** target
guint audio_player_event_source
struct dt_view_manager_t::@61 proxy
struct dt_view_manager_t::@61::@65 map
GObject *(* add_marker)(const dt_view_t *view, dt_geo_map_display_t type, GList *points)
gboolean(* redraw)(gpointer user_data)
void(* center_on_location)(const dt_view_t *view, gdouble lon, gdouble lat, double zoom)
gboolean(* remove_marker)(const dt_view_t *view, dt_geo_map_display_t type, GObject *marker)
struct dt_view_manager_t::@61::@62 module_toolbox
dt_darkroom_layout_t(* get_layout)(struct dt_view_t *view)
void(* print_settings)(const dt_view_t *view, dt_print_info_t *pinfo, dt_images_box *imgs)
void(* add_location)(const dt_view_t *view, dt_map_location_data_t *p, const guint posid)
void(* location_action)(const dt_view_t *view, const int action)
void(* set_map_source)(const dt_view_t *view, OsmGpsMapSource_t map_source)
struct dt_view_manager_t::@60 audio
struct dt_view_manager_t::@61::@66 print
struct dt_view_manager_t::@61::@64 darkroom
struct dt_lib_module_t *void(* add)(struct dt_lib_module_t *, GtkWidget *, dt_view_type_flags_t)
void(* show_osd)(const dt_view_t *view)
void(* center_on_bbox)(const dt_view_t *view, gdouble lon1, gdouble lat1, gdouble lon2, gdouble lat2)
dt_view_image_surface_fetcher_t * fetcher
cairo_surface_t * surface
dt_view_surface_value_t result
dt_view_image_surface_fetcher_t * fetcher
void dt_supervisor_thumbnail(const dt_sv_op_t op, const int32_t imgid, const int width, const int height, const int mip, const gboolean success)
static gboolean dt_supervisor_active(void)
void dt_telemetry_record_module_usage(const char *category, const char *name)
typedef double((*spd)(unsigned long int wavelength, double TempK))
A widget to manage and display image thumbnails in Ansel's lighttable and filmstrip views.
@ DT_THUMBTABLE_ZOOM_TWICE
@ DT_THUMBTABLE_ZOOM_FULL
@ DT_THUMBTABLE_ZOOM_HALF
static double dt_get_wtime(void)
void dt_undo_clear(dt_undo_t *self, uint32_t filter)
dt_undo_t * dt_undo_get_global(void)
Telling the user something happened.
char * dt_get_help_url(char *name)
void dt_view_image_surface_fetcher_invalidate(dt_view_image_surface_fetcher_t *fetcher, cairo_surface_t **target)
void dt_view_manager_cleanup(dt_view_manager_t *vm)
void dt_view_image_surface_fetcher_cleanup(dt_view_image_surface_fetcher_t *fetcher)
static int dt_view_load_module(void *v, const char *libname, const char *module_name)
void dt_view_manager_mouse_moved(dt_view_manager_t *vm, double x, double y, double pressure, int which)
const char * dt_view_manager_name(dt_view_manager_t *vm)
void dt_view_map_center_on_location(const dt_view_manager_t *vm, gdouble lon, gdouble lat, gdouble zoom)
void dt_view_manager_mouse_enter(dt_view_manager_t *vm)
void dt_view_manager_configure(dt_view_manager_t *vm, int width, int height)
void dt_view_manager_reset(dt_view_manager_t *vm)
static void _enqueue_surface_fetch(dt_view_image_surface_fetcher_t *fetcher)
void dt_view_image_surface_fetcher_init(dt_view_image_surface_fetcher_t *fetcher)
void dt_view_map_location_action(const dt_view_manager_t *vm, const int action)
cairo_surface_t * dt_cairo_rescale_surface(cairo_surface_t *src, int dst_w, int dst_h)
void dt_view_map_redraw(const dt_view_manager_t *vm)
void dt_cairo_sharpen_surface_rgb24(cairo_surface_t *surface)
static void _destroy_surface(cairo_surface_t **surface)
static void dt_view_unload_module(dt_view_t *view)
gboolean dt_view_active_images_has_imgid(int32_t imgid)
GObject * dt_view_map_add_marker(const dt_view_manager_t *vm, dt_geo_map_display_t type, GList *points)
int dt_view_manager_button_released(dt_view_manager_t *vm, double x, double y, int which, uint32_t state)
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)
void dt_view_map_show_osd(const dt_view_manager_t *vm)
int dt_view_manager_key_pressed(dt_view_manager_t *vm, GdkEventKey *event)
dt_view_surface_value_t dt_view_image_get_surface_async(dt_view_image_surface_fetcher_t *fetcher, int32_t imgid, int width, int height, cairo_surface_t **target, GtkWidget *widget, int zoom)
void dt_view_audio_start(dt_view_manager_t *vm, int32_t imgid)
void dt_view_manager_module_toolbox_add(dt_view_manager_t *vm, GtkWidget *tool, dt_view_type_flags_t views)
void dt_view_active_images_add(int32_t imgid, gboolean raise)
void dt_view_manager_init(dt_view_manager_t *vm)
void dt_view_active_images_reset(gboolean raise)
void dt_view_active_images_remove(int32_t imgid, gboolean raise)
int dt_view_manager_button_pressed(dt_view_manager_t *vm, double x, double y, double pressure, int which, int type, uint32_t state)
uint32_t dt_view_manager_current_flags(const dt_view_manager_t *vm)
GList * dt_view_active_images_get_all()
static gboolean _view_surface_commit_main(gpointer user_data)
void dt_view_manager_gui_init(dt_view_manager_t *vm)
static const char *const _skull_labels[]
void dt_vm_remove_child(GtkWidget *widget, gpointer data)
static void _remove_child(GtkWidget *child, GtkContainer *container)
void dt_view_map_add_location(const dt_view_manager_t *vm, dt_map_location_data_t *p, const guint posid)
void dt_view_print_settings(const dt_view_manager_t *vm, dt_print_info_t *pinfo, dt_images_box *imgs)
void dt_view_audio_stop(dt_view_manager_t *vm)
int dt_view_manager_switch(dt_view_manager_t *vm, const char *view_name)
static dt_view_surface_value_t _view_image_get_surface_internal(int32_t imgid, int width, int height, cairo_surface_t **surface, int zoom, dt_atomic_int *shutdown)
dt_view_surface_value_t dt_view_image_get_surface(int32_t imgid, int width, int height, cairo_surface_t **surface, int zoom)
int dt_view_manager_switch_by_view(dt_view_manager_t *vm, const dt_view_t *nv)
static void dt_view_manager_load_modules(dt_view_manager_t *vm)
static uint32_t default_flags()
static gboolean _view_surface_matches(const dt_view_image_surface_fetcher_t *fetcher, cairo_surface_t **target, const int32_t imgid, const int width, const int height, const int zoom)
void dt_view_map_center_on_bbox(const dt_view_manager_t *vm, gdouble lon1, gdouble lat1, gdouble lon2, gdouble lat2)
static int32_t _view_surface_fetch_job_run(dt_job_t *job)
int dt_view_manager_scrolled(dt_view_manager_t *vm, double x, double y, int up, int state, int delta_y)
void dt_view_map_set_map_source(const dt_view_manager_t *vm, OsmGpsMapSource_t map_source)
void dt_view_image_info_update(int32_t imgid)
void dt_view_manager_mouse_leave(dt_view_manager_t *vm)
static gint sort_views(gconstpointer a, gconstpointer b)
void dt_view_active_images_set(GList *images, gboolean raise)
int32_t dt_view_active_images_get_first()
gboolean dt_view_map_remove_marker(const dt_view_manager_t *vm, dt_geo_map_display_t type, GObject *marker)
dt_darkroom_layout_t dt_view_darkroom_get_layout(dt_view_manager_t *vm)
static void _audio_child_watch(GPid pid, gint status, gpointer data)
const dt_view_t * dt_view_manager_get_current_view(dt_view_manager_t *vm)
char * dt_view_extend_modes_str(const char *name, const gboolean is_hdr, const gboolean is_bw, const gboolean is_bw_flow)
@ DT_DARKROOM_LAYOUT_EDITING
void dt_ui_cleanup_main_table(dt_ui_t *ui)
void dt_ui_restore_panels(dt_ui_t *ui)
void dt_ui_set_image_info_label(dt_ui_t *ui, const char *label)
void dt_ui_container_add_widget(dt_ui_t *ui, const dt_ui_container_t c, GtkWidget *w)