Mercurial > pidgin
comparison src/gtkimhtml.h @ 1428:00b3d02a2168
[gaim-migrate @ 1438]
gtkhtml has gotten replaced by gtkimhtml.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 26 Jan 2001 02:02:36 +0000 |
parents | |
children | 36c56d591674 |
comparison
equal
deleted
inserted
replaced
1427:28278bd61403 | 1428:00b3d02a2168 |
---|---|
1 /* | |
2 * GtkIMHtml | |
3 * | |
4 * Copyright (C) 2000, Eric Warmenhoven <warmenhoven@yahoo.com> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
22 #ifndef __GTK_IMHTML_H | |
23 #define __GTK_IMHTML_H | |
24 | |
25 #include <gdk/gdk.h> | |
26 #include <gtk/gtklayout.h> | |
27 | |
28 #ifdef __cplusplus | |
29 extern "C" { | |
30 #endif | |
31 | |
32 #define GTK_TYPE_IMHTML (gtk_imhtml_get_type ()) | |
33 #define GTK_IMHTML(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml)) | |
34 #define GTK_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass)) | |
35 #define GTK_IS_IMHTML(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML)) | |
36 #define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML)) | |
37 | |
38 typedef gchar** (*GtkIMHtmlImage) (gchar *url); | |
39 | |
40 typedef struct _GtkIMHtml GtkIMHtml; | |
41 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | |
42 | |
43 struct _GtkIMHtml { | |
44 GtkLayout layout; | |
45 | |
46 GdkFont *default_font; | |
47 GdkColor *default_fg_color; | |
48 | |
49 GdkCursor *hand_cursor; | |
50 GdkCursor *arrow_cursor; | |
51 | |
52 GList *bits; | |
53 GList *urls; | |
54 | |
55 guint sel_startx, sel_starty; | |
56 guint sel_endx, sel_endy; | |
57 gboolean selection; | |
58 GString *selected_text; | |
59 guint scroll_timer; | |
60 | |
61 guint x, y; | |
62 guint xsize; | |
63 guint llheight; | |
64 guint llascent; | |
65 GList *line; | |
66 | |
67 GtkIMHtmlImage img; | |
68 | |
69 gboolean smileys; | |
70 gboolean comments; | |
71 | |
72 GHashTable *smiley_hash; | |
73 gint smin, smax; | |
74 }; | |
75 | |
76 struct _GtkIMHtmlClass { | |
77 GtkLayoutClass parent_class; | |
78 | |
79 void (*url_clicked) (GtkIMHtml *, const gchar *); | |
80 }; | |
81 | |
82 typedef enum | |
83 { | |
84 GTK_IMHTML_NO_COLOURS = 1 << 0, | |
85 GTK_IMHTML_NO_FONTS = 1 << 1, | |
86 GTK_IMHTML_NO_COMMENTS = 1 << 2, | |
87 GTK_IMHTML_NO_TITLE = 1 << 3, | |
88 GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
89 GTK_IMHTML_NO_SIZES = 1 << 5, | |
90 GTK_IMHTML_NO_SCROLL = 1 << 6, | |
91 GTK_IMHTML_RETURN_LOG = 1 << 7 | |
92 } GtkIMHtmlOptions; | |
93 | |
94 GtkType gtk_imhtml_get_type (void); | |
95 GtkWidget* gtk_imhtml_new (GtkAdjustment *hadj, | |
96 GtkAdjustment *vadj); | |
97 | |
98 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | |
99 GtkAdjustment *hadj, | |
100 GtkAdjustment *vadj); | |
101 | |
102 void gtk_imhtml_set_defaults (GtkIMHtml *imhtml, | |
103 GdkFont *font, | |
104 GdkColor *fg_color); | |
105 | |
106 void gtk_imhtml_set_img_handler (GtkIMHtml *imhtml, | |
107 GtkIMHtmlImage handler); | |
108 | |
109 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, | |
110 gchar *text, | |
111 gchar **xpm); | |
112 | |
113 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, | |
114 gboolean show); | |
115 | |
116 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, | |
117 gboolean show); | |
118 | |
119 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, | |
120 const gchar *text, | |
121 GtkIMHtmlOptions options); | |
122 | |
123 #ifdef __cplusplus | |
124 } | |
125 #endif | |
126 | |
127 #endif |