Lines Matching full:data
14 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
85 struct window_customize_modedata *data;
101 struct mode_tree_data *data;
150 window_customize_check_item(struct window_customize_modedata *data,
158 if (cmd_find_valid_state(&data->fs))
159 cmd_find_copy_state(fsp, &data->fs);
161 cmd_find_from_pane(fsp, data->wp, 0);
212 window_customize_add_item(struct window_customize_modedata *data)
216 data->item_list = xreallocarray(data->item_list, data->item_size + 1,
217 sizeof *data->item_list);
218 item = data->item_list[data->item_size++] = xcalloc(1, sizeof *item);
231 window_customize_build_array(struct window_customize_modedata *data,
252 item = window_customize_add_item(data);
258 text = format_expand(ft, data->format);
260 mode_tree_add(data->data, top, item, tag, name, text, -1);
271 window_customize_build_option(struct window_customize_modedata *data,
293 if (data->hide_global && global)
323 item = window_customize_add_item(data);
332 text = format_expand(ft, data->format);
334 top = mode_tree_add(data->data, top, item, tag, name, text, 0);
338 window_customize_build_array(data, top, scope, o, ft);
372 window_customize_build_options(struct window_customize_modedata *data,
385 top = mode_tree_add(data->data, NULL, NULL, tag, title, NULL, 0);
413 window_customize_build_option(data, top, scope, o, ft, filter,
437 window_customize_build_option(data, top, scope, o, ft, filter,
444 window_customize_build_keys(struct window_customize_modedata *data,
458 top = mode_tree_add(data->data, NULL, NULL, tag, title, NULL, 0);
480 item = window_customize_add_item(data);
487 expanded = format_expand(ft, data->format);
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,
531 struct window_customize_modedata *data = modedata;
537 for (i = 0; i < data->item_size; i++)
538 window_customize_free_item(data->item_list[i]);
539 free(data->item_list);
540 data->item_list = NULL;
541 data->item_size = 0;
543 if (cmd_find_valid_state(&data->fs))
544 cmd_find_copy_state(&fs, &data->fs);
546 cmd_find_from_pane(&fs, data->wp, 0);
552 window_customize_build_options(data, "Server Options",
558 window_customize_build_options(data, "Session Options",
564 window_customize_build_options(data, "Window & Pane Options",
578 window_customize_build_keys(data, kt, ft, filter, &fs,
590 window_customize_draw_key(__unused struct window_customize_modedata *data,
649 window_customize_draw_option(struct window_customize_modedata *data,
668 if (!window_customize_check_item(data, item, &fs))
840 struct window_customize_modedata *data = modedata;
847 window_customize_draw_key(data, item, ctx, sx, sy);
849 window_customize_draw_option(data, item, ctx, sx, sy);
855 struct window_customize_modedata *data = modedata;
856 struct window_pane *wp = data->wp;
860 if (wme == NULL || wme->data != modedata)
876 struct window_customize_modedata *data;
879 wme->data = data = xcalloc(1, sizeof *data);
880 data->wp = wp;
881 data->references = 1;
883 memcpy(&data->fs, fs, sizeof data->fs);
886 data->format = xstrdup(WINDOW_CUSTOMIZE_DEFAULT_FORMAT);
888 data->format = xstrdup(args_get(args, 'F'));
890 data->prompt_flags = PROMPT_ACCEPT;
892 data->data = mode_tree_start(wp, args, window_customize_build,
894 window_customize_height, NULL, data, window_customize_menu_items,
896 mode_tree_zoom(data->data, args);
898 mode_tree_build(data->data);
899 mode_tree_draw(data->data);
905 window_customize_destroy(struct window_customize_modedata *data)
909 if (--data->references != 0)
912 for (i = 0; i < data->item_size; i++)
913 window_customize_free_item(data->item_list[i]);
914 free(data->item_list);
916 free(data->format);
918 free(data);
924 struct window_customize_modedata *data = wme->data;
926 if (data == NULL)
929 data->dead = 1;
930 mode_tree_free(data->data);
931 window_customize_destroy(data);
937 struct window_customize_modedata *data = wme->data;
939 mode_tree_resize(data->data, sx, sy);
952 struct window_customize_modedata *data = item->data;
955 window_customize_destroy(data);
963 struct window_customize_modedata *data = item->data;
971 if (s == NULL || *s == '\0' || data->dead)
973 if (item == NULL || !window_customize_check_item(data, item, NULL))
995 mode_tree_build(data->data);
996 mode_tree_draw(data->data);
997 data->wp->flags |= PANE_REDRAW;
1010 struct window_customize_modedata *data,
1024 if (item == NULL || !window_customize_check_item(data, item, &fs))
1117 new_item->data = data;
1123 data->references++;
1135 window_customize_unset_option(struct window_customize_modedata *data,
1140 if (item == NULL || !window_customize_check_item(data, item, NULL))
1146 if (item->idx != -1 && item == mode_tree_get_current(data->data))
1147 mode_tree_up(data->data, 0);
1152 window_customize_reset_option(struct window_customize_modedata *data,
1158 if (item == NULL || !window_customize_check_item(data, item, NULL))
1177 struct window_customize_modedata *data = item->data;
1182 if (s == NULL || *s == '\0' || data->dead)
1198 mode_tree_build(data->data);
1199 mode_tree_draw(data->data);
1200 data->wp->flags |= PANE_REDRAW;
1216 struct window_customize_modedata *data = item->data;
1219 if (s == NULL || *s == '\0' || data->dead)
1227 mode_tree_build(data->data);
1228 mode_tree_draw(data->data);
1229 data->wp->flags |= PANE_REDRAW;
1236 struct window_customize_modedata *data,
1248 s = mode_tree_get_current_name(data->data);
1256 new_item->data = data;
1261 data->references++;
1272 new_item->data = data;
1277 data->references++;
1288 window_customize_unset_key(struct window_customize_modedata *data,
1297 if (item == mode_tree_get_current(data->data)) {
1298 mode_tree_collapse_current(data->data);
1299 mode_tree_up(data->data, 0);
1305 window_customize_reset_key(struct window_customize_modedata *data,
1317 if (dd == NULL && item == mode_tree_get_current(data->data)) {
1318 mode_tree_collapse_current(data->data);
1319 mode_tree_up(data->data, 0);
1328 struct window_customize_modedata *data = modedata;
1331 switch (data->change) {
1334 window_customize_unset_key(data, item);
1336 window_customize_unset_option(data, item);
1340 window_customize_reset_key(data, item);
1342 window_customize_reset_option(data, item);
1353 struct window_customize_modedata *data = modedata;
1356 if (s == NULL || *s == '\0' || data->dead)
1361 item = mode_tree_get_current(data->data);
1362 switch (data->change) {
1365 window_customize_unset_key(data, item);
1367 window_customize_unset_option(data, item);
1371 window_customize_reset_key(data, item);
1373 window_customize_reset_option(data, item);
1378 mode_tree_build(data->data);
1379 mode_tree_draw(data->data);
1380 data->wp->flags |= PANE_REDRAW;
1389 struct window_customize_modedata *data = modedata;
1391 if (s == NULL || *s == '\0' || data->dead)
1396 mode_tree_each_tagged(data->data, window_customize_change_each, c,
1398 mode_tree_build(data->data);
1399 mode_tree_draw(data->data);
1400 data->wp->flags |= PANE_REDRAW;
1411 struct window_customize_modedata *data = wme->data;
1417 item = mode_tree_get_current(data->data);
1418 finished = mode_tree_key(data->data, c, &key, m, NULL, NULL);
1419 if (item != (new_item = mode_tree_get_current(data->data)))
1428 window_customize_set_key(c, data, item);
1430 window_customize_set_option(c, data, item, 0, 1);
1433 mode_tree_build(data->data);
1438 window_customize_set_option(c, data, item, 0, 0);
1440 mode_tree_build(data->data);
1446 window_customize_set_option(c, data, item, 1, 0);
1448 mode_tree_build(data->data);
1454 data->references++;
1455 data->change = WINDOW_CUSTOMIZE_RESET;
1458 window_customize_free_callback, data,
1459 PROMPT_SINGLE|PROMPT_NOFORMAT|data->prompt_flags,
1464 tagged = mode_tree_count_tagged(data->data);
1468 data->references++;
1469 data->change = WINDOW_CUSTOMIZE_RESET;
1472 window_customize_free_callback, data,
1473 PROMPT_SINGLE|PROMPT_NOFORMAT|data->prompt_flags,
1485 data->references++;
1486 data->change = WINDOW_CUSTOMIZE_UNSET;
1489 window_customize_free_callback, data,
1490 PROMPT_SINGLE|PROMPT_NOFORMAT|data->prompt_flags,
1495 tagged = mode_tree_count_tagged(data->data);
1499 data->references++;
1500 data->change = WINDOW_CUSTOMIZE_UNSET;
1503 window_customize_free_callback, data,
1504 PROMPT_SINGLE|PROMPT_NOFORMAT|data->prompt_flags,
1509 data->hide_global = !data->hide_global;
1510 mode_tree_build(data->data);
1516 mode_tree_draw(data->data);