Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
preview_window.c File Reference
#include "common/logging.h"
#include "colorprofiles/colorspaces.h"
#include "common/colorspaces_inline_conversions.h"
#include "common/conf.h"
#include "system/macros.h"
#include "system/mem_alloc.h"
#include "system/simd.h"
#include "common/times.h"
#include "control/signal.h"
#include "gui/application.h"
#include "control/control.h"
#include "caches/image_cache.h"
#include "views/view.h"
#include <gtk/gtk.h>
#include "widgets/widget_settings.h"
+ Include dependency graph for preview_window.c:

Go to the source code of this file.

Data Structures

struct  dt_preview_window_t
 

Typedefs

typedef struct dt_preview_window_t dt_preview_window_t
 

Functions

void _preview_redraw (gpointer instance, dt_preview_window_t *preview)
 
static void _preview_window_destroy (GtkWidget *dialog, gpointer user_data)
 
static void _close_preview_popup (GtkWidget *dialog, gint response_id, gpointer data)
 
static void _preview_window_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
 
void _colormanage_ui_color (const float L, const float a, const float b, dt_aligned_pixel_t RGB)
 
static gboolean _thumb_draw_image (GtkWidget *widget, cairo_t *cr, gpointer user_data)
 
void dt_preview_window_spawn (const int32_t imgid)
 

Typedef Documentation

◆ dt_preview_window_t

Function Documentation

◆ _close_preview_popup()

static void _close_preview_popup ( GtkWidget dialog,
gint  response_id,
gpointer  data 
)
static

Definition at line 62 of file preview_window.c.

Referenced by dt_preview_window_spawn().

◆ _colormanage_ui_color()

void _colormanage_ui_color ( const float  L,
const float  a,
const float  b,
dt_aligned_pixel_t  RGB 
)
Todo:
: we color-manage the preview window assuming it sits on the same screen as the main window

Definition at line 86 of file preview_window.c.

References dt_colorprofiles_xyz_to_display(), dt_Lab_to_XYZ(), L, Lab, RGB, and XYZ.

Referenced by _thumb_draw_image().

◆ _preview_redraw()

void _preview_redraw ( gpointer  instance,
dt_preview_window_t preview 
)

Definition at line 158 of file preview_window.c.

References preview.

Referenced by _preview_window_destroy(), and dt_preview_window_spawn().

◆ _preview_window_destroy()

static void _preview_window_destroy ( GtkWidget dialog,
gpointer  user_data 
)
static

◆ _preview_window_size_allocate()

static void _preview_window_size_allocate ( GtkWidget widget,
GtkAllocation *  allocation,
gpointer  user_data 
)
static

◆ _thumb_draw_image()

static gboolean _thumb_draw_image ( GtkWidget widget,
cairo_t *  cr,
gpointer  user_data 
)
static
Todo:
: this gets the color-managed image surface using the color profile of the monitor

Definition at line 95 of file preview_window.c.

References _colormanage_ui_color(), dt_conf_get_int(), dt_control_draw_busy_msg(), DT_DEBUG_LIGHTTABLE, dt_get_wtime(), DT_PIXEL_APPLY_DPI, dt_print(), dt_view_image_get_surface_async(), DT_VIEW_SURFACE_OK, height, IS_NULL_PTR, preview, res, TRUE, and width.

Referenced by dt_preview_window_spawn().

◆ dt_preview_window_spawn()