Lines Matching refs:view

57  * The main tty view data structure.
64 struct raw3270_view view;
147 if (count > tp->view.cols * 2 - 11)
148 count = tp->view.cols * 2 - 11;
152 if (count < tp->view.cols * 2 - 11) {
155 off = tp->view.cols * tp->view.rows - 9;
156 raw3270_buffer_address(tp->view.dev, line->string+count+8, off);
174 sizeof(blueprint) + tp->view.cols * 2 - 9);
181 offset = tp->view.cols * (tp->view.rows - 2);
182 raw3270_buffer_address(tp->view.dev, line->string + 1, offset);
183 offset = tp->view.cols * tp->view.rows - 9;
184 raw3270_buffer_address(tp->view.dev, line->string + 8, offset);
187 tp->input = alloc_string(&tp->freemem, tp->view.cols * 2 - 9 + 6);
201 codepage_convert(tp->view.ascebc, tp->status->string + 8, 7);
220 offset = tp->view.cols * tp->view.rows - 9;
221 raw3270_buffer_address(tp->view.dev, line->string + 1, offset);
233 raw3270_buffer_address(tp->view.dev, line->string + 1,
234 tp->view.cols * nr);
237 raw3270_buffer_address(tp->view.dev, cp + 1,
238 tp->view.cols * (nr + 1));
256 line = tp->view.rows - 3;
284 BUG_ON(tp->nr_lines <= tp->view.rows - 2);
295 tp->nr_up + tp->view.rows - 2 >= tp->nr_lines) {
296 tp->nr_up = tp->nr_lines - tp->view.rows + 2;
332 for (i = 0; i < tp->view.rows - 2; i++)
350 struct tty3270 *tp = container_of(rq->view, struct tty3270, view);
381 spin_lock(&tp->view.lock);
441 rc = raw3270_start(&tp->view, wrq);
450 spin_unlock(&tp->view.lock);
482 spin_lock_bh(&tp->view.lock);
497 spin_unlock_bh(&tp->view.lock);
501 * Deactivate tty view.
508 raw3270_deactivate_view(&tp->view);
520 spin_lock_bh(&tp->view.lock);
521 nr_up = tp->nr_up - tp->view.rows + 2;
530 spin_unlock_bh(&tp->view.lock);
542 spin_lock_bh(&tp->view.lock);
543 nr_up = tp->nr_up + tp->view.rows - 2;
544 if (nr_up + tp->view.rows - 2 > tp->nr_lines)
545 nr_up = tp->nr_lines - tp->view.rows + 2;
552 spin_unlock_bh(&tp->view.lock);
563 struct tty3270 *tp = container_of(rrq->view, struct tty3270, view);
567 spin_lock_bh(&tp->view.lock);
594 spin_unlock_bh(&tp->view.lock);
600 raw3270_start(&tp->view, tp->kreset);
609 raw3270_put_view(&tp->view);
618 struct tty3270 *tp = container_of(rq->view, struct tty3270, view);
619 raw3270_get_view(rq->view);
643 rc = raw3270_start(&tp->view, rrq);
645 rc = raw3270_start_irq(&tp->view, rrq);
660 raw3270_put_view(&tp->view);
664 * Switch to the tty view.
667 tty3270_activate(struct raw3270_view *view)
669 struct tty3270 *tp = container_of(view, struct tty3270, view);
677 tty3270_deactivate(struct raw3270_view *view)
679 struct tty3270 *tp = container_of(view, struct tty3270, view);
698 raw3270_get_view(&tp->view);
858 spin_lock_bh(&tp->view.lock);
861 orows = tp->view.rows;
862 tp->view.model = tp->n_model;
863 tp->view.rows = tp->n_rows;
864 tp->view.cols = tp->n_cols;
870 while (tp->nr_lines < tp->view.rows - 2)
873 spin_unlock_bh(&tp->view.lock);
880 ws.ws_row = tp->view.rows - 2;
881 ws.ws_col = tp->view.cols;
887 tty3270_resize(struct raw3270_view *view, int model, int rows, int cols)
889 struct tty3270 *tp = container_of(view, struct tty3270, view);
903 tty3270_release(struct raw3270_view *view)
905 struct tty3270 *tp = container_of(view, struct tty3270, view);
912 raw3270_put_view(&tp->view);
921 tty3270_free(struct raw3270_view *view)
923 struct tty3270 *tp = container_of(view, struct tty3270, view);
926 tty3270_free_screen(tp->screen, tp->view.rows);
939 struct raw3270_view *view = raw3270_find_view(&tty3270_fn, i);
940 if (!IS_ERR(view))
941 raw3270_del_view(view);
959 struct raw3270_view *view;
964 view = raw3270_find_view(&tty3270_fn, tty->index + RAW3270_FIRSTMINOR);
965 if (!IS_ERR(view)) {
966 tp = container_of(view, struct tty3270, view);
968 tty->winsize.ws_row = tp->view.rows - 2;
969 tty->winsize.ws_col = tp->view.cols;
982 rc = raw3270_add_view(&tp->view, &tty3270_fn,
990 tp->screen = tty3270_alloc_screen(tp->view.rows, tp->view.cols);
993 raw3270_put_view(&tp->view);
994 raw3270_del_view(&tp->view);
1000 tty->winsize.ws_row = tp->view.rows - 2;
1001 tty->winsize.ws_col = tp->view.cols;
1008 for (i = 0; i < tp->view.rows - 2; i++)
1016 kbd_ascebc(tp->kbd, tp->view.ascebc);
1018 raw3270_activate_view(&tp->view);
1023 raw3270_put_view(&tp->view);
1067 raw3270_put_view(&tp->view);
1093 cell->character = tp->view.ascebc[' '];
1101 cell->character = tp->view.ascebc[(unsigned int) ch];
1140 if (line->len < tp->view.cols)
1144 i = tp->view.rows - 2 - line_nr;
1195 if (line->len < tp->view.cols) {
1202 if (tp->nr_up + line_nr < tp->view.rows - 2) {
1232 if (tp->cy < tp->view.rows - 3) {
1240 for (i = 0; i < tp->view.rows - 3; i++)
1242 tp->screen[tp->view.rows - 3] = temp;
1266 line->cells[line->len].character = tp->view.ascebc[' '];
1271 if (n > tp->view.cols - tp->cx)
1272 n = tp->view.cols - tp->cx;
1273 k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n);
1277 if (line->len > tp->view.cols)
1278 line->len = tp->view.cols;
1280 line->cells[tp->cx + n].character = tp->view.ascebc[' '];
1324 tp->cx = min_t(int, tp->cx, tp->view.cols - 1);
1370 for (i = tp->cy + 1; i < tp->view.rows - 2; i++) {
1381 for (i = 0; i < tp->view.rows - 2; i++) {
1459 tp->cx = min_t(int, tp->view.cols - 1, max_cx);
1460 cy = min_t(int, tp->view.rows - 3, max_cy);
1642 spin_lock_bh(&tp->view.lock);
1662 if (tp->cx >= tp->view.cols) {
1688 if (tp->cx >= tp->view.cols) {
1704 spin_unlock_bh(&tp->view.lock);
1787 spin_lock_bh(&tp->view.lock);
1796 spin_unlock_bh(&tp->view.lock);
1840 spin_lock_bh(&tp->view.lock);
1846 while (tp->nr_lines < tp->view.rows - 2)
1849 spin_unlock_bh(&tp->view.lock);