diff --git a/src/ag-window.c b/src/ag-window.c index 843f59f..7f1b036 100644 --- a/src/ag-window.c +++ b/src/ag-window.c @@ -41,6 +41,8 @@ struct _AgWindowPrivate { gchar *uri; }; +G_DEFINE_QUARK(ag-window-error-quark, ag_window_error); + G_DEFINE_TYPE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW); #define GET_PRIVATE(instance) (G_TYPE_INSTANCE_GET_PRIVATE((instance), AG_TYPE_WINDOW, AgWindowPrivate)) diff --git a/src/ag-window.h b/src/ag-window.h index c0a2d1e..3034bb4 100644 --- a/src/ag-window.h +++ b/src/ag-window.h @@ -7,6 +7,11 @@ G_BEGIN_DECLS +typedef enum { + AG_WINDOW_ERROR_EMPTY_CHART, + AG_WINDOW_ERROR_NO_NAME, +} AgWindowError; + #define AG_TYPE_WINDOW (ag_window_get_type()) #define AG_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST((o), AG_TYPE_WINDOW, AgWindow)) #define AG_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), AG_TYPE_WINDOW, AgWindowClass)) @@ -35,6 +40,9 @@ void ag_window_update_from_chart(AgWindow *window); void ag_window_set_uri(AgWindow *window, const gchar *uri); gchar *ag_window_get_uri(AgWindow *window); +#define AG_WINDOW_ERROR (ag_window_error_quark()) +GQuark ag_window_error_quark(void); + G_END_DECLS #endif /* __AG_WINDOW_H__ */