# tty_write

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

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

## Parameters

- `cmdfn` (`void(*)(struct tty *, const struct tty_ctx *)`)
- `ctx` (`struct tty_ctx *`)

## Called by

- [`screen_write_alignmenttest`](/en/tmux/3.7c/reference/c-function-screen_write_alignmenttest/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1241)
- [`screen_write_cell`](/en/tmux/3.7c/reference/c-function-screen_write_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2608)
- [`screen_write_clearcharacter`](/en/tmux/3.7c/reference/c-function-screen_write_clearcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1358)
- [`screen_write_clearendofscreen`](/en/tmux/3.7c/reference/c-function-screen_write_clearendofscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1809)
- [`screen_write_clearscreen`](/en/tmux/3.7c/reference/c-function-screen_write_clearscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1956)
- [`screen_write_clearstartofscreen`](/en/tmux/3.7c/reference/c-function-screen_write_clearstartofscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1883)
- [`screen_write_collect_flush_line`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_collect_flush_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2236)
- [`screen_write_collect_flush_scrolled`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_collect_flush_scrolled/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2159)
- [`screen_write_combine`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_combine/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2782)
- [`screen_write_deletecharacter`](/en/tmux/3.7c/reference/c-function-screen_write_deletecharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1319)
- [`screen_write_deleteline`](/en/tmux/3.7c/reference/c-function-screen_write_deleteline/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1461)
- [`screen_write_fast_copy`](/en/tmux/3.7c/reference/c-function-screen_write_fast_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L659)
- [`screen_write_initctx`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_initctx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L272)
- [`screen_write_insertcharacter`](/en/tmux/3.7c/reference/c-function-screen_write_insertcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1280)
- [`screen_write_insertline`](/en/tmux/3.7c/reference/c-function-screen_write_insertline/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1397)
- [`screen_write_rawstring`](/en/tmux/3.7c/reference/c-function-screen_write_rawstring/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2888)
- [`screen_write_redraw_line`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_redraw_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1179)
- [`screen_write_reverseindex`](/en/tmux/3.7c/reference/c-function-screen_write_reverseindex/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1627)
- [`screen_write_scrolldown`](/en/tmux/3.7c/reference/c-function-screen_write_scrolldown/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L1758)
- [`screen_write_setselection`](/en/tmux/3.7c/reference/c-function-screen_write_setselection/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2872)

## Calls

- [`tty_client_ready`](/en/tmux/3.7c/reference/c-function-tty-c-tty_client_ready/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L1635)

## Referenced declarations

- [`client.entry`](/en/tmux/3.7c/reference/c-struct-client-entry/) (attribute)
- [`tty_ctx.set_client_cb`](/en/tmux/3.7c/reference/c-struct-tty_ctx-set_client_cb/) (attribute)
- [`client.tty`](/en/tmux/3.7c/reference/c-struct-client-tty/) (attribute)
- [`tty`](/en/tmux/3.7c/reference/c-struct-tty/) (struct)
- [`tty_ctx`](/en/tmux/3.7c/reference/c-struct-tty_ctx/) (struct)
