# tty_write

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1480
- **Page:** https://libtmux.org/en/tmux/3.2a/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.2a/reference/c-function-screen_write_alignmenttest/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L926)
- [`screen_write_cell`](/en/tmux/3.2a/reference/c-function-screen_write_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1743)
- [`screen_write_clearcharacter`](/en/tmux/3.2a/reference/c-function-screen_write_clearcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1010)
- [`screen_write_clearendofscreen`](/en/tmux/3.2a/reference/c-function-screen_write_clearendofscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1366)
- [`screen_write_clearscreen`](/en/tmux/3.2a/reference/c-function-screen_write_clearscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1410)
- [`screen_write_clearstartofscreen`](/en/tmux/3.2a/reference/c-function-screen_write_clearstartofscreen/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1389)
- [`screen_write_collect_flush`](/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_collect_flush/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1569)
- [`screen_write_deletecharacter`](/en/tmux/3.2a/reference/c-function-screen_write_deletecharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L982)
- [`screen_write_deleteline`](/en/tmux/3.2a/reference/c-function-screen_write_deleteline/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1084)
- [`screen_write_initctx`](/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_initctx/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L206)
- [`screen_write_insertcharacter`](/en/tmux/3.2a/reference/c-function-screen_write_insertcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L954)
- [`screen_write_insertline`](/en/tmux/3.2a/reference/c-function-screen_write_insertline/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1037)
- [`screen_write_rawstring`](/en/tmux/3.2a/reference/c-function-screen_write_rawstring/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1993)
- [`screen_write_reverseindex`](/en/tmux/3.2a/reference/c-function-screen_write_reverseindex/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1229)
- [`screen_write_scrolldown`](/en/tmux/3.2a/reference/c-function-screen_write_scrolldown/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1333)
- [`screen_write_setselection`](/en/tmux/3.2a/reference/c-function-screen_write_setselection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L1980)

## Calls

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

## Referenced declarations

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