# screen_write_clearstartofscreen

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1855
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-screen_write_clearstartofscreen/

```c
void screen_write_clearstartofscreen(struct screen_write_ctx *ctx, u_int bg)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `bg` (`u_int`)

## Called by

- [`input_csi_dispatch`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L1722)

## Calls

- [`grid_view_clear`](/en/tmux/latest/reference/c-function-grid_view_clear/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1873)
- [`screen_redraw_get_visible_ranges`](/en/tmux/latest/reference/c-function-screen_redraw_get_visible_ranges/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1901)
- [`screen_write_collect_clear`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_collect_clear/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1879)
- [`screen_write_collect_flush`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_collect_flush/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1880)
- [`screen_write_collect_insert_clear`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_collect_insert_clear/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1907)
- [`screen_write_initctx`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_initctx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1869)
- [`screen_write_set_cursor`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_set_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1900)
- [`tty_write`](/en/tmux/latest/reference/c-function-tty_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1883)

## Other function references

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

## Referenced declarations

- [`tty_ctx.bg`](/en/tmux/latest/reference/c-struct-tty_ctx-bg/) (attribute)
- [`screen.cx`](/en/tmux/latest/reference/c-struct-screen-cx/) (attribute)
- [`screen.cy`](/en/tmux/latest/reference/c-struct-screen-cy/) (attribute)
- [`tty_ctx.flags`](/en/tmux/latest/reference/c-struct-tty_ctx-flags/) (attribute)
- [`window_pane.flags`](/en/tmux/latest/reference/c-struct-window_pane-flags/) (attribute)
- [`screen.grid`](/en/tmux/latest/reference/c-struct-screen-grid/) (attribute)
- [`visible_range.nx`](/en/tmux/latest/reference/c-struct-visible_range-nx/) (attribute)
- [`tty_ctx.ocx`](/en/tmux/latest/reference/c-struct-tty_ctx-ocx/) (attribute)
- [`tty_ctx.ocy`](/en/tmux/latest/reference/c-struct-tty_ctx-ocy/) (attribute)
- [`PANE_REDRAW`](/en/tmux/latest/reference/c-define-tmux-h-pane_redraw/) (constant)
- [`visible_range.px`](/en/tmux/latest/reference/c-struct-visible_range-px/) (attribute)
- [`visible_ranges.ranges`](/en/tmux/latest/reference/c-struct-visible_ranges-ranges/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/latest/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`tty_ctx.s`](/en/tmux/latest/reference/c-struct-tty_ctx-s/) (attribute)
- [`screen_size_x`](/en/tmux/latest/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
- [`tty_ctx.sx`](/en/tmux/latest/reference/c-struct-tty_ctx-sx/) (attribute)
- [`TTY_CTX_PANE_OBSCURED`](/en/tmux/latest/reference/c-define-tmux-h-tty_ctx_pane_obscured/) (constant)
- [`visible_ranges.used`](/en/tmux/latest/reference/c-struct-visible_ranges-used/) (attribute)
- [`screen_write_ctx.wp`](/en/tmux/latest/reference/c-struct-screen_write_ctx-wp/) (attribute)
- [`tty_ctx.xoff`](/en/tmux/latest/reference/c-struct-tty_ctx-xoff/) (attribute)
- [`window_pane.xoff`](/en/tmux/latest/reference/c-struct-window_pane-xoff/) (attribute)
- [`tty_ctx.yoff`](/en/tmux/latest/reference/c-struct-tty_ctx-yoff/) (attribute)
- [`window_pane.yoff`](/en/tmux/latest/reference/c-struct-window_pane-yoff/) (attribute)
