Lines Matching defs:item

151     struct window_customize_itemdata *item, struct cmd_find_state *fsp)
162 return (item->oo == window_customize_get_tree(item->scope, fsp));
166 window_customize_get_key(struct window_customize_itemdata *item,
172 kt = key_bindings_get_table(item->table, 0);
175 bd = key_bindings_get(kt, item->key);
214 struct window_customize_itemdata *item;
218 item = data->item_list[data->item_size++] = xcalloc(1, sizeof *item);
219 return (item);
223 window_customize_free_item(struct window_customize_itemdata *item)
225 free(item->table);
226 free(item->name);
227 free(item);
237 struct window_customize_itemdata *item;
252 item = window_customize_add_item(data);
253 item->scope = scope;
254 item->oo = oo;
255 item->name = xstrdup(options_name(o));
256 item->idx = idx;
260 mode_tree_add(data->data, top, item, tag, name, text, -1);
279 struct window_customize_itemdata *item;
323 item = window_customize_add_item(data);
324 item->oo = oo;
325 item->scope = scope;
326 item->name = xstrdup(name);
327 item->idx = -1;
334 top = mode_tree_add(data->data, top, item, tag, name, text, 0);
449 struct window_customize_itemdata *item;
480 item = window_customize_add_item(data);
481 item->scope = WINDOW_CUSTOMIZE_KEY;
482 item->table = xstrdup(kt->name);
483 item->key = bd->key;
484 item->name = xstrdup(key_string_lookup_key(item->key, 0));
485 item->idx = -1;
488 child = mode_tree_add(data->data, top, item, (uint64_t)bd,
495 mti = mode_tree_add(data->data, child, item,
505 mti = mode_tree_add(data->data, child, item,
515 mti = mode_tree_add(data->data, child, item,
591 struct window_customize_itemdata *item, struct screen_write_ctx *ctx,
601 if (item == NULL || !window_customize_get_key(item, &kt, &bd))
650 struct window_customize_itemdata *item, struct screen_write_ctx *ctx,
668 if (!window_customize_check_item(data, item, &fs))
670 name = item->name;
671 idx = item->idx;
673 o = options_get(item->oo, name);
764 gc.fg = options_get_number(item->oo, name);
773 style_apply(&gc, item->oo, name, ft);
792 switch (item->scope) {
794 wo = options_get_parent(item->oo);
800 go = options_get_parent(item->oo);
841 struct window_customize_itemdata *item = itemdata;
843 if (item == NULL)
846 if (item->scope == WINDOW_CUSTOMIZE_KEY)
847 window_customize_draw_key(data, item, ctx, sx, sy);
849 window_customize_draw_option(data, item, ctx, sx, sy);
951 struct window_customize_itemdata *item = itemdata;
952 struct window_customize_modedata *data = item->data;
954 window_customize_free_item(item);
962 struct window_customize_itemdata *item = itemdata;
963 struct window_customize_modedata *data = item->data;
966 struct options *oo = item->oo;
967 const char *name = item->name;
969 int idx = item->idx;
973 if (item == NULL || !window_customize_check_item(data, item, NULL))
994 options_push_changes(item->name);
1011 struct window_customize_itemdata *item, int global, int pane)
1017 int flag, idx = item->idx;
1020 const char *name = item->name, *space = "";
1024 if (item == NULL || !window_customize_check_item(data, item, &fs))
1026 o = options_get(item->oo, name);
1034 scope = item->scope;
1035 oo = item->oo;
1038 switch (item->scope) {
1044 scope = item->scope;
1055 switch (item->scope) {
1060 scope = item->scope;
1080 if (scope == item->scope)
1081 oo = item->oo;
1136 struct window_customize_itemdata *item)
1140 if (item == NULL || !window_customize_check_item(data, item, NULL))
1143 o = options_get(item->oo, item->name);
1146 if (item->idx != -1 && item == mode_tree_get_current(data->data))
1148 options_remove_or_default(o, item->idx, NULL);
1153 struct window_customize_itemdata *item)
1158 if (item == NULL || !window_customize_check_item(data, item, NULL))
1160 if (item->idx != -1)
1163 oo = item->oo;
1165 o = options_get_only(item->oo, item->name);
1176 struct window_customize_itemdata *item = itemdata;
1177 struct window_customize_modedata *data = item->data;
1184 if (item == NULL || !window_customize_get_key(item, NULL, &bd))
1215 struct window_customize_itemdata *item = itemdata;
1216 struct window_customize_modedata *data = item->data;
1221 if (item == NULL || !window_customize_get_key(item, NULL, &bd))
1237 struct window_customize_itemdata *item)
1239 key_code key = item->key;
1245 if (item == NULL || !window_customize_get_key(item, NULL, &bd))
1257 new_item->scope = item->scope;
1258 new_item->table = xstrdup(item->table);
1273 new_item->scope = item->scope;
1274 new_item->table = xstrdup(item->table);
1289 struct window_customize_itemdata *item)
1294 if (item == NULL || !window_customize_get_key(item, &kt, &bd))
1297 if (item == mode_tree_get_current(data->data)) {
1306 struct window_customize_itemdata *item)
1311 if (item == NULL || !window_customize_get_key(item, &kt, &bd))
1317 if (dd == NULL && item == mode_tree_get_current(data->data)) {
1329 struct window_customize_itemdata *item = itemdata;
1333 if (item->scope == WINDOW_CUSTOMIZE_KEY)
1334 window_customize_unset_key(data, item);
1336 window_customize_unset_option(data, item);
1339 if (item->scope == WINDOW_CUSTOMIZE_KEY)
1340 window_customize_reset_key(data, item);
1342 window_customize_reset_option(data, item);
1345 if (item->scope != WINDOW_CUSTOMIZE_KEY)
1346 options_push_changes(item->name);
1354 struct window_customize_itemdata *item;
1361 item = mode_tree_get_current(data->data);
1364 if (item->scope == WINDOW_CUSTOMIZE_KEY)
1365 window_customize_unset_key(data, item);
1367 window_customize_unset_option(data, item);
1370 if (item->scope == WINDOW_CUSTOMIZE_KEY)
1371 window_customize_reset_key(data, item);
1373 window_customize_reset_option(data, item);
1376 if (item->scope != WINDOW_CUSTOMIZE_KEY)
1377 options_push_changes(item->name);
1412 struct window_customize_itemdata *item, *new_item;
1417 item = mode_tree_get_current(data->data);
1419 if (item != (new_item = mode_tree_get_current(data->data)))
1420 item = new_item;
1425 if (item == NULL)
1427 if (item->scope == WINDOW_CUSTOMIZE_KEY)
1428 window_customize_set_key(c, data, item);
1430 window_customize_set_option(c, data, item, 0, 1);
1431 options_push_changes(item->name);
1436 if (item == NULL || item->scope == WINDOW_CUSTOMIZE_KEY)
1438 window_customize_set_option(c, data, item, 0, 0);
1439 options_push_changes(item->name);
1444 if (item == NULL || item->scope == WINDOW_CUSTOMIZE_KEY)
1446 window_customize_set_option(c, data, item, 1, 0);
1447 options_push_changes(item->name);
1451 if (item == NULL || item->idx != -1)
1453 xasprintf(&prompt, "Reset %s to default? ", item->name);
1478 if (item == NULL)
1480 idx = item->idx;
1482 xasprintf(&prompt, "Unset %s[%d]? ", item->name, idx);
1484 xasprintf(&prompt, "Unset %s? ", item->name);