# winlink_add

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L163
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-winlink_add/

```c
struct winlink * winlink_add(struct winlinks *wwl, int idx)
```

## Parameters

- `wwl` (`struct winlinks *`)
- `idx` (`int`)

## Called by

- [`session_group_synchronize1`](/en/tmux/3.2a/reference/c-function-session-c-session_group_synchronize1/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L660)
- [`session_renumber_windows`](/en/tmux/3.2a/reference/c-function-session_renumber_windows/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L711)

## Calls

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

## Other function references

- [`winlink_find_by_index`](/en/tmux/3.2a/reference/c-function-winlink_find_by_index/) (function)
- [`winlink_next_index`](/en/tmux/3.2a/reference/c-function-window-c-winlink_next_index/) (function)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)
- [`session_attach`](/en/tmux/3.2a/reference/c-function-session_attach/) (function)
- [`spawn_window`](/en/tmux/3.2a/reference/c-function-spawn_window/) (function)

## Referenced declarations

- [`winlink.idx`](/en/tmux/3.2a/reference/c-struct-winlink-idx/) (attribute)
- [`winlink`](/en/tmux/3.2a/reference/c-struct-winlink/) (struct)
- [`winlinks`](/en/tmux/3.2a/reference/c-struct-winlinks/) (struct)
