# tty_cmd_clearscreen

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

```c
void tty_cmd_clearscreen(struct tty *tty, const struct tty_ctx *ctx)
```

## Parameters

- `tty` (`struct tty *`)
- `ctx` (`const struct tty_ctx *`)

## Calls

- [`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#L2015)
- [`tty_default_attributes`](/en/tmux/latest/reference/c-function-tty_default_attributes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2004)
- [`tty_margin_off`](/en/tmux/latest/reference/c-function-tty_margin_off/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2008)
- [`tty_region_pane`](/en/tmux/latest/reference/c-function-tty-c-tty_region_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2007)

## Referenced by

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

## Referenced declarations

- [`tty_ctx.bg`](/en/tmux/latest/reference/c-struct-tty_ctx-bg/) (attribute)
- [`tty_ctx.defaults`](/en/tmux/latest/reference/c-struct-tty_ctx-defaults/) (attribute)
- [`screen.hyperlinks`](/en/tmux/latest/reference/c-struct-screen-hyperlinks/) (attribute)
- [`tty_ctx.palette`](/en/tmux/latest/reference/c-struct-tty_ctx-palette/) (attribute)
- [`tty_ctx.s`](/en/tmux/latest/reference/c-struct-tty_ctx-s/) (attribute)
- [`tty_ctx.sx`](/en/tmux/latest/reference/c-struct-tty_ctx-sx/) (attribute)
- [`tty_ctx.sy`](/en/tmux/latest/reference/c-struct-tty_ctx-sy/) (attribute)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`tty_ctx`](/en/tmux/latest/reference/c-struct-tty_ctx/) (struct)
