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 */
|
9713
|
25 #ifndef _GAIM_GTKDIALOGS_H_
|
|
26 #define _GAIM_GTKDIALOGS_H_
|
9709
|
27
|
|
28 #include "account.h"
|
|
29 #include "conversation.h"
|
|
30
|
|
31 #include "gtkinternal.h"
|
|
32
|
9713
|
33 /* Functions in gtkdialogs.c (these should actually stay in this file) */
|
|
34 void alias_dialog_bud(GaimBuddy *);
|
|
35 void alias_dialog_contact(GaimContact *);
|
|
36 void alias_dialog_blist_chat(GaimChat *);
|
|
37 void show_warn_dialog(GaimConnection *, const char *);
|
|
38 void gaim_gtkdialogs_new_im(GaimAccount *, const char *);
|
|
39 void show_im_dialog();
|
|
40 void show_info_dialog();
|
|
41 void show_log_dialog();
|
|
42 void destroy_all_dialogs();
|
|
43 void create_away_mess(GtkWidget *, void *);
|
|
44 void show_confirm_del(GaimBuddy *);
|
|
45 void show_confirm_del_group(GaimGroup *);
|
|
46 void show_confirm_del_blist_chat(GaimChat *);
|
|
47 void show_confirm_del_contact(GaimContact *);
|
|
48
|
9709
|
49 /**
|
|
50 * Our UI's identifier.
|
|
51 */
|
|
52 #define GAIM_GTK_UI "gtk-gaim"
|
|
53
|
|
54
|
|
55 #define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \
|
|
56 gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
|
|
57 #define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
|
|
58
|
|
59 /* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and
|
|
60 * earlier). It defines the new wrap behavior (unknown in earlier versions)
|
|
61 * as the old (slightly buggy) wrap behavior.
|
|
62 */
|
|
63 #ifndef GTK_WRAP_WORD_CHAR
|
|
64 #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD
|
|
65 #endif
|
|
66
|
|
67 #define DEFAULT_FONT_FACE "Helvetica"
|
|
68
|
|
69
|
|
70 /* XXX CUI: away messages aren't really anything more than char* but we need two char*'s
|
|
71 * for the UI so that people can name their away messages when they save them. So these
|
|
72 * are really a UI function and struct away_message should be removed from the core. */
|
|
73 /* WTF? How does having a title for something mean that it is part of the UI? */
|
|
74 struct away_message {
|
|
75 char name[80];
|
|
76 char message[2048];
|
|
77 };
|
|
78
|
|
79
|
|
80
|
|
81 /* this is used for queuing messages received while away. This is really a UI function
|
|
82 * which is why the struct is here. */
|
|
83
|
|
84 struct queued_message {
|
|
85 char name[80];
|
|
86 char alias[80];
|
|
87 char *message;
|
|
88 time_t tm;
|
|
89 GaimAccount *account;
|
|
90 GaimMessageFlags flags;
|
|
91 };
|
|
92
|
|
93 struct smiley_theme {
|
|
94 char *path;
|
|
95 char *name;
|
|
96 char *desc;
|
|
97 char *icon;
|
|
98 char *author;
|
|
99
|
|
100 struct smiley_list *list;
|
|
101 };
|
|
102
|
|
103 /* Globals in main.c */
|
|
104 extern GtkWidget *mainwindow;
|
|
105 extern int docklet_count;
|
|
106
|
|
107 /* Globals in away.c */
|
|
108 extern GSList *away_messages;
|
|
109 extern struct away_message *awaymessage;
|
|
110 extern GtkWidget *awaymenu;
|
|
111 extern GtkWidget *awayqueue;
|
|
112 extern GtkListStore *awayqueuestore;
|
|
113
|
|
114 /* Globals in themes.c */
|
|
115 extern struct smiley_theme *current_smiley_theme;
|
|
116 extern GSList *smiley_themes;
|
|
117
|
|
118 /* Functions in about.c */
|
|
119 extern void show_about(GtkWidget *, void *);
|
|
120
|
|
121 /* Functions in main.c */
|
|
122 extern void show_login();
|
|
123 extern void gaim_setup(GaimConnection *);
|
|
124
|
|
125 /* Functions in away.c */
|
|
126 extern void rem_away_mess(GtkWidget *, struct away_message *);
|
|
127 extern void do_away_message(GtkWidget *, struct away_message *);
|
|
128 extern void do_away_menu();
|
|
129 extern void toggle_away_queue();
|
|
130 extern void purge_away_queue(GSList**);
|
|
131 extern void do_im_back(GtkWidget *w, GtkWidget *x);
|
|
132
|
|
133 /* Functions in session.c */
|
|
134 extern void session_init(gchar *, gchar *, gchar *);
|
|
135 extern void session_end();
|
|
136
|
|
137 /* Functions in themes.c */
|
|
138 extern void smiley_themeize(GtkWidget *);
|
|
139 extern void smiley_theme_probe();
|
|
140 extern void load_smiley_theme(const char *file, gboolean load);
|
|
141 extern GSList *get_proto_smileys(const char *id);
|
|
142
|
9713
|
143 #endif /* _GAIM_GTKDIALOGS_H_ */
|