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