comparison 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
comparison
equal deleted inserted replaced
7693:1d0314b99747 7694:6a9acef3b867
47 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable; 47 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable;
48 typedef struct _GtkIMHtmlImage GtkIMHtmlImage; 48 typedef struct _GtkIMHtmlImage GtkIMHtmlImage;
49 typedef struct _GtkIMHtmlHr GtkIMHtmlHr; 49 typedef struct _GtkIMHtmlHr GtkIMHtmlHr;
50 typedef struct _GtkIMHtmlCopyable GtkIMHtmlCopyable; 50 typedef struct _GtkIMHtmlCopyable GtkIMHtmlCopyable;
51 51
52
53 typedef struct {
54 GtkTextMark *start;
55 GtkTextMark *end;
56 char *start_tag;
57 char *end_tag;
58 GtkTextBuffer *buffer;
59 } GtkIMHtmlFormatSpan;
60
52 struct _GtkIMHtml { 61 struct _GtkIMHtml {
53 GtkTextView text_view; 62 GtkTextView text_view;
54 GtkTextBuffer *text_buffer; 63 GtkTextBuffer *text_buffer;
55 GtkTextMark *end; 64 GtkTextMark *end;
56 gboolean comments, smileys; 65 gboolean comments, smileys;
57 GdkCursor *hand_cursor; 66 GdkCursor *hand_cursor;
58 GdkCursor *arrow_cursor; 67 GdkCursor *arrow_cursor;
68 GdkCursor *text_cursor;
59 GHashTable *smiley_data; 69 GHashTable *smiley_data;
60 GtkSmileyTree *default_smilies; 70 GtkSmileyTree *default_smilies;
61 71
62 gboolean show_smileys; 72 gboolean show_smileys;
63 gboolean show_comments; 73 gboolean show_comments;
70 GdkRectangle old_rect; 80 GdkRectangle old_rect;
71 81
72 GSList *copyables; 82 GSList *copyables;
73 83
74 gchar *search_string; 84 gchar *search_string;
85
86 gboolean editable;
87 struct {
88 GtkIMHtmlFormatSpan *bold;
89 GtkIMHtmlFormatSpan *italic;
90 GtkIMHtmlFormatSpan *underline;
91 } edit;
92 GList *format_spans;
75 }; 93 };
76 94
77 struct _GtkIMHtmlClass { 95 struct _GtkIMHtmlClass {
78 GtkTextViewClass parent_class; 96 GtkTextViewClass parent_class;
79 97
180 198
181 /* Search functions */ 199 /* Search functions */
182 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); 200 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text);
183 void gtk_imhtml_search_clear(GtkIMHtml *imhtml); 201 void gtk_imhtml_search_clear(GtkIMHtml *imhtml);
184 202
203 /* Editable stuff */
204 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable);
205 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml);
206 gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml);
207 gboolean gtk_imthml_toggle_italic(GtkIMHtml *imhtml);
208 gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml);
209 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml);
210 char *gtk_imhtml_get_text(GtkIMHtml *imhtml);
211
185 #ifdef __cplusplus 212 #ifdef __cplusplus
186 } 213 }
187 #endif 214 #endif
188 215
189 #endif 216 #endif