finch/gntconv.h

Thu, 14 Jun 2007 03:54:49 +0000

author
Eric Polino <aluink@pidgin.im>
date
Thu, 14 Jun 2007 03:54:49 +0000
branch
soc.2007.finchfeat
changeset 18155
3bb5605ea11e
parent 16734
5e864cace440
child 19453
4de383712964
permissions
-rw-r--r--

Added sound to Finch.

Currently it's directly into Finch, but later we'll most likely move it into a plugin since some have argued well that sound in a console app might not be an all around favored thing.

14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
1 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
2 * @file gntconv.h GNT Conversation API
16255
fa61ee19f526 Rename the Doxygen group from gntui to finch and define the finch group
Richard Laager <rlaager@pidgin.im>
parents: 16229
diff changeset
3 * @ingroup finch
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
4 *
15931
716b5fac1895 Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents: 15906
diff changeset
5 * finch
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
6 *
15931
716b5fac1895 Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents: 15906
diff changeset
7 * Finch is the legal property of its developers, whose names are too numerous
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
9 * source distribution.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
10 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
11 * This program is free software; you can redistribute it and/or modify
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
12 * it under the terms of the GNU General Public License as published by
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
14 * (at your option) any later version.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
15 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
16 * This program is distributed in the hope that it will be useful,
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
19 * GNU General Public License for more details.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
20 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
21 * You should have received a copy of the GNU General Public License
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
22 * along with this program; if not, write to the Free Software
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
24 */
14260
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
25 #ifndef _GNT_CONV_H
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
26 #define _GNT_CONV_H
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
27
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
28 #include <gnt.h>
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
29 #include <gntwidget.h>
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
30
13947
a77f6f615c20 [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
31 #include "conversation.h"
a77f6f615c20 [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
32
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents: 16734
diff changeset
33 /* Grabs the conv out of a PurpleConverstation */
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents: 16734
diff changeset
34 #define FINCH_CONV(conv) ((FinchConv *)(conv)->ui_data)
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents: 16734
diff changeset
35
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
36 /***************************************************************************
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
37 * @name GNT Conversations API
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
38 ***************************************************************************/
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
39 /*@{*/
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
40
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
41 typedef struct _FinchConv FinchConv;
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
42 typedef struct _FinchConvChat FinchConvChat;
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
43 typedef struct _FinchConvIm FinchConvIm;
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
44
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
45 struct _FinchConv
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
46 {
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
47 GList *list;
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15878
diff changeset
48 PurpleConversation *active_conv;
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
49
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
50 GntWidget *window; /* the container */
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
51 GntWidget *entry; /* entry */
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
52 GntWidget *tv; /* text-view */
16191
20ff5f666ac6 Add this now so we don't break abi right after release
Richard Nelson <wabz@pidgin.im>
parents: 15931
diff changeset
53 GntWidget *menu; /* future use */
16190
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
54 GntWidget *info;
16734
5e864cace440 Preemptive padding.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 16255
diff changeset
55 void *pad;
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
56
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
57 union
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
58 {
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
59 FinchConvChat *chat;
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
60 FinchConvIm *im;
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
61 } u;
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
62 };
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
63
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
64 struct _FinchConvChat
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
65 {
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
66 GntWidget *userlist; /* the userlist */
16734
5e864cace440 Preemptive padding.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 16255
diff changeset
67 void *pad1;
5e864cace440 Preemptive padding.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 16255
diff changeset
68 void *pad2;
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
69 };
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
70
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
71 struct _FinchConvIm
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
72 {
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
73 void *nothing_for_now;
16734
5e864cace440 Preemptive padding.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 16255
diff changeset
74 void *something_for_later;
14777
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
75 };
c0ad17caf8ad [gaim-migrate @ 17469]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14620
diff changeset
76
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
77 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
78 * Get the ui-functions.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
79 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15878
diff changeset
80 * @return The PurpleConversationUiOps populated with the appropriate functions.
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
81 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15878
diff changeset
82 PurpleConversationUiOps *finch_conv_get_ui_ops(void);
14260
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
83
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
84 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
85 * Perform the necessary initializations.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
86 */
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
87 void finch_conversation_init(void);
13947
a77f6f615c20 [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
88
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
89 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
90 * Perform the necessary uninitializations.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
91 */
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14777
diff changeset
92 void finch_conversation_uninit(void);
13969
0541f389442e [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13947
diff changeset
93
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
94 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
95 * Set a conversation as active in a contactized conversation
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
96 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
97 * @param conv The conversation to make active.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
98 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15878
diff changeset
99 void finch_conversation_set_active(PurpleConversation *conv);
14450
1ac2b6e98ef8 [gaim-migrate @ 17094]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
100
16190
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
101 /**
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
102 * Sets the information widget for the conversation window.
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
103 *
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
104 * @param conv The conversation.
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
105 * @param widget The widget containing the information. If @c NULL,
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
106 * the current information widget is removed.
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
107 */
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
108 void finch_conversation_set_info_widget(PurpleConversation *conv, GntWidget *widget);
435e34f11655 Allow adding information widgets in the conversation window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15931
diff changeset
109
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
110 /*@}*/
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14450
diff changeset
111
14260
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
112 #endif

mercurial