summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2025-01-01 16:25:15 -0800
committerVito Caputo <vcaputo@pengaru.com>2025-01-01 19:32:12 -0800
commit245e0d229518830a9a0398fbe190fb2edffaf0bb (patch)
tree5856093d7f9c98a3045dd5efebbce63942dd5b30 /src
parent99df2027777cb732918ca8aaaa5efcfd75b615d3 (diff)
charts: expose vmon_dump_procs() in a trivial wrapper
libvmon isn't really exposed to the front-end code beyond charts, so it's this or a vwm_charts_t.vmon accessor and callers including libvmon/vmon.h (yuck).
Diffstat (limited to 'src')
-rw-r--r--src/charts.c6
-rw-r--r--src/charts.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/charts.c b/src/charts.c
index 34caf58..cc42469 100644
--- a/src/charts.c
+++ b/src/charts.c
@@ -1454,3 +1454,9 @@ int vwm_charts_update(vwm_charts_t *charts, int *desired_delay_us)
return ret;
}
+
+
+void charts_vmon_dump_procs(vwm_charts_t *charts, FILE *out)
+{
+ vmon_dump_procs(&charts->vmon, out);
+}
diff --git a/src/charts.h b/src/charts.h
index 888fc9d..e42d31c 100644
--- a/src/charts.h
+++ b/src/charts.h
@@ -1,6 +1,8 @@
#ifndef _CHARTS_H
#define _CHARTS_H
+#include <stdio.h> /* just for charts_vmon_dump_procs() */
+
#ifdef USE_XLIB
#include <X11/extensions/Xfixes.h> /* this is just for XserverRegion/vwm_chart_compose_xdamage() */
#include "xserver.h"
@@ -20,6 +22,7 @@ void vwm_charts_rate_decrease(vwm_charts_t *charts);
void vwm_charts_rate_set(vwm_charts_t *charts, unsigned hertz);
void vwm_charts_marker_distance_set(vwm_charts_t *charts, unsigned distance);
int vwm_charts_update(vwm_charts_t *charts, int *desired_delay_us);
+void charts_vmon_dump_procs(vwm_charts_t *charts, FILE *out);
vwm_chart_t * vwm_chart_create(vwm_charts_t *charts, int pid, int width, int height, const char *name);
void vwm_chart_destroy(vwm_charts_t *charts, vwm_chart_t *chart);
© All Rights Reserved