Lines Matching +defs:c +defs:label +defs:offset

1 /* $OpenBSD: window-tree.c,v 1.64 2024/10/04 19:16:13 nicm Exp $ */
4 * Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
144 int offset;
513 u_int sx, u_int sy, const struct grid_cell *gc, const char *label)
518 len = strlen(label);
530 screen_write_puts(ctx, gc, "%s", label);
541 u_int loop, total, visible, each, width, offset;
545 char *label;
578 if (data->offset < -(int)start)
579 data->offset = -(int)start;
580 if (data->offset > (int)(total - end))
581 data->offset = (int)(total - end);
582 start += data->offset;
583 end += data->offset;
639 offset = 3 + (i * each);
641 offset = (i * each);
647 screen_write_cursormove(ctx, cx + offset, cy, 0);
650 xasprintf(&label, " %u:%s ", wl->idx, w->name);
651 if (strlen(label) > width)
652 xasprintf(&label, " %u ", wl->idx);
653 window_tree_draw_label(ctx, cx + offset, cy, width, sy, &gc,
654 label);
655 free(label);
658 screen_write_cursormove(ctx, cx + offset + width, cy, 0);
674 u_int loop, total, visible, each, width, offset;
678 char *label;
711 if (data->offset < -(int)start)
712 data->offset = -(int)start;
713 if (data->offset > (int)(total - end))
714 data->offset = (int)(total - end);
715 start += data->offset;
716 end += data->offset;
771 offset = 3 + (i * each);
773 offset = (i * each);
779 screen_write_cursormove(ctx, cx + offset, cy, 0);
784 xasprintf(&label, " %u ", pane_idx);
785 window_tree_draw_label(ctx, cx + offset, cy, each, sy, &gc,
786 label);
787 free(label);
790 screen_write_cursormove(ctx, cx + offset + width, cy, 0);
864 window_tree_menu(void *modedata, struct client *c, key_code key)
873 window_tree_key(wme, c, NULL, NULL, key, NULL);
1044 window_tree_command_each(void *modedata, void *itemdata, struct client *c,
1054 mode_tree_run_command(c, &fs, data->entered, name);
1073 window_tree_command_callback(struct client *c, void *modedata, const char *s,
1082 mode_tree_each_tagged(data->data, window_tree_command_each, c,
1087 cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
1102 __unused struct client *c, __unused key_code key)
1132 window_tree_kill_current_callback(struct client *c, void *modedata,
1143 window_tree_kill_each(data, mode_tree_get_current(mtd), c, KEYC_NONE);
1147 cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
1153 window_tree_kill_tagged_callback(struct client *c, void *modedata,
1164 mode_tree_each_tagged(mtd, window_tree_kill_each, c, KEYC_NONE, 1);
1168 cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
1235 window_tree_key(struct window_mode_entry *wme, struct client *c,
1251 finished = mode_tree_key(data->data, c, &key, m, &x, &y);
1256 data->offset = 0;
1265 data->offset--;
1268 data->offset++;
1309 status_prompt_set(c, NULL, prompt, "",
1321 status_prompt_set(c, NULL, prompt, "",
1334 status_prompt_set(c, NULL, prompt, "",
1342 mode_tree_run_command(c, NULL, data->command, name);