~ubuntu-branches/ubuntu/vivid/xiphos/vivid-proposed

« back to all changes in this revision

Viewing changes to src/editor/webkit_editor.h

  • Committer: Package Import Robot
  • Author(s): Dimitri John Ledkov
  • Date: 2014-07-12 17:08:46 UTC
  • mfrom: (17.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140712170846-1lcybpijz5fn72fg
Tags: 3.2.2+dfsg1-1
* New upstream release.
* Bump standards version.
* Switch uscan to sf.net redirector.
* Unpack waf in get-orig-source target.
* Bump to debhelper 9.
* Add uuid-dev build-dep.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Xiphos Bible Study Tool
 
3
 * webkit_editor.h - html editor using webkit 
 
4
 *
 
5
 * Copyright (C) 2005-2014 Xiphos Developer Team
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef _WEBKIT_EDITOR_H
 
23
#define _WEBKIT_EDITOR_H
 
24
 
 
25
        
 
26
#include <config.h>
 
27
 
 
28
#ifdef __cplusplus
 
29
extern "C"
 
30
{
 
31
#endif
 
32
 
 
33
        
 
34
#ifdef USE_WEBKIT_EDITOR
 
35
 
 
36
#include <gtk/gtk.h>
 
37
 
 
38
#include "main/navbar_versekey.h"
 
39
 
 
40
struct _tool_items {
 
41
        GtkToggleToolButton *bold;
 
42
        GtkToggleToolButton *italic;
 
43
        GtkToggleToolButton *underline;
 
44
        GtkToggleToolButton *strike;
 
45
        GtkColorButton *color;
 
46
        GtkToolButton *newdoc;
 
47
        GtkToolButton *open;
 
48
        GtkToolButton *deletedoc;
 
49
        GtkComboBoxText *cb;
 
50
        gint outline_level;
 
51
};
 
52
typedef struct _tool_items TOOL_ITEMS;
 
53
 
 
54
typedef struct _editor EDITOR;
 
55
struct _editor {
 
56
        GtkWidget *window;
 
57
        GtkWidget *box;
 
58
        GtkWidget *scrollwindow;
 
59
        GtkWidget *toolbar;
 
60
    GtkWidget *treeview;
 
61
        GtkWidget *sync_button;
 
62
        GtkWidget *html_widget;
 
63
        GtkWidget *statusbar;
 
64
        GtkWidget *navbar_box;
 
65
        NAVBAR_VERSEKEY navbar;
 
66
        TOOL_ITEMS toolitems;
 
67
                
 
68
        gint type;
 
69
 
 
70
        gboolean studypad;
 
71
        gboolean noteeditor;
 
72
        gboolean bookeditor;
 
73
        gboolean is_changed;
 
74
        gboolean sync;
 
75
 
 
76
        gchar *filename;
 
77
        gchar *module;
 
78
        gchar *key;
 
79
};
 
80
 
 
81
enum {
 
82
        STUDYPAD_EDITOR,
 
83
        NOTE_EDITOR,
 
84
        BOOK_EDITOR
 
85
};
 
86
 
 
87
 
 
88
struct _menu {
 
89
        GtkWidget *menu;
 
90
        GtkWidget *cut;
 
91
        GtkWidget *copy;
 
92
        GtkWidget *paste;
 
93
        //GtkWidget *;
 
94
};
 
95
typedef struct _menu MENU;
 
96
 
 
97
extern MENU popup;
 
98
 
 
99
struct _find_dialog {
 
100
        GtkWidget *window;
 
101
        GtkWidget *find_entry;
 
102
        GtkWidget *replace_entry;
 
103
        GtkWidget *box_replace;
 
104
        GtkWidget *button_replace;
 
105
        //GtkWidget *;
 
106
        //GtkWidget *;
 
107
};
 
108
typedef struct _find_dialog FIND_DIALOG;
 
109
 
 
110
extern FIND_DIALOG find_dialog;
 
111
 
 
112
struct _buttons_state {
 
113
        gint bold;
 
114
        gint italic;
 
115
        gint underline;
 
116
        gint strike;
 
117
        gint style;
 
118
        gint nochange;
 
119
        gchar *color;
 
120
};
 
121
typedef struct _buttons_state BUTTONS_STATE;
 
122
   
 
123
void action_about_activate_cb (GtkWidget *widget, EDITOR * e);   
 
124
 
 
125
void action_increase_indent_activate_cb (GtkWidget *widget, EDITOR * e); 
 
126
void action_decrease_indent_activate_cb (GtkWidget *widget, EDITOR * e); 
 
127
 
 
128
void action_insert_image_activate_cb (GtkWidget *widget, EDITOR * e);
 
129
void action_insert_rule_activate_cb (GtkWidget *widget, EDITOR * e);  
 
130
void action_insert_table_activate_cb (GtkWidget *widget, EDITOR * e); 
 
131
void action_insert_emoticon_activate_cb (GtkWidget *widget, EDITOR * e); 
 
132
void action_insert_sword_link_activate_cb (GtkWidget * widget, gpointer data);
 
133
void action_insert_link_activate_cb (GtkWidget * widget, EDITOR *e);
 
134
 
 
135
 
 
136
void action_insert_outline_activate_cb (GtkWidget *widget, EDITOR * e);
 
137
 
 
138
void action_justify_right_activate_cb (GtkWidget *widget, EDITOR * e); 
 
139
void action_justify_left_activate_cb (GtkWidget *widget, EDITOR * e); 
 
140
void action_justify_center_activate_cb (GtkWidget *widget, EDITOR * e); 
 
141
void action_justify_full_activate_cb (GtkWidget *widget, EDITOR * e); 
 
142
 
 
143
void action_bold_activate_cb (GtkWidget *widget, EDITOR * e);
 
144
void action_italic_activate_cb (GtkWidget *widget, EDITOR * e);     
 
145
void action_underline_activate_cb (GtkWidget *widget, EDITOR * e); 
 
146
void action_strikethrough_activate_cb (GtkWidget *widget, EDITOR * e);
 
147
 
 
148
void action_undo_activate_cb (GtkWidget *widget, EDITOR * e);  
 
149
void action_redo_activate_cb (GtkWidget *widget, EDITOR * e); 
 
150
 
 
151
void action_cut_activate_cb (GtkWidget *widget, EDITOR * e); 
 
152
void action_copy_activate_cb (GtkWidget *widget, EDITOR * e); 
 
153
void action_paste_activate_cb (GtkWidget *widget, EDITOR * e); 
 
154
void action_delete_activate_cb (GtkWidget *widget, EDITOR * e);
 
155
void action_delete_item_activate_cb (GtkWidget *widget, EDITOR * e);
 
156
 
 
157
void set_button_state(BUTTONS_STATE state, EDITOR * e);
 
158
void action_fontcolor_activate_cb (GtkWidget *widget, EDITOR * e); 
 
159
void action_font_activate_cb (GtkWidget *widget, EDITOR * e); 
 
160
void find_replace_response_cb (GtkDialog *dialog, gint response_id,
 
161
                                                  EDITOR * e);
 
162
void action_replace_activate_cb (GtkWidget *widget, EDITOR * e);
 
163
void action_find_activate_cb (GtkWidget *widget, EDITOR * e); 
 
164
int delete_event (GtkWidget *widget, GdkEvent  *event, EDITOR * e);
 
165
void action_quit_activate_cb (GtkWidget *widget, EDITOR * e);
 
166
void action_new_activate_cb (GtkWidget *widget, EDITOR *e); 
 
167
void action_open_activate_cb (GtkWidget *widget, EDITOR *e);
 
168
void action_print_cb (GtkAction *action, EDITOR *e);
 
169
void action_print_preview_cb (GtkAction *action, EDITOR *e); 
 
170
void action_save_activate_cb (GtkWidget *widget, EDITOR * e); 
 
171
void action_save_as_activate_cb (GtkWidget *widget, EDITOR * e); 
 
172
 
 
173
void editor_sync_with_main(void);
 
174
void editor_load_note(EDITOR * e, const gchar * module_name, const gchar * key);
 
175
void editor_load_book(EDITOR * e);
 
176
gint editor_create_new(const gchar * filename, const gchar * key, gint note);
 
177
void editor_save_book(EDITOR * e);
 
178
void editor_maybe_save_all(void);
 
179
gint ask_about_saving(EDITOR * e);
 
180
void  colorbutton1_color_set_cb (GtkColorButton *widget, EDITOR * e );
 
181
void  colorbutton_highlight_color_set_cb (GtkColorButton *widget, EDITOR * e );
 
182
void combo_box_changed_cb (GtkComboBox *widget, EDITOR * e);
 
183
 
 
184
#ifdef __cplusplus
 
185
}
 
186
#endif /* USE_WEBKIT_EDITOR */
 
187
#endif
 
188
#endif /* _WEBKIT_EDITOR_H */