Lines Matching refs:wp
235 control_get_pane(struct client *c, struct window_pane *wp) in control_get_pane() argument
238 struct control_pane cp = { .pane = wp->id }; in control_get_pane()
245 control_add_pane(struct client *c, struct window_pane *wp) in control_add_pane() argument
250 cp = control_get_pane(c, wp); in control_add_pane()
255 cp->pane = wp->id; in control_add_pane()
258 memcpy(&cp->offset, &wp->offset, sizeof cp->offset); in control_add_pane()
259 memcpy(&cp->queued, &wp->offset, sizeof cp->queued); in control_add_pane()
282 struct window_pane *wp; in control_window_pane() local
286 if ((wp = window_pane_find_by_id(pane)) == NULL) in control_window_pane()
288 if (winlink_find_by_window(&c->session->windows, wp->window) == NULL) in control_window_pane()
290 return (wp); in control_window_pane()
311 control_pane_offset(struct client *c, struct window_pane *wp, int *off) in control_pane_offset() argument
321 cp = control_get_pane(c, wp); in control_pane_offset()
336 control_set_pane_on(struct client *c, struct window_pane *wp) in control_set_pane_on() argument
340 cp = control_get_pane(c, wp); in control_set_pane_on()
343 memcpy(&cp->offset, &wp->offset, sizeof cp->offset); in control_set_pane_on()
344 memcpy(&cp->queued, &wp->offset, sizeof cp->queued); in control_set_pane_on()
350 control_set_pane_off(struct client *c, struct window_pane *wp) in control_set_pane_off() argument
354 cp = control_add_pane(c, wp); in control_set_pane_off()
360 control_continue_pane(struct client *c, struct window_pane *wp) in control_continue_pane() argument
364 cp = control_get_pane(c, wp); in control_continue_pane()
367 memcpy(&cp->offset, &wp->offset, sizeof cp->offset); in control_continue_pane()
368 memcpy(&cp->queued, &wp->offset, sizeof cp->queued); in control_continue_pane()
369 control_write(c, "%%continue %%%u", wp->id); in control_continue_pane()
375 control_pause_pane(struct client *c, struct window_pane *wp) in control_pause_pane() argument
379 cp = control_add_pane(c, wp); in control_pause_pane()
383 control_write(c, "%%pause %%%u", wp->id); in control_pause_pane()
433 control_check_age(struct client *c, struct window_pane *wp, in control_check_age() argument
447 log_debug("%s: %s: %%%u is %llu behind", __func__, c->name, wp->id, in control_check_age()
455 control_write(c, "%%pause %%%u", wp->id); in control_check_age()
468 control_write_output(struct client *c, struct window_pane *wp) in control_write_output() argument
475 if (winlink_find_by_window(&c->session->windows, wp->window) == NULL) in control_write_output()
479 cp = control_get_pane(c, wp); in control_write_output()
484 cp = control_add_pane(c, wp); in control_write_output()
487 if (control_check_age(c, wp, cp)) in control_write_output()
490 window_pane_get_new_data(wp, &cp->queued, &new_size); in control_write_output()
493 window_pane_update_used_data(wp, &cp->queued, new_size); in control_write_output()
502 cb->size, wp->id); in control_write_output()
506 wp->id); in control_write_output()
515 log_debug("%s: %s: ignoring pane %%%u", __func__, c->name, wp->id); in control_write_output()
516 window_pane_update_used_data(wp, &cp->offset, SIZE_MAX); in control_write_output()
517 window_pane_update_used_data(wp, &cp->queued, SIZE_MAX); in control_write_output()
610 struct evbuffer *message, struct window_pane *wp, size_t size) in control_append_data() argument
622 "%%extended-output %%%u %llu : ", wp->id, in control_append_data()
625 evbuffer_add_printf(message, "%%output %%%u ", wp->id); in control_append_data()
628 new_data = window_pane_get_new_data(wp, &cp->offset, &new_size); in control_append_data()
637 window_pane_update_used_data(wp, &cp->offset, size); in control_append_data()
660 struct window_pane *wp = NULL; in control_write_pending() local
666 wp = control_window_pane(c, cp->pane); in control_write_pending()
667 if (wp == NULL || wp->fd == -1) { in control_write_pending()
677 if (control_check_age(c, wp, cp)) { in control_write_pending()
698 message = control_append_data(c, cp, age, message, wp, size); in control_write_pending()
707 if (wp != NULL && message != NULL) { in control_write_pending()
869 struct window_pane *wp; in control_check_subs_pane() local
876 wp = window_pane_find_by_id(csub->id); in control_check_subs_pane()
877 if (wp == NULL || wp->fd == -1) in control_check_subs_pane()
879 w = wp->window; in control_check_subs_pane()
885 ft = format_create_defaults(NULL, c, s, wl, wp); in control_check_subs_pane()
889 find.pane = wp->id; in control_check_subs_pane()
895 csp->pane = wp->id; in control_check_subs_pane()
906 csub->name, s->id, w->id, wl->idx, wp->id, value); in control_check_subs_pane()
917 struct window_pane *wp; in control_check_subs_all_panes() local
926 TAILQ_FOREACH(wp, &w->panes, entry) { in control_check_subs_all_panes()
927 ft = format_create_defaults(NULL, c, s, wl, wp); in control_check_subs_all_panes()
931 find.pane = wp->id; in control_check_subs_all_panes()
937 csp->pane = wp->id; in control_check_subs_all_panes()
949 csub->name, s->id, w->id, wl->idx, wp->id, value); in control_check_subs_all_panes()