Mercurial > pidgin.yaz
diff pidgin/gtkutils.h @ 32599:d9cb56d33839
Add a pidgin_create_webview utility function, which acts similarly to
the imhtml version. Note that an editable webview does not yet exist,
so don't call this function with editable=TRUE!
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 09 Sep 2011 01:52:12 +0000 |
parents | 58e0e310ef2e |
children | 5aa171c8776b |
line wrap: on
line diff
--- a/pidgin/gtkutils.h Thu Sep 08 23:28:40 2011 +0000 +++ b/pidgin/gtkutils.h Fri Sep 09 01:52:12 2011 +0000 @@ -109,6 +109,28 @@ GtkWidget *pidgin_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); /** + * Create an GtkWebView widget and associated GtkIMHtmlToolbar widget. This + * function puts both widgets in a nice GtkFrame. They're separated by an + * attractive GtkSeparator. + * FIXME: There is no editable GtkWebView yet. + * + * @param editable @c TRUE if this webview should be editable. If this is + * @c FALSE, then the toolbar will NOT be created. If this webview + * should be read-only at first, but may become editable later, then + * pass in @c TRUE here and then manually call gtk_webview_set_editable() + * later. + * @param webview_ret A pointer to a pointer to a GtkWidget. This pointer + * will be set to the webview when this function exits. + * @param toolbar_ret A pointer to a pointer to a GtkWidget. If editable is + * TRUE then this will be set to the toolbar when this function exits. + * Otherwise this will be set to @c NULL. + * @param sw_ret This will be filled with a pointer to the scrolled window + * widget which contains the webview. + * @return The GtkFrame containing the toolbar and webview. + */ +GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); + +/** * Creates a small button * * @param image A button image.