Mercurial > pidgin.yaz
comparison src/gtkimhtml.h @ 3922:30f52e7afd1d
[gaim-migrate @ 4094]
This is gtkimhtml2--it's a subclass of gtktextview. It's not done yet. It doesn't
do smileys or images, and what it does do so far, it doesn't do perfectly. But it's
perfectly 100% usable, and like 80,000 times faster than gtkimhtml + Pango.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 08 Nov 2002 06:10:35 +0000 |
parents | 43e396e94095 |
children | 2b3a9d8f168e |
comparison
equal
deleted
inserted
replaced
3921:67209a7ee924 | 3922:30f52e7afd1d |
---|---|
21 | 21 |
22 #ifndef __GTK_IMHTML_H | 22 #ifndef __GTK_IMHTML_H |
23 #define __GTK_IMHTML_H | 23 #define __GTK_IMHTML_H |
24 | 24 |
25 #include <gdk/gdk.h> | 25 #include <gdk/gdk.h> |
26 #include <gtk/gtklayout.h> | 26 #include <gtk/gtktextview.h> |
27 | 27 |
28 #ifdef __cplusplus | 28 #ifdef __cplusplus |
29 extern "C" { | 29 extern "C" { |
30 #endif | 30 #endif |
31 | 31 |
41 | 41 |
42 typedef struct _GtkIMHtml GtkIMHtml; | 42 typedef struct _GtkIMHtml GtkIMHtml; |
43 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; | 43 typedef struct _GtkIMHtmlClass GtkIMHtmlClass; |
44 | 44 |
45 struct _GtkIMHtml { | 45 struct _GtkIMHtml { |
46 GtkLayout layout; | 46 GtkTextView text_view; |
47 | 47 GtkTextBuffer *text_buffer; |
48 PangoContext *context; | 48 GtkTextMark *end; |
49 PangoFontDescription *default_font; | 49 gboolean comments, smileys; |
50 //GdkFont *default_font; | |
51 GdkColor *default_fg_color; | |
52 GdkColor *default_bg_color; | |
53 GdkColor *default_hl_color; | |
54 GdkColor *default_hlfg_color; | |
55 | |
56 GdkCursor *hand_cursor; | 50 GdkCursor *hand_cursor; |
57 GdkCursor *arrow_cursor; | 51 GdkCursor *arrow_cursor; |
58 | |
59 GList *bits; | |
60 GList *click; | |
61 struct _GtkIMHtmlBit *tip_bit; | |
62 GList *im_images; | |
63 GtkWidget *tip_window; | |
64 guint tip_timer; | |
65 | |
66 guint sel_startx, sel_starty; | |
67 guint sel_endx, sel_endy; | |
68 gboolean selection; | |
69 guint sel_mode; | |
70 GString *selected_text; | |
71 struct line_info *sel_endchunk; | |
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 | |
85 GtkSmileyTree *smiley_data; | |
86 }; | 52 }; |
87 | 53 |
88 struct _GtkIMHtmlClass { | 54 struct _GtkIMHtmlClass { |
89 GtkLayoutClass parent_class; | 55 GtkTextViewClass parent_class; |
90 | 56 |
91 void (*url_clicked) (GtkIMHtml *, const gchar *); | 57 void (*url_clicked) (GtkIMHtml *, const gchar *); |
92 }; | 58 }; |
93 | 59 |
94 typedef enum | 60 typedef enum |
102 GTK_IMHTML_NO_SCROLL = 1 << 6, | 68 GTK_IMHTML_NO_SCROLL = 1 << 6, |
103 GTK_IMHTML_RETURN_LOG = 1 << 7 | 69 GTK_IMHTML_RETURN_LOG = 1 << 7 |
104 } GtkIMHtmlOptions; | 70 } GtkIMHtmlOptions; |
105 | 71 |
106 GtkType gtk_imhtml_get_type (void); | 72 GtkType gtk_imhtml_get_type (void); |
107 GtkWidget* gtk_imhtml_new (GtkAdjustment *hadj, | 73 GtkWidget* gtk_imhtml_new (void *, void *); |
108 GtkAdjustment *vadj); | |
109 | 74 |
110 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, | 75 void gtk_imhtml_set_adjustments (GtkIMHtml *imhtml, |
111 GtkAdjustment *hadj, | 76 GtkAdjustment *hadj, |
112 GtkAdjustment *vadj); | 77 GtkAdjustment *vadj); |
113 | 78 |