Lines Matching refs:view
75 * The main tty view data structure.
82 struct raw3270_view view;
149 return tp->view.rows - TTY3270_INPUT_AREA_ROWS;
155 raw3270_buffer_address(tp->view.dev, cp, x, y);
225 *cp++ = tp->view.ascebc['>'];
230 tp->view.cols * 2 - TTY3270_STATUS_AREA_SIZE - 2);
238 if (count < tp->view.cols * 2 - 11)
246 *d++ = tp->view.ascebc[(int)*s++];
277 codepage_convert(tp->view.ascebc, cp, len);
305 struct tty3270 *tp = container_of(rq->view, struct tty3270, view);
349 if (line->len < tp->view.cols)
364 if (line->len < tp->view.cols)
442 *cp++ = tp->view.ascebc[c];
539 spin_lock_irq(&tp->view.lock);
573 rc = raw3270_start(&tp->view, wrq);
581 spin_unlock_irq(&tp->view.lock);
605 spin_lock_irq(&tp->view.lock);
614 spin_unlock_irq(&tp->view.lock);
618 * Deactivate tty view.
624 raw3270_deactivate_view(&tp->view);
644 spin_lock_irq(&tp->view.lock);
651 spin_unlock_irq(&tp->view.lock);
661 spin_lock_irq(&tp->view.lock);
666 spin_unlock_irq(&tp->view.lock);
676 struct tty3270 *tp = container_of(rrq->view, struct tty3270, view);
680 spin_lock_irq(&tp->view.lock);
692 len = tty3270_input_size(tp->view.cols) - 6 - rrq->rescnt;
707 raw3270_start_request(&tp->view, tp->readpartreq, TC_WRITESF,
716 spin_unlock_irq(&tp->view.lock);
719 raw3270_start_request(&tp->view, tp->kreset, TC_WRITE, &kreset_data, 1);
728 raw3270_put_view(&tp->view);
736 struct tty3270 *tp = container_of(rq->view, struct tty3270, view);
738 raw3270_get_view(rq->view);
758 raw3270_request_set_data(rrq, tp->input, tty3270_input_size(tp->view.cols));
761 rc = raw3270_start(&tp->view, rrq);
763 rc = raw3270_start_irq(&tp->view, rrq);
778 raw3270_put_view(&tp->view);
782 * Switch to the tty view.
784 static int tty3270_activate(struct raw3270_view *view)
786 struct tty3270 *tp = container_of(view, struct tty3270, view);
793 static void tty3270_deactivate(struct raw3270_view *view)
795 struct tty3270 *tp = container_of(view, struct tty3270, view);
813 raw3270_get_view(&tp->view);
964 static void tty3270_resize(struct raw3270_view *view,
968 struct tty3270 *tp = container_of(view, struct tty3270, view);
981 spin_lock_irq(&tp->view.lock);
983 spin_unlock_irq(&tp->view.lock);
1002 spin_lock_irq(&tp->view.lock);
1007 tp->view.rows = new_rows;
1008 tp->view.cols = new_cols;
1009 tp->view.model = new_model;
1020 spin_unlock_irq(&tp->view.lock);
1031 ws.ws_col = tp->view.cols;
1046 static void tty3270_release(struct raw3270_view *view)
1048 struct tty3270 *tp = container_of(view, struct tty3270, view);
1055 raw3270_put_view(&tp->view);
1063 static void tty3270_free(struct raw3270_view *view)
1065 struct tty3270 *tp = container_of(view, struct tty3270, view);
1083 struct raw3270_view *view = raw3270_find_view(&tty3270_fn, i);
1085 if (!IS_ERR(view))
1086 raw3270_del_view(view);
1114 rc = raw3270_add_view(&tp->view, &tty3270_fn,
1120 tp->screen = tty3270_alloc_screen(tp, tp->view.rows, tp->view.cols,
1133 prompt_sz = tty3270_input_size(tp->view.cols);
1147 tp->rcl_lines = tty3270_alloc_recall(tp->view.cols);
1161 kbd_ascebc(tp->kbd, tp->view.ascebc);
1163 raw3270_activate_view(&tp->view);
1164 raw3270_put_view(&tp->view);
1175 tty3270_free_screen(tp->screen, tp->view.rows);
1177 raw3270_put_view(&tp->view);
1178 raw3270_del_view(&tp->view);
1190 struct raw3270_view *view;
1195 view = raw3270_find_view(&tty3270_fn, tty->index + RAW3270_FIRSTMINOR);
1196 if (IS_ERR(view)) {
1201 tp = container_of(view, struct tty3270, view);
1207 tty->winsize.ws_col = tp->view.cols;
1210 raw3270_put_view(&tp->view);
1250 raw3270_put_view(&tp->view);
1340 if (n > tp->view.cols - tp->cx)
1341 n = tp->view.cols - tp->cx;
1342 k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n);
1346 if (line->len > tp->view.cols)
1347 line->len = tp->view.cols;
1388 tp->cx = min_t(int, tp->cx, tp->view.cols - 1);
1408 end = tp->view.cols;
1416 end = tp->view.cols;
1541 tp->cx = min_t(int, tp->view.cols - 1, max_cx);
1741 spin_lock_irq(&tp->view.lock);
1763 if (tp->cx >= tp->view.cols) {
1794 if (tp->cx >= tp->view.cols) {
1808 spin_unlock_irq(&tp->view.lock);
1872 spin_lock_irq(&tp->view.lock);
1881 spin_unlock_irq(&tp->view.lock);
1922 spin_lock_irq(&tp->view.lock);
1931 spin_unlock_irq(&tp->view.lock);
2065 spin_lock_irqsave(&tp->view.lock, flags);
2072 if (tp->cx >= tp->view.cols) {
2080 spin_unlock_irqrestore(&tp->view.lock, flags);
2094 raw3270_wait_cons_dev(tp->view.dev);
2115 if (!tp->view.dev)
2117 if (!raw3270_view_lock_unavailable(&tp->view)) {
2118 rc = raw3270_activate_view(&tp->view);
2122 if (!spin_trylock_irqsave(&tp->view.lock, flags))
2128 spin_unlock_irqrestore(&tp->view.lock, flags);
2130 spin_lock_irqsave(&tp->view.lock, flags);
2133 spin_unlock_irqrestore(&tp->view.lock, flags);
2157 struct raw3270_view *view;
2177 view = raw3270_find_view(&tty3270_fn, RAW3270_FIRSTMINOR);
2178 if (IS_ERR(view)) {
2183 tp = container_of(view, struct tty3270, view);