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