Mercurial > pidgin.yaz
annotate src/gtkimhtml.h @ 3876:c634bc29bf20
[gaim-migrate @ 4028]
We don't need these anymore.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Sun, 03 Nov 2002 08:20:24 +0000 |
parents | 43e396e94095 |
children | 30f52e7afd1d |
rev | line source |
---|---|
1428 | 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 | |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
40 typedef struct _GtkSmileyTree GtkSmileyTree; |
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
41 |
1428 | 42 typedef struct _GtkIMHtml GtkIMHtml; |
43 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | |
44 | |
45 struct _GtkIMHtml { | |
46 GtkLayout layout; | |
47 | |
3608 | 48 PangoContext *context; |
49 PangoFontDescription *default_font; | |
50 //GdkFont *default_font; | |
1428 | 51 GdkColor *default_fg_color; |
1460
36c56d591674
[gaim-migrate @ 1470]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1428
diff
changeset
|
52 GdkColor *default_bg_color; |
2993 | 53 GdkColor *default_hl_color; |
54 GdkColor *default_hlfg_color; | |
1428 | 55 |
56 GdkCursor *hand_cursor; | |
57 GdkCursor *arrow_cursor; | |
58 | |
59 GList *bits; | |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2728
diff
changeset
|
60 GList *click; |
1574
7ad82fa9e6ce
[gaim-migrate @ 1584]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1519
diff
changeset
|
61 struct _GtkIMHtmlBit *tip_bit; |
2993 | 62 GList *im_images; |
1574
7ad82fa9e6ce
[gaim-migrate @ 1584]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1519
diff
changeset
|
63 GtkWidget *tip_window; |
7ad82fa9e6ce
[gaim-migrate @ 1584]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1519
diff
changeset
|
64 guint tip_timer; |
1428 | 65 |
66 guint sel_startx, sel_starty; | |
67 guint sel_endx, sel_endy; | |
68 gboolean selection; | |
2982 | 69 guint sel_mode; |
1428 | 70 GString *selected_text; |
1515
206f995a33f3
[gaim-migrate @ 1525]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1460
diff
changeset
|
71 struct line_info *sel_endchunk; |
1428 | 72 guint scroll_timer; |
73 | |
74 guint x, y; | |
75 guint xsize; | |
76 guint llheight; | |
77 guint llascent; | |
78 GList *line; | |
79 | |
80 GtkIMHtmlImage img; | |
81 | |
82 gboolean smileys; | |
83 gboolean comments; | |
84 | |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
85 GtkSmileyTree *smiley_data; |
1428 | 86 }; |
87 | |
88 struct _GtkIMHtmlClass { | |
89 GtkLayoutClass parent_class; | |
90 | |
91 void (*url_clicked) (GtkIMHtml *, const gchar *); | |
92 }; | |
93 | |
94 typedef enum | |
95 { | |
96 GTK_IMHTML_NO_COLOURS = 1 << 0, | |
97 GTK_IMHTML_NO_FONTS = 1 << 1, | |
98 GTK_IMHTML_NO_COMMENTS = 1 << 2, | |
99 GTK_IMHTML_NO_TITLE = 1 << 3, | |
100 GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
101 GTK_IMHTML_NO_SIZES = 1 << 5, | |
102 GTK_IMHTML_NO_SCROLL = 1 << 6, | |
103 GTK_IMHTML_RETURN_LOG = 1 << 7 | |
104 } GtkIMHtmlOptions; | |
105 | |
106 GtkType gtk_imhtml_get_type (void); | |
107 GtkWidget* gtk_imhtml_new (GtkAdjustment *hadj, | |
108 GtkAdjustment *vadj); | |
109 | |
110 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | |
111 GtkAdjustment *hadj, | |
112 GtkAdjustment *vadj); | |
113 | |
3466 | 114 void gtk_imhtml_set_defaults (GtkIMHtml *imhtml, |
3608 | 115 PangoFontDescription *font, |
3466 | 116 GdkColor *fg_color, |
117 GdkColor *bg_color); | |
1428 | 118 |
119 void gtk_imhtml_set_img_handler (GtkIMHtml *imhtml, | |
120 GtkIMHtmlImage handler); | |
121 | |
122 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, | |
123 gchar *text, | |
124 gchar **xpm); | |
125 | |
3159 | 126 void gtk_imhtml_init_smileys (GtkIMHtml *imhtml); |
3050 | 127 |
2728
16df889d81e2
[gaim-migrate @ 2741]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2363
diff
changeset
|
128 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml); |
16df889d81e2
[gaim-migrate @ 2741]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2363
diff
changeset
|
129 |
3050 | 130 void gtk_imhtml_reset_smileys (GtkIMHtml *imhtml); |
131 | |
1428 | 132 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, |
133 gboolean show); | |
134 | |
135 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, | |
136 gboolean show); | |
137 | |
138 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, | |
139 const gchar *text, | |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2728
diff
changeset
|
140 gint len, |
1428 | 141 GtkIMHtmlOptions options); |
142 | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
143 void gtk_imhtml_clear (GtkIMHtml *imhtml); |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
144 |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
145 void gtk_imhtml_page_up (GtkIMHtml *imhtml); |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
146 |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
147 void gtk_imhtml_page_down (GtkIMHtml *imhtml); |
3867 | 148 void gtk_imhtml_to_bottom (GtkIMHtml *imhtml); |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
149 |
1428 | 150 #ifdef __cplusplus |
151 } | |
152 #endif | |
153 | |
154 #endif |