Re-arrange GG edisc file to avoid prototypes.
[pidgin-git.git] / finch / gntconv.h
blob609e7a7a9ba664c01cca90588ec61396bfb36a9b
1 /*
2 * finch
4 * Finch is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
6 * source distribution.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef FINCH_CONV_H
24 #define FINCH_CONV_H
26 /**
27 * SECTION:gntconv
28 * @section_id: finch-gntconv
29 * @short_description: <filename>gntconv.h</filename>
30 * @title: Conversation API
33 #include <gnt.h>
34 #include <gntwidget.h>
35 #include <gntmenuitem.h>
37 #include "conversation.h"
39 /* Grabs the conv out of a PurpleConverstation */
40 #define FINCH_CONV(conv) ((FinchConv *)purple_conversation_get_ui_data(conv))
42 /***************************************************************************
43 * GNT Conversations API
44 ***************************************************************************/
46 typedef struct _FinchConv FinchConv;
47 typedef struct _FinchConvChat FinchConvChat;
48 typedef struct _FinchConvIm FinchConvIm;
50 /**
51 * FinchConversationFlag:
52 * @FINCH_CONV_NO_SOUND: A flag to mute a conversation.
54 * Flags that can be set for each conversation.
56 typedef enum
58 FINCH_CONV_NO_SOUND = 1 << 0,
59 } FinchConversationFlag;
61 /**
62 * FinchConv:
63 * @list: A list of conversations being displayed in this window.
64 * @active_conv: The active conversation.
65 * @window: The #GntWindow for the conversation.
66 * @entry: The #GntEntry for input.
67 * @tv: The #GntTextView that displays the history.
68 * @menu: The menu for the conversation.
69 * @info: The info widget that shows the information about the conversation.
70 * @plugins: The #GntMenuItem for plugins.
71 * @flags: The flags for the conversation.
73 * A Finch conversation.
75 struct _FinchConv
77 GList *list;
78 PurpleConversation *active_conv;
80 GntWidget *window; /* the container */
81 GntWidget *entry; /* entry */
82 GntWidget *tv; /* text-view */
83 GntWidget *menu;
84 GntWidget *info;
85 GntMenuItem *plugins;
86 FinchConversationFlag flags;
88 union
90 FinchConvChat *chat;
91 FinchConvIm *im;
92 } u;
95 /**
96 * FinchConvChat:
97 * @userlist: The widget that displays the users in the chat.
99 * The chat specific implementation for a conversation.
101 struct _FinchConvChat
103 GntWidget *userlist; /* the userlist */
105 /*< private >*/
106 void *finch_reserved1;
107 void *finch_reserved2;
108 void *finch_reserved3;
109 void *finch_reserved4;
113 * FinchConvIm:
114 * @sendto: The sendto widget which allows the user to select who they're
115 * messaging.
116 * @e2ee_menu: The end-to-end-encryption widget which lets the user configure
117 * the encryption.
119 * The instant message implementation for a conversation.
121 struct _FinchConvIm
123 GntMenuItem *sendto;
124 GntMenuItem *e2ee_menu;
126 /*< private >*/
127 void *finch_reserved1;
128 void *finch_reserved2;
129 void *finch_reserved3;
130 void *finch_reserved4;
134 * finch_conv_get_ui_ops:
136 * Get the ui-functions.
138 * Returns: The PurpleConversationUiOps populated with the appropriate functions.
140 PurpleConversationUiOps *finch_conv_get_ui_ops(void);
143 * finch_conversation_init:
145 * Perform the necessary initializations.
147 void finch_conversation_init(void);
150 * finch_conversation_uninit:
152 * Perform the necessary uninitializations.
154 void finch_conversation_uninit(void);
157 * finch_conversation_set_active:
158 * @conv: The conversation to make active.
160 * Set a conversation as active in a contactized conversation
162 void finch_conversation_set_active(PurpleConversation *conv);
165 * finch_conversation_set_info_widget:
166 * @conv: The conversation.
167 * @widget: The widget containing the information. If %NULL,
168 * the current information widget is removed.
170 * Sets the information widget for the conversation window.
172 void finch_conversation_set_info_widget(PurpleConversation *conv, GntWidget *widget);
174 #endif /* FINCH_CONV_H */