00001 00006 /* finch 00007 * 00008 * Finch is the legal property of its developers, whose names are too numerous 00009 * to list here. Please refer to the COPYRIGHT file distributed with this 00010 * source distribution. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 00025 */ 00026 #ifndef _GNT_CONV_H 00027 #define _GNT_CONV_H 00028 00029 #include <gnt.h> 00030 #include <gntwidget.h> 00031 #include <gntmenuitem.h> 00032 00033 #include "conversation.h" 00034 00035 /* Grabs the conv out of a PurpleConverstation */ 00036 #define FINCH_CONV(conv) ((FinchConv *)(conv)->ui_data) 00037 00038 /*************************************************************************** 00039 * @name GNT Conversations API 00040 ***************************************************************************/ 00043 typedef struct _FinchConv FinchConv; 00044 typedef struct _FinchConvChat FinchConvChat; 00045 typedef struct _FinchConvIm FinchConvIm; 00046 00047 typedef enum 00048 { 00049 FINCH_CONV_NO_SOUND = 1 << 0, 00050 } FinchConversationFlag; 00051 00052 struct _FinchConv 00053 { 00054 GList *list; 00055 PurpleConversation *active_conv; 00056 00057 GntWidget *window; /* the container */ 00058 GntWidget *entry; /* entry */ 00059 GntWidget *tv; /* text-view */ 00060 GntWidget *menu; 00061 GntWidget *info; 00062 FinchConversationFlag flags; 00063 00064 union 00065 { 00066 FinchConvChat *chat; 00067 FinchConvIm *im; 00068 } u; 00069 }; 00070 00071 struct _FinchConvChat 00072 { 00073 GntWidget *userlist; /* the userlist */ 00074 void *pad1; 00075 void *pad2; 00076 }; 00077 00078 struct _FinchConvIm 00079 { 00080 GntMenuItem *sendto; 00081 void *something_for_later; 00082 }; 00083 00089 PurpleConversationUiOps *finch_conv_get_ui_ops(void); 00090 00094 void finch_conversation_init(void); 00095 00099 void finch_conversation_uninit(void); 00100 00106 void finch_conversation_set_active(PurpleConversation *conv); 00107 00115 void finch_conversation_set_info_widget(PurpleConversation *conv, GntWidget *widget); 00116 00119 #endif