Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
metadata_view.c File Reference
#include "common/collection.h"
#include "common/darktable.h"
#include "common/debug.h"
#include "common/image_cache.h"
#include "common/metadata.h"
#include "common/tags.h"
#include "common/datetime.h"
#include "common/selection.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/develop.h"
#include "gui/gtk.h"
#include "libs/lib.h"
#include "libs/lib_api.h"
#include <gdk/gdkkeysyms.h>
#include <sys/param.h>
+ Include dependency graph for metadata_view.c:

Data Structures

struct  dt_lib_metadata_view_t
 
struct  dt_lib_metadata_info_t
 

Macros

#define NODATA_STRING   "-"
 
#define EMPTY_FIELD   '.'
 
#define FALSE_FIELD   '.'
 
#define TRUE_FIELD   '!'
 
#define FLAG_NB   15
 

Typedefs

typedef enum dt_metadata_pref_cols_t dt_metadata_pref_cols_t
 
typedef struct dt_lib_metadata_view_t dt_lib_metadata_view_t
 
typedef struct dt_lib_metadata_info_t dt_lib_metadata_info_t
 

Enumerations

enum  dt_metadata_pref_cols_t {
  DT_METADATA_PREF_COL_INDEX = 0 ,
  DT_METADATA_PREF_COL_NAME_L ,
  DT_METADATA_PREF_COL_VISIBLE ,
  DT_METADATA_PREF_NUM_COLS
}
 
enum  {
  md_internal_filmroll = 0 ,
  md_internal_filmroll_id ,
  md_internal_imgid ,
  md_internal_groupid ,
  md_internal_filename ,
  md_internal_version ,
  md_internal_fullpath ,
  md_internal_local_copy ,
  md_internal_import_timestamp ,
  md_internal_change_timestamp ,
  md_internal_export_timestamp ,
  md_internal_print_timestamp ,
  md_internal_flags ,
  md_exif_model ,
  md_exif_maker ,
  md_exif_lens ,
  md_exif_aperture ,
  md_exif_exposure ,
  md_exif_exposure_bias ,
  md_exif_focal_length ,
  md_exif_focus_distance ,
  md_exif_iso ,
  md_exif_datetime ,
  md_exif_width ,
  md_exif_height ,
  md_width ,
  md_height ,
  md_xmp_metadata ,
  md_geotagging_lat = md_xmp_metadata + DT_METADATA_NUMBER ,
  md_geotagging_lon ,
  md_geotagging_ele ,
  md_tag_names ,
  md_categories ,
  md_size
}
 

Functions

const char * name (struct dt_lib_module_t *self)
 
const char ** views (dt_lib_module_t *self)
 
uint32_t container (dt_lib_module_t *self)
 
int position ()
 
static gboolean _is_metadata_ui (const int i)
 
static const char * _get_label (const int i)
 
static void _lib_metadata_init_queue (dt_lib_module_t *self)
 
static void _filter_non_printable (char *string, size_t length)
 
static dt_lib_metadata_info_t_get_metadata_per_index (const int index, dt_lib_module_t *self)
 
static void _metadata_update_markup (const gint32 i, const char *const format, dt_lib_module_t *self)
 
static void _metadata_update_value (const int i, const char *value, dt_lib_module_t *self)
 
static void _metadata_update_tooltip (const int i, const char *tooltip, dt_lib_module_t *self)
 
static void _metadata_update_timestamp (const int i, const GTimeSpan gts, dt_lib_module_t *self)
 
static gint _lib_metadata_sort_order (gconstpointer a, gconstpointer b)
 
static gint _lib_metadata_sort_index (gconstpointer a, gconstpointer b)
 
static void _metadata_get_flags (const dt_image_t *const img, char *const text, char *const tooltip, const size_t tooltip_size)
 
static void _concatenate_multiple_images (gboolean skip[md_size], int count)
 
static void _metadata_view_update_values (dt_lib_module_t *self)
 
static void _jump_to ()
 
static gboolean _filmroll_clicked (GtkWidget *widget, GdkEventButton *event, gpointer null)
 
static void _mouse_over_image_callback (gpointer instance, gpointer user_data)
 
static char * _get_current_configuration (dt_lib_module_t *self)
 
static void _lib_metadata_refill_grid (dt_lib_module_t *self)
 
static void _lib_metadata_setup_grid (dt_lib_module_t *self)
 
static void _apply_preferences (const char *prefs_list, dt_lib_module_t *self)
 
static void _save_preferences (dt_lib_module_t *self)
 
static void _select_toggled_callback (GtkCellRendererToggle *cell_renderer, gchar *path_str, gpointer user_data)
 
static void _drag_data_inserted (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data)
 
void _menuitem_preferences (GtkMenuItem *menuitem, dt_lib_module_t *self)
 
void set_preferences (void *menu, dt_lib_module_t *self)
 
voidget_params (dt_lib_module_t *self, int *size)
 
int set_params (dt_lib_module_t *self, const void *params, int size)
 
static void _display_default (dt_lib_module_t *self)
 
void gui_init (dt_lib_module_t *self)
 
static void _free_metadata_queue (dt_lib_metadata_info_t *m)
 
void gui_cleanup (dt_lib_module_t *self)
 
void gui_reset (dt_lib_module_t *self)
 

Variables

static const char * _labels []
 
static gboolean _dndactive = FALSE
 

Macro Definition Documentation

◆ EMPTY_FIELD

#define EMPTY_FIELD   '.'

◆ FALSE_FIELD

#define FALSE_FIELD   '.'

◆ FLAG_NB

#define FLAG_NB   15

◆ NODATA_STRING

#define NODATA_STRING   "-"

◆ TRUE_FIELD

#define TRUE_FIELD   '!'

Typedef Documentation

◆ dt_lib_metadata_info_t

◆ dt_lib_metadata_view_t

◆ dt_metadata_pref_cols_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
md_internal_filmroll 
md_internal_filmroll_id 
md_internal_imgid 
md_internal_groupid 
md_internal_filename 
md_internal_version 
md_internal_fullpath 
md_internal_local_copy 
md_internal_import_timestamp 
md_internal_change_timestamp 
md_internal_export_timestamp 
md_internal_print_timestamp 
md_internal_flags 
md_exif_model 
md_exif_maker 
md_exif_lens 
md_exif_aperture 
md_exif_exposure 
md_exif_exposure_bias 
md_exif_focal_length 
md_exif_focus_distance 
md_exif_iso 
md_exif_datetime 
md_exif_width 
md_exif_height 
md_width 
md_height 
md_xmp_metadata 
md_geotagging_lat 
md_geotagging_lon 
md_geotagging_ele 
md_tag_names 
md_categories 
md_size 

◆ dt_metadata_pref_cols_t

Enumerator
DT_METADATA_PREF_COL_INDEX 
DT_METADATA_PREF_COL_NAME_L 
DT_METADATA_PREF_COL_VISIBLE 
DT_METADATA_PREF_NUM_COLS 

Function Documentation

◆ _apply_preferences()

static void _apply_preferences ( const char *  prefs_list,
dt_lib_module_t self 
)
static

◆ _concatenate_multiple_images()

static void _concatenate_multiple_images ( gboolean  skip[md_size],
int  count 
)
static

◆ _display_default()

static void _display_default ( dt_lib_module_t self)
static

◆ _drag_data_inserted()

static void _drag_data_inserted ( GtkTreeModel *  tree_model,
GtkTreePath *  path,
GtkTreeIter *  iter,
gpointer  user_data 
)
static

References _dndactive, and TRUE.

Referenced by _menuitem_preferences().

◆ _filmroll_clicked()

static gboolean _filmroll_clicked ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  null 
)
static

References _jump_to(), FALSE, and TRUE.

Referenced by _lib_metadata_refill_grid().

◆ _filter_non_printable()

static void _filter_non_printable ( char *  string,
size_t  length 
)
static

◆ _free_metadata_queue()

static void _free_metadata_queue ( dt_lib_metadata_info_t m)
static

References m.

Referenced by gui_cleanup().

◆ _get_current_configuration()

static char * _get_current_configuration ( dt_lib_module_t self)
static

◆ _get_label()

static const char * _get_label ( const int  i)
static

◆ _get_metadata_per_index()

static dt_lib_metadata_info_t * _get_metadata_per_index ( const int  index,
dt_lib_module_t self 
)
static

◆ _is_metadata_ui()

◆ _jump_to()

◆ _lib_metadata_init_queue()

static void _lib_metadata_init_queue ( dt_lib_module_t self)
static

◆ _lib_metadata_refill_grid()

◆ _lib_metadata_setup_grid()

static void _lib_metadata_setup_grid ( dt_lib_module_t self)
static

◆ _lib_metadata_sort_index()

static gint _lib_metadata_sort_index ( gconstpointer  a,
gconstpointer  b 
)
static

◆ _lib_metadata_sort_order()

static gint _lib_metadata_sort_order ( gconstpointer  a,
gconstpointer  b 
)
static

◆ _menuitem_preferences()

◆ _metadata_get_flags()

◆ _metadata_update_markup()

static void _metadata_update_markup ( const gint32  i,
const char *const  format,
dt_lib_module_t self 
)
static

◆ _metadata_update_timestamp()

static void _metadata_update_timestamp ( const int  i,
const GTimeSpan  gts,
dt_lib_module_t self 
)
static

◆ _metadata_update_tooltip()

static void _metadata_update_tooltip ( const int  i,
const char *  tooltip,
dt_lib_module_t self 
)
static

◆ _metadata_update_value()

static void _metadata_update_value ( const int  i,
const char *  value,
dt_lib_module_t self 
)
static

◆ _metadata_view_update_values()

static void _metadata_view_update_values ( dt_lib_module_t self)
static

References _concatenate_multiple_images(), _filter_non_printable(), _metadata_get_flags(), _metadata_update_markup(), _metadata_update_timestamp(), _metadata_update_tooltip(), _metadata_update_value(), dt_image_t::change_timestamp, darktable, dt_lib_module_t::data, double(), dt_act_on_get_first_image(), dt_conf_get_bool(), dt_control_get_mouse_over_id(), dt_datetime_img_to_local(), dt_image_cache_get(), dt_image_cache_read_release(), dt_image_film_roll(), dt_image_full_path(), DT_IMAGE_LOCAL_COPY, dt_lua_async_call_alien, dt_metadata_get(), dt_metadata_get_key(), dt_metadata_get_keyid_by_display_order(), dt_metadata_get_type(), DT_METADATA_NUMBER, DT_METADATA_TYPE_INTERNAL, dt_selection_get_first_id(), dt_selection_get_length(), dt_tag_free_result(), dt_tag_get_attached(), DT_TF_CATEGORY, dt_util_dstrcat(), dt_util_elevation_str(), dt_util_format_exposure(), dt_util_latitude_str(), dt_util_longitude_str(), dt_image_geoloc_t::elevation, dt_image_t::exif_aperture, dt_image_t::exif_exposure, dt_image_t::exif_exposure_bias, dt_image_t::exif_focal_length, dt_image_t::exif_focus_distance, dt_image_t::exif_iso, dt_image_t::exif_lens, dt_image_t::exif_maker, dt_image_t::exif_model, dt_image_t::export_timestamp, FALSE, dt_image_t::filename, dt_image_t::film_id, dt_image_t::flags, flags, dt_image_t::geoloc, dt_image_t::group_id, dt_image_t::height, dt_image_t::id, darktable_t::image_cache, dt_lib_metadata_view_t::imgid, dt_image_t::import_timestamp, key, dt_image_geoloc_t::latitude, dt_image_geoloc_t::longitude, LUA_ASYNC_DONE, LUA_ASYNC_TYPENAME, md_categories, md_exif_aperture, md_exif_datetime, md_exif_exposure, md_exif_exposure_bias, md_exif_focal_length, md_exif_focus_distance, md_exif_height, md_exif_iso, md_exif_lens, md_exif_maker, md_exif_model, md_exif_width, md_geotagging_ele, md_geotagging_lat, md_geotagging_lon, md_internal_change_timestamp, md_internal_export_timestamp, md_internal_filename, md_internal_filmroll, md_internal_filmroll_id, md_internal_flags, md_internal_fullpath, md_internal_groupid, md_internal_imgid, md_internal_import_timestamp, md_internal_local_copy, md_internal_print_timestamp, md_internal_version, md_size, md_tag_names, md_xmp_metadata, NODATA_STRING, dt_image_t::p_height, dt_image_t::p_width, PATH_MAX, dt_image_t::print_timestamp, darktable_t::selection, TRUE, dt_image_t::version, void(), and dt_image_t::width.

Referenced by _mouse_over_image_callback().

◆ _mouse_over_image_callback()

static void _mouse_over_image_callback ( gpointer  instance,
gpointer  user_data 
)
static

References _metadata_view_update_values().

Referenced by gui_cleanup(), and gui_init().

◆ _save_preferences()

static void _save_preferences ( dt_lib_module_t self)
static

◆ _select_toggled_callback()

static void _select_toggled_callback ( GtkCellRendererToggle *  cell_renderer,
gchar *  path_str,
gpointer  user_data 
)
static

◆ container()

uint32_t container ( dt_lib_module_t self)

◆ get_params()

void * get_params ( dt_lib_module_t self,
int *  size 
)

◆ gui_cleanup()

◆ gui_init()

◆ gui_reset()

◆ name()

const char * name ( struct dt_lib_module_t self)

◆ position()

int position ( )

◆ set_params()

int set_params ( dt_lib_module_t self,
const void params,
int  size 
)

◆ set_preferences()

void set_preferences ( void menu,
dt_lib_module_t self 
)

◆ views()

const char ** views ( dt_lib_module_t self)

Variable Documentation

◆ _dndactive

gboolean _dndactive = FALSE
static

Referenced by _drag_data_inserted().

◆ _labels

const char* _labels[]
static

Referenced by _get_label().