Fri, 08 May 2015 13:25:56 +0200
Don't define twice
|
18358
2122fd567315
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18114
diff
changeset
|
1 | /* |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
2 | * GNT - The GLib Ncurses Toolkit |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
3 | * |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
4 | * GNT is the legal property of its developers, whose names are too numerous |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
6 | * source distribution. |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
7 | * |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
8 | * This library is free software; you can redistribute it and/or modify |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
11 | * (at your option) any later version. |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
12 | * |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
16 | * GNU General Public License for more details. |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
17 | * |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18358
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
21 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35480
diff
changeset
|
22 | |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35480
diff
changeset
|
23 | #ifndef GNT_KEYS_H |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35480
diff
changeset
|
24 | #define GNT_KEYS_H |
|
35446
c0f80955551d
Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents:
35408
diff
changeset
|
25 | /** |
|
c0f80955551d
Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents:
35408
diff
changeset
|
26 | * SECTION:gntkeys |
|
c0f80955551d
Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents:
35408
diff
changeset
|
27 | * @section_id: libgnt-gntkeys |
|
c0f80955551d
Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents:
35408
diff
changeset
|
28 | * @short_description: <filename>gntkeys.h</filename> |
|
c0f80955551d
Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents:
35408
diff
changeset
|
29 | * @title: Keys API |
|
c0f80955551d
Add sections for libgnt and re-arrange GNT doc index
Ankit Vani <a@nevitus.org>
parents:
35408
diff
changeset
|
30 | */ |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
31 | |
|
14938
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
32 | #include <term.h> |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
33 | |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
34 | /* |
|
15038
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
35 | * terminfo/termcap doesn't provide all the information that I want to use, eg. |
|
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
36 | * ctrl-up, ctrl-down etc. So I am going to hard-code some of the information |
|
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
37 | * for some popular $TERMs |
|
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
38 | */ |
|
15095
f7c98ecaa92b
[gaim-migrate @ 17816]
Christopher O'Brien <siege@pidgin.im>
parents:
15038
diff
changeset
|
39 | extern char *gnt_key_cup; |
|
f7c98ecaa92b
[gaim-migrate @ 17816]
Christopher O'Brien <siege@pidgin.im>
parents:
15038
diff
changeset
|
40 | extern char *gnt_key_cdown; |
|
f7c98ecaa92b
[gaim-migrate @ 17816]
Christopher O'Brien <siege@pidgin.im>
parents:
15038
diff
changeset
|
41 | extern char *gnt_key_cleft; |
|
f7c98ecaa92b
[gaim-migrate @ 17816]
Christopher O'Brien <siege@pidgin.im>
parents:
15038
diff
changeset
|
42 | extern char *gnt_key_cright; |
|
15038
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
43 | |
|
35480
8d853ab9225c
Fix crash when scanning libgnt
Ankit Vani <a@nevitus.org>
parents:
35446
diff
changeset
|
44 | #define SAFE(x) ((cur_term && (x)) ? (x) : "") |
|
14938
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
45 | |
| 37138 | 46 | /* This is needed so that g-ir-scanner does not take GNT_KEY_CTRL_* as |
| 47 | constants -- because if it does, the .gir contains the following invalid XML | |
| 48 | characters, and parsing explodes */ | |
| 49 | #define CONST(x) x | |
| 50 | ||
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
51 | #ifdef _WIN32 |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
52 | |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
53 | /* XXX: \xe1 is a hacky alias for \x00 key code */ |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
54 | |
| 37138 | 55 | #define GNT_KEY_POPUP CONST("") /* not supported? */ |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
56 | |
| 37139 | 57 | #define GNT_KEY_UP CONST("\033\xe0\x48") |
| 58 | #define GNT_KEY_DOWN CONST("\033\xe0\x50") | |
| 59 | #define GNT_KEY_LEFT CONST("\033\xe0\x4B") | |
| 60 | #define GNT_KEY_RIGHT CONST("\033\xe0\x4D") | |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
61 | |
| 37139 | 62 | #define GNT_KEY_CTRL_UP CONST("\033\xe0\x8d") |
| 63 | #define GNT_KEY_CTRL_DOWN CONST("\033\xe0\x91") | |
| 64 | #define GNT_KEY_CTRL_LEFT CONST("\033\xe0\x73") | |
| 65 | #define GNT_KEY_CTRL_RIGHT CONST("\033\xe0\x74") | |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
66 | |
| 37139 | 67 | #define GNT_KEY_PGUP CONST("\033\xe0\x49") |
| 68 | #define GNT_KEY_PGDOWN CONST("\033\xe0\x51") | |
| 69 | #define GNT_KEY_HOME CONST("\033\xe0\x47") | |
| 70 | #define GNT_KEY_END CONST("\033\xe0\x4f") | |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
71 | |
| 37138 | 72 | #define GNT_KEY_ENTER CONST("\x0d") |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
73 | |
| 37138 | 74 | #define GNT_KEY_BACKSPACE CONST("\x08") |
| 37139 | 75 | #define GNT_KEY_DEL CONST("\033\xe0\x53") |
| 76 | #define GNT_KEY_INS CONST("\033\xe0\x52") | |
| 77 | #define GNT_KEY_BACK_TAB CONST("\033\xe1\x94") | |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
78 | |
| 37139 | 79 | #define GNT_KEY_F1 CONST("\033\xe1\x3b") |
| 80 | #define GNT_KEY_F2 CONST("\033\xe1\x3c") | |
| 81 | #define GNT_KEY_F3 CONST("\033\xe1\x3d") | |
| 82 | #define GNT_KEY_F4 CONST("\033\xe1\x3e") | |
| 83 | #define GNT_KEY_F5 CONST("\033\xe1\x3f") | |
| 84 | #define GNT_KEY_F6 CONST("\033\xe1\x40") | |
| 85 | #define GNT_KEY_F7 CONST("\033\xe1\x41") | |
| 86 | #define GNT_KEY_F8 CONST("\033\xe1\x42") | |
| 87 | #define GNT_KEY_F9 CONST("\033\xe1\x43") | |
| 88 | #define GNT_KEY_F10 CONST("\033\xe1\x44") | |
| 89 | #define GNT_KEY_F11 CONST("\033\xe0\x85") | |
| 90 | #define GNT_KEY_F12 CONST("\033\xe0\x86") | |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
91 | |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
92 | #else |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
93 | |
|
14938
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
94 | #define GNT_KEY_POPUP SAFE(key_f16) /* Apparently */ |
|
13852
1d3ae9f34d42
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
95 | |
|
1d3ae9f34d42
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
96 | /* Arrow keys */ |
|
14938
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
97 | #define GNT_KEY_LEFT SAFE(key_left) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
98 | #define GNT_KEY_RIGHT SAFE(key_right) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
99 | #define GNT_KEY_UP SAFE(key_up) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
100 | #define GNT_KEY_DOWN SAFE(key_down) |
|
13852
1d3ae9f34d42
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
101 | |
|
15038
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
102 | #define GNT_KEY_CTRL_UP SAFE(gnt_key_cup) |
|
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
103 | #define GNT_KEY_CTRL_DOWN SAFE(gnt_key_cdown) |
|
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
104 | #define GNT_KEY_CTRL_RIGHT SAFE(gnt_key_cright) |
|
e57ca0ff0489
[gaim-migrate @ 17755]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14939
diff
changeset
|
105 | #define GNT_KEY_CTRL_LEFT SAFE(gnt_key_cleft) |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13958
diff
changeset
|
106 | |
|
14938
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
107 | #define GNT_KEY_PGUP SAFE(key_ppage) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
108 | #define GNT_KEY_PGDOWN SAFE(key_npage) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
109 | #define GNT_KEY_HOME SAFE(key_home) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
110 | #define GNT_KEY_END SAFE(key_end) |
|
13958
bd1c3bb3f33d
[gaim-migrate @ 16381]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13917
diff
changeset
|
111 | |
|
35480
8d853ab9225c
Fix crash when scanning libgnt
Ankit Vani <a@nevitus.org>
parents:
35446
diff
changeset
|
112 | #define GNT_KEY_ENTER SAFE(carriage_return) |
|
13917
7c435cf1ee60
[gaim-migrate @ 16314]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13852
diff
changeset
|
113 | |
|
14938
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
114 | #define GNT_KEY_BACKSPACE SAFE(key_backspace) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
115 | #define GNT_KEY_DEL SAFE(key_dc) |
|
ee27e45919ef
[gaim-migrate @ 17645]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
116 | #define GNT_KEY_INS SAFE(key_ic) |
|
35480
8d853ab9225c
Fix crash when scanning libgnt
Ankit Vani <a@nevitus.org>
parents:
35446
diff
changeset
|
117 | #define GNT_KEY_BACK_TAB ((cur_term && back_tab) ? back_tab : SAFE(key_btab)) |
|
13852
1d3ae9f34d42
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
118 | |
|
35879
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
119 | #define GNT_KEY_F1 SAFE(key_f1) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
120 | #define GNT_KEY_F2 SAFE(key_f2) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
121 | #define GNT_KEY_F3 SAFE(key_f3) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
122 | #define GNT_KEY_F4 SAFE(key_f4) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
123 | #define GNT_KEY_F5 SAFE(key_f5) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
124 | #define GNT_KEY_F6 SAFE(key_f6) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
125 | #define GNT_KEY_F7 SAFE(key_f7) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
126 | #define GNT_KEY_F8 SAFE(key_f8) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
127 | #define GNT_KEY_F9 SAFE(key_f9) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
128 | #define GNT_KEY_F10 SAFE(key_f10) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
129 | #define GNT_KEY_F11 SAFE(key_f11) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
130 | #define GNT_KEY_F12 SAFE(key_f12) |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
131 | |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
132 | #endif |
|
f4a2868ba612
cross-win32: fix keyboard in finch
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
133 | |
|
37082
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
134 | #define GNT_KEY_CTRL_A CONST("\001") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
135 | #define GNT_KEY_CTRL_B CONST("\002") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
136 | #define GNT_KEY_CTRL_D CONST("\004") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
137 | #define GNT_KEY_CTRL_E CONST("\005") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
138 | #define GNT_KEY_CTRL_F CONST("\006") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
139 | #define GNT_KEY_CTRL_G CONST("\007") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
140 | #define GNT_KEY_CTRL_H CONST("\010") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
141 | #define GNT_KEY_CTRL_I CONST("\011") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
142 | #define GNT_KEY_CTRL_J CONST("\012") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
143 | #define GNT_KEY_CTRL_K CONST("\013") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
144 | #define GNT_KEY_CTRL_L CONST("\014") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
145 | #define GNT_KEY_CTRL_M CONST("\012") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
146 | #define GNT_KEY_CTRL_N CONST("\016") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
147 | #define GNT_KEY_CTRL_O CONST("\017") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
148 | #define GNT_KEY_CTRL_P CONST("\020") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
149 | #define GNT_KEY_CTRL_R CONST("\022") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
150 | #define GNT_KEY_CTRL_T CONST("\024") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
151 | #define GNT_KEY_CTRL_U CONST("\025") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
152 | #define GNT_KEY_CTRL_V CONST("\026") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
153 | #define GNT_KEY_CTRL_W CONST("\027") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
154 | #define GNT_KEY_CTRL_X CONST("\030") |
|
13124e3f2903
Fix g-ir-scanner dying on including Gnt-2.8 in Finch-3.0
Ankit Vani <a@nevitus.org>
parents:
37078
diff
changeset
|
155 | #define GNT_KEY_CTRL_Y CONST("\031") |
|
14275
ef418684623d
[gaim-migrate @ 16894]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14153
diff
changeset
|
156 | |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13958
diff
changeset
|
157 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
158 | * gnt_init_keys: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
159 | * |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
160 | * Initialize the keys. |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
161 | */ |
|
15874
46df7421a1b5
Enable DEBUG_CFLAGS in libgnt and fix up a number of compile warnings and
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15862
diff
changeset
|
162 | void gnt_init_keys(void); |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
163 | |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
164 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
165 | * gnt_keys_refine: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
166 | * @text: The input text to refine. |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
167 | * |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
168 | * Refine input text. This usually looks at what the terminal claims it is, |
|
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
169 | * and tries to change the text to work around some oft-broken terminfo entries. |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
170 | */ |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13958
diff
changeset
|
171 | void gnt_keys_refine(char *text); |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
172 | |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
173 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
174 | * gnt_key_translate: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
175 | * @name: The user-readable representation of an input (eg.: c-t) |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
176 | * |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
177 | * Translate a user-readable representation of an input to a machine-readable representation. |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
178 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
31293
diff
changeset
|
179 | * Returns: A machine-readable representation of the input. |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
180 | */ |
|
15862
895c0f69faa0
Make sure unbound key-combinations are handled properly.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15839
diff
changeset
|
181 | const char *gnt_key_translate(const char *name); |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
182 | |
|
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
183 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
184 | * gnt_key_lookup: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
185 | * @key: The machine-readable representation of an input. |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
186 | * |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
187 | * Translate a machine-readable representation of an input to a user-readable representation. |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
188 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
31293
diff
changeset
|
189 | * Returns: A user-readable representation of the input (eg.: c-t). |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
190 | */ |
|
16047
03880dc14852
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 <sadrul@pidgin.im>
parents:
15906
diff
changeset
|
191 | const char *gnt_key_lookup(const char *key); |
|
14153
9da98052a4e1
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13958
diff
changeset
|
192 | |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
193 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
194 | * gnt_keys_add_combination: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
195 | * @key: The key to add |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
196 | * |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
197 | * Add a key combination to the internal key-tree. |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
198 | */ |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
199 | void gnt_keys_add_combination(const char *key); |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
200 | |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
201 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
202 | * gnt_keys_del_combination: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
203 | * @key: The key to remove. |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
204 | * |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
205 | * Remove a key combination from the internal key-tree. |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
206 | */ |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
207 | void gnt_keys_del_combination(const char *key); |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
208 | |
|
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
209 | /** |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
210 | * gnt_keys_find_combination: |
|
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
211 | * @key: The input string. |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
212 | * |
|
35408
5f7ccec14f33
Convert docs from doxygen to gtk-doc format for gnt to gntprogressbar
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
213 | * Find a combination from the given string. |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
214 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
31293
diff
changeset
|
215 | * Returns: The number of bytes in the combination that starts at the beginning |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
216 | * of key (can be 0). |
|
18114
adb3cfadc125
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17875
diff
changeset
|
217 | */ |
|
20293
81d324f460bd
applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
218 | int gnt_keys_find_combination(const char *key); |
|
15839
e2b7b5f4f9aa
Change a bit how the keystrokes are processed. When a lot of keystrokes come in at the same time, the shortest key-combination is processed first. This should make typing fast over a very slow connection work properly.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15095
diff
changeset
|
219 | |
|
31293
169eeb43b52c
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
29111
diff
changeset
|
220 | /* A lot of commonly used variable names are defined in <term.h>. |
|
14939
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
221 | * #undef them to make life easier for everyone. */ |
|
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
222 | |
|
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
223 | #undef columns |
|
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
224 | #undef lines |
|
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
225 | #undef buttons |
|
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
226 | #undef newline |
|
22399
5f653ec49818
Fix a compile error due to set_clock being defined in term.h conflicting with gstreamer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20293
diff
changeset
|
227 | #undef set_clock |
|
14939
7ec81b1b7bba
[gaim-migrate @ 17646]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14938
diff
changeset
|
228 | |
|
13852
1d3ae9f34d42
[gaim-migrate @ 16308]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
229 | #endif |