Mercurial > pidgin.yaz
annotate src/gtkconv.h @ 11664:38bbb0f15453
[gaim-migrate @ 13949]
"This patch updates the colors of the tabs correctly. I
have removed the tab-highlighting stuff from the core
to the UI." Sadrul Habib Chowdhury
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 14 Oct 2005 11:30:37 +0000 |
parents | f72607814e4a |
children | 872932089400 |
rev | line source |
---|---|
4359 | 1 /** |
2 * @file gtkconv.h GTK+ Conversation API | |
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4736
diff
changeset
|
3 * @ingroup gtkui |
4359 | 4 * |
5 * gaim | |
6 * | |
8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
7326
00a9ab26d607
[gaim-migrate @ 7912]
Christian Hammond <chipx86@chipx86.com>
parents:
7295
diff
changeset
|
10 * |
4359 | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
9713 | 25 #ifndef _GAIM_GTKCONVERSATION_H_ |
26 #define _GAIM_GTKCONVERSATION_H_ | |
4359 | 27 |
10008 | 28 typedef struct _GaimGtkImPane GaimGtkImPane; |
29 typedef struct _GaimGtkChatPane GaimGtkChatPane; | |
30 typedef struct _GaimGtkConversation GaimGtkConversation; | |
9709 | 31 |
11664
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
32 /** |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
33 * Unseen text states. |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
34 */ |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
35 typedef enum |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
36 { |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
37 GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
38 GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
39 GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
40 GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
41 |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
42 } GaimUnseenState; |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
43 |
9498 | 44 enum { |
45 CHAT_USERS_ICON_COLUMN, | |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11280
diff
changeset
|
46 CHAT_USERS_ALIAS_COLUMN, |
9498 | 47 CHAT_USERS_NAME_COLUMN, |
9554 | 48 CHAT_USERS_FLAGS_COLUMN, |
11454
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11280
diff
changeset
|
49 CHAT_USERS_COLOR_COLUMN, |
201617d49573
[gaim-migrate @ 13693]
Richard Laager <rlaager@wiktel.com>
parents:
11280
diff
changeset
|
50 CHAT_USERS_BUDDY_COLUMN, |
9498 | 51 CHAT_USERS_COLUMNS |
52 }; | |
53 | |
10008 | 54 #define GAIM_GTK_CONVERSATION(conv) \ |
55 ((GaimGtkConversation *)(conv)->ui_data) | |
56 | |
57 #define GAIM_IS_GTK_CONVERSATION(conv) \ | |
58 (gaim_conversation_get_ui_ops(conv) == \ | |
59 gaim_gtk_conversations_get_conv_ui_ops()) | |
60 | |
61 #include "gtkgaim.h" | |
62 #include "conversation.h" | |
11581 | 63 #include "gtkconvwin.h" |
10008 | 64 |
4359 | 65 /************************************************************************** |
66 * @name Structures | |
67 **************************************************************************/ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
68 /*@{*/ |
4359 | 69 |
70 /** | |
71 * A GTK+ representation of a graphical window containing one or more | |
72 * conversations. | |
73 */ | |
74 | |
75 /** | |
7820 | 76 * A GTK+ Instant Message pane. |
4359 | 77 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
78 struct _GaimGtkImPane |
4359 | 79 { |
80 GtkWidget *block; | |
9468 | 81 GtkWidget *send_file; |
4359 | 82 GtkWidget *sep1; |
83 GtkWidget *sep2; | |
84 GtkWidget *check; | |
85 GtkWidget *progress; | |
86 | |
87 gboolean a_virgin; | |
88 | |
89 /* Buddy icon stuff */ | |
9885 | 90 GtkWidget *icon_container; |
4359 | 91 GtkWidget *icon; |
9687 | 92 gboolean show_icon; |
8189 | 93 gboolean animate; |
4359 | 94 GdkPixbufAnimation *anim; |
95 GdkPixbufAnimationIter *iter; | |
96 guint32 icon_timer; | |
97 }; | |
98 | |
99 /** | |
100 * GTK+ Chat panes. | |
101 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
102 struct _GaimGtkChatPane |
4359 | 103 { |
104 GtkWidget *count; | |
105 GtkWidget *list; | |
106 GtkWidget *topic_text; | |
10500 | 107 GtkWidget *userlist_im; |
108 GtkWidget *userlist_ignore; | |
109 GtkWidget *userlist_info; | |
4359 | 110 }; |
111 | |
112 /** | |
113 * A GTK+ conversation pane. | |
114 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
115 struct _GaimGtkConversation |
4359 | 116 { |
10810 | 117 GaimConversation *active_conv; |
118 GList *convs; | |
11581 | 119 |
120 GaimGtkWindow *win; | |
121 | |
4359 | 122 gboolean make_sound; |
7326
00a9ab26d607
[gaim-migrate @ 7912]
Christian Hammond <chipx86@chipx86.com>
parents:
7295
diff
changeset
|
123 gboolean show_formatting_toolbar; |
9188 | 124 gboolean show_timestamps; |
4359 | 125 |
126 GtkTooltips *tooltips; | |
127 | |
128 GtkWidget *tab_cont; | |
129 GtkWidget *tabby; | |
6771
8eebba08b44b
[gaim-migrate @ 7308]
Christian Hammond <chipx86@chipx86.com>
parents:
6392
diff
changeset
|
130 GtkWidget *menu_tabby; |
4359 | 131 |
132 GtkWidget *imhtml; | |
133 GtkTextBuffer *entry_buffer; | |
134 GtkWidget *entry; | |
135 | |
7930 | 136 GtkWidget *close; /* "x" on the tab */ |
6392
e9974608b319
[gaim-migrate @ 6897]
Christian Hammond <chipx86@chipx86.com>
parents:
5908
diff
changeset
|
137 GtkWidget *icon; |
4359 | 138 GtkWidget *tab_label; |
6771
8eebba08b44b
[gaim-migrate @ 7308]
Christian Hammond <chipx86@chipx86.com>
parents:
6392
diff
changeset
|
139 GtkWidget *menu_icon; |
8eebba08b44b
[gaim-migrate @ 7308]
Christian Hammond <chipx86@chipx86.com>
parents:
6392
diff
changeset
|
140 GtkWidget *menu_label; |
4359 | 141 GtkSizeGroup *sg; |
142 | |
9332 | 143 GtkWidget *lower_hbox; |
4359 | 144 |
8317 | 145 GtkWidget *toolbar; |
4359 | 146 |
11664
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
147 GaimUnseenState unseen_state; |
38bbb0f15453
[gaim-migrate @ 13949]
Luke Schierer <lschiere@pidgin.im>
parents:
11614
diff
changeset
|
148 |
4359 | 149 struct |
150 { | |
5106 | 151 GtkWidget *image; |
7295 | 152 GtkWidget *search; |
4359 | 153 |
154 } dialogs; | |
155 | |
156 union | |
157 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
158 GaimGtkImPane *im; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
159 GaimGtkChatPane *chat; |
4359 | 160 |
161 } u; | |
162 }; | |
163 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
164 /*@}*/ |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
165 |
4359 | 166 /************************************************************************** |
167 * @name GTK+ Conversation API | |
168 **************************************************************************/ | |
5673
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
169 /*@{*/ |
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
170 |
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
171 /** |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10810
diff
changeset
|
172 * Returns the UI operations structure for GTK+ conversations. |
4359 | 173 * |
10814
364a2ef907ae
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10810
diff
changeset
|
174 * @return The GTK+ conversation operations structure. |
4359 | 175 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6771
diff
changeset
|
176 GaimConversationUiOps *gaim_gtk_conversations_get_conv_ui_ops(void); |
4359 | 177 |
178 /** | |
179 * Updates the buddy icon on a conversation. | |
180 * | |
181 * @param conv The conversation. | |
182 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
183 void gaim_gtkconv_update_buddy_icon(GaimConversation *conv); |
4359 | 184 |
185 /** | |
186 * Updates the tab positions on all conversation windows to reflect any | |
187 * changed preferences. | |
188 */ | |
189 void gaim_gtkconv_update_tabs(void); | |
190 | |
191 /** | |
192 * Updates conversation buttons by protocol. | |
193 * | |
194 * @param conv The conversation. | |
195 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
196 void gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv); |
4359 | 197 |
11581 | 198 GaimGtkWindow *gaim_gtkconv_get_window(GaimGtkConversation *gtkconv); |
199 GdkPixbuf *gaim_gtkconv_get_tab_icon(GaimConversation *conv, gboolean small_icon); | |
200 void gaim_gtkconv_new(GaimConversation *conv); | |
11614 | 201 int gaim_gtkconv_get_tab_at_xy(GaimGtkWindow *win, int x, int y, gboolean *to_right); |
5673
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
202 /*@}*/ |
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
203 |
8582
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
204 /**************************************************************************/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
205 /** @name GTK+ Conversations Subsystem */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
206 /**************************************************************************/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
207 /*@{*/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
208 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
209 /** |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
210 * Returns the gtk conversations subsystem handle. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
211 * |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
212 * @return The conversations subsystem handle. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
213 */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
214 void *gaim_gtk_conversations_get_handle(void); |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
215 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
216 /** |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
217 * Initializes the GTK+ conversations subsystem. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
218 */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
219 void gaim_gtk_conversations_init(void); |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
220 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
221 /** |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
222 * Uninitialized the GTK+ conversation subsystem. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
223 */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
224 void gaim_gtk_conversations_uninit(void); |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
225 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
226 /*@}*/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
227 |
9713 | 228 #endif /* _GAIM_GTKCONVERSATION_H_ */ |