Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

ui.h

00001 
00026 #ifndef _UI_H_
00027 #define _UI_H_
00028 
00029 #include "account.h"
00030 #include "conversation.h"
00031 
00035 #define GAIM_GTK_UI "gtk-gaim"
00036 
00037 
00038 #define GAIM_DIALOG(x)  x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \
00039             gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
00040 #define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
00041 
00042 /* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and
00043  * earlier).  It defines the new wrap behavior (unknown in earlier versions)
00044  * as the old (slightly buggy) wrap behavior.
00045  */
00046 #ifndef GTK_WRAP_WORD_CHAR
00047 #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD
00048 #endif
00049 
00050 //#define DEFAULT_FONT_FACE "Helvetica"
00051 #define DEFAULT_FONT_FACE "fixed"
00052 
00053 
00054 /* XXX CUI: away messages aren't really anything more than char* but we need two char*'s
00055  * for the UI so that people can name their away messages when they save them. So these
00056  * are really a UI function and struct away_message should be removed from the core. */
00057 /* WTF?  How does having a title for something mean that it is part of the UI? */
00058 struct away_message {
00059     char name[80];
00060     char message[2048];
00061 };
00062 
00063 
00064 
00065 /* this is used for queuing messages received while away. This is really a UI function
00066  * which is why the struct is here. */
00067 
00068 struct queued_message {
00069     char name[80];
00070     char alias[80];
00071     char *message;
00072     time_t tm;
00073     GaimAccount *account;
00074     GaimMessageFlags flags;
00075 };
00076 
00077 struct smiley_theme {
00078     char *path;
00079     char *name;
00080     char *desc;
00081     char *icon;
00082     char *author;
00083     
00084     struct smiley_list *list;
00085 };
00086 
00087 /* Globals in aim.c */
00088 extern GtkWidget *mainwindow;
00089 extern int docklet_count;
00090 
00091 /* Globals in away.c */
00092 extern GSList *away_messages;
00093 extern struct away_message *awaymessage;
00094 extern GtkWidget *awaymenu;
00095 extern GtkWidget *awayqueue;
00096 extern GtkListStore *awayqueuestore;
00097 
00098 /* Globals in dialog.c */
00099 extern char fontxfld[256];
00100 extern GtkWidget *fgcseld;
00101 extern GtkWidget *bgcseld;
00102 
00103 /* Globals in session.c */
00104 extern gboolean session_managed;
00105 
00106 /* Globals in themes.c */
00107 extern struct smiley_theme *current_smiley_theme;
00108 extern GSList *smiley_themes;
00109 
00110 
00111 /* Functions in about.c */
00112 extern void show_about(GtkWidget *, void *);
00113 
00114 /* Functions in main.c */
00115 extern void show_login();
00116 extern void gaim_setup(GaimConnection *);
00117 
00118 /* Functions in away.c */
00119 extern void rem_away_mess(GtkWidget *, struct away_message *);
00120 extern void do_away_message(GtkWidget *, struct away_message *);
00121 extern void do_away_menu();
00122 extern void toggle_away_queue();
00123 extern void purge_away_queue(GSList**);
00124 extern void do_im_back(GtkWidget *w, GtkWidget *x);
00125 
00126 /* Functions in dialogs.c */
00127 extern void alias_dialog_bud(GaimBuddy *);
00128 extern void alias_dialog_contact(GaimContact *);
00129 extern void alias_dialog_blist_chat(GaimChat *);
00130 extern void show_warn_dialog(GaimConnection *, const char *);
00131 extern void show_im_dialog();
00132 extern void show_info_dialog();
00133 extern void destroy_all_dialogs();
00134 extern void show_fgcolor_dialog(GaimConversation *c, GtkWidget *color);
00135 extern void show_bgcolor_dialog(GaimConversation *c, GtkWidget *color);
00136 extern void cancel_fgcolor(GtkWidget *widget, GaimConversation *c);
00137 extern void cancel_bgcolor(GtkWidget *widget, GaimConversation *c);
00138 extern void create_away_mess(GtkWidget *, void *);
00139 extern void dialog_link_show(GaimConversation *);
00140 extern void dialog_link_destroy(GaimConversation *);
00141 extern void set_smiley_array(GtkWidget *widget, int smiley_type);
00142 extern void show_font_dialog(GaimConversation *c, GtkWidget *font);
00143 extern void cancel_font(GtkWidget *widget, GaimConversation *c);
00144 extern void destroy_fontsel(GtkWidget *w, gpointer d);
00145 
00146 /* Functions in server.c */
00147 /* server.c is in desperate need need of a split */
00148 /* pizza pizza */
00149 extern int find_queue_total_by_name(char *);
00150 
00151 /* Functions in session.c */
00152 extern void session_init(gchar *, gchar *, gchar *);
00153 extern void session_end();
00154 
00155 /* Functions in themes.c */
00156 extern void smiley_themeize(GtkWidget *);
00157 extern void smiley_theme_probe();
00158 extern void load_smiley_theme(const char *file, gboolean load);
00159 extern GSList *get_proto_smileys(const char *id);
00160 
00161 #endif /* _UI_H_ */

Generated on Tue Aug 3 17:36:34 2004 for gaim by doxygen 1.3.4