merge of '134eb2e58f255d14d53d8b9463921ce7edb9aa36'
[pidgin-git.git] / finch / gntconv.h
blob52389232f9333c88c4f190a383cca0bdc4d6503e
1 /**
2 * @file gntconv.h GNT Conversation API
3 * @ingroup finch
5 * finch
7 * Finch 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.
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.
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.
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
25 #ifndef _GNT_CONV_H
26 #define _GNT_CONV_H
28 #include <gnt.h>
29 #include <gntwidget.h>
31 #include "conversation.h"
33 /***************************************************************************
34 * @name GNT Conversations API
35 ***************************************************************************/
36 /*@{*/
38 typedef struct _FinchConv FinchConv;
39 typedef struct _FinchConvChat FinchConvChat;
40 typedef struct _FinchConvIm FinchConvIm;
42 struct _FinchConv
44 GList *list;
45 PurpleConversation *active_conv;
47 GntWidget *window; /* the container */
48 GntWidget *entry; /* entry */
49 GntWidget *tv; /* text-view */
50 GntWidget *menu; /* future use */
51 GntWidget *info;
52 void *pad;
54 union
56 FinchConvChat *chat;
57 FinchConvIm *im;
58 } u;
61 struct _FinchConvChat
63 GntWidget *userlist; /* the userlist */
64 void *pad1;
65 void *pad2;
68 struct _FinchConvIm
70 void *nothing_for_now;
71 void *something_for_later;
74 /**
75 * Get the ui-functions.
77 * @return The PurpleConversationUiOps populated with the appropriate functions.
79 PurpleConversationUiOps *finch_conv_get_ui_ops(void);
81 /**
82 * Perform the necessary initializations.
84 void finch_conversation_init(void);
86 /**
87 * Perform the necessary uninitializations.
89 void finch_conversation_uninit(void);
91 /**
92 * Set a conversation as active in a contactized conversation
94 * @param conv The conversation to make active.
96 void finch_conversation_set_active(PurpleConversation *conv);
98 /**
99 * Sets the information widget for the conversation window.
101 * @param conv The conversation.
102 * @param widget The widget containing the information. If @c NULL,
103 * the current information widget is removed.
105 void finch_conversation_set_info_widget(PurpleConversation *conv, GntWidget *widget);
107 /*@}*/
109 #endif