pidgin/gtkwebview.h

Mon, 19 Sep 2011 18:48:00 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Mon, 19 Sep 2011 18:48:00 +0000
changeset 32562
9c094ffe9333
parent 32554
0d844fac6679
child 32577
e32ba7559843
permissions
-rw-r--r--

Load the list of variants when building the theme.

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 #include "notify.h"
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
36
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
37 #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
38 #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
39 #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
40 #define GTK_IS_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_WEBVIEW))
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
41 #define GTK_IS_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_WEBVIEW))
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
42
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
43
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
44 struct GtkWebViewPriv;
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
45
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
46 struct _GtkWebView
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
47 {
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
48 WebKitWebView webkit_web_view;
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
49
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
50 /*< private >*/
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
51 struct GtkWebViewPriv *priv;
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
52 };
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
53
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
54 typedef struct _GtkWebView GtkWebView;
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
55
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
56 struct _GtkWebViewClass
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
57 {
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
58 WebKitWebViewClass parent;
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
59 };
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
60
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
61 typedef struct _GtkWebViewClass GtkWebViewClass;
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
62
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
63
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
64 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
65 * 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
66 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
67 * @return the GType for GtkWebView widget
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
68 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
69 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
70
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
71 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
72 * Create a new GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
73 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
74 * @return a GtkWidget corresponding to the GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
75 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
76 GtkWidget *gtk_webview_new(void);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
77
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
78 /**
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
79 * Set the vertical adjustment for the GtkWebView.
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
80 *
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
81 * @param webview The GtkWebView.
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
82 * @param vadj The GtkAdjustment that control the webview.
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
83 */
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
84 void gtk_webview_set_vadjustment(GtkWebView *webview, GtkAdjustment *vadj);
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
85
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
86 /**
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
87 * 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
88 * 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
89 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
90 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
91 * @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
92 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
93 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
94
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 * Rather than use webkit_webview_load_string, this routine
32554
0d844fac6679 Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents: 32513
diff changeset
97 * parses and displays the \<img id=?\> tags that make use of the
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
98 * Pidgin imgstore.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
99 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
100 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
101 * @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
102 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
103 void gtk_webview_load_html_string_with_imgstore(GtkWebView *webview, const char *html);
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
104
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
105 /**
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
106 * FIXME: (To be changed, right now it just tests whether an append has been
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
107 * called since the last clear or since the Widget was created. So it
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
108 * does not test for load_string's called in between.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
109 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
110 * @param webview The GtkWebView object
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
111 *
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
112 * @return gboolean indicating whether the webview is empty.
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 gboolean gtk_webview_is_empty(GtkWebView *webview);
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 /**
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
117 * 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
118 * 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
119 * 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
120 * 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
121 * 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
122 *
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
123 * @param webview the GtkWebView object
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
124 * @param script the script to execute
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
125 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
126 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
127
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
128 /**
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
129 * 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
130 * 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
131 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
132 * @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
133 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
134 * @return the quoted string.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
135 */
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
136 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
137
32500
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
138 /**
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
139 * 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
140 *
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
141 * @param webview The GtkWebView.
32513
9352b4c92d13 Clean up this WebKit stuff. Fix up broken merging, mark unfinished
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32500
diff changeset
142 * @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
143 */
d8aa742c6288 webkit: Scroll to end when appending html.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents: 32489
diff changeset
144 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
145
32441
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
146 #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
147

mercurial