Mercurial > pidgin
annotate src/ui.h @ 6698:fe9568f4055f
[gaim-migrate @ 7224]
]
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Tue, 02 Sep 2003 03:54:52 +0000 |
parents | 0c5637b5462e |
children | 083d1e4a9c78 |
rev | line source |
---|---|
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
1 /** |
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
2 * @file ui.h Main GTK+ UI include file |
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
3 * @defgroup gtkui GTK+ User Interface |
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
5032
diff
changeset
|
4 * |
2417 | 5 * gaim |
6 * | |
7 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 | |
24 #ifndef _UI_H_ | |
25 #define _UI_H_ | |
26 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
27 #if 0 |
2417 | 28 #ifdef HAVE_CONFIG_H |
29 #include <config.h> | |
30 #endif | |
31 | |
32 #include <gtk/gtk.h> | |
33 #include <gdk-pixbuf/gdk-pixbuf.h> | |
34 | |
4608 | 35 #include "core.h" |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
36 #include "gtkconv.h" |
4687 | 37 #include "pounce.h" |
4514
7521e29658bc
[gaim-migrate @ 4792]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
38 #include "gtkft.h" |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
39 #include "gtkprefs.h" |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
40 #include "gtkutils.h" |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
41 #include "stock.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
42 #endif |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
43 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
44 #include "account.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
45 #include "conversation.h" |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
46 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
47 /** |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
48 * Our UI's identifier. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
49 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
50 #define GAIM_GTK_UI "gtk-gaim" |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
51 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5773
diff
changeset
|
52 |
2725
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2699
diff
changeset
|
53 #define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \ |
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2699
diff
changeset
|
54 gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG) |
3554 | 55 #define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED) |
3517 | 56 |
5105 | 57 /* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and |
58 * earlier). It defines the new wrap behavior (unknown in earlier versions) | |
59 * as the old (slightly buggy) wrap behavior. | |
60 */ | |
61 #ifndef GTK_WRAP_WORD_CHAR | |
62 #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD | |
63 #endif | |
64 | |
3473 | 65 #define DEFAULT_FONT_FACE "Helvetica" |
2761
367d19133917
[gaim-migrate @ 2774]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2725
diff
changeset
|
66 |
3376 | 67 |
2438
5cbe86a444d9
[gaim-migrate @ 2451]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2437
diff
changeset
|
68 /* XXX CUI: away messages aren't really anything more than char* but we need two char*'s |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
69 * for the UI so that people can name their away messages when they save them. So these |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
70 * are really a UI function and struct away_message should be removed from the core. */ |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
71 struct away_message { |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
72 char name[80]; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
73 char message[2048]; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
74 }; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
75 |
2986 | 76 |
77 | |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
78 /* this is used for queuing messages received while away. This is really a UI function |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
79 * which is why the struct is here. */ |
4608 | 80 |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
81 struct queued_message { |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
82 char name[80]; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
83 char *message; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
84 time_t tm; |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
85 GaimAccount *account; |
6621 | 86 GaimMessageFlags flags; |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2843
diff
changeset
|
87 int len; |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
88 }; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
89 |
4288 | 90 struct smiley_theme { |
91 char *path; | |
92 char *name; | |
93 char *desc; | |
94 char *icon; | |
95 char *author; | |
96 | |
97 struct smiley_list *list; | |
98 }; | |
99 | |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
100 /* Globals in aim.c */ |
2493
1b7a1133962d
[gaim-migrate @ 2506]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2442
diff
changeset
|
101 extern GtkWidget *mainwindow; |
4687 | 102 extern int docklet_count; |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
103 |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
104 /* Globals in away.c */ |
6479 | 105 extern GSList *away_messages; |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
106 extern struct away_message *awaymessage; |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
107 extern GtkWidget *awaymenu; |
4412 | 108 extern GtkWidget *awayqueue; |
109 extern GtkListStore *awayqueuestore; | |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
110 |
2417 | 111 /* Globals in dialog.c */ |
2763
477a035d81e5
[gaim-migrate @ 2776]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2761
diff
changeset
|
112 extern char fontxfld[256]; |
3367 | 113 extern GtkWidget *fgcseld; |
114 extern GtkWidget *bgcseld; | |
2417 | 115 |
4157 | 116 /* Globals in session.c */ |
117 extern gboolean session_managed; | |
118 | |
4288 | 119 /* Globals in themes.c */ |
120 extern struct smiley_theme *current_smiley_theme; | |
121 extern GSList *smiley_themes; | |
122 | |
123 | |
2417 | 124 /* Functions in about.c */ |
125 extern void show_about(GtkWidget *, void *); | |
126 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
127 /* Functions in main.c */ |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
128 extern void show_login(); |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
129 extern void gaim_setup(GaimConnection *); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
130 |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
131 /* Functions in away.c */ |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
132 extern void rem_away_mess(GtkWidget *, struct away_message *); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
133 extern void do_away_message(GtkWidget *, struct away_message *); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
134 extern void do_away_menu(); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
135 extern void toggle_away_queue(); |
4274 | 136 extern void purge_away_queue(GSList**); |
5773
8107b9ee8789
[gaim-migrate @ 6198]
Christian Hammond <chipx86@chipx86.com>
parents:
5772
diff
changeset
|
137 extern void do_im_back(GtkWidget *w, GtkWidget *x); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
138 |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
139 /* Functions in browser.c */ |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6463
diff
changeset
|
140 void *gaim_gtk_notify_uri(const char *uri); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
141 |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
142 /* Functions in dialogs.c */ |
6695 | 143 extern void alias_dialog_bud(GaimBuddy *); |
144 extern void alias_dialog_blist_chat(GaimBlistChat *); | |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
145 extern void show_warn_dialog(GaimConnection *, char *); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
146 extern void show_im_dialog(); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
147 extern void show_info_dialog(); |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
148 extern void show_add_buddy(GaimConnection *, char *, char *, char *); |
6695 | 149 extern void show_add_chat(GaimAccount *, GaimGroup *); |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
150 extern void show_add_group(GaimConnection *); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
151 extern void destroy_all_dialogs(); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
152 extern void show_import_dialog(); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
153 extern void show_export_dialog(); |
3484 | 154 extern void conv_show_log(GtkWidget *, gpointer); |
3532 | 155 extern void chat_show_log(GtkWidget *, gpointer); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
156 extern void show_log(char *); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
157 extern void show_log_dialog(GaimConversation *); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
158 extern void show_fgcolor_dialog(GaimConversation *c, GtkWidget *color); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
159 extern void show_bgcolor_dialog(GaimConversation *c, GtkWidget *color); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
160 extern void cancel_fgcolor(GtkWidget *widget, GaimConversation *c); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
161 extern void cancel_bgcolor(GtkWidget *widget, GaimConversation *c); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
162 extern void create_away_mess(GtkWidget *, void *); |
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
163 extern void show_ee_dialog(int); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
164 extern void show_insert_link(GtkWidget *,GaimConversation *); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
165 extern void show_smiley_dialog(GaimConversation *, GtkWidget *); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
166 extern void close_smiley_dialog(GtkWidget *widget, GaimConversation *c); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
167 extern void set_smiley_array(GtkWidget *widget, int smiley_type); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
168 extern void insert_smiley_text(GtkWidget *widget, GaimConversation *c); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
169 extern void cancel_log(GtkWidget *, GaimConversation *); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
170 extern void cancel_link(GtkWidget *, GaimConversation *); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
171 extern void show_font_dialog(GaimConversation *c, GtkWidget *font); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5633
diff
changeset
|
172 extern void cancel_font(GtkWidget *widget, GaimConversation *c); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
173 extern void apply_font(GtkWidget *widget, GtkFontSelection *fontsel); |
6695 | 174 extern void show_rename_group(GtkWidget *, GaimGroup *); |
3379 | 175 extern void destroy_fontsel(GtkWidget *w, gpointer d); |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
176 extern void join_chat(); |
2435
b4f2a53c0ee5
[gaim-migrate @ 2448]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2417
diff
changeset
|
177 |
2906
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2883
diff
changeset
|
178 /* Functions in server.c */ |
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2883
diff
changeset
|
179 /* server.c is in desperate need need of a split */ |
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2883
diff
changeset
|
180 extern int find_queue_total_by_name(char *); |
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2883
diff
changeset
|
181 |
4157 | 182 /* Functions in session.c */ |
183 extern void session_init(gchar *, gchar *); | |
184 extern void session_end(); | |
185 | |
4263 | 186 /* Functions in themes.c */ |
187 extern void smiley_themeize(GtkWidget *); | |
4298 | 188 extern void smiley_theme_probe(); |
4892 | 189 extern void load_smiley_theme(const char *file, gboolean load); |
4667 | 190 extern GSList *get_proto_smileys(int protocol); |
4263 | 191 |
2417 | 192 #endif /* _UI_H_ */ |