# layout_parse

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L174
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-layout_parse/

```c
int layout_parse(struct window *w, const char *layout, char **cause)
```

## Parameters

- `w` (`struct window *`)
- `layout` (`const char *`)
- `cause` (`char **`)

## Called by

- [`cmd_select_layout_exec`](/en/tmux/3.7c/reference/c-function-cmd-select-layout-c-cmd_select_layout_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-layout.c#L127)

## Calls

- [`layout_assign`](/en/tmux/3.7c/reference/c-function-layout-custom-c-layout_assign/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L274)
- [`layout_check`](/en/tmux/3.7c/reference/c-function-layout-custom-c-layout_check/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L258)
- [`layout_construct`](/en/tmux/3.7c/reference/c-function-layout-custom-c-layout_construct/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L194)
- [`layout_count_cells`](/en/tmux/3.7c/reference/c-function-layout_count_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L212)
- [`layout_create_cell`](/en/tmux/3.7c/reference/c-function-layout_create_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L200)
- [`layout_destroy_cell`](/en/tmux/3.7c/reference/c-function-layout_destroy_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L226)
- [`layout_find_bottomright`](/en/tmux/3.7c/reference/c-function-layout-custom-c-layout_find_bottomright/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L225)
- [`layout_fix_offsets`](/en/tmux/3.7c/reference/c-function-layout_fix_offsets/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L284)
- [`layout_fix_panes`](/en/tmux/3.7c/reference/c-function-layout_fix_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L285)
- [`layout_fix_zindexes`](/en/tmux/3.7c/reference/c-function-layout_fix_zindexes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L281)
- [`layout_free_cell`](/en/tmux/3.7c/reference/c-function-layout_free_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L268)
- [`layout_print_cell`](/en/tmux/3.7c/reference/c-function-layout_print_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L253)
- [`layout_set_size`](/en/tmux/3.7c/reference/c-function-layout_set_size/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L202)
- [`notify_window`](/en/tmux/3.7c/reference/c-function-notify_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L289)
- [`recalculate_sizes`](/en/tmux/3.7c/reference/c-function-recalculate_sizes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L286)
- [`window_count_panes`](/en/tmux/3.7c/reference/c-function-window_count_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L210)
- [`window_resize`](/en/tmux/3.7c/reference/c-function-window_resize/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L265)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L214)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L184)

## Other function references

- [`layout_checksum`](/en/tmux/3.7c/reference/c-function-layout-custom-c-layout_checksum/) (function)

## Referenced declarations

- [`layout_cell.cells`](/en/tmux/3.7c/reference/c-struct-layout_cell-cells/) (attribute)
- [`window_pane.entry`](/en/tmux/3.7c/reference/c-struct-window_pane-entry/) (attribute)
- [`LAYOUT_LEFTRIGHT`](/en/tmux/3.7c/reference/c-enum-layout_type-layout_leftright/) (constant)
- [`window.layout_root`](/en/tmux/3.7c/reference/c-struct-window-layout_root/) (attribute)
- [`LAYOUT_TOPBOTTOM`](/en/tmux/3.7c/reference/c-enum-layout_type-layout_topbottom/) (constant)
- [`LAYOUT_WINDOWPANE`](/en/tmux/3.7c/reference/c-enum-layout_type-layout_windowpane/) (constant)
- [`window.panes`](/en/tmux/3.7c/reference/c-struct-window-panes/) (attribute)
- [`layout_cell.sx`](/en/tmux/3.7c/reference/c-struct-layout_cell-sx/) (attribute)
- [`window_pane.sx`](/en/tmux/3.7c/reference/c-struct-window_pane-sx/) (attribute)
- [`window.sx`](/en/tmux/3.7c/reference/c-struct-window-sx/) (attribute)
- [`layout_cell.sy`](/en/tmux/3.7c/reference/c-struct-layout_cell-sy/) (attribute)
- [`window_pane.sy`](/en/tmux/3.7c/reference/c-struct-window_pane-sy/) (attribute)
- [`window.sy`](/en/tmux/3.7c/reference/c-struct-window-sy/) (attribute)
- [`layout_cell.type`](/en/tmux/3.7c/reference/c-struct-layout_cell-type/) (attribute)
- [`window`](/en/tmux/3.7c/reference/c-struct-window/) (struct)
- [`window.z_index`](/en/tmux/3.7c/reference/c-struct-window-z_index/) (attribute)
- [`window_pane.zentry`](/en/tmux/3.7c/reference/c-struct-window_pane-zentry/) (attribute)
