X-Git-Url: http://git.scottworley.com/batteryviewer/blobdiff_plain/cecfa92673d27e915f1e83611eebcfc072057cdb..5a9453723d439ed0e58681d7c0955c9f2e348b4d:/chart.h?ds=sidebyside diff --git a/chart.h b/chart.h new file mode 100644 index 0000000..7cda505 --- /dev/null +++ b/chart.h @@ -0,0 +1,39 @@ +#ifndef BV_CHART_H +#define BV_CHART_H + +/* + * h/t https://ptomato.name/advanced-gtk-techniques/html/custom-container.html + * for examples of how to make GTK widgets + */ + +#include +#include + +G_BEGIN_DECLS + +#define BV_CHART_TYPE (bv_chart_get_type()) +#define BV_CHART(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), BV_CHART_TYPE, BVChart)) +#define BV_CHART_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), BV_CHART_TYPE, BVChartClass)) +#define BV_IS_CHART(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BV_CHART_TYPE)) +#define BV_IS_CHART_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), BV_CHART_TYPE)) + +typedef struct _BVChart BVChart; +typedef struct _BVChartClass BVChartClass; + +struct _BVChart { + GtkDrawingArea parent_instance; +}; + +struct _BVChartClass { + GtkDrawingAreaClass parent_class; +}; + +GType bv_chart_get_type(void) G_GNUC_CONST; +GtkWidget *bv_chart_new(void); + +G_END_DECLS + +#endif /* BV_CHART_H */