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

Go to the source code of this file.

Typedefs

typedef enum dt_colorlables_enum dt_colorlabels_enum
 

Enumerations

enum  dt_colorlables_enum {
  DT_COLORLABELS_RED ,
  DT_COLORLABELS_YELLOW ,
  DT_COLORLABELS_GREEN ,
  DT_COLORLABELS_BLUE ,
  DT_COLORLABELS_PURPLE ,
  DT_COLORLABELS_LAST
}
 

Functions

int dt_colorlabels_get_labels (const int32_t imgid)
 
void dt_colorlabels_remove_labels (const int32_t imgid)
 
void dt_colorlabels_set_label (const int32_t imgid, const int color)
 
void dt_colorlabels_set_labels (const int32_t imgid, const int colors)
 
void dt_colorlabels_toggle_label_on_list (GList *list, const int color, const gboolean undo_on)
 
void dt_colorlabels_remove_label (const int32_t imgid, const int color)
 
const char * dt_colorlabels_to_string (int label)
 
int dt_colorlabels_check_label (const int32_t imgid, const int color)
 
void dt_colorlabels_cleanup (void)
 

Variables

const char * dt_colorlabels_name []
 

Typedef Documentation

◆ dt_colorlabels_enum

array of names and constant to ease label manipulation

Enumeration Type Documentation

◆ dt_colorlables_enum

array of names and constant to ease label manipulation

Enumerator
DT_COLORLABELS_RED 
DT_COLORLABELS_YELLOW 
DT_COLORLABELS_GREEN 
DT_COLORLABELS_BLUE 
DT_COLORLABELS_PURPLE 
DT_COLORLABELS_LAST 

Definition at line 40 of file colorlabels.h.

Function Documentation

◆ dt_colorlabels_check_label()

int dt_colorlabels_check_label ( const int32_t  imgid,
const int  color 
)

check if an image has a color label

Definition at line 274 of file colorlabels.c.

References color, and dt_colorlabel_repository_has().

◆ dt_colorlabels_cleanup()

void dt_colorlabels_cleanup ( void  )

cleanup cached statements

Definition at line 156 of file colorlabels.c.

References dt_colorlabel_repository_cleanup().

Referenced by dt_cleanup().

◆ dt_colorlabels_get_labels()

int dt_colorlabels_get_labels ( const int32_t  imgid)

get the assigned colorlabels of imgid

Definition at line 79 of file colorlabels.c.

References dt_colorlabel_repository_get().

Referenced by _pop_undo_execute().

◆ dt_colorlabels_remove_label()

void dt_colorlabels_remove_label ( const int32_t  imgid,
const int  color 
)

remove a color label from imgid

Definition at line 151 of file colorlabels.c.

References color, and dt_colorlabel_repository_remove().

Referenced by dt_colorlabels_set_labels().

◆ dt_colorlabels_remove_labels()

void dt_colorlabels_remove_labels ( const int32_t  imgid)

remove labels associated to imgid

Definition at line 141 of file colorlabels.c.

References dt_colorlabel_repository_remove_all().

Referenced by dt_exif_decode_xmp_data().

◆ dt_colorlabels_set_label()

void dt_colorlabels_set_label ( const int32_t  imgid,
const int  color 
)

assign a color label to imgid - no undo no image group

Definition at line 146 of file colorlabels.c.

References color, and dt_colorlabel_repository_set().

Referenced by dt_colorlabels_set_labels(), dt_exif_decode_xmp_data(), and dt_lightroom_import().

◆ dt_colorlabels_set_labels()

void dt_colorlabels_set_labels ( const int32_t  imgid,
const int  colors 
)

save all assigned color labels from cached dt_image_t to database

Definition at line 84 of file colorlabels.c.

References color, colors, dt_colorlabels_remove_label(), and dt_colorlabels_set_label().

◆ dt_colorlabels_to_string()

const char * dt_colorlabels_to_string ( int  label)

get the name of the color for a given number (could be replaced by an array)

Todo:
: XMP uses Red, Green, ... while we use red, green, ... What should this function return?

Definition at line 280 of file colorlabels.c.

References DT_COLORLABELS_LAST, and dt_colorlabels_name.

Referenced by _expand_rating_and_metadata().

◆ dt_colorlabels_toggle_label_on_list()

Variable Documentation

◆ dt_colorlabels_name

const char* dt_colorlabels_name[]
extern

array with all names as strings, terminated by a NULL entry

Definition at line 46 of file colorlabels.c.

Referenced by dt_colorlabels_to_string().