# tty_draw_line

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1281
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-tty_draw_line/

```c
void tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx, u_int atx, u_int aty, const struct grid_cell *defaults, int *palette)
```

## Parameters

- `tty` (`struct tty *`)
- `s` (`struct screen *`)
- `px` (`u_int`)
- `py` (`u_int`)
- `nx` (`u_int`)
- `atx` (`u_int`)
- `aty` (`u_int`)
- `defaults` (`const struct grid_cell *`)
- `palette` (`int *`)

## Called by

- [`menu_draw_cb`](/en/tmux/3.2a/reference/c-function-menu-c-menu_draw_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/menu.c#L161)
- [`popup_draw_cb`](/en/tmux/3.2a/reference/c-function-popup-c-popup_draw_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/popup.c#L142)
- [`screen_redraw_draw_pane`](/en/tmux/3.2a/reference/c-function-screen-redraw-c-screen_redraw_draw_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-redraw.c#L841)
- [`screen_redraw_draw_pane_status`](/en/tmux/3.2a/reference/c-function-screen-redraw-c-screen_redraw_draw_pane_status/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-redraw.c#L520)
- [`screen_redraw_draw_status`](/en/tmux/3.2a/reference/c-function-screen-redraw-c-screen_redraw_draw_status/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-redraw.c#L783)
- [`tty_draw_pane`](/en/tmux/3.2a/reference/c-function-tty-c-tty_draw_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1229)

## Calls

- [`grid_get_line`](/en/tmux/3.2a/reference/c-function-grid_get_line/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1317)
- [`grid_view_get_cell`](/en/tmux/3.2a/reference/c-function-grid_view_get_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1355)
- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1294)
- [`screen_select_cell`](/en/tmux/3.2a/reference/c-function-screen_select_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1385)
- [`tty_attributes`](/en/tmux/3.2a/reference/c-function-tty_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1367)
- [`tty_check_codeset`](/en/tmux/3.2a/reference/c-function-tty-c-tty_check_codeset/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1356)
- [`tty_check_overlay`](/en/tmux/3.2a/reference/c-function-tty-c-tty_check_overlay/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1388)
- [`tty_clear_line`](/en/tmux/3.2a/reference/c-function-tty-c-tty_clear_line/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1370)
- [`tty_cursor`](/en/tmux/3.2a/reference/c-function-tty_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1341)
- [`tty_default_attributes`](/en/tmux/3.2a/reference/c-function-tty-c-tty_default_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1340)
- [`tty_margin_off`](/en/tmux/3.2a/reference/c-function-tty_margin_off/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1308)
- [`tty_putc`](/en/tmux/3.2a/reference/c-function-tty_putc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1397)
- [`tty_putcode`](/en/tmux/3.2a/reference/c-function-tty_putcode/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1342)
- [`tty_putn`](/en/tmux/3.2a/reference/c-function-tty_putn/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1375)
- [`tty_region_off`](/en/tmux/3.2a/reference/c-function-tty_region_off/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1307)
- [`tty_update_mode`](/en/tmux/3.2a/reference/c-function-tty_update_mode/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1305)

## Other function references

- [`tty_fake_bce`](/en/tmux/3.2a/reference/c-function-tty-c-tty_fake_bce/) (function)
- [`tty_term_has`](/en/tmux/3.2a/reference/c-function-tty_term_has/) (function)

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/3.2a/reference/c-struct-grid_cell-attr/) (attribute)
- [`grid_cell.bg`](/en/tmux/3.2a/reference/c-struct-grid_cell-bg/) (attribute)
- [`grid_line.cellsize`](/en/tmux/3.2a/reference/c-struct-grid_line-cellsize/) (attribute)
- [`tty.cx`](/en/tmux/3.2a/reference/c-struct-tty-cx/) (attribute)
- [`grid_cell.data`](/en/tmux/3.2a/reference/c-struct-grid_cell-data/) (attribute)
- [`utf8_data.data`](/en/tmux/3.2a/reference/c-struct-utf8_data-data/) (attribute)
- [`grid_cell.fg`](/en/tmux/3.2a/reference/c-struct-grid_cell-fg/) (attribute)
- [`grid_cell.flags`](/en/tmux/3.2a/reference/c-struct-grid_cell-flags/) (attribute)
- [`grid_line.flags`](/en/tmux/3.2a/reference/c-struct-grid_line-flags/) (attribute)
- [`tty.flags`](/en/tmux/3.2a/reference/c-struct-tty-flags/) (attribute)
- [`screen.grid`](/en/tmux/3.2a/reference/c-struct-screen-grid/) (attribute)
- [`GRID_ATTR_CHARSET`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_charset/) (constant)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`grid_default_cell`](/en/tmux/3.2a/reference/c-variable-grid_default_cell/) (attribute)
- [`GRID_FLAG_CLEARED`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_flag_cleared/) (constant)
- [`GRID_FLAG_PADDING`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_flag_padding/) (constant)
- [`GRID_FLAG_SELECTED`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_flag_selected/) (constant)
- [`GRID_LINE_WRAPPED`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_line_wrapped/) (constant)
- [`grid.hsize`](/en/tmux/3.2a/reference/c-struct-grid-hsize/) (attribute)
- [`tty.mode`](/en/tmux/3.2a/reference/c-struct-tty-mode/) (attribute)
- [`screen`](/en/tmux/3.2a/reference/c-struct-screen/) (struct)
- [`screen_size_x`](/en/tmux/3.2a/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`utf8_data.size`](/en/tmux/3.2a/reference/c-struct-utf8_data-size/) (attribute)
- [`tty.sx`](/en/tmux/3.2a/reference/c-struct-tty-sx/) (attribute)
- [`tty.term`](/en/tmux/3.2a/reference/c-struct-tty-term/) (attribute)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
- [`TTY_NOCURSOR`](/en/tmux/3.2a/reference/c-define-tmux-h-tty_nocursor/) (constant)
- [`TTYC_EL1`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_el1/) (constant)
- [`grid_cell.us`](/en/tmux/3.2a/reference/c-struct-grid_cell-us/) (attribute)
- [`utf8_data.width`](/en/tmux/3.2a/reference/c-struct-utf8_data-width/) (attribute)
