# grid_set_cells

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

```c
void grid_set_cells(struct grid *gd, u_int px, u_int py, const struct grid_cell *gc, const char *s, size_t slen)
```

## Parameters

- `gd` (`struct grid *`)
- `px` (`u_int`)
- `py` (`u_int`)
- `gc` (`const struct grid_cell *`)
- `s` (`const char *`)
- `slen` (`size_t`)

## Calls

- [`grid_check_y`](/en/tmux/latest/reference/c-function-grid-c-grid_check_y/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L632)
- [`grid_expand_line`](/en/tmux/latest/reference/c-function-grid-c-grid_expand_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L635)
- [`grid_extended_cell`](/en/tmux/latest/reference/c-function-grid-c-grid_extended_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L644)
- [`grid_need_extended_cell`](/en/tmux/latest/reference/c-function-grid-c-grid_need_extended_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L643)
- [`grid_store_cell`](/en/tmux/latest/reference/c-function-grid-c-grid_store_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L647)
- [`utf8_build_one`](/en/tmux/latest/reference/c-function-utf8_build_one/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L645)

## Referenced by

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

## Referenced declarations

- [`grid_line.celldata`](/en/tmux/latest/reference/c-struct-grid_line-celldata/) (attribute)
- [`grid_line.cellused`](/en/tmux/latest/reference/c-struct-grid_line-cellused/) (attribute)
- [`grid_extd_entry.data`](/en/tmux/latest/reference/c-struct-grid_extd_entry-data/) (attribute)
- [`grid`](/en/tmux/latest/reference/c-struct-grid/) (struct)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`grid.linedata`](/en/tmux/latest/reference/c-struct-grid-linedata/) (attribute)
