Mercurial > pidgin
annotate finch/libgnt/gntkeys.h @ 21119:7a87450fdafe
Since the XMPP PurpleConnection is created before we know we need a password,
after prompting for the password, the password is never set inside the PurpleConnection,
only the PurpleAccount. Now if there's no password on the PurpleConnection, we look for
one on the PurpleAccount.
fixes #3552
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 03 Nov 2007 16:19:50 +0000 |
parents | 44b4e8bd759b |
children | 8d73d519155a ae330012956f |
rev | line source |
---|---|
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
1 /** |
18303
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18049
diff
changeset
|
2 * @file gntkeys.h Keys API |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18049
diff
changeset
|
3 * @ingroup gnt |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18049
diff
changeset
|
4 */ |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18049
diff
changeset
|
5 /* |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
6 * GNT - The GLib Ncurses Toolkit |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
7 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
8 * GNT is the legal property of its developers, whose names are too numerous |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
10 * source distribution. |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
11 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
12 * This library is free software; you can redistribute it and/or modify |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
15 * (at your option) any later version. |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
16 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
20 * GNU General Public License for more details. |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
21 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18303
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
25 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
26 |
15817 | 27 #ifndef GNT_KEYS_H |
28 #define GNT_KEYS_H | |
29 | |
30 #include <curses.h> | |
31 #include <term.h> | |
32 | |
33 /** | |
34 * terminfo/termcap doesn't provide all the information that I want to use, eg. | |
35 * ctrl-up, ctrl-down etc. So I am going to hard-code some of the information | |
36 * for some popular $TERMs | |
37 */ | |
38 extern char *gnt_key_cup; | |
39 extern char *gnt_key_cdown; | |
40 extern char *gnt_key_cleft; | |
41 extern char *gnt_key_cright; | |
42 | |
43 #define SAFE(x) ((x) ? (x) : "") | |
44 | |
45 #define GNT_KEY_POPUP SAFE(key_f16) /* Apparently */ | |
46 | |
47 /* Arrow keys */ | |
48 #define GNT_KEY_LEFT SAFE(key_left) | |
49 #define GNT_KEY_RIGHT SAFE(key_right) | |
50 #define GNT_KEY_UP SAFE(key_up) | |
51 #define GNT_KEY_DOWN SAFE(key_down) | |
52 | |
53 #define GNT_KEY_CTRL_UP SAFE(gnt_key_cup) | |
54 #define GNT_KEY_CTRL_DOWN SAFE(gnt_key_cdown) | |
55 #define GNT_KEY_CTRL_RIGHT SAFE(gnt_key_cright) | |
56 #define GNT_KEY_CTRL_LEFT SAFE(gnt_key_cleft) | |
57 | |
58 #define GNT_KEY_PGUP SAFE(key_ppage) | |
59 #define GNT_KEY_PGDOWN SAFE(key_npage) | |
60 #define GNT_KEY_HOME SAFE(key_home) | |
61 #define GNT_KEY_END SAFE(key_end) | |
62 | |
63 #define GNT_KEY_ENTER carriage_return | |
64 | |
65 #define GNT_KEY_BACKSPACE SAFE(key_backspace) | |
66 #define GNT_KEY_DEL SAFE(key_dc) | |
67 #define GNT_KEY_INS SAFE(key_ic) | |
18000
05d7fe2320a9
(16:39:44) rekkanoryo: i have a feature request
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15979
diff
changeset
|
68 #define GNT_KEY_BACK_TAB SAFE(back_tab) |
15817 | 69 |
70 #define GNT_KEY_CTRL_A "\001" | |
71 #define GNT_KEY_CTRL_B "\002" | |
72 #define GNT_KEY_CTRL_D "\004" | |
73 #define GNT_KEY_CTRL_E "\005" | |
74 #define GNT_KEY_CTRL_F "\006" | |
75 #define GNT_KEY_CTRL_G "\007" | |
76 #define GNT_KEY_CTRL_H "\010" | |
77 #define GNT_KEY_CTRL_I "\011" | |
78 #define GNT_KEY_CTRL_J "\012" | |
79 #define GNT_KEY_CTRL_K "\013" | |
80 #define GNT_KEY_CTRL_L "\014" | |
81 #define GNT_KEY_CTRL_M "\012" | |
82 #define GNT_KEY_CTRL_N "\016" | |
83 #define GNT_KEY_CTRL_O "\017" | |
84 #define GNT_KEY_CTRL_P "\020" | |
85 #define GNT_KEY_CTRL_R "\022" | |
86 #define GNT_KEY_CTRL_T "\024" | |
87 #define GNT_KEY_CTRL_U "\025" | |
88 #define GNT_KEY_CTRL_V "\026" | |
89 #define GNT_KEY_CTRL_W "\027" | |
90 #define GNT_KEY_CTRL_X "\030" | |
91 #define GNT_KEY_CTRL_Y "\031" | |
92 | |
93 #define GNT_KEY_F1 SAFE(key_f1) | |
94 #define GNT_KEY_F2 SAFE(key_f2) | |
95 #define GNT_KEY_F3 SAFE(key_f3) | |
96 #define GNT_KEY_F4 SAFE(key_f4) | |
97 #define GNT_KEY_F5 SAFE(key_f5) | |
98 #define GNT_KEY_F6 SAFE(key_f6) | |
99 #define GNT_KEY_F7 SAFE(key_f7) | |
100 #define GNT_KEY_F8 SAFE(key_f8) | |
101 #define GNT_KEY_F9 SAFE(key_f9) | |
102 #define GNT_KEY_F10 SAFE(key_f10) | |
103 #define GNT_KEY_F11 SAFE(key_f11) | |
104 #define GNT_KEY_F12 SAFE(key_f12) | |
105 | |
106 /** | |
107 * This will do stuff with the terminal settings and stuff. | |
108 */ | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
109 /** |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
110 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
111 */ |
15817 | 112 void gnt_init_keys(void); |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
113 |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
114 /** |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
115 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
116 * @param text |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
117 */ |
15817 | 118 void gnt_keys_refine(char *text); |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
119 |
15817 | 120 const char *gnt_key_translate(const char *name); |
15979
2c81ebc7bf0b
Add a way to get a list of bindings for a widget. This can be used by, eg, a window-manager to show helpful messages to the user.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
121 const char *gnt_key_lookup(const char *key); |
15817 | 122 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
123 /** |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
124 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
125 * @param path |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
126 */ |
15817 | 127 void gnt_keys_add_combination(const char *path); |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
128 |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
129 /** |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
130 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
131 * @param path |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
132 */ |
15817 | 133 void gnt_keys_del_combination(const char *path); |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
134 |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
135 /** |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
136 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
137 * @param path |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
138 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
139 * @return |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18000
diff
changeset
|
140 */ |
15817 | 141 int gnt_keys_find_combination(const char *path); |
142 | |
143 /* A lot of commonly used variable names are defined in <term.h>. | |
144 * #undef them to make life easier for everyone. */ | |
145 | |
146 #undef columns | |
147 #undef lines | |
148 #undef buttons | |
149 #undef newline | |
150 | |
151 #endif |