2013-09-08 21:01:37 +00:00
|
|
|
#ifndef __AG_WINDOW_H__
|
|
|
|
#define __AG_WINDOW_H__
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
2014-07-10 21:33:22 +00:00
|
|
|
#include <webkit2/webkit2.h>
|
|
|
|
|
2013-09-08 21:01:37 +00:00
|
|
|
#include "ag-app.h"
|
2013-09-17 17:12:25 +00:00
|
|
|
#include "ag-chart.h"
|
2013-09-08 21:01:37 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-09-19 22:11:03 +00:00
|
|
|
typedef enum {
|
|
|
|
AG_WINDOW_ERROR_EMPTY_CHART,
|
|
|
|
AG_WINDOW_ERROR_NO_NAME,
|
|
|
|
} AgWindowError;
|
|
|
|
|
2013-09-08 21:01:37 +00:00
|
|
|
#define AG_TYPE_WINDOW (ag_window_get_type())
|
2014-07-11 08:33:04 +00:00
|
|
|
#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))
|
2013-09-08 21:01:37 +00:00
|
|
|
#define AG_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), AG_TYPE_WINDOW))
|
|
|
|
#define AG_IS_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), AG_TYPE_WINDOW))
|
2014-07-11 08:33:04 +00:00
|
|
|
#define AG_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), \
|
|
|
|
AG_TYPE_WINDOW, \
|
|
|
|
AgWindowClass))
|
2013-09-08 21:01:37 +00:00
|
|
|
|
2013-09-21 16:37:27 +00:00
|
|
|
typedef struct _AgWindow AgWindow;
|
|
|
|
typedef struct _AgWindowClass AgWindowClass;
|
2013-09-08 21:01:37 +00:00
|
|
|
typedef struct _AgWindowPrivate AgWindowPrivate;
|
|
|
|
|
|
|
|
struct _AgWindow {
|
|
|
|
GtkApplicationWindow parent_instance;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _AgWindowClass {
|
|
|
|
GtkApplicationWindowClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType ag_window_get_type(void) G_GNUC_CONST;
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2014-07-10 21:33:22 +00:00
|
|
|
GtkWidget *ag_window_new(AgApp *app, WebKitWebViewGroup *web_view_group);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-21 16:37:27 +00:00
|
|
|
void ag_window_set_chart(AgWindow *window,
|
|
|
|
AgChart *chart);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-17 17:12:25 +00:00
|
|
|
AgChart *ag_window_get_chart(AgWindow *window);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-17 20:23:10 +00:00
|
|
|
void ag_window_update_from_chart(AgWindow *window);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-21 16:37:27 +00:00
|
|
|
void ag_window_set_uri(AgWindow *window,
|
|
|
|
const gchar *uri);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-18 08:37:48 +00:00
|
|
|
gchar *ag_window_get_uri(AgWindow *window);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-21 16:43:48 +00:00
|
|
|
void ag_window_settings_restore(GtkWindow *window,
|
|
|
|
GSettings *settings);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-21 17:27:14 +00:00
|
|
|
void ag_window_settings_save(GtkWindow *window,
|
|
|
|
GSettings *settings);
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2014-07-03 12:08:51 +00:00
|
|
|
void ag_window_change_tab(AgWindow *window, const gchar *tab_name);
|
2013-09-08 21:01:37 +00:00
|
|
|
|
2013-09-19 22:11:03 +00:00
|
|
|
#define AG_WINDOW_ERROR (ag_window_error_quark())
|
2014-07-10 21:47:39 +00:00
|
|
|
|
2013-09-19 22:11:03 +00:00
|
|
|
GQuark ag_window_error_quark(void);
|
|
|
|
|
2013-09-08 21:01:37 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __AG_WINDOW_H__ */
|
|
|
|
|