Mercurial > pidgin.yaz
annotate src/gtkimhtml.h @ 11501:9563b768e8e2
[gaim-migrate @ 13746]
Doxygen fixes.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 11 Sep 2005 03:58:13 +0000 |
parents | 16b0da1f376f |
children | b47708f46a38 |
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, | |
11485
16b0da1f376f
[gaim-migrate @ 13727]
Richard Laager <rlaager@wiktel.com>
parents:
11269
diff
changeset
|
192 GTK_IMHTML_USE_POINTSIZE = 1 << 8, |
16b0da1f376f
[gaim-migrate @ 13727]
Richard Laager <rlaager@wiktel.com>
parents:
11269
diff
changeset
|
193 GTK_IMHTML_NO_FORMATTING = 1 << 9 |
5967 | 194 } GtkIMHtmlOptions; |
195 | |
10145 | 196 enum { |
197 GTK_IMHTML_DRAG_URL = 0, | |
198 GTK_IMHTML_DRAG_HTML, | |
199 GTK_IMHTML_DRAG_UTF8_STRING, | |
200 GTK_IMHTML_DRAG_COMPOUND_TEXT, | |
201 GTK_IMHTML_DRAG_STRING, | |
202 GTK_IMHTML_DRAG_TEXT, | |
203 GTK_IMHTML_DRAG_NUM | |
204 }; | |
205 | |
206 #define GTK_IMHTML_DND_TARGETS \ | |
10345 | 207 { "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \ |
10243 | 208 { "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \ |
10145 | 209 { "text/html", 0, GTK_IMHTML_DRAG_HTML }, \ |
210 { "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \ | |
211 { "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \ | |
212 { "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \ | |
213 { "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \ | |
214 { "STRING", 0, GTK_IMHTML_DRAG_STRING }, \ | |
215 { "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \ | |
216 { "TEXT", 0, GTK_IMHTML_DRAG_TEXT } | |
217 | |
8962 | 218 typedef gpointer (*GtkIMHtmlGetImageFunc) (int id); |
219 typedef gpointer (*GtkIMHtmlGetImageDataFunc) (gpointer i); | |
220 typedef size_t (*GtkIMHtmlGetImageSizeFunc) (gpointer i); | |
221 typedef const char *(*GtkIMHtmlGetImageFilenameFunc)(gpointer i); | |
222 typedef void (*GtkIMHtmlImageRefFunc) (int id); | |
223 typedef void (*GtkIMHtmlImageUnrefFunc) (int id); | |
224 | |
225 struct _GtkIMHtmlFuncs { | |
226 GtkIMHtmlGetImageFunc image_get; | |
227 GtkIMHtmlGetImageDataFunc image_get_data; | |
228 GtkIMHtmlGetImageSizeFunc image_get_size; | |
229 GtkIMHtmlGetImageFilenameFunc image_get_filename; | |
230 GtkIMHtmlImageRefFunc image_ref; | |
231 GtkIMHtmlImageUnrefFunc image_unref; | |
232 }; | |
233 | |
9033 | 234 /*@}*/ |
8962 | 235 |
9033 | 236 /************************************************************************** |
237 * @name GTK+ IM/HTML rendering component API | |
238 **************************************************************************/ | |
239 /*@{*/ | |
240 | |
241 /** | |
9037 | 242 * Returns the GType object for an IM/HTML widget. |
9033 | 243 * |
9037 | 244 * @return The GType for an IM/HTML widget. |
9033 | 245 */ |
9037 | 246 GType gtk_imhtml_get_type(void); |
5967 | 247 |
9033 | 248 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
249 * Creates and returns a new GTK+ IM/HTML widget. |
9033 | 250 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
251 * @return The GTK+ IM/HTML widget created. |
9033 | 252 */ |
253 GtkWidget *gtk_imhtml_new(void *, void *); | |
5967 | 254 |
9033 | 255 /** |
10526 | 256 * Returns the smiley object associated with the text. |
257 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
258 * @param imhtml The GTK+ IM/HTML. |
10526 | 259 * @param sml The name of the smiley category. |
260 * @param text The text associated with the smiley. | |
261 */ | |
262 | |
263 GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, | |
264 const gchar * sml, const gchar * text); | |
265 | |
266 | |
267 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
268 * Associates a smiley with a GTK+ IM/HTML. |
9033 | 269 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
270 * @param imhtml The GTK+ IM/HTML. |
9033 | 271 * @param sml The name of the smiley category. |
272 * @param smiley The GtkIMSmiley to associate. | |
273 */ | |
10537 | 274 void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); |
9033 | 275 |
276 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
277 * Removes all smileys associated with a GTK+ IM/HTML. |
9033 | 278 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
279 * @param imhtml The GTK+ IM/HTML. |
9033 | 280 */ |
281 void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); | |
5967 | 282 |
9033 | 283 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
284 * Sets the function callbacks to use with a GTK+ IM/HTML instance. |
9033 | 285 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
286 * @param imhtml The GTK+ IM/HTML. |
9033 | 287 * @param f The GtkIMHTMLFuncs struct containing the functions to use. |
288 */ | |
289 void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); | |
5967 | 290 |
9033 | 291 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
292 * Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML. |
9033 | 293 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
294 * @param imhtml The GTK+ IM/HTML. |
9033 | 295 * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. |
296 */ | |
297 void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); | |
8962 | 298 |
9033 | 299 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
300 * Associates a protocol name with a GTK+ IM/HTML. |
9033 | 301 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
302 * @param imhtml The GTK+ IM/HTML. |
9033 | 303 * @param protocol_name The protocol name to associate with the IM/HTML. |
304 */ | |
305 void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); | |
8456 | 306 |
9033 | 307 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
308 * Appends HTML formatted text to a GTK+ IM/HTML. |
9033 | 309 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
310 * @param imhtml The GTK+ IM/HTML. |
9033 | 311 * @param text The formatted text to append. |
312 * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
313 */ | |
9307 | 314 #define gtk_imhtml_append_text(imhtml, text, options) \ |
315 gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) | |
6982 | 316 |
9033 | 317 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
318 * Appends HTML formatted text to a GTK+ IM/HTML. |
9033 | 319 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
320 * @param imhtml The GTK+ IM/HTML. |
9033 | 321 * @param text The formatted text to append. |
322 * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
9185 | 323 * @param unused Use @c NULL value. |
9033 | 324 */ |
325 void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, | |
326 const gchar *text, | |
327 GtkIMHtmlOptions options, | |
328 GSList *unused); | |
329 | |
330 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
331 * Inserts HTML formatted text to a GTK+ IM/HTML at a given iter. |
9033 | 332 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
333 * @param imhtml The GTK+ IM/HTML. |
9033 | 334 * @param text The formatted text to append. |
335 * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
336 * @param iter A GtkTextIter in the GTK+ IM/HTML at which to insert text. |
9033 | 337 */ |
8677 | 338 void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, |
339 const gchar *text, | |
340 GtkIMHtmlOptions options, | |
341 GtkTextIter *iter); | |
9033 | 342 |
343 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
344 * Scrolls a GTK+ IM/HTML to the end of its contents. |
9033 | 345 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
346 * @param imhtml The GTK+ IM/HTML. |
9033 | 347 */ |
8729 | 348 void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml); |
9033 | 349 |
350 /** | |
11224
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
351 * 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
|
352 * |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
353 * @param imhtml The GTK+ IM/HTML. |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
354 * @param start a postition in the imhtml's buffer |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
355 * @param end another postition in the imhtml's buffer |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
356 */ |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
357 void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
358 |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
359 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
360 * Purges the contents from a GTK+ IM/HTML and resets formatting. |
9033 | 361 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
362 * @param imhtml The GTK+ IM/HTML. |
9033 | 363 */ |
11224
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
364 #define gtk_imhtml_clear(imhtml) \ |
409d6a11da51
[gaim-migrate @ 13360]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10814
diff
changeset
|
365 gtk_imhtml_delete(imhtml, NULL, NULL) |
4895 | 366 |
9033 | 367 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
368 * Scrolls a GTK+ IM/HTML up by one page. |
9033 | 369 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
370 * @param imhtml The GTK+ IM/HTML. |
9033 | 371 */ |
372 void gtk_imhtml_page_up(GtkIMHtml *imhtml); | |
373 | |
374 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
375 * Scrolls a GTK+ IM/HTML down by one page. |
9033 | 376 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
377 * @param imhtml The GTK+ IM/HTML. |
9033 | 378 */ |
379 void gtk_imhtml_page_down(GtkIMHtml *imhtml); | |
380 | |
381 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
382 * Creates and returns an new GTK+ IM/HTML scalable object. |
9033 | 383 * |
384 * @return A new IM/HTML Scalable object. | |
385 */ | |
4895 | 386 GtkIMHtmlScalable *gtk_imhtml_scalable_new(); |
9033 | 387 |
388 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
389 * Creates and returns an new GTK+ IM/HTML scalable object with an image. |
9033 | 390 * |
391 * @param img A GdkPixbuf of the image to add. | |
392 * @param filename The filename to associate with the image. | |
393 * @param id The id to associate with the image. | |
394 * | |
395 * @return A new IM/HTML Scalable object with an image. | |
396 */ | |
8962 | 397 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); |
9033 | 398 |
399 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
400 * Destroys and frees a GTK+ IM/HTML scalable image. |
9033 | 401 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
402 * @param scale The GTK+ IM/HTML scalable. |
9033 | 403 */ |
404 void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); | |
4895 | 405 |
9033 | 406 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
407 * Rescales a GTK+ IM/HTML scalable image to a given size. |
9033 | 408 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
409 * @param scale The GTK+ IM/HTML scalable. |
9033 | 410 * @param width The new width. |
411 * @param height The new height. | |
412 */ | |
413 void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); | |
414 | |
415 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
416 * Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter. |
9033 | 417 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
418 * @param scale The GTK+ IM/HTML scalable. |
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
419 * @param imhtml The GTK+ IM/HTML. |
9033 | 420 * @param iter The GtkTextIter at which to add the scalable. |
421 */ | |
422 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); | |
423 | |
424 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
425 * Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule. |
9033 | 426 * |
427 * @return A new IM/HTML Scalable object with an image. | |
428 */ | |
5967 | 429 GtkIMHtmlScalable *gtk_imhtml_hr_new(); |
9033 | 430 |
431 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
432 * Destroys and frees a GTK+ IM/HTML scalable horizontal rule. |
9033 | 433 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
434 * @param scale The GTK+ IM/HTML scalable. |
9033 | 435 */ |
9034 | 436 void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); |
9033 | 437 |
438 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
439 * Rescales a GTK+ IM/HTML scalable horizontal rule to a given size. |
9033 | 440 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
441 * @param scale The GTK+ IM/HTML scalable. |
9033 | 442 * @param width The new width. |
443 * @param height The new height. | |
444 */ | |
9034 | 445 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); |
4895 | 446 |
9033 | 447 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
448 * Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at |
9033 | 449 * a given iter. |
450 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
451 * @param scale The GTK+ IM/HTML scalable. |
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
452 * @param imhtml The GTK+ IM/HTML. |
9033 | 453 * @param iter The GtkTextIter at which to add the scalable. |
454 */ | |
9307 | 455 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
9033 | 456 |
457 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
458 * Finds and highlights a given string in a GTK+ IM/HTML. |
9033 | 459 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
460 * @param imhtml The GTK+ IM/HTML. |
9033 | 461 * @param text The string to search for. |
462 * | |
463 * @return @c TRUE if a search was performed, or @c FALSE if not. | |
464 */ | |
7295 | 465 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); |
9033 | 466 |
467 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
468 * Clears the highlighting from a prior search in a GTK+ IM/HTML. |
9033 | 469 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
470 * @param imhtml The GTK+ IM/HTML. |
9033 | 471 */ |
7295 | 472 void gtk_imhtml_search_clear(GtkIMHtml *imhtml); |
4895 | 473 |
9033 | 474 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
475 * Enables or disables editing in a GTK+ IM/HTML. |
9033 | 476 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
477 * @param imhtml The GTK+ IM/HTML. |
9033 | 478 * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. |
479 */ | |
8061 | 480 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); |
9033 | 481 |
482 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
483 * Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML. |
9033 | 484 * In this mode formatting options to the buffer take effect for the entire |
485 * buffer instead of specific text. | |
486 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
487 * @param imhtml The GTK+ IM/HTML. |
9033 | 488 * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. |
489 */ | |
8677 | 490 void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); |
9033 | 491 |
492 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
493 * Indicates which formatting functions to enable and disable in a GTK+ IM/HTML. |
9033 | 494 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
495 * @param imhtml The GTK+ IM/HTML. |
9185 | 496 * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. |
9033 | 497 */ |
8420 | 498 void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); |
9033 | 499 |
500 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
501 * Returns which formatting functions are enabled in a GTK+ IM/HTML. |
9033 | 502 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
503 * @param imhtml The GTK+ IM/HTML. |
9033 | 504 * |
9185 | 505 * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. |
9033 | 506 */ |
8788 | 507 GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); |
9033 | 508 |
509 /** | |
510 * 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
|
511 * current position in a GTK+ IM/HTML. |
9033 | 512 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
513 * @param imhtml The GTK+ IM/HTML. |
9033 | 514 * @param bold A reference to a boolean for bold. |
515 * @param italic A reference to a boolean for italic. | |
516 * @param underline A reference to a boolean for underline. | |
517 */ | |
8516 | 518 void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); |
9033 | 519 |
520 /** | |
521 * 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
|
522 * in a GTK+ IM/HTML. |
9033 | 523 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
524 * @param imhtml The GTK+ IM/HTML. |
9033 | 525 * |
526 * @return A string containg the font face or @c NULL if none is set. | |
527 */ | |
9025 | 528 char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); |
9033 | 529 |
530 /** | |
531 * 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
|
532 * position in a GTK+ IM/HTML. |
9033 | 533 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
534 * @param imhtml The GTK+ IM/HTML. |
9033 | 535 * |
536 * @return A string containg the foreground color or @c NULL if none is set. | |
537 */ | |
9025 | 538 char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); |
9033 | 539 |
540 /** | |
10776 | 541 * 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
|
542 * position in a GTK+ IM/HTML. |
10776 | 543 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
544 * @param imhtml The GTK+ IM/HTML. |
10776 | 545 * |
546 * @return A string containg the font background color or @c NULL if none is set. | |
547 */ | |
548 char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); | |
549 | |
550 /** | |
9033 | 551 * 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
|
552 * position in a GTK+ IM/HTML. |
9033 | 553 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
554 * @param imhtml The GTK+ IM/HTML. |
9033 | 555 * |
556 * @return A string containg the background color or @c NULL if none is set. | |
557 */ | |
10776 | 558 char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); |
9033 | 559 |
560 /** | |
561 * 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
|
562 * position in a GTK+ IM/HTML. |
9033 | 563 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
564 * @param imhtml The GTK+ IM/HTML. |
9033 | 565 * |
566 * @return The HTML font size. | |
567 */ | |
9025 | 568 gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); |
9033 | 569 |
570 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
571 * Checks whether a GTK+ IM/HTML is marked as editable. |
9033 | 572 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
573 * @param imhtml The GTK+ IM/HTML. |
9033 | 574 * |
575 * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. | |
576 */ | |
8061 | 577 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); |
9033 | 578 |
579 /** | |
11269
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
580 * Clear all the formatting on a GTK+ IM/HTML. |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
581 * |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
582 * @param imhtml The GTK+ IM/HTML. |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
583 */ |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
584 void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml); |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
585 |
1cbe76d30e81
[gaim-migrate @ 13451]
Richard Laager <rlaager@wiktel.com>
parents:
11267
diff
changeset
|
586 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
587 * Toggles bold at the cursor location or selection in a GTK+ IM/HTML. |
9033 | 588 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
589 * @param imhtml The GTK+ IM/HTML. |
9033 | 590 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
591 void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); |
9033 | 592 |
593 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
594 * Toggles italic at the cursor location or selection in a GTK+ IM/HTML. |
9033 | 595 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
596 * @param imhtml The GTK+ IM/HTML. |
9033 | 597 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
598 void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); |
9033 | 599 |
600 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
601 * Toggles underline at the cursor location or selection in a GTK+ IM/HTML. |
9033 | 602 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
603 * @param imhtml The GTK+ IM/HTML. |
9033 | 604 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
605 void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); |
9033 | 606 |
607 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
608 * Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML. |
9924 | 609 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
610 * @param imhtml The GTK+ IM/HTML. |
9924 | 611 */ |
11267
477e5cca8287
[gaim-migrate @ 13449]
Richard Laager <rlaager@wiktel.com>
parents:
11224
diff
changeset
|
612 void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); |
9924 | 613 |
614 /** | |
9033 | 615 * Toggles a foreground color at the current location or selection in a GTK |
616 * IM/HTML. | |
617 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
618 * @param imhtml The GTK+ IM/HTML. |
9185 | 619 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
9033 | 620 * |
621 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
622 */ | |
8061 | 623 gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); |
9033 | 624 |
625 /** | |
626 * Toggles a background color at the current location or selection in a GTK | |
627 * IM/HTML. | |
628 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
629 * @param imhtml The GTK+ IM/HTML. |
9185 | 630 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
9033 | 631 * |
632 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
633 */ | |
8061 | 634 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); |
9033 | 635 |
636 /** | |
10776 | 637 * Toggles a background color at the current location or selection in a GTK |
638 * IM/HTML. | |
639 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
640 * @param imhtml The GTK+ IM/HTML. |
10776 | 641 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
642 * | |
643 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
644 */ | |
645 gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); | |
646 | |
647 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
648 * Toggles a font face at the current location or selection in a GTK+ IM/HTML. |
9033 | 649 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
650 * @param imhtml The GTK+ IM/HTML. |
9185 | 651 * @param face The font face name, or @c NULL or "" to clear the font. |
9033 | 652 * |
653 * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. | |
654 */ | |
8061 | 655 gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); |
9033 | 656 |
657 /** | |
658 * 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
|
659 * in a GTK+ IM/HTML. |
9033 | 660 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
661 * @param imhtml The GTK+ IM/HTML. |
9185 | 662 * @param url The URL for the link or @c NULL to terminate the link. |
9033 | 663 */ |
8677 | 664 void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); |
9033 | 665 |
666 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
667 * Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML. |
9033 | 668 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
669 * @param imhtml The GTK+ IM/HTML. |
9033 | 670 * @param mark The GtkTextMark to insert the link at. |
671 * @param url The URL for the link. | |
672 * @param text The string to use for the link description. | |
673 */ | |
8677 | 674 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); |
9033 | 675 |
676 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
677 * Inserts a smiley at the current location or selection in a GTK+ IM/HTML. |
9033 | 678 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
679 * @param imhtml The GTK+ IM/HTML. |
9033 | 680 * @param sml The category of the smiley. |
681 * @param smiley The text of the smiley to insert. | |
682 */ | |
8061 | 683 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); |
9033 | 684 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
685 * Inserts a smiley at the given iter in a GTK+ IM/HTML. |
9033 | 686 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
687 * @param imhtml The GTK+ IM/HTML. |
9033 | 688 * @param sml The category of the smiley. |
689 * @param smiley The text of the smiley to insert. | |
690 * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. | |
691 */ | |
8677 | 692 void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); |
9033 | 693 |
694 /** | |
695 * 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
|
696 * GTK+ IM/HTML. |
9033 | 697 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
698 * @param imhtml The GTK+ IM/HTML. |
9033 | 699 * @param id The id of the IM/HTML scalable. |
700 * @param iter The GtkTextIter in the IM/HTML to insert the image at. | |
701 */ | |
8962 | 702 void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); |
9033 | 703 |
704 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
705 * Sets the font size at the current location or selection in a GTK+ IM/HTML. |
9033 | 706 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
707 * @param imhtml The GTK+ IM/HTML. |
9033 | 708 * @param size The HTML font size to use. |
709 */ | |
8061 | 710 void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); |
9033 | 711 |
712 /** | |
713 * Decreases the font size by 1 at the current location or selection in a GTK | |
714 * IM/HTML. | |
715 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
716 * @param imhtml The GTK+ IM/HTML. |
9033 | 717 */ |
8061 | 718 void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); |
9033 | 719 |
720 /** | |
721 * Increases the font size by 1 at the current location or selection in a GTK | |
722 * IM/HTML. | |
723 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
724 * @param imhtml The GTK+ IM/HTML. |
9033 | 725 */ |
8061 | 726 void gtk_imhtml_font_grow(GtkIMHtml *imhtml); |
9033 | 727 |
728 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
729 * Returns the HTML formatted contents between two iters in a GTK+ IM/HTML. |
9033 | 730 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
731 * @param imhtml The GTK+ IM/HTML. |
9033 | 732 * @param start The GtkTextIter indicating the start point in the IM/HTML. |
733 * @param end The GtkTextIter indicating the end point in the IM/HTML. | |
734 * | |
735 * @return A string containing the HTML formatted text. | |
736 */ | |
8061 | 737 char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
9033 | 738 |
739 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
740 * Returns the entire HTML formatted contents of a GTK+ IM/HTML. |
9033 | 741 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
742 * @param imhtml The GTK+ IM/HTML. |
9033 | 743 * |
744 * @return A string containing the HTML formatted text. | |
745 */ | |
8061 | 746 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); |
9033 | 747 |
748 /** | |
749 * Returns a null terminated array of pointers to null terminated strings, each | |
750 * string for each line. g_strfreev() should be called to free it when done. | |
751 * | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
752 * @param imhtml The GTK+ IM/HTML. |
9033 | 753 * |
754 * @return A null terminated array of null terminated HTML formatted strings. | |
755 */ | |
8677 | 756 char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); |
9033 | 757 |
758 /** | |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
759 * 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
|
760 * between two iters in a GTK+ IM/HTML. |
9033 | 761 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
762 * @param imhtml The GTK+ IM/HTML. |
9033 | 763 * @param start The GtkTextIter indicating the start point in the IM/HTML. |
9185 | 764 * @param stop The GtkTextIter indicating the end point in the IM/HTML. |
9033 | 765 * |
766 * @return A string containing the unformatted text. | |
767 */ | |
8677 | 768 char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop); |
8061 | 769 |
9033 | 770 /*@}*/ |
771 | |
1428 | 772 #ifdef __cplusplus |
773 } | |
774 #endif | |
775 | |
9713 | 776 #endif /* _GAIM_GTKIMHTML_H_ */ |