summaryrefslogtreecommitdiff
path: root/src/load-graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/load-graph.h')
-rw-r--r--src/load-graph.h128
1 files changed, 64 insertions, 64 deletions
diff --git a/src/load-graph.h b/src/load-graph.h
index 5164a4c..2a212fb 100644
--- a/src/load-graph.h
+++ b/src/load-graph.h
@@ -6,96 +6,96 @@
enum
{
- LOAD_GRAPH_CPU,
- LOAD_GRAPH_MEM,
- LOAD_GRAPH_NET
+ LOAD_GRAPH_CPU,
+ LOAD_GRAPH_MEM,
+ LOAD_GRAPH_NET
};
enum {
- CPU_TOTAL,
- CPU_USED,
- N_CPU_STATES
+ CPU_TOTAL,
+ CPU_USED,
+ N_CPU_STATES
};
struct LoadGraphLabels
{
- GtkWidget *cpu[GLIBTOP_NCPU];
- GtkWidget *memory;
- GtkWidget *swap;
- GtkWidget *net_in;
- GtkWidget *net_in_total;
- GtkWidget *net_out;
- GtkWidget *net_out_total;
+ GtkWidget *cpu[GLIBTOP_NCPU];
+ GtkWidget *memory;
+ GtkWidget *swap;
+ GtkWidget *net_in;
+ GtkWidget *net_in_total;
+ GtkWidget *net_out;
+ GtkWidget *net_out_total;
};
struct LoadGraph {
- static const unsigned NUM_POINTS = 60 + 2;
- static const unsigned GRAPH_MIN_HEIGHT = 40;
+ static const unsigned NUM_POINTS = 60 + 2;
+ static const unsigned GRAPH_MIN_HEIGHT = 40;
- LoadGraph(guint type);
- ~LoadGraph();
+ LoadGraph(guint type);
+ ~LoadGraph();
- unsigned num_bars() const;
- void clear_background();
+ unsigned num_bars() const;
+ void clear_background();
- double fontsize;
- double rmargin;
- double indent;
+ double fontsize;
+ double rmargin;
+ double indent;
- guint n;
- gint type;
- guint speed;
- guint draw_width, draw_height;
- guint render_counter;
- guint frames_per_unit;
- guint graph_dely;
- guint real_draw_height;
- double graph_delx;
- guint graph_buffer_offset;
+ guint n;
+ gint type;
+ guint speed;
+ guint draw_width, draw_height;
+ guint render_counter;
+ guint frames_per_unit;
+ guint graph_dely;
+ guint real_draw_height;
+ double graph_delx;
+ guint graph_buffer_offset;
- std::vector<GdkColor> colors;
+ std::vector<GdkColor> colors;
- std::vector<float> data_block;
- gfloat* data[NUM_POINTS];
+ std::vector<float> data_block;
+ gfloat* data[NUM_POINTS];
- GtkWidget *main_widget;
- GtkWidget *disp;
+ GtkWidget *main_widget;
+ GtkWidget *disp;
#if GTK_CHECK_VERSION(3,0,0)
- cairo_surface_t *background;
+ cairo_surface_t *background;
#else
- GdkDrawable *background;
+ GdkDrawable *background;
#endif
- guint timer_index;
-
- gboolean draw;
-
- LoadGraphLabels labels;
- GtkWidget *mem_color_picker;
- GtkWidget *swap_color_picker;
-
- /* union { */
- struct {
- guint now; /* 0 -> current, 1 -> last
- now ^ 1 each time */
- /* times[now], times[now ^ 1] is last */
- guint64 times[2][GLIBTOP_NCPU][N_CPU_STATES];
- } cpu;
-
- struct {
- guint64 last_in, last_out;
- GTimeVal time;
- guint64 max;
- unsigned values[NUM_POINTS];
- size_t cur;
- } net;
- /* }; */
+ guint timer_index;
+
+ gboolean draw;
+
+ LoadGraphLabels labels;
+ GtkWidget *mem_color_picker;
+ GtkWidget *swap_color_picker;
+
+ /* union { */
+ struct {
+ guint now; /* 0 -> current, 1 -> last
+ now ^ 1 each time */
+ /* times[now], times[now ^ 1] is last */
+ guint64 times[2][GLIBTOP_NCPU][N_CPU_STATES];
+ } cpu;
+
+ struct {
+ guint64 last_in, last_out;
+ GTimeVal time;
+ guint64 max;
+ unsigned values[NUM_POINTS];
+ size_t cur;
+ } net;
+ /* }; */
};
@@ -115,7 +115,7 @@ load_graph_stop (LoadGraph *g);
/* Change load graph speed and restart it if it has been previously started */
void
load_graph_change_speed (LoadGraph *g,
- guint new_speed);
+ guint new_speed);
LoadGraphLabels*
load_graph_get_labels (LoadGraph *g) G_GNUC_CONST;