# tty_clear_area

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1315
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-tty-c-tty_clear_area/

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

## Parameters

- `tty` (`struct tty *`)
- `ctx` (`const struct tty_ctx *`)
- `py` (`u_int`)
- `ny` (`u_int`)
- `px` (`u_int`)
- `nx` (`u_int`)
- `bg` (`u_int`)

## Called by

- [`tty_clear_pane_area`](/en/tmux/latest/reference/c-function-tty-c-tty_clear_pane_area/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1397)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1323)
- [`tty_clear_line`](/en/tmux/latest/reference/c-function-tty-c-tty_clear_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1386)
- [`tty_cursor`](/en/tmux/latest/reference/c-function-tty_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1339)
- [`tty_margin`](/en/tmux/latest/reference/c-function-tty-c-tty_margin/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1378)
- [`tty_margin_off`](/en/tmux/latest/reference/c-function-tty_margin_off/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1363)
- [`tty_putcode`](/en/tmux/latest/reference/c-function-tty_putcode/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1340)
- [`tty_putcode_i`](/en/tmux/latest/reference/c-function-tty_putcode_i/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1364)
- [`tty_puts`](/en/tmux/latest/reference/c-function-tty_puts/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1352)
- [`tty_region`](/en/tmux/latest/reference/c-function-tty-c-tty_region/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1362)
- [`xsnprintf`](/en/tmux/latest/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1350)

## Other function references

- [`tty_fake_bce`](/en/tmux/latest/reference/c-function-tty_fake_bce/) (function)
- [`tty_term_has`](/en/tmux/latest/reference/c-function-tty_term_has/) (function)

## Referenced declarations

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