annotate src/gtkimhtml.h @ 8714:a36f02de8d60

[gaim-migrate @ 9468] spelling committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 19 Apr 2004 21:40:57 +0000
parents b3eae94bd560
children 7024b9145357
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5034
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5012
diff changeset
1 /**
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
2 * @file gtkimhtml.h GTK+ IM/HTML rendering component
5034
4691c5936c01 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5012
diff changeset
3 * @ingroup gtkui
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7988
diff changeset
5 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7988
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7988
diff changeset
7 * source distribution.
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 *
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 * under the terms of the GNU General Public License as published by
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 * (at your option) any later version.
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 *
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 * GNU General Public License for more details.
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 *
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 */
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 #ifndef __GTK_IMHTML_H
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 #define __GTK_IMHTML_H
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 #include <gdk/gdk.h>
3922
30f52e7afd1d [gaim-migrate @ 4094]
Sean Egan <seanegan@gmail.com>
parents: 3867
diff changeset
28 #include <gtk/gtktextview.h>
4735
66c2388046fb [gaim-migrate @ 5050]
Sean Egan <seanegan@gmail.com>
parents: 4371
diff changeset
29 #include <gtk/gtktooltips.h>
5012
3ee1b1409660 [gaim-migrate @ 5348]
Nathan Walp <nwalp@pidgin.im>
parents: 4947
diff changeset
30 #include <gtk/gtkimage.h>
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 #ifdef __cplusplus
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 extern "C" {
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 #endif
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 #define GTK_TYPE_IMHTML (gtk_imhtml_get_type ())
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 #define GTK_IMHTML(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml))
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 #define GTK_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass))
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 #define GTK_IS_IMHTML(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML))
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 #define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML))
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
41 #define GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj)
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
43 typedef struct _GtkIMHtml GtkIMHtml;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
44 typedef struct _GtkIMHtmlClass GtkIMHtmlClass;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
45 typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
46 typedef struct _GtkSmileyTree GtkSmileyTree;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
47 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
48 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
49 typedef struct _GtkIMHtmlImage GtkIMHtmlImage;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
50 typedef struct _GtkIMHtmlHr GtkIMHtmlHr;
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
51
8420
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
52 typedef enum {
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
53 GTK_IMHTML_BOLD = 1 << 0,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
54 GTK_IMHTML_ITALIC = 1 << 1,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
55 GTK_IMHTML_UNDERLINE = 1 << 2,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
56 GTK_IMHTML_GROW = 1 << 3,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
57 GTK_IMHTML_SHRINK = 1 << 4,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
58 GTK_IMHTML_FACE = 1 << 5,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
59 GTK_IMHTML_FORECOLOR = 1 << 6,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
60 GTK_IMHTML_BACKCOLOR = 1 << 7,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
61 GTK_IMHTML_LINK = 1 << 8,
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
62 GTK_IMHTML_IMAGE = 1 << 9,
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
63 GTK_IMHTML_SMILEY = 1 << 10,
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
64 GTK_IMHTML_ALL = -1
8420
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
65 } GtkIMHtmlButtons;
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
66
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67 struct _GtkIMHtml {
3922
30f52e7afd1d [gaim-migrate @ 4094]
Sean Egan <seanegan@gmail.com>
parents: 3867
diff changeset
68 GtkTextView text_view;
30f52e7afd1d [gaim-migrate @ 4094]
Sean Egan <seanegan@gmail.com>
parents: 3867
diff changeset
69 GtkTextBuffer *text_buffer;
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
70 GtkTextMark *scrollpoint;
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
71 GdkCursor *hand_cursor;
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72 GdkCursor *arrow_cursor;
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
73 GdkCursor *text_cursor;
4032
2b3a9d8f168e [gaim-migrate @ 4238]
Sean Egan <seanegan@gmail.com>
parents: 3922
diff changeset
74 GHashTable *smiley_data;
2b3a9d8f168e [gaim-migrate @ 4238]
Sean Egan <seanegan@gmail.com>
parents: 3922
diff changeset
75 GtkSmileyTree *default_smilies;
8456
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
76 char *protocol_name;
4254
e9f243406a3d [gaim-migrate @ 4505]
Sean Egan <seanegan@gmail.com>
parents: 4046
diff changeset
77
e9f243406a3d [gaim-migrate @ 4505]
Sean Egan <seanegan@gmail.com>
parents: 4046
diff changeset
78 gboolean show_smileys;
6124
16fd7811effd [gaim-migrate @ 6598]
Mark Doliner <mark@kingant.net>
parents: 6066
diff changeset
79 gboolean show_comments;
4735
66c2388046fb [gaim-migrate @ 5050]
Sean Egan <seanegan@gmail.com>
parents: 4371
diff changeset
80
8456
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
81 gboolean html_shortcuts;
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
82 gboolean smiley_shortcuts;
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
83
4735
66c2388046fb [gaim-migrate @ 5050]
Sean Egan <seanegan@gmail.com>
parents: 4371
diff changeset
84 GtkWidget *tip_window;
66c2388046fb [gaim-migrate @ 5050]
Sean Egan <seanegan@gmail.com>
parents: 4371
diff changeset
85 char *tip;
66c2388046fb [gaim-migrate @ 5050]
Sean Egan <seanegan@gmail.com>
parents: 4371
diff changeset
86 guint tip_timer;
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
87
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
88 GList *scalables;
4947
24c9a23df63b [gaim-migrate @ 5281]
Sean Egan <seanegan@gmail.com>
parents: 4895
diff changeset
89 GdkRectangle old_rect;
7295
c7f0a4397d9e [gaim-migrate @ 7879]
Sean Egan <seanegan@gmail.com>
parents: 6982
diff changeset
90
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
91 gchar *search_string;
7694
6a9acef3b867 [gaim-migrate @ 8339]
Sean Egan <seanegan@gmail.com>
parents: 7346
diff changeset
92
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
93 gboolean editable;
8420
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
94 GtkIMHtmlButtons format_functions;
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
95 gboolean wbfo; /* Whole buffer formatting only. */
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
96
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
97 gint insert_offset;
8420
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
98
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
99 struct {
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
100 gboolean bold:1;
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
101 gboolean italic:1;
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
102 gboolean underline:1;
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
103 gchar *forecolor;
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
104 gchar *backcolor;
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
105 gchar *fontface;
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
106 int fontsize;
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
107 GtkTextTag *link;
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
108 } edit;
8681
e2e56231023c [gaim-migrate @ 9434]
Sean Egan <seanegan@gmail.com>
parents: 8677
diff changeset
109
e2e56231023c [gaim-migrate @ 9434]
Sean Egan <seanegan@gmail.com>
parents: 8677
diff changeset
110 char *clipboard_text_string;
e2e56231023c [gaim-migrate @ 9434]
Sean Egan <seanegan@gmail.com>
parents: 8677
diff changeset
111 char *clipboard_html_string;
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
112 };
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
113
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
114 struct _GtkIMHtmlClass {
3922
30f52e7afd1d [gaim-migrate @ 4094]
Sean Egan <seanegan@gmail.com>
parents: 3867
diff changeset
115 GtkTextViewClass parent_class;
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
117 void (*url_clicked)(GtkIMHtml *, const gchar *);
8420
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
118 void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons);
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
119 void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons);
8427
2e18099ded93 [gaim-migrate @ 9157]
Sean Egan <seanegan@gmail.com>
parents: 8420
diff changeset
120 void (*clear_format)(GtkIMHtml *);
8506
887c0259b47b [gaim-migrate @ 9242]
Luke Schierer <lschiere@pidgin.im>
parents: 8481
diff changeset
121 void (*update_format)(GtkIMHtml *);
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
122 };
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
123
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
124 struct _GtkIMHtmlFontDetail {
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
125 gushort size;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
126 gchar *face;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
127 gchar *fore;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
128 gchar *back;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
129 gchar *sml;
8689
b3eae94bd560 [gaim-migrate @ 9442]
Luke Schierer <lschiere@pidgin.im>
parents: 8688
diff changeset
130 gboolean underline;
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
131 };
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
132
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
133 struct _GtkSmileyTree {
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
134 GString *values;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
135 GtkSmileyTree **children;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
136 GtkIMHtmlSmiley *image;
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
137 };
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138
4263
74f65a3d2a1f [gaim-migrate @ 4514]
Sean Egan <seanegan@gmail.com>
parents: 4254
diff changeset
139 struct _GtkIMHtmlSmiley {
74f65a3d2a1f [gaim-migrate @ 4514]
Sean Egan <seanegan@gmail.com>
parents: 4254
diff changeset
140 gchar *smile;
74f65a3d2a1f [gaim-migrate @ 4514]
Sean Egan <seanegan@gmail.com>
parents: 4254
diff changeset
141 gchar *file;
6814
782907a6ae65 [gaim-migrate @ 7354]
Christian Hammond <chipx86@chipx86.com>
parents: 6282
diff changeset
142 GdkPixbufAnimation *icon;
4263
74f65a3d2a1f [gaim-migrate @ 4514]
Sean Egan <seanegan@gmail.com>
parents: 4254
diff changeset
143 gboolean hidden;
74f65a3d2a1f [gaim-migrate @ 4514]
Sean Egan <seanegan@gmail.com>
parents: 4254
diff changeset
144 };
74f65a3d2a1f [gaim-migrate @ 4514]
Sean Egan <seanegan@gmail.com>
parents: 4254
diff changeset
145
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
146 struct _GtkIMHtmlScalable {
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
147 void (*scale)(struct _GtkIMHtmlScalable *, int, int);
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
148 void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *);
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
149 void (*free)(struct _GtkIMHtmlScalable *);
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
150 };
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
151
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
152 struct _GtkIMHtmlImage {
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
153 GtkIMHtmlScalable scalable;
5012
3ee1b1409660 [gaim-migrate @ 5348]
Nathan Walp <nwalp@pidgin.im>
parents: 4947
diff changeset
154 GtkImage *image;
5046
44945824ba60 [gaim-migrate @ 5394]
Nathan Walp <nwalp@pidgin.im>
parents: 5034
diff changeset
155 GdkPixbuf *pixbuf;
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
156 GtkTextMark *mark;
5012
3ee1b1409660 [gaim-migrate @ 5348]
Nathan Walp <nwalp@pidgin.im>
parents: 4947
diff changeset
157 gchar *filename;
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
158 int width;
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
159 int height;
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
160 };
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
161
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
162 struct _GtkIMHtmlHr {
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
163 GtkIMHtmlScalable scalable;
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
164 GtkWidget *sep;
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
165 };
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
166
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
167 typedef enum {
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
168 GTK_IMHTML_NO_COLOURS = 1 << 0,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
169 GTK_IMHTML_NO_FONTS = 1 << 1,
8105
42c7227d6e4d [gaim-migrate @ 8805]
Mark Doliner <mark@kingant.net>
parents: 8061
diff changeset
170 GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
171 GTK_IMHTML_NO_TITLE = 1 << 3,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
172 GTK_IMHTML_NO_NEWLINE = 1 << 4,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
173 GTK_IMHTML_NO_SIZES = 1 << 5,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
174 GTK_IMHTML_NO_SCROLL = 1 << 6,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
175 GTK_IMHTML_RETURN_LOG = 1 << 7,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
176 GTK_IMHTML_USE_POINTSIZE = 1 << 8
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
177 } GtkIMHtmlOptions;
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
178
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
179 GtkType gtk_imhtml_get_type (void);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
180 GtkWidget* gtk_imhtml_new (void *, void *);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
181
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
182 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
183 GtkAdjustment *hadj,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
184 GtkAdjustment *vadj);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
185
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
186 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml,
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
187 gchar *sml, GtkIMHtmlSmiley *smiley);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
188
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
189 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
190
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
191 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, gboolean show);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
192
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
193 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, gboolean show);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
194
8456
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
195 void gtk_imhtml_html_shortcuts(GtkIMHtml *imhtml, gboolean allow);
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
196
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
197 void gtk_imhtml_smiley_shortcuts (GtkIMHtml *imhtml, gboolean allow);
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
198
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
199 void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, gchar *protocol_name);
5f8d4ab6d375 [gaim-migrate @ 9186]
Luke Schierer <lschiere@pidgin.im>
parents: 8427
diff changeset
200
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
201 #define gtk_imhtml_append_text(x, y, z) \
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
202 gtk_imhtml_append_text_with_images(x, y, z, NULL)
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
203
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
204 void gtk_imhtml_append_text_with_images (GtkIMHtml *imhtml,
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
205 const gchar *text,
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
206 GtkIMHtmlOptions options,
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
207 GSList *images);
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
208 void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml,
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
209 const gchar *text,
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
210 GtkIMHtmlOptions options,
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
211 GtkTextIter *iter);
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
212 void gtk_imhtml_clear (GtkIMHtml *imhtml);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
213 void gtk_imhtml_page_up (GtkIMHtml *imhtml);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
214 void gtk_imhtml_page_down (GtkIMHtml *imhtml);
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
215
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
216 GtkIMHtmlScalable *gtk_imhtml_scalable_new();
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6814
diff changeset
217 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename);
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
218 void gtk_imhtml_image_free(GtkIMHtmlScalable *);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
219 void gtk_imhtml_image_scale(GtkIMHtmlScalable *, int, int);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
220 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *);
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
221
5967
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
222 GtkIMHtmlScalable *gtk_imhtml_hr_new();
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
223 void gtk_imhtml_hr_free(GtkIMHtmlScalable *);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
224 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *, int, int);
156953fe3e14 [gaim-migrate @ 6414]
Mark Doliner <mark@kingant.net>
parents: 5537
diff changeset
225 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *);
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
226
7295
c7f0a4397d9e [gaim-migrate @ 7879]
Sean Egan <seanegan@gmail.com>
parents: 6982
diff changeset
227 /* Search functions */
c7f0a4397d9e [gaim-migrate @ 7879]
Sean Egan <seanegan@gmail.com>
parents: 6982
diff changeset
228 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text);
c7f0a4397d9e [gaim-migrate @ 7879]
Sean Egan <seanegan@gmail.com>
parents: 6982
diff changeset
229 void gtk_imhtml_search_clear(GtkIMHtml *imhtml);
4895
9e50494f63a1 [gaim-migrate @ 5227]
Nathan Walp <nwalp@pidgin.im>
parents: 4764
diff changeset
230
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
231 /* Editable stuff */
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
232 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable);
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
233 void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo);
8420
c25c697525b7 [gaim-migrate @ 9150]
Sean Egan <seanegan@gmail.com>
parents: 8105
diff changeset
234 void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons);
8516
5b25f72c4723 [gaim-migrate @ 9254]
Luke Schierer <lschiere@pidgin.im>
parents: 8506
diff changeset
235 void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline);
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
236 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
237 gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
238 gboolean gtk_imhtml_toggle_italic(GtkIMHtml *imhtml);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
239 gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
240 gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
241 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
242 gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face);
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
243 void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url);
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
244 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text);
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
245 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley);
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
246 void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter);
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
247 void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
248 void gtk_imhtml_font_shrink(GtkIMHtml *imhtml);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
249 void gtk_imhtml_font_grow(GtkIMHtml *imhtml);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
250 char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end);
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
251 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml);
8677
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
252 /* returns a null terminated array of pointers to null ternimated strings, each string for each line */
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
253 /* g_strfreev() should be called on it */
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
254 char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml);
cc2ce209cc46 [gaim-migrate @ 9430]
Sean Egan <seanegan@gmail.com>
parents: 8519
diff changeset
255 char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop);
8061
ea073d234191 [gaim-migrate @ 8749]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
256
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
257 #ifdef __cplusplus
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
258 }
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
259 #endif
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
260
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
261 #endif