pidgin: gtkimhtml.h Source File

pidgin 2.14.4

Loading...
Searching...
No Matches
gtkimhtml.h
Go to the documentation of this file.
1
7/* Pidgin is the legal property of its developers, whose names are too numerous
8 * to list here. Please refer to the COPYRIGHT file distributed with this
9 * source distribution.
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
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 */
25#ifndef _PIDGINIMHTML_H_
26#define _PIDGINIMHTML_H_
27
28#include <gdk/gdk.h>
29#include <gtk/gtk.h>
30#include "gtksourceundomanager.h"
31
32#include "connection.h"
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/**************************************************************************
39 * @name Structures
40 **************************************************************************/
43#define GTK_TYPE_IMHTML (gtk_imhtml_get_type())
44#define GTK_IMHTML(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_IMHTML, GtkIMHtml))
45#define GTK_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass))
46#define GTK_IS_IMHTML(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_IMHTML))
47#define GTK_IS_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_IMHTML))
48#define GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj)
49#define GTK_IMHTML_ANIMATION(obj) ((GtkIMHtmlAnimation *)obj)
50
51typedef struct _GtkIMHtml GtkIMHtml;
52typedef struct _GtkIMHtmlClass GtkIMHtmlClass;
53#if !(defined PIDGIN_DISABLE_DEPRECATED) && !(defined _PIDGIN_GTKIMHTML_C_)
54typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */
55#endif
56typedef struct _GtkSmileyTree GtkSmileyTree;
57typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley;
58typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable;
59typedef struct _GtkIMHtmlImage GtkIMHtmlImage;
60typedef struct _GtkIMHtmlAnimation GtkIMHtmlAnimation;
61typedef struct _GtkIMHtmlHr GtkIMHtmlHr;
62typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs;
63
67 typedef struct _GtkIMHtmlLink GtkIMHtmlLink;
68
69 typedef enum {
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,
85 GTK_IMHTML_CUSTOM_SMILEY = 1 << 14,
86 GTK_IMHTML_ALL = -1
87} GtkIMHtmlButtons;
88
89typedef enum {
90 GTK_IMHTML_SMILEY_CUSTOM = 1 << 0
91} GtkIMHtmlSmileyFlags;
92
93 struct _GtkIMHtml {
94 GtkTextView text_view;
95 GtkTextBuffer *text_buffer;
96 GdkCursor *hand_cursor;
97 GdkCursor *arrow_cursor;
98 GdkCursor *text_cursor;
99 GHashTable *smiley_data;
100 GtkSmileyTree *default_smilies;
101 char *protocol_name;
102 guint scroll_src;
103 GTimer *scroll_time;
104 GQueue *animations;
105 int num_animations;
106
107 gboolean show_comments;
108
109 GtkWidget *tip_window;
110 char *tip;
111 guint tip_timer;
112 GtkTextTag *prelit_tag;
113
114 GList *scalables;
115 GdkRectangle old_rect;
116
117 gchar *search_string;
118
119 gboolean editable;
120 GtkIMHtmlButtons format_functions;
121 gboolean wbfo; /* Whole buffer formatting only. */
122
123 gint insert_offset;
124
125 struct {
126 gboolean bold:1;
127 gboolean italic:1;
128 gboolean underline:1;
129 gboolean strike:1;
130 gchar *forecolor;
131 gchar *backcolor;
132 gchar *background;
133 gchar *fontface;
134 int fontsize;
135 GtkTextTag *link;
136 } edit;
137
138#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKIMHTML_C_)
140 char *clipboard_text_string;
142 char *clipboard_html_string;
143#else
144 char *depr1;
145 char *depr2;
146#endif
147
148 GSList *im_images;
149 GtkIMHtmlFuncs *funcs;
150 GtkSourceUndoManager *undo_manager;
151};
152
153 struct _GtkIMHtmlClass {
154 GtkTextViewClass parent_class;
155
156 void (*url_clicked)(GtkIMHtml *, const gchar *);
157 void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons);
158 void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons);
159 void (*clear_format)(GtkIMHtml *);
160 void (*update_format)(GtkIMHtml *);
161 gboolean (*message_send)(GtkIMHtml *);
162 void (*undo)(GtkIMHtml *);
163 void (*redo)(GtkIMHtml *);
164 GList *protocols; /* List of GtkIMHtmlProtocol's */
165};
166
167#if !(defined PIDGIN_DISABLE_DEPRECATED) && !(defined _PIDGIN_GTKIMHTML_C_)
169 struct _GtkIMHtmlFontDetail {
170 gushort size;
171 gchar *face;
172 gchar *fore;
173 gchar *back;
174 gchar *bg;
175 gchar *sml;
176 gboolean underline;
177 gshort bold;
178};
179#endif
180
181 struct _GtkSmileyTree {
182 GString *values;
183 GtkSmileyTree **children;
184 GtkIMHtmlSmiley *image;
185};
186
187 struct _GtkIMHtmlSmiley {
188 gchar *smile;
189 gchar *file;
190 GdkPixbufAnimation *icon;
191 gboolean hidden;
192 GdkPixbufLoader *loader;
193 GSList *anchors;
194 GtkIMHtmlSmileyFlags flags;
195 GtkIMHtml *imhtml;
196 gpointer data;
197 gsize datasize;
198};
199
200 struct _GtkIMHtmlScalable {
201 void (*scale)(struct _GtkIMHtmlScalable *, int, int);
202 void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *);
203 void (*free)(struct _GtkIMHtmlScalable *);
204};
205
206 struct _GtkIMHtmlImage {
207 GtkIMHtmlScalable scalable;
208 GtkImage *image;
209 GdkPixbuf *pixbuf;
210 GtkTextMark *mark;
211 gchar *filename;
212 int width;
213 int height;
214 int id;
215 GtkWidget *filesel;
216};
217
218 struct _GtkIMHtmlAnimation {
219 GtkIMHtmlImage imhtmlimage;
220 GdkPixbufAnimation *anim;
221 GdkPixbufAnimationIter *iter;
222 guint timer;
223};
224
225 struct _GtkIMHtmlHr {
226 GtkIMHtmlScalable scalable;
227 GtkWidget *sep;
228};
229
230typedef enum {
231 GTK_IMHTML_NO_COLOURS = 1 << 0,
232 GTK_IMHTML_NO_FONTS = 1 << 1,
233 GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */
234 GTK_IMHTML_NO_TITLE = 1 << 3,
235 GTK_IMHTML_NO_NEWLINE = 1 << 4,
236 GTK_IMHTML_NO_SIZES = 1 << 5,
237 GTK_IMHTML_NO_SCROLL = 1 << 6,
238 GTK_IMHTML_RETURN_LOG = 1 << 7,
239 GTK_IMHTML_USE_POINTSIZE = 1 << 8,
240 GTK_IMHTML_NO_FORMATTING = 1 << 9,
241 GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10,
242 GTK_IMHTML_NO_SMILEY = 1 << 11
243} GtkIMHtmlOptions;
244
245enum {
246 GTK_IMHTML_DRAG_URL = 0,
247 GTK_IMHTML_DRAG_HTML,
248 GTK_IMHTML_DRAG_UTF8_STRING,
249 GTK_IMHTML_DRAG_COMPOUND_TEXT,
250 GTK_IMHTML_DRAG_STRING,
251 GTK_IMHTML_DRAG_TEXT,
252 GTK_IMHTML_DRAG_NUM
253};
254
255#define GTK_IMHTML_DND_TARGETS \
256 { "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \
257 { "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \
258 { "text/html", 0, GTK_IMHTML_DRAG_HTML }, \
259 { "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \
260 { "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \
261 { "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \
262 { "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \
263 { "STRING", 0, GTK_IMHTML_DRAG_STRING }, \
264 { "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \
265 { "TEXT", 0, GTK_IMHTML_DRAG_TEXT }
266
267typedef gpointer (*GtkIMHtmlGetImageFunc) (int id);
268typedef gpointer (*GtkIMHtmlGetImageDataFunc) (gpointer i);
269typedef size_t (*GtkIMHtmlGetImageSizeFunc) (gpointer i);
270typedef const char *(*GtkIMHtmlGetImageFilenameFunc)(gpointer i);
271typedef void (*GtkIMHtmlImageRefFunc) (int id);
272typedef void (*GtkIMHtmlImageUnrefFunc) (int id);
273
274 struct _GtkIMHtmlFuncs {
275 GtkIMHtmlGetImageFunc image_get;
276 GtkIMHtmlGetImageDataFunc image_get_data;
277 GtkIMHtmlGetImageSizeFunc image_get_size;
278 GtkIMHtmlGetImageFilenameFunc image_get_filename;
279 GtkIMHtmlImageRefFunc image_ref;
280 GtkIMHtmlImageUnrefFunc image_unref;
281};
282
285/**************************************************************************
286 * @name GTK+ IM/HTML rendering component API
287 **************************************************************************/
295GType gtk_imhtml_get_type(void);
296
302GtkWidget *gtk_imhtml_new(void *, void *);
303
312 GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml,
313 const gchar * sml, const gchar * text);
314
315
323 void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley);
324
330 void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml);
331
338 void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f);
339
346 void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show);
347
353 const char *gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml);
354
361 void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name);
362
370#define gtk_imhtml_append_text(imhtml, text, options) \
371 gtk_imhtml_append_text_with_images(imhtml, text, options, NULL)
372
381 void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml,
382 const gchar *text,
383 GtkIMHtmlOptions options,
384 GSList *unused);
385
394 void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml,
395 const gchar *text,
396 GtkIMHtmlOptions options,
397 GtkTextIter *iter);
398
405 void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth);
406
414 void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end);
415
421#define gtk_imhtml_clear(imhtml) \
422 gtk_imhtml_delete(imhtml, NULL, NULL)
423
429 void gtk_imhtml_page_up(GtkIMHtml *imhtml);
430
436 void gtk_imhtml_page_down(GtkIMHtml *imhtml);
437
443 GtkIMHtmlScalable *gtk_imhtml_scalable_new(void);
444
454 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id);
455
468/*
469 * TODO: All this animation code could be combined much better with
470 * the image code. It couldn't be done when it was written
471 * because it requires breaking backward compatibility. It
472 * would be good to do it for 3.0.0.
473 */
474 GtkIMHtmlScalable *gtk_imhtml_animation_new(GdkPixbufAnimation *img, const gchar *filename, int id);
475
481/* TODO: Is there any reason this isn't private? */
482 void gtk_imhtml_image_free(GtkIMHtmlScalable *scale);
483
489/* TODO: Is there any reason this isn't private? */
490 void gtk_imhtml_animation_free(GtkIMHtmlScalable *scale);
491
499/* TODO: Is there any reason this isn't private? */
500 void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height);
501
509/* TODO: Is there any reason this isn't private? */
510 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter);
511
517 GtkIMHtmlScalable *gtk_imhtml_hr_new(void);
518
524 void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale);
525
533 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height);
534
543 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter);
544
553gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text);
554
560 void gtk_imhtml_search_clear(GtkIMHtml *imhtml);
561
568 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable);
569
578 void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo);
579
586 void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons);
587
595 GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml);
596
606 void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline);
607
616 char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml);
617
626 char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml);
627
636 char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml);
637
646 char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml);
647
656gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml);
657
665gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml);
666
672 void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml);
673
679 void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml);
680
686 void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml);
687
693 void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml);
694
700 void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml);
701
711gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color);
712
722gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color);
723
733gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color);
734
743gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face);
744
752 void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url);
753
762 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text);
763
771 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley);
780 void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter);
781
790 void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter);
791
798 void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size);
799
806 void gtk_imhtml_font_shrink(GtkIMHtml *imhtml);
807
814 void gtk_imhtml_font_grow(GtkIMHtml *imhtml);
815
825 char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end);
826
834 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml);
835
844 char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml);
845
856 char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop);
857
866 void gtk_imhtml_setup_entry(GtkIMHtml *imhtml, PurpleConnectionFlags flags);
867
879 GtkIMHtmlSmiley *gtk_imhtml_smiley_create(const char *file, const char *shortcut, gboolean hide,
880 GtkIMHtmlSmileyFlags flags);
881
889 void gtk_imhtml_smiley_reload(GtkIMHtmlSmiley *smiley);
890
898 void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley);
899
918gboolean gtk_imhtml_class_register_protocol(const char *name,
919 gboolean (*activate)(GtkIMHtml *imhtml, GtkIMHtmlLink *link),
920 gboolean (*context_menu)(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu));
921
931 const char *gtk_imhtml_link_get_url(GtkIMHtmlLink *link);
932
942 const GtkTextTag *gtk_imhtml_link_get_text_tag(GtkIMHtmlLink *link);
943
954gboolean gtk_imhtml_link_activate(GtkIMHtmlLink *link);
955
965 void gtk_imhtml_set_return_inserts_newline(GtkIMHtml *imhtml);
966
975 void gtk_imhtml_set_populate_primary_clipboard(GtkIMHtml *imhtml, gboolean populate);
976
979#ifdef __cplusplus
980}
981#endif
982
983#endif /* _PIDGINIMHTML_H_ */
connection.h
Connection API.
PurpleConnectionFlags
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
Definition: connection.h:37
gtk_imhtml_get_markup
char * gtk_imhtml_get_markup(GtkIMHtml *imhtml)
Returns the entire HTML formatted contents of a GTK+ IM/HTML.
gtk_imhtml_font_set_size
void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size)
Sets the font size at the current location or selection in a GTK+ IM/HTML.
gtk_imhtml_class_register_protocol
gboolean gtk_imhtml_class_register_protocol(const char *name, gboolean(*activate)(GtkIMHtml *imhtml, GtkIMHtmlLink *link), gboolean(*context_menu)(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu))
Register a protocol with the GtkIMHtml widget.
gtk_imhtml_get_editable
gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml)
Checks whether a GTK+ IM/HTML is marked as editable.
gtk_imhtml_get_current_fontface
char * gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml)
Returns a string containing the selected font face at the current position in a GTK+ IM/HTML.
gtk_imhtml_search_clear
void gtk_imhtml_search_clear(GtkIMHtml *imhtml)
Clears the highlighting from a prior search in a GTK+ IM/HTML.
gtk_imhtml_setup_entry
void gtk_imhtml_setup_entry(GtkIMHtml *imhtml, PurpleConnectionFlags flags)
Setup formatting for an imhtml depending on the flags specified.
gtk_imhtml_append_text_with_images
void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, const gchar *text, GtkIMHtmlOptions options, GSList *unused)
Appends HTML formatted text to a GTK+ IM/HTML.
gtk_imhtml_animation_free
void gtk_imhtml_animation_free(GtkIMHtmlScalable *scale)
Destroys and frees a GTK+ IM/HTML scalable animation.
gtk_imhtml_new
GtkWidget * gtk_imhtml_new(void *, void *)
Creates and returns a new GTK+ IM/HTML widget.
gtk_imhtml_hr_new
GtkIMHtmlScalable * gtk_imhtml_hr_new(void)
Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule.
gtk_imhtml_get_current_fontsize
gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml)
Returns a integer containing the selected HTML font size at the current position in a GTK+ IM/HTML.
gtk_imhtml_get_format_functions
GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml)
Returns which formatting functions are enabled in a GTK+ IM/HTML.
GtkIMHtmlButtons
GtkIMHtmlButtons
Definition: gtkimhtml.h:69
GTK_IMHTML_CUSTOM_SMILEY
@ GTK_IMHTML_CUSTOM_SMILEY
Show custom smileys when appropriate.
Definition: gtkimhtml.h:85
gtk_imhtml_get_type
GType gtk_imhtml_get_type(void)
Returns the GType object for an IM/HTML widget.
gtk_imhtml_toggle_underline
void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml)
Toggles underline at the cursor location or selection in a GTK+ IM/HTML.
gtk_imhtml_set_editable
void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable)
Enables or disables editing in a GTK+ IM/HTML.
gtk_imhtml_scalable_new
GtkIMHtmlScalable * gtk_imhtml_scalable_new(void)
Creates and returns an new GTK+ IM/HTML scalable object.
gtk_imhtml_get_protocol_name
const char * gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml)
Gets the protocol name associated with this GTK+ IM/HTML.
gtk_imhtml_font_grow
void gtk_imhtml_font_grow(GtkIMHtml *imhtml)
Increases the font size by 1 at the current location or selection in a GTK IM/HTML.
gtk_imhtml_get_current_backcolor
char * gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml)
Returns a string containing the selected font background color at the current position in a GTK+ IM/H...
gtk_imhtml_toggle_fontface
gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face)
Toggles a font face at the current location or selection in a GTK+ IM/HTML.
gtk_imhtml_set_return_inserts_newline
void gtk_imhtml_set_return_inserts_newline(GtkIMHtml *imhtml)
By default this widget intercepts presses of the "return" key and emits the "message_send" signal ins...
gtk_imhtml_clear_formatting
void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml)
Clear all the formatting on a GTK+ IM/HTML.
gtk_imhtml_image_free
void gtk_imhtml_image_free(GtkIMHtmlScalable *scale)
Destroys and frees a GTK+ IM/HTML scalable image.
gtk_imhtml_get_markup_lines
char ** gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml)
Returns a null terminated array of pointers to null terminated strings, each string for each line.
gtk_imhtml_link_get_url
const char * gtk_imhtml_link_get_url(GtkIMHtmlLink *link)
Get the URL associated with a link.
gtk_imhtml_hr_add_to
void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter)
Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at a given iter.
gtk_imhtml_image_new
GtkIMHtmlScalable * gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id)
Creates and returns a new GTK+ IM/HTML scalable object with an image.
gtk_imhtml_insert_html_at_iter
void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, const gchar *text, GtkIMHtmlOptions options, GtkTextIter *iter)
Inserts HTML formatted text to a GTK+ IM/HTML at a given iter.
gtk_imhtml_insert_image_at_iter
void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter)
Inserts the IM/HTML scalable image with the given id at the given iter in a GTK+ IM/HTML.
gtk_imhtml_get_current_background
char * gtk_imhtml_get_current_background(GtkIMHtml *imhtml)
Returns a string containing the selected background color at the current position in a GTK+ IM/HTML.
gtk_imhtml_insert_smiley_at_iter
void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter)
Inserts a smiley at the given iter in a GTK+ IM/HTML.
GtkIMHtmlLink
struct _GtkIMHtmlLink GtkIMHtmlLink
Definition: gtkimhtml.h:67
gtk_imhtml_remove_smileys
void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml)
Removes all smileys associated with a GTK+ IM/HTML.
gtk_imhtml_page_down
void gtk_imhtml_page_down(GtkIMHtml *imhtml)
Scrolls a GTK+ IM/HTML down by one page.
gtk_imhtml_scroll_to_end
void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth)
Scrolls a GTK+ IM/HTML to the end of its contents.
gtk_imhtml_get_current_forecolor
char * gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml)
Returns a string containing the selected foreground color at the current position in a GTK+ IM/HTML.
gtk_imhtml_associate_smiley
void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley)
Associates a smiley with a GTK+ IM/HTML.
gtk_imhtml_toggle_italic
void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml)
Toggles italic at the cursor location or selection in a GTK+ IM/HTML.
gtk_imhtml_toggle_bold
void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml)
Toggles bold at the cursor location or selection in a GTK+ IM/HTML.
gtk_imhtml_get_markup_range
char * gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end)
Returns the HTML formatted contents between two iters in a GTK+ IM/HTML.
gtk_imhtml_link_get_text_tag
const GtkTextTag * gtk_imhtml_link_get_text_tag(GtkIMHtmlLink *link)
Get the GtkTextTag object (if any) associated with a particular link.
gtk_imhtml_toggle_strike
void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml)
Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML.
gtk_imhtml_set_protocol_name
void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name)
Associates a protocol name with a GTK+ IM/HTML.
gtk_imhtml_insert_link
void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text)
Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML.
gtk_imhtml_set_populate_primary_clipboard
void gtk_imhtml_set_populate_primary_clipboard(GtkIMHtml *imhtml, gboolean populate)
By default this widget populates the PRIMARY clipboard with any selected text (as you would expect).
gtk_imhtml_toggle_link
void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url)
Toggles a link tag with the given URL at the current location or selection in a GTK+ IM/HTML.
gtk_imhtml_hr_free
void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale)
Destroys and frees a GTK+ IM/HTML scalable horizontal rule.
gtk_imhtml_show_comments
void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show)
Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML.
gtk_imhtml_delete
void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end)
Delete the contents of a GTK+ IM/HTML between start and end.
gtk_imhtml_image_add_to
void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter)
Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter.
gtk_imhtml_smiley_create
GtkIMHtmlSmiley * gtk_imhtml_smiley_create(const char *file, const char *shortcut, gboolean hide, GtkIMHtmlSmileyFlags flags)
Create a new GtkIMHtmlSmiley.
gtk_imhtml_insert_smiley
void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley)
Inserts a smiley at the current location or selection in a GTK+ IM/HTML.
gtk_imhtml_link_activate
gboolean gtk_imhtml_link_activate(GtkIMHtmlLink *link)
Activates a GtkIMHtmlLink object.
gtk_imhtml_smiley_reload
void gtk_imhtml_smiley_reload(GtkIMHtmlSmiley *smiley)
Reload the image data for the smiley.
gtk_imhtml_set_format_functions
void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons)
Indicates which formatting functions to enable and disable in a GTK+ IM/HTML.
gtk_imhtml_toggle_background
gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color)
Toggles a background color at the current location or selection in a GTK IM/HTML.
gtk_imhtml_page_up
void gtk_imhtml_page_up(GtkIMHtml *imhtml)
Scrolls a GTK+ IM/HTML up by one page.
gtk_imhtml_font_shrink
void gtk_imhtml_font_shrink(GtkIMHtml *imhtml)
Decreases the font size by 1 at the current location or selection in a GTK IM/HTML.
gtk_imhtml_get_text
char * gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop)
Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML between two iters in a GTK+ IM...
gtk_imhtml_smiley_get
GtkIMHtmlSmiley * gtk_imhtml_smiley_get(GtkIMHtml *imhtml, const gchar *sml, const gchar *text)
Returns the smiley object associated with the text.
gtk_imhtml_image_scale
void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height)
Rescales a GTK+ IM/HTML scalable image to a given size.
gtk_imhtml_animation_new
GtkIMHtmlScalable * gtk_imhtml_animation_new(GdkPixbufAnimation *img, const gchar *filename, int id)
Creates and returns a new GTK+ IM/HTML scalable object with an animated image.
gtk_imhtml_hr_scale
void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height)
Rescales a GTK+ IM/HTML scalable horizontal rule to a given size.
gtk_imhtml_set_whole_buffer_formatting_only
void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo)
Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML.
gtk_imhtml_set_funcs
void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f)
Sets the function callbacks to use with a GTK+ IM/HTML instance.
gtk_imhtml_get_current_format
void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline)
Sets each boolean to TRUE or FALSE to indicate if that formatting option is enabled at the current po...
gtk_imhtml_search_find
gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text)
Finds and highlights a given string in a GTK+ IM/HTML.
gtk_imhtml_toggle_forecolor
gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color)
Toggles a foreground color at the current location or selection in a GTK IM/HTML.
gtk_imhtml_toggle_backcolor
gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color)
Toggles a background color at the current location or selection in a GTK IM/HTML.
gtk_imhtml_smiley_destroy
void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley)
Destroy a GtkIMHtmlSmiley.
_GtkIMHtmlAnimation
Definition: gtkimhtml.h:218
_GtkIMHtmlAnimation::anim
GdkPixbufAnimation * anim
The original animation, before any scaling.
Definition: gtkimhtml.h:220
_GtkIMHtmlClass
Definition: gtkimhtml.h:153
_GtkIMHtmlFontDetail
Definition: gtkimhtml.h:169
_GtkIMHtmlFuncs
Definition: gtkimhtml.h:274
_GtkIMHtmlHr
Definition: gtkimhtml.h:225
_GtkIMHtmlImage
Definition: gtkimhtml.h:206
_GtkIMHtmlImage::image
GtkImage * image
Contains the scaled version of this pixbuf.
Definition: gtkimhtml.h:208
_GtkIMHtmlImage::pixbuf
GdkPixbuf * pixbuf
The original pixbuf, before any scaling.
Definition: gtkimhtml.h:209
_GtkIMHtmlScalable
Definition: gtkimhtml.h:200
_GtkIMHtmlSmiley
Definition: gtkimhtml.h:187
_GtkIMHtmlSmiley::datasize
gsize datasize
Definition: gtkimhtml.h:197
_GtkIMHtml
Definition: gtkimhtml.h:93
_GtkIMHtml::clipboard_text_string
char * clipboard_text_string
Definition: gtkimhtml.h:140
_GtkIMHtml::clipboard_html_string
char * clipboard_html_string
Definition: gtkimhtml.h:142
_GtkSmileyTree
Definition: gtkimhtml.h:181
_GtkSourceUndoManager
Definition: gtksourceundomanager.h:45