pidgin/gtkwebview.h

Sun, 09 Aug 2009 17:16:20 +0000

author
Arnold Noronha <tdrhq@soc.pidgin.im>
date
Sun, 09 Aug 2009 17:16:20 +0000
branch
soc.2009.webkitmessageview
changeset 32447
19c015e19e7e
parent 32441
8a015ca299f9
child 32460
5771be5530d8
permissions
-rw-r--r--

added smileyparser code.

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
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
6 /* Pidgin is the legal property of its developers, whose names are too numerous
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
7 * 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
8 * source distribution.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
9 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
11 * under the terms of the GNU General Public License as published by
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
12 * 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
13 * (at your option) any later version.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
14 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
15 * 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
16 * 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
17 * 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
18 * 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
19 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
20 * 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
21 * 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
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
23 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
24
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
25 #ifndef _PIDGIN_WEBVIEW_H_
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
26 #define _PIDGIN_WEBVIEW_H_
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 #include <glib.h>
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
29 #include <gtk/gtk.h>
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
30 #include <webkit/webkit.h>
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
31
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
32 #include "notify.h"
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
33
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
34 #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
35 #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
36 #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
37 #define GTK_IS_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_WEBVIEW))
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
38 #define GTK_IS_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_WEBVIEW))
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
39
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
40
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
41 struct _GtkWebView
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 WebKitWebView webkit_web_view;
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
44
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
45 /*< private >*/
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
46 GHashTable *images; /**< a map from id to temporary file for the image */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
47 gboolean empty; /**< whether anything has been appended **/
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
48 char *script_return; /**< the last value returned from a script **/
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
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
51 typedef struct _GtkWebView GtkWebView;
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 struct _GtkWebViewClass
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
54 {
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
55 WebKitWebViewClass parent;
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
56 };
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 typedef struct _GtkWebViewClass GtkWebViewClass;
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 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
62 * 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
63 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
64 * @return the GType for GtkWebView widget
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
65 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
66 GType gtk_webview_get_type ();
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 * Create a new GtkWebView object
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 * @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
72 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
73 GtkWidget* gtk_webview_new ();
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
74
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
75 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
76 * 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
77 * 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
78 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
79 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
80 * @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
81 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
82 void gtk_webview_append_html (GtkWebView *webview, const char* markup);
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
83
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
84 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
85 * Rather than use webkit_webview_load_string, this routine
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
86 * parses and displays the <img id=?> tags that make use of the
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
87 * Pidgin imgstore.
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 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
90 * @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
91 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
92 void gtk_webview_load_html_string_with_imgstore (GtkWebView* webview, const char* html);
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
93
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 * (To be changed, right now it just tests whether an append has been
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
96 * 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
97 * 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
98 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
99 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
100 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
101 * @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
102 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
103 gboolean gtk_webview_is_empty (GtkWebView *webview);
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 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
106 * Executes javascript and returns the answer of the script
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
107 * formatted as string. The return value needs to be freed using
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
108 * g_free. If the return values is not required you may instead
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
109 * use webkit_web_view_execute_script.
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 script The JavaScript to execute
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
113 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
114 * @return the return value of the script.
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 char* gtk_webview_execute_script (GtkWebView *webview, const char *script);
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
117
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 * Get the current contents of the GtkWebView object.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
120 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
121 * @param webview The GtkWebView object
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
122 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
123 * @return a string with the contents. Needs to be g_free'd after use.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
124 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
125 char* gtk_webview_get_markup (GtkWebView *webview);
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
126
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
127 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
128 * Returns the contents of the GtkWebView object, stripped of markups
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
129 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
130 * @param webview The GtkWebView object
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 * @return a string with the contents. Needs to be g_free'd after use.
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 char* gtk_webview_get_text (GtkWebView *view);
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
135
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
136 /**
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
137 * A convenience routine to quote a string for use as a JavaScript
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
138 * 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
139 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
140 * @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
141 *
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
142 * @return the quoted string.
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
143 */
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
144 char* gtk_webview_quote_js_string (const char* str);
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
145
8a015ca299f9 Apparently I missed these in my previous commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
146 #endif /* _PIDGIN_WEBVIEW_H_ */

mercurial