summaryrefslogtreecommitdiffstats
path: root/src/report/report-data-html.h
diff options
context:
space:
mode:
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