Changeset afa200a
- Timestamp:
- Aug 15, 2009, 7:08:20 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 12bc46a
- Parents:
- f1d7d0f
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/04/09 00:18:32)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:20)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r9e5c9f3 rafa200a 2901 2901 owl_list l; 2902 2902 owl_fmtext fm; 2903 owl_keymap *km;2903 const owl_keymap *km; 2904 2904 owl_keyhandler *kh; 2905 2905 int i, numkm; … … 2930 2930 char *owl_function_keymap_summary(const char *name) 2931 2931 { 2932 owl_keymap *km2932 const owl_keymap *km 2933 2933 = owl_keyhandler_get_keymap(owl_global_get_keyhandler(&g), name); 2934 2934 if (km) return owl_keymap_summary(km); … … 2940 2940 { 2941 2941 owl_fmtext fm; 2942 owl_keymap *km;2942 const owl_keymap *km; 2943 2943 2944 2944 owl_fmtext_init_null(&fm); -
keymap.c
rf1d7d0f rafa200a 24 24 } 25 25 26 void owl_keymap_set_submap(owl_keymap *km, owl_keymap *submap)26 void owl_keymap_set_submap(owl_keymap *km, const owl_keymap *submap) 27 27 { 28 28 km->submap = submap; … … 54 54 55 55 /* returns a summary line describing this keymap. the caller must free. */ 56 char *owl_keymap_summary( owl_keymap *km)56 char *owl_keymap_summary(const owl_keymap *km) 57 57 { 58 58 char *s; … … 66 66 67 67 /* Appends details about the keymap to fm */ 68 void owl_keymap_get_details( owl_keymap *km, owl_fmtext *fm)68 void owl_keymap_get_details(const owl_keymap *km, owl_fmtext *fm) 69 69 { 70 70 int i, nbindings; … … 187 187 /* sets the active keymap, which will also reset any key state. 188 188 * returns the new keymap, or NULL on failure. */ 189 owl_keymap *owl_keyhandler_activate(owl_keyhandler *kh, const char *mapname)190 { 191 owl_keymap *km;189 const owl_keymap *owl_keyhandler_activate(owl_keyhandler *kh, const char *mapname) 190 { 191 const owl_keymap *km; 192 192 if (kh->active && !strcmp(mapname, kh->active->name)) return(kh->active); 193 193 km = owl_dict_find_element(&kh->keymaps, mapname); … … 202 202 int owl_keyhandler_process(owl_keyhandler *kh, owl_input j) 203 203 { 204 owl_keymap *km;204 const owl_keymap *km; 205 205 const owl_keybinding *kb; 206 206 int i, match; -
owl.h
rbd65108 rafa200a 448 448 char *desc; /* description */ 449 449 owl_list bindings; /* key bindings */ 450 struct _owl_keymap *submap; /* submap */450 const struct _owl_keymap *submap; /* submap */ 451 451 void (*default_fn)(owl_input j); /* default action (takes a keypress) */ 452 452 void (*prealways_fn)(owl_input j); /* always called before a keypress is received */ … … 456 456 typedef struct _owl_keyhandler { 457 457 owl_dict keymaps; /* dictionary of keymaps */ 458 owl_keymap *active; /* currently active keymap */458 const owl_keymap *active; /* currently active keymap */ 459 459 int in_esc; /* escape pressed? */ 460 460 int kpstack[OWL_KEYMAP_MAXSTACK+1]; /* current stack of keypresses */
Note: See TracChangeset
for help on using the changeset viewer.