Mercurial > pidgin
annotate src/gtkimhtml.h @ 5116:c081a81ee013
[gaim-migrate @ 5479]
Bjoern Voigt writes:
"I have prepared some updates and patches:
1) File i18n5-de.patch
- updated German translation
2) File i18n5.patch
- new files in po/POTFILES.in
- new strings marked for translation
3) File i18n5-accelgroup.patch
- keyboard accelerators for conversation window
4) File i18n5-gaim-remote.patch
- i18n support for gaim-remote.c
- correct handling of "--help" option"
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 12 Apr 2003 23:31:41 +0000 |
parents | 44945824ba60 |
children | fc0441fbf159 |
rev | line source |
---|---|
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
1 /** |
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
2 * @file gtkimhtml.h Gaim IM rendering component |
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
3 * @ingroup gtkui |
1428 | 4 * |
5 * Copyright (C) 2000, Eric Warmenhoven <warmenhoven@yahoo.com> | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License | |
18 * along with this program; if not, write to the Free Software | |
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
20 */ | |
21 | |
22 #ifndef __GTK_IMHTML_H | |
23 #define __GTK_IMHTML_H | |
24 | |
25 #include <gdk/gdk.h> | |
3922 | 26 #include <gtk/gtktextview.h> |
4735 | 27 #include <gtk/gtktooltips.h> |
5012 | 28 #include <gtk/gtkimage.h> |
1428 | 29 |
30 #ifdef __cplusplus | |
31 extern "C" { | |
32 #endif | |
33 | |
34 #define GTK_TYPE_IMHTML (gtk_imhtml_get_type ()) | |
35 #define GTK_IMHTML(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMHTML, GtkIMHtml)) | |
36 #define GTK_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass)) | |
37 #define GTK_IS_IMHTML(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMHTML)) | |
38 #define GTK_IS_IMHTML_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMHTML)) | |
39 | |
40 typedef gchar** (*GtkIMHtmlImage) (gchar *url); | |
41 | |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
42 typedef struct _GtkSmileyTree GtkSmileyTree; |
4263 | 43 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley; |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
44 |
1428 | 45 typedef struct _GtkIMHtml GtkIMHtml; |
46 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | |
47 | |
48 struct _GtkIMHtml { | |
3922 | 49 GtkTextView text_view; |
50 GtkTextBuffer *text_buffer; | |
51 GtkTextMark *end; | |
52 gboolean comments, smileys; | |
1428 | 53 GdkCursor *hand_cursor; |
54 GdkCursor *arrow_cursor; | |
4032 | 55 GHashTable *smiley_data; |
56 GtkSmileyTree *default_smilies; | |
4254 | 57 |
58 gboolean show_smileys; | |
59 gboolean show_comments; | |
4735 | 60 |
61 GtkWidget *tip_window; | |
62 char *tip; | |
63 guint tip_timer; | |
4895 | 64 |
65 GList *scalables; | |
4947 | 66 GdkRectangle old_rect; |
1428 | 67 }; |
68 | |
69 struct _GtkIMHtmlClass { | |
3922 | 70 GtkTextViewClass parent_class; |
1428 | 71 |
72 void (*url_clicked) (GtkIMHtml *, const gchar *); | |
73 }; | |
74 | |
4263 | 75 struct _GtkIMHtmlSmiley { |
76 gchar *smile; | |
77 gchar *file; | |
78 GdkPixbuf *icon; | |
79 gboolean hidden; | |
80 }; | |
81 | |
1428 | 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); | |
3922 | 95 GtkWidget* gtk_imhtml_new (void *, void *); |
1428 | 96 |
97 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | |
98 GtkAdjustment *hadj, | |
99 GtkAdjustment *vadj); | |
100 | |
101 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, | |
4032 | 102 gchar *sml, |
4263 | 103 GtkIMHtmlSmiley *smiley); |
1428 | 104 |
2728
16df889d81e2
[gaim-migrate @ 2741]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2363
diff
changeset
|
105 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml); |
16df889d81e2
[gaim-migrate @ 2741]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2363
diff
changeset
|
106 |
1428 | 107 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, |
108 gboolean show); | |
109 | |
110 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, | |
111 gboolean show); | |
112 | |
113 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, | |
114 const gchar *text, | |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2728
diff
changeset
|
115 gint len, |
1428 | 116 GtkIMHtmlOptions options); |
117 | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
118 void gtk_imhtml_clear (GtkIMHtml *imhtml); |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
119 |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
120 void gtk_imhtml_page_up (GtkIMHtml *imhtml); |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
121 |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
122 void gtk_imhtml_page_down (GtkIMHtml *imhtml); |
3867 | 123 void gtk_imhtml_to_bottom (GtkIMHtml *imhtml); |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
124 |
4895 | 125 /* GtkIMHtmlScalable, gaim_im_image, and gaim_hr */ |
126 | |
127 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable; | |
128 #define GTK_IMHTML_SCALABLE(x) ((GtkIMHtmlScalable *)x) | |
129 | |
130 struct _GtkIMHtmlScalable{ | |
131 void (*scale)(struct _GtkIMHtmlScalable *, int, int); | |
132 void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
133 void (*free)(struct _GtkIMHtmlScalable *); | |
134 }; | |
135 | |
136 typedef struct { | |
137 GtkIMHtmlScalable scalable; | |
5012 | 138 GtkImage *image; |
5046 | 139 GdkPixbuf *pixbuf; |
4895 | 140 GtkTextMark *mark; |
5012 | 141 gchar *filename; |
4895 | 142 int width; |
143 int height; | |
144 } gaim_im_image; | |
145 | |
146 typedef struct { | |
147 GtkIMHtmlScalable scalable; | |
148 GtkWidget *sep; | |
149 } gaim_hr; | |
150 | |
151 GtkIMHtmlScalable *gtk_imhtml_scalable_new(); | |
152 | |
5012 | 153 GtkIMHtmlScalable *gaim_im_image_new(GdkPixbuf *img, gchar *filename); |
4895 | 154 |
155 void gaim_im_image_free(GtkIMHtmlScalable *); | |
156 | |
157 void gaim_im_image_scale(GtkIMHtmlScalable *, int, int); | |
158 | |
159 void gaim_im_image_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
160 | |
161 GtkIMHtmlScalable *gaim_hr_new(); | |
162 | |
163 void gaim_hr_free(GtkIMHtmlScalable *); | |
164 | |
165 void gaim_hr_scale(GtkIMHtmlScalable *, int, int); | |
166 | |
167 void gaim_hr_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
168 | |
169 | |
170 | |
1428 | 171 #ifdef __cplusplus |
172 } | |
173 #endif | |
174 | |
175 #endif |