/*
** Chat Window Class Header
*/

#include <sys/types.h>

#include "include/mui.h"

#ifndef AMSTER_CHAT_H
#define AMSTER_CHAT_H

typedef struct channel_struct {
	struct channel_struct *next;
	int joinflag;
	char *name;
	u_long *win;
} *channel, _channel;

struct chatdata {
	_channel chn;
	u_long *rect,*chantxt,*topicstr;
	u_long *msglist,*userlist;
	u_long *msgstr;
};

struct ChannelUserData {
	char *Name;
	int Shares;
	int Link;
	char *Display; /* storage for the display hook */
};

/* Global variables */

extern channel chat_chans;

/* Global prototypes */

MUIF chat_dispatch(REG(a0) struct IClass *cl,REG(a2) Object *obj,REG(a1) Msg msg);
extern channel chat_findchan(char *name);

#define CHAT_COMMAND       0x9001
#define CHAT_JOINCHANNEL   0x9005
#define CHAT_JOINACK       0x9010
#define CHAT_PUBLICMSGRECV 0x9011
#define CHAT_JOINMSG       0x9012
#define CHAT_CHANNELTOPIC  0x9013
#define CHAT_USERPART      0x9014
#define CHAT_CHANNELPART   0x9015
#define CHAT_USERLIST      0x9016

#endif	/* AMSTER_CHAT_H */
