summaryrefslogtreecommitdiffstats
path: root/src/report/report-data-html.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:00:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:00:20 +0000
commitfcb4cb5c3d0fec0fede160d565134d553d783fb2 (patch)
tree7be42535554ca6badc1847d83ef123f4dc3c5506 /src/report/report-data-html.h
parentInitial commit. (diff)
downloadpowertop-fcb4cb5c3d0fec0fede160d565134d553d783fb2.tar.xz
powertop-fcb4cb5c3d0fec0fede160d565134d553d783fb2.zip
Adding upstream version 2.15.upstream/2.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/report/report-data-html.h')
-rw-r--r--src/report/report-data-html.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/report/report-data-html.h b/src/report/report-data-html.h
new file mode 100644
index 0000000..e506f5a
--- /dev/null
+++ b/src/report/report-data-html.h
@@ -0,0 +1,76 @@
+#ifndef PowerTop_REPORT_DATA_HTML_H_C58C116411234A34AC2EFB8D23A69713
+#define PowerTop_REPORT_DATA_HTML_H_C58C116411234A34AC2EFB8D23A69713
+
+#include <string>
+#include <sstream>
+
+using namespace std;
+
+struct tag_attr {
+ const char *css_class;
+ const char *css_id;
+};
+/* T:Top, L:Left, TL:Top-Left, TLC: Top-Left-Center */
+enum position { T, L, TL, TC, TLC };
+
+struct table_attributes {
+ const char *table_class;
+ const char *td_class;
+ const char *tr_class;
+ const char *th_class;
+ position pos_table_title;
+ int title_mod;
+ int rows;
+ int cols;
+};
+
+struct table_size {
+ int rows;
+ int cols;
+};
+
+
+/* Definition of css attributes for the cases that apply to powertop
+ * html report
+ * */
+
+void
+init_div(struct tag_attr *div_attr, const char *css_class, const char *css_id);
+
+void
+init_top_table_attr(struct table_attributes *table_css, int rows, int cols);
+
+void
+init_title_attr(struct tag_attr *title_attr);
+
+void
+init_std_table_attr(struct table_attributes *table_css, int rows, int cols);
+
+void
+init_std_side_table_attr(struct table_attributes *table_css, int rows,
+ int cols);
+
+void
+init_pkg_table_attr(struct table_attributes *table_css, int rows, int cols);
+
+void
+init_core_table_attr(struct table_attributes *table_css, int title_mod,
+ int rows, int cols);
+
+void
+init_cpu_table_attr(struct table_attributes *table_css, int title_mod,
+ int rows, int cols);
+void
+init_nowarp_table_attr(struct table_attributes *table_css, int rows, int cols);
+
+void
+init_tune_table_attr(struct table_attributes *table_css, int rows, int cols);
+
+void
+init_wakeup_table_attr(struct table_attributes *table_css, int rows, int cols);
+
+/* Other helper functions */
+string
+double_to_string(double dval);
+
+#endif