comparison 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
comparison
equal deleted inserted replaced
15340:29e9a2373d32 15341:ca7cc867fa58
51 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley; 51 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley;
52 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable; 52 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable;
53 typedef struct _GtkIMHtmlImage GtkIMHtmlImage; 53 typedef struct _GtkIMHtmlImage GtkIMHtmlImage;
54 typedef struct _GtkIMHtmlHr GtkIMHtmlHr; 54 typedef struct _GtkIMHtmlHr GtkIMHtmlHr;
55 typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs; 55 typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs;
56 typedef struct _GtkIMHtmlAnchor GtkIMHtmlAnchor;
56 57
57 typedef enum { 58 typedef enum {
58 GTK_IMHTML_BOLD = 1 << 0, 59 GTK_IMHTML_BOLD = 1 << 0,
59 GTK_IMHTML_ITALIC = 1 << 1, 60 GTK_IMHTML_ITALIC = 1 << 1,
60 GTK_IMHTML_UNDERLINE = 1 << 2, 61 GTK_IMHTML_UNDERLINE = 1 << 2,
123 124
124 char *clipboard_text_string; 125 char *clipboard_text_string;
125 char *clipboard_html_string; 126 char *clipboard_html_string;
126 127
127 GSList *im_images; 128 GSList *im_images;
129 GSList *anchors;
128 GtkIMHtmlFuncs *funcs; 130 GtkIMHtmlFuncs *funcs;
129 }; 131 };
130 132
131 struct _GtkIMHtmlClass { 133 struct _GtkIMHtmlClass {
132 GtkTextViewClass parent_class; 134 GtkTextViewClass parent_class;
186 }; 188 };
187 189
188 struct _GtkIMHtmlHr { 190 struct _GtkIMHtmlHr {
189 GtkIMHtmlScalable scalable; 191 GtkIMHtmlScalable scalable;
190 GtkWidget *sep; 192 GtkWidget *sep;
193 };
194
195 struct _GtkIMHtmlAnchor {
196 GtkTextChildAnchor *anchor;
197 GtkWidget *widget;
191 }; 198 };
192 199
193 typedef enum { 200 typedef enum {
194 GTK_IMHTML_NO_COLOURS = 1 << 0, 201 GTK_IMHTML_NO_COLOURS = 1 << 0,
195 GTK_IMHTML_NO_FONTS = 1 << 1, 202 GTK_IMHTML_NO_FONTS = 1 << 1,
472 * @param iter The GtkTextIter at which to add the scalable. 479 * @param iter The GtkTextIter at which to add the scalable.
473 */ 480 */
474 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); 481 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter);
475 482
476 /** 483 /**
484 * Creates a new anchor for GTK+ widgets, taking care of reference counting
485 *
486 * @param anchor The GtkTextChildAnchor
487 * @param widget The GtkWidget
488 *
489 * @return The GtkIMHtmlAnchor
490 */
491 GtkIMHtmlAnchor *gtk_imhtml_anchor_new(GtkTextChildAnchor *anchor, GtkWidget *widget);
492
493 /**
494 * Frees an anchor, taking care of refcounting
495 *
496 * @param anchor The anchor
497 */
498 void gtk_imhtml_anchor_free(GtkIMHtmlAnchor *anchor);
499
500 /**
501 * Associates an anchor with an imhtml
502 *
503 * @param imhtml The IMHTML to associate with.
504 * @param anchor The anchor to associate
505 */
506 void gtk_imhtml_add_anchor(GtkIMHtml *imhtml, GtkIMHtmlAnchor *anchor);
507
508 /**
477 * Finds and highlights a given string in a GTK+ IM/HTML. 509 * Finds and highlights a given string in a GTK+ IM/HTML.
478 * 510 *
479 * @param imhtml The GTK+ IM/HTML. 511 * @param imhtml The GTK+ IM/HTML.
480 * @param text The string to search for. 512 * @param text The string to search for.
481 * 513 *