# screen_write_collect_add

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

```c
void screen_write_collect_add(struct screen_write_ctx *ctx, const struct grid_cell *gc)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `gc` (`const struct grid_cell *`)

## Called by

- [`input_c0_dispatch`](/en/tmux/3.7c/reference/c-function-input-c-input_c0_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L1334)
- [`input_csi_dispatch`](/en/tmux/3.7c/reference/c-function-input-c-input_csi_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L1793)
- [`input_print`](/en/tmux/3.7c/reference/c-function-input-c-input_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L1220)
- [`input_stop_utf8`](/en/tmux/3.7c/reference/c-function-input-c-input_stop_utf8/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L790)
- [`input_top_bit_set`](/en/tmux/3.7c/reference/c-function-input-c-input_top_bit_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L2865)

## Calls

- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2458)
- [`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#L2449)
- [`screen_write_collect_end`](/en/tmux/3.7c/reference/c-function-screen_write_collect_end/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2447)
- [`screen_write_collect_flush`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_collect_flush/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2448)
- [`screen_write_linefeed`](/en/tmux/3.7c/reference/c-function-screen_write_linefeed/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2460)
- [`screen_write_set_cursor`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_set_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2461)

## Other function references

- [`xmalloc`](/en/tmux/3.7c/reference/c-function-xmalloc/) (function)

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/3.7c/reference/c-struct-grid_cell-attr/) (attribute)
- [`screen.cx`](/en/tmux/3.7c/reference/c-struct-screen-cx/) (attribute)
- [`screen.cy`](/en/tmux/3.7c/reference/c-struct-screen-cy/) (attribute)
- [`grid_cell.data`](/en/tmux/3.7c/reference/c-struct-grid_cell-data/) (attribute)
- [`screen_write_cline.data`](/en/tmux/3.7c/reference/c-struct-screen_write_cline-data/) (attribute)
- [`utf8_data.data`](/en/tmux/3.7c/reference/c-struct-utf8_data-data/) (attribute)
- [`grid_cell.flags`](/en/tmux/3.7c/reference/c-struct-grid_cell-flags/) (attribute)
- [`screen_write_citem.gc`](/en/tmux/3.7c/reference/c-struct-screen_write_citem-gc/) (attribute)
- [`GRID_ATTR_CHARSET`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_attr_charset/) (constant)
- [`grid_cell`](/en/tmux/3.7c/reference/c-struct-grid_cell/) (struct)
- [`GRID_FLAG_TAB`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_flag_tab/) (constant)
- [`screen_write_ctx.item`](/en/tmux/3.7c/reference/c-struct-screen_write_ctx-item/) (attribute)
- [`screen.mode`](/en/tmux/3.7c/reference/c-struct-screen-mode/) (attribute)
- [`MODE_INSERT`](/en/tmux/3.7c/reference/c-define-tmux-h-mode_insert/) (constant)
- [`MODE_WRAP`](/en/tmux/3.7c/reference/c-define-tmux-h-mode_wrap/) (constant)
- [`screen_write_ctx.s`](/en/tmux/3.7c/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`screen_size_x`](/en/tmux/3.7c/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`screen_write_ctx`](/en/tmux/3.7c/reference/c-struct-screen_write_ctx/) (struct)
- [`screen.sel`](/en/tmux/3.7c/reference/c-struct-screen-sel/) (attribute)
- [`utf8_data.size`](/en/tmux/3.7c/reference/c-struct-utf8_data-size/) (attribute)
- [`screen_write_citem.used`](/en/tmux/3.7c/reference/c-struct-screen_write_citem-used/) (attribute)
- [`utf8_data.width`](/en/tmux/3.7c/reference/c-struct-utf8_data-width/) (attribute)
- [`screen_write_citem.wrapped`](/en/tmux/3.7c/reference/c-struct-screen_write_citem-wrapped/) (attribute)
- [`screen.write_list`](/en/tmux/3.7c/reference/c-struct-screen-write_list/) (attribute)
