9709
|
1 /**
|
|
2 * @file gtkdialogs.h Assorted GTK+ dialogs
|
|
3 * @defgroup gtkui GTK+ User Interface
|
|
4 *
|
|
5 * gaim
|
|
6 *
|
|
7 * Gaim is the legal property of its developers, whose names are too numerous
|
|
8 * to list here. Please refer to the COPYRIGHT file distributed with this
|
|
9 * source distribution.
|
|
10 *
|
|
11 * This program is free software; you can redistribute it and/or modify
|
|
12 * it under the terms of the GNU General Public License as published by
|
|
13 * the Free Software Foundation; either version 2 of the License, or
|
|
14 * (at your option) any later version.
|
|
15 *
|
|
16 * This program is distributed in the hope that it will be useful,
|
|
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19 * GNU General Public License for more details.
|
|
20 *
|
|
21 * You should have received a copy of the GNU General Public License
|
|
22 * along with this program; if not, write to the Free Software
|
|
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
24 */
|
|
25
|
|
26 #ifndef _GTKDIALOGS_H_
|
|
27 #define _GTKDIALOGS_H_
|
|
28
|
|
29 #include "account.h"
|
|
30 #include "conversation.h"
|
|
31
|
|
32 #include "gtkinternal.h"
|
|
33
|
|
34 /**
|
|
35 * Our UI's identifier.
|
|
36 */
|
|
37 #define GAIM_GTK_UI "gtk-gaim"
|
|
38
|
|
39
|
|
40 #define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \
|
|
41 gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
|
|
42 #define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
|
|
43
|
|
44 /* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and
|
|
45 * earlier). It defines the new wrap behavior (unknown in earlier versions)
|
|
46 * as the old (slightly buggy) wrap behavior.
|
|
47 */
|
|
48 #ifndef GTK_WRAP_WORD_CHAR
|
|
49 #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD
|
|
50 #endif
|
|
51
|
|
52 #define DEFAULT_FONT_FACE "Helvetica"
|
|
53
|
|
54
|
|
55 /* XXX CUI: away messages aren't really anything more than char* but we need two char*'s
|
|
56 * for the UI so that people can name their away messages when they save them. So these
|
|
57 * are really a UI function and struct away_message should be removed from the core. */
|
|
58 /* WTF? How does having a title for something mean that it is part of the UI? */
|
|
59 struct away_message {
|
|
60 char name[80];
|
|
61 char message[2048];
|
|
62 };
|
|
63
|
|
64
|
|
65
|
|
66 /* this is used for queuing messages received while away. This is really a UI function
|
|
67 * which is why the struct is here. */
|
|
68
|
|
69 struct queued_message {
|
|
70 char name[80];
|
|
71 char alias[80];
|
|
72 char *message;
|
|
73 time_t tm;
|
|
74 GaimAccount *account;
|
|
75 GaimMessageFlags flags;
|
|
76 };
|
|
77
|
|
78 struct smiley_theme {
|
|
79 char *path;
|
|
80 char *name;
|
|
81 char *desc;
|
|
82 char *icon;
|
|
83 char *author;
|
|
84
|
|
85 struct smiley_list *list;
|
|
86 };
|
|
87
|
|
88 /* Globals in main.c */
|
|
89 extern GtkWidget *mainwindow;
|
|
90 extern int docklet_count;
|
|
91
|
|
92 /* Globals in away.c */
|
|
93 extern GSList *away_messages;
|
|
94 extern struct away_message *awaymessage;
|
|
95 extern GtkWidget *awaymenu;
|
|
96 extern GtkWidget *awayqueue;
|
|
97 extern GtkListStore *awayqueuestore;
|
|
98
|
|
99 /* Globals in themes.c */
|
|
100 extern struct smiley_theme *current_smiley_theme;
|
|
101 extern GSList *smiley_themes;
|
|
102
|
|
103 /* Functions in about.c */
|
|
104 extern void show_about(GtkWidget *, void *);
|
|
105
|
|
106 /* Functions in main.c */
|
|
107 extern void show_login();
|
|
108 extern void gaim_setup(GaimConnection *);
|
|
109
|
|
110 /* Functions in away.c */
|
|
111 extern void rem_away_mess(GtkWidget *, struct away_message *);
|
|
112 extern void do_away_message(GtkWidget *, struct away_message *);
|
|
113 extern void do_away_menu();
|
|
114 extern void toggle_away_queue();
|
|
115 extern void purge_away_queue(GSList**);
|
|
116 extern void do_im_back(GtkWidget *w, GtkWidget *x);
|
|
117
|
|
118 /* Functions in dialogs.c */
|
|
119 extern void alias_dialog_bud(GaimBuddy *);
|
|
120 extern void alias_dialog_contact(GaimContact *);
|
|
121 extern void alias_dialog_blist_chat(GaimChat *);
|
|
122 extern void show_warn_dialog(GaimConnection *, const char *);
|
|
123 extern void gaim_gtkdialogs_new_im(GaimAccount *, const char *);
|
|
124 extern void show_im_dialog();
|
|
125 extern void show_info_dialog();
|
|
126 extern void show_log_dialog();
|
|
127 extern void destroy_all_dialogs();
|
|
128 extern void create_away_mess(GtkWidget *, void *);
|
|
129
|
|
130 /* Functions in session.c */
|
|
131 extern void session_init(gchar *, gchar *, gchar *);
|
|
132 extern void session_end();
|
|
133
|
|
134 /* Functions in themes.c */
|
|
135 extern void smiley_themeize(GtkWidget *);
|
|
136 extern void smiley_theme_probe();
|
|
137 extern void load_smiley_theme(const char *file, gboolean load);
|
|
138 extern GSList *get_proto_smileys(const char *id);
|
|
139
|
|
140 #endif /* _GTKDIALOGS_H_ */
|