Created functions ag_window_{set,get}_chart()

This commit is contained in:
Gergely Polonkai 2013-09-17 19:12:25 +02:00
parent a20c84161c
commit 20446a9fb6
2 changed files with 17 additions and 0 deletions

View File

@ -333,3 +333,17 @@ ag_window_new(AgApp *app)
return GTK_WIDGET(window); return GTK_WIDGET(window);
} }
void
ag_window_set_chart(AgWindow *window, AgChart *chart)
{
g_object_unref(window->priv->chart);
window->priv->chart = chart;
g_object_ref(chart);
}
AgChart *
ag_window_get_chart(AgWindow *window)
{
return window->priv->chart;
}

View File

@ -3,6 +3,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "ag-app.h" #include "ag-app.h"
#include "ag-chart.h"
G_BEGIN_DECLS G_BEGIN_DECLS
@ -28,6 +29,8 @@ struct _AgWindowClass {
GType ag_window_get_type(void) G_GNUC_CONST; GType ag_window_get_type(void) G_GNUC_CONST;
GtkWidget *ag_window_new(AgApp *app); GtkWidget *ag_window_new(AgApp *app);
void ag_window_set_chart(AgWindow *window, AgChart *chart);
AgChart *ag_window_get_chart(AgWindow *window);
G_END_DECLS G_END_DECLS