Lines Matching refs:view
63 struct raw3270_view view; member
145 if (count > tp->view.cols * 2 - 11) in tty3270_update_prompt()
146 count = tp->view.cols * 2 - 11; in tty3270_update_prompt()
150 if (count < tp->view.cols * 2 - 11) { in tty3270_update_prompt()
153 off = tp->view.cols * tp->view.rows - 9; in tty3270_update_prompt()
154 raw3270_buffer_address(tp->view.dev, line->string+count+8, off); in tty3270_update_prompt()
172 sizeof(blueprint) + tp->view.cols * 2 - 9); in tty3270_create_prompt()
179 offset = tp->view.cols * (tp->view.rows - 2); in tty3270_create_prompt()
180 raw3270_buffer_address(tp->view.dev, line->string + 1, offset); in tty3270_create_prompt()
181 offset = tp->view.cols * tp->view.rows - 9; in tty3270_create_prompt()
182 raw3270_buffer_address(tp->view.dev, line->string + 8, offset); in tty3270_create_prompt()
185 tp->input = alloc_string(&tp->freemem, tp->view.cols * 2 - 9 + 6); in tty3270_create_prompt()
199 codepage_convert(tp->view.ascebc, tp->status->string + 8, 7); in tty3270_update_status()
218 offset = tp->view.cols * tp->view.rows - 9; in tty3270_create_status()
219 raw3270_buffer_address(tp->view.dev, line->string + 1, offset); in tty3270_create_status()
231 raw3270_buffer_address(tp->view.dev, line->string + 1, in tty3270_update_string()
232 tp->view.cols * nr); in tty3270_update_string()
235 raw3270_buffer_address(tp->view.dev, cp + 1, in tty3270_update_string()
236 tp->view.cols * (nr + 1)); in tty3270_update_string()
254 line = tp->view.rows - 3; in tty3270_rebuild_update()
282 BUG_ON(tp->nr_lines <= tp->view.rows - 2); in tty3270_alloc_string()
293 tp->nr_up + tp->view.rows - 2 >= tp->nr_lines) { in tty3270_alloc_string()
294 tp->nr_up = tp->nr_lines - tp->view.rows + 2; in tty3270_alloc_string()
327 struct tty3270 *tp = container_of(rq->view, struct tty3270, view); in tty3270_write_callback()
357 spin_lock(&tp->view.lock); in tty3270_update()
414 rc = raw3270_start(&tp->view, wrq); in tty3270_update()
423 spin_unlock(&tp->view.lock); in tty3270_update()
455 spin_lock_bh(&tp->view.lock); in tty3270_rcl_backward()
470 spin_unlock_bh(&tp->view.lock); in tty3270_rcl_backward()
481 raw3270_deactivate_view(&tp->view); in tty3270_exit_tty()
493 spin_lock_bh(&tp->view.lock); in tty3270_scroll_forward()
494 nr_up = tp->nr_up - tp->view.rows + 2; in tty3270_scroll_forward()
503 spin_unlock_bh(&tp->view.lock); in tty3270_scroll_forward()
515 spin_lock_bh(&tp->view.lock); in tty3270_scroll_backward()
516 nr_up = tp->nr_up + tp->view.rows - 2; in tty3270_scroll_backward()
517 if (nr_up + tp->view.rows - 2 > tp->nr_lines) in tty3270_scroll_backward()
518 nr_up = tp->nr_lines - tp->view.rows + 2; in tty3270_scroll_backward()
525 spin_unlock_bh(&tp->view.lock); in tty3270_scroll_backward()
535 struct tty3270 *tp = container_of(rrq->view, struct tty3270, view); in tty3270_read_tasklet()
539 spin_lock_bh(&tp->view.lock); in tty3270_read_tasklet()
566 spin_unlock_bh(&tp->view.lock); in tty3270_read_tasklet()
572 raw3270_start(&tp->view, tp->kreset); in tty3270_read_tasklet()
581 raw3270_put_view(&tp->view); in tty3270_read_tasklet()
590 struct tty3270 *tp = container_of(rq->view, struct tty3270, view); in tty3270_read_callback()
591 raw3270_get_view(rq->view); in tty3270_read_callback()
615 rc = raw3270_start(&tp->view, rrq); in tty3270_issue_read()
617 rc = raw3270_start_irq(&tp->view, rrq); in tty3270_issue_read()
628 tty3270_activate(struct raw3270_view *view) in tty3270_activate() argument
630 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_activate()
638 tty3270_deactivate(struct raw3270_view *view) in tty3270_deactivate() argument
640 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_deactivate()
816 spin_lock_bh(&tp->view.lock); in tty3270_resize_work()
818 orows = tp->view.rows; in tty3270_resize_work()
819 tp->view.model = tp->n_model; in tty3270_resize_work()
820 tp->view.rows = tp->n_rows; in tty3270_resize_work()
821 tp->view.cols = tp->n_cols; in tty3270_resize_work()
828 while (tp->nr_lines < tp->view.rows - 2) in tty3270_resize_work()
831 spin_unlock_bh(&tp->view.lock); in tty3270_resize_work()
838 ws.ws_row = tp->view.rows - 2; in tty3270_resize_work()
839 ws.ws_col = tp->view.cols; in tty3270_resize_work()
844 tty3270_resize(struct raw3270_view *view, int model, int rows, int cols) in tty3270_resize() argument
846 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_resize()
858 tty3270_release(struct raw3270_view *view) in tty3270_release() argument
860 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_release()
867 raw3270_put_view(&tp->view); in tty3270_release()
876 tty3270_free(struct raw3270_view *view) in tty3270_free() argument
878 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_free()
881 tty3270_free_screen(tp->screen, tp->view.rows); in tty3270_free()
894 struct raw3270_view *view = raw3270_find_view(&tty3270_fn, i); in tty3270_del_views() local
895 if (!IS_ERR(view)) in tty3270_del_views()
896 raw3270_del_view(view); in tty3270_del_views()
914 struct raw3270_view *view; in tty3270_install() local
919 view = raw3270_find_view(&tty3270_fn, tty->index + RAW3270_FIRSTMINOR); in tty3270_install()
920 if (!IS_ERR(view)) { in tty3270_install()
921 tp = container_of(view, struct tty3270, view); in tty3270_install()
923 tty->winsize.ws_row = tp->view.rows - 2; in tty3270_install()
924 tty->winsize.ws_col = tp->view.cols; in tty3270_install()
939 rc = raw3270_add_view(&tp->view, &tty3270_fn, in tty3270_install()
947 tp->screen = tty3270_alloc_screen(tp->view.rows, tp->view.cols); in tty3270_install()
950 raw3270_put_view(&tp->view); in tty3270_install()
951 raw3270_del_view(&tp->view); in tty3270_install()
958 tty->winsize.ws_row = tp->view.rows - 2; in tty3270_install()
959 tty->winsize.ws_col = tp->view.cols; in tty3270_install()
966 for (i = 0; i < tp->view.rows - 2; i++) in tty3270_install()
974 kbd_ascebc(tp->kbd, tp->view.ascebc); in tty3270_install()
976 raw3270_activate_view(&tp->view); in tty3270_install()
980 raw3270_put_view(&tp->view); in tty3270_install()
1025 raw3270_put_view(&tp->view); in tty3270_cleanup()
1050 cell->character = tp->view.ascebc[' ']; in tty3270_put_character()
1058 cell->character = tp->view.ascebc[(unsigned int) ch]; in tty3270_put_character()
1097 if (line->len < tp->view.cols) in tty3270_convert_line()
1101 i = tp->view.rows - 2 - line_nr; in tty3270_convert_line()
1152 if (line->len < tp->view.cols) { in tty3270_convert_line()
1159 if (tp->nr_up + line_nr < tp->view.rows - 2) { in tty3270_convert_line()
1189 if (tp->cy < tp->view.rows - 3) { in tty3270_lf()
1197 for (i = 0; i < tp->view.rows - 3; i++) in tty3270_lf()
1199 tp->screen[tp->view.rows - 3] = temp; in tty3270_lf()
1223 line->cells[line->len].character = tp->view.ascebc[' ']; in tty3270_insert_characters()
1228 if (n > tp->view.cols - tp->cx) in tty3270_insert_characters()
1229 n = tp->view.cols - tp->cx; in tty3270_insert_characters()
1230 k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n); in tty3270_insert_characters()
1234 if (line->len > tp->view.cols) in tty3270_insert_characters()
1235 line->len = tp->view.cols; in tty3270_insert_characters()
1237 line->cells[tp->cx + n].character = tp->view.ascebc[' ']; in tty3270_insert_characters()
1281 tp->cx = min_t(int, tp->cx, tp->view.cols - 1); in tty3270_erase_characters()
1327 for (i = tp->cy + 1; i < tp->view.rows - 2; i++) { in tty3270_erase_display()
1338 for (i = 0; i < tp->view.rows - 2; i++) { in tty3270_erase_display()
1416 tp->cx = min_t(int, tp->view.cols - 1, max_cx); in tty3270_goto_xy()
1417 cy = min_t(int, tp->view.rows - 3, max_cy); in tty3270_goto_xy()
1599 spin_lock_bh(&tp->view.lock); in tty3270_do_write()
1619 if (tp->cx >= tp->view.cols) { in tty3270_do_write()
1645 if (tp->cx >= tp->view.cols) { in tty3270_do_write()
1661 spin_unlock_bh(&tp->view.lock); in tty3270_do_write()
1744 spin_lock_bh(&tp->view.lock); in tty3270_set_termios()
1753 spin_unlock_bh(&tp->view.lock); in tty3270_set_termios()