Wed, 24 Oct 2007 03:29:33 +0000
Use gtk_window_set_focus_on_map() to prevent focus on new conversation windows (hopefully only) when the new window was prompted by an external event. This seems to work pretty well, but I suppose those with higher expectations of their WM will be sure to tell me if this messes something up. References #3618.
|
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 |
|
20890
c4253dc37ac0
ChangeLog by resiak@soc.pidgin.im:
Will Thompson <resiak@pidgin.im>
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 | |
| 8681 | 131 | char *clipboard_text_string; |
| 132 | char *clipboard_html_string; | |
| 8962 | 133 | |
| 134 | GSList *im_images; | |
| 135 | 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
|
136 | GtkSourceUndoManager *undo_manager; |
| 1428 | 137 | }; |
| 138 | ||
| 139 | struct _GtkIMHtmlClass { | |
| 3922 | 140 | GtkTextViewClass parent_class; |
| 1428 | 141 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
142 | void (*url_clicked)(GtkIMHtml *, const gchar *); |
| 8420 | 143 | void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons); |
| 144 | void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons); | |
| 8427 | 145 | void (*clear_format)(GtkIMHtml *); |
| 8506 | 146 | void (*update_format)(GtkIMHtml *); |
| 10108 | 147 | 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
|
148 | 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
|
149 | void (*redo)(GtkIMHtml *); |
|
5967
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 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
152 | struct _GtkIMHtmlFontDetail { |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
153 | gushort size; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
154 | gchar *face; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
155 | gchar *fore; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
156 | gchar *back; |
| 10776 | 157 | gchar *bg; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
158 | gchar *sml; |
| 9950 | 159 | gboolean underline; |
| 14395 | 160 | gshort bold; |
|
5967
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 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
163 | struct _GtkSmileyTree { |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
164 | GString *values; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
165 | GtkSmileyTree **children; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
166 | GtkIMHtmlSmiley *image; |
| 1428 | 167 | }; |
| 168 | ||
| 4263 | 169 | struct _GtkIMHtmlSmiley { |
| 170 | gchar *smile; | |
| 171 | gchar *file; | |
| 6814 | 172 | GdkPixbufAnimation *icon; |
| 4263 | 173 | gboolean hidden; |
| 10526 | 174 | GdkPixbufLoader *loader; |
|
11525
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
175 | GSList *anchors; |
| 12335 | 176 | GtkIMHtmlSmileyFlags flags; |
| 177 | GtkIMHtml *imhtml; | |
| 4263 | 178 | }; |
| 179 | ||
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
180 | struct _GtkIMHtmlScalable { |
| 4895 | 181 | void (*scale)(struct _GtkIMHtmlScalable *, int, int); |
| 182 | void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
| 183 | void (*free)(struct _GtkIMHtmlScalable *); | |
| 184 | }; | |
| 185 | ||
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
186 | struct _GtkIMHtmlImage { |
| 4895 | 187 | GtkIMHtmlScalable scalable; |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
188 | 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
|
189 | GdkPixbuf *pixbuf; /**< The original pixbuf, before any scaling. */ |
| 4895 | 190 | GtkTextMark *mark; |
| 5012 | 191 | gchar *filename; |
| 4895 | 192 | int width; |
| 193 | int height; | |
| 8962 | 194 | int id; |
|
9573
7fb26654aee8
[gaim-migrate @ 10416]
Mark Doliner <markdoliner@pidgin.im>
parents:
9307
diff
changeset
|
195 | GtkWidget *filesel; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
196 | }; |
| 4895 | 197 | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
198 | struct _GtkIMHtmlAnimation { |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
199 | GtkIMHtmlImage imhtmlimage; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
200 | 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
|
201 | GdkPixbufAnimationIter *iter; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
202 | guint timer; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
203 | }; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
204 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
205 | struct _GtkIMHtmlHr { |
| 4895 | 206 | GtkIMHtmlScalable scalable; |
| 207 | GtkWidget *sep; | |
|
5967
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 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
210 | typedef enum { |
| 12553 | 211 | GTK_IMHTML_NO_COLOURS = 1 << 0, |
| 212 | GTK_IMHTML_NO_FONTS = 1 << 1, | |
| 213 | GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */ | |
| 214 | GTK_IMHTML_NO_TITLE = 1 << 3, | |
| 215 | GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
| 216 | GTK_IMHTML_NO_SIZES = 1 << 5, | |
| 217 | GTK_IMHTML_NO_SCROLL = 1 << 6, | |
| 218 | GTK_IMHTML_RETURN_LOG = 1 << 7, | |
| 219 | GTK_IMHTML_USE_POINTSIZE = 1 << 8, | |
| 220 | GTK_IMHTML_NO_FORMATTING = 1 << 9, | |
| 221 | GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
222 | } GtkIMHtmlOptions; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
223 | |
|
10145
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
224 | enum { |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
225 | GTK_IMHTML_DRAG_URL = 0, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
226 | GTK_IMHTML_DRAG_HTML, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
227 | GTK_IMHTML_DRAG_UTF8_STRING, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
228 | GTK_IMHTML_DRAG_COMPOUND_TEXT, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
229 | GTK_IMHTML_DRAG_STRING, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
230 | GTK_IMHTML_DRAG_TEXT, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
231 | GTK_IMHTML_DRAG_NUM |
|
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 | |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
234 | #define GTK_IMHTML_DND_TARGETS \ |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10243
diff
changeset
|
235 | { "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \ |
|
10243
6d75b29afc71
[gaim-migrate @ 11383]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10165
diff
changeset
|
236 | { "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \ |
|
10145
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
237 | { "text/html", 0, GTK_IMHTML_DRAG_HTML }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
238 | { "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
239 | { "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
240 | { "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
241 | { "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
242 | { "STRING", 0, GTK_IMHTML_DRAG_STRING }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
243 | { "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
244 | { "TEXT", 0, GTK_IMHTML_DRAG_TEXT } |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
245 | |
| 8962 | 246 | typedef gpointer (*GtkIMHtmlGetImageFunc) (int id); |
| 247 | typedef gpointer (*GtkIMHtmlGetImageDataFunc) (gpointer i); | |
| 248 | typedef size_t (*GtkIMHtmlGetImageSizeFunc) (gpointer i); | |
| 249 | typedef const char *(*GtkIMHtmlGetImageFilenameFunc)(gpointer i); | |
| 250 | typedef void (*GtkIMHtmlImageRefFunc) (int id); | |
| 251 | typedef void (*GtkIMHtmlImageUnrefFunc) (int id); | |
| 252 | ||
| 253 | struct _GtkIMHtmlFuncs { | |
| 254 | GtkIMHtmlGetImageFunc image_get; | |
| 255 | GtkIMHtmlGetImageDataFunc image_get_data; | |
| 256 | GtkIMHtmlGetImageSizeFunc image_get_size; | |
| 257 | GtkIMHtmlGetImageFilenameFunc image_get_filename; | |
| 258 | GtkIMHtmlImageRefFunc image_ref; | |
| 259 | GtkIMHtmlImageUnrefFunc image_unref; | |
| 260 | }; | |
| 261 | ||
| 9033 | 262 | /*@}*/ |
| 8962 | 263 | |
| 9033 | 264 | /************************************************************************** |
| 265 | * @name GTK+ IM/HTML rendering component API | |
| 266 | **************************************************************************/ | |
| 267 | /*@{*/ | |
| 268 | ||
| 269 | /** | |
| 9037 | 270 | * Returns the GType object for an IM/HTML widget. |
| 9033 | 271 | * |
| 9037 | 272 | * @return The GType for an IM/HTML widget. |
| 9033 | 273 | */ |
| 9037 | 274 | GType gtk_imhtml_get_type(void); |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
275 | |
| 9033 | 276 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
277 | * Creates and returns a new GTK+ IM/HTML widget. |
| 9033 | 278 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
279 | * @return The GTK+ IM/HTML widget created. |
| 9033 | 280 | */ |
| 281 | GtkWidget *gtk_imhtml_new(void *, void *); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
282 | |
| 9033 | 283 | /** |
| 10526 | 284 | * Returns the smiley object associated with the text. |
| 285 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
286 | * @param imhtml The GTK+ IM/HTML. |
| 10526 | 287 | * @param sml The name of the smiley category. |
| 288 | * @param text The text associated with the smiley. | |
| 289 | */ | |
| 290 | ||
| 291 | GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, | |
| 292 | const gchar * sml, const gchar * text); | |
| 293 | ||
| 294 | ||
| 295 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
296 | * Associates a smiley with a GTK+ IM/HTML. |
| 9033 | 297 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
298 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 299 | * @param sml The name of the smiley category. |
| 300 | * @param smiley The GtkIMSmiley to associate. | |
| 301 | */ | |
|
10537
9ece7671fa62
[gaim-migrate @ 11890]
Mark Doliner <markdoliner@pidgin.im>
parents:
10526
diff
changeset
|
302 | void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); |
| 9033 | 303 | |
| 304 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
305 | * Removes all smileys associated with a GTK+ IM/HTML. |
| 9033 | 306 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
307 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 308 | */ |
| 309 | void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
310 | |
| 9033 | 311 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
312 | * Sets the function callbacks to use with a GTK+ IM/HTML instance. |
| 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 | * @param f The GtkIMHTMLFuncs struct containing the functions to use. |
| 316 | */ | |
| 317 | void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
318 | |
| 9033 | 319 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
320 | * Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML. |
| 9033 | 321 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
322 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 323 | * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. |
| 324 | */ | |
| 325 | void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); | |
| 8962 | 326 | |
| 9033 | 327 | /** |
|
11814
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
328 | * Gets the protocol name associated with this GTK+ IM/HTML. |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
329 | * |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
330 | * @param imhtml The GTK+ IM/HTML |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
331 | */ |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
332 | const char *gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml); |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
333 | |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
334 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
335 | * Associates a protocol name with a GTK+ IM/HTML. |
| 9033 | 336 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
337 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 338 | * @param protocol_name The protocol name to associate with the IM/HTML. |
| 339 | */ | |
| 340 | void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); | |
| 8456 | 341 | |
| 9033 | 342 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
343 | * Appends HTML formatted text to a GTK+ IM/HTML. |
| 9033 | 344 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
345 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 346 | * @param text The formatted text to append. |
| 347 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
| 348 | */ | |
| 9307 | 349 | #define gtk_imhtml_append_text(imhtml, text, options) \ |
| 350 | gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6814
diff
changeset
|
351 | |
| 9033 | 352 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
353 | * Appends HTML formatted text to a GTK+ IM/HTML. |
| 9033 | 354 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
355 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 356 | * @param text The formatted text to append. |
| 357 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
| 9185 | 358 | * @param unused Use @c NULL value. |
| 9033 | 359 | */ |
| 360 | void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, | |
| 361 | const gchar *text, | |
| 362 | GtkIMHtmlOptions options, | |
| 363 | GSList *unused); | |
| 364 | ||
| 365 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
366 | * Inserts HTML formatted text to a GTK+ IM/HTML at a given iter. |
| 9033 | 367 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
368 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 369 | * @param text The formatted text to append. |
| 370 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
371 | * @param iter A GtkTextIter in the GTK+ IM/HTML at which to insert text. |
| 9033 | 372 | */ |
| 8677 | 373 | void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, |
| 374 | const gchar *text, | |
| 375 | GtkIMHtmlOptions options, | |
| 376 | GtkTextIter *iter); | |
| 9033 | 377 | |
| 378 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
379 | * Scrolls a GTK+ IM/HTML to the end of its contents. |
| 9033 | 380 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
381 | * @param imhtml The GTK+ IM/HTML. |
|
12557
6c318efafe32
[gaim-migrate @ 14876]
Richard Laager <rlaager@pidgin.im>
parents:
12553
diff
changeset
|
382 | * @param smooth A boolean indicating if smooth scrolling should be used. |
| 9033 | 383 | */ |
| 12553 | 384 | void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth); |
| 9033 | 385 | |
| 386 | /** | |
|
11224
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
387 | * 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
|
388 | * |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
389 | * @param imhtml The GTK+ IM/HTML. |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
390 | * @param start a postition in the imhtml's buffer |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
391 | * @param end another postition in the imhtml's buffer |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
392 | */ |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
393 | void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
394 | |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
395 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
396 | * Purges the contents from a GTK+ IM/HTML and resets formatting. |
| 9033 | 397 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
398 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 399 | */ |
|
11224
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
400 | #define gtk_imhtml_clear(imhtml) \ |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
401 | gtk_imhtml_delete(imhtml, NULL, NULL) |
| 4895 | 402 | |
| 9033 | 403 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
404 | * Scrolls a GTK+ IM/HTML up by one page. |
| 9033 | 405 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
406 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 407 | */ |
| 408 | void gtk_imhtml_page_up(GtkIMHtml *imhtml); | |
| 409 | ||
| 410 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
411 | * Scrolls a GTK+ IM/HTML down 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_down(GtkIMHtml *imhtml); | |
| 416 | ||
| 417 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
418 | * Creates and returns an new GTK+ IM/HTML scalable object. |
| 9033 | 419 | * |
| 420 | * @return A new IM/HTML Scalable object. | |
| 421 | */ | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11814
diff
changeset
|
422 | GtkIMHtmlScalable *gtk_imhtml_scalable_new(void); |
| 9033 | 423 | |
| 424 | /** | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
425 | * Creates and returns a new GTK+ IM/HTML scalable object with an image. |
| 9033 | 426 | * |
| 427 | * @param img A GdkPixbuf of the image to add. | |
| 428 | * @param filename The filename to associate with the image. | |
| 429 | * @param id The id to associate with the image. | |
| 430 | * | |
| 431 | * @return A new IM/HTML Scalable object with an image. | |
| 432 | */ | |
| 8962 | 433 | GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); |
| 9033 | 434 | |
| 435 | /** | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
436 | * 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
|
437 | * animated image. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
438 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
439 | * @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
|
440 | * @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
|
441 | * @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
|
442 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
443 | * @return A new IM/HTML Scalable object with an image. |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
444 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
445 | * @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
|
446 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
447 | /* |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
448 | * 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
|
449 | * 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
|
450 | * 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
|
451 | * 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
|
452 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
453 | 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
|
454 | |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
455 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
456 | * Destroys and frees a GTK+ IM/HTML scalable image. |
| 9033 | 457 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
458 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 459 | */ |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
460 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 461 | void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); |
| 4895 | 462 | |
| 9033 | 463 | /** |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
464 | * 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
|
465 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
466 | * @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
|
467 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
468 | /* 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
|
469 | 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
|
470 | |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
471 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
472 | * Rescales a GTK+ IM/HTML scalable image to a given size. |
| 9033 | 473 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
474 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 475 | * @param width The new width. |
| 476 | * @param height The new height. | |
| 477 | */ | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
478 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 479 | void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); |
| 480 | ||
| 481 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
482 | * Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter. |
| 9033 | 483 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
484 | * @param scale The GTK+ IM/HTML scalable. |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
485 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 486 | * @param iter The GtkTextIter at which to add the scalable. |
| 487 | */ | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
488 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 489 | void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
| 490 | ||
| 491 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
492 | * Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule. |
| 9033 | 493 | * |
| 494 | * @return A new IM/HTML Scalable object with an image. | |
| 495 | */ | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11814
diff
changeset
|
496 | GtkIMHtmlScalable *gtk_imhtml_hr_new(void); |
| 9033 | 497 | |
| 498 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
499 | * Destroys and frees a GTK+ IM/HTML scalable horizontal rule. |
| 9033 | 500 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
501 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 502 | */ |
| 9034 | 503 | void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); |
| 9033 | 504 | |
| 505 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
506 | * Rescales a GTK+ IM/HTML scalable horizontal rule to a given size. |
| 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 | * @param width The new width. |
| 510 | * @param height The new height. | |
| 511 | */ | |
| 9034 | 512 | void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); |
| 4895 | 513 | |
| 9033 | 514 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
515 | * Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at |
| 9033 | 516 | * a given iter. |
| 517 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
518 | * @param scale The GTK+ IM/HTML scalable. |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
519 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 520 | * @param iter The GtkTextIter at which to add the scalable. |
| 521 | */ | |
| 9307 | 522 | void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
| 9033 | 523 | |
| 524 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
525 | * Finds and highlights a given string in a GTK+ IM/HTML. |
| 9033 | 526 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
527 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 528 | * @param text The string to search for. |
| 529 | * | |
| 530 | * @return @c TRUE if a search was performed, or @c FALSE if not. | |
| 531 | */ | |
| 7295 | 532 | gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); |
| 9033 | 533 | |
| 534 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
535 | * Clears the highlighting from a prior search in a GTK+ IM/HTML. |
| 9033 | 536 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
537 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 538 | */ |
| 7295 | 539 | void gtk_imhtml_search_clear(GtkIMHtml *imhtml); |
| 4895 | 540 | |
| 9033 | 541 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
542 | * Enables or disables editing 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 | * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. |
| 546 | */ | |
| 8061 | 547 | void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); |
| 9033 | 548 | |
| 549 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
550 | * Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML. |
| 9033 | 551 | * In this mode formatting options to the buffer take effect for the entire |
| 552 | * buffer instead of specific text. | |
| 553 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
554 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 555 | * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. |
| 556 | */ | |
| 8677 | 557 | void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); |
| 9033 | 558 | |
| 559 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
560 | * Indicates which formatting functions to enable and disable in a GTK+ IM/HTML. |
| 9033 | 561 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
562 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 563 | * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. |
| 9033 | 564 | */ |
| 8420 | 565 | void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); |
| 9033 | 566 | |
| 567 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
568 | * Returns which formatting functions are enabled in a GTK+ IM/HTML. |
| 9033 | 569 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
570 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 571 | * |
| 9185 | 572 | * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. |
| 9033 | 573 | */ |
|
8788
a13634443a38
[gaim-migrate @ 9550]
Mark Doliner <markdoliner@pidgin.im>
parents:
8740
diff
changeset
|
574 | GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); |
| 9033 | 575 | |
| 576 | /** | |
|
12900
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
577 | * 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
|
578 | * is enabled at the current position in a GTK+ IM/HTML. |
| 9033 | 579 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
580 | * @param imhtml The GTK+ IM/HTML. |
|
12900
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
581 | * @param bold The boolean to set for bold or @c NULL. |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
582 | * @param italic The boolean to set for italic or @c NULL. |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
583 | * @param underline The boolean to set for underline or @c NULL. |
| 9033 | 584 | */ |
| 8516 | 585 | void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); |
| 9033 | 586 | |
| 587 | /** | |
| 588 | * 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
|
589 | * in a GTK+ IM/HTML. |
| 9033 | 590 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
591 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 592 | * |
| 593 | * @return A string containg the font face or @c NULL if none is set. | |
| 594 | */ | |
| 9025 | 595 | char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); |
| 9033 | 596 | |
| 597 | /** | |
| 598 | * 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
|
599 | * position in a GTK+ IM/HTML. |
| 9033 | 600 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
601 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 602 | * |
| 603 | * @return A string containg the foreground color or @c NULL if none is set. | |
| 604 | */ | |
| 9025 | 605 | char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); |
| 9033 | 606 | |
| 607 | /** | |
| 10776 | 608 | * 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
|
609 | * position in a GTK+ IM/HTML. |
| 10776 | 610 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
611 | * @param imhtml The GTK+ IM/HTML. |
| 10776 | 612 | * |
| 613 | * @return A string containg the font background color or @c NULL if none is set. | |
| 614 | */ | |
| 615 | char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); | |
| 616 | ||
| 617 | /** | |
| 9033 | 618 | * 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
|
619 | * position in a GTK+ IM/HTML. |
| 9033 | 620 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
621 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 622 | * |
| 623 | * @return A string containg the background color or @c NULL if none is set. | |
| 624 | */ | |
| 10776 | 625 | char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); |
| 9033 | 626 | |
| 627 | /** | |
| 628 | * 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
|
629 | * position in a GTK+ IM/HTML. |
| 9033 | 630 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
631 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 632 | * |
| 633 | * @return The HTML font size. | |
| 634 | */ | |
| 9025 | 635 | gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); |
| 9033 | 636 | |
| 637 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
638 | * Checks whether a GTK+ IM/HTML is marked as editable. |
| 9033 | 639 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
640 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 641 | * |
| 642 | * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. | |
| 643 | */ | |
| 8061 | 644 | gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); |
| 9033 | 645 | |
| 646 | /** | |
|
11269
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
647 | * Clear all the formatting on a GTK+ IM/HTML. |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
648 | * |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
649 | * @param imhtml The GTK+ IM/HTML. |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
650 | */ |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
651 | void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml); |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
652 | |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
653 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
654 | * Toggles bold at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 655 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
656 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 657 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
658 | void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); |
| 9033 | 659 | |
| 660 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
661 | * Toggles italic 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_italic(GtkIMHtml *imhtml); |
| 9033 | 666 | |
| 667 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
668 | * Toggles underline 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_underline(GtkIMHtml *imhtml); |
| 9033 | 673 | |
| 674 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
675 | * Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML. |
| 9924 | 676 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
677 | * @param imhtml The GTK+ IM/HTML. |
| 9924 | 678 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
679 | void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); |
| 9924 | 680 | |
| 681 | /** | |
| 9033 | 682 | * Toggles a foreground color at the current location or selection in a GTK |
| 683 | * IM/HTML. | |
| 684 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
685 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 686 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 9033 | 687 | * |
| 688 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 689 | */ | |
| 8061 | 690 | gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); |
| 9033 | 691 | |
| 692 | /** | |
| 693 | * Toggles a background color at the current location or selection in a GTK | |
| 694 | * IM/HTML. | |
| 695 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
696 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 697 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 9033 | 698 | * |
| 699 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 700 | */ | |
| 8061 | 701 | gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); |
| 9033 | 702 | |
| 703 | /** | |
| 10776 | 704 | * Toggles a background color at the current location or selection in a GTK |
| 705 | * IM/HTML. | |
| 706 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
707 | * @param imhtml The GTK+ IM/HTML. |
| 10776 | 708 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 709 | * | |
| 710 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 711 | */ | |
| 712 | gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); | |
| 713 | ||
| 714 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
715 | * Toggles a font face at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 716 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
717 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 718 | * @param face The font face name, or @c NULL or "" to clear the font. |
| 9033 | 719 | * |
| 720 | * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. | |
| 721 | */ | |
| 8061 | 722 | gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); |
| 9033 | 723 | |
| 724 | /** | |
| 725 | * 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
|
726 | * in a GTK+ IM/HTML. |
| 9033 | 727 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
728 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 729 | * @param url The URL for the link or @c NULL to terminate the link. |
| 9033 | 730 | */ |
| 8677 | 731 | void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); |
| 9033 | 732 | |
| 733 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
734 | * Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML. |
| 9033 | 735 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
736 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 737 | * @param mark The GtkTextMark to insert the link at. |
| 738 | * @param url The URL for the link. | |
| 739 | * @param text The string to use for the link description. | |
| 740 | */ | |
| 8677 | 741 | void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); |
| 9033 | 742 | |
| 743 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
744 | * Inserts a smiley at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 745 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
746 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 747 | * @param sml The category of the smiley. |
| 748 | * @param smiley The text of the smiley to insert. | |
| 749 | */ | |
| 8061 | 750 | void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); |
| 9033 | 751 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
752 | * Inserts a smiley at the given iter in a GTK+ IM/HTML. |
| 9033 | 753 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
754 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 755 | * @param sml The category of the smiley. |
| 756 | * @param smiley The text of the smiley to insert. | |
| 757 | * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. | |
| 758 | */ | |
| 8677 | 759 | void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); |
| 9033 | 760 | |
| 761 | /** | |
| 762 | * 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
|
763 | * GTK+ IM/HTML. |
| 9033 | 764 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
765 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 766 | * @param id The id of the IM/HTML scalable. |
| 767 | * @param iter The GtkTextIter in the IM/HTML to insert the image at. | |
| 768 | */ | |
| 8962 | 769 | void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); |
| 9033 | 770 | |
| 771 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
772 | * Sets the font size at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 773 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
774 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 775 | * @param size The HTML font size to use. |
| 776 | */ | |
| 8061 | 777 | void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); |
| 9033 | 778 | |
| 779 | /** | |
| 780 | * Decreases the font size by 1 at the current location or selection in a GTK | |
| 781 | * IM/HTML. | |
| 782 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
783 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 784 | */ |
| 8061 | 785 | void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); |
| 9033 | 786 | |
| 787 | /** | |
| 788 | * Increases the font size by 1 at the current location or selection in a GTK | |
| 789 | * IM/HTML. | |
| 790 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
791 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 792 | */ |
| 8061 | 793 | void gtk_imhtml_font_grow(GtkIMHtml *imhtml); |
| 9033 | 794 | |
| 795 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
796 | * Returns the HTML formatted contents between two iters in a GTK+ IM/HTML. |
| 9033 | 797 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
798 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 799 | * @param start The GtkTextIter indicating the start point in the IM/HTML. |
| 800 | * @param end The GtkTextIter indicating the end point in the IM/HTML. | |
| 801 | * | |
| 802 | * @return A string containing the HTML formatted text. | |
| 803 | */ | |
| 8061 | 804 | char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
| 9033 | 805 | |
| 806 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
807 | * Returns the entire HTML formatted contents of a GTK+ IM/HTML. |
| 9033 | 808 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
809 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 810 | * |
| 811 | * @return A string containing the HTML formatted text. | |
| 812 | */ | |
| 8061 | 813 | char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); |
| 9033 | 814 | |
| 815 | /** | |
| 816 | * Returns a null terminated array of pointers to null terminated strings, each | |
| 817 | * string for each line. g_strfreev() should be called to free it when done. | |
| 818 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
819 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 820 | * |
| 821 | * @return A null terminated array of null terminated HTML formatted strings. | |
| 822 | */ | |
| 8677 | 823 | char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); |
| 9033 | 824 | |
| 825 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
826 | * 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
|
827 | * between two iters in a GTK+ IM/HTML. |
| 9033 | 828 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
829 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 830 | * @param start The GtkTextIter indicating the start point in the IM/HTML. |
| 9185 | 831 | * @param stop The GtkTextIter indicating the end point in the IM/HTML. |
| 9033 | 832 | * |
| 833 | * @return A string containing the unformatted text. | |
| 834 | */ | |
| 8677 | 835 | char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop); |
| 8061 | 836 | |
|
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
|
837 | /** |
|
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 | * 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
|
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 | * @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
|
841 | * @param flags The connection flag which describes the allowed types of formatting. |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
842 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
843 | * @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
|
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 | 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
|
846 | |
| 9033 | 847 | /*@}*/ |
| 848 | ||
| 1428 | 849 | #ifdef __cplusplus |
| 850 | } | |
| 851 | #endif | |
| 852 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
853 | #endif /* _PIDGINIMHTML_H_ */ |