# layout_init

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

```c
void layout_init(struct window *w, struct window_pane *wp)
```

## Parameters

- `w` (`struct window *`)
- `wp` (`struct window_pane *`)

## Called by

- [`cmd_break_pane_exec`](/en/tmux/latest/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-break-pane.c#L126)
- [`spawn_pane`](/en/tmux/latest/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L269)
- [`spawn_window`](/en/tmux/latest/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L113)
- [`window_zoom`](/en/tmux/latest/reference/c-function-window_zoom/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L742)

## Calls

- [`layout_create_cell`](/en/tmux/latest/reference/c-function-layout_create_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L600)
- [`layout_fix_panes`](/en/tmux/latest/reference/c-function-layout_fix_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L603)
- [`layout_make_leaf`](/en/tmux/latest/reference/c-function-layout_make_leaf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L602)
- [`layout_set_size`](/en/tmux/latest/reference/c-function-layout_set_size/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L601)

## Referenced declarations

- [`window.layout_root`](/en/tmux/latest/reference/c-struct-window-layout_root/) (attribute)
- [`window.sx`](/en/tmux/latest/reference/c-struct-window-sx/) (attribute)
- [`window.sy`](/en/tmux/latest/reference/c-struct-window-sy/) (attribute)
- [`window`](/en/tmux/latest/reference/c-struct-window/) (struct)
- [`window_pane`](/en/tmux/latest/reference/c-struct-window_pane/) (struct)
- [`layout_cell.wp`](/en/tmux/latest/reference/c-struct-layout_cell-wp/) (attribute)
