OSDN Git Service

fixed various gtk3 deprecation warnings
[eb123/eb123.git] / src / history.h
1
2 #ifndef __HISTORY_H_
3 #define __HISTORY_H_
4
5 #include "builder.h"
6 #include "prefs.h"
7
8 G_BEGIN_DECLS
9
10 #define TYPE_HISTORY (history_get_type ())
11 #define HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY, History))
12 #define HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY, HistoryClass))
13 #define IS_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY))
14 #define IS_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY))
15 #define HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY, HistoryClass))
16
17 typedef struct _History History;
18 typedef struct _HistoryClass HistoryClass;
19
20 struct _History {
21     GObject         parent_instance;
22     GList           *list;
23     Builder         *builder;
24     Prefs           *prefs;
25 };
26
27 struct _HistoryClass {
28     GObjectClass    parent_class;
29 };
30
31 void        history_insert_word(History *self, const gchar *word);
32 void        history_insert_res(History *self, RESULT *res);
33 void        history_prev(gpointer data);
34
35 void        history_save_words(History *self);
36 void        history_load_words(History *self);
37
38 RESULT*     history_last_result(History *self);
39
40 GType       history_get_type (void);
41
42 G_END_DECLS
43
44 void        history_free_data(RESULT *res);
45
46 RESULT*     result_new(BOOK_INFO *binfo, EB_Position *pos);
47 RESULT*     result_duplicate(RESULT *res);
48 void        result_copy(RESULT *to, RESULT *from);
49 void        result_free(gpointer data);
50 void        result_clear_all();
51 gboolean    result_compare(RESULT *res1, RESULT *res2);
52
53 #endif /* __HISTORY_H_ */