Add to git.
[monolith.git] / chat / ml_chat_window.h
1 /* Monolith chat window.
2  * - by Richard W.M. Jones <rich@annexia.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  * $Id: ml_chat_window.h,v 1.3 2003/02/22 15:34:28 rich Exp $
19  */
20
21 #ifndef ML_CHAT_WINDOW_H
22 #define ML_CHAT_WINDOW_H
23
24 #include <monolith.h>
25
26 /* Function: ml_chat_window - monolith chat window
27  *
28  * This is the monolith chat window. The chat window displays the
29  * contents of one chat room in an ordinary browser without requiring
30  * anything beyond HTML and some very simple Javascript.
31  *
32  * Chat isn't a normal widget because it makes complex use of frames.
33  *
34  * @code{ml_chat_window} creates a new frameset. You would normally
35  * set this function as a callback function from a popup button
36  * (see @code{new_ml_button(3)}, @code{ml_button_set_popup(3)},
37  * @code{ml_button_set_callback(3)}).
38  *
39  * @code{ml_chat_window_args} must be a pointer to a
40  * @code{struct ml_chat_window_args}. This structure has the following
41  * required fields:
42  *
43  * @code{conninfo}: The database connection.
44  *
45  * @code{resname}: The name of the chat room (in the @code{ml_resources}
46  * database table).
47  *
48  * See also: @ref{new_ml_chat_button(3)}.
49  */
50 extern void ml_chat_window (ml_session, void *ml_chat_window_args);
51
52 /* You must pass a pointer to this structure as the second argument
53  * to ml_chat_window.
54  */
55 struct ml_chat_window_args
56 {
57   const char *conninfo;         /* Database connection. */
58   const char *resname;          /* Chat room name. */
59 };
60
61 #endif /* ML_CHAT_WINDOW_H */