Mercurial > pidgin
annotate src/gtkimhtml.h @ 2483:e73ca8d8d358
[gaim-migrate @ 2496]
fine.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 11 Oct 2001 07:49:02 +0000 |
parents | 08c66712364c |
children | 16df889d81e2 |
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 | |
48 GdkFont *default_font; | |
49 GdkColor *default_fg_color; | |
1460
36c56d591674
[gaim-migrate @ 1470]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1428
diff
changeset
|
50 GdkColor *default_bg_color; |
1428 | 51 |
52 GdkCursor *hand_cursor; | |
53 GdkCursor *arrow_cursor; | |
54 | |
55 GList *bits; | |
56 GList *urls; | |
1574
7ad82fa9e6ce
[gaim-migrate @ 1584]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1519
diff
changeset
|
57 struct _GtkIMHtmlBit *tip_bit; |
7ad82fa9e6ce
[gaim-migrate @ 1584]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1519
diff
changeset
|
58 GtkWidget *tip_window; |
7ad82fa9e6ce
[gaim-migrate @ 1584]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1519
diff
changeset
|
59 guint tip_timer; |
1428 | 60 |
61 guint sel_startx, sel_starty; | |
62 guint sel_endx, sel_endy; | |
63 gboolean selection; | |
64 GString *selected_text; | |
1515
206f995a33f3
[gaim-migrate @ 1525]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1460
diff
changeset
|
65 struct line_info *sel_endchunk; |
1428 | 66 guint scroll_timer; |
67 | |
68 guint x, y; | |
69 guint xsize; | |
70 guint llheight; | |
71 guint llascent; | |
72 GList *line; | |
73 | |
74 GtkIMHtmlImage img; | |
75 | |
76 gboolean smileys; | |
77 gboolean comments; | |
78 | |
2349
60c716c32c40
[gaim-migrate @ 2362]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1780
diff
changeset
|
79 GtkSmileyTree *smiley_data; |
1428 | 80 }; |
81 | |
82 struct _GtkIMHtmlClass { | |
83 GtkLayoutClass parent_class; | |
84 | |
85 void (*url_clicked) (GtkIMHtml *, const gchar *); | |
86 }; | |
87 | |
88 typedef enum | |
89 { | |
90 GTK_IMHTML_NO_COLOURS = 1 << 0, | |
91 GTK_IMHTML_NO_FONTS = 1 << 1, | |
92 GTK_IMHTML_NO_COMMENTS = 1 << 2, | |
93 GTK_IMHTML_NO_TITLE = 1 << 3, | |
94 GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
95 GTK_IMHTML_NO_SIZES = 1 << 5, | |
96 GTK_IMHTML_NO_SCROLL = 1 << 6, | |
97 GTK_IMHTML_RETURN_LOG = 1 << 7 | |
98 } GtkIMHtmlOptions; | |
99 | |
100 GtkType gtk_imhtml_get_type (void); | |
101 GtkWidget* gtk_imhtml_new (GtkAdjustment *hadj, | |
102 GtkAdjustment *vadj); | |
103 | |
104 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | |
105 GtkAdjustment *hadj, | |
106 GtkAdjustment *vadj); | |
107 | |
108 void gtk_imhtml_set_defaults (GtkIMHtml *imhtml, | |
109 GdkFont *font, | |
1460
36c56d591674
[gaim-migrate @ 1470]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1428
diff
changeset
|
110 GdkColor *fg_color, |
36c56d591674
[gaim-migrate @ 1470]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1428
diff
changeset
|
111 GdkColor *bg_color); |
1428 | 112 |
113 void gtk_imhtml_set_img_handler (GtkIMHtml *imhtml, | |
114 GtkIMHtmlImage handler); | |
115 | |
116 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, | |
117 gchar *text, | |
118 gchar **xpm); | |
119 | |
120 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, | |
121 gboolean show); | |
122 | |
123 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, | |
124 gboolean show); | |
125 | |
126 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, | |
127 const gchar *text, | |
128 GtkIMHtmlOptions options); | |
129 | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
130 void gtk_imhtml_clear (GtkIMHtml *imhtml); |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1574
diff
changeset
|
131 |
2363
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
132 void gtk_imhtml_page_up (GtkIMHtml *imhtml); |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
133 |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
134 void gtk_imhtml_page_down (GtkIMHtml *imhtml); |
08c66712364c
[gaim-migrate @ 2376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2349
diff
changeset
|
135 |
1428 | 136 #ifdef __cplusplus |
137 } | |
138 #endif | |
139 | |
140 #endif |