Wed, 24 Aug 2011 15:06:36 +0000
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 73c3b1db23643c3eef6a98297c1bb7ff59f07ff3)
to branch 'im.pidgin.pidgin' (head 047f1f9df60d36d0abcd494bcc0efebbf6d075d4)
|
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> | |
|
26727
b8885bab55ab
More updates for GTK+ 3.0. This only fixes the single-includes. Fixing all
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25900
diff
changeset
|
29 | #include <gtk/gtk.h> |
|
17880
5e73968467e0
Undo/Redo in GtkImHtml from GtkSourceView. This may not be adaquate enough for us.
Sean Egan <seanegan@pidgin.im>
parents:
16385
diff
changeset
|
30 | #include "gtksourceundomanager.h" |
| 1428 | 31 | |
|
17388
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
32 | #include "connection.h" |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
33 | |
| 1428 | 34 | #ifdef __cplusplus |
| 35 | extern "C" { | |
| 36 | #endif | |
| 37 | ||
| 9033 | 38 | /************************************************************************** |
| 39 | * @name Structures | |
| 40 | **************************************************************************/ | |
| 41 | /*@{*/ | |
| 42 | ||
|
26818
453071d0db0e
Remove GTK_CHECK_* macros which were deprecated.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
43 | #define GTK_TYPE_IMHTML (gtk_imhtml_get_type()) |
|
453071d0db0e
Remove GTK_CHECK_* macros which were deprecated.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
44 | #define GTK_IMHTML(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_IMHTML, GtkIMHtml)) |
|
453071d0db0e
Remove GTK_CHECK_* macros which were deprecated.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
45 | #define GTK_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass)) |
|
453071d0db0e
Remove GTK_CHECK_* macros which were deprecated.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
46 | #define GTK_IS_IMHTML(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_IMHTML)) |
|
453071d0db0e
Remove GTK_CHECK_* macros which were deprecated.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
47 | #define GTK_IS_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_IMHTML)) |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
48 | #define GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj) |
|
26818
453071d0db0e
Remove GTK_CHECK_* macros which were deprecated.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26727
diff
changeset
|
49 | #define GTK_IMHTML_ANIMATION(obj) ((GtkIMHtmlAnimation *)obj) |
| 1428 | 50 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
51 | typedef struct _GtkIMHtml GtkIMHtml; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
52 | typedef struct _GtkIMHtmlClass GtkIMHtmlClass; |
|
31310
7835bac46b07
Add support for rendering strikethrough when received as in-line CSS,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
28423
diff
changeset
|
53 | #if !(defined PIDGIN_DISABLE_DEPRECATED) && !(defined _PIDGIN_GTKIMHTML_C_) |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
54 | typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */ |
|
31310
7835bac46b07
Add support for rendering strikethrough when received as in-line CSS,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
28423
diff
changeset
|
55 | #endif |
|
5967
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; |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
63 | |
|
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
64 | /** |
|
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
65 | * @since 2.6.0 |
|
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
66 | */ |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
67 | typedef struct _GtkIMHtmlLink GtkIMHtmlLink; |
| 8061 | 68 | |
| 8420 | 69 | typedef enum { |
| 10776 | 70 | GTK_IMHTML_BOLD = 1 << 0, |
| 71 | GTK_IMHTML_ITALIC = 1 << 1, | |
| 72 | GTK_IMHTML_UNDERLINE = 1 << 2, | |
| 73 | GTK_IMHTML_GROW = 1 << 3, | |
| 74 | GTK_IMHTML_SHRINK = 1 << 4, | |
| 75 | GTK_IMHTML_FACE = 1 << 5, | |
| 76 | GTK_IMHTML_FORECOLOR = 1 << 6, | |
| 77 | GTK_IMHTML_BACKCOLOR = 1 << 7, | |
| 78 | GTK_IMHTML_BACKGROUND = 1 << 8, | |
| 79 | GTK_IMHTML_LINK = 1 << 9, | |
| 80 | GTK_IMHTML_IMAGE = 1 << 10, | |
| 81 | GTK_IMHTML_SMILEY = 1 << 11, | |
| 82 | GTK_IMHTML_LINKDESC = 1 << 12, | |
| 83 | GTK_IMHTML_STRIKE = 1 << 13, | |
|
23311
2ef53b1a2dc6
Update changelogs and some of the docs for the new API. Preparing to merge with i.p.p
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23012
diff
changeset
|
84 | /** Show custom smileys when appropriate. @since 2.5.0 */ |
|
23012
ed48af43e0f5
Changelog the API additions, and add a missing define. Thanks to malu for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22655
diff
changeset
|
85 | GTK_IMHTML_CUSTOM_SMILEY = 1 << 14, |
| 10776 | 86 | GTK_IMHTML_ALL = -1 |
| 8420 | 87 | } GtkIMHtmlButtons; |
| 8061 | 88 | |
|
11525
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
89 | typedef enum { |
|
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
90 | GTK_IMHTML_SMILEY_CUSTOM = 1 << 0 |
|
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
91 | } GtkIMHtmlSmileyFlags; |
|
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
92 | |
| 1428 | 93 | struct _GtkIMHtml { |
| 3922 | 94 | GtkTextView text_view; |
| 95 | GtkTextBuffer *text_buffer; | |
| 1428 | 96 | GdkCursor *hand_cursor; |
| 97 | GdkCursor *arrow_cursor; | |
| 8061 | 98 | GdkCursor *text_cursor; |
| 4032 | 99 | GHashTable *smiley_data; |
| 100 | GtkSmileyTree *default_smilies; | |
| 8456 | 101 | char *protocol_name; |
| 10798 | 102 | guint scroll_src; |
| 103 | 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
|
104 | 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
|
105 | int num_animations; |
| 4254 | 106 | |
|
6124
322206d79652
[gaim-migrate @ 6598]
Mark Doliner <markdoliner@pidgin.im>
parents:
6066
diff
changeset
|
107 | gboolean show_comments; |
| 4735 | 108 | |
| 109 | GtkWidget *tip_window; | |
| 110 | char *tip; | |
| 111 | guint tip_timer; | |
| 10799 | 112 | GtkTextTag *prelit_tag; |
| 4895 | 113 | |
| 114 | GList *scalables; | |
| 4947 | 115 | GdkRectangle old_rect; |
| 7295 | 116 | |
| 8061 | 117 | gchar *search_string; |
| 7694 | 118 | |
| 8061 | 119 | gboolean editable; |
| 8420 | 120 | GtkIMHtmlButtons format_functions; |
| 8677 | 121 | gboolean wbfo; /* Whole buffer formatting only. */ |
| 122 | ||
| 123 | gint insert_offset; | |
| 8420 | 124 | |
| 8061 | 125 | struct { |
| 8677 | 126 | gboolean bold:1; |
| 127 | gboolean italic:1; | |
| 128 | gboolean underline:1; | |
| 9924 | 129 | gboolean strike:1; |
| 8677 | 130 | gchar *forecolor; |
| 131 | gchar *backcolor; | |
| 10776 | 132 | gchar *background; |
| 8677 | 133 | gchar *fontface; |
| 8061 | 134 | int fontsize; |
| 8677 | 135 | GtkTextTag *link; |
| 8061 | 136 | } edit; |
|
8740
098a43943bba
[gaim-migrate @ 9495]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
137 | |
| 8962 | 138 | GSList *im_images; |
| 139 | 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
|
140 | GtkSourceUndoManager *undo_manager; |
| 1428 | 141 | }; |
| 142 | ||
| 143 | struct _GtkIMHtmlClass { | |
| 3922 | 144 | GtkTextViewClass parent_class; |
| 1428 | 145 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
146 | void (*url_clicked)(GtkIMHtml *, const gchar *); |
| 8420 | 147 | void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons); |
| 148 | void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons); | |
| 8427 | 149 | void (*clear_format)(GtkIMHtml *); |
| 8506 | 150 | void (*update_format)(GtkIMHtml *); |
| 10108 | 151 | 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
|
152 | 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
|
153 | void (*redo)(GtkIMHtml *); |
|
24674
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
154 | GList *protocols; /* List of GtkIMHtmlProtocol's */ |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
155 | }; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
156 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
157 | struct _GtkSmileyTree { |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
158 | GString *values; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
159 | GtkSmileyTree **children; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
160 | GtkIMHtmlSmiley *image; |
| 1428 | 161 | }; |
| 162 | ||
| 4263 | 163 | struct _GtkIMHtmlSmiley { |
| 164 | gchar *smile; | |
| 165 | gchar *file; | |
| 6814 | 166 | GdkPixbufAnimation *icon; |
| 4263 | 167 | gboolean hidden; |
| 10526 | 168 | GdkPixbufLoader *loader; |
|
11525
1d06283bdcc9
[gaim-migrate @ 13773]
Francesco Fracassi <ffracassi@users.sourceforge.net>
parents:
11485
diff
changeset
|
169 | GSList *anchors; |
| 12335 | 170 | GtkIMHtmlSmileyFlags flags; |
| 171 | GtkIMHtml *imhtml; | |
|
28423
c12dbb691b04
Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27123
diff
changeset
|
172 | gpointer data; /** @since 2.6.0 */ |
|
c12dbb691b04
Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27123
diff
changeset
|
173 | gsize datasize; /** @since 2.6.0 */ |
| 4263 | 174 | }; |
| 175 | ||
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
176 | struct _GtkIMHtmlScalable { |
| 4895 | 177 | void (*scale)(struct _GtkIMHtmlScalable *, int, int); |
| 178 | void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
| 179 | void (*free)(struct _GtkIMHtmlScalable *); | |
| 180 | }; | |
| 181 | ||
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
182 | struct _GtkIMHtmlImage { |
| 4895 | 183 | GtkIMHtmlScalable scalable; |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
184 | 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
|
185 | GdkPixbuf *pixbuf; /**< The original pixbuf, before any scaling. */ |
| 4895 | 186 | GtkTextMark *mark; |
| 5012 | 187 | gchar *filename; |
| 4895 | 188 | int width; |
| 189 | int height; | |
| 8962 | 190 | int id; |
|
9573
7fb26654aee8
[gaim-migrate @ 10416]
Mark Doliner <markdoliner@pidgin.im>
parents:
9307
diff
changeset
|
191 | GtkWidget *filesel; |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
192 | }; |
| 4895 | 193 | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
194 | struct _GtkIMHtmlAnimation { |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
195 | GtkIMHtmlImage imhtmlimage; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
196 | 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
|
197 | GdkPixbufAnimationIter *iter; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
198 | guint timer; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
199 | }; |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
200 | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
201 | struct _GtkIMHtmlHr { |
| 4895 | 202 | GtkIMHtmlScalable scalable; |
| 203 | GtkWidget *sep; | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
204 | }; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
205 | |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
206 | typedef enum { |
| 12553 | 207 | GTK_IMHTML_NO_COLOURS = 1 << 0, |
| 208 | GTK_IMHTML_NO_FONTS = 1 << 1, | |
| 209 | GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */ | |
| 210 | GTK_IMHTML_NO_TITLE = 1 << 3, | |
| 211 | GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
| 212 | GTK_IMHTML_NO_SIZES = 1 << 5, | |
| 213 | GTK_IMHTML_NO_SCROLL = 1 << 6, | |
| 214 | GTK_IMHTML_RETURN_LOG = 1 << 7, | |
| 215 | GTK_IMHTML_USE_POINTSIZE = 1 << 8, | |
| 216 | GTK_IMHTML_NO_FORMATTING = 1 << 9, | |
|
22003
904ebe8d6058
Patch from 'goutnet' to not insert smileys when pasting as plain text.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21122
diff
changeset
|
217 | GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10, |
|
904ebe8d6058
Patch from 'goutnet' to not insert smileys when pasting as plain text.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21122
diff
changeset
|
218 | GTK_IMHTML_NO_SMILEY = 1 << 11, |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
219 | } GtkIMHtmlOptions; |
|
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
220 | |
|
10145
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
221 | enum { |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
222 | GTK_IMHTML_DRAG_URL = 0, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
223 | GTK_IMHTML_DRAG_HTML, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
224 | GTK_IMHTML_DRAG_UTF8_STRING, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
225 | GTK_IMHTML_DRAG_COMPOUND_TEXT, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
226 | GTK_IMHTML_DRAG_STRING, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
227 | GTK_IMHTML_DRAG_TEXT, |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
228 | GTK_IMHTML_DRAG_NUM |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
229 | }; |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
230 | |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
231 | #define GTK_IMHTML_DND_TARGETS \ |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10243
diff
changeset
|
232 | { "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \ |
|
10243
6d75b29afc71
[gaim-migrate @ 11383]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10165
diff
changeset
|
233 | { "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \ |
|
10145
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
234 | { "text/html", 0, GTK_IMHTML_DRAG_HTML }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
235 | { "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
236 | { "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
237 | { "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
238 | { "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
239 | { "STRING", 0, GTK_IMHTML_DRAG_STRING }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
240 | { "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \ |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
241 | { "TEXT", 0, GTK_IMHTML_DRAG_TEXT } |
|
f1405f65ff41
[gaim-migrate @ 11218]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10108
diff
changeset
|
242 | |
| 8962 | 243 | typedef gpointer (*GtkIMHtmlGetImageFunc) (int id); |
| 244 | typedef gpointer (*GtkIMHtmlGetImageDataFunc) (gpointer i); | |
| 245 | typedef size_t (*GtkIMHtmlGetImageSizeFunc) (gpointer i); | |
| 246 | typedef const char *(*GtkIMHtmlGetImageFilenameFunc)(gpointer i); | |
| 247 | typedef void (*GtkIMHtmlImageRefFunc) (int id); | |
| 248 | typedef void (*GtkIMHtmlImageUnrefFunc) (int id); | |
| 249 | ||
| 250 | struct _GtkIMHtmlFuncs { | |
| 251 | GtkIMHtmlGetImageFunc image_get; | |
| 252 | GtkIMHtmlGetImageDataFunc image_get_data; | |
| 253 | GtkIMHtmlGetImageSizeFunc image_get_size; | |
| 254 | GtkIMHtmlGetImageFilenameFunc image_get_filename; | |
| 255 | GtkIMHtmlImageRefFunc image_ref; | |
| 256 | GtkIMHtmlImageUnrefFunc image_unref; | |
| 257 | }; | |
| 258 | ||
| 9033 | 259 | /*@}*/ |
| 8962 | 260 | |
| 9033 | 261 | /************************************************************************** |
| 262 | * @name GTK+ IM/HTML rendering component API | |
| 263 | **************************************************************************/ | |
| 264 | /*@{*/ | |
| 265 | ||
| 266 | /** | |
| 9037 | 267 | * Returns the GType object for an IM/HTML widget. |
| 9033 | 268 | * |
| 9037 | 269 | * @return The GType for an IM/HTML widget. |
| 9033 | 270 | */ |
| 9037 | 271 | GType gtk_imhtml_get_type(void); |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
272 | |
| 9033 | 273 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
274 | * Creates and returns a new GTK+ IM/HTML widget. |
| 9033 | 275 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
276 | * @return The GTK+ IM/HTML widget created. |
| 9033 | 277 | */ |
| 278 | GtkWidget *gtk_imhtml_new(void *, void *); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
279 | |
| 9033 | 280 | /** |
| 10526 | 281 | * Returns the smiley object associated with the text. |
| 282 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
283 | * @param imhtml The GTK+ IM/HTML. |
| 10526 | 284 | * @param sml The name of the smiley category. |
| 285 | * @param text The text associated with the smiley. | |
| 286 | */ | |
| 287 | ||
| 288 | GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, | |
| 289 | const gchar * sml, const gchar * text); | |
| 290 | ||
| 291 | ||
| 292 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
293 | * Associates a smiley with a GTK+ IM/HTML. |
| 9033 | 294 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
295 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 296 | * @param sml The name of the smiley category. |
| 297 | * @param smiley The GtkIMSmiley to associate. | |
| 298 | */ | |
|
10537
9ece7671fa62
[gaim-migrate @ 11890]
Mark Doliner <markdoliner@pidgin.im>
parents:
10526
diff
changeset
|
299 | void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); |
| 9033 | 300 | |
| 301 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
302 | * Removes all smileys associated with a GTK+ IM/HTML. |
| 9033 | 303 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
304 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 305 | */ |
| 306 | void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
307 | |
| 9033 | 308 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
309 | * Sets the function callbacks to use with a GTK+ IM/HTML instance. |
| 9033 | 310 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
311 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 312 | * @param f The GtkIMHTMLFuncs struct containing the functions to use. |
| 313 | */ | |
| 314 | void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); | |
|
5967
df8268ccde45
[gaim-migrate @ 6414]
Mark Doliner <markdoliner@pidgin.im>
parents:
5537
diff
changeset
|
315 | |
| 9033 | 316 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
317 | * Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML. |
| 9033 | 318 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
319 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 320 | * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. |
| 321 | */ | |
| 322 | void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); | |
| 8962 | 323 | |
| 9033 | 324 | /** |
|
11814
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
325 | * Gets the protocol name associated with this GTK+ IM/HTML. |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
326 | * |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
327 | * @param imhtml The GTK+ IM/HTML |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
328 | */ |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
329 | const char *gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml); |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
330 | |
|
5003711283c0
[gaim-migrate @ 14105]
Richard Laager <rlaager@pidgin.im>
parents:
11525
diff
changeset
|
331 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
332 | * Associates a protocol name with a GTK+ IM/HTML. |
| 9033 | 333 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
334 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 335 | * @param protocol_name The protocol name to associate with the IM/HTML. |
| 336 | */ | |
| 337 | void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); | |
| 8456 | 338 | |
| 9033 | 339 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
340 | * Appends HTML formatted text to a GTK+ IM/HTML. |
| 9033 | 341 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
342 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 343 | * @param text The formatted text to append. |
| 344 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
| 345 | */ | |
| 9307 | 346 | #define gtk_imhtml_append_text(imhtml, text, options) \ |
| 347 | gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6814
diff
changeset
|
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. | |
| 9185 | 355 | * @param unused Use @c NULL value. |
| 9033 | 356 | */ |
| 357 | void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, | |
| 358 | const gchar *text, | |
| 359 | GtkIMHtmlOptions options, | |
| 360 | GSList *unused); | |
| 361 | ||
| 362 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
363 | * Inserts HTML formatted text to a GTK+ IM/HTML at a given iter. |
| 9033 | 364 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
365 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 366 | * @param text The formatted text to append. |
| 367 | * @param options A GtkIMHtmlOptions object indicating insert behavior. | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
368 | * @param iter A GtkTextIter in the GTK+ IM/HTML at which to insert text. |
| 9033 | 369 | */ |
| 8677 | 370 | void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, |
| 371 | const gchar *text, | |
| 372 | GtkIMHtmlOptions options, | |
| 373 | GtkTextIter *iter); | |
| 9033 | 374 | |
| 375 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
376 | * Scrolls a GTK+ IM/HTML to the end of its contents. |
| 9033 | 377 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
378 | * @param imhtml The GTK+ IM/HTML. |
|
12557
6c318efafe32
[gaim-migrate @ 14876]
Richard Laager <rlaager@pidgin.im>
parents:
12553
diff
changeset
|
379 | * @param smooth A boolean indicating if smooth scrolling should be used. |
| 9033 | 380 | */ |
| 12553 | 381 | void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth); |
| 9033 | 382 | |
| 383 | /** | |
|
11224
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
384 | * 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
|
385 | * |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
386 | * @param imhtml The GTK+ IM/HTML. |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
387 | * @param start a postition in the imhtml's buffer |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
388 | * @param end another postition in the imhtml's buffer |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
389 | */ |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
390 | void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
391 | |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
392 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
393 | * Purges the contents from a GTK+ IM/HTML and resets formatting. |
| 9033 | 394 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
395 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 396 | */ |
|
11224
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
397 | #define gtk_imhtml_clear(imhtml) \ |
|
04c1712bb953
[gaim-migrate @ 13360]
Daniel Atallah <datallah@pidgin.im>
parents:
10814
diff
changeset
|
398 | gtk_imhtml_delete(imhtml, NULL, NULL) |
| 4895 | 399 | |
| 9033 | 400 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
401 | * Scrolls a GTK+ IM/HTML up by one page. |
| 9033 | 402 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
403 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 404 | */ |
| 405 | void gtk_imhtml_page_up(GtkIMHtml *imhtml); | |
| 406 | ||
| 407 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
408 | * Scrolls a GTK+ IM/HTML down by one page. |
| 9033 | 409 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
410 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 411 | */ |
| 412 | void gtk_imhtml_page_down(GtkIMHtml *imhtml); | |
| 413 | ||
| 414 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
415 | * Creates and returns an new GTK+ IM/HTML scalable object. |
| 9033 | 416 | * |
| 417 | * @return A new IM/HTML Scalable object. | |
| 418 | */ | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11814
diff
changeset
|
419 | GtkIMHtmlScalable *gtk_imhtml_scalable_new(void); |
| 9033 | 420 | |
| 421 | /** | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
422 | * Creates and returns a new GTK+ IM/HTML scalable object with an image. |
| 9033 | 423 | * |
| 424 | * @param img A GdkPixbuf of the image to add. | |
| 425 | * @param filename The filename to associate with the image. | |
| 426 | * @param id The id to associate with the image. | |
| 427 | * | |
| 428 | * @return A new IM/HTML Scalable object with an image. | |
| 429 | */ | |
| 8962 | 430 | GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); |
| 9033 | 431 | |
| 432 | /** | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
433 | * 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
|
434 | * animated image. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
435 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
436 | * @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
|
437 | * @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
|
438 | * @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
|
439 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
440 | * @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
|
441 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
442 | * @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
|
443 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
444 | /* |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
445 | * TODO: All this animation code could be combined much better with |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
446 | * the image code. It couldn't be done when it was written |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
447 | * because it requires breaking backward compatibility. It |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
448 | * would be good to do it for 3.0.0. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
449 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
450 | GtkIMHtmlScalable *gtk_imhtml_animation_new(GdkPixbufAnimation *img, const gchar *filename, int id); |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
451 | |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
452 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
453 | * Destroys and frees a GTK+ IM/HTML scalable image. |
| 9033 | 454 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
455 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 456 | */ |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
457 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 458 | void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); |
| 4895 | 459 | |
| 9033 | 460 | /** |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
461 | * Destroys and frees a GTK+ IM/HTML scalable animation. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
462 | * |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
463 | * @param scale The GTK+ IM/HTML scalable. |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
464 | */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
465 | /* TODO: Is there any reason this isn't private? */ |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
466 | void gtk_imhtml_animation_free(GtkIMHtmlScalable *scale); |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
467 | |
|
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
468 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
469 | * Rescales a GTK+ IM/HTML scalable image to a given size. |
| 9033 | 470 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
471 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 472 | * @param width The new width. |
| 473 | * @param height The new height. | |
| 474 | */ | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
475 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 476 | void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); |
| 477 | ||
| 478 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
479 | * Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter. |
| 9033 | 480 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
481 | * @param scale The GTK+ IM/HTML scalable. |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
482 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 483 | * @param iter The GtkTextIter at which to add the scalable. |
| 484 | */ | |
|
18151
97fd60f47229
When an animated image is inserted into a conversation window, animate
Mark Doliner <markdoliner@pidgin.im>
parents:
18105
diff
changeset
|
485 | /* TODO: Is there any reason this isn't private? */ |
| 9033 | 486 | void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
| 487 | ||
| 488 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
489 | * Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule. |
| 9033 | 490 | * |
| 491 | * @return A new IM/HTML Scalable object with an image. | |
| 492 | */ | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
11814
diff
changeset
|
493 | GtkIMHtmlScalable *gtk_imhtml_hr_new(void); |
| 9033 | 494 | |
| 495 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
496 | * Destroys and frees a GTK+ IM/HTML scalable horizontal rule. |
| 9033 | 497 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
498 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 499 | */ |
| 9034 | 500 | void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); |
| 9033 | 501 | |
| 502 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
503 | * Rescales a GTK+ IM/HTML scalable horizontal rule to a given size. |
| 9033 | 504 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
505 | * @param scale The GTK+ IM/HTML scalable. |
| 9033 | 506 | * @param width The new width. |
| 507 | * @param height The new height. | |
| 508 | */ | |
| 9034 | 509 | void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); |
| 4895 | 510 | |
| 9033 | 511 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
512 | * Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at |
| 9033 | 513 | * a given iter. |
| 514 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
515 | * @param scale The GTK+ IM/HTML scalable. |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
516 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 517 | * @param iter The GtkTextIter at which to add the scalable. |
| 518 | */ | |
| 9307 | 519 | void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
| 9033 | 520 | |
| 521 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
522 | * Finds and highlights a given string in a GTK+ IM/HTML. |
| 9033 | 523 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
524 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 525 | * @param text The string to search for. |
| 526 | * | |
| 527 | * @return @c TRUE if a search was performed, or @c FALSE if not. | |
| 528 | */ | |
| 7295 | 529 | gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); |
| 9033 | 530 | |
| 531 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
532 | * Clears the highlighting from a prior search in a GTK+ IM/HTML. |
| 9033 | 533 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
534 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 535 | */ |
| 7295 | 536 | void gtk_imhtml_search_clear(GtkIMHtml *imhtml); |
| 4895 | 537 | |
| 9033 | 538 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
539 | * Enables or disables editing in a GTK+ IM/HTML. |
| 9033 | 540 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
541 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 542 | * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. |
| 543 | */ | |
| 8061 | 544 | void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); |
| 9033 | 545 | |
| 546 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
547 | * Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML. |
| 9033 | 548 | * In this mode formatting options to the buffer take effect for the entire |
| 549 | * buffer instead of specific text. | |
| 550 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
551 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 552 | * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. |
| 553 | */ | |
| 8677 | 554 | void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); |
| 9033 | 555 | |
| 556 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
557 | * Indicates which formatting functions to enable and disable in a GTK+ IM/HTML. |
| 9033 | 558 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
559 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 560 | * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. |
| 9033 | 561 | */ |
| 8420 | 562 | void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); |
| 9033 | 563 | |
| 564 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
565 | * Returns which formatting functions are enabled in a GTK+ IM/HTML. |
| 9033 | 566 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
567 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 568 | * |
| 9185 | 569 | * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. |
| 9033 | 570 | */ |
|
8788
a13634443a38
[gaim-migrate @ 9550]
Mark Doliner <markdoliner@pidgin.im>
parents:
8740
diff
changeset
|
571 | GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); |
| 9033 | 572 | |
| 573 | /** | |
|
12900
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
574 | * Sets each boolean to @c TRUE or @c FALSE to indicate if that formatting option |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
575 | * is enabled at the current position in a GTK+ IM/HTML. |
| 9033 | 576 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
577 | * @param imhtml The GTK+ IM/HTML. |
|
12900
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
578 | * @param bold The boolean to set for bold or @c NULL. |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
579 | * @param italic The boolean to set for italic or @c NULL. |
|
7fe519669e07
[gaim-migrate @ 15253]
Richard Laager <rlaager@pidgin.im>
parents:
12557
diff
changeset
|
580 | * @param underline The boolean to set for underline or @c NULL. |
| 9033 | 581 | */ |
| 8516 | 582 | void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); |
| 9033 | 583 | |
| 584 | /** | |
| 585 | * Returns a string containing the selected font face at the current position | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
586 | * in a GTK+ IM/HTML. |
| 9033 | 587 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
588 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 589 | * |
| 590 | * @return A string containg the font face or @c NULL if none is set. | |
| 591 | */ | |
| 9025 | 592 | char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); |
| 9033 | 593 | |
| 594 | /** | |
| 595 | * Returns a string containing the selected foreground color at the current | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
596 | * position in a GTK+ IM/HTML. |
| 9033 | 597 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
598 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 599 | * |
| 600 | * @return A string containg the foreground color or @c NULL if none is set. | |
| 601 | */ | |
| 9025 | 602 | char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); |
| 9033 | 603 | |
| 604 | /** | |
| 10776 | 605 | * Returns a string containing the selected font background color at the current |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
606 | * position in a GTK+ IM/HTML. |
| 10776 | 607 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
608 | * @param imhtml The GTK+ IM/HTML. |
| 10776 | 609 | * |
| 610 | * @return A string containg the font background color or @c NULL if none is set. | |
| 611 | */ | |
| 612 | char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); | |
| 613 | ||
| 614 | /** | |
| 9033 | 615 | * Returns a string containing the selected background color at the current |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
616 | * position in a GTK+ IM/HTML. |
| 9033 | 617 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
618 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 619 | * |
| 620 | * @return A string containg the background color or @c NULL if none is set. | |
| 621 | */ | |
| 10776 | 622 | char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); |
| 9033 | 623 | |
| 624 | /** | |
| 625 | * Returns a integer containing the selected HTML font size at the current | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
626 | * position in a GTK+ IM/HTML. |
| 9033 | 627 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
628 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 629 | * |
| 630 | * @return The HTML font size. | |
| 631 | */ | |
| 9025 | 632 | gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); |
| 9033 | 633 | |
| 634 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
635 | * Checks whether a GTK+ IM/HTML is marked as editable. |
| 9033 | 636 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
637 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 638 | * |
| 639 | * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. | |
| 640 | */ | |
| 8061 | 641 | gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); |
| 9033 | 642 | |
| 643 | /** | |
|
11269
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
644 | * Clear all the formatting on a GTK+ IM/HTML. |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
645 | * |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
646 | * @param imhtml The GTK+ IM/HTML. |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
647 | */ |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
648 | void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml); |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
649 | |
|
ca63789d57b9
[gaim-migrate @ 13451]
Richard Laager <rlaager@pidgin.im>
parents:
11267
diff
changeset
|
650 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
651 | * Toggles bold at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 652 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
653 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 654 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
655 | void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); |
| 9033 | 656 | |
| 657 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
658 | * Toggles italic at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 659 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
660 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 661 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
662 | void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); |
| 9033 | 663 | |
| 664 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
665 | * Toggles underline at the cursor location or selection in a GTK+ IM/HTML. |
| 9033 | 666 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
667 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 668 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
669 | void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); |
| 9033 | 670 | |
| 671 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
672 | * Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML. |
| 9924 | 673 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
674 | * @param imhtml The GTK+ IM/HTML. |
| 9924 | 675 | */ |
|
11267
78f1eb5b3d6e
[gaim-migrate @ 13449]
Richard Laager <rlaager@pidgin.im>
parents:
11224
diff
changeset
|
676 | void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); |
| 9924 | 677 | |
| 678 | /** | |
| 9033 | 679 | * Toggles a foreground color at the current location or selection in a GTK |
| 680 | * IM/HTML. | |
| 681 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
682 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 683 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 9033 | 684 | * |
| 685 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 686 | */ | |
| 8061 | 687 | gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); |
| 9033 | 688 | |
| 689 | /** | |
| 690 | * Toggles a background color at the current location or selection in a GTK | |
| 691 | * IM/HTML. | |
| 692 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
693 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 694 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 9033 | 695 | * |
| 696 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 697 | */ | |
| 8061 | 698 | gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); |
| 9033 | 699 | |
| 700 | /** | |
| 10776 | 701 | * Toggles a background color at the current location or selection in a GTK |
| 702 | * IM/HTML. | |
| 703 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
704 | * @param imhtml The GTK+ IM/HTML. |
| 10776 | 705 | * @param color The HTML-style color, or @c NULL or "" to clear the color. |
| 706 | * | |
| 707 | * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | |
| 708 | */ | |
| 709 | gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); | |
| 710 | ||
| 711 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
712 | * Toggles a font face at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 713 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
714 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 715 | * @param face The font face name, or @c NULL or "" to clear the font. |
| 9033 | 716 | * |
| 717 | * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. | |
| 718 | */ | |
| 8061 | 719 | gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); |
| 9033 | 720 | |
| 721 | /** | |
| 722 | * Toggles a link tag with the given URL at the current location or selection | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
723 | * in a GTK+ IM/HTML. |
| 9033 | 724 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
725 | * @param imhtml The GTK+ IM/HTML. |
| 9185 | 726 | * @param url The URL for the link or @c NULL to terminate the link. |
| 9033 | 727 | */ |
| 8677 | 728 | void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); |
| 9033 | 729 | |
| 730 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
731 | * Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML. |
| 9033 | 732 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
733 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 734 | * @param mark The GtkTextMark to insert the link at. |
| 735 | * @param url The URL for the link. | |
| 736 | * @param text The string to use for the link description. | |
| 737 | */ | |
| 8677 | 738 | void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); |
| 9033 | 739 | |
| 740 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
741 | * Inserts a smiley at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 742 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
743 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 744 | * @param sml The category of the smiley. |
| 745 | * @param smiley The text of the smiley to insert. | |
| 746 | */ | |
| 8061 | 747 | void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); |
| 9033 | 748 | /** |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
749 | * Inserts a smiley at the given iter in a GTK+ IM/HTML. |
| 9033 | 750 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
751 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 752 | * @param sml The category of the smiley. |
| 753 | * @param smiley The text of the smiley to insert. | |
| 754 | * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. | |
| 755 | */ | |
| 8677 | 756 | void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); |
| 9033 | 757 | |
| 758 | /** | |
| 759 | * Inserts the IM/HTML scalable image with the given id at the given iter in a | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
760 | * GTK+ IM/HTML. |
| 9033 | 761 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
762 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 763 | * @param id The id of the IM/HTML scalable. |
| 764 | * @param iter The GtkTextIter in the IM/HTML to insert the image at. | |
| 765 | */ | |
| 8962 | 766 | void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); |
| 9033 | 767 | |
| 768 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
769 | * Sets the font size at the current location or selection in a GTK+ IM/HTML. |
| 9033 | 770 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
771 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 772 | * @param size The HTML font size to use. |
| 773 | */ | |
| 8061 | 774 | void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); |
| 9033 | 775 | |
| 776 | /** | |
| 777 | * Decreases the font size by 1 at the current location or selection in a GTK | |
| 778 | * IM/HTML. | |
| 779 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
780 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 781 | */ |
| 8061 | 782 | void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); |
| 9033 | 783 | |
| 784 | /** | |
| 785 | * Increases the font size by 1 at the current location or selection in a GTK | |
| 786 | * IM/HTML. | |
| 787 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
788 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 789 | */ |
| 8061 | 790 | void gtk_imhtml_font_grow(GtkIMHtml *imhtml); |
| 9033 | 791 | |
| 792 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
793 | * Returns the HTML formatted contents between two iters in a GTK+ IM/HTML. |
| 9033 | 794 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
795 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 796 | * @param start The GtkTextIter indicating the start point in the IM/HTML. |
| 797 | * @param end The GtkTextIter indicating the end point in the IM/HTML. | |
| 798 | * | |
| 799 | * @return A string containing the HTML formatted text. | |
| 800 | */ | |
| 8061 | 801 | char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
| 9033 | 802 | |
| 803 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
804 | * Returns the entire HTML formatted contents of a GTK+ IM/HTML. |
| 9033 | 805 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
806 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 807 | * |
| 808 | * @return A string containing the HTML formatted text. | |
| 809 | */ | |
| 8061 | 810 | char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); |
| 9033 | 811 | |
| 812 | /** | |
| 813 | * Returns a null terminated array of pointers to null terminated strings, each | |
| 814 | * string for each line. g_strfreev() should be called to free it when done. | |
| 815 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
816 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 817 | * |
| 818 | * @return A null terminated array of null terminated HTML formatted strings. | |
| 819 | */ | |
| 8677 | 820 | char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); |
| 9033 | 821 | |
| 822 | /** | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
823 | * Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML |
|
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
824 | * between two iters in a GTK+ IM/HTML. |
| 9033 | 825 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10799
diff
changeset
|
826 | * @param imhtml The GTK+ IM/HTML. |
| 9033 | 827 | * @param start The GtkTextIter indicating the start point in the IM/HTML. |
| 9185 | 828 | * @param stop The GtkTextIter indicating the end point in the IM/HTML. |
| 9033 | 829 | * |
| 830 | * @return A string containing the unformatted text. | |
| 831 | */ | |
| 8677 | 832 | char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop); |
| 8061 | 833 | |
|
17388
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
834 | /** |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
835 | * Setup formatting for an imhtml depending on the flags specified. |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
836 | * |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
837 | * @param imhtml The GTK+ IM/HTML. |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
838 | * @param flags The connection flag which describes the allowed types of formatting. |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
839 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
840 | * @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
|
841 | */ |
|
8be39f0de528
Allow formatted text in the pounce dialog. Also, use the same code to
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16385
diff
changeset
|
842 | 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
|
843 | |
|
23366
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
844 | /** |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
845 | * Create a new GtkIMHtmlSmiley. |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
846 | * |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
847 | * @param file The image file for the smiley |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
848 | * @param shortcut The key shortcut for the smiley |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
849 | * @param hide @c TRUE if the smiley should be hidden in the smiley dialog, @c FALSE otherwise |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
850 | * @param flags The smiley flags |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
851 | * |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
852 | * @return The newly created smiley |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
853 | * @since 2.5.0 |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
854 | */ |
|
22655
718f1149a81c
Introduce API for GtkIMHtmlSmiley. Use this to prevent leaking remote custom emoticons.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22003
diff
changeset
|
855 | GtkIMHtmlSmiley *gtk_imhtml_smiley_create(const char *file, const char *shortcut, gboolean hide, |
|
718f1149a81c
Introduce API for GtkIMHtmlSmiley. Use this to prevent leaking remote custom emoticons.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22003
diff
changeset
|
856 | GtkIMHtmlSmileyFlags flags); |
|
718f1149a81c
Introduce API for GtkIMHtmlSmiley. Use this to prevent leaking remote custom emoticons.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22003
diff
changeset
|
857 | |
|
23366
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
858 | /** |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
859 | * Reload the image data for the smiley. |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
860 | * |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
861 | * @param smiley The smiley to reload |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
862 | * |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
863 | * @since 2.5.0 |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
864 | */ |
|
22655
718f1149a81c
Introduce API for GtkIMHtmlSmiley. Use this to prevent leaking remote custom emoticons.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22003
diff
changeset
|
865 | void gtk_imhtml_smiley_reload(GtkIMHtmlSmiley *smiley); |
|
718f1149a81c
Introduce API for GtkIMHtmlSmiley. Use this to prevent leaking remote custom emoticons.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22003
diff
changeset
|
866 | |
|
23366
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
867 | /** |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
868 | * Destroy a GtkIMHtmlSmiley. |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
869 | * |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
870 | * @param smiley The smiley to destroy |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
871 | * |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
872 | * @since 2.5.0 |
|
8dc4fd250a6e
Add documentation for some new API.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23311
diff
changeset
|
873 | */ |
|
22655
718f1149a81c
Introduce API for GtkIMHtmlSmiley. Use this to prevent leaking remote custom emoticons.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22003
diff
changeset
|
874 | void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley); |
|
24674
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
875 | |
|
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
876 | /** |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
877 | * Register a protocol with the GtkIMHtml widget. Registering a protocol would |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
878 | * allow certain text to be clickable. |
|
24674
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
879 | * |
|
25008
f52b9372eb19
Revert the URL scheme passing changes, keeping the miscellaneous other stuff
Richard Laager <rlaager@pidgin.im>
parents:
25007
diff
changeset
|
880 | * @param name The name of the protocol (e.g. http://) |
|
24674
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
881 | * @param activate The callback to trigger when the protocol text is clicked. |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
882 | * Removes any current protocol definition if @c NULL. The |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
883 | * callback should return @c TRUE if the link was activated |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
884 | * properly, @c FALSE otherwise. |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
885 | * @param context_menu The callback to trigger when the context menu is popped |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
886 | * up on the protocol text. The callback should return |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
887 | * @c TRUE if the request for context menu was processed |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
888 | * successfully, @c FALSE otherwise. |
|
24674
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
889 | * |
|
28423
c12dbb691b04
Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27123
diff
changeset
|
890 | * @return @c TRUE if the protocol was successfully registered (or unregistered, when \a activate is @c NULL) |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
891 | * |
|
24674
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
892 | * @since 2.6.0 |
|
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
893 | */ |
|
36bf974a7d78
Allow plugins to specify custom link types to the GtkIMHtml widget.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24569
diff
changeset
|
894 | gboolean gtk_imhtml_class_register_protocol(const char *name, |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
895 | gboolean (*activate)(GtkIMHtml *imhtml, GtkIMHtmlLink *link), |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
896 | gboolean (*context_menu)(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu)); |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
897 | |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
898 | /** |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
899 | * Get the URL associated with a link. This should be used by the IMHtml protocol-callbacks. |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
900 | * |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
901 | * @param link The GtkIMHtmlLink object sent to the callback functions |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
902 | * |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
903 | * @return The URL |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
904 | * |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
905 | * @since 2.6.0 |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
906 | */ |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
907 | const char *gtk_imhtml_link_get_url(GtkIMHtmlLink *link); |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
908 | |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
909 | /** |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
910 | * Get the GtkTextTag object (if any) associated with a particular link. |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
911 | * |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
912 | * @param link The GtkIMHtmlLink object sent to the callback functions |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
913 | * |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
914 | * @return The GtkTextTag object, or @c NULL |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
915 | * |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
916 | * @since 2.6.0 |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
917 | */ |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
918 | const GtkTextTag *gtk_imhtml_link_get_text_tag(GtkIMHtmlLink *link); |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
919 | |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
920 | /** |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
921 | * Activates a GtkIMHtmlLink object. This triggers the 'url-clicked' signal, marks the |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
922 | * link as visited (when possible). |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
923 | * |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
924 | * @param link The GtkIMHtmlLink object sent to the callback functions |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
925 | * |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
926 | * @return @c TRUE if 'url-clicked' signal was emitted, @c FALSE otherwise. |
|
25885
5b5e2ca316b2
Add @since 2.6.0 doxygen comments to some of our new functions, and
Mark Doliner <markdoliner@pidgin.im>
parents:
25008
diff
changeset
|
927 | * |
|
24698
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
928 | * @since 2.6.0 |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
929 | */ |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
930 | gboolean gtk_imhtml_link_activate(GtkIMHtmlLink *link); |
|
f9dd7117ade0
Clean up some crufts. I think this is now mergeable with .next.minor.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24674
diff
changeset
|
931 | |
|
25900
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
932 | /** |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
933 | * By default this widget intercepts presses of the "return" key and |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
934 | * emits the "message_send" signal instead. If you don't want this |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
935 | * behavior, and you want the standard GtkTextView behavior of |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
936 | * inserting a newline into the buffer, then call this function. |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
937 | * |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
938 | * @param imhtml The GtkIMHtml where you want the "return" key to add |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
939 | * newline and not emit the "message_send" signal. |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
940 | */ |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
941 | void gtk_imhtml_set_return_inserts_newline(GtkIMHtml *imhtml); |
|
0be61f1b3dd1
Add a GtkIMHtml function that causes the widget to actually insert a
Mark Doliner <markdoliner@pidgin.im>
parents:
25885
diff
changeset
|
942 | |
|
27032
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
943 | /** |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
944 | * By default this widget populates the PRIMARY clipboard with any selected |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
945 | * text (as you would expect). For scenarios (e.g. select-on-focus) where this |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
946 | * would be problematic, this function can disable the PRIMARY population. |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
947 | * |
|
27039
9bc89c7c3aee
Changelog the GtkIMHtml PRIMARY clipboard API addition and fix a typo in
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27032
diff
changeset
|
948 | * @param imhtml The GtkIMHtml to enable/disable populating PRIMARY |
|
27032
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
949 | * @param populate enable/disable PRIMARY population |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
950 | */ |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
951 | void gtk_imhtml_set_populate_primary_clipboard(GtkIMHtml *imhtml, gboolean populate); |
|
991e2899be82
Avoid overwriting the PRIMARY clipboard when we select-on-focus the status text for easy editing. Fixes #8781.
Daniel Atallah <datallah@pidgin.im>
parents:
26818
diff
changeset
|
952 | |
| 9033 | 953 | /*@}*/ |
| 954 | ||
| 1428 | 955 | #ifdef __cplusplus |
| 956 | } | |
| 957 | #endif | |
| 958 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
959 | #endif /* _PIDGINIMHTML_H_ */ |