# tty_clear_area

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

```c
static void tty_clear_area(struct tty *tty, const struct grid_cell *defaults, u_int py, u_int ny, u_int px, u_int nx, u_int bg)
```

## Parameters

- `tty` (`struct tty *`)
- `defaults` (`const struct grid_cell *`)
- `py` (`u_int`)
- `ny` (`u_int`)
- `px` (`u_int`)
- `nx` (`u_int`)
- `bg` (`u_int`)

## Called by

- [`tty_clear_pane_area`](/en/tmux/3.2a/reference/c-function-tty-c-tty_clear_pane_area/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1217)

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1146)
- [`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#L1206)
- [`tty_cursor`](/en/tmux/3.2a/reference/c-function-tty_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1159)
- [`tty_fake_bce`](/en/tmux/3.2a/reference/c-function-tty-c-tty_fake_bce/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1153)
- [`tty_margin`](/en/tmux/3.2a/reference/c-function-tty-c-tty_margin/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1198)
- [`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#L1183)
- [`tty_putcode`](/en/tmux/3.2a/reference/c-function-tty_putcode/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1160)
- [`tty_putcode1`](/en/tmux/3.2a/reference/c-function-tty_putcode1/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1184)
- [`tty_puts`](/en/tmux/3.2a/reference/c-function-tty_puts/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1172)
- [`tty_region`](/en/tmux/3.2a/reference/c-function-tty-c-tty_region/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1182)
- [`xsnprintf`](/en/tmux/3.2a/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1170)

## Other function references

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

## Referenced declarations

- [`tty.client`](/en/tmux/3.2a/reference/c-struct-tty-client/) (attribute)
- [`COLOUR_DEFAULT`](/en/tmux/3.2a/reference/c-define-tmux-h-colour_default/) (constant)
- [`tty_term.flags`](/en/tmux/3.2a/reference/c-struct-tty_term-flags/) (attribute)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`client.name`](/en/tmux/3.2a/reference/c-struct-client-name/) (attribute)
- [`tty.sx`](/en/tmux/3.2a/reference/c-struct-tty-sx/) (attribute)
- [`tty.sy`](/en/tmux/3.2a/reference/c-struct-tty-sy/) (attribute)
- [`tty.term`](/en/tmux/3.2a/reference/c-struct-tty-term/) (attribute)
- [`TERM_DECFRA`](/en/tmux/3.2a/reference/c-define-tmux-h-term_decfra/) (constant)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
- [`tty_use_margin`](/en/tmux/3.2a/reference/c-define-tty-c-tty_use_margin/) (constant)
- [`TTYC_CSR`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_csr/) (constant)
- [`TTYC_ED`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_ed/) (constant)
- [`TTYC_INDN`](/en/tmux/3.2a/reference/c-enum-tty_code_code-ttyc_indn/) (constant)
