OSDN Git Service

fixed various gtk3 deprecation warnings
[eb123/eb123.git] / src / mainwnd.h
1
2 #ifndef __MAINWND_H__
3 #define __MAINWND_H__
4
5 #include "builder.h"
6 #include "dicts.h"
7 #include "prefs.h"
8 #include "dump.h"
9 #include "history.h"
10 #include "hotkeys.h"
11 #include "textview.h"
12 #include "popupwnd.h"
13
14 G_BEGIN_DECLS
15
16 #define TYPE_MAINWND (mainwnd_get_type ())
17 #define MAINWND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAINWND, Mainwnd))
18 #define MAINWND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAINWND, MainwndClass))
19 #define IS_MAINWND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAINWND))
20 #define IS_MAINWND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAINWND))
21 #define MAINWND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAINWND, MainwndClass))
22
23 typedef struct _Mainwnd Mainwnd;
24 typedef struct _MainwndClass MainwndClass;
25
26 struct _Mainwnd {
27     GtkWindow   parent_instance;
28     Builder     *builder;
29     Dicts       *dicts;
30     Prefs       *prefs;
31     History     *history;
32     Hotkeys     *hotkeys;
33     Dump        *dump;
34     GSequence   *results;
35     TextView    *text;
36     Popupwnd    *popupwnd;
37     gchar       *word;
38     GtkCellRenderer *dictr;
39     gint        indent;
40     gulong change_id;
41 };
42
43 struct _MainwndClass {
44     GtkWindowClass parent_class;
45 };
46
47 void            mainwnd_show_about(GtkWidget *w, gpointer data);
48 void            mainwnd_prepare(Mainwnd *self);
49 void            mainwnd_dicts_update(Mainwnd *self);
50 GtkWindow*      mainwnd_get_wnd();
51 GSequence*      mainwnd_get_results();
52 gint            mainwnd_get_search_method();
53 gboolean        mainwnd_get_dicts(GtkTreeModel **store, GtkTreeIter *iter);
54 void            mainwnd_insert_text(gchar *txt, gboolean clear);
55 void            mainwnd_search(Mainwnd *self, const gchar *word, gint method);
56 void            mainwnd_open(Mainwnd *self, RESULT *res);
57 void            mainwnd_reset_font(Mainwnd *self);
58 void            mainwnd_reset_headwords(Mainwnd *self);
59 gint            mainwnd_get_font_size();
60 void            mainwnd_exit();
61
62 GType          mainwnd_get_type (void);
63
64 G_END_DECLS
65
66 void            mainwnd_search_(gpointer data);
67 void            mainwnd_clear_combo(gpointer data);
68 void            mainwnd_iconify_restore(gpointer data);
69 void            mainwnd_search_selection(gpointer data);
70 void            mainwnd_find(gpointer data);
71
72 #endif /* __MAINWND_H__ */