Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
thumbnail.h File Reference
#include "common/atomic.h"
#include "common/darktable.h"
#include "common/debug.h"
#include "dtgtk/thumbtable_info.h"
#include <glib.h>
#include <gtk/gtk.h>
+ Include dependency graph for thumbnail.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_thumbnail_t
 

Macros

#define MAX_STARS   5
 
#define dt_thumbnail_image_refresh(thumb)   DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_LIGHTTABLE, dt_thumbnail_image_refresh_real, (thumb))
 

Typedefs

typedef enum dt_thumbnail_border_t dt_thumbnail_border_t
 
typedef enum dt_thumbnail_overlay_t dt_thumbnail_overlay_t
 

Enumerations

enum  dt_thumbnail_border_t {
  DT_THUMBNAIL_BORDER_NONE = 0 ,
  DT_THUMBNAIL_BORDER_LEFT = 1 << 0 ,
  DT_THUMBNAIL_BORDER_TOP = 1 << 1 ,
  DT_THUMBNAIL_BORDER_RIGHT = 1 << 2 ,
  DT_THUMBNAIL_BORDER_BOTTOM = 1 << 3
}
 
enum  dt_thumbnail_overlay_t {
  DT_THUMBNAIL_OVERLAYS_NONE ,
  DT_THUMBNAIL_OVERLAYS_HOVER_NORMAL ,
  DT_THUMBNAIL_OVERLAYS_ALWAYS_NORMAL ,
  DT_THUMBNAIL_OVERLAYS_LAST
}
 

Functions

dt_thumbnail_tdt_thumbnail_new (int rowid, dt_thumbnail_overlay_t over, struct dt_thumbtable_t *table, dt_image_t *info)
 
int dt_thumbnail_destroy (dt_thumbnail_t *thumb)
 
GtkWidgetdt_thumbnail_create_widget (dt_thumbnail_t *thumb)
 
void dt_thumbnail_resize (dt_thumbnail_t *thumb, int width, int height)
 
void dt_thumbnail_set_group_border (dt_thumbnail_t *thumb, dt_thumbnail_border_t border)
 
void dt_thumbnail_set_mouseover (dt_thumbnail_t *thumb, gboolean over)
 
void dt_thumbnail_set_overlay (dt_thumbnail_t *thumb, dt_thumbnail_overlay_t mode)
 
void dt_thumbnail_set_drop (dt_thumbnail_t *thumb, gboolean accept_drop)
 
void dt_thumbnail_resync_info (dt_thumbnail_t *thumb, const dt_image_t *const info)
 
void dt_thumbnail_update_gui (dt_thumbnail_t *thumb)
 
void dt_thumbnail_update_selection (dt_thumbnail_t *thumb, gboolean selected)
 
int dt_thumbnail_image_refresh_real (dt_thumbnail_t *thumb)
 
void dt_thumbnail_alternative_mode (dt_thumbnail_t *thumb, gboolean enable)
 
int dt_thumbnail_get_image_buffer (dt_thumbnail_t *thumb)
 
static dt_thumbnail_overlay_t sanitize_overlays (dt_thumbnail_overlay_t overlays)
 

Macro Definition Documentation

◆ dt_thumbnail_image_refresh

#define dt_thumbnail_image_refresh (   thumb)    DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_LIGHTTABLE, dt_thumbnail_image_refresh_real, (thumb))

Definition at line 165 of file thumbnail.h.

◆ MAX_STARS

#define MAX_STARS   5

this is the thumbnail class for the lighttable module.

Definition at line 44 of file thumbnail.h.

Typedef Documentation

◆ dt_thumbnail_border_t

◆ dt_thumbnail_overlay_t

Enumeration Type Documentation

◆ dt_thumbnail_border_t

Enumerator
DT_THUMBNAIL_BORDER_NONE 
DT_THUMBNAIL_BORDER_LEFT 
DT_THUMBNAIL_BORDER_TOP 
DT_THUMBNAIL_BORDER_RIGHT 
DT_THUMBNAIL_BORDER_BOTTOM 

Definition at line 48 of file thumbnail.h.

◆ dt_thumbnail_overlay_t

Enumerator
DT_THUMBNAIL_OVERLAYS_NONE 
DT_THUMBNAIL_OVERLAYS_HOVER_NORMAL 
DT_THUMBNAIL_OVERLAYS_ALWAYS_NORMAL 
DT_THUMBNAIL_OVERLAYS_LAST 

Definition at line 57 of file thumbnail.h.

Function Documentation

◆ dt_thumbnail_alternative_mode()

void dt_thumbnail_alternative_mode ( dt_thumbnail_t thumb,
gboolean  enable 
)

◆ dt_thumbnail_create_widget()

GtkWidget * dt_thumbnail_create_widget ( dt_thumbnail_t thumb)

Definition at line 1112 of file thumbnail.c.

References _altered_enter(), _event_audio_release(), _event_cursor_draw(), _event_expose(), _event_grouping_release(), _event_image_motion(), _event_image_press(), _event_image_release(), _event_main_enter(), _event_main_leave(), _event_main_motion(), _event_main_press(), _event_main_release(), _event_rating_release(), _event_star_enter(), _event_star_leave(), _group_enter(), _thumb_draw_image(), bbox, dt_image_t::color_labels, dt_gui_add_class(), DT_GUI_BOX_SPACING, dtgtk_cairo_paint_altered(), dtgtk_cairo_paint_audio(), dtgtk_cairo_paint_grouping(), dtgtk_cairo_paint_label_flower(), dtgtk_cairo_paint_local_copy(), dtgtk_cairo_paint_reject(), dtgtk_cairo_paint_star(), dtgtk_thumbnail_btn_new(), FALSE, i, dt_thumbnail_t::info, MAX_STARS, n_targets_all, target_list_all, TRUE, dt_thumbnail_t::w_altered, dt_thumbnail_t::w_alternative, dt_thumbnail_t::w_audio, dt_thumbnail_t::w_background, dt_thumbnail_t::w_bottom_eb, dt_thumbnail_t::w_camera, dt_thumbnail_t::w_color, dt_thumbnail_t::w_cursor, dt_thumbnail_t::w_datetime, dt_thumbnail_t::w_exposure, dt_thumbnail_t::w_exposure_bias, dt_thumbnail_t::w_ext, dt_thumbnail_t::w_filename, dt_thumbnail_t::w_focal, dt_thumbnail_t::w_folder, dt_thumbnail_t::w_group, dt_thumbnail_t::w_image, dt_thumbnail_t::w_lens, dt_thumbnail_t::w_local_copy, dt_thumbnail_t::w_main, dt_thumbnail_t::w_reject, dt_thumbnail_t::w_stars, dt_thumbnail_t::w_top_eb, and dt_thumbnail_t::widget.

Referenced by dt_thumbnail_new().

◆ dt_thumbnail_destroy()

◆ dt_thumbnail_get_image_buffer()

◆ dt_thumbnail_image_refresh_real()

◆ dt_thumbnail_new()

◆ dt_thumbnail_resize()

◆ dt_thumbnail_resync_info()

◆ dt_thumbnail_set_drop()

void dt_thumbnail_set_drop ( dt_thumbnail_t thumb,
gboolean  accept_drop 
)

◆ dt_thumbnail_set_group_border()

◆ dt_thumbnail_set_mouseover()

◆ dt_thumbnail_set_overlay()

void dt_thumbnail_set_overlay ( dt_thumbnail_t thumb,
dt_thumbnail_overlay_t  mode 
)

Definition at line 1455 of file thumbnail.c.

References dt_thumbnail_t::over, and thumb_return_if_fails.

Referenced by _add_thumbnail_at_rowid(), and _resize_thumbnails().

◆ dt_thumbnail_update_gui()

◆ dt_thumbnail_update_selection()

void dt_thumbnail_update_selection ( dt_thumbnail_t thumb,
gboolean  selected 
)

◆ sanitize_overlays()

static dt_thumbnail_overlay_t sanitize_overlays ( dt_thumbnail_overlay_t  overlays)
inlinestatic

Definition at line 173 of file thumbnail.h.

References DT_THUMBNAIL_OVERLAYS_LAST, and MIN.

Referenced by _thumbs_update_overlays_mode(), and dt_thumbtable_set_overlays_mode().