Lines Matching refs:view

64 	struct raw3270_view view;  member
147 if (count > tp->view.cols * 2 - 11) in tty3270_update_prompt()
148 count = tp->view.cols * 2 - 11; in tty3270_update_prompt()
152 if (count < tp->view.cols * 2 - 11) { in tty3270_update_prompt()
155 off = tp->view.cols * tp->view.rows - 9; in tty3270_update_prompt()
156 raw3270_buffer_address(tp->view.dev, line->string+count+8, off); in tty3270_update_prompt()
174 sizeof(blueprint) + tp->view.cols * 2 - 9); in tty3270_create_prompt()
181 offset = tp->view.cols * (tp->view.rows - 2); in tty3270_create_prompt()
182 raw3270_buffer_address(tp->view.dev, line->string + 1, offset); in tty3270_create_prompt()
183 offset = tp->view.cols * tp->view.rows - 9; in tty3270_create_prompt()
184 raw3270_buffer_address(tp->view.dev, line->string + 8, offset); in tty3270_create_prompt()
187 tp->input = alloc_string(&tp->freemem, tp->view.cols * 2 - 9 + 6); in tty3270_create_prompt()
201 codepage_convert(tp->view.ascebc, tp->status->string + 8, 7); in tty3270_update_status()
220 offset = tp->view.cols * tp->view.rows - 9; in tty3270_create_status()
221 raw3270_buffer_address(tp->view.dev, line->string + 1, offset); in tty3270_create_status()
233 raw3270_buffer_address(tp->view.dev, line->string + 1, in tty3270_update_string()
234 tp->view.cols * nr); in tty3270_update_string()
237 raw3270_buffer_address(tp->view.dev, cp + 1, in tty3270_update_string()
238 tp->view.cols * (nr + 1)); in tty3270_update_string()
256 line = tp->view.rows - 3; in tty3270_rebuild_update()
284 BUG_ON(tp->nr_lines <= tp->view.rows - 2); in tty3270_alloc_string()
295 tp->nr_up + tp->view.rows - 2 >= tp->nr_lines) { in tty3270_alloc_string()
296 tp->nr_up = tp->nr_lines - tp->view.rows + 2; in tty3270_alloc_string()
332 for (i = 0; i < tp->view.rows - 2; i++) in tty3270_blank_screen()
350 struct tty3270 *tp = container_of(rq->view, struct tty3270, view); in tty3270_write_callback()
381 spin_lock(&tp->view.lock); in tty3270_update()
443 rc = raw3270_start(&tp->view, wrq); in tty3270_update()
452 spin_unlock(&tp->view.lock); in tty3270_update()
484 spin_lock_bh(&tp->view.lock); in tty3270_rcl_backward()
499 spin_unlock_bh(&tp->view.lock); in tty3270_rcl_backward()
510 raw3270_deactivate_view(&tp->view); in tty3270_exit_tty()
522 spin_lock_bh(&tp->view.lock); in tty3270_scroll_forward()
523 nr_up = tp->nr_up - tp->view.rows + 2; in tty3270_scroll_forward()
532 spin_unlock_bh(&tp->view.lock); in tty3270_scroll_forward()
544 spin_lock_bh(&tp->view.lock); in tty3270_scroll_backward()
545 nr_up = tp->nr_up + tp->view.rows - 2; in tty3270_scroll_backward()
546 if (nr_up + tp->view.rows - 2 > tp->nr_lines) in tty3270_scroll_backward()
547 nr_up = tp->nr_lines - tp->view.rows + 2; in tty3270_scroll_backward()
554 spin_unlock_bh(&tp->view.lock); in tty3270_scroll_backward()
565 struct tty3270 *tp = container_of(rrq->view, struct tty3270, view); in tty3270_read_tasklet()
569 spin_lock_bh(&tp->view.lock); in tty3270_read_tasklet()
596 spin_unlock_bh(&tp->view.lock); in tty3270_read_tasklet()
602 raw3270_start(&tp->view, tp->kreset); in tty3270_read_tasklet()
611 raw3270_put_view(&tp->view); in tty3270_read_tasklet()
620 struct tty3270 *tp = container_of(rq->view, struct tty3270, view); in tty3270_read_callback()
621 raw3270_get_view(rq->view); in tty3270_read_callback()
645 rc = raw3270_start(&tp->view, rrq); in tty3270_issue_read()
647 rc = raw3270_start_irq(&tp->view, rrq); in tty3270_issue_read()
662 raw3270_put_view(&tp->view); in tty3270_hangup_tasklet()
669 tty3270_activate(struct raw3270_view *view) in tty3270_activate() argument
671 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_activate()
679 tty3270_deactivate(struct raw3270_view *view) in tty3270_deactivate() argument
681 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_deactivate()
700 raw3270_get_view(&tp->view); in tty3270_irq()
860 spin_lock_bh(&tp->view.lock); in tty3270_resize_work()
863 orows = tp->view.rows; in tty3270_resize_work()
864 tp->view.model = tp->n_model; in tty3270_resize_work()
865 tp->view.rows = tp->n_rows; in tty3270_resize_work()
866 tp->view.cols = tp->n_cols; in tty3270_resize_work()
872 while (tp->nr_lines < tp->view.rows - 2) in tty3270_resize_work()
875 spin_unlock_bh(&tp->view.lock); in tty3270_resize_work()
882 ws.ws_row = tp->view.rows - 2; in tty3270_resize_work()
883 ws.ws_col = tp->view.cols; in tty3270_resize_work()
889 tty3270_resize(struct raw3270_view *view, int model, int rows, int cols) in tty3270_resize() argument
891 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_resize()
905 tty3270_release(struct raw3270_view *view) in tty3270_release() argument
907 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_release()
914 raw3270_put_view(&tp->view); in tty3270_release()
923 tty3270_free(struct raw3270_view *view) in tty3270_free() argument
925 struct tty3270 *tp = container_of(view, struct tty3270, view); in tty3270_free()
928 tty3270_free_screen(tp->screen, tp->view.rows); in tty3270_free()
941 struct raw3270_view *view = raw3270_find_view(&tty3270_fn, i); in tty3270_del_views() local
942 if (!IS_ERR(view)) in tty3270_del_views()
943 raw3270_del_view(view); in tty3270_del_views()
961 struct raw3270_view *view; in tty3270_install() local
966 view = raw3270_find_view(&tty3270_fn, tty->index + RAW3270_FIRSTMINOR); in tty3270_install()
967 if (!IS_ERR(view)) { in tty3270_install()
968 tp = container_of(view, struct tty3270, view); in tty3270_install()
970 tty->winsize.ws_row = tp->view.rows - 2; in tty3270_install()
971 tty->winsize.ws_col = tp->view.cols; in tty3270_install()
983 rc = raw3270_add_view(&tp->view, &tty3270_fn, in tty3270_install()
991 tp->screen = tty3270_alloc_screen(tp->view.rows, tp->view.cols); in tty3270_install()
994 raw3270_put_view(&tp->view); in tty3270_install()
995 raw3270_del_view(&tp->view); in tty3270_install()
1000 tty->winsize.ws_row = tp->view.rows - 2; in tty3270_install()
1001 tty->winsize.ws_col = tp->view.cols; in tty3270_install()
1008 for (i = 0; i < tp->view.rows - 2; i++) in tty3270_install()
1016 kbd_ascebc(tp->kbd, tp->view.ascebc); in tty3270_install()
1018 raw3270_activate_view(&tp->view); in tty3270_install()
1023 raw3270_put_view(&tp->view); in tty3270_install()
1067 raw3270_put_view(&tp->view); in tty3270_cleanup()
1093 cell->character = tp->view.ascebc[' ']; in tty3270_put_character()
1101 cell->character = tp->view.ascebc[(unsigned int) ch]; in tty3270_put_character()
1140 if (line->len < tp->view.cols) in tty3270_convert_line()
1144 i = tp->view.rows - 2 - line_nr; in tty3270_convert_line()
1195 if (line->len < tp->view.cols) { in tty3270_convert_line()
1202 if (tp->nr_up + line_nr < tp->view.rows - 2) { in tty3270_convert_line()
1232 if (tp->cy < tp->view.rows - 3) { in tty3270_lf()
1240 for (i = 0; i < tp->view.rows - 3; i++) in tty3270_lf()
1242 tp->screen[tp->view.rows - 3] = temp; in tty3270_lf()
1266 line->cells[line->len].character = tp->view.ascebc[' ']; in tty3270_insert_characters()
1271 if (n > tp->view.cols - tp->cx) in tty3270_insert_characters()
1272 n = tp->view.cols - tp->cx; in tty3270_insert_characters()
1273 k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n); in tty3270_insert_characters()
1277 if (line->len > tp->view.cols) in tty3270_insert_characters()
1278 line->len = tp->view.cols; in tty3270_insert_characters()
1280 line->cells[tp->cx + n].character = tp->view.ascebc[' ']; in tty3270_insert_characters()
1324 tp->cx = min_t(int, tp->cx, tp->view.cols - 1); in tty3270_erase_characters()
1370 for (i = tp->cy + 1; i < tp->view.rows - 2; i++) { in tty3270_erase_display()
1381 for (i = 0; i < tp->view.rows - 2; i++) { in tty3270_erase_display()
1459 tp->cx = min_t(int, tp->view.cols - 1, max_cx); in tty3270_goto_xy()
1460 cy = min_t(int, tp->view.rows - 3, max_cy); in tty3270_goto_xy()
1642 spin_lock_bh(&tp->view.lock); in tty3270_do_write()
1662 if (tp->cx >= tp->view.cols) { in tty3270_do_write()
1688 if (tp->cx >= tp->view.cols) { in tty3270_do_write()
1704 spin_unlock_bh(&tp->view.lock); in tty3270_do_write()
1771 spin_lock_bh(&tp->view.lock); in tty3270_set_termios()
1780 spin_unlock_bh(&tp->view.lock); in tty3270_set_termios()
1824 spin_lock_bh(&tp->view.lock); in tty3270_hangup()
1830 while (tp->nr_lines < tp->view.rows - 2) in tty3270_hangup()
1833 spin_unlock_bh(&tp->view.lock); in tty3270_hangup()