pidgin/gtkwebview.h

branch
gtkdoc-conversion
changeset 35393
00f876b129bc
parent 35129
22dca763eeef
child 35417
4e34bb5d3681
child 37035
e85ed7f4d6e3
equal deleted inserted replaced
35392:cc123f0d84af 35393:00f876b129bc
109 G_BEGIN_DECLS 109 G_BEGIN_DECLS
110 110
111 /** 111 /**
112 * Returns the GType for a GtkWebView widget 112 * Returns the GType for a GtkWebView widget
113 * 113 *
114 * @return The GType for GtkWebView widget 114 * Returns: The GType for GtkWebView widget
115 */ 115 */
116 GType gtk_webview_get_type(void); 116 GType gtk_webview_get_type(void);
117 117
118 /** 118 /**
119 * Create a new GtkWebView object 119 * Create a new GtkWebView object
120 * 120 *
121 * @param editable Whether this GtkWebView will be user-editable 121 * @editable: Whether this GtkWebView will be user-editable
122 * 122 *
123 * @return A GtkWidget corresponding to the GtkWebView object 123 * Returns: A GtkWidget corresponding to the GtkWebView object
124 */ 124 */
125 GtkWidget *gtk_webview_new(gboolean editable); 125 GtkWidget *gtk_webview_new(gboolean editable);
126 126
127 /** 127 /**
128 * A very basic routine to append html, which can be considered 128 * A very basic routine to append html, which can be considered
129 * equivalent to a "document.write" using JavaScript. 129 * equivalent to a "document.write" using JavaScript.
130 * 130 *
131 * @param webview The GtkWebView object 131 * @webview: The GtkWebView object
132 * @param markup The html markup to append 132 * @markup: The html markup to append
133 */ 133 */
134 void gtk_webview_append_html(GtkWebView *webview, const char *markup); 134 void gtk_webview_append_html(GtkWebView *webview, const char *markup);
135 135
136 /** 136 /**
137 * Requests loading of the given content. 137 * Requests loading of the given content.
138 * 138 *
139 * @param webview The GtkWebView object 139 * @webview: The GtkWebView object
140 * @param html The HTML content to load 140 * @html: The HTML content to load
141 */ 141 */
142 void gtk_webview_load_html_string(GtkWebView *webview, const char *html); 142 void gtk_webview_load_html_string(GtkWebView *webview, const char *html);
143 143
144 /** 144 /**
145 * Requests loading of the given content and sets the selection. You must 145 * Requests loading of the given content and sets the selection. You must
146 * include an anchor tag with id='caret' in the HTML string, which will be 146 * include an anchor tag with id='caret' in the HTML string, which will be
147 * used to set the selection. This tag is then removed so that querying the 147 * used to set the selection. This tag is then removed so that querying the
148 * WebView's HTML contents will no longer return it. 148 * WebView's HTML contents will no longer return it.
149 * 149 *
150 * @param webview The GtkWebView object 150 * @webview: The GtkWebView object
151 * @param html The HTML content to load 151 * @html: The HTML content to load
152 */ 152 */
153 void gtk_webview_load_html_string_with_selection(GtkWebView *webview, const char *html); 153 void gtk_webview_load_html_string_with_selection(GtkWebView *webview, const char *html);
154 154
155 /** 155 /**
156 * Execute the JavaScript only after the webkit_webview_load_string 156 * Execute the JavaScript only after the webkit_webview_load_string
157 * loads completely. We also guarantee that the scripts are executed 157 * loads completely. We also guarantee that the scripts are executed
158 * in the order they are called here. This is useful to avoid race 158 * in the order they are called here. This is useful to avoid race
159 * conditions when calling JS functions immediately after opening the 159 * conditions when calling JS functions immediately after opening the
160 * page. 160 * page.
161 * 161 *
162 * @param webview The GtkWebView object 162 * @webview: The GtkWebView object
163 * @param script The script to execute 163 * @script: The script to execute
164 */ 164 */
165 void gtk_webview_safe_execute_script(GtkWebView *webview, const char *script); 165 void gtk_webview_safe_execute_script(GtkWebView *webview, const char *script);
166 166
167 /** 167 /**
168 * A convenience routine to quote a string for use as a JavaScript 168 * A convenience routine to quote a string for use as a JavaScript
169 * string. For instance, "hello 'world'" becomes "'hello \\'world\\''" 169 * string. For instance, "hello 'world'" becomes "'hello \\'world\\''"
170 * 170 *
171 * @param str The string to escape and quote 171 * @str: The string to escape and quote
172 * 172 *
173 * @return The quoted string 173 * Returns: The quoted string
174 */ 174 */
175 char *gtk_webview_quote_js_string(const char *str); 175 char *gtk_webview_quote_js_string(const char *str);
176 176
177 /** 177 /**
178 * Set the vertical adjustment for the GtkWebView. 178 * Set the vertical adjustment for the GtkWebView.
179 * 179 *
180 * @param webview The GtkWebView object 180 * @webview: The GtkWebView object
181 * @param vadj The GtkAdjustment that control the webview 181 * @vadj: The GtkAdjustment that control the webview
182 */ 182 */
183 void gtk_webview_set_vadjustment(GtkWebView *webview, GtkAdjustment *vadj); 183 void gtk_webview_set_vadjustment(GtkWebView *webview, GtkAdjustment *vadj);
184 184
185 /** 185 /**
186 * Scrolls the Webview to the end of its contents. 186 * Scrolls the Webview to the end of its contents.
187 * 187 *
188 * @param webview The GtkWebView object 188 * @webview: The GtkWebView object
189 * @param smooth A boolean indicating if smooth scrolling should be used 189 * @smooth: A boolean indicating if smooth scrolling should be used
190 */ 190 */
191 void gtk_webview_scroll_to_end(GtkWebView *webview, gboolean smooth); 191 void gtk_webview_scroll_to_end(GtkWebView *webview, gboolean smooth);
192 192
193 /** 193 /**
194 * Set whether the GtkWebView stays at its end when HTML content is appended. If 194 * Set whether the GtkWebView stays at its end when HTML content is appended. If
195 * not already at the end before appending, then scrolling will not occur. 195 * not already at the end before appending, then scrolling will not occur.
196 * 196 *
197 * @param webview The GtkWebView object 197 * @webview: The GtkWebView object
198 * @param scroll Whether to automatically scroll 198 * @scroll: Whether to automatically scroll
199 */ 199 */
200 void gtk_webview_set_autoscroll(GtkWebView *webview, gboolean scroll); 200 void gtk_webview_set_autoscroll(GtkWebView *webview, gboolean scroll);
201 201
202 /** 202 /**
203 * Set whether the GtkWebView stays at its end when HTML content is appended. If 203 * Set whether the GtkWebView stays at its end when HTML content is appended. If
204 * not already at the end before appending, then scrolling will not occur. 204 * not already at the end before appending, then scrolling will not occur.
205 * 205 *
206 * @param webview The GtkWebView object 206 * @webview: The GtkWebView object
207 * 207 *
208 * @return Whether to automatically scroll 208 * Returns: Whether to automatically scroll
209 */ 209 */
210 gboolean gtk_webview_get_autoscroll(GtkWebView *webview); 210 gboolean gtk_webview_get_autoscroll(GtkWebView *webview);
211 211
212 /** 212 /**
213 * Scrolls a GtkWebView up by one page. 213 * Scrolls a GtkWebView up by one page.
214 * 214 *
215 * @param webview The GtkWebView. 215 * @webview: The GtkWebView.
216 */ 216 */
217 void gtk_webview_page_up(GtkWebView *webview); 217 void gtk_webview_page_up(GtkWebView *webview);
218 218
219 /** 219 /**
220 * Scrolls a GtkWebView down by one page. 220 * Scrolls a GtkWebView down by one page.
221 * 221 *
222 * @param webview The GtkWebView. 222 * @webview: The GtkWebView.
223 */ 223 */
224 void gtk_webview_page_down(GtkWebView *webview); 224 void gtk_webview_page_down(GtkWebView *webview);
225 225
226 /** 226 /**
227 * Setup formatting for a GtkWebView depending on the flags specified. 227 * Setup formatting for a GtkWebView depending on the flags specified.
228 * 228 *
229 * @param webview The GtkWebView. 229 * @webview: The GtkWebView.
230 * @param flags The connection flags describing the allowed formatting. 230 * @flags: The connection flags describing the allowed formatting.
231 */ 231 */
232 void gtk_webview_setup_entry(GtkWebView *webview, PurpleConnectionFlags flags); 232 void gtk_webview_setup_entry(GtkWebView *webview, PurpleConnectionFlags flags);
233 233
234 /** 234 /**
235 * Setup spell-checking on a GtkWebView. 235 * Setup spell-checking on a GtkWebView.
236 * 236 *
237 * @param webview The GtkWebView. 237 * @webview: The GtkWebView.
238 * @param enable Whether to enable or disable spell-checking. 238 * @enable: Whether to enable or disable spell-checking.
239 */ 239 */
240 void pidgin_webview_set_spellcheck(GtkWebView *webview, gboolean enable); 240 void pidgin_webview_set_spellcheck(GtkWebView *webview, gboolean enable);
241 241
242 /** 242 /**
243 * Enables or disables whole buffer formatting only (wbfo) in a GtkWebView. 243 * Enables or disables whole buffer formatting only (wbfo) in a GtkWebView.
244 * In this mode formatting options to the buffer take effect for the entire 244 * In this mode formatting options to the buffer take effect for the entire
245 * buffer instead of specific text. 245 * buffer instead of specific text.
246 * 246 *
247 * @param webview The GtkWebView 247 * @webview: The GtkWebView
248 * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. 248 * @wbfo: %TRUE to enable the mode, or %FALSE otherwise.
249 */ 249 */
250 void gtk_webview_set_whole_buffer_formatting_only(GtkWebView *webview, 250 void gtk_webview_set_whole_buffer_formatting_only(GtkWebView *webview,
251 gboolean wbfo); 251 gboolean wbfo);
252 252
253 /** 253 /**
254 * Indicates which formatting functions to enable and disable in a GtkWebView. 254 * Indicates which formatting functions to enable and disable in a GtkWebView.
255 * 255 *
256 * @param webview The GtkWebView 256 * @webview: The GtkWebView
257 * @param buttons A GtkWebViewButtons bitmask indicating which functions to use 257 * @buttons: A GtkWebViewButtons bitmask indicating which functions to use
258 */ 258 */
259 void gtk_webview_set_format_functions(GtkWebView *webview, 259 void gtk_webview_set_format_functions(GtkWebView *webview,
260 GtkWebViewButtons buttons); 260 GtkWebViewButtons buttons);
261 261
262 /** 262 /**
263 * Activates a WebKitDOMHTMLAnchorElement object. This triggers the navigation 263 * Activates a WebKitDOMHTMLAnchorElement object. This triggers the navigation
264 * signals, and marks the link as visited (when possible). 264 * signals, and marks the link as visited (when possible).
265 * 265 *
266 * @param link The WebKitDOMHTMLAnchorElement object 266 * @link: The WebKitDOMHTMLAnchorElement object
267 * 267 *
268 */ 268 */
269 void gtk_webview_activate_anchor(WebKitDOMHTMLAnchorElement *link); 269 void gtk_webview_activate_anchor(WebKitDOMHTMLAnchorElement *link);
270 270
271 /** 271 /**
272 * Register a protocol with the GtkWebView widget. Registering a protocol would 272 * Register a protocol with the GtkWebView widget. Registering a protocol would
273 * allow certain text to be clickable. 273 * allow certain text to be clickable.
274 * 274 *
275 * @param name The name of the protocol (e.g. http://) 275 * @name: The name of the protocol (e.g. http://)
276 * @param activate The callback to trigger when the protocol text is clicked. 276 * @activate: The callback to trigger when the protocol text is clicked.
277 * Removes any current protocol definition if @c NULL. The 277 * Removes any current protocol definition if %NULL. The
278 * callback should return @c TRUE if the link was activated 278 * callback should return %TRUE if the link was activated
279 * properly, @c FALSE otherwise. 279 * properly, %FALSE otherwise.
280 * @param context_menu The callback to trigger when the context menu is popped 280 * @context_menu: The callback to trigger when the context menu is popped
281 * up on the protocol text. The callback should return 281 * up on the protocol text. The callback should return
282 * @c TRUE if the request for context menu was processed 282 * %TRUE if the request for context menu was processed
283 * successfully, @c FALSE otherwise. 283 * successfully, %FALSE otherwise.
284 * 284 *
285 * @return @c TRUE if the protocol was successfully registered 285 * Returns: %TRUE if the protocol was successfully registered
286 * (or unregistered, when \a activate is @c NULL) 286 * (or unregistered, when \a activate is %NULL)
287 */ 287 */
288 gboolean gtk_webview_class_register_protocol(const char *name, 288 gboolean gtk_webview_class_register_protocol(const char *name,
289 gboolean (*activate)(GtkWebView *webview, const char *uri), 289 gboolean (*activate)(GtkWebView *webview, const char *uri),
290 gboolean (*context_menu)(GtkWebView *webview, WebKitDOMHTMLAnchorElement *link, GtkWidget *menu)); 290 gboolean (*context_menu)(GtkWebView *webview, WebKitDOMHTMLAnchorElement *link, GtkWidget *menu));
291 291
292 /** 292 /**
293 * Returns which formatting functions are enabled in a GtkWebView. 293 * Returns which formatting functions are enabled in a GtkWebView.
294 * 294 *
295 * @param webview The GtkWebView 295 * @webview: The GtkWebView
296 * 296 *
297 * @return A GtkWebViewButtons bitmask indicating which functions to are enabled 297 * Returns: A GtkWebViewButtons bitmask indicating which functions to are enabled
298 */ 298 */
299 GtkWebViewButtons gtk_webview_get_format_functions(GtkWebView *webview); 299 GtkWebViewButtons gtk_webview_get_format_functions(GtkWebView *webview);
300 300
301 /** 301 /**
302 * Sets each boolean to @c TRUE or @c FALSE to indicate if that formatting 302 * Sets each boolean to %TRUE or %FALSE to indicate if that formatting
303 * option is enabled at the current position in a GtkWebView. 303 * option is enabled at the current position in a GtkWebView.
304 * 304 *
305 * @param webview The GtkWebView 305 * @webview: The GtkWebView
306 * @param bold The boolean to set for bold or @c NULL. 306 * @bold: The boolean to set for bold or %NULL.
307 * @param italic The boolean to set for italic or @c NULL. 307 * @italic: The boolean to set for italic or %NULL.
308 * @param underline The boolean to set for underline or @c NULL. 308 * @underline: The boolean to set for underline or %NULL.
309 * @param strikethrough The boolean to set for strikethrough or @c NULL. 309 * @strikethrough: The boolean to set for strikethrough or %NULL.
310 */ 310 */
311 void gtk_webview_get_current_format(GtkWebView *webview, gboolean *bold, 311 void gtk_webview_get_current_format(GtkWebView *webview, gboolean *bold,
312 gboolean *italic, gboolean *underline, 312 gboolean *italic, gboolean *underline,
313 gboolean *strike); 313 gboolean *strike);
314 314
315 /** 315 /**
316 * Returns a string containing the selected font face at the current position 316 * Returns a string containing the selected font face at the current position
317 * in a GtkWebView. 317 * in a GtkWebView.
318 * 318 *
319 * @param webview The GtkWebView 319 * @webview: The GtkWebView
320 * 320 *
321 * @return A string containing the font face or @c NULL if none is set. 321 * Returns: A string containing the font face or %NULL if none is set.
322 */ 322 */
323 char *gtk_webview_get_current_fontface(GtkWebView *webview); 323 char *gtk_webview_get_current_fontface(GtkWebView *webview);
324 324
325 /** 325 /**
326 * Returns a string containing the selected foreground color at the current 326 * Returns a string containing the selected foreground color at the current
327 * position in a GtkWebView. 327 * position in a GtkWebView.
328 * 328 *
329 * @param webview The GtkWebView 329 * @webview: The GtkWebView
330 * 330 *
331 * @return A string containing the foreground color or @c NULL if none is set. 331 * Returns: A string containing the foreground color or %NULL if none is set.
332 */ 332 */
333 char *gtk_webview_get_current_forecolor(GtkWebView *webview); 333 char *gtk_webview_get_current_forecolor(GtkWebView *webview);
334 334
335 /** 335 /**
336 * Returns a string containing the selected font background color at the current 336 * Returns a string containing the selected font background color at the current
337 * position in a GtkWebView. 337 * position in a GtkWebView.
338 * 338 *
339 * @param webview The GtkWebView 339 * @webview: The GtkWebView
340 * 340 *
341 * @return A string containing the background color or @c NULL if none is set. 341 * Returns: A string containing the background color or %NULL if none is set.
342 */ 342 */
343 char *gtk_webview_get_current_backcolor(GtkWebView *webview); 343 char *gtk_webview_get_current_backcolor(GtkWebView *webview);
344 344
345 /** 345 /**
346 * Returns a integer containing the selected HTML font size at the current 346 * Returns a integer containing the selected HTML font size at the current
347 * position in a GtkWebView. 347 * position in a GtkWebView.
348 * 348 *
349 * @param webview The GtkWebView 349 * @webview: The GtkWebView
350 * 350 *
351 * @return The HTML font size. 351 * Returns: The HTML font size.
352 */ 352 */
353 gint gtk_webview_get_current_fontsize(GtkWebView *webview); 353 gint gtk_webview_get_current_fontsize(GtkWebView *webview);
354 354
355 /** 355 /**
356 * Gets the content of the head element of a GtkWebView as HTML. 356 * Gets the content of the head element of a GtkWebView as HTML.
357 * 357 *
358 * @param webview The GtkWebView 358 * @webview: The GtkWebView
359 * 359 *
360 * @return The HTML from the head element. 360 * Returns: The HTML from the head element.
361 */ 361 */
362 gchar *gtk_webview_get_head_html(GtkWebView *webview); 362 gchar *gtk_webview_get_head_html(GtkWebView *webview);
363 363
364 /** 364 /**
365 * Gets the HTML content of a GtkWebView. 365 * Gets the HTML content of a GtkWebView.
366 * 366 *
367 * @param webview The GtkWebView 367 * @webview: The GtkWebView
368 * 368 *
369 * @return The HTML that is currently displayed. 369 * Returns: The HTML that is currently displayed.
370 */ 370 */
371 gchar *gtk_webview_get_body_html(GtkWebView *webview); 371 gchar *gtk_webview_get_body_html(GtkWebView *webview);
372 372
373 /** 373 /**
374 * Gets the text content of a GtkWebView. 374 * Gets the text content of a GtkWebView.
375 * 375 *
376 * @param webview The GtkWebView 376 * @webview: The GtkWebView
377 * 377 *
378 * @return The HTML-free text that is currently displayed. 378 * Returns: The HTML-free text that is currently displayed.
379 */ 379 */
380 gchar *gtk_webview_get_body_text(GtkWebView *webview); 380 gchar *gtk_webview_get_body_text(GtkWebView *webview);
381 381
382 /** 382 /**
383 * Gets the selected text of a GtkWebView. 383 * Gets the selected text of a GtkWebView.
384 * 384 *
385 * @param webview The GtkWebView 385 * @webview: The GtkWebView
386 * 386 *
387 * @return The HTML-free text that is currently selected, or NULL if nothing is 387 * Returns: The HTML-free text that is currently selected, or NULL if nothing is
388 * currently selected. 388 * currently selected.
389 */ 389 */
390 gchar *gtk_webview_get_selected_text(GtkWebView *webview); 390 gchar *gtk_webview_get_selected_text(GtkWebView *webview);
391 391
392 /** 392 /**
393 * Gets the container of the caret, along with its position in the container 393 * Gets the container of the caret, along with its position in the container
394 * from a GtkWebView. 394 * from a GtkWebView.
395 * 395 *
396 * @param webview The GtkWebView 396 * @webview: The GtkWebView
397 * @param container_ret A pointer to a pointer to a WebKitDOMNode. This pointer 397 * @container_ret: A pointer to a pointer to a WebKitDOMNode. This pointer
398 * will be set to the container the caret is in. Set to 398 * will be set to the container the caret is in. Set to
399 * @c NULL if a range is selected. 399 * %NULL if a range is selected.
400 * @param pos_ret A pointer to a glong. This value will be set to the 400 * @pos_ret: A pointer to a glong. This value will be set to the
401 * position of the caret in the container. Set to -1 if a 401 * position of the caret in the container. Set to -1 if a
402 * range is selected. 402 * range is selected.
403 */ 403 */
404 void gtk_webview_get_caret(GtkWebView *webview, WebKitDOMNode **container_ret, 404 void gtk_webview_get_caret(GtkWebView *webview, WebKitDOMNode **container_ret,
405 glong *pos_ret); 405 glong *pos_ret);
406 406
407 /** 407 /**
408 * Sets the caret position in container, in a GtkWebView. 408 * Sets the caret position in container, in a GtkWebView.
409 * 409 *
410 * @param webview The GtkWebView 410 * @webview: The GtkWebView
411 * @param container The WebKitDOMNode to set the caret in 411 * @container: The WebKitDOMNode to set the caret in
412 * @param pos The position of the caret in the container 412 * @pos: The position of the caret in the container
413 */ 413 */
414 void gtk_webview_set_caret(GtkWebView *webview, WebKitDOMNode *container, 414 void gtk_webview_set_caret(GtkWebView *webview, WebKitDOMNode *container,
415 glong pos); 415 glong pos);
416 416
417 /** 417 /**
418 * Clear all the formatting on a GtkWebView. 418 * Clear all the formatting on a GtkWebView.
419 * 419 *
420 * @param webview The GtkWebView 420 * @webview: The GtkWebView
421 */ 421 */
422 void gtk_webview_clear_formatting(GtkWebView *webview); 422 void gtk_webview_clear_formatting(GtkWebView *webview);
423 423
424 /** 424 /**
425 * Toggles bold at the cursor location or selection in a GtkWebView. 425 * Toggles bold at the cursor location or selection in a GtkWebView.
426 * 426 *
427 * @param webview The GtkWebView 427 * @webview: The GtkWebView
428 */ 428 */
429 void gtk_webview_toggle_bold(GtkWebView *webview); 429 void gtk_webview_toggle_bold(GtkWebView *webview);
430 430
431 /** 431 /**
432 * Toggles italic at the cursor location or selection in a GtkWebView. 432 * Toggles italic at the cursor location or selection in a GtkWebView.
433 * 433 *
434 * @param webview The GtkWebView 434 * @webview: The GtkWebView
435 */ 435 */
436 void gtk_webview_toggle_italic(GtkWebView *webview); 436 void gtk_webview_toggle_italic(GtkWebView *webview);
437 437
438 /** 438 /**
439 * Toggles underline at the cursor location or selection in a GtkWebView. 439 * Toggles underline at the cursor location or selection in a GtkWebView.
440 * 440 *
441 * @param webview The GtkWebView 441 * @webview: The GtkWebView
442 */ 442 */
443 void gtk_webview_toggle_underline(GtkWebView *webview); 443 void gtk_webview_toggle_underline(GtkWebView *webview);
444 444
445 /** 445 /**
446 * Toggles strikethrough at the cursor location or selection in a GtkWebView. 446 * Toggles strikethrough at the cursor location or selection in a GtkWebView.
447 * 447 *
448 * @param webview The GtkWebView 448 * @webview: The GtkWebView
449 */ 449 */
450 void gtk_webview_toggle_strike(GtkWebView *webview); 450 void gtk_webview_toggle_strike(GtkWebView *webview);
451 451
452 /** 452 /**
453 * Toggles a foreground color at the current location or selection in a 453 * Toggles a foreground color at the current location or selection in a
454 * GtkWebView. 454 * GtkWebView.
455 * 455 *
456 * @param webview The GtkWebView 456 * @webview: The GtkWebView
457 * @param color The HTML-style color, or @c NULL or "" to clear the color. 457 * @color: The HTML-style color, or %NULL or "" to clear the color.
458 * 458 *
459 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. 459 * Returns: %TRUE if a color was set, or %FALSE if it was cleared.
460 */ 460 */
461 gboolean gtk_webview_toggle_forecolor(GtkWebView *webview, const char *color); 461 gboolean gtk_webview_toggle_forecolor(GtkWebView *webview, const char *color);
462 462
463 /** 463 /**
464 * Toggles a background color at the current location or selection in a 464 * Toggles a background color at the current location or selection in a
465 * GtkWebView. 465 * GtkWebView.
466 * 466 *
467 * @param webview The GtkWebView 467 * @webview: The GtkWebView
468 * @param color The HTML-style color, or @c NULL or "" to clear the color. 468 * @color: The HTML-style color, or %NULL or "" to clear the color.
469 * 469 *
470 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. 470 * Returns: %TRUE if a color was set, or %FALSE if it was cleared.
471 */ 471 */
472 gboolean gtk_webview_toggle_backcolor(GtkWebView *webview, const char *color); 472 gboolean gtk_webview_toggle_backcolor(GtkWebView *webview, const char *color);
473 473
474 /** 474 /**
475 * Toggles a font face at the current location or selection in a GtkWebView. 475 * Toggles a font face at the current location or selection in a GtkWebView.
476 * 476 *
477 * @param webview The GtkWebView 477 * @webview: The GtkWebView
478 * @param face The font face name, or @c NULL or "" to clear the font. 478 * @face: The font face name, or %NULL or "" to clear the font.
479 * 479 *
480 * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. 480 * Returns: %TRUE if a font name was set, or %FALSE if it was cleared.
481 */ 481 */
482 gboolean gtk_webview_toggle_fontface(GtkWebView *webview, const char *face); 482 gboolean gtk_webview_toggle_fontface(GtkWebView *webview, const char *face);
483 483
484 /** 484 /**
485 * Sets the font size at the current location or selection in a GtkWebView. 485 * Sets the font size at the current location or selection in a GtkWebView.
486 * 486 *
487 * @param webview The GtkWebView 487 * @webview: The GtkWebView
488 * @param size The HTML font size to use. 488 * @size: The HTML font size to use.
489 */ 489 */
490 void gtk_webview_font_set_size(GtkWebView *webview, gint size); 490 void gtk_webview_font_set_size(GtkWebView *webview, gint size);
491 491
492 /** 492 /**
493 * Decreases the font size by 1 at the current location or selection in a 493 * Decreases the font size by 1 at the current location or selection in a
494 * GtkWebView. 494 * GtkWebView.
495 * 495 *
496 * @param webview The GtkWebView 496 * @webview: The GtkWebView
497 */ 497 */
498 void gtk_webview_font_shrink(GtkWebView *webview); 498 void gtk_webview_font_shrink(GtkWebView *webview);
499 499
500 /** 500 /**
501 * Increases the font size by 1 at the current location or selection in a 501 * Increases the font size by 1 at the current location or selection in a
502 * GtkWebView. 502 * GtkWebView.
503 * 503 *
504 * @param webview The GtkWebView 504 * @webview: The GtkWebView
505 */ 505 */
506 void gtk_webview_font_grow(GtkWebView *webview); 506 void gtk_webview_font_grow(GtkWebView *webview);
507 507
508 /** 508 /**
509 * Inserts a horizontal rule at the current location or selection in a 509 * Inserts a horizontal rule at the current location or selection in a
510 * GtkWebView. 510 * GtkWebView.
511 * 511 *
512 * @param webview The GtkWebView 512 * @webview: The GtkWebView
513 */ 513 */
514 void gtk_webview_insert_hr(GtkWebView *webview); 514 void gtk_webview_insert_hr(GtkWebView *webview);
515 515
516 /** 516 /**
517 * Inserts a link at the current location or selection in a GtkWebView. 517 * Inserts a link at the current location or selection in a GtkWebView.
518 * 518 *
519 * @param webview The GtkWebView 519 * @webview: The GtkWebView
520 * @param url The URL of the link 520 * @url: The URL of the link
521 * @param desc The text description of the link. If not supplied, the URL is 521 * @desc: The text description of the link. If not supplied, the URL is
522 * used instead. 522 * used instead.
523 */ 523 */
524 void gtk_webview_insert_link(GtkWebView *webview, const char *url, const char *desc); 524 void gtk_webview_insert_link(GtkWebView *webview, const char *url, const char *desc);
525 525
526 /** 526 /**
527 * Inserts an image at the current location or selection in a GtkWebView. 527 * Inserts an image at the current location or selection in a GtkWebView.
528 * 528 *
529 * @param webview The GtkWebView 529 * @webview: The GtkWebView
530 * @param id The PurpleStoredImage id 530 * @id: The PurpleStoredImage id
531 */ 531 */
532 void gtk_webview_insert_image(GtkWebView *webview, int id); 532 void gtk_webview_insert_image(GtkWebView *webview, int id);
533 533
534 /** 534 /**
535 * Gets the protocol name associated with this GtkWebView. 535 * Gets the protocol name associated with this GtkWebView.
536 * 536 *
537 * @param webview The GtkWebView 537 * @webview: The GtkWebView
538 */ 538 */
539 const char *gtk_webview_get_protocol_name(GtkWebView *webview); 539 const char *gtk_webview_get_protocol_name(GtkWebView *webview);
540 540
541 /** 541 /**
542 * Associates a protocol name with a GtkWebView. 542 * Associates a protocol name with a GtkWebView.
543 * 543 *
544 * @param webview The GtkWebView 544 * @webview: The GtkWebView
545 * @param protocol_name The protocol name to associate with the GtkWebView 545 * @protocol_name: The protocol name to associate with the GtkWebView
546 */ 546 */
547 void gtk_webview_set_protocol_name(GtkWebView *webview, const char *protocol_name); 547 void gtk_webview_set_protocol_name(GtkWebView *webview, const char *protocol_name);
548 548
549 /** 549 /**
550 * Create a new GtkWebViewSmiley. 550 * Create a new GtkWebViewSmiley.
551 * 551 *
552 * @param file The image file for the smiley 552 * @file: The image file for the smiley
553 * @param shortcut The key shortcut for the smiley 553 * @shortcut: The key shortcut for the smiley
554 * @param hide @c TRUE if the smiley should be hidden in the smiley dialog, 554 * @hide: %TRUE if the smiley should be hidden in the smiley dialog,
555 * @c FALSE otherwise 555 * %FALSE otherwise
556 * @param flags The smiley flags 556 * @flags: The smiley flags
557 * 557 *
558 * @return The newly created smiley 558 * Returns: The newly created smiley
559 */ 559 */
560 GtkWebViewSmiley *gtk_webview_smiley_create(const char *file, 560 GtkWebViewSmiley *gtk_webview_smiley_create(const char *file,
561 const char *shortcut, 561 const char *shortcut,
562 gboolean hide, 562 gboolean hide,
563 GtkWebViewSmileyFlags flags); 563 GtkWebViewSmileyFlags flags);
564 564
565 /** 565 /**
566 * Reload the image data for the smiley. 566 * Reload the image data for the smiley.
567 * 567 *
568 * @param smiley The smiley to reload 568 * @smiley: The smiley to reload
569 */ 569 */
570 void gtk_webview_smiley_reload(GtkWebViewSmiley *smiley); 570 void gtk_webview_smiley_reload(GtkWebViewSmiley *smiley);
571 571
572 /** 572 /**
573 * Destroy a GtkWebViewSmiley. 573 * Destroy a GtkWebViewSmiley.
574 * 574 *
575 * @param smiley The smiley to destroy 575 * @smiley: The smiley to destroy
576 */ 576 */
577 void gtk_webview_smiley_destroy(GtkWebViewSmiley *smiley); 577 void gtk_webview_smiley_destroy(GtkWebViewSmiley *smiley);
578 578
579 /** 579 /**
580 * Returns the text associated with a smiley. 580 * Returns the text associated with a smiley.
581 * 581 *
582 * @param smiley The smiley 582 * @smiley: The smiley
583 * 583 *
584 * @return The text 584 * Returns: The text
585 */ 585 */
586 const char *gtk_webview_smiley_get_smile(const GtkWebViewSmiley *smiley); 586 const char *gtk_webview_smiley_get_smile(const GtkWebViewSmiley *smiley);
587 587
588 /** 588 /**
589 * Returns the file associated with a smiley. 589 * Returns the file associated with a smiley.
590 * 590 *
591 * @param smiley The smiley 591 * @smiley: The smiley
592 * 592 *
593 * @return The file 593 * Returns: The file
594 */ 594 */
595 const char *gtk_webview_smiley_get_file(const GtkWebViewSmiley *smiley); 595 const char *gtk_webview_smiley_get_file(const GtkWebViewSmiley *smiley);
596 596
597 /** 597 /**
598 * Returns the invisibility of a smiley. 598 * Returns the invisibility of a smiley.
599 * 599 *
600 * @param smiley The smiley 600 * @smiley: The smiley
601 * 601 *
602 * @return The hidden status 602 * Returns: The hidden status
603 */ 603 */
604 gboolean gtk_webview_smiley_get_hidden(const GtkWebViewSmiley *smiley); 604 gboolean gtk_webview_smiley_get_hidden(const GtkWebViewSmiley *smiley);
605 605
606 /** 606 /**
607 * Returns the flags associated with a smiley. 607 * Returns the flags associated with a smiley.
608 * 608 *
609 * @param smiley The smiley 609 * @smiley: The smiley
610 * 610 *
611 * @return The flags 611 * Returns: The flags
612 */ 612 */
613 GtkWebViewSmileyFlags gtk_webview_smiley_get_flags(const GtkWebViewSmiley *smiley); 613 GtkWebViewSmileyFlags gtk_webview_smiley_get_flags(const GtkWebViewSmiley *smiley);
614 614
615 /** 615 /**
616 * Returns the smiley object associated with the text. 616 * Returns the smiley object associated with the text.
617 * 617 *
618 * @param webview The GtkWebView 618 * @webview: The GtkWebView
619 * @param sml The name of the smiley category 619 * @sml: The name of the smiley category
620 * @param text The text associated with the smiley 620 * @text: The text associated with the smiley
621 */ 621 */
622 GtkWebViewSmiley *gtk_webview_smiley_find(GtkWebView *webview, const char *sml, 622 GtkWebViewSmiley *gtk_webview_smiley_find(GtkWebView *webview, const char *sml,
623 const char *text); 623 const char *text);
624 624
625 /** 625 /**
626 * Associates a smiley with a GtkWebView. 626 * Associates a smiley with a GtkWebView.
627 * 627 *
628 * @param webview The GtkWebView 628 * @webview: The GtkWebView
629 * @param sml The name of the smiley category 629 * @sml: The name of the smiley category
630 * @param smiley The GtkWebViewSmiley to associate 630 * @smiley: The GtkWebViewSmiley to associate
631 */ 631 */
632 void gtk_webview_associate_smiley(GtkWebView *webview, const char *sml, 632 void gtk_webview_associate_smiley(GtkWebView *webview, const char *sml,
633 GtkWebViewSmiley *smiley); 633 GtkWebViewSmiley *smiley);
634 634
635 /** 635 /**
636 * Removes all smileys associated with a GtkWebView. 636 * Removes all smileys associated with a GtkWebView.
637 * 637 *
638 * @param webview The GtkWebView. 638 * @webview: The GtkWebView.
639 */ 639 */
640 void gtk_webview_remove_smileys(GtkWebView *webview); 640 void gtk_webview_remove_smileys(GtkWebView *webview);
641 641
642 /** 642 /**
643 * Inserts a smiley at the current location or selection in a GtkWebView. 643 * Inserts a smiley at the current location or selection in a GtkWebView.
644 * 644 *
645 * @param webview The GtkWebView 645 * @webview: The GtkWebView
646 * @param sml The category of the smiley 646 * @sml: The category of the smiley
647 * @param smiley The text of the smiley to insert 647 * @smiley: The text of the smiley to insert
648 */ 648 */
649 void gtk_webview_insert_smiley(GtkWebView *webview, const char *sml, 649 void gtk_webview_insert_smiley(GtkWebView *webview, const char *sml,
650 const char *smiley); 650 const char *smiley);
651 651
652 /** 652 /**
653 * Makes the toolbar associated with a GtkWebView visible. 653 * Makes the toolbar associated with a GtkWebView visible.
654 * 654 *
655 * @param webview The GtkWebView. 655 * @webview: The GtkWebView.
656 */ 656 */
657 void gtk_webview_show_toolbar(GtkWebView *webview); 657 void gtk_webview_show_toolbar(GtkWebView *webview);
658 658
659 /** 659 /**
660 * Makes the toolbar associated with a GtkWebView invisible. 660 * Makes the toolbar associated with a GtkWebView invisible.
661 * 661 *
662 * @param webview The GtkWebView. 662 * @webview: The GtkWebView.
663 */ 663 */
664 void gtk_webview_hide_toolbar(GtkWebView *webview); 664 void gtk_webview_hide_toolbar(GtkWebView *webview);
665 665
666 /** 666 /**
667 * Activate an action on the toolbar associated with a GtkWebView. 667 * Activate an action on the toolbar associated with a GtkWebView.
668 * 668 *
669 * @param webview The GtkWebView 669 * @webview: The GtkWebView
670 * @param action The GtkWebViewAction 670 * @action: The GtkWebViewAction
671 */ 671 */
672 void gtk_webview_activate_toolbar(GtkWebView *webview, GtkWebViewAction action); 672 void gtk_webview_activate_toolbar(GtkWebView *webview, GtkWebViewAction action);
673 673
674 /* Do not use. */ 674 /* Do not use. */
675 void 675 void

mercurial