28#include <json-glib/json-glib.h>
32#define TIMELINE_MAX_ROWS 4000
33#define POLL_INTERVAL_MS 300
34#define MEMORY_MAX_ROWS 500
35#define MEMORY_REFRESH_TICKS 4
86 if(!
g_strcmp0(
d,
"cacheline"))
return "#ffd080";
89 if(!
g_strcmp0(
d,
"thumbnail"))
return "#bcbcbc";
117 if(!
row || !
_g.timeline_scroll)
return;
126 double target = (
double)y +
alloc.height / 2.0 - page / 2.0;
127 target =
CLAMP(target, 0.0,
MAX(0.0, upper - page));
134 if(
_g.window &&
_g.scroll_target)
146 if(!
_g.decl_map)
return TRUE;
167 if(
uri &&
_g.search_entry)
283 "<tt>%9.3f</tt> <b>%-7s</b> <span foreground=\"%s\">%-10s</span> <b>%-16s</b> "
284 "<a href=\"%s\"><tt>%s</tt></a> <span size=\"small\"><i>%s</i></span>",
301 if(links && links->len)
304 for(guint
i = 0;
i < links->len;
i++)
417 gchar *
hm =
g_strdup_printf(
"<b>%s</b> <span size=\"small\">(%d)</span>", e,
g->count);
468 _g.grouped_last_seq = 0;
525 return (y->size >
x->size) - (y->size <
x->size);
531 return (y->size >
x->size) - (y->size <
x->size);
537 return x->imgid - y->imgid;
542 if(!
_g.mem_box)
return;
573 gchar *
m =
g_strdup_printf(
"<a href=\"%s\"><tt>%s</tt></a> %.2f MiB refs=%d hits=%d <i>%s</i>",
hx,
hx,
595 e->
size / 1048576.0);
649 for(guint
i = 0;
i < ev->
links->len;
i++)
664 if(!
_g.search_list)
return;
677 for(guint
i = 0;
i <
evs->len;
i++)
GtkWidget * dt_gui_main_window(void)
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const dt_colormatrix_t dt_aligned_pixel_t out
GHashTable * pages
row label -> path of the illustration, relative to the destination
void dt_image_cache_get_usage(size_t *current, size_t *max)
GArray * dt_image_cache_get_entries_stats(void)
float *const restrict const size_t k
void dt_mipmap_cache_get_usage(size_t *current, size_t *max)
GArray * dt_mipmap_cache_get_entries_stats(void)
int dt_opencl_is_enabled(void)
GArray * dt_dev_pixelpipe_cache_get_entries_stats(void)
size_t dt_dev_pixelpipe_cache_get_vram_total(void)
void dt_dev_pixelpipe_cache_get_usage(size_t *current, size_t *max)
Pixelpipe cache for storing intermediate results in the pixelpipe.
void copy(TYPE *dest, TYPE *source, size_t num_el)
Copy a flat buffer used to initialize test matrices.
unsigned __int64 uint64_t
void dt_supervisor_events_free(GPtrArray *events)
void dt_supervisor_set_recording(const gboolean on)
void dt_supervisor_events_clear(void)
GPtrArray * dt_supervisor_events_snapshot(void)
GPtrArray * dt_supervisor_events_snapshot_since(const uint64_t after_seq, uint64_t *out_last_seq)
uint64_t dt_supervisor_image_key(const int32_t imgid)
guint dt_supervisor_events_count(void)
uint64_t dt_supervisor_mipmap_key(const int32_t imgid, const int mip)
static GtkWidget * _event_widget(const dt_sv_logged_event_t *ev)
GtkWidget * timeline_list
static gboolean _poll(gpointer u)
static void _wire_hash_label(GtkWidget *label)
static void _group_set_header(_group_t *g)
GtkWidget * timeline_scroll
static void _run_search(const char *query)
static void _on_groupby_changed(GtkComboBox *c, gpointer u)
uint64_t grouped_last_seq
#define TIMELINE_MAX_ROWS
static void _clear_list(GtkWidget *list)
static void _timeline_append(const dt_sv_logged_event_t *ev)
#define MEMORY_REFRESH_TICKS
static gint _cmp_image_imgid(gconstpointer a, gconstpointer b)
static void _on_search_changed(GtkSearchEntry *e, gpointer u)
static void _links_free(gpointer p)
static void _group_free(gpointer p)
static const char * _domain_color(const char *d)
static void _on_toggle(GtkToggleButton *t, gpointer u)
void dt_gui_supervisor_window_show(void)
static gboolean _on_label_button(GtkWidget *label, GdkEventButton *e, gpointer u)
static gboolean _on_link(GtkLabel *label, gchar *uri, gpointer user_data)
static void _grouped_append(const dt_sv_logged_event_t *ev, const char *by)
static void _update_count(void)
static void _add_usage_bar(GtkWidget *box, const char *title, const size_t cur, const size_t max)
static gint _cmp_mip_size(gconstpointer a, gconstpointer b)
static gboolean _event_matches(const dt_sv_logged_event_t *ev, const char *hash_needle, const char *text_needle)
static gchar * _hashhex(const uint64_t h)
static void _on_search_this_hash(GtkMenuItem *item, gpointer u)
static void _rebuild_grouped_now(void)
static void _on_destroy(GtkWidget *w, gpointer u)
static void _on_record_toggled(GtkToggleButton *t, gpointer u)
static void _on_page_changed(GtkNotebook *nb, GtkWidget *page, guint page_num, gpointer u)
static GtkWidget * _collapsible(const char *header_markup, GtkWidget *body, const gboolean expanded)
static gint _cmp_pixel_size(gconstpointer a, gconstpointer b)
static void _rebuild_memory(void)
static gboolean _hex_contains(const uint64_t h, const char *needle)
static const char * _group_key(const dt_sv_logged_event_t *ev, const char *by)
static void _full_reload(void)
static void _scroll_row_into_view(GtkWidget *row)
static gchar * _header_markup(const dt_sv_logged_event_t *ev)
static GtkWidget * _event_body_from(const char *json, GArray *links)
static gchar * _pretty_json(const char *compact)
static void _on_refresh(GtkButton *b, gpointer u)
static gboolean _scroll_target_idle(gpointer u)
static void _timeline_trim(void)
static void _add_mem_item(GtkWidget *box, const char *markup, const char *trailing)
static void _on_clear(GtkButton *b, gpointer u)
static gboolean _scroll_bottom_idle(gpointer u)
static void _grouped_catch_up(void)
typedef double((*spd)(unsigned long int wavelength, double TempK))