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