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