Mercurial > pidgin
annotate src/gtkimhtml.h @ 7118:bf630f7dfdcd
[gaim-migrate @ 7685]
Here's a commit that I think will make faceprint happy. GaimWindow ->
GaimConvWindow, GaimIm -> GaimConvIm, GaimChat -> GaimConvChat,
GaimBlistChat -> GaimChat, and updated the API functions as well. Plugin
authors are going to hunt me down and murder me. I can feel it..
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Thu, 02 Oct 2003 02:54:07 +0000 |
| parents | 083d1e4a9c78 |
| children | c7f0a4397d9e |
| rev | line source |
|---|---|
|
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5012
diff
changeset
|
1 /** |
| 5967 | 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 | 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)) | |
| 5967 | 39 #define GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj) |
| 1428 | 40 |
| 5967 | 41 typedef struct _GtkIMHtml GtkIMHtml; |
| 42 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | |
| 43 typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */ | |
| 44 typedef struct _GtkSmileyTree GtkSmileyTree; | |
| 45 typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley; | |
| 46 typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable; | |
| 47 typedef struct _GtkIMHtmlImage GtkIMHtmlImage; | |
| 48 typedef struct _GtkIMHtmlHr GtkIMHtmlHr; | |
| 1428 | 49 |
| 50 struct _GtkIMHtml { | |
| 3922 | 51 GtkTextView text_view; |
| 52 GtkTextBuffer *text_buffer; | |
| 53 GtkTextMark *end; | |
| 54 gboolean comments, smileys; | |
| 1428 | 55 GdkCursor *hand_cursor; |
| 56 GdkCursor *arrow_cursor; | |
| 4032 | 57 GHashTable *smiley_data; |
| 58 GtkSmileyTree *default_smilies; | |
| 4254 | 59 |
| 60 gboolean show_smileys; | |
| 6124 | 61 gboolean show_comments; |
| 4735 | 62 |
| 63 GtkWidget *tip_window; | |
| 64 char *tip; | |
| 65 guint tip_timer; | |
| 4895 | 66 |
| 67 GList *scalables; | |
| 4947 | 68 GdkRectangle old_rect; |
| 1428 | 69 }; |
| 70 | |
| 71 struct _GtkIMHtmlClass { | |
| 3922 | 72 GtkTextViewClass parent_class; |
| 1428 | 73 |
| 5967 | 74 void (*url_clicked)(GtkIMHtml *, const gchar *); |
| 75 }; | |
| 76 | |
| 77 struct _GtkIMHtmlFontDetail { | |
| 78 gushort size; | |
| 79 gchar *face; | |
| 80 gchar *fore; | |
| 81 gchar *back; | |
| 82 gchar *sml; | |
| 83 }; | |
| 84 | |
| 85 struct _GtkSmileyTree { | |
| 86 GString *values; | |
| 87 GtkSmileyTree **children; | |
| 88 GtkIMHtmlSmiley *image; | |
| 1428 | 89 }; |
| 90 | |
| 4263 | 91 struct _GtkIMHtmlSmiley { |
| 92 gchar *smile; | |
| 93 gchar *file; | |
|
6814
782907a6ae65
[gaim-migrate @ 7354]
Christian Hammond <chipx86@chipx86.com>
parents:
6282
diff
changeset
|
94 GdkPixbufAnimation *icon; |
| 4263 | 95 gboolean hidden; |
| 96 }; | |
| 97 | |
| 5967 | 98 struct _GtkIMHtmlScalable { |
| 4895 | 99 void (*scale)(struct _GtkIMHtmlScalable *, int, int); |
| 100 void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
| 101 void (*free)(struct _GtkIMHtmlScalable *); | |
| 102 }; | |
| 103 | |
| 5967 | 104 struct _GtkIMHtmlImage { |
| 4895 | 105 GtkIMHtmlScalable scalable; |
| 5012 | 106 GtkImage *image; |
| 5046 | 107 GdkPixbuf *pixbuf; |
| 4895 | 108 GtkTextMark *mark; |
| 5012 | 109 gchar *filename; |
| 4895 | 110 int width; |
| 111 int height; | |
| 5967 | 112 }; |
| 4895 | 113 |
| 5967 | 114 struct _GtkIMHtmlHr { |
| 4895 | 115 GtkIMHtmlScalable scalable; |
| 116 GtkWidget *sep; | |
| 5967 | 117 }; |
| 118 | |
| 119 typedef enum { | |
| 120 GTK_IMHTML_NO_COLOURS = 1 << 0, | |
| 121 GTK_IMHTML_NO_FONTS = 1 << 1, | |
| 122 GTK_IMHTML_NO_COMMENTS = 1 << 2, | |
| 123 GTK_IMHTML_NO_TITLE = 1 << 3, | |
| 124 GTK_IMHTML_NO_NEWLINE = 1 << 4, | |
| 125 GTK_IMHTML_NO_SIZES = 1 << 5, | |
| 126 GTK_IMHTML_NO_SCROLL = 1 << 6, | |
| 127 GTK_IMHTML_RETURN_LOG = 1 << 7, | |
| 128 GTK_IMHTML_USE_POINTSIZE = 1 << 8 | |
| 129 } GtkIMHtmlOptions; | |
| 130 | |
| 131 GtkType gtk_imhtml_get_type (void); | |
| 132 GtkWidget* gtk_imhtml_new (void *, void *); | |
| 133 | |
| 134 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | |
| 135 GtkAdjustment *hadj, | |
| 136 GtkAdjustment *vadj); | |
| 137 | |
| 138 void gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, | |
| 139 gchar *sml, GtkIMHtmlSmiley *smiley); | |
| 140 | |
| 141 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml); | |
| 142 | |
| 143 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, gboolean show); | |
| 144 | |
| 145 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, gboolean show); | |
| 146 | |
| 6982 | 147 #define gtk_imhtml_append_text(x, y, z) \ |
| 148 gtk_imhtml_append_text_with_images(x, y, z, NULL) | |
| 149 | |
| 150 GString* gtk_imhtml_append_text_with_images (GtkIMHtml *imhtml, | |
| 151 const gchar *text, | |
| 152 GtkIMHtmlOptions options, | |
| 153 GSList *images); | |
| 5967 | 154 |
| 155 void gtk_imhtml_clear (GtkIMHtml *imhtml); | |
| 156 void gtk_imhtml_page_up (GtkIMHtml *imhtml); | |
| 157 void gtk_imhtml_page_down (GtkIMHtml *imhtml); | |
| 4895 | 158 |
| 159 GtkIMHtmlScalable *gtk_imhtml_scalable_new(); | |
| 6982 | 160 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename); |
| 5967 | 161 void gtk_imhtml_image_free(GtkIMHtmlScalable *); |
| 162 void gtk_imhtml_image_scale(GtkIMHtmlScalable *, int, int); | |
| 163 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
| 4895 | 164 |
| 5967 | 165 GtkIMHtmlScalable *gtk_imhtml_hr_new(); |
| 166 void gtk_imhtml_hr_free(GtkIMHtmlScalable *); | |
| 167 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *, int, int); | |
| 168 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *); | |
| 4895 | 169 |
| 170 | |
| 1428 | 171 #ifdef __cplusplus |
| 172 } | |
| 173 #endif | |
| 174 | |
| 175 #endif |
