Mercurial > pidgin.yaz
annotate src/gtkimhtml.h @ 11274:67a929d50cfe
[gaim-migrate @ 13459]
commit the make dist changes to po files, as otherwise it takes 15 minutes
to process them (and a minute amount of time after the first attempt)
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 15 Aug 2005 16:22:25 +0000 |
parents | 1cbe76d30e81 |
children | 16b0da1f376f |
rev | line source |
---|---|
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
1 /** |
5967 | 2 * @file gtkimhtml.h GTK+ IM/HTML rendering component |
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
3 * @ingroup gtkui |
1428 | 4 * |
8046 | 5 * Gaim is the legal property of its developers, whose names are too numerous |
6 * to list here. Please refer to the COPYRIGHT file distributed with this | |
7 * source distribution. | |
1428 | 8 * |
9 * This program is free software; you can redistribute it and/or modify | |
10 * under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
9713 | 23 #ifndef _GAIM_GTKIMHTML_H_ |
24 #define _GAIM_GTKIMHTML_H_ | |
1428 | 25 |
26 #include <gdk/gdk.h> | |
3922 | 27 #include <gtk/gtktextview.h> |
4735 | 28 #include <gtk/gtktooltips.h> |
5012 | 29 #include <gtk/gtkimage.h> |
1428 | 30 |
31 #ifdef __cplusplus | |
32 extern "C" { | |
33 #endif | |
34 | |
9033 | 35 /************************************************************************** |
36 * @name Structures | |
37 **************************************************************************/ | |
38 /*@{*/ | |
39 | |
1428 | 40 #define GTK_TYPE_IMHTML (gtk_imhtml_get_type ()) |
41 #define GTK_IMHTML(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml)) | |
42 #define GTK_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass)) | |
43 #define GTK_IS_IMHTML(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML)) | |
44 #define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML)) | |
5967 | 45 #define GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj) |
1428 | 46 |
5967 | 47 typedef struct _GtkIMHtml GtkIMHtml; |
48 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | |
49 typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */ | |
50 typedef struct _GtkSmileyTree GtkSmileyTree; | |
51 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley; | |
52 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable; | |
53 typedef struct _GtkIMHtmlImage GtkIMHtmlImage; | |
54 typedef struct _GtkIMHtmlHr GtkIMHtmlHr; | |
8962 | 55 typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs; |
8061 | 56 |
8420 | 57 typedef enum { |
10776 | 58 GTK_IMHTML_BOLD = 1 << 0, |
59 GTK_IMHTML_ITALIC = 1 << 1, | |
60 GTK_IMHTML_UNDERLINE = 1 << 2, | |
61 GTK_IMHTML_GROW = 1 << 3, | |
62 GTK_IMHTML_SHRINK = 1 << 4, | |
63 GTK_IMHTML_FACE = 1 << 5, | |
64 GTK_IMHTML_FORECOLOR = 1 << 6, | |
65 GTK_IMHTML_BACKCOLOR = 1 << 7, | |
66 GTK_IMHTML_BACKGROUND = 1 << 8, | |
67 GTK_IMHTML_LINK = 1 << 9, | |
68 GTK_IMHTML_IMAGE = 1 << 10, | |
69 GTK_IMHTML_SMILEY = 1 << 11, | |
70 GTK_IMHTML_LINKDESC = 1 << 12, | |
71 GTK_IMHTML_STRIKE = 1 << 13, | |
72 GTK_IMHTML_ALL = -1 | |
8420 | 73 } GtkIMHtmlButtons; |
8061 | 74 |
1428 | 75 struct _GtkIMHtml { |
3922 | 76 GtkTextView text_view; |
77 GtkTextBuffer *text_buffer; | |
1428 | 78 GdkCursor *hand_cursor; |
79 GdkCursor *arrow_cursor; | |
8061 | 80 GdkCursor *text_cursor; |
4032 | 81 GHashTable *smiley_data; |
82 GtkSmileyTree *default_smilies; | |
8456 | 83 char *protocol_name; |
10798 | 84 guint scroll_src; |
85 GTimer *scroll_time; | |
4254 | 86 |
6124 | 87 gboolean show_comments; |
4735 | 88 |
89 GtkWidget *tip_window; | |
90 char *tip; | |
91 guint tip_timer; | |
10799 | 92 GtkTextTag *prelit_tag; |
4895 | 93 |
94 GList *scalables; | |
4947 | 95 GdkRectangle old_rect; |
7295 | 96 |
8061 | 97 gchar *search_string; |
7694 | 98 |
8061 | 99 gboolean editable; |
8420 | 100 GtkIMHtmlButtons format_functions; |
8677 | 101 gboolean wbfo; /* Whole buffer formatting only. */ |
102 | |
103 gint insert_offset; | |
8420 | 104 |
8061 | 105 struct { |
8677 | 106 gboolean bold:1; |
107 gboolean italic:1; | |
108 gboolean underline:1; | |
9924 | 109 gboolean strike:1; |
8677 | 110 gchar *forecolor; |
111 gchar *backcolor; | |
10776 | 112 gchar *background; |
8677 | 113 gchar *fontface; |
8061 | 114 int fontsize; |
8677 | 115 GtkTextTag *link; |
8061 | 116 } edit; |
8740
61a090413b93
[gaim-migrate @ 9495]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
117 |
8681 | 118 char *clipboard_text_string; |
119 char *clipboard_html_string; | |
8962 | 120 |
121 GSList *im_images; | |
122 GtkIMHtmlFuncs *funcs; | |
1428 | 123 }; |
124 | |
125 struct _GtkIMHtmlClass { | |
3922 | 126 GtkTextViewClass parent_class; |
1428 | 127 |
5967 | 128 void (*url_clicked)(GtkIMHtml *, const gchar *); |
8420 | 129 void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons); |
130 void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons); | |
8427 | 131 void (*clear_format)(GtkIMHtml *); |
8506 | 132 void (*update_format)(GtkIMHtml *); |
10108 | 133 gboolean (*message_send)(GtkIMHtml *); |
5967 | 134 }; |
135 | |
136 struct _GtkIMHtmlFontDetail { | |
137 gushort size; | |
138 gchar *face; | |
139 gchar *fore; | |
140 gchar *back; | |
10776 | 141 gchar *bg; |
5967 | 142 gchar *sml; |
9950 | 143 gboolean underline; |
5967 | 144 }; |
145 | |
146 struct _GtkSmileyTree { | |
147 GString *values; | |
148 GtkSmileyTree **children; | |
149 GtkIMHtmlSmiley *image; | |
1428 | 150 }; |
151 | |
4263 | 152 struct _GtkIMHtmlSmiley { |
153 gchar *smile; | |
154 gchar *file; | |
6814
782907a6ae65
[gaim-migrate @ 7354]
Christian Hammond <chipx86@chipx86.com>
parents:
6282
diff
changeset
|
155 GdkPixbufAnimation *icon; |
4263 | 156 gboolean hidden; |
10526 | 157 GdkPixbufLoader *loader; |
4263 | 158 }; |
159 | |
5967 | 160 struct _GtkIMHtmlScalable { |
4895 | 161 void (*scale)(struct _GtkIMHtmlScalable *, int, int); |
162 void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
163 void (*free)(struct _GtkIMHtmlScalable *); | |
164 }; | |
165 | |
5967 | 166 struct _GtkIMHtmlImage { |
4895 | 167 GtkIMHtmlScalable scalable; |
5012 | 168 GtkImage *image; |
5046 | 169 GdkPixbuf *pixbuf; |
4895 | 170 GtkTextMark *mark; |
5012 | 171 gchar *filename; |
4895 | 172 int width; |
173 int height; | |
8962 | 174 int id; |
9573 | 175 GtkWidget *filesel; |
5967 | 176 }; |
4895 | 177 |
5967 | 178 struct _GtkIMHtmlHr { |
4895 | 179 GtkIMHtmlScalable scalable; |
180 GtkWidget *sep; | |
5967 | 181 }; |
182 | |
183 typedef enum { | |
184 GTK_IMHTML_NO_COLOURS = 1 << 0, | |
185 GTK_IMHTML_NO_FONTS = 1 << 1, | |
8105 | 186 GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */ |
5967 | 187 GTK_IMHTML_NO_TITLE = 1 << 3, |
188 GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
189 GTK_IMHTML_NO_SIZES = 1 << 5, | |
190 GTK_IMHTML_NO_SCROLL = 1 << 6, | |
191 GTK_IMHTML_RETURN_LOG = 1 << 7, | |
192 GTK_IMHTML_USE_POINTSIZE = 1 << 8 | |
193 } GtkIMHtmlOptions; | |
194 | |
10145 | 195 enum { |
196 GTK_IMHTML_DRAG_URL = 0, | |
197 GTK_IMHTML_DRAG_HTML, | |
198 GTK_IMHTML_DRAG_UTF8_STRING, | |
199 GTK_IMHTML_DRAG_COMPOUND_TEXT, | |
200 GTK_IMHTML_DRAG_STRING, | |
201 GTK_IMHTML_DRAG_TEXT, | |
202 GTK_IMHTML_DRAG_NUM | |
203 }; | |
204 | |
205 #define GTK_IMHTML_DND_TARGETS \ | |
10345 | 206 { "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \ |
10243 | 207 { "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \ |
10145 | 208 { "text/html", 0, GTK_IMHTML_DRAG_HTML }, \ |
209 { "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \ | |
210 { "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \ | |
211 { "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \ | |
212 { "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \ | |
213 { "STRING", 0, GTK_IMHTML_DRAG_STRING }, \ | |
214 { "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \ | |
215 { "TEXT", 0, GTK_IMHTML_DRAG_TEXT } | |
216 | |
8962 | 217 typedef gpointer (*GtkIMHtmlGetImageFunc) (int id); |
218 typedef gpointer (*GtkIMHtmlGetImageDataFunc) (gpointer i); | |
219 typedef size_t (*GtkIMHtmlGetImageSizeFunc) (gpointer i); | |
220 typedef const char *(*GtkIMHtmlGetImageFilenameFunc)(gpointer i); | |
221 typedef void (*GtkIMHtmlImageRefFunc) (int id); | |
222 typedef void (*GtkIMHtmlImageUnrefFunc) (int id); | |
223 | |
224 struct _GtkIMHtmlFuncs { | |
225 GtkIMHtmlGetImageFunc image_get; | |
226 GtkIMHtmlGetImageDataFunc image_get_data; | |
227 GtkIMHtmlGetImageSizeFunc image_get_size; | |
228 GtkIMHtmlGetImageFilenameFunc image_get_filename; | |
229 GtkIMHtmlImageRefFunc image_ref; | |
230 GtkIMHtmlImageUnrefFunc image_unref; | |
231 }; | |
232 | |
9033 | 233 /*@}*/ |
8962 | 234 |
9033 | 235 /************************************************************************** |
236 * @name GTK+ IM/HTML rendering component API | |
237 **************************************************************************/ | |
238 /*@{*/ | |
239 | |
240 /** | |
9037 | 241 * Returns the GType object for an IM/HTML widget. |
9033 | 242 * |
9037 | 243 * @return The GType for an IM/HTML widget. |
9033 | 244 */ |
9037 | 245 GType gtk_imhtml_get_type(void); |
5967 | 246 |
9033 | 247 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
248 * Creates and returns a new GTK+ IM/HTML widget. |
9033 | 249 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
250 * @return The GTK+ IM/HTML widget created. |
9033 | 251 */ |
252 GtkWidget *gtk_imhtml_new(void *, void *); | |
5967 | 253 |
9033 | 254 /** |
10526 | 255 * Returns the smiley object associated with the text. |
256 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
257 * @param imhtml The GTK+ IM/HTML. |
10526 | 258 * @param sml The name of the smiley category. |
259 * @param text The text associated with the smiley. | |
260 */ | |
261 | |
262 GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, | |
263 const gchar * sml, const gchar * text); | |
264 | |
265 | |
266 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
267 * Associates a smiley with a GTK+ IM/HTML. |
9033 | 268 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
269 * @param imhtml The GTK+ IM/HTML. |
9033 | 270 * @param sml The name of the smiley category. |
271 * @param smiley The GtkIMSmiley to associate. | |
272 */ | |
10537 | 273 void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); |
9033 | 274 |
275 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
276 * Removes all smileys associated with a GTK+ IM/HTML. |
9033 | 277 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
278 * @param imhtml The GTK+ IM/HTML. |
9033 | 279 */ |
280 void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); | |
5967 | 281 |
9033 | 282 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
283 * Sets the function callbacks to use with a GTK+ IM/HTML instance. |
9033 | 284 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
285 * @param imhtml The GTK+ IM/HTML. |
9033 | 286 * @param f The GtkIMHTMLFuncs struct containing the functions to use. |
287 */ | |
288 void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); | |
5967 | 289 |
9033 | 290 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
291 * Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML. |
9033 | 292 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
293 * @param imhtml The GTK+ IM/HTML. |
9033 | 294 * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. |
295 */ | |
296 void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); | |
8962 | 297 |
9033 | 298 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
299 * Associates a protocol name with a GTK+ IM/HTML. |
9033 | 300 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
301 * @param imhtml The GTK+ IM/HTML. |
9033 | 302 * @param protocol_name The protocol name to associate with the IM/HTML. |
303 */ | |
304 void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); | |
8456 | 305 |
9033 | 306 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
307 * Appends HTML formatted text to a GTK+ IM/HTML. |
9033 | 308 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
309 * @param imhtml The GTK+ IM/HTML. |
9033 | 310 * @param text The formatted text to append. |
311 * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
312 */ | |
9307 | 313 #define gtk_imhtml_append_text(imhtml, text, options) \ |
314 gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) | |
6982 | 315 |
9033 | 316 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
317 * Appends HTML formatted text to a GTK+ IM/HTML. |
9033 | 318 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
319 * @param imhtml The GTK+ IM/HTML. |
9033 | 320 * @param text The formatted text to append. |
321 * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
9185 | 322 * @param unused Use @c NULL value. |
9033 | 323 */ |
324 void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, | |
325 const gchar *text, | |
326 GtkIMHtmlOptions options, | |
327 GSList *unused); | |
328 | |
329 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
330 * Inserts HTML formatted text to a GTK+ IM/HTML at a given iter. |
9033 | 331 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
332 * @param imhtml The GTK+ IM/HTML. |
9033 | 333 * @param text The formatted text to append. |
334 * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
335 * @param iter A GtkTextIter in the GTK+ IM/HTML at which to insert text. |
9033 | 336 */ |
8677 | 337 void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, |
338 const gchar *text, | |
339 GtkIMHtmlOptions options, | |
340 GtkTextIter *iter); | |
9033 | 341 |
342 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
343 * Scrolls a GTK+ IM/HTML to the end of its contents. |
9033 | 344 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
345 * @param imhtml The GTK+ IM/HTML. |
9033 | 346 */ |
8729 | 347 void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml); |
9033 | 348 |
349 /** | |
11224
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
350 * Delete the contents of a GTK+ IM/HTML between start and end. |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
351 * |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
352 * @param imhtml The GTK+ IM/HTML. |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
353 * @param start a postition in the imhtml's buffer |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
354 * @param end another postition in the imhtml's buffer |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
355 */ |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
356 void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
357 |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
358 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
359 * Purges the contents from a GTK+ IM/HTML and resets formatting. |
9033 | 360 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
361 * @param imhtml The GTK+ IM/HTML. |
9033 | 362 */ |
11224
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
363 #define gtk_imhtml_clear(imhtml) \ |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
364 gtk_imhtml_delete(imhtml, NULL, NULL) |
4895 | 365 |
9033 | 366 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
367 * Scrolls a GTK+ IM/HTML up by one page. |
9033 | 368 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
369 * @param imhtml The GTK+ IM/HTML. |
9033 | 370 */ |
371 void gtk_imhtml_page_up(GtkIMHtml *imhtml); | |
372 | |
373 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
374 * Scrolls a GTK+ IM/HTML down by one page. |
9033 | 375 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
376 * @param imhtml The GTK+ IM/HTML. |
9033 | 377 */ |
378 void gtk_imhtml_page_down(GtkIMHtml *imhtml); | |
379 | |
380 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
381 * Creates and returns an new GTK+ IM/HTML scalable object. |
9033 | 382 * |
383 * @return A new IM/HTML Scalable object. | |
384 */ | |
4895 | 385 GtkIMHtmlScalable *gtk_imhtml_scalable_new(); |
9033 | 386 |
387 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
388 * Creates and returns an new GTK+ IM/HTML scalable object with an image. |
9033 | 389 * |
390 * @param img A GdkPixbuf of the image to add. | |
391 * @param filename The filename to associate with the image. | |
392 * @param id The id to associate with the image. | |
393 * | |
394 * @return A new IM/HTML Scalable object with an image. | |
395 */ | |
8962 | 396 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); |
9033 | 397 |
398 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
399 * Destroys and frees a GTK+ IM/HTML scalable image. |
9033 | 400 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
401 * @param scale The GTK+ IM/HTML scalable. |
9033 | 402 */ |
403 void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); | |
4895 | 404 |
9033 | 405 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
406 * Rescales a GTK+ IM/HTML scalable image to a given size. |
9033 | 407 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
408 * @param scale The GTK+ IM/HTML scalable. |
9033 | 409 * @param width The new width. |
410 * @param height The new height. | |
411 */ | |
412 void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); | |
413 | |
414 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
415 * Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter. |
9033 | 416 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
417 * @param scale The GTK+ IM/HTML scalable. |
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
418 * @param imhtml The GTK+ IM/HTML. |
9033 | 419 * @param iter The GtkTextIter at which to add the scalable. |
420 */ | |
421 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); | |
422 | |
423 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
424 * Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule. |
9033 | 425 * |
426 * @return A new IM/HTML Scalable object with an image. | |
427 */ | |
5967 | 428 GtkIMHtmlScalable *gtk_imhtml_hr_new(); |
9033 | 429 |
430 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
431 * Destroys and frees a GTK+ IM/HTML scalable horizontal rule. |
9033 | 432 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
433 * @param scale The GTK+ IM/HTML scalable. |
9033 | 434 */ |
9034 | 435 void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); |
9033 | 436 |
437 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
438 * Rescales a GTK+ IM/HTML scalable horizontal rule to a given size. |
9033 | 439 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
440 * @param scale The GTK+ IM/HTML scalable. |
9033 | 441 * @param width The new width. |
442 * @param height The new height. | |
443 */ | |
9034 | 444 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); |
4895 | 445 |
9033 | 446 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
447 * Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at |
9033 | 448 * a given iter. |
449 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
450 * @param scale The GTK+ IM/HTML scalable. |
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
451 * @param imhtml The GTK+ IM/HTML. |
9033 | 452 * @param iter The GtkTextIter at which to add the scalable. |
453 */ | |
9307 | 454 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
9033 | 455 |
456 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
457 * Finds and highlights a given string in a GTK+ IM/HTML. |
9033 | 458 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
459 * @param imhtml The GTK+ IM/HTML. |
9033 | 460 * @param text The string to search for. |
461 * | |
462 * @return @c TRUE if a search was performed, or @c FALSE if not. | |
463 */ | |
7295 | 464 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); |
9033 | 465 |
466 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
467 * Clears the highlighting from a prior search in a GTK+ IM/HTML. |
9033 | 468 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
469 * @param imhtml The GTK+ IM/HTML. |
9033 | 470 */ |
7295 | 471 void gtk_imhtml_search_clear(GtkIMHtml *imhtml); |
4895 | 472 |
9033 | 473 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
474 * Enables or disables editing in a GTK+ IM/HTML. |
9033 | 475 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
476 * @param imhtml The GTK+ IM/HTML. |
9033 | 477 * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. |
478 */ | |
8061 | 479 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); |
9033 | 480 |
481 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
482 * Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML. |
9033 | 483 * In this mode formatting options to the buffer take effect for the entire |
484 * buffer instead of specific text. | |
485 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
486 * @param imhtml The GTK+ IM/HTML. |
9033 | 487 * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. |
488 */ | |
8677 | 489 void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); |
9033 | 490 |
491 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
492 * Indicates which formatting functions to enable and disable in a GTK+ IM/HTML. |
9033 | 493 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
494 * @param imhtml The GTK+ IM/HTML. |
9185 | 495 * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. |
9033 | 496 */ |
8420 | 497 void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); |
9033 | 498 |
499 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
500 * Returns which formatting functions are enabled in a GTK+ IM/HTML. |
9033 | 501 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
502 * @param imhtml The GTK+ IM/HTML. |
9033 | 503 * |
9185 | 504 * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. |
9033 | 505 */ |
8788 | 506 GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); |
9033 | 507 |
508 /** | |
509 * Sets each boolean to TRUE if that formatting option is enabled at the | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
510 * current position in a GTK+ IM/HTML. |
9033 | 511 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
512 * @param imhtml The GTK+ IM/HTML. |
9033 | 513 * @param bold A reference to a boolean for bold. |
514 * @param italic A reference to a boolean for italic. | |
515 * @param underline A reference to a boolean for underline. | |
516 */ | |
8516 | 517 void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); |
9033 | 518 |
519 /** | |
520 * Returns a string containing the selected font face at the current position | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
521 * in a GTK+ IM/HTML. |
9033 | 522 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
523 * @param imhtml The GTK+ IM/HTML. |
9033 | 524 * |
525 * @return A string containg the font face or @c NULL if none is set. | |
526 */ | |
9025 | 527 char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); |
9033 | 528 |
529 /** | |
530 * Returns a string containing the selected foreground color at the current | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
531 * position in a GTK+ IM/HTML. |
9033 | 532 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
533 * @param imhtml The GTK+ IM/HTML. |
9033 | 534 * |
535 * @return A string containg the foreground color or @c NULL if none is set. | |
536 */ | |
9025 | 537 char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); |
9033 | 538 |
539 /** | |
10776 | 540 * Returns a string containing the selected font background color at the current |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
541 * position in a GTK+ IM/HTML. |
10776 | 542 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
543 * @param imhtml The GTK+ IM/HTML. |
10776 | 544 * |
545 * @return A string containg the font background color or @c NULL if none is set. | |
546 */ | |
547 char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); | |
548 | |
549 /** | |
9033 | 550 * Returns a string containing the selected background color at the current |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
551 * position in a GTK+ IM/HTML. |
9033 | 552 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
553 * @param imhtml The GTK+ IM/HTML. |
9033 | 554 * |
555 * @return A string containg the background color or @c NULL if none is set. | |
556 */ | |
10776 | 557 char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); |
9033 | 558 |
559 /** | |
560 * Returns a integer containing the selected HTML font size at the current | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
561 * position in a GTK+ IM/HTML. |
9033 | 562 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
563 * @param imhtml The GTK+ IM/HTML. |
9033 | 564 * |
565 * @return The HTML font size. | |
566 */ | |
9025 | 567 gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); |
9033 | 568 |
569 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
570 * Checks whether a GTK+ IM/HTML is marked as editable. |
9033 | 571 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
572 * @param imhtml The GTK+ IM/HTML. |
9033 | 573 * |
574 * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. | |
575 */ | |
8061 | 576 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); |
9033 | 577 |
578 /** | |
11269
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
579 * Clear all the formatting on a GTK+ IM/HTML. |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
580 * |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
581 * @param imhtml The GTK+ IM/HTML. |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
582 */ |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
583 void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml); |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
584 |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
585 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
586 * Toggles bold at the cursor location or selection in a GTK+ IM/HTML. |
9033 | 587 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
588 * @param imhtml The GTK+ IM/HTML. |
9033 | 589 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
590 void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); |
9033 | 591 |
592 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
593 * Toggles italic at the cursor location or selection in a GTK+ IM/HTML. |
9033 | 594 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
595 * @param imhtml The GTK+ IM/HTML. |
9033 | 596 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
597 void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); |
9033 | 598 |
599 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
600 * Toggles underline at the cursor location or selection in a GTK+ IM/HTML. |
9033 | 601 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
602 * @param imhtml The GTK+ IM/HTML. |
9033 | 603 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
604 void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); |
9033 | 605 |
606 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
607 * Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML. |
9924 | 608 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
609 * @param imhtml The GTK+ IM/HTML. |
9924 | 610 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
611 void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); |
9924 | 612 |
613 /** | |
9033 | 614 * Toggles a foreground color at the current location or selection in a GTK |
615 * IM/HTML. | |
616 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
617 * @param imhtml The GTK+ IM/HTML. |
9185 | 618 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
9033 | 619 * |
620 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
621 */ | |
8061 | 622 gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); |
9033 | 623 |
624 /** | |
625 * Toggles a background color at the current location or selection in a GTK | |
626 * IM/HTML. | |
627 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
628 * @param imhtml The GTK+ IM/HTML. |
9185 | 629 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
9033 | 630 * |
631 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
632 */ | |
8061 | 633 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); |
9033 | 634 |
635 /** | |
10776 | 636 * Toggles a background color at the current location or selection in a GTK |
637 * IM/HTML. | |
638 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
639 * @param imhtml The GTK+ IM/HTML. |
10776 | 640 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
641 * | |
642 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
643 */ | |
644 gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); | |
645 | |
646 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
647 * Toggles a font face at the current location or selection in a GTK+ IM/HTML. |
9033 | 648 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
649 * @param imhtml The GTK+ IM/HTML. |
9185 | 650 * @param face The font face name, or @c NULL or "" to clear the font. |
9033 | 651 * |
652 * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. | |
653 */ | |
8061 | 654 gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); |
9033 | 655 |
656 /** | |
657 * Toggles a link tag with the given URL at the current location or selection | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
658 * in a GTK+ IM/HTML. |
9033 | 659 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
660 * @param imhtml The GTK+ IM/HTML. |
9185 | 661 * @param url The URL for the link or @c NULL to terminate the link. |
9033 | 662 */ |
8677 | 663 void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); |
9033 | 664 |
665 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
666 * Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML. |
9033 | 667 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
668 * @param imhtml The GTK+ IM/HTML. |
9033 | 669 * @param mark The GtkTextMark to insert the link at. |
670 * @param url The URL for the link. | |
671 * @param text The string to use for the link description. | |
672 */ | |
8677 | 673 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); |
9033 | 674 |
675 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
676 * Inserts a smiley at the current location or selection in a GTK+ IM/HTML. |
9033 | 677 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
678 * @param imhtml The GTK+ IM/HTML. |
9033 | 679 * @param sml The category of the smiley. |
680 * @param smiley The text of the smiley to insert. | |
681 */ | |
8061 | 682 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); |
9033 | 683 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
684 * Inserts a smiley at the given iter in a GTK+ IM/HTML. |
9033 | 685 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
686 * @param imhtml The GTK+ IM/HTML. |
9033 | 687 * @param sml The category of the smiley. |
688 * @param smiley The text of the smiley to insert. | |
689 * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. | |
690 */ | |
8677 | 691 void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); |
9033 | 692 |
693 /** | |
694 * Inserts the IM/HTML scalable image with the given id at the given iter in a | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
695 * GTK+ IM/HTML. |
9033 | 696 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
697 * @param imhtml The GTK+ IM/HTML. |
9033 | 698 * @param id The id of the IM/HTML scalable. |
699 * @param iter The GtkTextIter in the IM/HTML to insert the image at. | |
700 */ | |
8962 | 701 void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); |
9033 | 702 |
703 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
704 * Sets the font size at the current location or selection in a GTK+ IM/HTML. |
9033 | 705 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
706 * @param imhtml The GTK+ IM/HTML. |
9033 | 707 * @param size The HTML font size to use. |
708 */ | |
8061 | 709 void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); |
9033 | 710 |
711 /** | |
712 * Decreases the font size by 1 at the current location or selection in a GTK | |
713 * IM/HTML. | |
714 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
715 * @param imhtml The GTK+ IM/HTML. |
9033 | 716 */ |
8061 | 717 void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); |
9033 | 718 |
719 /** | |
720 * Increases the font size by 1 at the current location or selection in a GTK | |
721 * IM/HTML. | |
722 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
723 * @param imhtml The GTK+ IM/HTML. |
9033 | 724 */ |
8061 | 725 void gtk_imhtml_font_grow(GtkIMHtml *imhtml); |
9033 | 726 |
727 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
728 * Returns the HTML formatted contents between two iters in a GTK+ IM/HTML. |
9033 | 729 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
730 * @param imhtml The GTK+ IM/HTML. |
9033 | 731 * @param start The GtkTextIter indicating the start point in the IM/HTML. |
732 * @param end The GtkTextIter indicating the end point in the IM/HTML. | |
733 * | |
734 * @return A string containing the HTML formatted text. | |
735 */ | |
8061 | 736 char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
9033 | 737 |
738 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
739 * Returns the entire HTML formatted contents of a GTK+ IM/HTML. |
9033 | 740 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
741 * @param imhtml The GTK+ IM/HTML. |
9033 | 742 * |
743 * @return A string containing the HTML formatted text. | |
744 */ | |
8061 | 745 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); |
9033 | 746 |
747 /** | |
748 * Returns a null terminated array of pointers to null terminated strings, each | |
749 * string for each line. g_strfreev() should be called to free it when done. | |
750 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
751 * @param imhtml The GTK+ IM/HTML. |
9033 | 752 * |
753 * @return A null terminated array of null terminated HTML formatted strings. | |
754 */ | |
8677 | 755 char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); |
9033 | 756 |
757 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
758 * Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML |
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
759 * between two iters in a GTK+ IM/HTML. |
9033 | 760 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
761 * @param imhtml The GTK+ IM/HTML. |
9033 | 762 * @param start The GtkTextIter indicating the start point in the IM/HTML. |
9185 | 763 * @param stop The GtkTextIter indicating the end point in the IM/HTML. |
9033 | 764 * |
765 * @return A string containing the unformatted text. | |
766 */ | |
8677 | 767 char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop); |
8061 | 768 |
9033 | 769 /*@}*/ |
770 | |
1428 | 771 #ifdef __cplusplus |
772 } | |
773 #endif | |
774 | |
9713 | 775 #endif /* _GAIM_GTKIMHTML_H_ */ |