Mercurial > pidgin.yaz
comparison finch/libgnt/gntkeys.h @ 21161:e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
through 365b126365cc18309aea7f8eef0e9b2a19e6bda8
And others.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 07 Nov 2007 14:07:52 +0000 |
parents | bddf964880cf |
children |
comparison
equal
deleted
inserted
replaced
21160:45e550db32ab | 21161:e119edfc0fb0 |
---|---|
102 #define GNT_KEY_F10 SAFE(key_f10) | 102 #define GNT_KEY_F10 SAFE(key_f10) |
103 #define GNT_KEY_F11 SAFE(key_f11) | 103 #define GNT_KEY_F11 SAFE(key_f11) |
104 #define GNT_KEY_F12 SAFE(key_f12) | 104 #define GNT_KEY_F12 SAFE(key_f12) |
105 | 105 |
106 /** | 106 /** |
107 * This will do stuff with the terminal settings and stuff. | 107 * Initialize the keys. |
108 */ | |
109 /** | |
110 * | |
111 */ | 108 */ |
112 void gnt_init_keys(void); | 109 void gnt_init_keys(void); |
113 | 110 |
114 /** | 111 /** |
115 * | 112 * Refine input text. This usually looks at what the terminal claims it is, |
116 * @param text | 113 * and tries to change the text to work around some oft-broken terminfo entries. |
114 * | |
115 * @param text The input text to refine. | |
117 */ | 116 */ |
118 void gnt_keys_refine(char *text); | 117 void gnt_keys_refine(char *text); |
119 | 118 |
119 /** | |
120 * Translate a user-readable representation of an input to a machine-readable representation. | |
121 * | |
122 * @param name The user-readable representation of an input (eg.: c-t) | |
123 * | |
124 * @return A machine-readable representation of the input. | |
125 */ | |
120 const char *gnt_key_translate(const char *name); | 126 const char *gnt_key_translate(const char *name); |
127 | |
128 /** | |
129 * Translate a machine-readable representation of an input to a user-readable representation. | |
130 * | |
131 * @param key The machine-readable representation of an input. | |
132 * | |
133 * @return A user-readable representation of the input (eg.: c-t). | |
134 */ | |
121 const char *gnt_key_lookup(const char *key); | 135 const char *gnt_key_lookup(const char *key); |
122 | 136 |
123 /** | 137 /** |
124 * | 138 * Add a key combination to the internal key-tree. |
125 * @param path | 139 * |
140 * @param key The key to add | |
126 */ | 141 */ |
127 void gnt_keys_add_combination(const char *path); | 142 void gnt_keys_add_combination(const char *key); |
128 | 143 |
129 /** | 144 /** |
130 * | 145 * Remove a key combination from the internal key-tree. |
131 * @param path | 146 * |
147 * @param key The key to remove. | |
132 */ | 148 */ |
133 void gnt_keys_del_combination(const char *path); | 149 void gnt_keys_del_combination(const char *key); |
134 | 150 |
135 /** | 151 /** |
136 * | 152 * Find a combination from the given string. |
137 * @param path | |
138 * | 153 * |
139 * @return | 154 * @param key The input string. |
155 * | |
156 * @return The number of bytes in the combination that starts at the beginning | |
157 * of key (can be 0). | |
140 */ | 158 */ |
141 int gnt_keys_find_combination(const char *path); | 159 int gnt_keys_find_combination(const char *key); |
142 | 160 |
143 /* A lot of commonly used variable names are defined in <term.h>. | 161 /* A lot of commonly used variable names are defined in <term.h>. |
144 * #undef them to make life easier for everyone. */ | 162 * #undef them to make life easier for everyone. */ |
145 | 163 |
146 #undef columns | 164 #undef columns |