2 * h/t https://ptomato.name/advanced-gtk-techniques/html/custom-container.html
3 * for examples of how to make GTK widgets
9 #define BV_CHART_PRIVATE(obj) \
10 (G_TYPE_INSTANCE_GET_PRIVATE((obj), BV_CHART_TYPE, BVChartPrivate))
12 typedef struct _BVChartPrivate BVChartPrivate
;
14 struct _BVChartPrivate
{
18 G_DEFINE_TYPE_WITH_CODE(BVChart
, bv_chart
, GTK_TYPE_DRAWING_AREA
,
19 G_ADD_PRIVATE(BVChart
))
21 static void bv_chart_class_init(BVChartClass
*klass
__attribute__((unused
))) {}
23 static void bv_chart_init(BVChart
*chart
) {
24 gtk_widget_set_has_window(GTK_WIDGET(chart
), FALSE
);
27 GtkWidget
*bv_chart_new() {
28 return GTK_WIDGET(g_object_new(bv_chart_get_type(), NULL
));