Lines Matching refs:wl

82 	struct winlink	*wl;
84 RB_FOREACH(wl, winlinks, wwl) {
85 if (wl->window == w)
86 return (wl);
95 struct winlink wl;
100 wl.idx = idx;
101 return (RB_FIND(winlinks, wwl, &wl));
124 struct winlink *wl;
128 RB_FOREACH(wl, winlinks, wwl)
137 struct winlink *wl;
145 wl = xcalloc(1, sizeof *wl);
146 wl->idx = idx;
147 RB_INSERT(winlinks, wwl, wl);
149 return (wl);
153 winlink_set_window(struct winlink *wl, struct window *w)
155 wl->window = w;
160 winlink_remove(struct winlinks *wwl, struct winlink *wl)
162 struct window *w = wl->window;
164 RB_REMOVE(winlinks, wwl, wl);
165 if (wl->status_text != NULL)
166 xfree(wl->status_text);
167 xfree(wl);
179 winlink_next(struct winlink *wl)
181 return (RB_NEXT(winlinks, wwl, wl));
185 winlink_previous(struct winlink *wl)
187 return (RB_PREV(winlinks, wwl, wl));
191 winlink_next_by_number(struct winlink *wl, struct session *s, int n)
194 if ((wl = RB_NEXT(winlinks, wwl, wl)) == NULL)
195 wl = RB_MIN(winlinks, &s->windows);
198 return (wl);
202 winlink_previous_by_number(struct winlink *wl, struct session *s, int n)
205 if ((wl = RB_PREV(winlinks, wwl, wl)) == NULL)
206 wl = RB_MAX(winlinks, &s->windows);
209 return (wl);
213 winlink_stack_push(struct winlink_stack *stack, struct winlink *wl)
215 if (wl == NULL)
218 winlink_stack_remove(stack, wl);
219 TAILQ_INSERT_HEAD(stack, wl, sentry);
223 winlink_stack_remove(struct winlink_stack *stack, struct winlink *wl)
227 if (wl == NULL)
231 if (wl2 == wl) {
232 TAILQ_REMOVE(stack, wl, sentry);
527 window_printable_flags(struct session *s, struct winlink *wl)
533 if (wl->flags & WINLINK_ACTIVITY)
535 if (wl->flags & WINLINK_BELL)
537 if (wl->flags & WINLINK_CONTENT)
539 if (wl->flags & WINLINK_SILENCE)
541 if (wl == s->curw)
543 if (wl == TAILQ_FIRST(&s->lastw))