Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
print.c
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2014-2015, 2019-2021 Pascal Obry.
4 Copyright (C) 2015 Jérémy Rosen.
5 Copyright (C) 2015-2016 Tobias Ellinghaus.
6 Copyright (C) 2016, 2020 Roman Lebedev.
7 Copyright (C) 2017 Dan Torop.
8 Copyright (C) 2019-2021 Aldric Renaudin.
9 Copyright (C) 2020 Hanno Schwalm.
10 Copyright (C) 2020 Hubert Kowalski.
11 Copyright (C) 2021 luzpaz.
12 Copyright (C) 2021 Ralf Brown.
13 Copyright (C) 2022-2023, 2025 Aurélien PIERRE.
14 Copyright (C) 2022 Martin Bařinka.
15 Copyright (C) 2023 Ricky Moon.
16
17 darktable is free software: you can redistribute it and/or modify
18 it under the terms of the GNU General Public License as published by
19 the Free Software Foundation, either version 3 of the License, or
20 (at your option) any later version.
21
22 darktable is distributed in the hope that it will be useful,
23 but WITHOUT ANY WARRANTY; without even the implied warranty of
24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 GNU General Public License for more details.
26
27 You should have received a copy of the GNU General Public License
28 along with darktable. If not, see <http://www.gnu.org/licenses/>.
29*/
30
32#include "common/collection.h"
33#include "common/cups_print.h"
34#include "common/printing.h"
35#include "common/darktable.h"
36#include "common/debug.h"
37#include "common/image_cache.h"
38#include "common/selection.h"
39#include "control/conf.h"
40#include "control/control.h"
41#include "develop/develop.h"
42#include "dtgtk/thumbtable.h"
43
44#include "gui/drag_and_drop.h"
45#include "gui/gtk.h"
46#include "gui/presets.h"
47#include "views/view.h"
48#include "views/view_api.h"
49
50#include <gdk/gdkkeysyms.h>
51#include <math.h>
52#include <stdlib.h>
53#include <string.h>
54
55DT_MODULE(1)
56
70
71const char *name(const dt_view_t *self)
72{
73 return C_("view", "Print");
74}
75
76uint32_t view(const dt_view_t *self)
77{
78 return DT_VIEW_PRINT;
79}
80
81static void _film_strip_activated(const int32_t imgid, void *data)
82{
83 const dt_view_t *self = (dt_view_t *)data;
84 dt_print_t *prt = (dt_print_t *)self->data;
85
86 prt->last_selected = imgid;
92}
93
94static void _view_print_filmstrip_activate_callback(gpointer instance, int32_t imgid, gpointer user_data)
95{
96 if(imgid > 0) _film_strip_activated(imgid, user_data);
97}
98
99static void _view_print_filmstrip_drag_begin_callback(gpointer instance, int32_t imgid, gpointer user_data)
100{
101 if(imgid <= 0) return;
105}
106
108{
109 dt_print_t *prt = (dt_print_t *)view->data;
110
111 prt->pinfo = pinfo;
112 prt->imgs = imgs ? imgs : &prt->fallback_imgs;
114 prt->imgs->imgid_to_load = prt->pending_imgid;
116 prt->pending_imgid = prt->imgs->imgid_to_load;
118}
119
120static void _drag_and_drop_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y,
121 GtkSelectionData *selection_data, guint target_type, guint time,
122 gpointer data)
123{
124 const dt_view_t *self = (dt_view_t *)data;
125 dt_print_t *prt = (dt_print_t *)self->data;
126
127 const int bidx = dt_printing_get_image_box(prt->imgs, x, y);
128
129 if(bidx != -1)
131 100, 100, ALIGNMENT_CENTER);
132
133 prt->imgs->motion_over = -1;
135}
136
137static gboolean _drag_motion_received(GtkWidget *widget, GdkDragContext *dc,
138 gint x, gint y, guint time,
139 gpointer data)
140{
141 const dt_view_t *self = (dt_view_t *)data;
142 dt_print_t *prt = (dt_print_t *)self->data;
143
144 const int bidx = dt_printing_get_image_box(prt->imgs, x, y);
145 prt->imgs->motion_over = bidx;
146
147 if(bidx != -1) dt_control_queue_redraw_center();
148
149 return TRUE;
150}
151
152void
154{
155 dt_print_t *prt = calloc(1, sizeof(dt_print_t));
156 self->data = prt;
157 prt->imgs = &prt->fallback_imgs;
158 prt->last_selected = -1;
159 prt->pending_imgid = -1;
160 prt->incoming_selection = NULL;
162 for(int k = 0; k < MAX_IMAGE_PER_PAGE; k++)
164
165 /* initialize CB to get the print settings from corresponding lib module */
166 darktable.view_manager->proxy.print.view = self;
167 darktable.view_manager->proxy.print.print_settings = _view_print_settings;
168}
169
171{
172 dt_print_t *prt = (dt_print_t *)self->data;
174 g_list_free(prt->incoming_selection);
175 for(int k = 0; k < MAX_IMAGE_PER_PAGE; k++)
177 dt_free(prt);
178}
179
180static void expose_print_page(dt_view_t *self, cairo_t *cr,
181 int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
182{
183 dt_print_t *prt = (dt_print_t *)self->data;
184
185 if(IS_NULL_PTR(prt->pinfo) || prt->pinfo->printer.resolution <= 0 || prt->pinfo->paper.width <= 0.0f
186 || prt->pinfo->paper.height <= 0.0f || width <= 1 || height <= 1)
187 return;
188
189 float px=.0f, py=.0f, pwidth=.0f, pheight=.0f;
190 float ax=.0f, ay=.0f, awidth=.0f, aheight=.0f;
191
192 gboolean borderless = FALSE;
193
195 &px, &py, &pwidth, &pheight,
196 &ax, &ay, &awidth, &aheight, &borderless);
197
198 // page w/h
199 float pg_width = prt->pinfo->paper.width;
200 float pg_height = prt->pinfo->paper.height;
201
202 // non-printable
203 float np_top = prt->pinfo->printer.hw_margin_top;
204 float np_left = prt->pinfo->printer.hw_margin_left;
205 float np_right = prt->pinfo->printer.hw_margin_right;
206 float np_bottom = prt->pinfo->printer.hw_margin_bottom;
207
208 // handle the landscape mode if needed
209 if(prt->pinfo->page.landscape)
210 {
211 float tmp = pg_width;
212 pg_width = pg_height;
213 pg_height = tmp;
214
215 // rotate the non-printable margins
216 tmp = np_top;
217 np_top = np_right;
218 np_right = np_bottom;
219 np_bottom = np_left;
220 np_left = tmp;
221 }
222
223 const float pright = px + pwidth;
224 const float pbottom = py + pheight;
225
226 // x page -> x display
227 // (x / pg_width) * p_width + p_x
228 cairo_set_source_rgb (cr, 0.9, 0.9, 0.9);
229 cairo_rectangle (cr, px, py, pwidth, pheight);
230 cairo_fill (cr);
231
232 // record the screen page dimension. this will be used to compute the actual
233 // layout of the areas placed over the page.
234
236 px, py, pwidth, pheight,
237 ax, ay, awidth, aheight,
238 borderless);
239
240 // display non-printable area
241 cairo_set_source_rgb (cr, 0.1, 0.1, 0.1);
242
243 const float np1x = px + (np_left / pg_width) * pwidth;
244 const float np1y = py + (np_top / pg_height) * pheight;
245 const float np2x = pright - (np_right / pg_width) * pwidth;
246 const float np2y = pbottom - (np_bottom / pg_height) * pheight;
247
248 // top-left
249 cairo_move_to (cr, np1x-10, np1y);
250 cairo_line_to (cr, np1x, np1y); cairo_line_to (cr, np1x, np1y-10);
251 cairo_stroke (cr);
252
253 // top-right
254 // npy = p_y + (np_top / pg_height) * p_height;
255 cairo_move_to (cr, np2x+10, np1y);
256 cairo_line_to (cr, np2x, np1y); cairo_line_to (cr, np2x, np1y-10);
257 cairo_stroke (cr);
258
259 // bottom-left
260 cairo_move_to (cr, np1x-10, np2y);
261 cairo_line_to (cr, np1x, np2y); cairo_line_to (cr, np1x, np2y+10);
262 cairo_stroke (cr);
263
264 // bottom-right
265 cairo_move_to (cr, np2x+10, np2y);
266 cairo_line_to (cr, np2x, np2y); cairo_line_to (cr, np2x, np2y+10);
267 cairo_stroke (cr);
268
269 // clip to this area to ensure that the image won't be larger,
270 // this is needed when using negative margin to enlarge the print
271
272 cairo_rectangle (cr, np1x, np1y, np2x-np1x, np2y-np1y);
273 cairo_clip(cr);
274
275 cairo_set_source_rgb (cr, 0.77, 0.77, 0.77);
276 cairo_rectangle (cr, ax, ay, awidth, aheight);
277 cairo_fill (cr);
278}
279
281{
282 if(IS_NULL_PTR(prt->pinfo) || IS_NULL_PTR(prt->imgs)) return;
283
284 int32_t imgid = prt->pending_imgid;
285 if(imgid <= UNKNOWN_IMAGE) imgid = prt->imgs->imgid_to_load;
287 if(imgid <= UNKNOWN_IMAGE) imgid = dt_view_active_images_get_first();
288
289 if(imgid <= UNKNOWN_IMAGE) return;
290 if(prt->pinfo->printer.resolution <= 0 || prt->pinfo->paper.width <= 0.0f || prt->pinfo->paper.height <= 0.0f)
291 return;
292 if(!isfinite(prt->imgs->screen.page.width) || !isfinite(prt->imgs->screen.page.height)
293 || !isfinite(prt->imgs->screen.print_area.width) || !isfinite(prt->imgs->screen.print_area.height)
294 || prt->imgs->screen.page.width <= 1.0f || prt->imgs->screen.page.height <= 1.0f
295 || prt->imgs->screen.print_area.width <= 1.0f || prt->imgs->screen.print_area.height <= 1.0f)
296 return;
297
298 if(prt->imgs->count > 0)
299 {
300 const dt_image_box *box = &prt->imgs->box[0];
301 if(box->imgid > UNKNOWN_IMAGE && isfinite(box->pos.x) && isfinite(box->pos.y)
302 && isfinite(box->pos.width) && isfinite(box->pos.height) && box->pos.width > 0.0f
303 && box->pos.height > 0.0f)
304 return;
305
306 // Do not keep a half-built startup box around. If the view tried to
307 // initialize before the page geometry existed, relative coordinates can be
308 // invalid and the box would never recover on later redraws.
309 for(int k = 0; k < prt->imgs->count; k++)
311 prt->imgs->count = 0;
312 prt->imgs->motion_over = -1;
313 }
314
315 float page_width = prt->pinfo->paper.width;
316 float page_height = prt->pinfo->paper.height;
317 if(prt->pinfo->page.landscape)
318 {
319 page_width = prt->pinfo->paper.height;
320 page_height = prt->pinfo->paper.width;
321 }
322
323 // Build the first full-page box only once the page and print area are known.
324 // This keeps the shared model free of NaN relative coordinates and lets the
325 // view own the initial preview lifecycle without a delayed lib-side reload.
326 dt_printing_setup_box(prt->imgs, 0, prt->imgs->screen.page.x, prt->imgs->screen.page.y,
327 prt->imgs->screen.page.width, prt->imgs->screen.page.height);
328 dt_printing_setup_page(prt->imgs, page_width, page_height, prt->pinfo->printer.resolution);
329 dt_printing_setup_image(prt->imgs, 0, imgid, 100, 100, ALIGNMENT_CENTER);
330 prt->imgs->imgid_to_load = -1;
331 prt->pending_imgid = -1;
332}
333
334void expose(dt_view_t *self, cairo_t *cri, int32_t width_i, int32_t height_i, int32_t pointerx, int32_t pointery)
335{
336 dt_print_t *prt = (dt_print_t *)self->data;
337
338 // clear the current surface
340 cairo_paint(cri);
341
342 // Draw the page first so the image fetcher paints into the same clipped print
343 // area as the legacy synchronous path did.
344 expose_print_page(self, cri, width_i, height_i, pointerx, pointery);
346
347 gboolean busy = FALSE;
348
349 for(int k = 0; k < prt->imgs->count; k++)
350 {
351 dt_image_box *img = &prt->imgs->box[k];
352 if(img->imgid == UNKNOWN_IMAGE) continue;
353
354 dt_printing_setup_image(prt->imgs, k, img->imgid, 100, 100, img->alignment);
355 const int screen_width = ceilf(img->screen.width);
356 const int screen_height = ceilf(img->screen.height);
357 if(screen_width < 2 || screen_height < 2) continue;
358
359 const dt_view_surface_value_t res =
360 dt_view_image_get_surface_async(&prt->screen_fetchers[k], img->imgid, screen_width, screen_height,
363
364 if(res != DT_VIEW_SURFACE_OK)
365 {
366 busy = TRUE;
367 continue;
368 }
369
370 cairo_surface_t *surf = prt->screen_surfaces[k];
371 if(IS_NULL_PTR(surf)) continue;
372
373 const int surf_width = cairo_image_surface_get_width(surf);
374 const int surf_height = cairo_image_surface_get_height(surf);
375 double sx = 1.0, sy = 1.0;
376 cairo_surface_get_device_scale(surf, &sx, &sy);
377 const double logical_width = surf_width / sx;
378 const double logical_height = surf_height / sy;
379 const double x_offset = img->screen.x + (img->screen.width - logical_width) / 2.0;
380 const double y_offset = img->screen.y + (img->screen.height - logical_height) / 2.0;
381
382 img->img_width = roundf(logical_width);
383 img->img_height = roundf(logical_height);
384 img->dis_width = img->img_width;
385 img->dis_height = img->img_height;
386
387 cairo_save(cri);
388 cairo_set_source_surface(cri, surf, x_offset, y_offset);
389 cairo_paint(cri);
390 cairo_restore(cri);
391 }
392
393 if(busy && !prt->busy) dt_control_log_busy_enter();
394 if(!busy && prt->busy) dt_control_log_busy_leave();
395 prt->busy = busy;
396}
397
398void mouse_moved(dt_view_t *self, double x, double y, double pressure, int which)
399{
400 const dt_print_t *prt = (dt_print_t *)self->data;
401
402 // if we are not hovering over a thumbnail in the filmstrip -> show metadata of first opened image.
403 const int32_t mouse_over_id = dt_control_get_mouse_over_id();
404
405 if(prt->imgs->count == 1 && mouse_over_id != prt->imgs->box[0].imgid)
406 {
408 }
409 else if(prt->imgs->count > 1)
410 {
411 const int bidx = dt_printing_get_image_box(prt->imgs, x, y);
412 if(bidx == -1)
414 else if(mouse_over_id != prt->imgs->box[bidx].imgid)
415 {
417 }
418 }
419}
420
421int key_pressed(dt_view_t *self, GdkEventKey *event)
422{
423 if(!gtk_window_is_active(GTK_WINDOW(darktable.gui->ui->main_window))) return FALSE;
424
425 switch(event->keyval)
426 {
427 case GDK_KEY_Escape:
428 dt_ctl_switch_mode_to("lighttable");
429 return TRUE;
430 default:
431 break;
432 }
433
434 return FALSE;
435}
436
438{
439 dt_print_t *prt = (dt_print_t*)self->data;
440 g_list_free(prt->incoming_selection);
442
443 // now check that there is at least one selected image
444
445 const int32_t imgid = prt->incoming_selection ? GPOINTER_TO_INT(prt->incoming_selection->data)
447
448 if(imgid < 0)
449 {
450 // fail :(
451 dt_control_log(_("no image to open !"));
452 return 1;
453 }
454
455 // this loads the image from db if needed:
456 const dt_image_t *img = dt_image_cache_get(darktable.image_cache, imgid, 'r');
457 // get image and check if it has been deleted from disk first!
458
459 char imgfilename[PATH_MAX] = { 0 };
460 gboolean from_cache = TRUE;
461 dt_image_full_path(img->id, imgfilename, sizeof(imgfilename), &from_cache, __FUNCTION__);
462 if(!g_file_test(imgfilename, G_FILE_TEST_IS_REGULAR))
463 {
464 dt_control_log(_("image `%s' is currently unavailable"), img->filename);
466 return 1;
467 }
468 // and drop the lock again.
470
471 // we need to setup the selected image
472 prt->pending_imgid = imgid;
473 if(prt->imgs) prt->imgs->imgid_to_load = imgid;
474
475 return 0;
476}
477
478void enter(dt_view_t *self)
479{
480 dt_print_t *prt=(dt_print_t*)self->data;
481
484
487
488 /* scroll filmstrip to the first selected image */
489 int32_t startup_imgid = prt->pending_imgid;
490 if(startup_imgid <= UNKNOWN_IMAGE) startup_imgid = prt->imgs->imgid_to_load;
491 if(startup_imgid <= UNKNOWN_IMAGE) startup_imgid = dt_selection_get_first_id(darktable.selection);
496
498
500
501 gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL,
502 target_list_all, n_targets_all, GDK_ACTION_MOVE);
503 g_signal_connect(widget, "drag-data-received", G_CALLBACK(_drag_and_drop_received), self);
504 g_signal_connect(widget, "drag-motion", G_CALLBACK(_drag_motion_received), self);
505
506 dt_control_set_mouse_over_id(startup_imgid);
507 dt_control_set_keyboard_over_id(startup_imgid);
508 prt->last_selected = startup_imgid;
510 g_list_free(prt->incoming_selection);
511 prt->incoming_selection = NULL;
512}
513
514void leave(dt_view_t *self)
515{
516 dt_print_t *prt=(dt_print_t*)self->data;
519 prt->busy = FALSE;
520
522
523 /* disconnect from filmstrip image activate */
526 (gpointer)self);
529 (gpointer)self);
530
532 for(int k = 0; k < MAX_IMAGE_PER_PAGE; k++)
534// g_signal_disconnect(widget, "drag-data-received", G_CALLBACK(_drag_and_drop_received));
535// g_signal_disconnect(widget, "drag-motion", G_CALLBACK(_drag_motion_received));
536}
537
538// clang-format off
539// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
540// vim: shiftwidth=2 expandtab tabstop=2 cindent
541// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
542// clang-format on
void dt_accels_connect_accels(dt_accels_t *accels)
Actually enable accelerators after having loaded user config.
void dt_accels_connect_active_group(dt_accels_t *accels, const gchar *group)
Connect the contextual active accels group to the window. Views can declare their own set of contextu...
void dt_accels_disconnect_active_group(dt_accels_t *accels)
Disconnect the contextual active accels group from the window.
#define TRUE
Definition ashift_lsd.c:162
#define FALSE
Definition ashift_lsd.c:158
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
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.
char * name
void dt_ctl_switch_mode_to(const char *mode)
Definition control.c:657
int32_t dt_control_get_mouse_over_id()
Definition control.c:923
void dt_control_set_mouse_over_id(int32_t value)
Definition control.c:931
void dt_control_log(const char *msg,...)
Definition control.c:761
void dt_control_queue_redraw_center()
request redraw of center window. This redraws the center view within a gdk critical section to preven...
Definition control.c:861
void dt_control_log_busy_leave()
Definition control.c:840
void dt_control_log_busy_enter()
Definition control.c:824
void dt_control_queue_redraw()
request redraw of the workspace. This redraws the whole workspace within a gdk critical section to pr...
Definition control.c:856
void dt_control_set_keyboard_over_id(int32_t value)
Definition control.c:957
void dt_get_print_layout(const dt_print_info_t *prt, const int32_t area_width, const int32_t area_height, float *px, float *py, float *pwidth, float *pheight, float *ax, float *ay, float *awidth, float *aheight, gboolean *borderless)
Definition cups_print.c:591
@ ALIGNMENT_CENTER
Definition cups_print.h:35
darktable_t darktable
Definition darktable.c:181
#define UNKNOWN_IMAGE
Definition darktable.h:182
#define DT_MODULE(MODVER)
Definition darktable.h:140
#define dt_free(ptr)
Definition darktable.h:456
#define PATH_MAX
Definition darktable.h:1062
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
Definition darktable.h:281
static const GtkTargetEntry target_list_all[]
static const guint n_targets_all
void dt_gui_gtk_set_source_rgb(cairo_t *cr, dt_gui_color_t color)
Definition gtk.c:442
void dt_gui_refocus_center()
Definition gtk.c:3234
GtkWidget * dt_ui_center(dt_ui_t *ui)
get the center drawable widget
@ DT_GUI_COLOR_PRINT_BG
Definition gtk.h:133
void dt_image_cache_read_release(dt_image_cache_t *cache, const dt_image_t *img)
dt_image_t * dt_image_cache_get(dt_image_cache_t *cache, const int32_t imgid, char mode)
static const float x
float *const restrict const size_t k
void init(dt_view_t *self)
Definition print.c:153
static void _film_strip_activated(const int32_t imgid, void *data)
Definition print.c:81
static gboolean _drag_motion_received(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint time, gpointer data)
Definition print.c:137
void leave(dt_view_t *self)
Definition print.c:514
void cleanup(dt_view_t *self)
Definition print.c:170
static void expose_print_page(dt_view_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
Definition print.c:180
static void _view_print_settings(const dt_view_t *view, dt_print_info_t *pinfo, dt_images_box *imgs)
Definition print.c:107
void expose(dt_view_t *self, cairo_t *cri, int32_t width_i, int32_t height_i, int32_t pointerx, int32_t pointery)
Definition print.c:334
int key_pressed(dt_view_t *self, GdkEventKey *event)
Definition print.c:421
static void _print_setup_initial_image(dt_print_t *prt)
Definition print.c:280
void mouse_moved(dt_view_t *self, double x, double y, double pressure, int which)
Definition print.c:398
uint32_t view(const dt_view_t *self)
Definition print.c:76
void enter(dt_view_t *self)
Definition print.c:478
static void _drag_and_drop_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint target_type, guint time, gpointer data)
Definition print.c:120
int try_enter(dt_view_t *self)
Definition print.c:437
static void _view_print_filmstrip_activate_callback(gpointer instance, int32_t imgid, gpointer user_data)
Definition print.c:94
static void _view_print_filmstrip_drag_begin_callback(gpointer instance, int32_t imgid, gpointer user_data)
Definition print.c:99
void dt_printing_setup_display(dt_images_box *imgs, const float px, const float py, const float pwidth, const float pheight, const float ax, const float ay, const float awidth, const float aheight, gboolean borderless)
Definition printing.c:114
int32_t dt_printing_get_image_box(const dt_images_box *imgs, const int x, const int y)
Definition printing.c:65
void dt_printing_clear_box(dt_image_box *img)
Definition printing.c:35
void dt_printing_setup_box(dt_images_box *imgs, const int idx, const float x, const float y, const float width, const float height)
Definition printing.c:154
void dt_printing_setup_image(dt_images_box *imgs, const int idx, const int32_t imgid, const int32_t width, const int32_t height, const dt_alignment_t alignment)
Definition printing.c:304
void dt_printing_setup_page(dt_images_box *imgs, const float page_width, const float page_height, const int resolution)
Definition printing.c:199
void dt_printing_clear_boxes(dt_images_box *imgs)
Definition printing.c:50
#define MAX_IMAGE_PER_PAGE
Definition printing.h:36
int32_t dt_selection_get_first_id(struct dt_selection_t *selection)
Definition selection.c:69
GList * dt_selection_get_list(struct dt_selection_t *selection)
Definition selection.c:172
void dt_selection_select_single(dt_selection_t *selection, int32_t imgid)
Definition selection.c:289
#define DT_DEBUG_CONTROL_SIGNAL_DISCONNECT(ctlsig, cb, user_data)
Definition signal.h:368
@ DT_SIGNAL_VIEWMANAGER_FILMSTRIP_ACTIVATE
This signal is raised when a thumb is single-clicked in the filmstrip. Views that want filmstrip clic...
Definition signal.h:103
@ DT_SIGNAL_VIEWMANAGER_FILMSTRIP_DRAG_BEGIN
This signal is raised when a drag starts from the filmstrip. Views that need filmstrip drags to commi...
Definition signal.h:111
#define DT_DEBUG_CONTROL_SIGNAL_CONNECT(ctlsig, signal, cb, user_data)
Definition signal.h:357
struct _GtkWidget GtkWidget
Definition splash.h:29
dt_image_pos screen
Definition printing.h:52
int32_t dis_width
Definition printing.h:48
int32_t dis_height
Definition printing.h:48
dt_alignment_t alignment
Definition printing.h:50
int32_t img_height
Definition printing.h:49
int32_t imgid
Definition printing.h:45
dt_image_pos pos
Definition printing.h:51
int32_t img_width
Definition printing.h:49
float width
Definition printing.h:40
float x
Definition printing.h:40
float height
Definition printing.h:40
float y
Definition printing.h:40
struct dt_gui_gtk_t * gui
Definition darktable.h:775
struct dt_selection_t * selection
Definition darktable.h:782
struct dt_control_signal_t * signals
Definition darktable.h:774
struct dt_image_cache_t * image_cache
Definition darktable.h:777
struct dt_view_manager_t * view_manager
Definition darktable.h:772
dt_accels_t * accels
Definition gtk.h:194
dt_ui_t * ui
Definition gtk.h:164
char filename[DT_MAX_FILENAME_LEN]
Definition image.h:304
int32_t id
Definition image.h:319
int32_t imgid_to_load
Definition printing.h:72
dt_image_box box[20]
Definition printing.h:75
int32_t motion_over
Definition printing.h:73
dt_screen_pos screen
Definition printing.h:78
gboolean landscape
Definition cups_print.h:55
dt_paper_info_t paper
Definition cups_print.h:73
dt_printer_info_t printer
Definition cups_print.h:71
dt_page_setup_t page
Definition cups_print.h:72
int32_t pending_imgid
Definition print.c:66
gboolean busy
Definition print.c:67
cairo_surface_t * screen_surfaces[MAX_IMAGE_PER_PAGE]
Definition print.c:63
dt_print_info_t * pinfo
Definition print.c:59
GList * incoming_selection
Definition print.c:62
dt_images_box * imgs
Definition print.c:60
dt_view_image_surface_fetcher_t screen_fetchers[MAX_IMAGE_PER_PAGE]
Definition print.c:64
dt_images_box fallback_imgs
Definition print.c:61
int32_t last_selected
Definition print.c:65
double hw_margin_right
Definition cups_print.h:63
double hw_margin_left
Definition cups_print.h:63
double hw_margin_bottom
Definition cups_print.h:63
dt_image_pos print_area
Definition printing.h:63
dt_image_pos page
Definition printing.h:59
GtkWidget * main_window
dt_thumbtable_t * thumbtable_filmstrip
Track one asynchronous Cairo surface fetch request for a GUI widget.
Definition view.h:117
struct dt_view_manager_t::@67 proxy
struct dt_view_t * view
Definition view.h:244
GModule *void * data
Definition view.h:157
int dt_thumbtable_scroll_to_selection(dt_thumbtable_t *table)
Scroll to show selected content.
Definition thumbtable.c:572
void dt_thumbtable_update_parent(dt_thumbtable_t *table)
A widget to manage and display image thumbnails in Ansel's lighttable and filmstrip views.
@ DT_THUMBTABLE_ZOOM_FIT
Definition thumbtable.h:76
static void dt_thumbtable_show(dt_thumbtable_t *table)
Show the thumbnail table widget.
Definition thumbtable.h:380
static void dt_thumbtable_hide(dt_thumbtable_t *table)
Hide the thumbnail table widget.
Definition thumbtable.h:395
void dt_view_image_surface_fetcher_invalidate(dt_view_image_surface_fetcher_t *fetcher, cairo_surface_t **target)
Definition view.c:866
void dt_view_image_surface_fetcher_cleanup(dt_view_image_surface_fetcher_t *fetcher)
Definition view.c:842
void dt_view_image_surface_fetcher_init(dt_view_image_surface_fetcher_t *fetcher)
Definition view.c:831
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)
Definition view.c:881
int32_t dt_view_active_images_get_first()
Definition view.c:1306
@ DT_VIEW_PRINT
Definition view.h:81
dt_view_surface_value_t
Definition view.h:102
@ DT_VIEW_SURFACE_OK
Definition view.h:103