- else if (key == get_available_keycode_to_action(world, "winconf"))
- {
- toggle_winconfig(world, world->wmeta->active);
- }
- else if (key == get_available_keycode_to_action(world, "cyc_win_f"))
- {
- cycle_active_win(world->wmeta, 'f');
- }
- else if (key == get_available_keycode_to_action(world, "cyc_win_b"))
- {
- cycle_active_win(world->wmeta, 'b');
- }
- else if (key == get_available_keycode_to_action(world, "scrl_r"))
- {
- scroll_pad(win_meta, '+');
- }
- else if (key == get_available_keycode_to_action(world, "scrl_l"))
- {
- scroll_pad(win_meta, '-');
- }
- else if (key == get_available_keycode_to_action(world, "to_a_keywin"))
- {
- uint8_t test = toggle_window(win_meta, get_win_by_id(world, 'k'));
- exit_err(test, world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_g_keywin"))
- {
- exit_err(toggle_window(win_meta, win_keys), world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_wg_keywin"))
- {
- uint8_t test = toggle_window(win_meta, get_win_by_id(world, '1'));
- exit_err(test, world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_wk_keywin"))
- {
- uint8_t test = toggle_window(win_meta, get_win_by_id(world, '2'));
- exit_err(test, world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_mapwin"))
- {
- exit_err(toggle_window(win_meta, win_map), world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_infowin"))
- {
- exit_err(toggle_window(win_meta, win_info), world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_inv"))
- {
- uint8_t test = toggle_window(win_meta, get_win_by_id(world, 'c'));
- exit_err(test, world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "to_logwin"))
- {
- exit_err(toggle_window(win_meta, win_log), world, err_toggle);
- }
- else if (key == get_available_keycode_to_action(world, "save_conf"))
- {
- save_interface_conf(world);
- }
- else if (key == get_available_keycode_to_action(world, "g_keys_u"))
- {
- move_keyb_mod_selection(&world->kb_global, 'u');
- }
- else if (key == get_available_keycode_to_action(world, "g_keys_d"))
- {
- move_keyb_mod_selection(&world->kb_global, 'd');
- }
- else if (key == get_available_keycode_to_action(world, "g_keys_m"))
- {
- mod_selected_keyb(world, &world->kb_global);
- }
- else if (key == get_available_keycode_to_action(world, "wg_keys_u"))
- {
- move_keyb_mod_selection(&world->kb_wingeom, 'u');
- }
- else if (key == get_available_keycode_to_action(world, "wg_keys_d"))
- {
- move_keyb_mod_selection(&world->kb_wingeom, 'd');
- }
- else if (key == get_available_keycode_to_action(world, "wg_keys_m"))
- {
- mod_selected_keyb(world, &world->kb_wingeom);
- }
- else if (key == get_available_keycode_to_action(world, "wk_keys_u"))
- {
- move_keyb_mod_selection(&world->kb_winkeys, 'u');
- }
- else if (key == get_available_keycode_to_action(world, "wk_keys_d"))
- {
- move_keyb_mod_selection(&world->kb_winkeys, 'd');
- }
- else if (key == get_available_keycode_to_action(world, "wk_keys_m"))
- {
- mod_selected_keyb(world, &world->kb_winkeys);
- }
- else if (key == get_available_keycode_to_action(world, "map_u"))
- {
- map_scroll(world->map, NORTH, win_map->frame.size);
- }
- else if (key == get_available_keycode_to_action(world, "map_d"))
- {
- map_scroll(world->map, SOUTH, win_map->frame.size);
- }
- else if (key == get_available_keycode_to_action(world, "map_r"))
- {
- map_scroll(world->map, EAST, win_map->frame.size);
- }
- else if (key == get_available_keycode_to_action(world, "map_l"))
- {
- map_scroll(world->map, WEST, win_map->frame.size);
- }
- else if (key == get_available_keycode_to_action(world, "map_c"))
- {
- map_center_player(world->map, world->player, win_map->frame.size);
- }
- else if (key == get_available_keycode_to_action(world, "reload_conf"))
+ return 0;
+}
+
+
+
+extern uint8_t wingeom_control(int key)
+{
+ if ( try_cmd_0args('k', key, "to_height_t", toggle_win_height_type)
+ || try_cmd_0args('k', key, "to_width_t", toggle_win_width_type)
+ || try_cmd_1args('k', key, "grow_h", growshrink_active_window, '*')
+ || try_cmd_1args('k', key, "shri_h", growshrink_active_window, '_')
+ || try_cmd_1args('k', key, "grow_v", growshrink_active_window, '+')
+ || try_cmd_1args('k', key, "shri_v", growshrink_active_window, '-')
+ || try_cmd_1args('k', key, "shift_f", wrap_shift_active_win, 'f')
+ || try_cmd_1args('k', key, "shift_b", wrap_shift_active_win, 'b'))