Mercurial > pidgin.yaz
comparison src/gtkconv.h @ 5676:dae79aefac8d
[gaim-migrate @ 6094]
I've been meaning to do this for a LONG time. The conversation API now
follows the naming convention of the rest of the new APIs. I'll get some
g_return_*_if_fail() checks in there soon.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 02 Jun 2003 21:51:06 +0000 |
parents | 2d86a5fa6fef |
children | 059d95c67cda |
comparison
equal
deleted
inserted
replaced
5675:17e345ffeddb | 5676:dae79aefac8d |
---|---|
22 */ | 22 */ |
23 | 23 |
24 #ifndef _GAIM_GTK_CONVERSATION_H_ | 24 #ifndef _GAIM_GTK_CONVERSATION_H_ |
25 #define _GAIM_GTK_CONVERSATION_H_ | 25 #define _GAIM_GTK_CONVERSATION_H_ |
26 | 26 |
27 #include "conversation.h" | |
28 | |
27 /************************************************************************** | 29 /************************************************************************** |
28 * @name Structures | 30 * @name Structures |
29 **************************************************************************/ | 31 **************************************************************************/ |
30 | 32 /*@{*/ |
31 struct gaim_gtk_window; | 33 |
32 struct gaim_gtk_conversation; | 34 typedef struct _GaimGtkWindow GaimGtkWindow; |
33 struct gaim_gtk_im_pane; | 35 typedef struct _GaimGtkImPane GaimGtkImPane; |
34 struct gaim_gtk_chat_pane; | 36 typedef struct _GaimGtkChatPane GaimGtkChatPane; |
37 typedef struct _GaimGtkConversation GaimGtkConversation; | |
35 | 38 |
36 /** | 39 /** |
37 * A GTK+ representation of a graphical window containing one or more | 40 * A GTK+ representation of a graphical window containing one or more |
38 * conversations. | 41 * conversations. |
39 */ | 42 */ |
40 struct gaim_gtk_window | 43 struct _GaimGtkWindow |
41 { | 44 { |
42 GtkWidget *window; /**< The window. */ | 45 GtkWidget *window; /**< The window. */ |
43 GtkWidget *notebook; /**< The notebook of conversations. */ | 46 GtkWidget *notebook; /**< The notebook of conversations. */ |
44 | 47 |
45 struct | 48 struct |
69 }; | 72 }; |
70 | 73 |
71 /** | 74 /** |
72 * GTK+ Instant Message panes. | 75 * GTK+ Instant Message panes. |
73 */ | 76 */ |
74 struct gaim_gtk_im_pane | 77 struct _GaimGtkImPane |
75 { | 78 { |
76 GtkWidget *warn; | 79 GtkWidget *warn; |
77 GtkWidget *block; | 80 GtkWidget *block; |
78 GtkWidget *add; | 81 GtkWidget *add; |
79 GtkWidget *sep1; | 82 GtkWidget *sep1; |
92 }; | 95 }; |
93 | 96 |
94 /** | 97 /** |
95 * GTK+ Chat panes. | 98 * GTK+ Chat panes. |
96 */ | 99 */ |
97 struct gaim_gtk_chat_pane | 100 struct _GaimGtkChatPane |
98 { | 101 { |
99 GtkWidget *count; | 102 GtkWidget *count; |
100 GtkWidget *list; | 103 GtkWidget *list; |
101 GtkWidget *whisper; | 104 GtkWidget *whisper; |
102 GtkWidget *invite; | 105 GtkWidget *invite; |
104 }; | 107 }; |
105 | 108 |
106 /** | 109 /** |
107 * A GTK+ conversation pane. | 110 * A GTK+ conversation pane. |
108 */ | 111 */ |
109 struct gaim_gtk_conversation | 112 struct _GaimGtkConversation |
110 { | 113 { |
111 gboolean make_sound; | 114 gboolean make_sound; |
112 gboolean has_font; | 115 gboolean has_font; |
113 char fontface[128]; | 116 char fontface[128]; |
114 GdkColor fg_color; | 117 GdkColor fg_color; |
167 | 170 |
168 } dialogs; | 171 } dialogs; |
169 | 172 |
170 union | 173 union |
171 { | 174 { |
172 struct gaim_gtk_im_pane *im; | 175 GaimGtkImPane *im; |
173 struct gaim_gtk_chat_pane *chat; | 176 GaimGtkChatPane *chat; |
174 | 177 |
175 } u; | 178 } u; |
176 }; | 179 }; |
177 | 180 |
178 #define GAIM_GTK_WINDOW(win) \ | 181 #define GAIM_GTK_WINDOW(win) \ |
179 ((struct gaim_gtk_window *)(win)->ui_data) | 182 ((GaimGtkWindow *)(win)->ui_data) |
180 | 183 |
181 #define GAIM_GTK_CONVERSATION(conv) \ | 184 #define GAIM_GTK_CONVERSATION(conv) \ |
182 ((struct gaim_gtk_conversation *)(conv)->ui_data) | 185 ((GaimGtkConversation *)(conv)->ui_data) |
183 | 186 |
184 #define GAIM_IS_GTK_WINDOW(win) \ | 187 #define GAIM_IS_GTK_WINDOW(win) \ |
185 (gaim_window_get_ui_ops(win) == gaim_get_gtk_window_ui_ops()) | 188 (gaim_window_get_ui_ops(win) == gaim_get_gtk_window_ui_ops()) |
186 | 189 |
187 #define GAIM_IS_GTK_CONVERSATION(conv) \ | 190 #define GAIM_IS_GTK_CONVERSATION(conv) \ |
188 (gaim_conversation_get_ui_ops(conv) == gaim_get_gtk_conversation_ui_ops()) | 191 (gaim_conversation_get_ui_ops(conv) == gaim_get_gtk_conversation_ui_ops()) |
192 | |
193 /*@}*/ | |
189 | 194 |
190 /************************************************************************** | 195 /************************************************************************** |
191 * @name GTK+ Conversation API | 196 * @name GTK+ Conversation API |
192 **************************************************************************/ | 197 **************************************************************************/ |
193 /*@{*/ | 198 /*@{*/ |
200 /** | 205 /** |
201 * Returns the UI operations structure for GTK windows. | 206 * Returns the UI operations structure for GTK windows. |
202 * | 207 * |
203 * @return The GTK window operations structure. | 208 * @return The GTK window operations structure. |
204 */ | 209 */ |
205 struct gaim_window_ui_ops *gaim_get_gtk_window_ui_ops(void); | 210 GaimWindowUiOps *gaim_get_gtk_window_ui_ops(void); |
206 | 211 |
207 /** | 212 /** |
208 * Returns the UI operations structure for GTK conversations. | 213 * Returns the UI operations structure for GTK conversations. |
209 * | 214 * |
210 * @return The GTK conversation operations structure. | 215 * @return The GTK conversation operations structure. |
211 */ | 216 */ |
212 struct gaim_conversation_ui_ops *gaim_get_gtk_conversation_ui_ops(void); | 217 GaimConversationUiOps *gaim_get_gtk_conversation_ui_ops(void); |
213 | 218 |
214 /** | 219 /** |
215 * Updates the buddy icon on a conversation. | 220 * Updates the buddy icon on a conversation. |
216 * | 221 * |
217 * @param conv The conversation. | 222 * @param conv The conversation. |
218 */ | 223 */ |
219 void gaim_gtkconv_update_buddy_icon(struct gaim_conversation *conv); | 224 void gaim_gtkconv_update_buddy_icon(GaimConversation *conv); |
220 | 225 |
221 /** | 226 /** |
222 * Updates the font buttons on all conversations to reflect any changed | 227 * Updates the font buttons on all conversations to reflect any changed |
223 * preferences. | 228 * preferences. |
224 */ | 229 */ |
228 * Updates the font colors of each conversation to the new colors | 233 * Updates the font colors of each conversation to the new colors |
229 * chosen in the prefs dialog. | 234 * chosen in the prefs dialog. |
230 * | 235 * |
231 * @param conv The conversation to update. | 236 * @param conv The conversation to update. |
232 */ | 237 */ |
233 void gaim_gtkconv_update_font_colors(struct gaim_conversation *conv); | 238 void gaim_gtkconv_update_font_colors(GaimConversation *conv); |
234 | 239 |
235 /** | 240 /** |
236 * Updates the font faces of each conversation to the new font | 241 * Updates the font faces of each conversation to the new font |
237 * face chosen in the prefs dialog. | 242 * face chosen in the prefs dialog. |
238 * | 243 * |
239 * @param conv The conversation to update. | 244 * @param conv The conversation to update. |
240 */ | 245 */ |
241 void gaim_gtkconv_update_font_face(struct gaim_conversation *conv); | 246 void gaim_gtkconv_update_font_face(GaimConversation *conv); |
242 | 247 |
243 /** | 248 /** |
244 * Updates the tab positions on all conversation windows to reflect any | 249 * Updates the tab positions on all conversation windows to reflect any |
245 * changed preferences. | 250 * changed preferences. |
246 */ | 251 */ |
261 /** | 266 /** |
262 * Updates conversation buttons by protocol. | 267 * Updates conversation buttons by protocol. |
263 * | 268 * |
264 * @param conv The conversation. | 269 * @param conv The conversation. |
265 */ | 270 */ |
266 void gaim_gtkconv_update_buttons_by_protocol(struct gaim_conversation *conv); | 271 void gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv); |
267 | 272 |
268 /** | 273 /** |
269 * Returns the window at the specified X, Y location. | 274 * Returns the window at the specified X, Y location. |
270 * | 275 * |
271 * If the window is not a GTK+ window, @c NULL is returned. | 276 * If the window is not a GTK+ window, @c NULL is returned. |
273 * @param x The X coordinate. | 278 * @param x The X coordinate. |
274 * @param y The Y coordinate. | 279 * @param y The Y coordinate. |
275 * | 280 * |
276 * @return The GTK+ window at the location, if it exists, or @c NULL otherwise. | 281 * @return The GTK+ window at the location, if it exists, or @c NULL otherwise. |
277 */ | 282 */ |
278 struct gaim_window *gaim_gtkwin_get_at_xy(int x, int y); | 283 GaimWindow *gaim_gtkwin_get_at_xy(int x, int y); |
279 | 284 |
280 /** | 285 /** |
281 * Returns the index of the tab at the specified X, Y location in a notebook. | 286 * Returns the index of the tab at the specified X, Y location in a notebook. |
282 * | 287 * |
283 * @param win The GTK+ window containing the notebook. | 288 * @param win The GTK+ window containing the notebook. |
284 * @param x The X coordinate. | 289 * @param x The X coordinate. |
285 * @param y The Y coordinate. | 290 * @param y The Y coordinate. |
286 * | 291 * |
287 * @return The index of the tab at the location. | 292 * @return The index of the tab at the location. |
288 */ | 293 */ |
289 int gaim_gtkconv_get_tab_at_xy(struct gaim_window *win, int x, int y); | 294 int gaim_gtkconv_get_tab_at_xy(GaimWindow *win, int x, int y); |
290 | 295 |
291 /** | 296 /** |
292 * Returns the index of the destination tab at the | 297 * Returns the index of the destination tab at the |
293 * specified X, Y location in a notebook. | 298 * specified X, Y location in a notebook. |
294 * | 299 * |
299 * @param x The X coordinate. | 304 * @param x The X coordinate. |
300 * @param y The Y coordinate. | 305 * @param y The Y coordinate. |
301 * | 306 * |
302 * @return The index of the tab at the location. | 307 * @return The index of the tab at the location. |
303 */ | 308 */ |
304 int gaim_gtkconv_get_dest_tab_at_xy(struct gaim_window *win, int x, int y); | 309 int gaim_gtkconv_get_dest_tab_at_xy(GaimWindow *win, int x, int y); |
305 | 310 |
306 /*@}*/ | 311 /*@}*/ |
307 | 312 |
308 #endif /* _GAIM_GTK_CONVERSATION_H_ */ | 313 #endif /* _GAIM_GTK_CONVERSATION_H_ */ |