From fcb4cb5c3d0fec0fede160d565134d553d783fb2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:00:20 +0200 Subject: Adding upstream version 2.15. Signed-off-by: Daniel Baumann --- src/report/report-data-html.h | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/report/report-data-html.h (limited to 'src/report/report-data-html.h') 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 +#include + +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 -- cgit v1.2.3