comparison src/gtkimhtml.h @ 7714:3d9d3d21e600

[gaim-migrate @ 8359] I rock so hard! This is just too easy. WYSIWYG foreground and background colors. The observant commit watcher will note that I'm not really paying too close attention to the toolbar UI yet. And as a result, it doesn't really work too great. The plan is to make the toolbar its own GtkWidget, which will attach to a GtkIMHtml. The GtkIMHtml will emit signals to it, telling it what state it should be in, and the toolbar will manipulate the GtkIMHtml accordingly. This way, anything that has text entry can have a toolbar with which to edit it. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 03 Dec 2003 04:17:42 +0000
parents 17756d5dcfdf
children db3bdae1761e
comparison
equal deleted inserted replaced
7713:1adc71ed6d45 7714:3d9d3d21e600
54 GtkTextMark *start; 54 GtkTextMark *start;
55 GtkTextMark *end; 55 GtkTextMark *end;
56 char *start_tag; 56 char *start_tag;
57 char *end_tag; 57 char *end_tag;
58 GtkTextBuffer *buffer; 58 GtkTextBuffer *buffer;
59 GtkTextTag *tag;
59 } GtkIMHtmlFormatSpan; 60 } GtkIMHtmlFormatSpan;
60 61
61 struct _GtkIMHtml { 62 struct _GtkIMHtml {
62 GtkTextView text_view; 63 GtkTextView text_view;
63 GtkTextBuffer *text_buffer; 64 GtkTextBuffer *text_buffer;
86 gboolean editable; 87 gboolean editable;
87 struct { 88 struct {
88 GtkIMHtmlFormatSpan *bold; 89 GtkIMHtmlFormatSpan *bold;
89 GtkIMHtmlFormatSpan *italic; 90 GtkIMHtmlFormatSpan *italic;
90 GtkIMHtmlFormatSpan *underline; 91 GtkIMHtmlFormatSpan *underline;
92 GtkIMHtmlFormatSpan *forecolor;
93 GtkIMHtmlFormatSpan *backcolor;
91 } edit; 94 } edit;
92 GList *format_spans; 95 GList *format_spans;
93 }; 96 };
94 97
95 struct _GtkIMHtmlClass { 98 struct _GtkIMHtmlClass {
204 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); 207 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable);
205 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); 208 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml);
206 gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); 209 gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml);
207 gboolean gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); 210 gboolean gtk_imhtml_toggle_italic(GtkIMHtml *imhtml);
208 gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); 211 gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml);
212 gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color);
213 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color);
214
209 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, const char *url, const char *text); 215 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, const char *url, const char *text);
210 216
211 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); 217 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml);
212 char *gtk_imhtml_get_text(GtkIMHtml *imhtml); 218 char *gtk_imhtml_get_text(GtkIMHtml *imhtml);
213 219