pidgin/gtkwebview.h

Sun, 29 Jul 2012 11:36:05 +0200

author
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
date
Sun, 29 Jul 2012 11:36:05 +0200
changeset 33212
970a460e74fa
parent 33083
e96acbe0e928
child 33221
0215244831ec
permissions
-rw-r--r--

Fix compilation for GTK2

32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
1 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
2 * @file gtkwebview.h Wrapper over the Gtk WebKitWebView component
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
3 * @ingroup pidgin
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
4 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
5
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
6 /* pidgin
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
7 *
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
8 * Pidgin is the legal property of its developers, whose names are too numerous
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
10 * source distribution.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
11 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
13 * it under the terms of the GNU General Public License as published by
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
16 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
21 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
25 *
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
26 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
27
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
28 #ifndef _PIDGIN_WEBVIEW_H_
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
29 #define _PIDGIN_WEBVIEW_H_
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
30
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
31 #include <glib.h>
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
32 #include <gtk/gtk.h>
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
33 #include <webkit/webkit.h>
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
34
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
35 #define GTK_TYPE_WEBVIEW (gtk_webview_get_type())
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
36 #define GTK_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_WEBVIEW, GtkWebView))
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
37 #define GTK_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_WEBVIEW, GtkWebViewClass))
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
38 #define GTK_IS_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_WEBVIEW))
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
39 #define GTK_IS_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_WEBVIEW))
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
40 #define GTK_WEBVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_WEBVIEW, GtkWebViewClass))
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
41
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
42 typedef enum {
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
43 GTK_WEBVIEW_BOLD = 1 << 0,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
44 GTK_WEBVIEW_ITALIC = 1 << 1,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
45 GTK_WEBVIEW_UNDERLINE = 1 << 2,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
46 GTK_WEBVIEW_GROW = 1 << 3,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
47 GTK_WEBVIEW_SHRINK = 1 << 4,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
48 GTK_WEBVIEW_FACE = 1 << 5,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
49 GTK_WEBVIEW_FORECOLOR = 1 << 6,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
50 GTK_WEBVIEW_BACKCOLOR = 1 << 7,
32896
a9cbf3a55393 Having a backcolor and a background seems a bit redundant. And we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32895
diff changeset
51 GTK_WEBVIEW_LINK = 1 << 8,
a9cbf3a55393 Having a backcolor and a background seems a bit redundant. And we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32895
diff changeset
52 GTK_WEBVIEW_IMAGE = 1 << 9,
a9cbf3a55393 Having a backcolor and a background seems a bit redundant. And we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32895
diff changeset
53 GTK_WEBVIEW_SMILEY = 1 << 10,
a9cbf3a55393 Having a backcolor and a background seems a bit redundant. And we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32895
diff changeset
54 GTK_WEBVIEW_LINKDESC = 1 << 11,
a9cbf3a55393 Having a backcolor and a background seems a bit redundant. And we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32895
diff changeset
55 GTK_WEBVIEW_STRIKE = 1 << 12,
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
56 /** Show custom smileys when appropriate. */
32896
a9cbf3a55393 Having a backcolor and a background seems a bit redundant. And we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32895
diff changeset
57 GTK_WEBVIEW_CUSTOM_SMILEY = 1 << 13,
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
58 GTK_WEBVIEW_ALL = -1
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
59 } GtkWebViewButtons;
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
60
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
61 typedef struct _GtkWebView GtkWebView;
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
62 typedef struct _GtkWebViewClass GtkWebViewClass;
32460
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
63
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
64 struct _GtkWebView
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
65 {
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
66 WebKitWebView parent;
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
67 };
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
68
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
69 struct _GtkWebViewClass
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
70 {
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
71 WebKitWebViewClass parent;
32811
87c1f3bb5461 Add some formatting signals to webview from imhtml.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32810
diff changeset
72
87c1f3bb5461 Add some formatting signals to webview from imhtml.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32810
diff changeset
73 void (*buttons_update)(GtkWebView *, GtkWebViewButtons);
87c1f3bb5461 Add some formatting signals to webview from imhtml.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32810
diff changeset
74 void (*toggle_format)(GtkWebView *, GtkWebViewButtons);
87c1f3bb5461 Add some formatting signals to webview from imhtml.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32810
diff changeset
75 void (*clear_format)(GtkWebView *);
87c1f3bb5461 Add some formatting signals to webview from imhtml.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32810
diff changeset
76 void (*update_format)(GtkWebView *);
33007
78b670090850 Add a changed signal shortcut for editable webview changes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33004
diff changeset
77 void (*changed)(GtkWebView *);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
78 };
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
79
32790
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32772
diff changeset
80 G_BEGIN_DECLS
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
81
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
82 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
83 * Returns the GType for a GtkWebView widget
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
84 *
32657
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
85 * @return The GType for GtkWebView widget
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
86 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
87 GType gtk_webview_get_type(void);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
88
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
89 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
90 * Create a new GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
91 *
32657
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
92 * @return A GtkWidget corresponding to the GtkWebView object
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
93 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
94 GtkWidget *gtk_webview_new(void);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
95
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
96 /**
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
97 * TODO WEBKIT: Right now this just tests whether an append has been called
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
98 * since the last clear or since the Widget was created. So it does not
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
99 * test for load_string's called in between.
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
100 *
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
101 * @param webview The GtkWebView object
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
102 *
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
103 * @return gboolean indicating whether the webview is empty
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
104 */
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
105 gboolean gtk_webview_is_empty(GtkWebView *webview);
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
106
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
107 /**
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
108 * A very basic routine to append html, which can be considered
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
109 * equivalent to a "document.write" using JavaScript.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
110 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
111 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
112 * @param markup The html markup to append
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
113 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
114 void gtk_webview_append_html(GtkWebView *webview, const char *markup);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
115
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
116 /**
33054
177359654a3d Update the webview to use the new image sources.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33021
diff changeset
117 * Requests loading of the given content.
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
118 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
119 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
120 * @param html The HTML content to load
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
121 */
32993
d6da54acf528 Remove _with_imgstore suffix on this function. There isn't a version
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32896
diff changeset
122 void gtk_webview_load_html_string(GtkWebView *webview, const char *html);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
123
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
124 /**
33083
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
125 * Requests loading of the given content and sets the selection. You must
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
126 * include an anchor tag with id='caret' in the HTML string, which will be
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
127 * used to set the selection. This tag is then removed so that querying the
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
128 * WebView's HTML contents will no longer return it.
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
129 *
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
130 * @param webview The GtkWebView object
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
131 * @param html The HTML content to load
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
132 */
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
133 void gtk_webview_load_html_string_with_selection(GtkWebView *webview, const char *html);
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
134
e96acbe0e928 Move caret selection into GtkWebView code.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33054
diff changeset
135 /**
32460
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
136 * Execute the JavaScript only after the webkit_webview_load_string
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
137 * loads completely. We also guarantee that the scripts are executed
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
138 * in the order they are called here. This is useful to avoid race
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
139 * conditions when calling JS functions immediately after opening the
32460
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
140 * page.
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
141 *
32657
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
142 * @param webview The GtkWebView object
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
143 * @param script The script to execute
32460
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
144 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
145 void gtk_webview_safe_execute_script(GtkWebView *webview, const char *script);
32460
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
146
5771be5530d8 safely execute JS scripts only after loading is done. Untested code as of now, will test it in next commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32441
diff changeset
147 /**
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
148 * A convenience routine to quote a string for use as a JavaScript
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
149 * string. For instance, "hello 'world'" becomes "'hello \\'world\\''"
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
150 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
151 * @param str The string to escape and quote
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
152 *
32657
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
153 * @return The quoted string
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
154 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
155 char *gtk_webview_quote_js_string(const char *str);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
156
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
157 /**
32796
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
158 * Set the vertical adjustment for the GtkWebView.
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
159 *
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
160 * @param webview The GtkWebView object
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
161 * @param vadj The GtkAdjustment that control the webview
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
162 */
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
163 void gtk_webview_set_vadjustment(GtkWebView *webview, GtkAdjustment *vadj);
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
164
34f384b0d75f Rearrange these files a bit to group common functions
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32790
diff changeset
165 /**
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
166 * Scrolls the Webview to the end of its contents.
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
167 *
32657
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
168 * @param webview The GtkWebView object
61386adf01c1 Clean up documentation.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32577
diff changeset
169 * @param smooth A boolean indicating if smooth scrolling should be used
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
170 */
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
171 void gtk_webview_scroll_to_end(GtkWebView *webview, gboolean smooth);
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
172
32772
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
173 /**
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
174 * Scrolls a GtkWebView up by one page.
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
175 *
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
176 * @param webview The GtkWebView.
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
177 */
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
178 void gtk_webview_page_up(GtkWebView *webview);
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
179
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
180 /**
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
181 * Scrolls a GtkWebView down by one page.
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
182 *
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
183 * @param webview The GtkWebView.
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
184 */
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
185 void gtk_webview_page_down(GtkWebView *webview);
9d79ccaeedfe Add page up/down for WebKit view.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32657
diff changeset
186
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
187 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
188 * Enables or disables editing in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
189 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
190 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
191 * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
192 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
193 void gtk_webview_set_editable(GtkWebView *webview, gboolean editable);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
194
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
195 /**
32810
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
196 * Setup formatting for a GtkWebView depending on the flags specified.
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
197 *
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
198 * @param webview The GtkWebView.
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
199 * @param flags The connection flags describing the allowed formatting.
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
200 */
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
201 void gtk_webview_setup_entry(GtkWebView *webview, PurpleConnectionFlags flags);
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
202
17dceb2423c2 Add a function for setting a WebView entry based on the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32805
diff changeset
203 /**
33021
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
204 * Setup spell-checking on a GtkWebView.
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
205 *
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
206 * @param webview The GtkWebView.
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
207 * @param enable Whether to enable or disable spell-checking.
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
208 */
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
209 void pidgin_webview_set_spellcheck(GtkWebView *webview, gboolean enable);
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
210
3dc4b2cdba7f Enable spell checking in an editable webview.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33017
diff changeset
211 /**
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
212 * Enables or disables whole buffer formatting only (wbfo) in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
213 * In this mode formatting options to the buffer take effect for the entire
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
214 * buffer instead of specific text.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
215 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
216 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
217 * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
218 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
219 void gtk_webview_set_whole_buffer_formatting_only(GtkWebView *webview,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
220 gboolean wbfo);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
221
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
222 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
223 * Indicates which formatting functions to enable and disable in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
224 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
225 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
226 * @param buttons A GtkWebViewButtons bitmask indicating which functions to use
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
227 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
228 void gtk_webview_set_format_functions(GtkWebView *webview,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
229 GtkWebViewButtons buttons);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
230
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
231 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
232 * Returns which formatting functions are enabled in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
233 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
234 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
235 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
236 * @return A GtkWebViewButtons bitmask indicating which functions to are enabled
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
237 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
238 GtkWebViewButtons gtk_webview_get_format_functions(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
239
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
240 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
241 * Sets each boolean to @c TRUE or @c FALSE to indicate if that formatting
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
242 * option is enabled at the current position in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
243 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
244 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
245 * @param bold The boolean to set for bold or @c NULL.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
246 * @param italic The boolean to set for italic or @c NULL.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
247 * @param underline The boolean to set for underline or @c NULL.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
248 * @param strikethrough The boolean to set for strikethrough or @c NULL.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
249 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
250 void gtk_webview_get_current_format(GtkWebView *webview, gboolean *bold,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
251 gboolean *italic, gboolean *underline,
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
252 gboolean *strike);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
253
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
254 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
255 * Returns a string containing the selected font face at the current position
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
256 * in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
257 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
258 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
259 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
260 * @return A string containing the font face or @c NULL if none is set.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
261 */
32895
fbd3b11e535a WebKit knows the current formatting of the selection better than we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32811
diff changeset
262 char *gtk_webview_get_current_fontface(GtkWebView *webview);
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
263
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
264 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
265 * Returns a string containing the selected foreground color at the current
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
266 * position in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
267 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
268 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
269 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
270 * @return A string containing the foreground color or @c NULL if none is set.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
271 */
32895
fbd3b11e535a WebKit knows the current formatting of the selection better than we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32811
diff changeset
272 char *gtk_webview_get_current_forecolor(GtkWebView *webview);
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
273
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
274 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
275 * Returns a string containing the selected font background color at the current
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
276 * position in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
277 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
278 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
279 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
280 * @return A string containing the background color or @c NULL if none is set.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
281 */
32895
fbd3b11e535a WebKit knows the current formatting of the selection better than we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32811
diff changeset
282 char *gtk_webview_get_current_backcolor(GtkWebView *webview);
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
283
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
284 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
285 * Returns a integer containing the selected HTML font size at the current
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
286 * position in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
287 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
288 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
289 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
290 * @return The HTML font size.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
291 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
292 gint gtk_webview_get_current_fontsize(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
293
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
294 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
295 * Checks whether a GtkWebView is marked as editable.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
296 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
297 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
298 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
299 * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
300 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
301 gboolean gtk_webview_get_editable(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
302
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
303 /**
33004
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
304 * Gets the content of the head element of a GtkWebView as HTML.
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
305 *
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
306 * @param webview The GtkWebView
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
307 *
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
308 * @return The HTML from the head element.
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
309 */
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
310 gchar *gtk_webview_get_head_html(GtkWebView *webview);
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
311
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
312 /**
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
313 * Gets the HTML content of a GtkWebView.
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
314 *
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
315 * @param webview The GtkWebView
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
316 *
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
317 * @return The HTML that is currently displayed.
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
318 */
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
319 gchar *gtk_webview_get_body_html(GtkWebView *webview);
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
320
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
321 /**
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
322 * Gets the text content of a GtkWebView.
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
323 *
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
324 * @param webview The GtkWebView
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
325 *
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
326 * @return The HTML-free text that is currently displayed.
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
327 */
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
328 gchar *gtk_webview_get_body_text(GtkWebView *webview);
33014
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
329
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
330 /**
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
331 * Gets the selected text of a GtkWebView.
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
332 *
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
333 * @param webview The GtkWebView
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
334 *
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
335 * @return The HTML-free text that is currently selected, or NULL if nothing is
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
336 * currently selected.
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
337 */
2f8a83007ab9 Set up the link description from the already selected text.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33013
diff changeset
338 gchar *gtk_webview_get_selected_text(GtkWebView *webview);
33004
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
339
2a86ad923464 Add some convenience functions to get the contents of a GtkWebView.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32993
diff changeset
340 /**
32805
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
341 * Clear all the formatting on a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
342 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
343 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
344 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
345 void gtk_webview_clear_formatting(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
346
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
347 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
348 * Toggles bold at the cursor location or selection in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
349 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
350 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
351 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
352 void gtk_webview_toggle_bold(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
353
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
354 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
355 * Toggles italic at the cursor location or selection in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
356 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
357 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
358 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
359 void gtk_webview_toggle_italic(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
360
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
361 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
362 * Toggles underline at the cursor location or selection in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
363 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
364 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
365 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
366 void gtk_webview_toggle_underline(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
367
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
368 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
369 * Toggles strikethrough at the cursor location or selection in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
370 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
371 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
372 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
373 void gtk_webview_toggle_strike(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
374
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
375 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
376 * Toggles a foreground color at the current location or selection in a
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
377 * GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
378 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
379 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
380 * @param color The HTML-style color, or @c NULL or "" to clear the color.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
381 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
382 * @return @c TRUE if a color was set, or @c FALSE if it was cleared.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
383 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
384 gboolean gtk_webview_toggle_forecolor(GtkWebView *webview, const char *color);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
385
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
386 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
387 * Toggles a background color at the current location or selection in a
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
388 * GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
389 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
390 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
391 * @param color The HTML-style color, or @c NULL or "" to clear the color.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
392 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
393 * @return @c TRUE if a color was set, or @c FALSE if it was cleared.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
394 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
395 gboolean gtk_webview_toggle_backcolor(GtkWebView *webview, const char *color);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
396
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
397 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
398 * Toggles a font face at the current location or selection in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
399 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
400 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
401 * @param face The font face name, or @c NULL or "" to clear the font.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
402 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
403 * @return @c TRUE if a font name was set, or @c FALSE if it was cleared.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
404 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
405 gboolean gtk_webview_toggle_fontface(GtkWebView *webview, const char *face);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
406
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
407 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
408 * Sets the font size at the current location or selection in a GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
409 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
410 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
411 * @param size The HTML font size to use.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
412 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
413 void gtk_webview_font_set_size(GtkWebView *webview, gint size);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
414
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
415 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
416 * Decreases the font size by 1 at the current location or selection in a
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
417 * GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
418 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
419 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
420 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
421 void gtk_webview_font_shrink(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
422
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
423 /**
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
424 * Increases the font size by 1 at the current location or selection in a
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
425 * GtkWebView.
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
426 *
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
427 * @param webview The GtkWebView
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
428 */
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
429 void gtk_webview_font_grow(GtkWebView *webview);
57f914c32dc4 Copy some editing functions from GtkIMHtml. These are incomplete.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32798
diff changeset
430
33012
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
431 /**
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
432 * Inserts a horizontal rule at the current location or selection in a
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
433 * GtkWebView.
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
434 *
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
435 * @param webview The GtkWebView
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
436 */
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
437 void gtk_webview_insert_hr(GtkWebView *webview);
3a742f00a0f4 Restore Insert Horizontal Rule functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33007
diff changeset
438
33013
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
439 /**
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
440 * Inserts a link at the current location or selection in a GtkWebView.
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
441 *
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
442 * @param webview The GtkWebView
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
443 * @param url The URL of the link
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
444 * @param desc The text description of the link. If not supplied, the URL is
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
445 * used instead.
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
446 */
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
447 void gtk_webview_insert_link(GtkWebView *webview, const char *url, const char *desc);
f62232fb738a Restore "Insert Link" functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33012
diff changeset
448
33017
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
449 /**
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
450 * Inserts an image at the current location or selection in a GtkWebView.
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
451 *
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
452 * @param webview The GtkWebView
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
453 * @param id The PurpleStoredImage id
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
454 */
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
455 void gtk_webview_insert_image(GtkWebView *webview, int id);
d21ab88ad911 Fixup Insert Image functionality.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33014
diff changeset
456
32790
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32772
diff changeset
457 G_END_DECLS
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32772
diff changeset
458
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
459 #endif /* _PIDGIN_WEBVIEW_H_ */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
460

mercurial