# style_add

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

```c
void style_add(struct grid_cell *gc, struct options *oo, const char *name, struct format_tree *ft)
```

## Parameters

- `gc` (`struct grid_cell *`)
- `oo` (`struct options *`)
- `name` (`const char *`)
- `ft` (`struct format_tree *`)

## Called by

- [`screen_redraw_draw_borders_cell`](/en/tmux/latest/reference/c-function-screen-redraw-c-screen_redraw_draw_borders_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-redraw.c#L1013)
- [`style_apply`](/en/tmux/latest/reference/c-function-style_apply/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L420)
- [`tty_style_changed`](/en/tmux/latest/reference/c-function-tty-c-tty_style_changed/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L3072)

## Calls

- [`format_free`](/en/tmux/latest/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L411)
- [`options_string_to_style`](/en/tmux/latest/reference/c-function-options_string_to_style/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/style.c#L399)

## Other function references

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

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/latest/reference/c-struct-grid_cell-attr/) (attribute)
- [`grid_cell.bg`](/en/tmux/latest/reference/c-struct-grid_cell-bg/) (attribute)
- [`grid_cell.fg`](/en/tmux/latest/reference/c-struct-grid_cell-fg/) (attribute)
- [`FORMAT_NOJOBS`](/en/tmux/latest/reference/c-define-tmux-h-format_nojobs/) (constant)
- [`format_tree`](/en/tmux/latest/reference/c-struct-format_tree/) (struct)
- [`style.gc`](/en/tmux/latest/reference/c-struct-style-gc/) (attribute)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`options`](/en/tmux/latest/reference/c-struct-options/) (struct)
- [`style_default`](/en/tmux/latest/reference/c-variable-style-c-style_default/) (attribute)
- [`grid_cell.us`](/en/tmux/latest/reference/c-struct-grid_cell-us/) (attribute)
