Mercurial > pidgin
diff src/gtkimhtml.h @ 7694:6a9acef3b867
[gaim-migrate @ 8339]
Committing this now so that I don't accidentally destroy it again.
We're going WYSIWYG, folks. This is the beginning of it. Don't bother
trying to tell me what doesn't work yet. This is just a sneak-peek.
Bold, Italics, and Underline work fairly well. The toggle buttons in the
tooltips won't necessarily be accurate yet, and things will get screwed up
if you say, start typing, make something bold, then go back to before where
you started typing and type there. It'll all be fixed eventually.
NOTE: I am not liable for any sexual arousal caused by using this code
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Tue, 02 Dec 2003 07:33:42 +0000 |
| parents | 15155dbc768a |
| children | 734736bad76c |
line wrap: on
line diff
--- a/src/gtkimhtml.h Tue Dec 02 07:08:02 2003 +0000 +++ b/src/gtkimhtml.h Tue Dec 02 07:33:42 2003 +0000 @@ -49,6 +49,15 @@ typedef struct _GtkIMHtmlHr GtkIMHtmlHr; typedef struct _GtkIMHtmlCopyable GtkIMHtmlCopyable; + +typedef struct { + GtkTextMark *start; + GtkTextMark *end; + char *start_tag; + char *end_tag; + GtkTextBuffer *buffer; +} GtkIMHtmlFormatSpan; + struct _GtkIMHtml { GtkTextView text_view; GtkTextBuffer *text_buffer; @@ -56,6 +65,7 @@ gboolean comments, smileys; GdkCursor *hand_cursor; GdkCursor *arrow_cursor; + GdkCursor *text_cursor; GHashTable *smiley_data; GtkSmileyTree *default_smilies; @@ -72,6 +82,14 @@ GSList *copyables; gchar *search_string; + + gboolean editable; + struct { + GtkIMHtmlFormatSpan *bold; + GtkIMHtmlFormatSpan *italic; + GtkIMHtmlFormatSpan *underline; + } edit; + GList *format_spans; }; struct _GtkIMHtmlClass { @@ -182,6 +200,15 @@ gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); void gtk_imhtml_search_clear(GtkIMHtml *imhtml); +/* Editable stuff */ +void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); +gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); +gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); +gboolean gtk_imthml_toggle_italic(GtkIMHtml *imhtml); +gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); +char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); +char *gtk_imhtml_get_text(GtkIMHtml *imhtml); + #ifdef __cplusplus } #endif
