Mercurial > pidgin
annotate src/gtkconv.h @ 9472:362e92781b3f
[gaim-migrate @ 10297]
This puts parentheses around dead conversations' titles and tabs.
I didn't mark the parentheses as translatable, but someone can do that if
they feel the need.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Wed, 07 Jul 2004 06:24:58 +0000 |
parents | 4d0b0d5485e6 |
children | c2e4c3ab4307 |
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 */ | |
25 | |
26 #ifndef _GAIM_GTK_CONVERSATION_H_ | |
27 #define _GAIM_GTK_CONVERSATION_H_ | |
28 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
29 #include "conversation.h" |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
30 |
4359 | 31 /************************************************************************** |
32 * @name Structures | |
33 **************************************************************************/ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
34 /*@{*/ |
4359 | 35 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
36 typedef struct _GaimGtkWindow GaimGtkWindow; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
37 typedef struct _GaimGtkImPane GaimGtkImPane; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
38 typedef struct _GaimGtkChatPane GaimGtkChatPane; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
39 typedef struct _GaimGtkConversation GaimGtkConversation; |
4359 | 40 |
41 /** | |
42 * A GTK+ representation of a graphical window containing one or more | |
43 * conversations. | |
44 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
45 struct _GaimGtkWindow |
4359 | 46 { |
47 GtkWidget *window; /**< The window. */ | |
48 GtkWidget *notebook; /**< The notebook of conversations. */ | |
49 | |
50 struct | |
51 { | |
52 GtkWidget *menubar; | |
53 | |
5167 | 54 GtkWidget *view_log; |
5908
ed8a9a3bf7e2
[gaim-migrate @ 6340]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
55 |
9468 | 56 GtkWidget *send_file; |
5908
ed8a9a3bf7e2
[gaim-migrate @ 6340]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
57 GtkWidget *add_pounce; |
7887 | 58 GtkWidget *get_info; |
59 GtkWidget *warn; | |
60 GtkWidget *invite; | |
61 | |
5908
ed8a9a3bf7e2
[gaim-migrate @ 6340]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
62 GtkWidget *alias; |
7887 | 63 GtkWidget *block; |
64 GtkWidget *add; | |
65 GtkWidget *remove; | |
5908
ed8a9a3bf7e2
[gaim-migrate @ 6340]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
66 |
7859 | 67 GtkWidget *insert_link; |
68 GtkWidget *insert_image; | |
69 | |
4359 | 70 GtkWidget *logging; |
71 GtkWidget *sounds; | |
7326
00a9ab26d607
[gaim-migrate @ 7912]
Christian Hammond <chipx86@chipx86.com>
parents:
7295
diff
changeset
|
72 GtkWidget *show_formatting_toolbar; |
9188 | 73 GtkWidget *show_timestamps; |
5908
ed8a9a3bf7e2
[gaim-migrate @ 6340]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
74 |
4359 | 75 GtkWidget *send_as; |
5908
ed8a9a3bf7e2
[gaim-migrate @ 6340]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
76 |
4736 | 77 GtkWidget *typing_icon; |
4359 | 78 |
4630 | 79 GtkItemFactory *item_factory; |
80 | |
4359 | 81 } menu; |
82 | |
83 /* Tab dragging stuff. */ | |
84 gboolean in_drag; | |
85 gboolean in_predrag; | |
86 | |
87 gint drag_min_x, drag_max_x, drag_min_y, drag_max_y; | |
88 | |
89 gint drag_motion_signal; | |
90 gint drag_leave_signal; | |
91 }; | |
92 | |
93 /** | |
7820 | 94 * A GTK+ Instant Message pane. |
4359 | 95 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
96 struct _GaimGtkImPane |
4359 | 97 { |
98 GtkWidget *warn; | |
99 GtkWidget *block; | |
9468 | 100 GtkWidget *send_file; |
4359 | 101 GtkWidget *sep1; |
102 GtkWidget *sep2; | |
103 GtkWidget *check; | |
104 GtkWidget *progress; | |
105 | |
106 gboolean a_virgin; | |
107 | |
108 /* Buddy icon stuff */ | |
109 GtkWidget *icon; | |
8189 | 110 gboolean animate; |
4359 | 111 GdkPixbufAnimation *anim; |
112 GdkPixbufAnimationIter *iter; | |
113 guint32 icon_timer; | |
114 GtkWidget *save_icon; | |
115 }; | |
116 | |
117 /** | |
118 * GTK+ Chat panes. | |
119 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
120 struct _GaimGtkChatPane |
4359 | 121 { |
122 GtkWidget *count; | |
123 GtkWidget *list; | |
124 GtkWidget *invite; | |
125 GtkWidget *topic_text; | |
7996
334ab1319406
[gaim-migrate @ 8673]
Christian Hammond <chipx86@chipx86.com>
parents:
7930
diff
changeset
|
126 GtkWidget *sep; |
4359 | 127 }; |
128 | |
129 /** | |
130 * A GTK+ conversation pane. | |
131 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
132 struct _GaimGtkConversation |
4359 | 133 { |
134 gboolean make_sound; | |
7326
00a9ab26d607
[gaim-migrate @ 7912]
Christian Hammond <chipx86@chipx86.com>
parents:
7295
diff
changeset
|
135 gboolean show_formatting_toolbar; |
9188 | 136 gboolean show_timestamps; |
4359 | 137 |
138 GtkTooltips *tooltips; | |
139 | |
140 GtkWidget *tab_cont; | |
141 GtkWidget *tabby; | |
6771
8eebba08b44b
[gaim-migrate @ 7308]
Christian Hammond <chipx86@chipx86.com>
parents:
6392
diff
changeset
|
142 GtkWidget *menu_tabby; |
4359 | 143 |
144 GtkWidget *imhtml; | |
145 GtkTextBuffer *entry_buffer; | |
146 GtkWidget *entry; | |
147 | |
7930 | 148 GtkWidget *add; |
149 GtkWidget *remove; | |
4359 | 150 GtkWidget *info; |
7930 | 151 GtkWidget *send; |
152 GtkWidget *close; /* "x" on the tab */ | |
6392
e9974608b319
[gaim-migrate @ 6897]
Christian Hammond <chipx86@chipx86.com>
parents:
5908
diff
changeset
|
153 GtkWidget *icon; |
4359 | 154 GtkWidget *tab_label; |
6771
8eebba08b44b
[gaim-migrate @ 7308]
Christian Hammond <chipx86@chipx86.com>
parents:
6392
diff
changeset
|
155 GtkWidget *menu_icon; |
8eebba08b44b
[gaim-migrate @ 7308]
Christian Hammond <chipx86@chipx86.com>
parents:
6392
diff
changeset
|
156 GtkWidget *menu_label; |
4359 | 157 GtkSizeGroup *sg; |
158 | |
159 GtkWidget *bbox; | |
160 GtkWidget *sw; | |
9332 | 161 GtkWidget *lower_hbox; |
4359 | 162 |
8317 | 163 GtkWidget *toolbar; |
4359 | 164 |
165 struct | |
166 { | |
5106 | 167 GtkWidget *image; |
4359 | 168 GtkWidget *log; |
7295 | 169 GtkWidget *search; |
4359 | 170 |
171 } dialogs; | |
172 | |
173 union | |
174 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
175 GaimGtkImPane *im; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
176 GaimGtkChatPane *chat; |
4359 | 177 |
178 } u; | |
179 }; | |
180 | |
181 #define GAIM_GTK_WINDOW(win) \ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
182 ((GaimGtkWindow *)(win)->ui_data) |
4359 | 183 |
184 #define GAIM_GTK_CONVERSATION(conv) \ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
185 ((GaimGtkConversation *)(conv)->ui_data) |
4359 | 186 |
4384
8f633419c837
[gaim-migrate @ 4650]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
187 #define GAIM_IS_GTK_WINDOW(win) \ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
188 (gaim_conv_window_get_ui_ops(win) == gaim_gtk_conversations_get_win_ui_ops()) |
4384
8f633419c837
[gaim-migrate @ 4650]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
189 |
8f633419c837
[gaim-migrate @ 4650]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
190 #define GAIM_IS_GTK_CONVERSATION(conv) \ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6771
diff
changeset
|
191 (gaim_conversation_get_ui_ops(conv) == \ |
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6771
diff
changeset
|
192 gaim_gtk_conversations_get_conv_ui_ops()) |
4359 | 193 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
194 /*@}*/ |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
195 |
4359 | 196 /************************************************************************** |
197 * @name GTK+ Conversation API | |
198 **************************************************************************/ | |
5673
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
199 /*@{*/ |
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
200 |
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
201 /** |
4359 | 202 * Returns the UI operations structure for GTK windows. |
203 * | |
204 * @return The GTK window operations structure. | |
205 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
206 GaimConvWindowUiOps *gaim_gtk_conversations_get_win_ui_ops(void); |
4359 | 207 |
208 /** | |
209 * Returns the UI operations structure for GTK conversations. | |
210 * | |
211 * @return The GTK conversation operations structure. | |
212 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6771
diff
changeset
|
213 GaimConversationUiOps *gaim_gtk_conversations_get_conv_ui_ops(void); |
4359 | 214 |
215 /** | |
216 * Updates the buddy icon on a conversation. | |
217 * | |
218 * @param conv The conversation. | |
219 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
220 void gaim_gtkconv_update_buddy_icon(GaimConversation *conv); |
4359 | 221 |
222 /** | |
223 * Updates the tab positions on all conversation windows to reflect any | |
224 * changed preferences. | |
225 */ | |
226 void gaim_gtkconv_update_tabs(void); | |
227 | |
228 /** | |
229 * Updates the button style on chat windows to reflect any | |
230 * changed preferences. | |
231 */ | |
232 void gaim_gtkconv_update_chat_button_style(); | |
233 | |
234 /** | |
235 * Updates the button style on IM windows to reflect any | |
236 * changed preferences. | |
237 */ | |
238 void gaim_gtkconv_update_im_button_style(); | |
239 | |
240 /** | |
241 * Updates conversation buttons by protocol. | |
242 * | |
243 * @param conv The conversation. | |
244 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5674
diff
changeset
|
245 void gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv); |
4359 | 246 |
247 /** | |
248 * Returns the window at the specified X, Y location. | |
249 * | |
250 * If the window is not a GTK+ window, @c NULL is returned. | |
251 * | |
252 * @param x The X coordinate. | |
253 * @param y The Y coordinate. | |
254 * | |
255 * @return The GTK+ window at the location, if it exists, or @c NULL otherwise. | |
256 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
257 GaimConvWindow *gaim_gtkwin_get_at_xy(int x, int y); |
4359 | 258 |
259 /** | |
260 * Returns the index of the tab at the specified X, Y location in a notebook. | |
261 * | |
262 * @param win The GTK+ window containing the notebook. | |
263 * @param x The X coordinate. | |
264 * @param y The Y coordinate. | |
265 * | |
266 * @return The index of the tab at the location. | |
267 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
268 int gaim_gtkconv_get_tab_at_xy(GaimConvWindow *win, int x, int y); |
4359 | 269 |
270 /** | |
271 * Returns the index of the destination tab at the | |
272 * specified X, Y location in a notebook. | |
273 * | |
274 * This is used for drag-and-drop functions when the tab at the index | |
275 * is a destination tab. | |
276 * | |
277 * @param win The GTK+ window containing the notebook. | |
278 * @param x The X coordinate. | |
279 * @param y The Y coordinate. | |
280 * | |
281 * @return The index of the tab at the location. | |
282 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
283 int gaim_gtkconv_get_dest_tab_at_xy(GaimConvWindow *win, int x, int y); |
4359 | 284 |
5673
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
285 /*@}*/ |
62f57ec16f29
[gaim-migrate @ 6091]
Christian Hammond <chipx86@chipx86.com>
parents:
5167
diff
changeset
|
286 |
8582
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
287 /**************************************************************************/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
288 /** @name GTK+ Conversations Subsystem */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
289 /**************************************************************************/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
290 /*@{*/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
291 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
292 /** |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
293 * Returns the gtk conversations subsystem handle. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
294 * |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
295 * @return The conversations subsystem handle. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
296 */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
297 void *gaim_gtk_conversations_get_handle(void); |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
298 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
299 /** |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
300 * Initializes the GTK+ conversations subsystem. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
301 */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
302 void gaim_gtk_conversations_init(void); |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
303 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
304 /** |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
305 * Uninitialized the GTK+ conversation subsystem. |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
306 */ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
307 void gaim_gtk_conversations_uninit(void); |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
308 |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
309 /*@}*/ |
d7c85220c685
[gaim-migrate @ 9332]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
310 |
4359 | 311 #endif /* _GAIM_GTK_CONVERSATION_H_ */ |