# HG changeset patch # User Eric Warmenhoven # Date 1002102513 0 # Node ID 5473c8c5378defc9af6f1daa756a9224c91a5e80 # Parent 61b816a7b4678d7de90d392f6caafdb5b2f51298 [gaim-migrate @ 2430] boo-yah! committer: Tailor Script diff -r 61b816a7b467 -r 5473c8c5378d TODO --- a/TODO Wed Oct 03 07:49:38 2001 +0000 +++ b/TODO Wed Oct 03 09:48:33 2001 +0000 @@ -2,30 +2,29 @@ GPG Encryption of messages Have plugin_event use varargs instead of void* Separate core functions from UI stuff. - about.c, applet.[ch], away.c, buddy.c, conversation.c, convo.h, - dialogs.c, multi.c, gtk*, prefs.c, prpl.c, sound.c, ticker.c + about.c, applet.[ch], away.c, browser.c, buddy.c, conversation.c, + convo.h, dialogs.c, gtk*, plugins.c, prefs.c, prpl.c, sound.c, + ticker.c, ui.h little to no work (mostly GTK) - gaimrc.c, html.c, list.c, proxy.[ch], prpl.h, server.c, util.c + core.[ch], html.c, list.c, module.c, multi.h, proxy.[ch], perl.c, + prpl.h, util.c little to no work (mostly CORE) + buddy_chat.c, gaim.h, idle.c, multi.c, server.c + standard splitting (for idleness, core needs to be in + charge of gaim-use idleness) + aim.c - need to redo main() completely - current main should be moved mostly to core - GTK main should connect to core - browser.c - let the UI deal with this? little to no work. - buddy_chat.c - need to move out non-GTK functions. some work. - gaim.h - need to separate into core.h and ui.h. - idle.c - Need to figure out how to report idle times when there's - more than one UI - multi.h - need to separate GTK out of gaim_connection - perl.c - Uh. Might need to do some splitting. - plugins.c - Split the selection dialog with the loading/unloading - - Need to figure out how plugins are going to interact - with UIs, though UIs are separate programs. - Need to create struct buddy_chat, move struct conversation's in_room and - ignored there, and copy id and name. + gaimrc.c - Need to figure out how to save UI preferences + + Ideally at the end of this the prpls should only need to include + prpl.h and they'll get everything they need without anything + *cough*GTK*cough* that they don't. + Need to write the core side of the core-ui protocol - Need to add in core.c to deal with sockets, etc. (Already written) ---- THE PROTOCOLS: @@ -75,6 +74,11 @@ Zephyr: God help us. +Gadu-Gadu: + New User Registration + There's probably 100 other things but since I've hardly used the Windows + client before I'm not sure what any of them are + Future Plugins? : ICQ through Oscar plugin (ICQ2000) (requires hacking libfaim :-/) this would allow us to send SMS messages. @@ -102,6 +106,8 @@ of the states, and you'd see "Away" with a menu of all the away messages you have. + Need to write the ui side of the core-ui protocol + Syd is cool and gave all of these ideas: Have multiple tickers in the same window, one for buddies like it is now, one for who just came online/offline diff -r 61b816a7b467 -r 5473c8c5378d plugins/chatlist.c --- a/plugins/chatlist.c Wed Oct 03 07:49:38 2001 +0000 +++ b/plugins/chatlist.c Wed Oct 03 09:48:33 2001 +0000 @@ -11,6 +11,8 @@ #include #include +#define AOL_SRCHSTR "/community/aimcheck.adp/url=" + struct chat_page { GtkWidget *list1; GtkWidget *list2; diff -r 61b816a7b467 -r 5473c8c5378d src/applet.h --- a/src/applet.h Wed Oct 03 07:49:38 2001 +0000 +++ b/src/applet.h Wed Oct 03 09:48:33 2001 +0000 @@ -28,8 +28,8 @@ ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** **************************************************************/ -#ifndef _GAIMGNOMEAPPLETMGR_H_ -#define _GAIMGNOMEAPPLETMGR_H_ +#ifndef _APPLET_H_ +#define _APPLET_H_ #ifdef USE_APPLET #include @@ -84,4 +84,4 @@ extern gboolean applet_buddy_show; #endif /*USE_APPLET*/ -#endif /*_GAIMGNOMEAPPLETMGR_H_*/ +#endif /*_APPLET_H_*/ diff -r 61b816a7b467 -r 5473c8c5378d src/convo.h --- a/src/convo.h Wed Oct 03 07:49:38 2001 +0000 +++ b/src/convo.h Wed Oct 03 09:48:33 2001 +0000 @@ -19,8 +19,8 @@ * */ -#ifndef _GAIMCONVO_H_ -#define _GAIMCONVO_H_ +#ifndef _CONVO_H_ +#define _CONVO_H_ #include #include "gaim.h" @@ -74,4 +74,4 @@ extern gboolean meify(char *); -#endif +#endif /* _CONVO_H_ */ diff -r 61b816a7b467 -r 5473c8c5378d src/core.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/core.h Wed Oct 03 09:48:33 2001 +0000 @@ -0,0 +1,133 @@ +/* + * gaim + * + * Copyright (C) 1998-1999, Mark Spencer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef _CORE_H_ +#define _CORE_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#ifdef GAIM_PLUGINS +#include +#endif + +#include "multi.h" + +enum gaim_event { + event_signon = 0, + event_signoff, + event_away, + event_back, + event_im_recv, + event_im_send, + event_buddy_signon, + event_buddy_signoff, + event_buddy_away, + event_buddy_back, + event_buddy_idle, + event_buddy_unidle, + event_blist_update, + event_chat_invited, + event_chat_join, + event_chat_leave, + event_chat_buddy_join, + event_chat_buddy_leave, + event_chat_recv, + event_chat_send, + event_warned, + event_error, + event_quit, + event_new_conversation, + event_set_info, + event_draw_menu, + event_im_displayed_sent, + event_im_displayed_rcvd, + event_chat_send_invite, + /* any others? it's easy to add... */ +}; + +#ifdef GAIM_PLUGINS + +struct gaim_plugin { + GModule *handle; + char *name; + char *description; +}; + +struct gaim_callback { + GModule *handle; + enum gaim_event event; + void *function; + void *data; +}; + +extern GList *plugins; +extern GList *callbacks; +#endif + +struct buddy { + int edittype; /* CUI: this is really a GUI function and we need to put this in ui.h */ + char name[80]; + char show[80]; + int present; + int evil; + time_t signon; + time_t idle; + int uc; + gushort caps; /* woohoo! */ + void *proto_data; /* what a hack */ + struct gaim_connection *gc; /* the connection it belongs to */ +}; + +struct group { + int edittype; /* CUI: this is really a GUI function and we need to put this in ui.h */ + char name[80]; + GSList *members; + struct gaim_connection *gc; /* the connection it belongs to */ +}; + +/* Functions in buddy.c */ +extern struct buddy *find_buddy(struct gaim_connection *, char *); +extern struct group *find_group(struct gaim_connection *, char *); +extern struct group *find_group_by_buddy(struct gaim_connection *, char *); +extern struct buddy *add_buddy(struct gaim_connection *, char *, char *, char *); +extern void remove_buddy(struct gaim_connection *, struct group *, struct buddy *); +extern struct group *add_group(struct gaim_connection *, char *); +extern void remove_group(struct gaim_connection *, struct group *); +extern void do_export(struct gaim_connection *); +extern void do_import(struct gaim_connection *, char *); +extern int bud_list_cache_exists(struct gaim_connection *); + +/* Functions in server.c */ +extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); +extern void serv_got_im(struct gaim_connection *, char *, char *, guint32, time_t); +extern void serv_got_eviled(struct gaim_connection *, char *, int); +extern void serv_got_chat_invite(struct gaim_connection *, char *, char *, char *, GList *); +extern struct conversation *serv_got_joined_chat(struct gaim_connection *, int, char *); +extern void serv_got_chat_left(struct gaim_connection *, int); +extern void serv_got_chat_in(struct gaim_connection *, int, char *, int, char *, time_t); +extern void serv_finish_login(); + +#endif /* _CORE_H_ */ diff -r 61b816a7b467 -r 5473c8c5378d src/gaim.h --- a/src/gaim.h Wed Oct 03 07:49:38 2001 +0000 +++ b/src/gaim.h Wed Oct 03 09:48:33 2001 +0000 @@ -19,23 +19,18 @@ * */ -#ifndef _GAIM_GAIM_H_ -#define _GAIM_GAIM_H_ +#ifndef _GAIM_H_ +#define _GAIM_H_ #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#ifdef USE_APPLET -#include -#endif /* USE_APPLET */ -#ifdef USE_GNOME -#include -#endif -#include "multi.h" +#include "core.h" +#include "ui.h" +/* CUI: when this is done being split, the only things below should be things + * both the core and the uis depend on e.g. the protocol definitions, etc, and + * it won't include core.h or ui.h (i.e. it'll mostly be #define's) */ #define BROWSER_NETSCAPE 0 @@ -74,28 +69,8 @@ #define AUTO_RESPONSE "<AUTO-REPLY> : " -#define PLUGIN_DIR ".gaim/plugins/" - #define WEBSITE "http://gaim.sourceforge.net/" -#define FACE_ANGEL 0 -#define FACE_BIGSMILE 1 -#define FACE_BURP 2 -#define FACE_CROSSEDLIPS 3 -#define FACE_CRY 4 -#define FACE_EMBARRASSED 5 -#define FACE_KISS 6 -#define FACE_MONEYMOUTH 7 -#define FACE_SAD 8 -#define FACE_SCREAM 9 -#define FACE_SMILE 10 -#define FACE_SMILE8 11 -#define FACE_THINK 12 -#define FACE_TONGUE 13 -#define FACE_WINK 14 -#define FACE_YELL 15 -#define FACE_TOTAL 16 - #ifndef USE_GNOME #ifdef ENABLE_NLS # include @@ -111,8 +86,6 @@ #endif #endif -extern struct debug_window *dw; - struct aim_user { char username[64]; char password[32]; @@ -165,67 +138,6 @@ #define DEFAULT_INFO "Visit the GAIM website at http://gaim.sourceforge.net/." -struct save_pos { - int x; - int y; - int width; - int height; - int xoff; - int yoff; -}; - - -struct window_size { - int width; - int height; - int entry_height; -}; - - -struct option_set { - int *options; - int option; -}; - -struct g_url { - char address[255]; - int port; - char page[255]; -}; - -enum gaim_event { - event_signon = 0, - event_signoff, - event_away, - event_back, - event_im_recv, - event_im_send, - event_buddy_signon, - event_buddy_signoff, - event_buddy_away, - event_buddy_back, - event_buddy_idle, - event_buddy_unidle, - event_blist_update, - event_chat_invited, - event_chat_join, - event_chat_leave, - event_chat_buddy_join, - event_chat_buddy_leave, - event_chat_recv, - event_chat_send, - event_warned, - event_error, - event_quit, - event_new_conversation, - event_set_info, - event_draw_menu, - event_im_displayed_sent, - event_im_displayed_rcvd, - event_chat_send_invite, - /* any others? it's easy to add... */ -}; - enum log_event { log_signon = 0, log_signoff, @@ -236,44 +148,6 @@ log_quit }; -#ifdef GAIM_PLUGINS -#include - -struct gaim_plugin { - GModule *handle; - char *name; - char *description; -}; - -struct gaim_callback { - GModule *handle; - enum gaim_event event; - void *function; - void *data; -}; - -extern GList *plugins; -extern GList *callbacks; -#endif - -#define EDIT_GC 0 -#define EDIT_GROUP 1 -#define EDIT_BUDDY 2 - -struct buddy { - int edittype; - char name[80]; - char show[80]; - int present; - int evil; - time_t signon; - time_t idle; - int uc; - gushort caps; /* woohoo! */ - void *proto_data; /* what a hack */ - struct gaim_connection *gc; /* the connection it belongs to */ -}; - struct log_conversation { char name[80]; char filename[512]; @@ -321,22 +195,6 @@ char message[2048]; }; -struct group { - int edittype; - char name[80]; - GSList *members; - struct gaim_connection *gc; /* the connection it belongs to */ -}; - -struct debug_window { - GtkWidget *window; - GtkWidget *entry; -}; - -#if USE_PIXBUF -#include -#endif - /* struct buddy_chat went away and got merged with this. */ struct conversation { struct gaim_connection *gc; @@ -419,8 +277,6 @@ #define CONVERSATION_TITLE "%s - Gaim" #define LOG_CONVERSATION_TITLE "%s - Gaim (logged)" -#define AOL_SRCHSTR "/community/aimcheck.adp/url=" - /* These should all be runtime selectable */ #define MSG_LEN 2048 @@ -430,18 +286,6 @@ #define BUF_LEN MSG_LEN #define BUF_LONG BUF_LEN * 2 - -#ifdef USE_APPLET -extern GtkWidget *applet; -#endif /* USE_APPLET */ - -/* Globals in dialog.c */ -extern char fontface[64]; -extern int fontsize; -extern GdkColor bgcolor; -extern GdkColor fgcolor; -extern int smiley_array[FACE_TOTAL]; - /* Globals in aim.c */ extern GList *log_conversations; extern GList *buddy_pounces; @@ -452,16 +296,6 @@ extern char *opt_away_arg; extern char *opt_rcfile_arg; -/* Globals in buddy_chat.c */ -/* it is very important that you don't use this for anything. - * its sole purpose is to allow all group chats to be in one - * window. use struct gaim_connection's buddy_chats instead. */ -extern GList *chats; -extern GtkWidget *all_chats; -extern GtkWidget *chat_notebook; - -extern GtkWidget *joinchat; - /* Globals in away.c */ extern struct away_message *awaymessage; extern struct away_message *default_away; @@ -469,14 +303,6 @@ extern GtkWidget *awaymenu; extern GtkWidget *clistqueue; -/* Globals in prpl.c */ -extern GtkWidget *protomenu; - -/* Globals in buddy.c */ -extern GtkWidget *buddies; -extern GtkWidget *bpmenu; -extern GtkWidget *blist; - extern guint misc_options; #define OPT_MISC_DEBUG 0x00000001 #define OPT_MISC_BROWSER_POPUP 0x00000002 @@ -596,10 +422,6 @@ extern struct save_pos blist_pos; extern struct window_size conv_size, buddy_chat_size; -/* Functions in about.c */ -extern void show_about(GtkWidget *, void *); -extern void gaim_help(GtkWidget *, void *); - /* Functions in buddy_chat.c */ extern void join_chat(); extern void chat_write(struct conversation *, char *, int, char *, time_t); @@ -619,7 +441,6 @@ extern void chat_set_topic(struct conversation*, char*, char*); /* Functions in html.c */ -extern struct g_url parse_url(char *); extern void grab_url(char *, void (*callback)(gpointer, char *), gpointer); extern gchar *strip_html(gchar *); @@ -659,7 +480,6 @@ extern void serv_login(struct aim_user *); extern void serv_close(struct gaim_connection *); extern void serv_touch_idle(struct gaim_connection *); -extern void serv_finish_login(); extern int serv_send_im(struct gaim_connection *, char *, char *, int); extern void serv_get_info(struct gaim_connection *, char *); extern void serv_get_dir(struct gaim_connection *, char *); @@ -686,15 +506,6 @@ extern void serv_chat_whisper(struct gaim_connection *, int, char *, char *); extern int serv_chat_send(struct gaim_connection *, int, char *); -/* output from serv */ -extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); -extern void serv_got_im(struct gaim_connection *, char *, char *, guint32, time_t); -extern void serv_got_eviled(struct gaim_connection *, char *, int); -extern void serv_got_chat_invite(struct gaim_connection *, char *, char *, char *, GList *); -extern struct conversation *serv_got_joined_chat(struct gaim_connection *, int, char *); -extern void serv_got_chat_left(struct gaim_connection *, int); -extern void serv_got_chat_in(struct gaim_connection *, int, char *, int, char *, time_t); - /* Functions in conversation.c */ extern void gaim_setup_imhtml(GtkWidget *); extern void update_convo_add_button(struct conversation *); @@ -758,23 +569,13 @@ extern void signoff_all(gpointer, gpointer); extern void do_im_back(); extern void set_buddy(struct gaim_connection *, struct buddy *); -extern void add_category(char *); extern void build_edit_tree(); -extern void remove_person(struct group *, struct buddy *); -extern void remove_category(struct group *); extern void do_pounce(struct gaim_connection *, char *, int); extern void do_bp_menu(); -extern struct buddy *find_buddy(struct gaim_connection *, char *); -extern struct group *find_group(struct gaim_connection *, char *); -extern struct group *find_group_by_buddy(struct gaim_connection *, char *); -extern void remove_buddy(struct gaim_connection *, struct group *, struct buddy *); +extern void ui_add_buddy(struct gaim_connection *, struct group *, struct buddy *); extern void ui_remove_buddy(struct gaim_connection *, struct group *, struct buddy *); -extern struct buddy *add_buddy(struct gaim_connection *, char *, char *, char *); -extern void ui_add_buddy(struct gaim_connection *, struct group *, struct buddy *); -extern void remove_group(struct gaim_connection *, struct group *); +extern void ui_add_group(struct gaim_connection *, struct group *); extern void ui_remove_group(struct gaim_connection *, struct group *); -extern struct group *add_group(struct gaim_connection *, char *); -extern void ui_add_group(struct gaim_connection *, struct group *); extern void toggle_buddy_pixmaps(); extern void gaim_separator(GtkWidget *); extern void redo_buddy_list(); /* you really shouldn't call this function */ @@ -852,7 +653,6 @@ /* Functions in dialogs.c */ extern void alias_dialog_bud(struct buddy *); -extern void do_export(struct gaim_connection *); extern void show_warn_dialog(struct gaim_connection *, char *); extern GtkWidget *do_error_dialog(char *, char *); extern void show_im_dialog(); @@ -881,8 +681,6 @@ extern void show_ee_dialog(int); extern void show_add_link(GtkWidget *,struct conversation *); extern void show_change_passwd(struct gaim_connection *); -extern void do_import(struct gaim_connection *, char *); -extern int bud_list_cache_exists(struct gaim_connection *); extern void show_smiley_dialog(struct conversation *, GtkWidget *); extern void close_smiley_dialog(GtkWidget *widget, struct conversation *c); extern void set_smiley_array(GtkWidget *widget, int smiley_type); @@ -917,4 +715,4 @@ void BuddyTickerSetPixmap(char *, GdkPixmap *, GdkBitmap *); void BuddyTickerSignoff(); -#endif /* _GAIM_GAIM_H_ */ +#endif /* _GAIM_H_ */ diff -r 61b816a7b467 -r 5473c8c5378d src/html.c --- a/src/html.c Wed Oct 03 07:49:38 2001 +0000 +++ b/src/html.c Wed Oct 03 09:48:33 2001 +0000 @@ -36,6 +36,12 @@ #include #include "proxy.h" +struct g_url { + char address[255]; + int port; + char page[255]; +}; + gchar *strip_html(gchar *text) { int i, j, k; @@ -68,7 +74,7 @@ return text2; } -struct g_url parse_url(char *url) +static struct g_url parse_url(char *url) { struct g_url test; char scan_info[255]; diff -r 61b816a7b467 -r 5473c8c5378d src/multi.h --- a/src/multi.h Wed Oct 03 07:49:38 2001 +0000 +++ b/src/multi.h Wed Oct 03 09:48:33 2001 +0000 @@ -19,10 +19,10 @@ * */ -#ifndef _GAIMMULTI_H_ -#define _GAIMMULTI_H_ +#ifndef _MULTI_H_ +#define _MULTI_H_ -#include "gaim.h" +#include "core.h" /* ok. now the fun begins. first we create a connection structure */ struct gaim_connection { @@ -107,4 +107,4 @@ void set_login_progress(struct gaim_connection *, float, char *); void hide_login_progress(struct gaim_connection *, char *); -#endif /* _GAIMMULTI_H_ */ +#endif /* _MULTI_H_ */ diff -r 61b816a7b467 -r 5473c8c5378d src/protocols/zephyr/zephyr.c --- a/src/protocols/zephyr/zephyr.c Wed Oct 03 07:49:38 2001 +0000 +++ b/src/protocols/zephyr/zephyr.c Wed Oct 03 09:48:33 2001 +0000 @@ -373,11 +373,7 @@ away = TRUE; else away = FALSE; - len = MAX(BUF_LONG, strlen(buf2)); - buf = g_malloc(len + 1); - g_snprintf(buf, len + 1, "%s", buf2); - serv_got_im(zgc, notice.z_sender, buf, 0, time((time_t)NULL)); - g_free(buf); + serv_got_im(zgc, notice.z_sender, buf2, 0, time((time_t)NULL)); } else { zephyr_triple *zt1, *zt2; zt1 = new_triple(notice.z_class, notice.z_class_inst, @@ -386,16 +382,12 @@ if (!zt2) { /* we shouldn't be subscribed to this message. ignore. */ } else { - len = MAX(BUF_LONG, strlen(buf2)); - buf = g_malloc(len + 1); - g_snprintf(buf, len + 1, "%s", buf2); if (!zt2->open) { zt2->open = TRUE; serv_got_joined_chat(zgc, zt2->id, zt2->name); } serv_got_chat_in(zgc, zt2->id, notice.z_sender, FALSE, - buf, time((time_t)NULL)); - g_free(buf); + buf2, time((time_t)NULL)); } free_triple(zt1); } diff -r 61b816a7b467 -r 5473c8c5378d src/proxy.h --- a/src/proxy.h Wed Oct 03 07:49:38 2001 +0000 +++ b/src/proxy.h Wed Oct 03 09:48:33 2001 +0000 @@ -23,8 +23,8 @@ prototype-ing stuff and redefine some net function to mask them with some kind of transparent layer */ -#ifndef _INC_PROXY_H -#define _INC_PROXY_H +#ifndef _PROXY_H_ +#define _PROXY_H_ #include #include @@ -54,4 +54,4 @@ extern int proxy_connect(char *host, int port, GaimInputFunction func, gpointer data); -#endif +#endif /* _PROXY_H_ */ diff -r 61b816a7b467 -r 5473c8c5378d src/prpl.c --- a/src/prpl.c Wed Oct 03 07:49:38 2001 +0000 +++ b/src/prpl.c Wed Oct 03 09:48:33 2001 +0000 @@ -19,6 +19,7 @@ * */ +#include "gaim.h" #include "prpl.h" #include #include diff -r 61b816a7b467 -r 5473c8c5378d src/prpl.h --- a/src/prpl.h Wed Oct 03 07:49:38 2001 +0000 +++ b/src/prpl.h Wed Oct 03 09:48:33 2001 +0000 @@ -19,11 +19,15 @@ * */ -#ifndef _GAIMPRPL_H_ -#define _GAIMPRPL_H_ +/* this file should be all that prpls need to include. therefore, by including + * this file, they should get glib, proxy, gaim_connection, prpl, etc. */ +#ifndef _PRPL_H_ +#define _PRPL_H_ + +#include "core.h" +#include "proxy.h" #include "multi.h" -#include #define PROTO_TOC 0 #define PROTO_OSCAR 1 @@ -90,6 +94,12 @@ GList *(* chat_info)(struct gaim_connection *); /* all the server-related functions */ + + /* a lot of these (like get_dir) are protocol-dependent and should be removed. ones like + * set_dir (which is also protocol-dependent) can stay though because there's a dialog + * (i.e. the prpl says you can set your dir info, the ui shows a dialog and needs to call + * set_dir in order to set it) */ + void (* login) (struct aim_user *); void (* close) (struct gaim_connection *); int (* send_im) (struct gaim_connection *, char *who, char *message, int away); @@ -132,6 +142,7 @@ int (* chat_send) (struct gaim_connection *, int id, char *message); void (* keepalive) (struct gaim_connection *); + /* this is really bad. */ void (* convo_closed) (struct gaim_connection *, char *who); char *(* normalize)(const char *); @@ -157,4 +168,4 @@ extern void set_icon_data(struct gaim_connection *, char *, void *, int); extern void *get_icon_data(struct gaim_connection *, char *, int *); -#endif +#endif /* _PRPL_H_ */ diff -r 61b816a7b467 -r 5473c8c5378d src/ui.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ui.h Wed Oct 03 09:48:33 2001 +0000 @@ -0,0 +1,119 @@ +/* + * gaim + * + * Copyright (C) 1998-1999, Mark Spencer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef _UI_H_ +#define _UI_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#ifdef USE_APPLET +#include +#endif /* USE_APPLET */ +#ifdef USE_GNOME +#include +#endif +#if USE_PIXBUF +#include +#endif + +#define FACE_ANGEL 0 +#define FACE_BIGSMILE 1 +#define FACE_BURP 2 +#define FACE_CROSSEDLIPS 3 +#define FACE_CRY 4 +#define FACE_EMBARRASSED 5 +#define FACE_KISS 6 +#define FACE_MONEYMOUTH 7 +#define FACE_SAD 8 +#define FACE_SCREAM 9 +#define FACE_SMILE 10 +#define FACE_SMILE8 11 +#define FACE_THINK 12 +#define FACE_TONGUE 13 +#define FACE_WINK 14 +#define FACE_YELL 15 +#define FACE_TOTAL 16 + +struct debug_window { + GtkWidget *window; + GtkWidget *entry; +}; +extern struct debug_window *dw; + +/* CUI: save_pos and window_size are used by gaimrc.c which is core. + * Need to figure out options saving. Same goes for several global variables as well. */ +struct save_pos { + int x; + int y; + int width; + int height; + int xoff; + int yoff; +}; + +struct window_size { + int width; + int height; + int entry_height; +}; + +#define EDIT_GC 0 +#define EDIT_GROUP 1 +#define EDIT_BUDDY 2 + +/* Globals in applet.c */ +#ifdef USE_APPLET +extern GtkWidget *applet; +#endif /* USE_APPLET */ + +/* Globals in buddy.c */ +extern GtkWidget *buddies; +extern GtkWidget *bpmenu; +extern GtkWidget *blist; + +/* Globals in buddy_chat.c */ +/* it is very important that you don't use this for anything. + * its sole purpose is to allow all group chats to be in one + * window. use struct gaim_connection's buddy_chats instead. */ +extern GList *chats; +/* these are ok to use */ +extern GtkWidget *all_chats; +extern GtkWidget *chat_notebook; +extern GtkWidget *joinchat; + +/* Globals in dialog.c */ +extern char fontface[64]; +extern int fontsize; +extern GdkColor bgcolor; +extern GdkColor fgcolor; +extern int smiley_array[FACE_TOTAL]; + +/* Globals in prpl.c */ +extern GtkWidget *protomenu; + +/* Functions in about.c */ +extern void show_about(GtkWidget *, void *); +extern void gaim_help(GtkWidget *, void *); + +#endif /* _UI_H_ */