# control_add_pane

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

```c
static struct control_pane * control_add_pane(struct client *c, struct window_pane *wp)
```

## Parameters

- `c` (`struct client *`)
- `wp` (`struct window_pane *`)

## Called by

- [`control_pause_pane`](/en/tmux/3.2a/reference/c-function-control_pause_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L379)
- [`control_set_pane_off`](/en/tmux/3.2a/reference/c-function-control_set_pane_off/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L354)
- [`control_write_output`](/en/tmux/3.2a/reference/c-function-control_write_output/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/control.c#L484)

## Calls

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

## Referenced declarations

- [`control_pane.blocks`](/en/tmux/3.2a/reference/c-struct-control_pane-blocks/) (attribute)
- [`client`](/en/tmux/3.2a/reference/c-struct-client/) (struct)
- [`control_pane`](/en/tmux/3.2a/reference/c-struct-control_pane/) (struct)
- [`client.control_state`](/en/tmux/3.2a/reference/c-struct-client-control_state/) (attribute)
- [`window_pane.id`](/en/tmux/3.2a/reference/c-struct-window_pane-id/) (attribute)
- [`control_pane.offset`](/en/tmux/3.2a/reference/c-struct-control_pane-offset/) (attribute)
- [`window_pane.offset`](/en/tmux/3.2a/reference/c-struct-window_pane-offset/) (attribute)
- [`control_pane.pane`](/en/tmux/3.2a/reference/c-struct-control_pane-pane/) (attribute)
- [`control_state.panes`](/en/tmux/3.2a/reference/c-struct-control_state-panes/) (attribute)
- [`control_pane.queued`](/en/tmux/3.2a/reference/c-struct-control_pane-queued/) (attribute)
- [`window_pane`](/en/tmux/3.2a/reference/c-struct-window_pane/) (struct)
