Mon, 17 Sep 2007 16:54:45 +0000
Make pidgin use report_disconnect_reason rather than report_disconnect, and
check purple_connection_reason_is_fatal rather than wants_to_die. (NB. Since
none of the protocols use error_reason yet, purple_connection_reason_is_fatal
is always true for now...)
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
1 | /** |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
2 | * @file gtkimhtml.h GTK+ IM/HTML rendering component |
|
16254
eeb2bba4dc94
Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents:
15572
diff
changeset
|
3 | * @ingroup pidgin |
| 1428 | 4 | * |
| 15572 | 5 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18151
diff
changeset
|
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 1428 | 22 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
23 | #ifndef _PIDGINIMHTML_H_ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
24 | #define _PIDGINIMHTML_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> |
|
17880
5e73968467e0
Undo/Redo in GtkImHtml from GtkSourceView. This may not be adaquate enough for us.
Sean Egan <seanegan@pidgin.im>
parents:
16385
diff
changeset
|
30 | #include "gtksourceundomanager.h" |
| 1428 | 31 | |
|
17388
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
32 | #include "connection.h" |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
33 | |
| 1428 | 34 | #ifdef __cplusplus |
| 35 | extern "C" { | |
| 36 | #endif | |
| 37 | ||
| 9033 | 38 | /************************************************************************** |
| 39 | * @name Structures | |
| 40 | **************************************************************************/ | |
| 41 | /*@{*/ | |
| 42 | ||
| 1428 | 43 | #define GTK_TYPE_IMHTML (gtk_imhtml_get_type ()) |
| 44 | #define GTK_IMHTML(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml)) | |
| 45 | #define GTK_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass)) | |
| 46 | #define GTK_IS_IMHTML(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML)) | |
| 47 | #define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML)) | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
48 | #define GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj) |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
49 | #define GTK_IMHTML_ANIMATION(obj) ((GtkIMHtmlAnimation *)obj) |
| 1428 | 50 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
51 | typedef struct _GtkIMHtml GtkIMHtml; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
52 | typedef struct _GtkIMHtmlClass GtkIMHtmlClass; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
53 | typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */ |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
54 | typedef struct _GtkSmileyTree GtkSmileyTree; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
55 | typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
56 | typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
57 | typedef struct _GtkIMHtmlImage GtkIMHtmlImage; |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
58 | typedef struct _GtkIMHtmlAnimation GtkIMHtmlAnimation; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
59 | typedef struct _GtkIMHtmlHr GtkIMHtmlHr; |
| 8962 | 60 | typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs; |
| 8061 | 61 | |
| 8420 | 62 | typedef enum { |
| 10776 | 63 | GTK_IMHTML_BOLD = 1 << 0, |
| 64 | GTK_IMHTML_ITALIC = 1 << 1, | |
| 65 | GTK_IMHTML_UNDERLINE = 1 << 2, | |
| 66 | GTK_IMHTML_GROW = 1 << 3, | |
| 67 | GTK_IMHTML_SHRINK = 1 << 4, | |
| 68 | GTK_IMHTML_FACE = 1 << 5, | |
| 69 | GTK_IMHTML_FORECOLOR = 1 << 6, | |
| 70 | GTK_IMHTML_BACKCOLOR = 1 << 7, | |
| 71 | GTK_IMHTML_BACKGROUND = 1 << 8, | |
| 72 | GTK_IMHTML_LINK = 1 << 9, | |
| 73 | GTK_IMHTML_IMAGE = 1 << 10, | |
| 74 | GTK_IMHTML_SMILEY = 1 << 11, | |
| 75 | GTK_IMHTML_LINKDESC = 1 << 12, | |
| 76 | GTK_IMHTML_STRIKE = 1 << 13, | |
| 77 | GTK_IMHTML_ALL = -1 | |
| 8420 | 78 | } GtkIMHtmlButtons; |
| 8061 | 79 | |
|
11525
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
80 | typedef enum { |
|
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
81 | GTK_IMHTML_SMILEY_CUSTOM = 1 << 0 |
|
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
82 | } GtkIMHtmlSmileyFlags; |
|
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
83 | |
| 1428 | 84 | struct _GtkIMHtml { |
| 3922 | 85 | GtkTextView text_view; |
| 86 | GtkTextBuffer *text_buffer; | |
| 1428 | 87 | GdkCursor *hand_cursor; |
| 88 | GdkCursor *arrow_cursor; | |
| 8061 | 89 | GdkCursor *text_cursor; |
| 4032 | 90 | GHashTable *smiley_data; |
| 91 | GtkSmileyTree *default_smilies; | |
| 8456 | 92 | char *protocol_name; |
| 10798 | 93 | guint scroll_src; |
| 94 | GTimer *scroll_time; | |
|
16385
aa5b9456e258
Fixes #213 This allows only 20 animated smileys to be animnating at a time
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
95 | GQueue *animations; |
|
aa5b9456e258
Fixes #213 This allows only 20 animated smileys to be animnating at a time
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
96 | int num_animations; |
| 4254 | 97 | |
|
6124
322206d79652
[gaim-migrate @ 6598]
Mark Doliner <markdoliner@pidgin.im>
parents:
6066
diff
changeset
|
98 | gboolean show_comments; |
| 4735 | 99 | |
| 100 | GtkWidget *tip_window; | |
| 101 | char *tip; | |
| 102 | guint tip_timer; | |
| 10799 | 103 | GtkTextTag *prelit_tag; |
| 4895 | 104 | |
| 105 | GList *scalables; | |
| 4947 | 106 | GdkRectangle old_rect; |
| 7295 | 107 | |
| 8061 | 108 | gchar *search_string; |
| 7694 | 109 | |
| 8061 | 110 | gboolean editable; |
| 8420 | 111 | GtkIMHtmlButtons format_functions; |
| 8677 | 112 | gboolean wbfo; /* Whole buffer formatting only. */ |
| 113 | ||
| 114 | gint insert_offset; | |
| 8420 | 115 | |
| 8061 | 116 | struct { |
| 8677 | 117 | gboolean bold:1; |
| 118 | gboolean italic:1; | |
| 119 | gboolean underline:1; | |
| 9924 | 120 | gboolean strike:1; |
| 8677 | 121 | gchar *forecolor; |
| 122 | gchar *backcolor; | |
| 10776 | 123 | gchar *background; |
| 8677 | 124 | gchar *fontface; |
| 8061 | 125 | int fontsize; |
| 8677 | 126 | GtkTextTag *link; |
| 8061 | 127 | } edit; |
|
8740
098a43943bba
[gaim-migrate @ 9495]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
128 | |
| 8681 | 129 | char *clipboard_text_string; |
| 130 | char *clipboard_html_string; | |
| 8962 | 131 | |
| 132 | GSList *im_images; | |
| 133 | GtkIMHtmlFuncs *funcs; | |
|
17880
5e73968467e0
Undo/Redo in GtkImHtml from GtkSourceView. This may not be adaquate enough for us.
Sean Egan <seanegan@pidgin.im>
parents:
16385
diff
changeset
|
134 | GtkSourceUndoManager *undo_manager; |
| 1428 | 135 | }; |
| 136 | ||
| 137 | struct _GtkIMHtmlClass { | |
| 3922 | 138 | GtkTextViewClass parent_class; |
| 1428 | 139 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
140 | void (*url_clicked)(GtkIMHtml *, const gchar *); |
| 8420 | 141 | void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons); |
| 142 | void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons); | |
| 8427 | 143 | void (*clear_format)(GtkIMHtml *); |
| 8506 | 144 | void (*update_format)(GtkIMHtml *); |
| 10108 | 145 | gboolean (*message_send)(GtkIMHtml *); |
|
17880
5e73968467e0
Undo/Redo in GtkImHtml from GtkSourceView. This may not be adaquate enough for us.
Sean Egan <seanegan@pidgin.im>
parents:
16385
diff
changeset
|
146 | void (*undo)(GtkIMHtml *); |
|
5e73968467e0
Undo/Redo in GtkImHtml from GtkSourceView. This may not be adaquate enough for us.
Sean Egan <seanegan@pidgin.im>
parents:
16385
diff
changeset
|
147 | void (*redo)(GtkIMHtml *); |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
148 | }; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
149 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
150 | struct _GtkIMHtmlFontDetail { |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
151 | gushort size; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
152 | gchar *face; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
153 | gchar *fore; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
154 | gchar *back; |
| 10776 | 155 | gchar *bg; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
156 | gchar *sml; |
| 9950 | 157 | gboolean underline; |
| 14395 | 158 | gshort bold; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
159 | }; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
160 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
161 | struct _GtkSmileyTree { |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
162 | GString *values; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
163 | GtkSmileyTree **children; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
164 | GtkIMHtmlSmiley *image; |
| 1428 | 165 | }; |
| 166 | ||
| 4263 | 167 | struct _GtkIMHtmlSmiley { |
| 168 | gchar *smile; | |
| 169 | gchar *file; | |
| 6814 | 170 | GdkPixbufAnimation *icon; |
| 4263 | 171 | gboolean hidden; |
| 10526 | 172 | GdkPixbufLoader *loader; |
|
11525
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
173 | GSList *anchors; |
| 12335 | 174 | GtkIMHtmlSmileyFlags flags; |
| 175 | GtkIMHtml *imhtml; | |
| 4263 | 176 | }; |
| 177 | ||
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
178 | struct _GtkIMHtmlScalable { |
| 4895 | 179 | void (*scale)(struct _GtkIMHtmlScalable *, int, int); |
| 180 | void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
| 181 | void (*free)(struct _GtkIMHtmlScalable *); | |
| 182 | }; | |
| 183 | ||
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
184 | struct _GtkIMHtmlImage { |
| 4895 | 185 | GtkIMHtmlScalable scalable; |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
186 | GtkImage *image; /**< Contains the scaled version of this pixbuf. */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
187 | GdkPixbuf *pixbuf; /**< The original pixbuf, before any scaling. */ |
| 4895 | 188 | GtkTextMark *mark; |
| 5012 | 189 | gchar *filename; |
| 4895 | 190 | int width; |
| 191 | int height; | |
| 8962 | 192 | int id; |
|
9573
7fb26654aee8
[gaim-migrate @ 10416]
Mark Doliner <markdoliner@pidgin.im>
parents:
9307
diff
changeset
|
193 | GtkWidget *filesel; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
194 | }; |
| 4895 | 195 | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
196 | struct _GtkIMHtmlAnimation { |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
197 | GtkIMHtmlImage imhtmlimage; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
198 | GdkPixbufAnimation *anim; /**< The original animation, before any scaling. */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
199 | GdkPixbufAnimationIter *iter; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
200 | guint timer; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
201 | }; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
202 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
203 | struct _GtkIMHtmlHr { |
| 4895 | 204 | GtkIMHtmlScalable scalable; |
| 205 | GtkWidget *sep; | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
206 | }; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
207 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
208 | typedef enum { |
| 12553 | 209 | GTK_IMHTML_NO_COLOURS = 1 << 0, |
| 210 | GTK_IMHTML_NO_FONTS = 1 << 1, | |
| 211 | GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */ | |
| 212 | GTK_IMHTML_NO_TITLE = 1 << 3, | |
| 213 | GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
| 214 | GTK_IMHTML_NO_SIZES = 1 << 5, | |
| 215 | GTK_IMHTML_NO_SCROLL = 1 << 6, | |
| 216 | GTK_IMHTML_RETURN_LOG = 1 << 7, | |
| 217 | GTK_IMHTML_USE_POINTSIZE = 1 << 8, | |
| 218 | GTK_IMHTML_NO_FORMATTING = 1 << 9, | |
| 219 | GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
220 | } GtkIMHtmlOptions; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
221 | |
|
10145
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
222 | enum { |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
223 | GTK_IMHTML_DRAG_URL = 0, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
224 | GTK_IMHTML_DRAG_HTML, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
225 | GTK_IMHTML_DRAG_UTF8_STRING, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
226 | GTK_IMHTML_DRAG_COMPOUND_TEXT, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
227 | GTK_IMHTML_DRAG_STRING, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
228 | GTK_IMHTML_DRAG_TEXT, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
229 | GTK_IMHTML_DRAG_NUM |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
230 | }; |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
231 | |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
232 | #define GTK_IMHTML_DND_TARGETS \ |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10243
diff
changeset
|
233 | { "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \ |
|
10243
6d75b29afc71
[gaim-migrate @ 11383]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10165
diff
changeset
|
234 | { "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \ |
|
10145
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
235 | { "text/html", 0, GTK_IMHTML_DRAG_HTML }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
236 | { "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
237 | { "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
238 | { "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
239 | { "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
240 | { "STRING", 0, GTK_IMHTML_DRAG_STRING }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
241 | { "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
242 | { "TEXT", 0, GTK_IMHTML_DRAG_TEXT } |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
243 | |
| 8962 | 244 | typedef gpointer (*GtkIMHtmlGetImageFunc) (int id); |
| 245 | typedef gpointer (*GtkIMHtmlGetImageDataFunc) (gpointer i); | |
| 246 | typedef size_t (*GtkIMHtmlGetImageSizeFunc) (gpointer i); | |
| 247 | typedef const char *(*GtkIMHtmlGetImageFilenameFunc)(gpointer i); | |
| 248 | typedef void (*GtkIMHtmlImageRefFunc) (int id); | |
| 249 | typedef void (*GtkIMHtmlImageUnrefFunc) (int id); | |
| 250 | ||
| 251 | struct _GtkIMHtmlFuncs { | |
| 252 | GtkIMHtmlGetImageFunc image_get; | |
| 253 | GtkIMHtmlGetImageDataFunc image_get_data; | |
| 254 | GtkIMHtmlGetImageSizeFunc image_get_size; | |
| 255 | GtkIMHtmlGetImageFilenameFunc image_get_filename; | |
| 256 | GtkIMHtmlImageRefFunc image_ref; | |
| 257 | GtkIMHtmlImageUnrefFunc image_unref; | |
| 258 | }; | |
| 259 | ||
| 9033 | 260 | /*@}*/ |
| 8962 | 261 | |
| 9033 | 262 | /************************************************************************** |
| 263 | * @name GTK+ IM/HTML rendering component API | |
| 264 | **************************************************************************/ | |
| 265 | /*@{*/ | |
| 266 | ||
| 267 | /** | |
| 9037 | 268 | * Returns the GType object for an IM/HTML widget. |
| 9033 | 269 | * |
| 9037 | 270 | * @return The GType for an IM/HTML widget. |
| 9033 | 271 | */ |
| 9037 | 272 | GType gtk_imhtml_get_type(void); |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
273 | |
| 9033 | 274 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
275 | * Creates and returns a new GTK+ IM/HTML widget. |
| 9033 | 276 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
277 | * @return The GTK+ IM/HTML widget created. |
| 9033 | 278 | */ |
| 279 | GtkWidget *gtk_imhtml_new(void *, void *); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
280 | |
| 9033 | 281 | /** |
| 10526 | 282 | * Returns the smiley object associated with the text. |
| 283 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
284 | * @param imhtml The GTK+ IM/HTML. |
| 10526 | 285 | * @param sml The name of the smiley category. |
| 286 | * @param text The text associated with the smiley. | |
| 287 | */ | |
| 288 | ||
| 289 | GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, | |
| 290 | const gchar * sml, const gchar * text); | |
| 291 | ||
| 292 | ||
| 293 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
294 | * Associates a smiley with a GTK+ IM/HTML. |
| 9033 | 295 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
296 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 297 | * @param sml The name of the smiley category. |
| 298 | * @param smiley The GtkIMSmiley to associate. | |
| 299 | */ | |
|
10537
9ece7671fa62
[gaim-migrate @ 11890]
Mark Doliner <markdoliner@pidgin.im>
parents:
10526
diff
changeset
|
300 | void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); |
| 9033 | 301 | |
| 302 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
303 | * Removes all smileys associated with a GTK+ IM/HTML. |
| 9033 | 304 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
305 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 306 | */ |
| 307 | void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
308 | |
| 9033 | 309 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
310 | * Sets the function callbacks to use with a GTK+ IM/HTML instance. |
| 9033 | 311 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
312 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 313 | * @param f The GtkIMHTMLFuncs struct containing the functions to use. |
| 314 | */ | |
| 315 | void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
316 | |
| 9033 | 317 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
318 | * Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML. |
| 9033 | 319 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
320 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 321 | * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. |
| 322 | */ | |
| 323 | void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); | |
| 8962 | 324 | |
| 9033 | 325 | /** |
|
11814
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
326 | * Gets the protocol name associated with this GTK+ IM/HTML. |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
327 | * |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
328 | * @param imhtml The GTK+ IM/HTML |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
329 | */ |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
330 | const char *gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml); |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
331 | |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
332 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
333 | * Associates a protocol name with a GTK+ IM/HTML. |
| 9033 | 334 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
335 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 336 | * @param protocol_name The protocol name to associate with the IM/HTML. |
| 337 | */ | |
| 338 | void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); | |
| 8456 | 339 | |
| 9033 | 340 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
341 | * Appends HTML formatted text to a GTK+ IM/HTML. |
| 9033 | 342 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
343 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 344 | * @param text The formatted text to append. |
| 345 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
| 346 | */ | |
| 9307 | 347 | #define gtk_imhtml_append_text(imhtml, text, options) \ |
| 348 | gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6814
diff
changeset
|
349 | |
| 9033 | 350 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
351 | * Appends HTML formatted text to a GTK+ IM/HTML. |
| 9033 | 352 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
353 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 354 | * @param text The formatted text to append. |
| 355 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
| 9185 | 356 | * @param unused Use @c NULL value. |
| 9033 | 357 | */ |
| 358 | void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, | |
| 359 | const gchar *text, | |
| 360 | GtkIMHtmlOptions options, | |
| 361 | GSList *unused); | |
| 362 | ||
| 363 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
364 | * Inserts HTML formatted text to a GTK+ IM/HTML at a given iter. |
| 9033 | 365 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
366 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 367 | * @param text The formatted text to append. |
| 368 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
369 | * @param iter A GtkTextIter in the GTK+ IM/HTML at which to insert text. |
| 9033 | 370 | */ |
| 8677 | 371 | void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, |
| 372 | const gchar *text, | |
| 373 | GtkIMHtmlOptions options, | |
| 374 | GtkTextIter *iter); | |
| 9033 | 375 | |
| 376 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
377 | * Scrolls a GTK+ IM/HTML to the end of its contents. |
| 9033 | 378 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
379 | * @param imhtml The GTK+ IM/HTML. |
|
12557
6c318efafe32
[gaim-migrate @ 14876]
Richard Laager <rlaager@pidgin.im>
parents:
12553
diff
changeset
|
380 | * @param smooth A boolean indicating if smooth scrolling should be used. |
| 9033 | 381 | */ |
| 12553 | 382 | void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth); |
| 9033 | 383 | |
| 384 | /** | |
|
11224
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
385 | * Delete the contents of a GTK+ IM/HTML between start and end. |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
386 | * |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
387 | * @param imhtml The GTK+ IM/HTML. |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
388 | * @param start a postition in the imhtml's buffer |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
389 | * @param end another postition in the imhtml's buffer |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
390 | */ |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
391 | void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
392 | |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
393 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
394 | * Purges the contents from a GTK+ IM/HTML and resets formatting. |
| 9033 | 395 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
396 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 397 | */ |
|
11224
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
398 | #define gtk_imhtml_clear(imhtml) \ |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
399 | gtk_imhtml_delete(imhtml, NULL, NULL) |
| 4895 | 400 | |
| 9033 | 401 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
402 | * Scrolls a GTK+ IM/HTML up by one page. |
| 9033 | 403 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
404 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 405 | */ |
| 406 | void gtk_imhtml_page_up(GtkIMHtml *imhtml); | |
| 407 | ||
| 408 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
409 | * Scrolls a GTK+ IM/HTML down by one page. |
| 9033 | 410 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
411 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 412 | */ |
| 413 | void gtk_imhtml_page_down(GtkIMHtml *imhtml); | |
| 414 | ||
| 415 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
416 | * Creates and returns an new GTK+ IM/HTML scalable object. |
| 9033 | 417 | * |
| 418 | * @return A new IM/HTML Scalable object. | |
| 419 | */ | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11814
diff
changeset
|
420 | GtkIMHtmlScalable *gtk_imhtml_scalable_new(void); |
| 9033 | 421 | |
| 422 | /** | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
423 | * Creates and returns a new GTK+ IM/HTML scalable object with an image. |
| 9033 | 424 | * |
| 425 | * @param img A GdkPixbuf of the image to add. | |
| 426 | * @param filename The filename to associate with the image. | |
| 427 | * @param id The id to associate with the image. | |
| 428 | * | |
| 429 | * @return A new IM/HTML Scalable object with an image. | |
| 430 | */ | |
| 8962 | 431 | GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); |
| 9033 | 432 | |
| 433 | /** | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
434 | * Creates and returns a new GTK+ IM/HTML scalable object with an |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
435 | * animated image. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
436 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
437 | * @param img A GdkPixbufAnimation of the image to add. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
438 | * @param filename The filename to associate with the image. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
439 | * @param id The id to associate with the image. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
440 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
441 | * @return A new IM/HTML Scalable object with an image. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
442 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
443 | /* |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
444 | * TODO: All this animation code could be combined much better with |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
445 | * the image code. It couldn't be done when it was written |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
446 | * because it requires breaking backward compatibility. It |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
447 | * would be good to do it for 3.0.0. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
448 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
449 | GtkIMHtmlScalable *gtk_imhtml_animation_new(GdkPixbufAnimation *img, const gchar *filename, int id); |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
450 | |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
451 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
452 | * Destroys and frees a GTK+ IM/HTML scalable image. |
| 9033 | 453 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
454 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 455 | */ |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
456 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 457 | void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); |
| 4895 | 458 | |
| 9033 | 459 | /** |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
460 | * Destroys and frees a GTK+ IM/HTML scalable animation. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
461 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
462 | * @param scale The GTK+ IM/HTML scalable. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
463 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
464 | /* TODO: Is there any reason this isn't private? */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
465 | void gtk_imhtml_animation_free(GtkIMHtmlScalable *scale); |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
466 | |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
467 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
468 | * Rescales a GTK+ IM/HTML scalable image to a given size. |
| 9033 | 469 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
470 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 471 | * @param width The new width. |
| 472 | * @param height The new height. | |
| 473 | */ | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
474 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 475 | void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); |
| 476 | ||
| 477 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
478 | * Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter. |
| 9033 | 479 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
480 | * @param scale The GTK+ IM/HTML scalable. |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
481 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 482 | * @param iter The GtkTextIter at which to add the scalable. |
| 483 | */ | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
484 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 485 | void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
| 486 | ||
| 487 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
488 | * Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule. |
| 9033 | 489 | * |
| 490 | * @return A new IM/HTML Scalable object with an image. | |
| 491 | */ | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11814
diff
changeset
|
492 | GtkIMHtmlScalable *gtk_imhtml_hr_new(void); |
| 9033 | 493 | |
| 494 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
495 | * Destroys and frees a GTK+ IM/HTML scalable horizontal rule. |
| 9033 | 496 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
497 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 498 | */ |
| 9034 | 499 | void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); |
| 9033 | 500 | |
| 501 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
502 | * Rescales a GTK+ IM/HTML scalable horizontal rule to a given size. |
| 9033 | 503 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
504 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 505 | * @param width The new width. |
| 506 | * @param height The new height. | |
| 507 | */ | |
| 9034 | 508 | void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); |
| 4895 | 509 | |
| 9033 | 510 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
511 | * Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at |
| 9033 | 512 | * a given iter. |
| 513 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
514 | * @param scale The GTK+ IM/HTML scalable. |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
515 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 516 | * @param iter The GtkTextIter at which to add the scalable. |
| 517 | */ | |
| 9307 | 518 | void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
| 9033 | 519 | |
| 520 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
521 | * Finds and highlights a given string in a GTK+ IM/HTML. |
| 9033 | 522 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
523 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 524 | * @param text The string to search for. |
| 525 | * | |
| 526 | * @return @c TRUE if a search was performed, or @c FALSE if not. | |
| 527 | */ | |
| 7295 | 528 | gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); |
| 9033 | 529 | |
| 530 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
531 | * Clears the highlighting from a prior search in a GTK+ IM/HTML. |
| 9033 | 532 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
533 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 534 | */ |
| 7295 | 535 | void gtk_imhtml_search_clear(GtkIMHtml *imhtml); |
| 4895 | 536 | |
| 9033 | 537 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
538 | * Enables or disables editing in a GTK+ IM/HTML. |
| 9033 | 539 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
540 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 541 | * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. |
| 542 | */ | |
| 8061 | 543 | void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); |
| 9033 | 544 | |
| 545 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
546 | * Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML. |
| 9033 | 547 | * In this mode formatting options to the buffer take effect for the entire |
| 548 | * buffer instead of specific text. | |
| 549 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
550 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 551 | * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. |
| 552 | */ | |
| 8677 | 553 | void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); |
| 9033 | 554 | |
| 555 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
556 | * Indicates which formatting functions to enable and disable in a GTK+ IM/HTML. |
| 9033 | 557 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
558 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 559 | * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. |
| 9033 | 560 | */ |
| 8420 | 561 | void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); |
| 9033 | 562 | |
| 563 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
564 | * Returns which formatting functions are enabled in a GTK+ IM/HTML. |
| 9033 | 565 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
566 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 567 | * |
| 9185 | 568 | * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. |
| 9033 | 569 | */ |
|
8788
a13634443a38
[gaim-migrate @ 9550]
Mark Doliner <markdoliner@pidgin.im>
parents:
8740
diff
changeset
|
570 | GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); |
| 9033 | 571 | |
| 572 | /** | |
|
12900
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
573 | * Sets each boolean to @c TRUE or @c FALSE to indicate if that formatting option |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
574 | * is enabled at the current position in a GTK+ IM/HTML. |
| 9033 | 575 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
576 | * @param imhtml The GTK+ IM/HTML. |
|
12900
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
577 | * @param bold The boolean to set for bold or @c NULL. |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
578 | * @param italic The boolean to set for italic or @c NULL. |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
579 | * @param underline The boolean to set for underline or @c NULL. |
| 9033 | 580 | */ |
| 8516 | 581 | void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); |
| 9033 | 582 | |
| 583 | /** | |
| 584 | * Returns a string containing the selected font face at the current position | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
585 | * in a GTK+ IM/HTML. |
| 9033 | 586 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
587 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 588 | * |
| 589 | * @return A string containg the font face or @c NULL if none is set. | |
| 590 | */ | |
| 9025 | 591 | char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); |
| 9033 | 592 | |
| 593 | /** | |
| 594 | * Returns a string containing the selected foreground color at the current | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
595 | * position in a GTK+ IM/HTML. |
| 9033 | 596 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
597 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 598 | * |
| 599 | * @return A string containg the foreground color or @c NULL if none is set. | |
| 600 | */ | |
| 9025 | 601 | char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); |
| 9033 | 602 | |
| 603 | /** | |
| 10776 | 604 | * Returns a string containing the selected font background color at the current |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
605 | * position in a GTK+ IM/HTML. |
| 10776 | 606 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
607 | * @param imhtml The GTK+ IM/HTML. |
| 10776 | 608 | * |
| 609 | * @return A string containg the font background color or @c NULL if none is set. | |
| 610 | */ | |
| 611 | char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); | |
| 612 | ||
| 613 | /** | |
| 9033 | 614 | * Returns a string containing the selected background color at the current |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
615 | * position in a GTK+ IM/HTML. |
| 9033 | 616 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
617 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 618 | * |
| 619 | * @return A string containg the background color or @c NULL if none is set. | |
| 620 | */ | |
| 10776 | 621 | char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); |
| 9033 | 622 | |
| 623 | /** | |
| 624 | * Returns a integer containing the selected HTML font size at the current | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
625 | * position in a GTK+ IM/HTML. |
| 9033 | 626 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
627 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 628 | * |
| 629 | * @return The HTML font size. | |
| 630 | */ | |
| 9025 | 631 | gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); |
| 9033 | 632 | |
| 633 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
634 | * Checks whether a GTK+ IM/HTML is marked as editable. |
| 9033 | 635 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
636 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 637 | * |
| 638 | * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. | |
| 639 | */ | |
| 8061 | 640 | gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); |
| 9033 | 641 | |
| 642 | /** | |
|
11269
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
643 | * Clear all the formatting on a GTK+ IM/HTML. |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
644 | * |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
645 | * @param imhtml The GTK+ IM/HTML. |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
646 | */ |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
647 | void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml); |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
648 | |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
649 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
650 | * Toggles bold at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 651 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
652 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 653 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
654 | void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); |
| 9033 | 655 | |
| 656 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
657 | * Toggles italic at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 658 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
659 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 660 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
661 | void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); |
| 9033 | 662 | |
| 663 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
664 | * Toggles underline at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 665 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
666 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 667 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
668 | void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); |
| 9033 | 669 | |
| 670 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
671 | * Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML. |
| 9924 | 672 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
673 | * @param imhtml The GTK+ IM/HTML. |
| 9924 | 674 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
675 | void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); |
| 9924 | 676 | |
| 677 | /** | |
| 9033 | 678 | * Toggles a foreground color at the current location or selection in a GTK |
| 679 | * IM/HTML. | |
| 680 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
681 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 682 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 9033 | 683 | * |
| 684 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 685 | */ | |
| 8061 | 686 | gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); |
| 9033 | 687 | |
| 688 | /** | |
| 689 | * Toggles a background color at the current location or selection in a GTK | |
| 690 | * IM/HTML. | |
| 691 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
692 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 693 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 9033 | 694 | * |
| 695 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 696 | */ | |
| 8061 | 697 | gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); |
| 9033 | 698 | |
| 699 | /** | |
| 10776 | 700 | * Toggles a background color at the current location or selection in a GTK |
| 701 | * IM/HTML. | |
| 702 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
703 | * @param imhtml The GTK+ IM/HTML. |
| 10776 | 704 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 705 | * | |
| 706 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 707 | */ | |
| 708 | gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); | |
| 709 | ||
| 710 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
711 | * Toggles a font face at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 712 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
713 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 714 | * @param face The font face name, or @c NULL or "" to clear the font. |
| 9033 | 715 | * |
| 716 | * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. | |
| 717 | */ | |
| 8061 | 718 | gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); |
| 9033 | 719 | |
| 720 | /** | |
| 721 | * Toggles a link tag with the given URL at the current location or selection | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
722 | * in a GTK+ IM/HTML. |
| 9033 | 723 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
724 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 725 | * @param url The URL for the link or @c NULL to terminate the link. |
| 9033 | 726 | */ |
| 8677 | 727 | void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); |
| 9033 | 728 | |
| 729 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
730 | * Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML. |
| 9033 | 731 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
732 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 733 | * @param mark The GtkTextMark to insert the link at. |
| 734 | * @param url The URL for the link. | |
| 735 | * @param text The string to use for the link description. | |
| 736 | */ | |
| 8677 | 737 | void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); |
| 9033 | 738 | |
| 739 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
740 | * Inserts a smiley at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 741 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
742 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 743 | * @param sml The category of the smiley. |
| 744 | * @param smiley The text of the smiley to insert. | |
| 745 | */ | |
| 8061 | 746 | void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); |
| 9033 | 747 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
748 | * Inserts a smiley at the given iter in a GTK+ IM/HTML. |
| 9033 | 749 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
750 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 751 | * @param sml The category of the smiley. |
| 752 | * @param smiley The text of the smiley to insert. | |
| 753 | * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. | |
| 754 | */ | |
| 8677 | 755 | void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); |
| 9033 | 756 | |
| 757 | /** | |
| 758 | * Inserts the IM/HTML scalable image with the given id at the given iter in a | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
759 | * GTK+ IM/HTML. |
| 9033 | 760 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
761 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 762 | * @param id The id of the IM/HTML scalable. |
| 763 | * @param iter The GtkTextIter in the IM/HTML to insert the image at. | |
| 764 | */ | |
| 8962 | 765 | void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); |
| 9033 | 766 | |
| 767 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
768 | * Sets the font size at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 769 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
770 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 771 | * @param size The HTML font size to use. |
| 772 | */ | |
| 8061 | 773 | void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); |
| 9033 | 774 | |
| 775 | /** | |
| 776 | * Decreases the font size by 1 at the current location or selection in a GTK | |
| 777 | * IM/HTML. | |
| 778 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
779 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 780 | */ |
| 8061 | 781 | void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); |
| 9033 | 782 | |
| 783 | /** | |
| 784 | * Increases the font size by 1 at the current location or selection in a GTK | |
| 785 | * IM/HTML. | |
| 786 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
787 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 788 | */ |
| 8061 | 789 | void gtk_imhtml_font_grow(GtkIMHtml *imhtml); |
| 9033 | 790 | |
| 791 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
792 | * Returns the HTML formatted contents between two iters in a GTK+ IM/HTML. |
| 9033 | 793 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
794 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 795 | * @param start The GtkTextIter indicating the start point in the IM/HTML. |
| 796 | * @param end The GtkTextIter indicating the end point in the IM/HTML. | |
| 797 | * | |
| 798 | * @return A string containing the HTML formatted text. | |
| 799 | */ | |
| 8061 | 800 | char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
| 9033 | 801 | |
| 802 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
803 | * Returns the entire HTML formatted contents of a GTK+ IM/HTML. |
| 9033 | 804 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
805 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 806 | * |
| 807 | * @return A string containing the HTML formatted text. | |
| 808 | */ | |
| 8061 | 809 | char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); |
| 9033 | 810 | |
| 811 | /** | |
| 812 | * Returns a null terminated array of pointers to null terminated strings, each | |
| 813 | * string for each line. g_strfreev() should be called to free it when done. | |
| 814 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
815 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 816 | * |
| 817 | * @return A null terminated array of null terminated HTML formatted strings. | |
| 818 | */ | |
| 8677 | 819 | char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); |
| 9033 | 820 | |
| 821 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
822 | * Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
823 | * between two iters in a GTK+ IM/HTML. |
| 9033 | 824 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
825 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 826 | * @param start The GtkTextIter indicating the start point in the IM/HTML. |
| 9185 | 827 | * @param stop The GtkTextIter indicating the end point in the IM/HTML. |
| 9033 | 828 | * |
| 829 | * @return A string containing the unformatted text. | |
| 830 | */ | |
| 8677 | 831 | char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop); |
| 8061 | 832 | |
|
17388
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
833 | /** |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
834 | * Setup formatting for an imhtml depending on the flags specified. |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
835 | * |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
836 | * @param imhtml The GTK+ IM/HTML. |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
837 | * @param flags The connection flag which describes the allowed types of formatting. |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
838 | */ |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
839 | void gtk_imhtml_setup_entry(GtkIMHtml *imhtml, PurpleConnectionFlags flags); |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
840 | |
| 9033 | 841 | /*@}*/ |
| 842 | ||
| 1428 | 843 | #ifdef __cplusplus |
| 844 | } | |
| 845 | #endif | |
| 846 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
847 | #endif /* _PIDGINIMHTML_H_ */ |