aboutsummaryrefslogtreecommitdiff
path: root/includes/loadgraph.h
diff options
context:
space:
mode:
authorSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 15:19:47 -0500
committerSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 15:19:47 -0500
commit7aacc9f2510901c9e97b30fa9bcb550bb7f99c03 (patch)
tree16908948750c11da8332d80d8bb9b339399ee4d7 /includes/loadgraph.h
parent7c47b5b9584f5011aeba18d7e1b26b3d3124825f (diff)
New upstream version 0.5.1+git20170605
Diffstat (limited to 'includes/loadgraph.h')
-rw-r--r--includes/loadgraph.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/includes/loadgraph.h b/includes/loadgraph.h
new file mode 100644
index 00000000..1eae976f
--- /dev/null
+++ b/includes/loadgraph.h
@@ -0,0 +1,75 @@
+/*
+ * Simple Load Graph
+ * Copyright (C) 2006 Leandro A. F. Pereira <leandro@hardinfo.org>
+ *
+ * The Simple Load Graph is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License, version 2.1, as published by the Free Software Foundation.
+ *
+ * The Simple Load Graph is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the Simple Load Graph; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA.
+ */
+
+
+#ifndef __LOADGRAPH_H__
+#define __LOADGRAPH_H__
+
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <math.h>
+/*#include <libintl.h>
+#include <locale.h>
+#define _(STRING) gettext(STRING)
+#define N_(STRING) (STRING)*/
+
+
+
+typedef struct _LoadGraph LoadGraph;
+
+typedef enum {
+ LG_COLOR_GREEN = 0x4FB05A,
+ LG_COLOR_BLUE = 0x4F58B0,
+ LG_COLOR_RED = 0xB04F4F
+} LoadGraphColor;
+
+struct _LoadGraph {
+ GdkPixmap *buf;
+ GtkWidget *area;
+
+ GdkGC *grid;
+ GdkGC *trace;
+ GdkGC *fill;
+
+ gint *data;
+ gfloat scale;
+
+ gint size;
+ gint width, height;
+ LoadGraphColor color;
+
+ gint max_value, remax_count;
+
+ PangoLayout *layout;
+ gchar *suffix;
+};
+
+LoadGraph *load_graph_new(gint size);
+void load_graph_destroy(LoadGraph *lg);
+void load_graph_configure_expose(LoadGraph *lg);
+GtkWidget *load_graph_get_framed(LoadGraph *lg);
+
+void load_graph_update(LoadGraph *lg, gint value);
+void load_graph_set_color(LoadGraph *lg, LoadGraphColor color);
+void load_graph_clear(LoadGraph *lg);
+
+void load_graph_set_data_suffix(LoadGraph *lg, gchar *suffix);
+gchar *load_graph_get_data_suffix(LoadGraph *lg);
+
+#endif /* __LOADGRAPH_H__ */