Mercurial > pidgin
diff gtk/gtkimhtml.h @ 15341:ca7cc867fa58
[gaim-migrate @ 18134]
Syncing up my tree. I've gotten smileys, <hr>'s and IM images to *mostly* work. Scrolling's the
only obviously busted thing right now.
I also made blist headlines set the URGENT hint.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 16 Jan 2007 02:48:36 +0000 |
parents | d928cf5ead1b |
children | 7c41ecf41614 |
line wrap: on
line diff
--- a/gtk/gtkimhtml.h Mon Jan 15 23:33:50 2007 +0000 +++ b/gtk/gtkimhtml.h Tue Jan 16 02:48:36 2007 +0000 @@ -53,6 +53,7 @@ typedef struct _GtkIMHtmlImage GtkIMHtmlImage; typedef struct _GtkIMHtmlHr GtkIMHtmlHr; typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs; +typedef struct _GtkIMHtmlAnchor GtkIMHtmlAnchor; typedef enum { GTK_IMHTML_BOLD = 1 << 0, @@ -125,6 +126,7 @@ char *clipboard_html_string; GSList *im_images; + GSList *anchors; GtkIMHtmlFuncs *funcs; }; @@ -190,6 +192,11 @@ GtkWidget *sep; }; +struct _GtkIMHtmlAnchor { + GtkTextChildAnchor *anchor; + GtkWidget *widget; +}; + typedef enum { GTK_IMHTML_NO_COLOURS = 1 << 0, GTK_IMHTML_NO_FONTS = 1 << 1, @@ -474,6 +481,31 @@ void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); /** + * Creates a new anchor for GTK+ widgets, taking care of reference counting + * + * @param anchor The GtkTextChildAnchor + * @param widget The GtkWidget + * + * @return The GtkIMHtmlAnchor + */ +GtkIMHtmlAnchor *gtk_imhtml_anchor_new(GtkTextChildAnchor *anchor, GtkWidget *widget); + +/** + * Frees an anchor, taking care of refcounting + * + * @param anchor The anchor + */ +void gtk_imhtml_anchor_free(GtkIMHtmlAnchor *anchor); + +/** + * Associates an anchor with an imhtml + * + * @param imhtml The IMHTML to associate with. + * @param anchor The anchor to associate + */ +void gtk_imhtml_add_anchor(GtkIMHtml *imhtml, GtkIMHtmlAnchor *anchor); + +/** * Finds and highlights a given string in a GTK+ IM/HTML. * * @param imhtml The GTK+ IM/HTML.